/* AUTO-GENERATED by psxrecomp-bios --emit-full. DO NOT EDIT. * * BIOS SHA256: fabe498fbf224e4721f12f31b6f5fe0659205e341dc4e5c5f91b9bd1a1011c57 * Functions: 655 */ #define psx_dispatch OpenBIOS_psx_dispatch #define psx_dispatch_call OpenBIOS_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_cpu_charge(uint32_t cycles); #endif void OpenBIOS_func_1FC00000(CPUState* cpu); void OpenBIOS_func_1FC00084(CPUState* cpu); void OpenBIOS_func_1FC00144(CPUState* cpu); void OpenBIOS_func_1FC0019C(CPUState* cpu); void OpenBIOS_func_1FC001AC(CPUState* cpu); void OpenBIOS_func_1FC0039C(CPUState* cpu); void OpenBIOS_func_1FC003C4(CPUState* cpu); void OpenBIOS_func_1FC003F8(CPUState* cpu); void OpenBIOS_func_1FC00514(CPUState* cpu); void OpenBIOS_func_1FC00520(CPUState* cpu); void OpenBIOS_func_1FC0052C(CPUState* cpu); void OpenBIOS_func_1FC006C8(CPUState* cpu); void OpenBIOS_func_1FC00894(CPUState* cpu); void OpenBIOS_func_1FC00C48(CPUState* cpu); void OpenBIOS_func_1FC00CFC(CPUState* cpu); void OpenBIOS_func_1FC00D60(CPUState* cpu); void OpenBIOS_func_1FC00E98(CPUState* cpu); void OpenBIOS_func_1FC00EE0(CPUState* cpu); void OpenBIOS_func_1FC00F8C(CPUState* cpu); void OpenBIOS_func_1FC00FB0(CPUState* cpu); void OpenBIOS_func_1FC00FB8(CPUState* cpu); void OpenBIOS_func_1FC010C4(CPUState* cpu); void OpenBIOS_func_1FC010D0(CPUState* cpu); void OpenBIOS_func_1FC01124(CPUState* cpu); void OpenBIOS_func_1FC01154(CPUState* cpu); void OpenBIOS_func_1FC011E0(CPUState* cpu); void OpenBIOS_func_1FC0153C(CPUState* cpu); void OpenBIOS_func_1FC01570(CPUState* cpu); void OpenBIOS_func_1FC015E0(CPUState* cpu); void OpenBIOS_func_1FC01650(CPUState* cpu); void OpenBIOS_func_1FC016C0(CPUState* cpu); void OpenBIOS_func_1FC0175C(CPUState* cpu); void OpenBIOS_func_1FC017C0(CPUState* cpu); void OpenBIOS_func_1FC017D0(CPUState* cpu); void OpenBIOS_func_1FC01830(CPUState* cpu); void OpenBIOS_func_1FC019B4(CPUState* cpu); void OpenBIOS_func_1FC01A44(CPUState* cpu); void OpenBIOS_func_1FC01A84(CPUState* cpu); void OpenBIOS_func_1FC01BC4(CPUState* cpu); void OpenBIOS_func_1FC01EEC(CPUState* cpu); void OpenBIOS_func_1FC02144(CPUState* cpu); void OpenBIOS_func_1FC02258(CPUState* cpu); void OpenBIOS_func_1FC023C8(CPUState* cpu); void OpenBIOS_func_1FC02554(CPUState* cpu); void OpenBIOS_func_1FC02594(CPUState* cpu); void OpenBIOS_func_1FC025EC(CPUState* cpu); void OpenBIOS_func_1FC02640(CPUState* cpu); void OpenBIOS_func_1FC029A4(CPUState* cpu); void OpenBIOS_func_1FC02DD8(CPUState* cpu); void OpenBIOS_func_1FC02DEC(CPUState* cpu); void OpenBIOS_func_1FC02E70(CPUState* cpu); void OpenBIOS_func_1FC02FB8(CPUState* cpu); void OpenBIOS_func_1FC03000(CPUState* cpu); void OpenBIOS_func_1FC030BC(CPUState* cpu); void OpenBIOS_func_1FC030D0(CPUState* cpu); void OpenBIOS_func_1FC0310C(CPUState* cpu); void OpenBIOS_func_1FC03404(CPUState* cpu); void OpenBIOS_func_1FC035B4(CPUState* cpu); void OpenBIOS_func_1FC036E0(CPUState* cpu); void OpenBIOS_func_1FC037F0(CPUState* cpu); void OpenBIOS_func_1FC038FC(CPUState* cpu); void OpenBIOS_func_1FC03A30(CPUState* cpu); void OpenBIOS_func_1FC03A78(CPUState* cpu); void OpenBIOS_func_1FC03CEC(CPUState* cpu); void OpenBIOS_func_1FC03D0C(CPUState* cpu); void OpenBIOS_func_1FC03D28(CPUState* cpu); void OpenBIOS_func_1FC03DA0(CPUState* cpu); void OpenBIOS_func_1FC03DE0(CPUState* cpu); void OpenBIOS_func_1FC03E70(CPUState* cpu); void OpenBIOS_func_1FC03F00(CPUState* cpu); void OpenBIOS_func_1FC03FB0(CPUState* cpu); void OpenBIOS_func_1FC03FD4(CPUState* cpu); void OpenBIOS_func_1FC04080(CPUState* cpu); void OpenBIOS_func_1FC0414C(CPUState* cpu); void OpenBIOS_func_1FC0415C(CPUState* cpu); void OpenBIOS_func_1FC04168(CPUState* cpu); void OpenBIOS_func_1FC041D0(CPUState* cpu); void OpenBIOS_func_1FC04270(CPUState* cpu); void OpenBIOS_func_1FC04304(CPUState* cpu); void OpenBIOS_func_1FC04330(CPUState* cpu); void OpenBIOS_func_1FC04348(CPUState* cpu); void OpenBIOS_func_1FC04374(CPUState* cpu); void OpenBIOS_func_1FC043D0(CPUState* cpu); void OpenBIOS_func_1FC044D0(CPUState* cpu); void OpenBIOS_func_1FC04538(CPUState* cpu); void OpenBIOS_func_1FC0459C(CPUState* cpu); void OpenBIOS_func_1FC045E0(CPUState* cpu); void OpenBIOS_func_1FC04668(CPUState* cpu); void OpenBIOS_func_1FC046C0(CPUState* cpu); void OpenBIOS_func_1FC04790(CPUState* cpu); void OpenBIOS_func_1FC04840(CPUState* cpu); void OpenBIOS_func_1FC04974(CPUState* cpu); void OpenBIOS_func_1FC04AA8(CPUState* cpu); void OpenBIOS_func_1FC04B2C(CPUState* cpu); void OpenBIOS_func_1FC04B84(CPUState* cpu); void OpenBIOS_func_1FC04C0C(CPUState* cpu); void OpenBIOS_func_1FC04CBC(CPUState* cpu); void OpenBIOS_func_1FC04CF0(CPUState* cpu); void OpenBIOS_func_1FC04D1C(CPUState* cpu); void OpenBIOS_func_1FC04DA0(CPUState* cpu); void OpenBIOS_func_1FC04DCC(CPUState* cpu); void OpenBIOS_func_1FC04F1C(CPUState* cpu); void OpenBIOS_func_1FC04F64(CPUState* cpu); void OpenBIOS_func_1FC04FA4(CPUState* cpu); void OpenBIOS_func_1FC050DC(CPUState* cpu); void OpenBIOS_func_1FC05190(CPUState* cpu); void OpenBIOS_func_1FC051A0(CPUState* cpu); void OpenBIOS_func_1FC051CC(CPUState* cpu); void OpenBIOS_func_1FC051F8(CPUState* cpu); void OpenBIOS_func_1FC052E4(CPUState* cpu); void OpenBIOS_func_1FC052F4(CPUState* cpu); void OpenBIOS_func_1FC053C4(CPUState* cpu); void OpenBIOS_func_1FC05474(CPUState* cpu); void OpenBIOS_func_1FC054A0(CPUState* cpu); void OpenBIOS_func_1FC054F4(CPUState* cpu); void OpenBIOS_func_1FC05578(CPUState* cpu); void OpenBIOS_func_1FC05600(CPUState* cpu); void OpenBIOS_func_1FC05648(CPUState* cpu); void OpenBIOS_func_1FC056B4(CPUState* cpu); void OpenBIOS_func_1FC056EC(CPUState* cpu); void OpenBIOS_func_1FC05724(CPUState* cpu); void OpenBIOS_func_1FC0574C(CPUState* cpu); void OpenBIOS_func_1FC0578C(CPUState* cpu); void OpenBIOS_func_1FC057F0(CPUState* cpu); void OpenBIOS_func_1FC05858(CPUState* cpu); void OpenBIOS_func_1FC05878(CPUState* cpu); void OpenBIOS_func_1FC05894(CPUState* cpu); void OpenBIOS_func_1FC058C8(CPUState* cpu); void OpenBIOS_func_1FC0590C(CPUState* cpu); void OpenBIOS_func_1FC05930(CPUState* cpu); void OpenBIOS_func_1FC0596C(CPUState* cpu); void OpenBIOS_func_1FC0599C(CPUState* cpu); void OpenBIOS_func_1FC059CC(CPUState* cpu); void OpenBIOS_func_1FC059F4(CPUState* cpu); void OpenBIOS_func_1FC05A44(CPUState* cpu); void OpenBIOS_func_1FC05A68(CPUState* cpu); void OpenBIOS_func_1FC05AA4(CPUState* cpu); void OpenBIOS_func_1FC05AFC(CPUState* cpu); void OpenBIOS_func_1FC05B24(CPUState* cpu); void OpenBIOS_func_1FC05B64(CPUState* cpu); void OpenBIOS_func_1FC05B74(CPUState* cpu); void OpenBIOS_func_1FC05B88(CPUState* cpu); void OpenBIOS_func_1FC05B94(CPUState* cpu); void OpenBIOS_func_1FC05B9C(CPUState* cpu); void OpenBIOS_func_1FC05BA4(CPUState* cpu); void OpenBIOS_func_1FC05BB0(CPUState* cpu); void OpenBIOS_func_1FC05BD8(CPUState* cpu); void OpenBIOS_func_1FC05C00(CPUState* cpu); void OpenBIOS_func_1FC05C0C(CPUState* cpu); void OpenBIOS_func_1FC05C14(CPUState* cpu); void OpenBIOS_func_1FC05C8C(CPUState* cpu); void OpenBIOS_func_1FC05E10(CPUState* cpu); void OpenBIOS_func_1FC05E54(CPUState* cpu); void OpenBIOS_func_1FC05E6C(CPUState* cpu); void OpenBIOS_func_1FC05E74(CPUState* cpu); void OpenBIOS_func_1FC05EC4(CPUState* cpu); void OpenBIOS_func_1FC05ED4(CPUState* cpu); void OpenBIOS_func_1FC05F08(CPUState* cpu); void OpenBIOS_func_1FC05F48(CPUState* cpu); void OpenBIOS_func_1FC05FA8(CPUState* cpu); void OpenBIOS_func_1FC06008(CPUState* cpu); void OpenBIOS_func_1FC0604C(CPUState* cpu); void OpenBIOS_func_1FC06084(CPUState* cpu); void OpenBIOS_func_1FC060C4(CPUState* cpu); void OpenBIOS_func_1FC060E4(CPUState* cpu); void OpenBIOS_func_1FC06110(CPUState* cpu); void OpenBIOS_func_1FC0611C(CPUState* cpu); void OpenBIOS_func_1FC06180(CPUState* cpu); void OpenBIOS_func_1FC06220(CPUState* cpu); void OpenBIOS_func_1FC06248(CPUState* cpu); void OpenBIOS_func_1FC06254(CPUState* cpu); void OpenBIOS_func_1FC06260(CPUState* cpu); void OpenBIOS_func_1FC06270(CPUState* cpu); void OpenBIOS_func_1FC06278(CPUState* cpu); void OpenBIOS_func_1FC06288(CPUState* cpu); void OpenBIOS_func_1FC06290(CPUState* cpu); void OpenBIOS_func_1FC06298(CPUState* cpu); void OpenBIOS_func_1FC062A0(CPUState* cpu); void OpenBIOS_func_1FC062A8(CPUState* cpu); void OpenBIOS_func_1FC06324(CPUState* cpu); void OpenBIOS_func_1FC0637C(CPUState* cpu); void OpenBIOS_func_1FC063E4(CPUState* cpu); void OpenBIOS_func_1FC0648C(CPUState* cpu); void OpenBIOS_func_1FC06634(CPUState* cpu); void OpenBIOS_func_1FC066B0(CPUState* cpu); void OpenBIOS_func_1FC066EC(CPUState* cpu); void OpenBIOS_func_1FC06728(CPUState* cpu); void OpenBIOS_func_1FC06834(CPUState* cpu); void OpenBIOS_func_1FC0688C(CPUState* cpu); void OpenBIOS_func_1FC068F8(CPUState* cpu); void OpenBIOS_func_1FC06924(CPUState* cpu); void OpenBIOS_func_1FC06950(CPUState* cpu); void OpenBIOS_func_1FC06960(CPUState* cpu); void OpenBIOS_func_1FC06970(CPUState* cpu); void OpenBIOS_func_1FC06980(CPUState* cpu); void OpenBIOS_func_1FC06990(CPUState* cpu); void OpenBIOS_func_1FC0699C(CPUState* cpu); void OpenBIOS_func_1FC069B8(CPUState* cpu); void OpenBIOS_func_1FC069F4(CPUState* cpu); void OpenBIOS_func_1FC06A10(CPUState* cpu); void OpenBIOS_func_1FC06A38(CPUState* cpu); void OpenBIOS_func_1FC06A8C(CPUState* cpu); void OpenBIOS_func_1FC06AA8(CPUState* cpu); void OpenBIOS_func_1FC06AE4(CPUState* cpu); void OpenBIOS_func_1FC06C54(CPUState* cpu); void OpenBIOS_func_1FC06C7C(CPUState* cpu); void OpenBIOS_func_1FC07390(CPUState* cpu); void OpenBIOS_func_1FC073E0(CPUState* cpu); void OpenBIOS_func_1FC073F8(CPUState* cpu); void OpenBIOS_func_1FC07424(CPUState* cpu); void OpenBIOS_func_1FC0742C(CPUState* cpu); void OpenBIOS_func_1FC07484(CPUState* cpu); void OpenBIOS_func_1FC074DC(CPUState* cpu); void OpenBIOS_func_1FC07578(CPUState* cpu); void OpenBIOS_func_1FC07604(CPUState* cpu); void OpenBIOS_func_1FC0767C(CPUState* cpu); void OpenBIOS_func_1FC07704(CPUState* cpu); void OpenBIOS_func_1FC07714(CPUState* cpu); void OpenBIOS_func_1FC07724(CPUState* cpu); void OpenBIOS_func_1FC07734(CPUState* cpu); void OpenBIOS_func_1FC07744(CPUState* cpu); void OpenBIOS_func_1FC07750(CPUState* cpu); void OpenBIOS_func_1FC07760(CPUState* cpu); void OpenBIOS_func_1FC07808(CPUState* cpu); void OpenBIOS_func_1FC078B0(CPUState* cpu); void OpenBIOS_func_1FC07944(CPUState* cpu); void OpenBIOS_func_1FC07968(CPUState* cpu); void OpenBIOS_func_1FC079C8(CPUState* cpu); void OpenBIOS_func_1FC07A24(CPUState* cpu); void OpenBIOS_func_1FC07A74(CPUState* cpu); void OpenBIOS_func_1FC07CA4(CPUState* cpu); void OpenBIOS_func_1FC07D94(CPUState* cpu); void OpenBIOS_func_1FC07DA8(CPUState* cpu); void OpenBIOS_func_1FC07DBC(CPUState* cpu); void OpenBIOS_func_1FC07E84(CPUState* cpu); void OpenBIOS_func_1FC08060(CPUState* cpu); void OpenBIOS_func_1FC08068(CPUState* cpu); void OpenBIOS_func_1FC08070(CPUState* cpu); void OpenBIOS_func_1FC08078(CPUState* cpu); void OpenBIOS_func_1FC0809C(CPUState* cpu); void OpenBIOS_func_1FC080A4(CPUState* cpu); void OpenBIOS_func_1FC080AC(CPUState* cpu); void OpenBIOS_func_1FC080D0(CPUState* cpu); void OpenBIOS_func_1FC080F4(CPUState* cpu); void OpenBIOS_func_1FC080FC(CPUState* cpu); void OpenBIOS_func_1FC08104(CPUState* cpu); void OpenBIOS_func_1FC0810C(CPUState* cpu); void OpenBIOS_func_1FC0817C(CPUState* cpu); void OpenBIOS_func_1FC081EC(CPUState* cpu); void OpenBIOS_func_1FC08220(CPUState* cpu); void OpenBIOS_func_1FC08254(CPUState* cpu); void OpenBIOS_func_1FC08288(CPUState* cpu); void OpenBIOS_func_1FC082DC(CPUState* cpu); void OpenBIOS_func_1FC08330(CPUState* cpu); void OpenBIOS_func_1FC08338(CPUState* cpu); void OpenBIOS_func_1FC08360(CPUState* cpu); void OpenBIOS_func_1FC08370(CPUState* cpu); void OpenBIOS_func_1FC08378(CPUState* cpu); void OpenBIOS_func_1FC08380(CPUState* cpu); void OpenBIOS_func_1FC08388(CPUState* cpu); void OpenBIOS_func_1FC08390(CPUState* cpu); void OpenBIOS_func_1FC08398(CPUState* cpu); void OpenBIOS_func_1FC083A0(CPUState* cpu); void OpenBIOS_func_1FC083A8(CPUState* cpu); void OpenBIOS_func_1FC083B0(CPUState* cpu); void OpenBIOS_func_1FC083B8(CPUState* cpu); void OpenBIOS_func_1FC08478(CPUState* cpu); void OpenBIOS_func_1FC085D8(CPUState* cpu); void OpenBIOS_func_1FC08604(CPUState* cpu); void OpenBIOS_func_1FC08674(CPUState* cpu); void OpenBIOS_func_1FC086C4(CPUState* cpu); void OpenBIOS_func_1FC086E8(CPUState* cpu); void OpenBIOS_func_1FC088F0(CPUState* cpu); void OpenBIOS_func_1FC08C58(CPUState* cpu); void OpenBIOS_func_1FC08C9C(CPUState* cpu); void OpenBIOS_func_1FC08F38(CPUState* cpu); void OpenBIOS_func_1FC08F4C(CPUState* cpu); void OpenBIOS_func_1FC08F64(CPUState* cpu); void OpenBIOS_func_1FC08F80(CPUState* cpu); void OpenBIOS_func_1FC08FD4(CPUState* cpu); void OpenBIOS_func_1FC09028(CPUState* cpu); void OpenBIOS_func_1FC09108(CPUState* cpu); void OpenBIOS_func_1FC0912C(CPUState* cpu); void OpenBIOS_func_1FC09198(CPUState* cpu); void OpenBIOS_func_1FC091E0(CPUState* cpu); void OpenBIOS_func_1FC091EC(CPUState* cpu); void OpenBIOS_func_1FC095F8(CPUState* cpu); void OpenBIOS_func_1FC0A500(CPUState* cpu); void OpenBIOS_func_1FC0A564(CPUState* cpu); void OpenBIOS_func_1FC0B160(CPUState* cpu); void OpenBIOS_func_1FC0B184(CPUState* cpu); void OpenBIOS_func_1FC0B218(CPUState* cpu); void OpenBIOS_func_1FC0B250(CPUState* cpu); void OpenBIOS_func_1FC0B280(CPUState* cpu); void OpenBIOS_func_1FC0B298(CPUState* cpu); void OpenBIOS_func_1FC0B2B0(CPUState* cpu); void OpenBIOS_func_1FC0B378(CPUState* cpu); void OpenBIOS_func_1FC0B39C(CPUState* cpu); void OpenBIOS_func_1FC0B3E0(CPUState* cpu); void OpenBIOS_func_1FC0B410(CPUState* cpu); void OpenBIOS_func_1FC0B484(CPUState* cpu); void OpenBIOS_func_1FC0B4D0(CPUState* cpu); void OpenBIOS_func_1FC0B514(CPUState* cpu); void OpenBIOS_func_1FC0B538(CPUState* cpu); void OpenBIOS_func_1FC0B558(CPUState* cpu); void OpenBIOS_func_1FC0B594(CPUState* cpu); void OpenBIOS_func_1FC0B760(CPUState* cpu); void OpenBIOS_func_1FC0B7A0(CPUState* cpu); void OpenBIOS_func_1FC0B7D4(CPUState* cpu); void OpenBIOS_func_1FC0B7EC(CPUState* cpu); void OpenBIOS_func_1FC0B810(CPUState* cpu); void OpenBIOS_func_1FC0B844(CPUState* cpu); void OpenBIOS_func_1FC0B868(CPUState* cpu); void OpenBIOS_func_1FC0B880(CPUState* cpu); void OpenBIOS_func_1FC0B888(CPUState* cpu); void OpenBIOS_func_1FC0B8CC(CPUState* cpu); void OpenBIOS_func_1FC0B928(CPUState* cpu); void OpenBIOS_func_1FC0B94C(CPUState* cpu); void OpenBIOS_func_1FC0BAA8(CPUState* cpu); void OpenBIOS_func_1FC0BB94(CPUState* cpu); void OpenBIOS_func_1FC0BC24(CPUState* cpu); void OpenBIOS_func_1FC0BC88(CPUState* cpu); void OpenBIOS_func_1FC0BD6C(CPUState* cpu); void OpenBIOS_func_1FC0BEAC(CPUState* cpu); void OpenBIOS_func_1FC0C0DC(CPUState* cpu); void OpenBIOS_func_1FC0C110(CPUState* cpu); void OpenBIOS_func_1FC0C2AC(CPUState* cpu); void OpenBIOS_func_1FC0C2C8(CPUState* cpu); void OpenBIOS_func_1FC0C354(CPUState* cpu); void OpenBIOS_func_1FC0C3C0(CPUState* cpu); void OpenBIOS_func_1FC0C4A8(CPUState* cpu); void OpenBIOS_func_1FC0C828(CPUState* cpu); void OpenBIOS_func_1FC0C970(CPUState* cpu); void OpenBIOS_func_1FC0CAB0(CPUState* cpu); void OpenBIOS_func_1FC0CB20(CPUState* cpu); void OpenBIOS_func_1FC0CC40(CPUState* cpu); void OpenBIOS_func_1FC0CC98(CPUState* cpu); void OpenBIOS_func_1FC0CD74(CPUState* cpu); void OpenBIOS_func_1FC0CD8C(CPUState* cpu); void OpenBIOS_func_1FC0CDEC(CPUState* cpu); void OpenBIOS_func_1FC0CE20(CPUState* cpu); void OpenBIOS_func_1FC0CE78(CPUState* cpu); void OpenBIOS_func_1FC0CE9C(CPUState* cpu); void OpenBIOS_func_1FC0CF14(CPUState* cpu); void OpenBIOS_func_1FC0CF50(CPUState* cpu); void OpenBIOS_func_1FC0CF90(CPUState* cpu); void OpenBIOS_func_1FC0CFC0(CPUState* cpu); void OpenBIOS_func_1FC0D024(CPUState* cpu); void OpenBIOS_func_1FC0D070(CPUState* cpu); void OpenBIOS_func_1FC0D08C(CPUState* cpu); void OpenBIOS_func_1FC0D0A4(CPUState* cpu); void OpenBIOS_func_1FC0D11C(CPUState* cpu); void OpenBIOS_func_1FC0D140(CPUState* cpu); void OpenBIOS_func_1FC0D168(CPUState* cpu); void OpenBIOS_func_1FC0D174(CPUState* cpu); void OpenBIOS_func_1FC0D198(CPUState* cpu); void OpenBIOS_func_1FC0D1B8(CPUState* cpu); void OpenBIOS_func_1FC0D214(CPUState* cpu); void OpenBIOS_func_1FC0D29C(CPUState* cpu); void OpenBIOS_func_1FC0D2F8(CPUState* cpu); void OpenBIOS_func_1FC0D3A8(CPUState* cpu); void OpenBIOS_func_1FC0D4A0(CPUState* cpu); void OpenBIOS_func_1FC0D4DC(CPUState* cpu); void OpenBIOS_func_1FC0D588(CPUState* cpu); void OpenBIOS_func_1FC0D624(CPUState* cpu); void OpenBIOS_func_1FC0D698(CPUState* cpu); void OpenBIOS_func_1FC0D884(CPUState* cpu); void OpenBIOS_func_1FC0D88C(CPUState* cpu); void OpenBIOS_func_1FC0D8C4(CPUState* cpu); void OpenBIOS_func_1FC0DD00(CPUState* cpu); void OpenBIOS_func_1FC0DD34(CPUState* cpu); void OpenBIOS_func_1FC0DD48(CPUState* cpu); void OpenBIOS_func_1FC0DD84(CPUState* cpu); void OpenBIOS_func_1FC0DDC0(CPUState* cpu); void OpenBIOS_func_1FC0DDD0(CPUState* cpu); void OpenBIOS_func_1FC0DDF0(CPUState* cpu); void OpenBIOS_func_1FC0DE50(CPUState* cpu); void OpenBIOS_func_1FC0DE70(CPUState* cpu); void OpenBIOS_func_1FC0DEA0(CPUState* cpu); void OpenBIOS_func_1FC0DEF4(CPUState* cpu); void OpenBIOS_func_1FC0DF00(CPUState* cpu); void OpenBIOS_func_1FC0DF18(CPUState* cpu); void OpenBIOS_func_1FC0DF30(CPUState* cpu); void OpenBIOS_func_1FC0DF68(CPUState* cpu); void OpenBIOS_func_1FC0DF80(CPUState* cpu); void OpenBIOS_func_1FC0DFAC(CPUState* cpu); void OpenBIOS_func_1FC0DFD4(CPUState* cpu); void OpenBIOS_func_1FC0DFDC(CPUState* cpu); void OpenBIOS_func_1FC0E050(CPUState* cpu); void OpenBIOS_func_00000540(CPUState* cpu); void OpenBIOS_func_000006F8(CPUState* cpu); void OpenBIOS_func_0000070C(CPUState* cpu); void OpenBIOS_func_00000774(CPUState* cpu); void OpenBIOS_func_00000800(CPUState* cpu); void OpenBIOS_func_00000808(CPUState* cpu); void OpenBIOS_func_00000810(CPUState* cpu); void OpenBIOS_func_00000814(CPUState* cpu); void OpenBIOS_func_0000081C(CPUState* cpu); void OpenBIOS_func_00000820(CPUState* cpu); void OpenBIOS_func_00000838(CPUState* cpu); void OpenBIOS_func_0000083C(CPUState* cpu); void OpenBIOS_func_00000840(CPUState* cpu); void OpenBIOS_func_00000860(CPUState* cpu); void OpenBIOS_func_00000874(CPUState* cpu); void OpenBIOS_func_000008F8(CPUState* cpu); void OpenBIOS_func_00000948(CPUState* cpu); void OpenBIOS_func_00000978(CPUState* cpu); void OpenBIOS_func_00000A14(CPUState* cpu); void OpenBIOS_func_00000A50(CPUState* cpu); void OpenBIOS_func_00000A8C(CPUState* cpu); void OpenBIOS_func_00000B7C(CPUState* cpu); void OpenBIOS_func_00000C00(CPUState* cpu); void OpenBIOS_func_00000C04(CPUState* cpu); void OpenBIOS_func_00000C08(CPUState* cpu); void OpenBIOS_func_00000C14(CPUState* cpu); void OpenBIOS_func_00000C18(CPUState* cpu); void OpenBIOS_func_00000C1C(CPUState* cpu); void OpenBIOS_func_00000C24(CPUState* cpu); void OpenBIOS_func_00000C38(CPUState* cpu); void OpenBIOS_func_00000C3C(CPUState* cpu); void OpenBIOS_func_00000C40(CPUState* cpu); void OpenBIOS_func_00000C4C(CPUState* cpu); void OpenBIOS_func_00000C5C(CPUState* cpu); void OpenBIOS_func_00000C60(CPUState* cpu); void OpenBIOS_func_00000C70(CPUState* cpu); void OpenBIOS_func_00000CC0(CPUState* cpu); void OpenBIOS_func_00000CCC(CPUState* cpu); void OpenBIOS_func_00000D00(CPUState* cpu); void OpenBIOS_func_00000D08(CPUState* cpu); void OpenBIOS_func_00000DF0(CPUState* cpu); void OpenBIOS_func_00000F00(CPUState* cpu); void OpenBIOS_func_00000F10(CPUState* cpu); void OpenBIOS_func_00000F28(CPUState* cpu); void OpenBIOS_func_00000F30(CPUState* cpu); void OpenBIOS_func_00000F40(CPUState* cpu); void OpenBIOS_func_00000F50(CPUState* cpu); void OpenBIOS_func_00000F60(CPUState* cpu); void OpenBIOS_func_00000FF0(CPUState* cpu); void OpenBIOS_func_00000FF8(CPUState* cpu); void OpenBIOS_func_00001000(CPUState* cpu); void OpenBIOS_func_00001004(CPUState* cpu); void OpenBIOS_func_00001008(CPUState* cpu); void OpenBIOS_func_00001010(CPUState* cpu); void OpenBIOS_func_00001018(CPUState* cpu); void OpenBIOS_func_0000101C(CPUState* cpu); void OpenBIOS_func_00001020(CPUState* cpu); void OpenBIOS_func_00001030(CPUState* cpu); void OpenBIOS_func_0000103C(CPUState* cpu); void OpenBIOS_func_00001040(CPUState* cpu); void OpenBIOS_func_00001060(CPUState* cpu); void OpenBIOS_func_000010F0(CPUState* cpu); void OpenBIOS_func_00001128(CPUState* cpu); void OpenBIOS_func_0000121C(CPUState* cpu); void OpenBIOS_func_000012BC(CPUState* cpu); void OpenBIOS_func_00001398(CPUState* cpu); void OpenBIOS_func_000013F4(CPUState* cpu); void OpenBIOS_func_0000141C(CPUState* cpu); void OpenBIOS_func_00001424(CPUState* cpu); void OpenBIOS_func_00001434(CPUState* cpu); void OpenBIOS_func_000014C8(CPUState* cpu); void OpenBIOS_func_0000153C(CPUState* cpu); void OpenBIOS_func_00001578(CPUState* cpu); void OpenBIOS_func_00001594(CPUState* cpu); void OpenBIOS_func_000016E4(CPUState* cpu); void OpenBIOS_func_00001800(CPUState* cpu); void OpenBIOS_func_00001804(CPUState* cpu); void OpenBIOS_func_00001808(CPUState* cpu); void OpenBIOS_func_0000180C(CPUState* cpu); void OpenBIOS_func_00001810(CPUState* cpu); void OpenBIOS_func_00001814(CPUState* cpu); void OpenBIOS_func_00001818(CPUState* cpu); void OpenBIOS_func_00001820(CPUState* cpu); void OpenBIOS_func_00001830(CPUState* cpu); void OpenBIOS_func_00001834(CPUState* cpu); void OpenBIOS_func_00001838(CPUState* cpu); void OpenBIOS_func_00001840(CPUState* cpu); void OpenBIOS_func_00001844(CPUState* cpu); void OpenBIOS_func_00001848(CPUState* cpu); void OpenBIOS_func_00001850(CPUState* cpu); void OpenBIOS_func_00001860(CPUState* cpu); void OpenBIOS_func_00001870(CPUState* cpu); void OpenBIOS_func_00001878(CPUState* cpu); void OpenBIOS_func_00001880(CPUState* cpu); void OpenBIOS_func_00001A74(CPUState* cpu); void OpenBIOS_func_00001ACC(CPUState* cpu); void OpenBIOS_func_00001B24(CPUState* cpu); void OpenBIOS_func_00001B7C(CPUState* cpu); void OpenBIOS_func_00001BD0(CPUState* cpu); void OpenBIOS_func_00001C00(CPUState* cpu); void OpenBIOS_func_00001C04(CPUState* cpu); void OpenBIOS_func_00001C14(CPUState* cpu); void OpenBIOS_func_00001C18(CPUState* cpu); void OpenBIOS_func_00001C1C(CPUState* cpu); void OpenBIOS_func_00001C34(CPUState* cpu); void OpenBIOS_func_00001C38(CPUState* cpu); void OpenBIOS_func_00001C44(CPUState* cpu); void OpenBIOS_func_00001C48(CPUState* cpu); void OpenBIOS_func_00001C4C(CPUState* cpu); void OpenBIOS_func_00001C58(CPUState* cpu); void OpenBIOS_func_00001C6C(CPUState* cpu); void OpenBIOS_func_00001C70(CPUState* cpu); void OpenBIOS_func_00001C78(CPUState* cpu); void OpenBIOS_func_00001CA0(CPUState* cpu); void OpenBIOS_func_00001CC8(CPUState* cpu); void OpenBIOS_func_00001CE0(CPUState* cpu); void OpenBIOS_func_00001D84(CPUState* cpu); void OpenBIOS_func_00001DA0(CPUState* cpu); void OpenBIOS_func_00001DC4(CPUState* cpu); void OpenBIOS_func_00001E24(CPUState* cpu); void OpenBIOS_func_00001E58(CPUState* cpu); void OpenBIOS_func_00001E8C(CPUState* cpu); void OpenBIOS_func_00001EB8(CPUState* cpu); void OpenBIOS_func_00001EDC(CPUState* cpu); void OpenBIOS_func_00001F6C(CPUState* cpu); void OpenBIOS_func_00002000(CPUState* cpu); void OpenBIOS_func_00002004(CPUState* cpu); void OpenBIOS_func_00002008(CPUState* cpu); void OpenBIOS_func_0000200C(CPUState* cpu); void OpenBIOS_func_00002010(CPUState* cpu); void OpenBIOS_func_00002014(CPUState* cpu); void OpenBIOS_func_00002020(CPUState* cpu); void OpenBIOS_func_00002030(CPUState* cpu); void OpenBIOS_func_0000203C(CPUState* cpu); void OpenBIOS_func_00002040(CPUState* cpu); void OpenBIOS_func_00002044(CPUState* cpu); void OpenBIOS_func_00002058(CPUState* cpu); void OpenBIOS_func_00002060(CPUState* cpu); void OpenBIOS_func_00002070(CPUState* cpu); void OpenBIOS_func_0000207C(CPUState* cpu); void OpenBIOS_func_00002088(CPUState* cpu); void OpenBIOS_func_000021B0(CPUState* cpu); void OpenBIOS_func_00002308(CPUState* cpu); void OpenBIOS_func_00002520(CPUState* cpu); void OpenBIOS_func_00002580(CPUState* cpu); void OpenBIOS_func_00002588(CPUState* cpu); void OpenBIOS_func_00002590(CPUState* cpu); void OpenBIOS_func_00002598(CPUState* cpu); void OpenBIOS_func_000025C8(CPUState* cpu); void OpenBIOS_func_000025D0(CPUState* cpu); void OpenBIOS_func_000025D8(CPUState* cpu); void OpenBIOS_func_000025E0(CPUState* cpu); void OpenBIOS_func_00002610(CPUState* cpu); void OpenBIOS_func_000026E4(CPUState* cpu); void OpenBIOS_func_0000275C(CPUState* cpu); void OpenBIOS_func_0000279C(CPUState* cpu); void OpenBIOS_func_000027AC(CPUState* cpu); void OpenBIOS_func_00002810(CPUState* cpu); void OpenBIOS_func_0000296C(CPUState* cpu); void OpenBIOS_func_000029CC(CPUState* cpu); void OpenBIOS_func_00002A80(CPUState* cpu); void OpenBIOS_func_00002AA0(CPUState* cpu); void OpenBIOS_func_00002AC0(CPUState* cpu); void OpenBIOS_func_00002AE0(CPUState* cpu); void OpenBIOS_func_00002AFC(CPUState* cpu); void OpenBIOS_func_00002B14(CPUState* cpu); void OpenBIOS_func_00002B20(CPUState* cpu); void OpenBIOS_func_00002B5C(CPUState* cpu); void OpenBIOS_func_00002BAC(CPUState* cpu); void OpenBIOS_func_00002C18(CPUState* cpu); void OpenBIOS_func_00002C4C(CPUState* cpu); void OpenBIOS_func_00002CF8(CPUState* cpu); void OpenBIOS_func_00002D2C(CPUState* cpu); void OpenBIOS_func_00002D60(CPUState* cpu); void OpenBIOS_func_00002D74(CPUState* cpu); void OpenBIOS_func_00002D88(CPUState* cpu); void OpenBIOS_func_00002DB8(CPUState* cpu); void OpenBIOS_func_00002DCC(CPUState* cpu); void OpenBIOS_func_00002E28(CPUState* cpu); void OpenBIOS_func_00002E74(CPUState* cpu); void OpenBIOS_func_00002ED0(CPUState* cpu); void OpenBIOS_func_00002F44(CPUState* cpu); void OpenBIOS_func_00002F9C(CPUState* cpu); void OpenBIOS_func_00003000(CPUState* cpu); void OpenBIOS_func_00003004(CPUState* cpu); void OpenBIOS_func_00003008(CPUState* cpu); void OpenBIOS_func_0000300C(CPUState* cpu); void OpenBIOS_func_00003010(CPUState* cpu); void OpenBIOS_func_00003014(CPUState* cpu); void OpenBIOS_func_00003018(CPUState* cpu); void OpenBIOS_func_00003030(CPUState* cpu); void OpenBIOS_func_00003040(CPUState* cpu); void OpenBIOS_func_00003048(CPUState* cpu); void OpenBIOS_func_0000304C(CPUState* cpu); void OpenBIOS_func_00003058(CPUState* cpu); void OpenBIOS_func_00003060(CPUState* cpu); void OpenBIOS_func_00003070(CPUState* cpu); void OpenBIOS_func_00003078(CPUState* cpu); void OpenBIOS_func_000030EC(CPUState* cpu); void OpenBIOS_func_00003120(CPUState* cpu); void OpenBIOS_func_00003130(CPUState* cpu); void OpenBIOS_func_00003168(CPUState* cpu); void OpenBIOS_func_000031BC(CPUState* cpu); void OpenBIOS_func_000031E4(CPUState* cpu); void OpenBIOS_func_000031F8(CPUState* cpu); void OpenBIOS_func_00003228(CPUState* cpu); void OpenBIOS_func_0000330C(CPUState* cpu); void OpenBIOS_func_0000350C(CPUState* cpu); void OpenBIOS_func_00003524(CPUState* cpu); void OpenBIOS_func_00003554(CPUState* cpu); void OpenBIOS_func_000036D8(CPUState* cpu); void OpenBIOS_func_0000371C(CPUState* cpu); void OpenBIOS_func_00003748(CPUState* cpu); void OpenBIOS_func_000037C0(CPUState* cpu); void OpenBIOS_func_00003810(CPUState* cpu); void OpenBIOS_func_00003834(CPUState* cpu); void OpenBIOS_func_00003838(CPUState* cpu); void OpenBIOS_func_00003870(CPUState* cpu); void OpenBIOS_func_00003938(CPUState* cpu); void OpenBIOS_func_000039AC(CPUState* cpu); void OpenBIOS_func_00003A30(CPUState* cpu); void OpenBIOS_func_00003A4C(CPUState* cpu); void OpenBIOS_func_00003C00(CPUState* cpu); void OpenBIOS_func_00003C08(CPUState* cpu); void OpenBIOS_func_00003C10(CPUState* cpu); void OpenBIOS_func_00003C18(CPUState* cpu); void OpenBIOS_func_00003C28(CPUState* cpu); void OpenBIOS_func_00003C30(CPUState* cpu); void OpenBIOS_func_00003C38(CPUState* cpu); void OpenBIOS_func_00003C40(CPUState* cpu); void OpenBIOS_func_00003C48(CPUState* cpu); void OpenBIOS_func_00003C4C(CPUState* cpu); void OpenBIOS_func_00003C60(CPUState* cpu); void OpenBIOS_func_00003C70(CPUState* cpu); void OpenBIOS_func_00003D9C(CPUState* cpu); void OpenBIOS_func_00003DD8(CPUState* cpu); void OpenBIOS_func_00003DE8(CPUState* cpu); void OpenBIOS_func_00003E4C(CPUState* cpu); void OpenBIOS_func_00003E6C(CPUState* cpu); void OpenBIOS_func_00004000(CPUState* cpu); void OpenBIOS_func_00004004(CPUState* cpu); void OpenBIOS_func_00004008(CPUState* cpu); void OpenBIOS_func_0000400C(CPUState* cpu); void OpenBIOS_func_00004010(CPUState* cpu); void OpenBIOS_func_00004020(CPUState* cpu); void OpenBIOS_func_00004030(CPUState* cpu); void OpenBIOS_func_00004040(CPUState* cpu); void OpenBIOS_func_0000404C(CPUState* cpu); void OpenBIOS_func_00004060(CPUState* cpu); void OpenBIOS_func_000040A0(CPUState* cpu); void OpenBIOS_func_000040B0(CPUState* cpu); void OpenBIOS_func_000040C4(CPUState* cpu); void OpenBIOS_func_000041B8(CPUState* cpu); void OpenBIOS_func_00004234(CPUState* cpu); void OpenBIOS_func_00004278(CPUState* cpu); void OpenBIOS_func_0000435C(CPUState* cpu); void OpenBIOS_func_000043DC(CPUState* cpu); void OpenBIOS_func_00004414(CPUState* cpu); void OpenBIOS_func_00004428(CPUState* cpu); void OpenBIOS_func_00004438(CPUState* cpu); void OpenBIOS_func_00004440(CPUState* cpu); void OpenBIOS_func_000044C8(CPUState* cpu); void OpenBIOS_func_000045A4(CPUState* cpu); void OpenBIOS_func_000046A0(CPUState* cpu); void OpenBIOS_func_00004800(CPUState* cpu); void OpenBIOS_func_00004810(CPUState* cpu); void OpenBIOS_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; 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: 0BF0006B j 0xBFC001AC */ 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, 0xBFC001ACu); cpu->pc = 0xBFC001ACu; return; } } void OpenBIOS_func_1FC00084(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00084u); int psx_delay_BFC000C4 = 0; int psx_taken_BFC000C4 = 0; int psx_delay_BFC000E8 = 0; int psx_taken_BFC000E8 = 0; int psx_delay_BFC000F4 = 0; int psx_delay_BFC00110 = 0; int psx_delay_BFC00118 = 0; int psx_taken_BFC00118 = 0; int psx_delay_BFC0012C = 0; int psx_taken_BFC0012C = 0; int psx_delay_BFC00134 = 0; int psx_delay_BFC0013C = 0; int psx_taken_BFC0013C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC000B8u: goto label_BFC000B8; case 0xBFC000CCu: goto label_BFC000CC; case 0xBFC000E4u: goto label_BFC000E4; case 0xBFC000E8u: goto label_BFC000E8; case 0xBFC000F0u: goto label_BFC000F0; case 0xBFC000FCu: goto label_BFC000FC; case 0xBFC00118u: goto label_BFC00118; case 0xBFC00120u: goto label_BFC00120; case 0xBFC00134u: goto label_BFC00134; case 0xBFC0013Cu: goto label_BFC0013C; default: break; } } label_BFC00084: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00084u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00084: 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(0xBFC00084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC00088: 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, 0xBFC00088u); return; } g_debug_last_store_pc = 0xBFC00088u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0008Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0008C: 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, 0xBFC0008Cu); return; } g_debug_last_store_pc = 0xBFC0008Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC0008Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC00090: 3C120001 lui $s2, 0x1 */ cpu->gpr[18] = 0x00010000u; PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC00094: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC00098: 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, 0xBFC00098u); return; } g_debug_last_store_pc = 0xBFC00098u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC00098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0009Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0009C: 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, 0xBFC0009Cu); return; } g_debug_last_store_pc = 0xBFC0009Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC0009Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC000A0: 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, 0xBFC000A0u); return; } g_debug_last_store_pc = 0xBFC000A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC000A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC000A4: 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, 0xBFC000A4u); return; } g_debug_last_store_pc = 0xBFC000A4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC000A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC000A8: 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(0xBFC000A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC000AC: 3C130001 lui $s3, 0x1 */ cpu->gpr[19] = 0x00010000u; PGXP_ALU(0x3C130001u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC000ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC000B0: 2631B0D4 addiu $s1, $s1, -20268 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-20268)); PGXP_ALU(0x2631B0D4u, cpu->gpr[17], _pgx1, 0xFFFFB0D4u); } #ifdef PSX_COSIM cosim_instr(0xBFC000B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC000B4: 2652B054 addiu $s2, $s2, -20396 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-20396)); PGXP_ALU(0x2652B054u, cpu->gpr[18], _pgx1, 0xFFFFB054u); } #ifdef PSX_COSIM cosim_instr(0xBFC000B4u); #endif label_BFC000B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC000B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000B8u); #endif /* 0xBFC000B8: 9262B154 lbu $v0, -20140($s3) */ { uint32_t _pgxa = cpu->gpr[19] + -20140; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (-20140)), 2, 0x80000u); PGXP_LOAD(0x9262B154u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC000B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC000BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC000BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC000C0: 0202102B sltu $v0, $s0, $v0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0202102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC000C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC000C4: 1440000D bne $v0, $zero, 0xBFC000FC */ uint32_t psx_brA_BFC000C4 = cpu->gpr[2]; uint32_t psx_brB_BFC000C4 = cpu->gpr[0]; psx_taken_BFC000C4 = (psx_brA_BFC000C4 != psx_brB_BFC000C4); psx_delay_BFC000C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC000C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC000C8u); #endif if (psx_delay_BFC000C4) { psx_delay_BFC000C4 = 0; if (psx_taken_BFC000C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000FCu); goto label_BFC000FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000CCu); } label_BFC000CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC000CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC000CC: 3C11BFC0 lui $s1, 0xBFC0 */ cpu->gpr[17] = 0xBFC00000u; PGXP_ALU(0x3C11BFC0u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC000CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC000D0: 3C10BFC0 lui $s0, 0xBFC0 */ cpu->gpr[16] = 0xBFC00000u; PGXP_ALU(0x3C10BFC0u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC000D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC000D4: 26310084 addiu $s1, $s1, 132 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (132)); PGXP_ALU(0x26310084u, cpu->gpr[17], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0xBFC000D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC000D8: 26100084 addiu $s0, $s0, 132 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (132)); PGXP_ALU(0x26100084u, cpu->gpr[16], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0xBFC000D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC000DC: 02118023 subu $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(0x02118023u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC000DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC000E0: 00108083 sra $s0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 2u); PGXP_ALU(0x00108083u, cpu->gpr[16], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC000E0u); #endif label_BFC000E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC000E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC000E4: 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(0xBFC000E4u); #endif label_BFC000E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC000E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC000E8: 0601000D bgez $s0, 0xBFC00120 */ uint32_t psx_brA_BFC000E8 = cpu->gpr[16]; psx_taken_BFC000E8 = ((int32_t)psx_brA_BFC000E8 >= 0); psx_delay_BFC000E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC000EC: 00101080 sll $v0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 2u; PGXP_ALU(0x00101080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC000ECu); #endif if (psx_delay_BFC000E8) { psx_delay_BFC000E8 = 0; if (psx_taken_BFC000E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00120u); goto label_BFC00120; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000F0u); } label_BFC000F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC000F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000F0u); #endif /* 0xBFC000F0: 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, 0xBFC000F0u); 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(0xBFC000F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC000F4: 0FF02442 jal 0xBFC09108 */ cpu->gpr[31] = 0xBFC000FCu; /* jal link before delay slot */ psx_delay_BFC000F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC000F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC000F8u); #endif if (psx_delay_BFC000F4) { psx_delay_BFC000F4 = 0; cpu->gpr[31] = 0xBFC000FCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09108u); cpu->pc = 0xBFC09108u; return; } label_BFC000FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC000FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC000FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC000FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC000FC: 00101080 sll $v0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 2u; PGXP_ALU(0x00101080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC000FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000Cu); #endif /* 0xBFC00100: 00511821 addu $v1, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00104: 00521021 addu $v0, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[18]; PGXP_ALU(0x00521021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00108u); #endif /* 0xBFC00108: 8C630000 lw $v1, 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, 0xBFC00108u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0010Cu); #endif /* 0xBFC0010C: 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, 0xBFC0010Cu); 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(0xBFC0010Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000008u); #endif /* 0xBFC00110: 0060F809 jalr $ra, $v1 */ cpu->gpr[31] = 0xBFC00118u; /* jalr link before delay slot */ psx_delay_BFC00110 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00114: 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(0xBFC00114u); #endif if (psx_delay_BFC00110) { psx_delay_BFC00110 = 0; { uint32_t _t = cpu->gpr[3]; cpu->gpr[31] = 0xBFC00118u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00118: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00118u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00118: 1000FFE7 beq $zero, $zero, 0xBFC000B8 */ uint32_t psx_brA_BFC00118 = cpu->gpr[0]; uint32_t psx_brB_BFC00118 = cpu->gpr[0]; psx_taken_BFC00118 = (psx_brA_BFC00118 == psx_brB_BFC00118); psx_delay_BFC00118 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0011Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0011C: 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(0xBFC0011Cu); #endif if (psx_delay_BFC00118) { psx_delay_BFC00118 = 0; if (psx_taken_BFC00118) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000B8u); goto label_BFC000B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00120u); } label_BFC00120: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00120u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC00120: 02221021 addu $v0, $s1, $v0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[2]; PGXP_ALU(0x02221021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00124u); #endif /* 0xBFC00124: 8C420000 lw $v0, 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, 0xBFC00124u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00128: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0012Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0012C: 1040FFED beq $v0, $zero, 0xBFC000E4 */ uint32_t psx_brA_BFC0012C = cpu->gpr[2]; uint32_t psx_brB_BFC0012C = cpu->gpr[0]; psx_taken_BFC0012C = (psx_brA_BFC0012C == psx_brB_BFC0012C); psx_delay_BFC0012C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00130: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00130u); #endif if (psx_delay_BFC0012C) { psx_delay_BFC0012C = 0; if (psx_taken_BFC0012C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000E4u); goto label_BFC000E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00134u); } label_BFC00134: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00134u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00134: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC0013Cu; /* jalr link before delay slot */ psx_delay_BFC00134 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00138: 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(0xBFC00138u); #endif if (psx_delay_BFC00134) { psx_delay_BFC00134 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC0013Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0013C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0013Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0013Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0013Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0013C: 1000FFEA beq $zero, $zero, 0xBFC000E8 */ uint32_t psx_brA_BFC0013C = cpu->gpr[0]; uint32_t psx_brB_BFC0013C = cpu->gpr[0]; psx_taken_BFC0013C = (psx_brA_BFC0013C == psx_brB_BFC0013C); psx_delay_BFC0013C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00140: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00140u); #endif if (psx_delay_BFC0013C) { psx_delay_BFC0013C = 0; if (psx_taken_BFC0013C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC000E8u); goto label_BFC000E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00144u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00144u); cpu->pc = 0xBFC00144u; return; /* fallthrough */ } void OpenBIOS_func_1FC00144(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00144u); int psx_delay_BFC00170 = 0; int psx_delay_BFC00178 = 0; int psx_delay_BFC00188 = 0; int psx_delay_BFC00194 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00178u: goto label_BFC00178; case 0xBFC00180u: goto label_BFC00180; case 0xBFC00190u: goto label_BFC00190; default: break; } } label_BFC00144: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00144u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00144: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00148: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC00148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0014Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0014C: 24420060 addiu $v0, $v0, 96 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (96)); PGXP_ALU(0x24420060u, cpu->gpr[2], _pgx1, 0x00000060u); } #ifdef PSX_COSIM cosim_instr(0xBFC0014Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00150: 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(0xBFC00150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00154: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00154u); return; } g_debug_last_store_pc = 0xBFC00154u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20010000u); #endif /* 0xBFC00158: 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, 0xBFC00158u); return; } g_debug_last_store_pc = 0xBFC00158u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0xCu); #endif /* 0xBFC0015C: 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, 0xBFC0015Cu); return; } g_debug_last_store_pc = 0xBFC0015Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC00160: 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, 0xBFC00160u); return; } g_debug_last_store_pc = 0xBFC00160u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } #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, 0x10000u); #endif /* 0xBFC00164: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 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, 0x5u); #endif /* 0xBFC00168: 2402000F addiu $v0, $zero, 15 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); PGXP_ALU(0x2402000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #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, 0x10004u); #endif /* 0xBFC0016C: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0016Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC00170: 0FF01A7D jal 0xBFC069F4 */ cpu->gpr[31] = 0xBFC00178u; /* jal link before delay slot */ psx_delay_BFC00170 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00174: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00174u); #endif if (psx_delay_BFC00170) { psx_delay_BFC00170 = 0; cpu->gpr[31] = 0xBFC00178u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069F4u); cpu->pc = 0xBFC069F4u; return; } label_BFC00178: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00178u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00178: 0FF01D0B jal 0xBFC0742C */ cpu->gpr[31] = 0xBFC00180u; /* jal link before delay slot */ psx_delay_BFC00178 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0017Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0017C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0017Cu); #endif if (psx_delay_BFC00178) { psx_delay_BFC00178 = 0; cpu->gpr[31] = 0xBFC00180u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0742Cu); cpu->pc = 0xBFC0742Cu; return; } 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, 0x5u); #endif /* 0xBFC00180: 2402000E addiu $v0, $zero, 14 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); PGXP_ALU(0x2402000Eu, cpu->gpr[2], _pgx1, 0x0000000Eu); } #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, 0x10004u); #endif /* 0xBFC00184: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC00184u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC00188: 0FF01D09 jal 0xBFC07424 */ cpu->gpr[31] = 0xBFC00190u; /* jal link before delay slot */ psx_delay_BFC00188 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0018Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0018C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0018Cu); #endif if (psx_delay_BFC00188) { psx_delay_BFC00188 = 0; cpu->gpr[31] = 0xBFC00190u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07424u); cpu->pc = 0xBFC07424u; return; } label_BFC00190: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00190u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00190: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 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, 0x80000000u); #endif /* 0xBFC00194: 0FF01CE4 jal 0xBFC07390 */ cpu->gpr[31] = 0xBFC0019Cu; /* jal link before delay slot */ psx_delay_BFC00194 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00198: AC404C68 sw $zero, 19560($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19560)); 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[0]); } PGXP_STORE(0xAC404C68u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00198u); #endif if (psx_delay_BFC00194) { psx_delay_BFC00194 = 0; cpu->gpr[31] = 0xBFC0019Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07390u); cpu->pc = 0xBFC07390u; return; } } void OpenBIOS_func_1FC0019C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0019Cu); int psx_delay_BFC001A4 = 0; label_BFC0019C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0019Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0019Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0019Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0019C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0019Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001A0u); #endif /* 0xBFC001A0: 8C424B88 lw $v0, 19336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424B88u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC001A4: 03E00008 jr $ra */ psx_delay_BFC001A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC001A8: 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, 0xBFC001A8u); return; } g_debug_last_store_pc = 0xBFC001A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC001A8u); #endif if (psx_delay_BFC001A4) { psx_delay_BFC001A4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC001AC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC001ACu); int psx_delay_BFC002A0 = 0; int psx_delay_BFC0030C = 0; int psx_taken_BFC0030C = 0; int psx_delay_BFC00328 = 0; int psx_taken_BFC00328 = 0; int psx_delay_BFC00340 = 0; int psx_taken_BFC00340 = 0; int psx_delay_BFC00350 = 0; int psx_taken_BFC00350 = 0; int psx_delay_BFC00378 = 0; int psx_delay_BFC00394 = 0; int psx_taken_BFC00394 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC002A8u: goto label_BFC002A8; case 0xBFC00314u: goto label_BFC00314; case 0xBFC00330u: goto label_BFC00330; case 0xBFC00348u: goto label_BFC00348; case 0xBFC00358u: goto label_BFC00358; case 0xBFC00380u: goto label_BFC00380; case 0xBFC00394u: goto label_BFC00394; default: break; } } label_BFC001AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC001ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC001ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC001AC: 3C080003 lui $t0, 0x3 */ cpu->gpr[8] = 0x00030000u; PGXP_ALU(0x3C080003u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC001B0: 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(0xBFC001B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC001B4: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC001B8: AC281020 sw $t0, 4128($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001B8u); return; } g_debug_last_store_pc = 0xBFC001B8u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281020u, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC001BC: 3C081F00 lui $t0, 0x1F00 */ cpu->gpr[8] = 0x1F000000u; PGXP_ALU(0x3C081F00u, cpu->gpr[8], 0u, 0u); #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, 0x2u); #endif /* 0xBFC001C0: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC001C4: AC281000 sw $t0, 4096($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4096; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4096)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001C4u); return; } g_debug_last_store_pc = 0xBFC001C4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281000u, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC001C8: 3C081F80 lui $t0, 0x1F80 */ cpu->gpr[8] = 0x1F800000u; PGXP_ALU(0x3C081F80u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC001CC: 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(0xBFC001CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC001D0: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC001D4: AC281004 sw $t0, 4100($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001D4u); return; } g_debug_last_store_pc = 0xBFC001D4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281004u, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC001D8: 3C080013 lui $t0, 0x13 */ cpu->gpr[8] = 0x00130000u; PGXP_ALU(0x3C080013u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC001DC: 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(0xBFC001DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC001E0: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC001E4: AC281008 sw $t0, 4104($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001E4u); return; } g_debug_last_store_pc = 0xBFC001E4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281008u, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC001E8: 3C082009 lui $t0, 0x2009 */ cpu->gpr[8] = 0x20090000u; PGXP_ALU(0x3C082009u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC001EC: 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(0xBFC001ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC001F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC001F0: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC001F4: AC281014 sw $t0, 4116($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC001F4u); return; } g_debug_last_store_pc = 0xBFC001F4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281014u, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC001F8: 3C080002 lui $t0, 0x2 */ cpu->gpr[8] = 0x00020000u; PGXP_ALU(0x3C080002u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC001FC: 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(0xBFC001FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC00200: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC00204: AC281018 sw $t0, 4120($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00204u); return; } g_debug_last_store_pc = 0xBFC00204u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281018u, _pgxa, cpu->gpr[8]); } #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, 0x101u); #endif /* 0xBFC00208: 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(0xBFC00208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0020Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC0020C: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC00210: AC28100C sw $t0, 4108($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00210u); return; } g_debug_last_store_pc = 0xBFC00210u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC28100Cu, _pgxa, cpu->gpr[8]); } #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, 0x100u); #endif /* 0xBFC00214: 3C080008 lui $t0, 0x8 */ cpu->gpr[8] = 0x00080000u; PGXP_ALU(0x3C080008u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC00218: 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(0xBFC00218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0021Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC0021C: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC00220: AC28101C sw $t0, 4124($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00220u); return; } g_debug_last_store_pc = 0xBFC00220u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC28101Cu, _pgxa, cpu->gpr[8]); } #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, 0x3u); #endif /* 0xBFC00224: 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(0xBFC00224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00228: 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(0xBFC00228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0022Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0022C: 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(0xBFC0022Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC00230: 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(0xBFC00230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00234: 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(0xBFC00234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC00238: 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(0xBFC00238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0023Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0023C: 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(0xBFC0023Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC00240: 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(0xBFC00240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00244: 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(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: 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(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: 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(0xBFC0024Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC00250: 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(0xBFC00250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC00254: 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(0xBFC00254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC00258: 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(0xBFC00258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0025Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC0025C: 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(0xBFC0025Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC00260: 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(0xBFC00260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC00264: 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(0xBFC00264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC00268: 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(0xBFC00268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0026Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC0026C: 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(0xBFC0026Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC00270: 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(0xBFC00270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC00274: 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(0xBFC00274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC00278: 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(0xBFC00278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0027Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC0027C: 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(0xBFC0027Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC00280: 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(0xBFC00280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC00284: 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(0xBFC00284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000001u); #endif /* 0xBFC00288: 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(0xBFC00288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0028Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000001u); #endif /* 0xBFC0028C: 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(0xBFC0028Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000001u); #endif /* 0xBFC00290: 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(0xBFC00290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000001u); #endif /* 0xBFC00294: 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(0xBFC00294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC00298: 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(0xBFC00298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0029Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0029C: 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(0xBFC0029Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC002A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC002A0: 0FF015FC jal 0xBFC057F0 */ cpu->gpr[31] = 0xBFC002A8u; /* jal link before delay slot */ psx_delay_BFC002A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC002A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC002A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC002A4u); #endif if (psx_delay_BFC002A0) { psx_delay_BFC002A0 = 0; cpu->gpr[31] = 0xBFC002A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057F0u); cpu->pc = 0xBFC057F0u; return; } label_BFC002A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC002A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC002A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC002A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC002A8: 40803800 mtc0 $zero, cop0[7] */ cpu->cop0[7] = 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, 0x1u); #endif /* 0xBFC002AC: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002B0: 40801800 mtc0 $zero, cop0[3] */ cpu->cop0[3] = 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, 0x1u); #endif /* 0xBFC002B4: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002B8: 40802800 mtc0 $zero, cop0[5] */ cpu->cop0[5] = 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, 0x1u); #endif /* 0xBFC002BC: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002C0: 40803000 mtc0 $zero, cop0[6] */ cpu->cop0[6] = 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, 0x1u); #endif /* 0xBFC002C4: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002C8: 40804800 mtc0 $zero, cop0[9] */ cpu->cop0[9] = 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, 0x1u); #endif /* 0xBFC002CC: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002D0: 40805800 mtc0 $zero, cop0[11] */ cpu->cop0[11] = 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, 0x1u); #endif /* 0xBFC002D4: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002D8: 40806000 mtc0 $zero, cop0[12] */ cpu->cop0[12] = 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, 0x1u); #endif /* 0xBFC002DC: 00000000 nop */ /* nop */ #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, 0x0u); #endif /* 0xBFC002E0: 40806800 mtc0 $zero, cop0[13] */ cpu->cop0[13] = 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, 0x1u); #endif /* 0xBFC002E4: 00000000 nop */ /* nop */ #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, 0x100u); #endif /* 0xBFC002E8: 3C084000 lui $t0, 0x4000 */ cpu->gpr[8] = 0x40000000u; PGXP_ALU(0x3C084000u, cpu->gpr[8], 0u, 0u); #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, 0x0u); #endif /* 0xBFC002EC: 40886000 mtc0 $t0, cop0[12] */ cpu->cop0[12] = cpu->gpr[8]; #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, 0x1u); #endif /* 0xBFC002F0: 00000000 nop */ /* nop */ #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, 0x100u); #endif /* 0xBFC002F4: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC002F8: 25080500 addiu $t0, $t0, 1280 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (1280)); PGXP_ALU(0x25080500u, cpu->gpr[8], _pgx1, 0x00000500u); } #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, 0x200u); #endif /* 0xBFC002FC: 3C090000 lui $t1, 0x0 */ cpu->gpr[9] = 0x00000000u; PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); #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, 0x200u); #endif /* 0xBFC00300: 25294BA0 addiu $t1, $t1, 19360 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (19360)); PGXP_ALU(0x25294BA0u, cpu->gpr[9], _pgx1, 0x00004BA0u); } #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, 0x400u); #endif /* 0xBFC00304: 3C0ABFC2 lui $t2, 0xBFC2 */ cpu->gpr[10] = 0xBFC20000u; PGXP_ALU(0x3C0ABFC2u, cpu->gpr[10], 0u, 0u); #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, 0x400u); #endif /* 0xBFC00308: 254AE4D4 addiu $t2, $t2, -6956 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-6956)); PGXP_ALU(0x254AE4D4u, cpu->gpr[10], _pgx1, 0xFFFFE4D4u); } #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, 0x300u); #endif /* 0xBFC0030C: 11090008 beq $t0, $t1, 0xBFC00330 */ uint32_t psx_brA_BFC0030C = cpu->gpr[8]; uint32_t psx_brB_BFC0030C = cpu->gpr[9]; psx_taken_BFC0030C = (psx_brA_BFC0030C == psx_brB_BFC0030C); psx_delay_BFC0030C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00310: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00310u); #endif if (psx_delay_BFC0030C) { psx_delay_BFC0030C = 0; if (psx_taken_BFC0030C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00330u); goto label_BFC00330; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00314u); } label_BFC00314: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00314u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00314u); #endif /* 0xBFC00314: 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, 0xBFC00314u); 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(0xBFC00314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00318: 00000000 nop */ /* nop */ #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, 0x900u); #endif /* 0xBFC0031C: AD0B0000 sw $t3, 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, 0xBFC0031Cu); return; } g_debug_last_store_pc = 0xBFC0031Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAD0B0000u, _pgxa, cpu->gpr[11]); } #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, 0x100u); #endif /* 0xBFC00320: 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(0xBFC00320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC00324: 254A0004 addiu $t2, $t2, 4 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (4)); PGXP_ALU(0x254A0004u, cpu->gpr[10], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC00324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC00328: 1509FFFA bne $t0, $t1, 0xBFC00314 */ uint32_t psx_brA_BFC00328 = cpu->gpr[8]; uint32_t psx_brB_BFC00328 = cpu->gpr[9]; psx_taken_BFC00328 = (psx_brA_BFC00328 != psx_brB_BFC00328); psx_delay_BFC00328 = 1; #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 if (psx_delay_BFC00328) { psx_delay_BFC00328 = 0; if (psx_taken_BFC00328) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00314u); goto label_BFC00314; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00330u); } label_BFC00330: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00330u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC00330: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC00334: 25084BA0 addiu $t0, $t0, 19360 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (19360)); PGXP_ALU(0x25084BA0u, cpu->gpr[8], _pgx1, 0x00004BA0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC00338: 3C090001 lui $t1, 0x1 */ cpu->gpr[9] = 0x00010000u; PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0033Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0033C: 2529B15C addiu $t1, $t1, -20132 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (-20132)); PGXP_ALU(0x2529B15Cu, cpu->gpr[9], _pgx1, 0xFFFFB15Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC0033Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC00340: 11090005 beq $t0, $t1, 0xBFC00358 */ uint32_t psx_brA_BFC00340 = cpu->gpr[8]; uint32_t psx_brB_BFC00340 = cpu->gpr[9]; psx_taken_BFC00340 = (psx_brA_BFC00340 == psx_brB_BFC00340); psx_delay_BFC00340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00344: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00344u); #endif if (psx_delay_BFC00340) { psx_delay_BFC00340 = 0; if (psx_taken_BFC00340) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00358u); goto label_BFC00358; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00348u); } label_BFC00348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC00348: AD000000 sw $zero, 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, 0xBFC00348u); return; } g_debug_last_store_pc = 0xBFC00348u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0034Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0034C: 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(0xBFC0034Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC00350: 1509FFFD bne $t0, $t1, 0xBFC00348 */ uint32_t psx_brA_BFC00350 = cpu->gpr[8]; uint32_t psx_brB_BFC00350 = cpu->gpr[9]; psx_taken_BFC00350 = (psx_brA_BFC00350 != psx_brB_BFC00350); psx_delay_BFC00350 = 1; #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 if (psx_delay_BFC00350) { psx_delay_BFC00350 = 0; if (psx_taken_BFC00350) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00348u); goto label_BFC00348; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00358u); } label_BFC00358: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00358u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00358: 3C1D8020 lui $sp, 0x8020 */ cpu->gpr[29] = 0x80200000u; PGXP_ALU(0x3C1D8020u, cpu->gpr[29], 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, 0x20000000u); #endif /* 0xBFC0035C: 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(0xBFC0035Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000001u); #endif /* 0xBFC00360: 03A0F025 or $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(0x03A0F025u, cpu->gpr[30], _pgx1, _pgx2); } #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, 0x101u); #endif /* 0xBFC00364: 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(0xBFC00364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC00368: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #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, 0x102u); #endif /* 0xBFC0036C: 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, 0xBFC0036Cu); return; } g_debug_last_store_pc = 0xBFC0036Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC281060u, _pgxa, cpu->gpr[8]); } #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, 0x101u); #endif /* 0xBFC00370: 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(0xBFC00370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC00374: 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, 0xBFC00374u); return; } g_debug_last_store_pc = 0xBFC00374u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC080060u, _pgxa, cpu->gpr[8]); } #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, 0x80000000u); #endif /* 0xBFC00378: 0FF0244B jal 0xBFC0912C */ cpu->gpr[31] = 0xBFC00380u; /* jal link before delay slot */ psx_delay_BFC00378 = 1; #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 if (psx_delay_BFC00378) { psx_delay_BFC00378 = 0; cpu->gpr[31] = 0xBFC00380u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0912Cu); cpu->pc = 0xBFC0912Cu; return; } label_BFC00380: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00380u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC00380: 3C081F80 lui $t0, 0x1F80 */ cpu->gpr[8] = 0x1F800000u; PGXP_ALU(0x3C081F80u, cpu->gpr[8], 0u, 0u); #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, 0x100u); #endif /* 0xBFC00384: 35082080 ori $t0, $t0, 0x2080 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x2080u; PGXP_ALU(0x35082080u, cpu->gpr[8], _pgx1, 0x2080u); } #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, 0x201u); #endif /* 0xBFC00388: 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(0xBFC00388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0038Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC0038C: A1090000 sb $t1, 0($t0) */ { uint32_t _pgxa = cpu->gpr[8]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0038Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (0)), (uint8_t)(cpu->gpr[9] & 0xFFu)); PGXP_STORE(0xA1090000u, _pgxa, cpu->gpr[9]); } #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, 0x300u); #endif /* 0xBFC00390: A1090001 sb $t1, 1($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC00390u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (1)), (uint8_t)(cpu->gpr[9] & 0xFFu)); PGXP_STORE(0xA1090001u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0xBFC00390u); #endif label_BFC00394: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00394u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00394: 1000FFFF beq $zero, $zero, 0xBFC00394 */ uint32_t psx_brA_BFC00394 = cpu->gpr[0]; uint32_t psx_brB_BFC00394 = cpu->gpr[0]; psx_taken_BFC00394 = (psx_brA_BFC00394 == psx_brB_BFC00394); psx_delay_BFC00394 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00398: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00398u); #endif if (psx_delay_BFC00394) { psx_delay_BFC00394 = 0; if (psx_taken_BFC00394) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00394u); goto label_BFC00394; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0039C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0039Cu); int psx_delay_BFC003B4 = 0; int psx_taken_BFC003B4 = 0; int psx_delay_BFC003BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC003A8u: goto label_BFC003A8; case 0xBFC003BCu: goto label_BFC003BC; default: break; } } label_BFC0039C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0039Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0039Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0039Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0039C: 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(0xBFC0039Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC003A0: 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(0xBFC003A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC003A4: 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(0xBFC003A4u); #endif label_BFC003A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC003A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x54u); #endif /* 0xBFC003A8: 00823021 addu $a2, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00823021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC003A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003ACu); #endif /* 0xBFC003AC: 90C60000 lbu $a2, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 6, 0x40u); PGXP_LOAD(0x90C60000u, _pgxa, cpu->gpr[6]); } #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, 0x4u); #endif /* 0xBFC003B0: 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(0xBFC003B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC003B4: 1445FFFC bne $v0, $a1, 0xBFC003A8 */ uint32_t psx_brA_BFC003B4 = cpu->gpr[2]; uint32_t psx_brB_BFC003B4 = cpu->gpr[5]; psx_taken_BFC003B4 = (psx_brA_BFC003B4 != psx_brB_BFC003B4); psx_delay_BFC003B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC003B8: 00661826 xor $v1, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[3] ^ cpu->gpr[6]; PGXP_ALU(0x00661826u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC003B8u); #endif if (psx_delay_BFC003B4) { psx_delay_BFC003B4 = 0; if (psx_taken_BFC003B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003A8u); goto label_BFC003A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003BCu); } label_BFC003BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC003BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC003BC: 03E00008 jr $ra */ psx_delay_BFC003BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC003C0: A083007F sb $v1, 127($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 127; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC003C0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (127)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA083007Fu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC003C0u); #endif if (psx_delay_BFC003BC) { psx_delay_BFC003BC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC003C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC003C4u); int psx_delay_BFC003DC = 0; int psx_taken_BFC003DC = 0; int psx_delay_BFC003F0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC003D0u: goto label_BFC003D0; case 0xBFC003E4u: goto label_BFC003E4; default: break; } } label_BFC003C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC003C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC003C4: 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(0xBFC003C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC003C8: 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(0xBFC003C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC003CC: 2402007F addiu $v0, $zero, 127 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); PGXP_ALU(0x2402007Fu, cpu->gpr[2], _pgx1, 0x0000007Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC003CCu); #endif label_BFC003D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC003D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC003D0: 00833021 addu $a2, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00833021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC003D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003D4u); #endif /* 0xBFC003D4: 90C60000 lbu $a2, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 6, 0x40u); PGXP_LOAD(0x90C60000u, _pgxa, cpu->gpr[6]); } #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, 0x8u); #endif /* 0xBFC003D8: 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(0xBFC003D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC003DC: 1462FFFC bne $v1, $v0, 0xBFC003D0 */ uint32_t psx_brA_BFC003DC = cpu->gpr[3]; uint32_t psx_brB_BFC003DC = cpu->gpr[2]; psx_taken_BFC003DC = (psx_brA_BFC003DC != psx_brB_BFC003DC); psx_delay_BFC003DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC003E0: 00A62826 xor $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[6]; PGXP_ALU(0x00A62826u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC003E0u); #endif if (psx_delay_BFC003DC) { psx_delay_BFC003DC = 0; if (psx_taken_BFC003DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003D0u); goto label_BFC003D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003E4u); } label_BFC003E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC003E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003E4u); #endif /* 0xBFC003E4: 9082007F lbu $v0, 127($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 127; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (127)), 2, 0x10u); PGXP_LOAD(0x9082007Fu, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC003E8: 00000000 nop */ /* nop */ #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, 0x24u); #endif /* 0xBFC003EC: 00451026 xor $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] ^ cpu->gpr[5]; PGXP_ALU(0x00451026u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC003F0: 03E00008 jr $ra */ psx_delay_BFC003F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC003F4: 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(0xBFC003F4u); #endif if (psx_delay_BFC003F0) { psx_delay_BFC003F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC003F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC003F8u); int psx_delay_BFC00420 = 0; int psx_taken_BFC00420 = 0; int psx_delay_BFC00428 = 0; int psx_taken_BFC00428 = 0; int psx_delay_BFC00430 = 0; int psx_delay_BFC00444 = 0; int psx_taken_BFC00444 = 0; int psx_delay_BFC00458 = 0; int psx_taken_BFC00458 = 0; int psx_delay_BFC00468 = 0; int psx_taken_BFC00468 = 0; int psx_delay_BFC0048C = 0; int psx_taken_BFC0048C = 0; int psx_delay_BFC004D4 = 0; int psx_taken_BFC004D4 = 0; int psx_delay_BFC004DC = 0; int psx_delay_BFC004E4 = 0; int psx_taken_BFC004E4 = 0; int psx_delay_BFC004F4 = 0; int psx_taken_BFC004F4 = 0; int psx_delay_BFC004FC = 0; int psx_taken_BFC004FC = 0; int psx_delay_BFC00504 = 0; int psx_taken_BFC00504 = 0; int psx_delay_BFC0050C = 0; int psx_taken_BFC0050C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00428u: goto label_BFC00428; case 0xBFC00430u: goto label_BFC00430; case 0xBFC00438u: goto label_BFC00438; case 0xBFC0043Cu: goto label_BFC0043C; case 0xBFC0044Cu: goto label_BFC0044C; case 0xBFC00450u: goto label_BFC00450; case 0xBFC00460u: goto label_BFC00460; case 0xBFC00470u: goto label_BFC00470; case 0xBFC00478u: goto label_BFC00478; case 0xBFC00494u: goto label_BFC00494; case 0xBFC004BCu: goto label_BFC004BC; case 0xBFC004DCu: goto label_BFC004DC; case 0xBFC004E4u: goto label_BFC004E4; case 0xBFC004ECu: goto label_BFC004EC; case 0xBFC004FCu: goto label_BFC004FC; case 0xBFC00504u: goto label_BFC00504; case 0xBFC0050Cu: goto label_BFC0050C; default: break; } } label_BFC003F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC003F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC003F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC003F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC003F8: 00041100 sll $v0, $a0, 4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 4u; PGXP_ALU(0x00041100u, cpu->gpr[2], _pgx1, 4u); } #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, 0x14u); #endif /* 0xBFC003FC: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC00400: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 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, 0x4u); #endif /* 0xBFC00404: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #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, 0x10u); #endif /* 0xBFC00408: 24844E28 addiu $a0, $a0, 20008 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20008)); PGXP_ALU(0x24844E28u, cpu->gpr[4], _pgx1, 0x00004E28u); } #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, 0x14u); #endif /* 0xBFC0040C: 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(0xBFC0040Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC00410: 00052940 sll $a1, $a1, 5 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] << 5u; PGXP_ALU(0x00052940u, cpu->gpr[5], _pgx1, 5u); } #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, 0x30u); #endif /* 0xBFC00414: 00852821 addu $a1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00418u); #endif /* 0xBFC00418: 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, 0xBFC00418u); 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(0xBFC00418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0041Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0041C: 24030051 addiu $v1, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24030051u, cpu->gpr[3], _pgx1, 0x00000051u); } #ifdef PSX_COSIM cosim_instr(0xBFC0041Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00420: 10430005 beq $v0, $v1, 0xBFC00438 */ uint32_t psx_brA_BFC00420 = cpu->gpr[2]; uint32_t psx_brB_BFC00420 = cpu->gpr[3]; psx_taken_BFC00420 = (psx_brA_BFC00420 == psx_brB_BFC00420); psx_delay_BFC00420 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00424: 240300A1 addiu $v1, $zero, 161 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); PGXP_ALU(0x240300A1u, cpu->gpr[3], _pgx1, 0x000000A1u); } #ifdef PSX_COSIM cosim_instr(0xBFC00424u); #endif if (psx_delay_BFC00420) { psx_delay_BFC00420 = 0; if (psx_taken_BFC00420) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00438u); goto label_BFC00438; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00428u); } label_BFC00428: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00428u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00428: 10430004 beq $v0, $v1, 0xBFC0043C */ uint32_t psx_brA_BFC00428 = cpu->gpr[2]; uint32_t psx_brB_BFC00428 = cpu->gpr[3]; psx_taken_BFC00428 = (psx_brA_BFC00428 == psx_brB_BFC00428); psx_delay_BFC00428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0042Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0042C: 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(0xBFC0042Cu); #endif if (psx_delay_BFC00428) { psx_delay_BFC00428 = 0; if (psx_taken_BFC00428) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0043Cu); goto label_BFC0043C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00430u); } label_BFC00430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00430: 03E00008 jr $ra */ psx_delay_BFC00430 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00434: 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(0xBFC00434u); #endif if (psx_delay_BFC00430) { psx_delay_BFC00430 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC00438: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00438u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00438: 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(0xBFC00438u); #endif label_BFC0043C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0043Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0043Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0043Cu); #endif /* 0xBFC0043C: 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, 0xBFC0043Cu); 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(0xBFC0043Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00440: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC00444: 04410002 bgez $v0, 0xBFC00450 */ uint32_t psx_brA_BFC00444 = cpu->gpr[2]; psx_taken_BFC00444 = ((int32_t)psx_brA_BFC00444 >= 0); psx_delay_BFC00444 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00448: 00000000 nop */ /* nop */ #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, 0xBFC00450u); goto label_BFC00450; } #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, 0x4u); #endif /* 0xBFC0044C: 24421FFF addiu $v0, $v0, 8191 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8191)); PGXP_ALU(0x24421FFFu, cpu->gpr[2], _pgx1, 0x00001FFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC0044Cu); #endif label_BFC00450: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00450u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00450: 00021343 sra $v0, $v0, 13 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 13u); PGXP_ALU(0x00021343u, cpu->gpr[2], _pgx1, 13u); } #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, 0x4u); #endif /* 0xBFC00454: 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(0xBFC00454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00458: 1840FFF5 blez $v0, 0xBFC00430 */ uint32_t psx_brA_BFC00458 = cpu->gpr[2]; psx_taken_BFC00458 = ((int32_t)psx_brA_BFC00458 <= 0); psx_delay_BFC00458 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0045Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0045C: 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(0xBFC0045Cu); #endif if (psx_delay_BFC00458) { psx_delay_BFC00458 = 0; if (psx_taken_BFC00458) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00430u); goto label_BFC00430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00460u); } label_BFC00460: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00460u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00460u); #endif /* 0xBFC00460: 84A60008 lh $a2, 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, 0xBFC00460u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x20u); } PGXP_LOAD(0x84A60008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC00460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00464: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC00468: 10C3FFF1 beq $a2, $v1, 0xBFC00430 */ uint32_t psx_brA_BFC00468 = cpu->gpr[6]; uint32_t psx_brB_BFC00468 = cpu->gpr[3]; psx_taken_BFC00468 = (psx_brA_BFC00468 == psx_brB_BFC00468); psx_delay_BFC00468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0046Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC0046C: 00404025 or $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(0x00404025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0046Cu); #endif if (psx_delay_BFC00468) { psx_delay_BFC00468 = 0; if (psx_taken_BFC00468) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00430u); goto label_BFC00430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00470u); } label_BFC00470: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00470u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x49u); #endif /* 0xBFC00470: 00C01825 or $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(0x00C01825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC00474: 240AFFFF addiu $t2, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x240AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC00474u); #endif label_BFC00478: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00478u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC00478: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC00478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0047Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0047C: 00831821 addu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0047Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00480u); #endif /* 0xBFC00480: 8C670000 lw $a3, 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, 0xBFC00480u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } PGXP_LOAD(0x8C670000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC00480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00484: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC00488: 30E700F0 andi $a3, $a3, 0xF0 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] & 0xF0u; PGXP_ALU(0x30E700F0u, cpu->gpr[7], _pgx1, 0x00F0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0048Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280u); #endif /* 0xBFC0048C: 15270015 bne $t1, $a3, 0xBFC004E4 */ uint32_t psx_brA_BFC0048C = cpu->gpr[9]; uint32_t psx_brB_BFC0048C = cpu->gpr[7]; psx_taken_BFC0048C = (psx_brA_BFC0048C != psx_brB_BFC0048C); psx_delay_BFC0048C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC00490: 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(0xBFC00490u); #endif if (psx_delay_BFC0048C) { psx_delay_BFC0048C = 0; if (psx_taken_BFC0048C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004E4u); goto label_BFC004E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00494u); } label_BFC00494: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00494u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC00494: 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(0xBFC00494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00498: 240300A0 addiu $v1, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x240300A0u, cpu->gpr[3], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0049Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0049C: ACA30000 sw $v1, 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, 0xBFC0049Cu); return; } g_debug_last_store_pc = 0xBFC0049Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0049Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC004A0: 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(0xBFC004A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC004A4: A0A0000A sb $zero, 10($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC004A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (10)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0A0000Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC004A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC004A8: ACA00004 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC004A8u); return; } g_debug_last_store_pc = 0xBFC004A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA00004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC004A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC004AC: A4A30008 sh $v1, 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, 0xBFC004ACu); return; } g_debug_last_store_pc = 0xBFC004ACu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC004ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC004B0: 240700A0 addiu $a3, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x240700A0u, cpu->gpr[7], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC004B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC004B4: 2408FFFF addiu $t0, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x2408FFFFu, cpu->gpr[8], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC004B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC004B8: 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(0xBFC004B8u); #endif label_BFC004BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC004BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC004BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC004BC: 00063140 sll $a2, $a2, 5 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 5u; PGXP_ALU(0x00063140u, cpu->gpr[6], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC004BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC004C0: 00861821 addu $v1, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00861821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC004C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC004C4: 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(0xBFC004C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004C8u); #endif /* 0xBFC004C8: 84660008 lh $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, 0xBFC004C8u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } PGXP_LOAD(0x84660008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC004C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC004CC: AC670000 sw $a3, 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, 0xBFC004CCu); return; } g_debug_last_store_pc = 0xBFC004CCu; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC670000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC004CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC004D0: 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, 0xBFC004D0u); return; } g_debug_last_store_pc = 0xBFC004D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC004D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC004D4: 1440000B bne $v0, $zero, 0xBFC00504 */ uint32_t psx_brA_BFC004D4 = cpu->gpr[2]; uint32_t psx_brB_BFC004D4 = cpu->gpr[0]; psx_taken_BFC004D4 = (psx_brA_BFC004D4 != psx_brB_BFC004D4); psx_delay_BFC004D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC004D8: A4680008 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC004D8u); return; } g_debug_last_store_pc = 0xBFC004D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } PGXP_STORE(0xA4680008u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC004D8u); #endif if (psx_delay_BFC004D4) { psx_delay_BFC004D4 = 0; if (psx_taken_BFC004D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00504u); goto label_BFC00504; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004DCu); } label_BFC004DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC004DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC004DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC004DC: 03E00008 jr $ra */ psx_delay_BFC004DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC004E0: 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(0xBFC004E0u); #endif if (psx_delay_BFC004DC) { psx_delay_BFC004DC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC004E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC004E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC004E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC004E4: 110AFFD2 beq $t0, $t2, 0xBFC00430 */ uint32_t psx_brA_BFC004E4 = cpu->gpr[8]; uint32_t psx_brB_BFC004E4 = cpu->gpr[10]; psx_taken_BFC004E4 = (psx_brA_BFC004E4 == psx_brB_BFC004E4); psx_delay_BFC004E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC004E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC004E8u); #endif if (psx_delay_BFC004E4) { psx_delay_BFC004E4 = 0; if (psx_taken_BFC004E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00430u); goto label_BFC00430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004ECu); } label_BFC004EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC004ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC004ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004ECu); #endif /* 0xBFC004EC: 84630008 lh $v1, 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, 0xBFC004ECu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x84630008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC004ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC004F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC004F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC004F4: 146AFFE0 bne $v1, $t2, 0xBFC00478 */ uint32_t psx_brA_BFC004F4 = cpu->gpr[3]; uint32_t psx_brB_BFC004F4 = cpu->gpr[10]; psx_taken_BFC004F4 = (psx_brA_BFC004F4 != psx_brB_BFC004F4); psx_delay_BFC004F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC004F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC004F8u); #endif if (psx_delay_BFC004F4) { psx_delay_BFC004F4 = 0; if (psx_taken_BFC004F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00478u); goto label_BFC00478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004FCu); } label_BFC004FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC004FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC004FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC004FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC004FC: 1000FFCC beq $zero, $zero, 0xBFC00430 */ uint32_t psx_brA_BFC004FC = cpu->gpr[0]; uint32_t psx_brB_BFC004FC = cpu->gpr[0]; psx_taken_BFC004FC = (psx_brA_BFC004FC == psx_brB_BFC004FC); psx_delay_BFC004FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00500: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00500u); #endif if (psx_delay_BFC004FC) { psx_delay_BFC004FC = 0; if (psx_taken_BFC004FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00430u); goto label_BFC00430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00504u); } label_BFC00504: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00504u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC00504: 14C5FFED bne $a2, $a1, 0xBFC004BC */ uint32_t psx_brA_BFC00504 = cpu->gpr[6]; uint32_t psx_brB_BFC00504 = cpu->gpr[5]; psx_taken_BFC00504 = (psx_brA_BFC00504 != psx_brB_BFC00504); psx_delay_BFC00504 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00508: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00508u); #endif if (psx_delay_BFC00504) { psx_delay_BFC00504 = 0; if (psx_taken_BFC00504) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004BCu); goto label_BFC004BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0050Cu); } label_BFC0050C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0050Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0050Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0050Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0050C: 1000FFF3 beq $zero, $zero, 0xBFC004DC */ uint32_t psx_brA_BFC0050C = cpu->gpr[0]; uint32_t psx_brB_BFC0050C = cpu->gpr[0]; psx_taken_BFC0050C = (psx_brA_BFC0050C == psx_brB_BFC0050C); psx_delay_BFC0050C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00510: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00510u); #endif if (psx_delay_BFC0050C) { psx_delay_BFC0050C = 0; if (psx_taken_BFC0050C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC004DCu); goto label_BFC004DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00514u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00514u); cpu->pc = 0xBFC00514u; return; /* fallthrough */ } void OpenBIOS_func_1FC00514(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00514u); int psx_delay_BFC00518 = 0; label_BFC00514: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00514u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC00514: 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(0xBFC00514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00518: 03E00008 jr $ra */ psx_delay_BFC00518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0051Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0051C: 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(0xBFC0051Cu); #endif if (psx_delay_BFC00518) { psx_delay_BFC00518 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC00520(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00520u); int psx_delay_BFC00524 = 0; label_BFC00520: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00520u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC00520: 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(0xBFC00520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00524: 03E00008 jr $ra */ psx_delay_BFC00524 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00528: 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(0xBFC00528u); #endif if (psx_delay_BFC00524) { psx_delay_BFC00524 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0052C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0052Cu); int psx_delay_BFC00564 = 0; int psx_taken_BFC00564 = 0; int psx_delay_BFC005A4 = 0; int psx_taken_BFC005A4 = 0; int psx_delay_BFC005B0 = 0; int psx_taken_BFC005B0 = 0; int psx_delay_BFC005E4 = 0; int psx_delay_BFC00608 = 0; int psx_delay_BFC00610 = 0; int psx_taken_BFC00610 = 0; int psx_delay_BFC00618 = 0; int psx_delay_BFC00620 = 0; int psx_taken_BFC00620 = 0; int psx_delay_BFC00658 = 0; int psx_delay_BFC00668 = 0; int psx_delay_BFC00670 = 0; int psx_delay_BFC00688 = 0; int psx_delay_BFC00690 = 0; int psx_taken_BFC00690 = 0; int psx_delay_BFC006C0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0056Cu: goto label_BFC0056C; case 0xBFC00570u: goto label_BFC00570; case 0xBFC00598u: goto label_BFC00598; case 0xBFC0059Cu: goto label_BFC0059C; case 0xBFC005ACu: goto label_BFC005AC; case 0xBFC005B8u: goto label_BFC005B8; case 0xBFC005ECu: goto label_BFC005EC; case 0xBFC00610u: goto label_BFC00610; case 0xBFC00618u: goto label_BFC00618; case 0xBFC00620u: goto label_BFC00620; case 0xBFC00628u: goto label_BFC00628; case 0xBFC00660u: goto label_BFC00660; case 0xBFC00670u: goto label_BFC00670; case 0xBFC00678u: goto label_BFC00678; case 0xBFC00690u: goto label_BFC00690; case 0xBFC00698u: goto label_BFC00698; default: break; } } label_BFC0052C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0052Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0052Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0052Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0052C: 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(0xBFC0052Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC00530: 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, 0xBFC00530u); return; } g_debug_last_store_pc = 0xBFC00530u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC00530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC00534: 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, 0xBFC00534u); return; } g_debug_last_store_pc = 0xBFC00534u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC00534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00538: 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, 0xBFC00538u); return; } g_debug_last_store_pc = 0xBFC00538u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0053Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC0053C: 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, 0xBFC0053Cu); return; } g_debug_last_store_pc = 0xBFC0053Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC0053Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC00540: 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, 0xBFC00540u); return; } g_debug_last_store_pc = 0xBFC00540u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC00540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC00544: 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, 0xBFC00544u); return; } g_debug_last_store_pc = 0xBFC00544u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC00544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC00548: 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, 0xBFC00548u); return; } g_debug_last_store_pc = 0xBFC00548u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC00548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0054Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0054C: 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, 0xBFC0054Cu); return; } g_debug_last_store_pc = 0xBFC0054Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC0054Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC00550: 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, 0xBFC00550u); return; } g_debug_last_store_pc = 0xBFC00550u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC00554: 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, 0xBFC00554u); return; } g_debug_last_store_pc = 0xBFC00554u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC00554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC00558: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0055C: AFA50010 sw $a1, 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, 0xBFC0055Cu); return; } g_debug_last_store_pc = 0xBFC0055Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC00560: AFA60014 sw $a2, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00560u); return; } g_debug_last_store_pc = 0xBFC00560u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60014u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC00560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC00564: 04800002 bltz $a0, 0xBFC00570 */ uint32_t psx_brA_BFC00564 = cpu->gpr[4]; psx_taken_BFC00564 = ((int32_t)psx_brA_BFC00564 < 0); psx_delay_BFC00564 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100010u); #endif /* 0xBFC00568: 2494000F addiu $s4, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2494000Fu, cpu->gpr[20], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC00568u); #endif if (psx_delay_BFC00564) { psx_delay_BFC00564 = 0; if (psx_taken_BFC00564) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00570u); goto label_BFC00570; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0056Cu); } label_BFC0056C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0056Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0056Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0056Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC0056C: 0080A025 or $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(0x0080A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0056Cu); #endif label_BFC00570: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00570u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110000u); #endif /* 0xBFC00570: 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(0xBFC00570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x150000u); #endif /* 0xBFC00574: 02149021 addu $s2, $s0, $s4 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[20]; PGXP_ALU(0x02149021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC00578: 3C1E0000 lui $fp, 0x0 */ cpu->gpr[30] = 0x00000000u; PGXP_ALU(0x3C1E0000u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0057Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0000u); #endif /* 0xBFC0057C: 00129900 sll $s3, $s2, 4 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[19] = cpu->gpr[18] << 4u; PGXP_ALU(0x00129900u, cpu->gpr[19], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0057Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC00580: 27DE4C88 addiu $fp, $fp, 19592 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (19592)); PGXP_ALU(0x27DE4C88u, cpu->gpr[30], _pgx1, 0x00004C88u); } #ifdef PSX_COSIM cosim_instr(0xBFC00580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40080000u); #endif /* 0xBFC00584: 03D39821 addu $s3, $fp, $s3 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[19] = cpu->gpr[30] + cpu->gpr[19]; PGXP_ALU(0x03D39821u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC00588: 24150014 addiu $s5, $zero, 20 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); PGXP_ALU(0x24150014u, cpu->gpr[21], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC00588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0058Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0058C: 00129080 sll $s2, $s2, 2 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] << 2u; PGXP_ALU(0x00129080u, cpu->gpr[18], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC0058Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC00590: 2416FFFE addiu $s6, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2416FFFEu, cpu->gpr[22], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0xBFC00590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC00594: 02601025 or $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(0x02601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00594u); #endif label_BFC00598: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00598u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC00598: 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(0xBFC00598u); #endif label_BFC0059C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0059Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0059Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0059Cu); #endif /* 0xBFC0059C: 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, 0xBFC0059Cu); 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(0xBFC0059Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC005A0: 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(0xBFC005A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC005A4: 14830011 bne $a0, $v1, 0xBFC005EC */ uint32_t psx_brA_BFC005A4 = cpu->gpr[4]; uint32_t psx_brB_BFC005A4 = cpu->gpr[3]; psx_taken_BFC005A4 = (psx_brA_BFC005A4 != psx_brB_BFC005A4); psx_delay_BFC005A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800020u); #endif /* 0xBFC005A8: 26E50024 addiu $a1, $s7, 36 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[23] + (36)); PGXP_ALU(0x26E50024u, cpu->gpr[5], _pgx1, 0x00000024u); } #ifdef PSX_COSIM cosim_instr(0xBFC005A8u); #endif if (psx_delay_BFC005A4) { psx_delay_BFC005A4 = 0; if (psx_taken_BFC005A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC005ECu); goto label_BFC005EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC005ACu); } label_BFC005AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC005ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC005ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC005AC: 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(0xBFC005ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA00000u); #endif /* 0xBFC005B0: 16F5FFFA bne $s7, $s5, 0xBFC0059C */ uint32_t psx_brA_BFC005B0 = cpu->gpr[23]; uint32_t psx_brB_BFC005B0 = cpu->gpr[21]; psx_taken_BFC005B0 = (psx_brA_BFC005B0 != psx_brB_BFC005B0); psx_delay_BFC005B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC005B4: 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(0xBFC005B4u); #endif if (psx_delay_BFC005B0) { psx_delay_BFC005B0 = 0; if (psx_taken_BFC005B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0059Cu); goto label_BFC0059C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC005B8u); } label_BFC005B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC005B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC005B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005B8u); #endif /* 0xBFC005B8: 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, 0xBFC005B8u); 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(0xBFC005B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005BCu); #endif /* 0xBFC005BC: 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, 0xBFC005BCu); 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(0xBFC005BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005C0u); #endif /* 0xBFC005C0: 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, 0xBFC005C0u); 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(0xBFC005C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005C4u); #endif /* 0xBFC005C4: 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, 0xBFC005C4u); 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(0xBFC005C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005C8u); #endif /* 0xBFC005C8: 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, 0xBFC005C8u); 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(0xBFC005C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005CCu); #endif /* 0xBFC005CC: 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, 0xBFC005CCu); 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(0xBFC005CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005D0u); #endif /* 0xBFC005D0: 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, 0xBFC005D0u); 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(0xBFC005D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005D4u); #endif /* 0xBFC005D4: 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, 0xBFC005D4u); 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(0xBFC005D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005D8u); #endif /* 0xBFC005D8: 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, 0xBFC005D8u); 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(0xBFC005D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005DCu); #endif /* 0xBFC005DC: 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, 0xBFC005DCu); 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(0xBFC005DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC005E0: 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(0xBFC005E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC005E4: 03E00008 jr $ra */ psx_delay_BFC005E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC005E8: 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(0xBFC005E8u); #endif if (psx_delay_BFC005E4) { psx_delay_BFC005E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC005EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC005ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC005ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840004u); #endif /* 0xBFC005EC: 02571021 addu $v0, $s2, $s7 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[23]; PGXP_ALU(0x02571021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC005ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC005F0: 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(0xBFC005F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC005F4: 03C21021 addu $v0, $fp, $v0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[30] + cpu->gpr[2]; PGXP_ALU(0x03C21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC005F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC005F8: AC560000 sw $s6, 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, 0xBFC005F8u); return; } g_debug_last_store_pc = 0xBFC005F8u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAC560000u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC005F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC005FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC005FC: 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(0xBFC005FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00600u); #endif /* 0xBFC00600: 8FA60014 lw $a2, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00600u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA60014u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC00600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00604: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00608: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00610u; /* jalr link before delay slot */ psx_delay_BFC00608 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0060Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC0060C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0060Cu); #endif if (psx_delay_BFC00608) { psx_delay_BFC00608 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00610u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00610: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00610u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00610: 14400005 bne $v0, $zero, 0xBFC00628 */ uint32_t psx_brA_BFC00610 = cpu->gpr[2]; uint32_t psx_brB_BFC00610 = cpu->gpr[0]; psx_taken_BFC00610 = (psx_brA_BFC00610 != psx_brB_BFC00610); psx_delay_BFC00610 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00614: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00614u); #endif if (psx_delay_BFC00610) { psx_delay_BFC00610 = 0; if (psx_taken_BFC00610) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00628u); goto label_BFC00628; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00618u); } label_BFC00618: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00618u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00618: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC00620u; /* jal link before delay slot */ psx_delay_BFC00618 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0061Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0061C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0061Cu); #endif if (psx_delay_BFC00618) { psx_delay_BFC00618 = 0; cpu->gpr[31] = 0xBFC00620u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } label_BFC00620: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00620u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00620: 1040FFDD beq $v0, $zero, 0xBFC00598 */ uint32_t psx_brA_BFC00620 = cpu->gpr[2]; uint32_t psx_brB_BFC00620 = cpu->gpr[0]; psx_taken_BFC00620 = (psx_brA_BFC00620 == psx_brB_BFC00620); psx_delay_BFC00620 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC00624: 02601025 or $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(0x02601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00624u); #endif if (psx_delay_BFC00620) { psx_delay_BFC00620 = 0; if (psx_taken_BFC00620) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00598u); goto label_BFC00598; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00628u); } label_BFC00628: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00628u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110000u); #endif /* 0xBFC00628: 02148021 addu $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(0x02148021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0062Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0062C: 00108080 sll $s0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 2u; PGXP_ALU(0x00108080u, cpu->gpr[16], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC0062Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x810000u); #endif /* 0xBFC00630: 02178021 addu $s0, $s0, $s7 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[16] = cpu->gpr[16] + cpu->gpr[23]; PGXP_ALU(0x02178021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00634u); #endif /* 0xBFC00634: 8FA20010 lw $v0, 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, 0xBFC00634u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00638: 00108080 sll $s0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 2u; PGXP_ALU(0x00108080u, cpu->gpr[16], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC00638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0063Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010000u); #endif /* 0xBFC0063C: 03D0F021 addu $fp, $fp, $s0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[16]; PGXP_ALU(0x03D0F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0063Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00640: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC00644: AFC20000 sw $v0, 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, 0xBFC00644u); return; } g_debug_last_store_pc = 0xBFC00644u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00648: 26104D28 addiu $s0, $s0, 19752 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (19752)); PGXP_ALU(0x26104D28u, cpu->gpr[16], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0064Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0064C: 001411C0 sll $v0, $s4, 7 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[20] << 7u; PGXP_ALU(0x001411C0u, cpu->gpr[2], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC0064Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00650: 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(0xBFC00650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00654: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00658: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC00660u; /* jal link before delay slot */ psx_delay_BFC00658 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0065Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0065C: 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(0xBFC0065Cu); #endif if (psx_delay_BFC00658) { psx_delay_BFC00658 = 0; cpu->gpr[31] = 0xBFC00660u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC00660: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00660u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000021u); #endif /* 0xBFC00660: 03C02825 or $a1, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC00664: 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(0xBFC00664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00668: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC00670u; /* jal link before delay slot */ psx_delay_BFC00668 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0066Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0066C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0066Cu); #endif if (psx_delay_BFC00668) { psx_delay_BFC00668 = 0; cpu->gpr[31] = 0xBFC00670u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC00670: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00670u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00670: 0FF000E7 jal 0xBFC0039C */ cpu->gpr[31] = 0xBFC00678u; /* jal link before delay slot */ psx_delay_BFC00670 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00674: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00674u); #endif if (psx_delay_BFC00670) { psx_delay_BFC00670 = 0; cpu->gpr[31] = 0xBFC00678u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; return; } 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, 0x201u); #endif /* 0xBFC00678: 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(0xBFC00678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0067Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800020u); #endif /* 0xBFC0067C: 26E50010 addiu $a1, $s7, 16 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[23] + (16)); PGXP_ALU(0x26E50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #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, 0x5u); #endif /* 0xBFC00680: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC00684: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00688: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00690u; /* jalr link before delay slot */ psx_delay_BFC00688 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0068Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC0068C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0068Cu); #endif if (psx_delay_BFC00688) { psx_delay_BFC00688 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00690u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00690: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00690u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00690: 1040FFC9 beq $v0, $zero, 0xBFC005B8 */ uint32_t psx_brA_BFC00690 = cpu->gpr[2]; uint32_t psx_brB_BFC00690 = cpu->gpr[0]; psx_taken_BFC00690 = (psx_brA_BFC00690 == psx_brB_BFC00690); psx_delay_BFC00690 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00694: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00694u); #endif if (psx_delay_BFC00690) { psx_delay_BFC00690 = 0; if (psx_taken_BFC00690) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC005B8u); goto label_BFC005B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00698u); } 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: 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, 0xBFC00698u); 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(0xBFC00698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0069Cu); #endif /* 0xBFC0069C: 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, 0xBFC0069Cu); 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(0xBFC0069Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006A0u); #endif /* 0xBFC006A0: 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, 0xBFC006A0u); 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(0xBFC006A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006A4u); #endif /* 0xBFC006A4: 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, 0xBFC006A4u); 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(0xBFC006A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006A8u); #endif /* 0xBFC006A8: 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, 0xBFC006A8u); 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(0xBFC006A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006ACu); #endif /* 0xBFC006AC: 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, 0xBFC006ACu); 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(0xBFC006ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006B0u); #endif /* 0xBFC006B0: 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, 0xBFC006B0u); 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(0xBFC006B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006B4u); #endif /* 0xBFC006B4: 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, 0xBFC006B4u); 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(0xBFC006B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006B8u); #endif /* 0xBFC006B8: 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, 0xBFC006B8u); 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(0xBFC006B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006BCu); #endif /* 0xBFC006BC: 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, 0xBFC006BCu); 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(0xBFC006BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC006C0: 0BF01D81 j 0xBFC07604 */ psx_delay_BFC006C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC006C4: 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(0xBFC006C4u); #endif if (psx_delay_BFC006C0) { psx_delay_BFC006C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } } void OpenBIOS_func_1FC006C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC006C8u); int psx_delay_BFC006F8 = 0; int psx_taken_BFC006F8 = 0; int psx_delay_BFC0071C = 0; int psx_delay_BFC0072C = 0; int psx_delay_BFC0073C = 0; int psx_delay_BFC00750 = 0; int psx_delay_BFC00758 = 0; int psx_taken_BFC00758 = 0; int psx_delay_BFC00760 = 0; int psx_delay_BFC00794 = 0; int psx_delay_BFC007B0 = 0; int psx_delay_BFC007B8 = 0; int psx_delay_BFC007D0 = 0; int psx_delay_BFC007D8 = 0; int psx_taken_BFC007D8 = 0; int psx_delay_BFC007E0 = 0; int psx_delay_BFC007E8 = 0; int psx_taken_BFC007E8 = 0; int psx_delay_BFC00824 = 0; int psx_delay_BFC0082C = 0; int psx_delay_BFC00840 = 0; int psx_delay_BFC00848 = 0; int psx_taken_BFC00848 = 0; int psx_delay_BFC00850 = 0; int psx_delay_BFC00858 = 0; int psx_taken_BFC00858 = 0; int psx_delay_BFC0088C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00700u: goto label_BFC00700; case 0xBFC00704u: goto label_BFC00704; case 0xBFC00724u: goto label_BFC00724; case 0xBFC00734u: goto label_BFC00734; case 0xBFC00744u: goto label_BFC00744; case 0xBFC00758u: goto label_BFC00758; case 0xBFC00760u: goto label_BFC00760; case 0xBFC00768u: goto label_BFC00768; case 0xBFC00794u: goto label_BFC00794; case 0xBFC0079Cu: goto label_BFC0079C; case 0xBFC007B8u: goto label_BFC007B8; case 0xBFC007C0u: goto label_BFC007C0; case 0xBFC007D8u: goto label_BFC007D8; case 0xBFC007E0u: goto label_BFC007E0; case 0xBFC007E8u: goto label_BFC007E8; case 0xBFC007F0u: goto label_BFC007F0; case 0xBFC00818u: goto label_BFC00818; case 0xBFC0082Cu: goto label_BFC0082C; case 0xBFC00834u: goto label_BFC00834; case 0xBFC00848u: goto label_BFC00848; case 0xBFC00850u: goto label_BFC00850; case 0xBFC00858u: goto label_BFC00858; case 0xBFC00860u: goto label_BFC00860; case 0xBFC00864u: goto label_BFC00864; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC006C8: 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(0xBFC006C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC006CC: 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, 0xBFC006CCu); return; } g_debug_last_store_pc = 0xBFC006CCu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC006D0: 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, 0xBFC006D0u); return; } g_debug_last_store_pc = 0xBFC006D0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC006D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC006D4: 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, 0xBFC006D4u); return; } g_debug_last_store_pc = 0xBFC006D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC006D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC006D8: 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, 0xBFC006D8u); return; } g_debug_last_store_pc = 0xBFC006D8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0030u, _pgxa, cpu->gpr[30]); } #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, 0x20800000u); #endif /* 0xBFC006DC: 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, 0xBFC006DCu); return; } g_debug_last_store_pc = 0xBFC006DCu; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB7002Cu, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC006E0: 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, 0xBFC006E0u); return; } g_debug_last_store_pc = 0xBFC006E0u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60028u, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC006E4: 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, 0xBFC006E4u); return; } g_debug_last_store_pc = 0xBFC006E4u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC006E8: 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, 0xBFC006E8u); return; } g_debug_last_store_pc = 0xBFC006E8u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC006EC: 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, 0xBFC006ECu); return; } g_debug_last_store_pc = 0xBFC006ECu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC006ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC006F0: 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, 0xBFC006F0u); return; } g_debug_last_store_pc = 0xBFC006F0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC006F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC006F4: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC006F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC006F8: 04800002 bltz $a0, 0xBFC00704 */ uint32_t psx_brA_BFC006F8 = cpu->gpr[4]; psx_taken_BFC006F8 = ((int32_t)psx_brA_BFC006F8 < 0); psx_delay_BFC006F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC006FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010u); #endif /* 0xBFC006FC: 2492000F addiu $s2, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2492000Fu, cpu->gpr[18], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC006FCu); #endif if (psx_delay_BFC006F8) { psx_delay_BFC006F8 = 0; if (psx_taken_BFC006F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00704u); goto label_BFC00704; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00700u); } label_BFC00700: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00700u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC00700: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00700u); #endif label_BFC00704: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00704u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC00704: 00129103 sra $s2, $s2, 4 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 4u); PGXP_ALU(0x00129103u, cpu->gpr[18], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00708: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 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, 0x40004u); #endif /* 0xBFC0070C: 001211C0 sll $v0, $s2, 7 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] << 7u; PGXP_ALU(0x001211C0u, cpu->gpr[2], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC0070Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00710: 26104D28 addiu $s0, $s0, 19752 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (19752)); PGXP_ALU(0x26104D28u, cpu->gpr[16], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00714: 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(0xBFC00714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00718: 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(0xBFC00718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0071Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0071C: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC00724u; /* jal link before delay slot */ psx_delay_BFC0071C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00720: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00720u); #endif if (psx_delay_BFC0071C) { psx_delay_BFC0071C = 0; cpu->gpr[31] = 0xBFC00724u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC00724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00724u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00724: 2402434D addiu $v0, $zero, 17229 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (17229)); PGXP_ALU(0x2402434Du, cpu->gpr[2], _pgx1, 0x0000434Du); } #ifdef PSX_COSIM cosim_instr(0xBFC00724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00728: A6020000 sh $v0, 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, 0xBFC00728u); return; } g_debug_last_store_pc = 0xBFC00728u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6020000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0072Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0072C: 0FF000E7 jal 0xBFC0039C */ cpu->gpr[31] = 0xBFC00734u; /* jal link before delay slot */ psx_delay_BFC0072C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00730: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00730u); #endif if (psx_delay_BFC0072C) { psx_delay_BFC0072C = 0; cpu->gpr[31] = 0xBFC00734u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; return; } label_BFC00734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00734u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00734: 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(0xBFC00734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC00738: 241300B0 addiu $s3, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241300B0u, cpu->gpr[19], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0073Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80080000u); #endif /* 0xBFC0073C: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC00744u; /* jalr link before delay slot */ psx_delay_BFC0073C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00740: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00740u); #endif if (psx_delay_BFC0073C) { psx_delay_BFC0073C = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC00744u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00744: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00744u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00744: 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(0xBFC00744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00748: 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(0xBFC00748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0074Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC0074C: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x80080000u); #endif /* 0xBFC00750: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC00758u; /* jalr link before delay slot */ psx_delay_BFC00750 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC00754: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00754u); #endif if (psx_delay_BFC00750) { psx_delay_BFC00750 = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC00758u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00758: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00758u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00758: 10400042 beq $v0, $zero, 0xBFC00864 */ uint32_t psx_brA_BFC00758 = cpu->gpr[2]; uint32_t psx_brB_BFC00758 = cpu->gpr[0]; psx_taken_BFC00758 = (psx_brA_BFC00758 == psx_brB_BFC00758); psx_delay_BFC00758 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0075Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0075C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0075Cu); #endif if (psx_delay_BFC00758) { psx_delay_BFC00758 = 0; if (psx_taken_BFC00758) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00864u); goto label_BFC00864; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00760u); } label_BFC00760: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00760u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00760: 0FF01D81 jal 0xBFC07604 */ 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, 0x40000000u); #endif /* 0xBFC00764: 3C1E0000 lui $fp, 0x0 */ cpu->gpr[30] = 0x00000000u; PGXP_ALU(0x3C1E0000u, cpu->gpr[30], 0u, 0u); #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, 0xBFC07604u); cpu->pc = 0xBFC07604u; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00768: 00121100 sll $v0, $s2, 4 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] << 4u; PGXP_ALU(0x00121100u, cpu->gpr[2], _pgx1, 4u); } #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, 0x40004u); #endif /* 0xBFC0076C: 00521023 subu $v0, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[18]; PGXP_ALU(0x00521023u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC00770: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC00770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC00774: 27DE4E28 addiu $fp, $fp, 20008 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (20008)); PGXP_ALU(0x27DE4E28u, cpu->gpr[30], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC00778: 03C2F021 addu $fp, $fp, $v0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[2]; PGXP_ALU(0x03C2F021u, cpu->gpr[30], _pgx1, _pgx2); } #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, 0x80001u); #endif /* 0xBFC0077C: 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(0xBFC0077Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC00780: 241500A0 addiu $s5, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241500A0u, cpu->gpr[21], _pgx1, 0x000000A0u); } #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, 0x400001u); #endif /* 0xBFC00784: 2416FFFF addiu $s6, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x2416FFFFu, cpu->gpr[22], _pgx1, 0xFFFFFFFFu); } #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, 0x800001u); #endif /* 0xBFC00788: 241700B0 addiu $s7, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241700B0u, cpu->gpr[23], _pgx1, 0x000000B0u); } #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, 0x100001u); #endif /* 0xBFC0078C: 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(0xBFC0078Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000011u); #endif /* 0xBFC00790: 03C02025 or $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(0x03C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00790u); #endif label_BFC00794: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00794u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00794: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC0079Cu; /* jal link before delay slot */ psx_delay_BFC00794 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00798: 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(0xBFC00798u); #endif if (psx_delay_BFC00794) { psx_delay_BFC00794 = 0; cpu->gpr[31] = 0xBFC0079Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC0079C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0079Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0079C: 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(0xBFC0079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000021u); #endif /* 0xBFC007A0: 03C02825 or $a1, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C02825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x10011u); #endif /* 0xBFC007A4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x40200000u); #endif /* 0xBFC007A8: AFD50000 sw $s5, 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, 0xBFC007A8u); return; } g_debug_last_store_pc = 0xBFC007A8u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFD50000u, _pgxa, cpu->gpr[21]); } #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, 0x40000001u); #endif /* 0xBFC007AC: AFC00004 sw $zero, 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, 0xBFC007ACu); return; } g_debug_last_store_pc = 0xBFC007ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAFC00004u, _pgxa, cpu->gpr[0]); } #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, 0x80000000u); #endif /* 0xBFC007B0: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC007B8u; /* jal link before delay slot */ psx_delay_BFC007B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40400000u); #endif /* 0xBFC007B4: A7D60008 sh $s6, 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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC007B4u); return; } g_debug_last_store_pc = 0xBFC007B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[22] & 0xFFFFu)); } PGXP_STORE(0xA7D60008u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC007B4u); #endif if (psx_delay_BFC007B0) { psx_delay_BFC007B0 = 0; cpu->gpr[31] = 0xBFC007B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC007B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC007B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC007B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC007B8: 0FF000E7 jal 0xBFC0039C */ 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, 0x10011u); #endif /* 0xBFC007BC: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; 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, 0x80000u); #endif /* 0xBFC007C0: 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(0xBFC007C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC007C4: 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(0xBFC007C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC007C8: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x80021u); #endif /* 0xBFC007CC: 02602825 or $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(0x02602825u, 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, 0x80800000u); #endif /* 0xBFC007D0: 02E0F809 jalr $ra, $s7 */ cpu->gpr[31] = 0xBFC007D8u; /* jalr link before delay slot */ psx_delay_BFC007D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC007D4: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC007D4u); #endif if (psx_delay_BFC007D0) { psx_delay_BFC007D0 = 0; { uint32_t _t = cpu->gpr[23]; cpu->gpr[31] = 0xBFC007D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC007D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC007D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC007D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC007D8: 10400022 beq $v0, $zero, 0xBFC00864 */ uint32_t psx_brA_BFC007D8 = cpu->gpr[2]; uint32_t psx_brB_BFC007D8 = cpu->gpr[0]; psx_taken_BFC007D8 = (psx_brA_BFC007D8 == psx_brB_BFC007D8); psx_delay_BFC007D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC007DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC007DCu); #endif if (psx_delay_BFC007D8) { psx_delay_BFC007D8 = 0; if (psx_taken_BFC007D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00864u); goto label_BFC00864; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC007E0u); } 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, 0x80000000u); #endif /* 0xBFC007E0: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC007E8u; /* jal link before delay slot */ psx_delay_BFC007E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC007E4: 27DE0020 addiu $fp, $fp, 32 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (32)); PGXP_ALU(0x27DE0020u, cpu->gpr[30], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC007E4u); #endif if (psx_delay_BFC007E0) { psx_delay_BFC007E0 = 0; cpu->gpr[31] = 0xBFC007E8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC007E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC007E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC007E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180000u); #endif /* 0xBFC007E8: 1674FFEA bne $s3, $s4, 0xBFC00794 */ uint32_t psx_brA_BFC007E8 = cpu->gpr[19]; uint32_t psx_brB_BFC007E8 = cpu->gpr[20]; psx_taken_BFC007E8 = (psx_brA_BFC007E8 != psx_brB_BFC007E8); psx_delay_BFC007E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000011u); #endif /* 0xBFC007EC: 03C02025 or $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(0x03C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC007ECu); #endif if (psx_delay_BFC007E8) { psx_delay_BFC007E8 = 0; if (psx_taken_BFC007E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00794u); goto label_BFC00794; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC007F0u); } label_BFC007F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC007F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC007F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC007F0: 00121080 sll $v0, $s2, 2 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] << 2u; PGXP_ALU(0x00121080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x40004u); #endif /* 0xBFC007F4: 00521021 addu $v0, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[18]; PGXP_ALU(0x00521021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x40000u); #endif /* 0xBFC007F8: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC007F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC007FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC007FC: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC007FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC00800: 26524C88 addiu $s2, $s2, 19592 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19592)); PGXP_ALU(0x26524C88u, cpu->gpr[18], _pgx1, 0x00004C88u); } #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, 0x40004u); #endif /* 0xBFC00804: 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(0xBFC00804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC00808: 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(0xBFC00808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0080Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC0080C: 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(0xBFC0080Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC00810: 241600B0 addiu $s6, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241600B0u, cpu->gpr[22], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC00814: 24140024 addiu $s4, $zero, 36 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); PGXP_ALU(0x24140024u, cpu->gpr[20], _pgx1, 0x00000024u); } #ifdef PSX_COSIM cosim_instr(0xBFC00814u); #endif label_BFC00818: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00818u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC00818: 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(0xBFC00818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0081Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC0081C: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x10011u); #endif /* 0xBFC00820: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC00824: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC0082Cu; /* jal link before delay slot */ psx_delay_BFC00824 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x240000u); #endif /* 0xBFC00828: AE550000 sw $s5, 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, 0xBFC00828u); return; } g_debug_last_store_pc = 0xBFC00828u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAE550000u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC00828u); #endif if (psx_delay_BFC00824) { psx_delay_BFC00824 = 0; cpu->gpr[31] = 0xBFC0082Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC0082C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0082Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0082Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0082Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0082C: 0FF000E7 jal 0xBFC0039C */ cpu->gpr[31] = 0xBFC00834u; /* jal link before delay slot */ psx_delay_BFC0082C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00830: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00830u); #endif if (psx_delay_BFC0082C) { psx_delay_BFC0082C = 0; cpu->gpr[31] = 0xBFC00834u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; return; } label_BFC00834: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00834u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00834: 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(0xBFC00834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC00838: 02003025 or $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(0x02003025u, cpu->gpr[6], _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, 0x80021u); #endif /* 0xBFC0083C: 02602825 or $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(0x02602825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80400000u); #endif /* 0xBFC00840: 02C0F809 jalr $ra, $s6 */ cpu->gpr[31] = 0xBFC00848u; /* jalr link before delay slot */ psx_delay_BFC00840 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC00844: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00844u); #endif if (psx_delay_BFC00840) { psx_delay_BFC00840 = 0; { uint32_t _t = cpu->gpr[22]; cpu->gpr[31] = 0xBFC00848u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00848: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00848u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00848: 10400006 beq $v0, $zero, 0xBFC00864 */ uint32_t psx_brA_BFC00848 = cpu->gpr[2]; uint32_t psx_brB_BFC00848 = cpu->gpr[0]; psx_taken_BFC00848 = (psx_brA_BFC00848 == psx_brB_BFC00848); psx_delay_BFC00848 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0084Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0084C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0084Cu); #endif if (psx_delay_BFC00848) { psx_delay_BFC00848 = 0; if (psx_taken_BFC00848) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00864u); goto label_BFC00864; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00850u); } label_BFC00850: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00850u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00850: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC00858u; /* jal link before delay slot */ psx_delay_BFC00850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC00854: 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(0xBFC00854u); #endif if (psx_delay_BFC00850) { psx_delay_BFC00850 = 0; cpu->gpr[31] = 0xBFC00858u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC00858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180000u); #endif /* 0xBFC00858: 1674FFEF bne $s3, $s4, 0xBFC00818 */ uint32_t psx_brA_BFC00858 = cpu->gpr[19]; uint32_t psx_brB_BFC00858 = cpu->gpr[20]; psx_taken_BFC00858 = (psx_brA_BFC00858 != psx_brB_BFC00858); psx_delay_BFC00858 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0085Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0085C: 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(0xBFC0085Cu); #endif if (psx_delay_BFC00858) { psx_delay_BFC00858 = 0; if (psx_taken_BFC00858) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00818u); goto label_BFC00818; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00860u); } label_BFC00860: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00860u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00860: 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(0xBFC00860u); #endif label_BFC00864: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00864u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00864u); #endif /* 0xBFC00864: 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, 0xBFC00864u); 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(0xBFC00864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00868u); #endif /* 0xBFC00868: 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, 0xBFC00868u); 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(0xBFC00868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0086Cu); #endif /* 0xBFC0086C: 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, 0xBFC0086Cu); 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(0xBFC0086Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00870u); #endif /* 0xBFC00870: 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, 0xBFC00870u); 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(0xBFC00870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00874u); #endif /* 0xBFC00874: 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, 0xBFC00874u); 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(0xBFC00874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00878u); #endif /* 0xBFC00878: 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, 0xBFC00878u); 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(0xBFC00878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0087Cu); #endif /* 0xBFC0087C: 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, 0xBFC0087Cu); 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(0xBFC0087Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00880u); #endif /* 0xBFC00880: 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, 0xBFC00880u); 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(0xBFC00880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00884u); #endif /* 0xBFC00884: 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, 0xBFC00884u); 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(0xBFC00884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00888u); #endif /* 0xBFC00888: 8FB00010 lw $s0, 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, 0xBFC00888u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC00888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0088Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0088C: 03E00008 jr $ra */ psx_delay_BFC0088C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00890: 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(0xBFC00890u); #endif if (psx_delay_BFC0088C) { psx_delay_BFC0088C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC00894(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00894u); int psx_delay_BFC008CC = 0; int psx_delay_BFC008D4 = 0; int psx_taken_BFC008D4 = 0; int psx_delay_BFC00934 = 0; int psx_delay_BFC0093C = 0; int psx_taken_BFC0093C = 0; int psx_delay_BFC00944 = 0; int psx_delay_BFC0094C = 0; int psx_taken_BFC0094C = 0; int psx_delay_BFC0095C = 0; int psx_taken_BFC0095C = 0; int psx_delay_BFC0096C = 0; int psx_taken_BFC0096C = 0; int psx_delay_BFC00980 = 0; int psx_taken_BFC00980 = 0; int psx_delay_BFC009B0 = 0; int psx_delay_BFC009B8 = 0; int psx_delay_BFC009CC = 0; int psx_delay_BFC009D4 = 0; int psx_delay_BFC009EC = 0; int psx_delay_BFC009FC = 0; int psx_taken_BFC009FC = 0; int psx_delay_BFC00A20 = 0; int psx_delay_BFC00A28 = 0; int psx_taken_BFC00A28 = 0; int psx_delay_BFC00A30 = 0; int psx_delay_BFC00A38 = 0; int psx_taken_BFC00A38 = 0; int psx_delay_BFC00A40 = 0; int psx_delay_BFC00A48 = 0; int psx_taken_BFC00A48 = 0; int psx_delay_BFC00A54 = 0; int psx_delay_BFC00A60 = 0; int psx_taken_BFC00A60 = 0; int psx_delay_BFC00A84 = 0; int psx_delay_BFC00A8C = 0; int psx_taken_BFC00A8C = 0; int psx_delay_BFC00A9C = 0; int psx_taken_BFC00A9C = 0; int psx_delay_BFC00AB4 = 0; int psx_taken_BFC00AB4 = 0; int psx_delay_BFC00AD8 = 0; int psx_taken_BFC00AD8 = 0; int psx_delay_BFC00AE0 = 0; int psx_taken_BFC00AE0 = 0; int psx_delay_BFC00AF0 = 0; int psx_taken_BFC00AF0 = 0; int psx_delay_BFC00B04 = 0; int psx_taken_BFC00B04 = 0; int psx_delay_BFC00B0C = 0; int psx_taken_BFC00B0C = 0; int psx_delay_BFC00B18 = 0; int psx_taken_BFC00B18 = 0; int psx_delay_BFC00B30 = 0; int psx_taken_BFC00B30 = 0; int psx_delay_BFC00B48 = 0; int psx_taken_BFC00B48 = 0; int psx_delay_BFC00B6C = 0; int psx_delay_BFC00B74 = 0; int psx_taken_BFC00B74 = 0; int psx_delay_BFC00B7C = 0; int psx_delay_BFC00B84 = 0; int psx_taken_BFC00B84 = 0; int psx_delay_BFC00B8C = 0; int psx_delay_BFC00B94 = 0; int psx_taken_BFC00B94 = 0; int psx_delay_BFC00BA8 = 0; int psx_delay_BFC00BB0 = 0; int psx_taken_BFC00BB0 = 0; int psx_delay_BFC00BE4 = 0; int psx_delay_BFC00C04 = 0; int psx_taken_BFC00C04 = 0; int psx_delay_BFC00C18 = 0; int psx_delay_BFC00C20 = 0; int psx_taken_BFC00C20 = 0; int psx_delay_BFC00C38 = 0; int psx_taken_BFC00C38 = 0; int psx_delay_BFC00C40 = 0; int psx_taken_BFC00C40 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC008D4u: goto label_BFC008D4; case 0xBFC008DCu: goto label_BFC008DC; case 0xBFC008E0u: goto label_BFC008E0; case 0xBFC0093Cu: goto label_BFC0093C; case 0xBFC00944u: goto label_BFC00944; case 0xBFC0094Cu: goto label_BFC0094C; case 0xBFC00954u: goto label_BFC00954; case 0xBFC00964u: goto label_BFC00964; case 0xBFC00974u: goto label_BFC00974; case 0xBFC00988u: goto label_BFC00988; case 0xBFC009B8u: goto label_BFC009B8; case 0xBFC009C0u: goto label_BFC009C0; case 0xBFC009D4u: goto label_BFC009D4; case 0xBFC009DCu: goto label_BFC009DC; case 0xBFC009E8u: goto label_BFC009E8; case 0xBFC009F4u: goto label_BFC009F4; case 0xBFC00A04u: goto label_BFC00A04; case 0xBFC00A0Cu: goto label_BFC00A0C; case 0xBFC00A28u: goto label_BFC00A28; case 0xBFC00A30u: goto label_BFC00A30; case 0xBFC00A38u: goto label_BFC00A38; case 0xBFC00A40u: goto label_BFC00A40; case 0xBFC00A48u: goto label_BFC00A48; case 0xBFC00A50u: goto label_BFC00A50; case 0xBFC00A5Cu: goto label_BFC00A5C; case 0xBFC00A68u: goto label_BFC00A68; case 0xBFC00A7Cu: goto label_BFC00A7C; case 0xBFC00A8Cu: goto label_BFC00A8C; case 0xBFC00A94u: goto label_BFC00A94; case 0xBFC00A98u: goto label_BFC00A98; case 0xBFC00AA4u: goto label_BFC00AA4; case 0xBFC00AACu: goto label_BFC00AAC; case 0xBFC00ABCu: goto label_BFC00ABC; case 0xBFC00AD0u: goto label_BFC00AD0; case 0xBFC00AE0u: goto label_BFC00AE0; case 0xBFC00AE8u: goto label_BFC00AE8; case 0xBFC00AF8u: goto label_BFC00AF8; case 0xBFC00AFCu: goto label_BFC00AFC; case 0xBFC00B00u: goto label_BFC00B00; case 0xBFC00B0Cu: goto label_BFC00B0C; case 0xBFC00B14u: goto label_BFC00B14; case 0xBFC00B20u: goto label_BFC00B20; case 0xBFC00B28u: goto label_BFC00B28; case 0xBFC00B38u: goto label_BFC00B38; case 0xBFC00B44u: goto label_BFC00B44; case 0xBFC00B50u: goto label_BFC00B50; case 0xBFC00B60u: goto label_BFC00B60; case 0xBFC00B74u: goto label_BFC00B74; case 0xBFC00B7Cu: goto label_BFC00B7C; case 0xBFC00B84u: goto label_BFC00B84; case 0xBFC00B8Cu: goto label_BFC00B8C; case 0xBFC00B94u: goto label_BFC00B94; case 0xBFC00B9Cu: goto label_BFC00B9C; case 0xBFC00BB0u: goto label_BFC00BB0; case 0xBFC00BB8u: goto label_BFC00BB8; case 0xBFC00BECu: goto label_BFC00BEC; case 0xBFC00C0Cu: goto label_BFC00C0C; case 0xBFC00C14u: goto label_BFC00C14; case 0xBFC00C20u: goto label_BFC00C20; case 0xBFC00C28u: goto label_BFC00C28; case 0xBFC00C30u: goto label_BFC00C30; case 0xBFC00C40u: goto label_BFC00C40; default: break; } } label_BFC00894: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00894u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00894: 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(0xBFC00894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00898: 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(0xBFC00898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0089Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0089C: AFB40060 sw $s4, 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, 0xBFC0089Cu); return; } g_debug_last_store_pc = 0xBFC0089Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC0089Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC008A0: AFBF0074 sw $ra, 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, 0xBFC008A0u); return; } g_debug_last_store_pc = 0xBFC008A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0074u, _pgxa, cpu->gpr[31]); } #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, 0x60000000u); #endif /* 0xBFC008A4: AFBE0070 sw $fp, 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, 0xBFC008A4u); return; } g_debug_last_store_pc = 0xBFC008A4u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0070u, _pgxa, cpu->gpr[30]); } #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, 0x20800000u); #endif /* 0xBFC008A8: AFB7006C sw $s7, 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, 0xBFC008A8u); return; } g_debug_last_store_pc = 0xBFC008A8u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB7006Cu, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC008AC: AFB60068 sw $s6, 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, 0xBFC008ACu); return; } g_debug_last_store_pc = 0xBFC008ACu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60068u, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC008B0: AFB50064 sw $s5, 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, 0xBFC008B0u); return; } g_debug_last_store_pc = 0xBFC008B0u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50064u, _pgxa, cpu->gpr[21]); } #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, 0x20080000u); #endif /* 0xBFC008B4: AFB3005C sw $s3, 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, 0xBFC008B4u); return; } g_debug_last_store_pc = 0xBFC008B4u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3005Cu, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC008B8: 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, 0xBFC008B8u); return; } g_debug_last_store_pc = 0xBFC008B8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20058u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC008B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC008BC: AFB10054 sw $s1, 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, 0xBFC008BCu); return; } g_debug_last_store_pc = 0xBFC008BCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10054u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC008C0: 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, 0xBFC008C0u); return; } g_debug_last_store_pc = 0xBFC008C0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00050u, _pgxa, cpu->gpr[16]); } #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, 0x100011u); #endif /* 0xBFC008C4: 0080A025 or $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(0x0080A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC008C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC008C8: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC008C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC008CC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC008D4u; /* jalr link before delay slot */ psx_delay_BFC008CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180000u); #endif /* 0xBFC008D0: 2693000F addiu $s3, $s4, 15 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[20] + (15)); PGXP_ALU(0x2693000Fu, cpu->gpr[19], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC008D0u); #endif if (psx_delay_BFC008CC) { psx_delay_BFC008CC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC008D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC008D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC008D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC008D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC008D4: 06800002 bltz $s4, 0xBFC008E0 */ uint32_t psx_brA_BFC008D4 = cpu->gpr[20]; psx_taken_BFC008D4 = ((int32_t)psx_brA_BFC008D4 < 0); psx_delay_BFC008D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC008D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC008D8u); #endif if (psx_delay_BFC008D4) { psx_delay_BFC008D4 = 0; if (psx_taken_BFC008D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC008E0u); goto label_BFC008E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC008DCu); } label_BFC008DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC008DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC008DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180001u); #endif /* 0xBFC008DC: 02809825 or $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(0x02809825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC008DCu); #endif label_BFC008E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC008E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC008E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC008E0: 00139903 sra $s3, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] >> 4u); PGXP_ALU(0x00139903u, cpu->gpr[19], _pgx1, 4u); } #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, 0x20000u); #endif /* 0xBFC008E4: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC008E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC008E8: 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(0xBFC008E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC008EC: 26314D28 addiu $s1, $s1, 19752 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (19752)); PGXP_ALU(0x26314D28u, cpu->gpr[17], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC008ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC008F0: 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(0xBFC008F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC008F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC008F4: 00131100 sll $v0, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 4u; PGXP_ALU(0x00131100u, cpu->gpr[2], _pgx1, 4u); } #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, 0x80004u); #endif /* 0xBFC008F8: 00531023 subu $v0, $v0, $s3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[19]; PGXP_ALU(0x00531023u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x10000u); #endif /* 0xBFC008FC: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC008FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00900: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC00900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00904: 26104E28 addiu $s0, $s0, 20008 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (20008)); PGXP_ALU(0x26104E28u, cpu->gpr[16], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00908: 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(0xBFC00908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0090Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC0090C: 00131080 sll $v0, $s3, 2 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 2u; PGXP_ALU(0x00131080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x80004u); #endif /* 0xBFC00910: 00531021 addu $v0, $v0, $s3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[19]; PGXP_ALU(0x00531021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x40000u); #endif /* 0xBFC00914: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00918: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0091Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0091C: 26524C88 addiu $s2, $s2, 19592 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19592)); PGXP_ALU(0x26524C88u, cpu->gpr[18], _pgx1, 0x00004C88u); } #ifdef PSX_COSIM cosim_instr(0xBFC0091Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00920: 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(0xBFC00920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00924: 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(0xBFC00924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC00928: 241500B0 addiu $s5, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241500B0u, cpu->gpr[21], _pgx1, 0x000000B0u); } #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, 0x20041u); #endif /* 0xBFC0092C: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0092Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00930: 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(0xBFC00930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200000u); #endif /* 0xBFC00934: 02A0F809 jalr $ra, $s5 */ cpu->gpr[31] = 0xBFC0093Cu; /* jalr link before delay slot */ psx_delay_BFC00934 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC00938: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00938u); #endif if (psx_delay_BFC00934) { psx_delay_BFC00934 = 0; { uint32_t _t = cpu->gpr[21]; cpu->gpr[31] = 0xBFC0093Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0093C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0093Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0093Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0093Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0093C: 104000B3 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC0093C = cpu->gpr[2]; uint32_t psx_brB_BFC0093C = cpu->gpr[0]; psx_taken_BFC0093C = (psx_brA_BFC0093C == psx_brB_BFC0093C); 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; if (psx_taken_BFC0093C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00944u); } 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, 0x80000000u); #endif /* 0xBFC00944: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC0094Cu; /* jal link before delay slot */ psx_delay_BFC00944 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00948: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00948u); #endif if (psx_delay_BFC00944) { psx_delay_BFC00944 = 0; cpu->gpr[31] = 0xBFC0094Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } label_BFC0094C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0094Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0094Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0094Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0094C: 104000AF beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC0094C = cpu->gpr[2]; uint32_t psx_brB_BFC0094C = cpu->gpr[0]; psx_taken_BFC0094C = (psx_brA_BFC0094C == psx_brB_BFC0094C); psx_delay_BFC0094C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00950: 2402004D addiu $v0, $zero, 77 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); PGXP_ALU(0x2402004Du, cpu->gpr[2], _pgx1, 0x0000004Du); } #ifdef PSX_COSIM cosim_instr(0xBFC00950u); #endif if (psx_delay_BFC0094C) { psx_delay_BFC0094C = 0; if (psx_taken_BFC0094C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00954u); } label_BFC00954: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00954u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00954u); #endif /* 0xBFC00954: 92230000 lbu $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x92230000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC00958: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC0095C: 14620005 bne $v1, $v0, 0xBFC00974 */ uint32_t psx_brA_BFC0095C = cpu->gpr[3]; uint32_t psx_brB_BFC0095C = cpu->gpr[2]; psx_taken_BFC0095C = (psx_brA_BFC0095C != psx_brB_BFC0095C); psx_delay_BFC0095C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00960: 24020043 addiu $v0, $zero, 67 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); PGXP_ALU(0x24020043u, cpu->gpr[2], _pgx1, 0x00000043u); } #ifdef PSX_COSIM cosim_instr(0xBFC00960u); #endif if (psx_delay_BFC0095C) { psx_delay_BFC0095C = 0; if (psx_taken_BFC0095C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00974u); goto label_BFC00974; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00964u); } label_BFC00964: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00964u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00964u); #endif /* 0xBFC00964: 92230001 lbu $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x92230001u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC00968: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0096Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0096C: 10620012 beq $v1, $v0, 0xBFC009B8 */ uint32_t psx_brA_BFC0096C = cpu->gpr[3]; uint32_t psx_brB_BFC0096C = cpu->gpr[2]; psx_taken_BFC0096C = (psx_brA_BFC0096C == psx_brB_BFC0096C); psx_delay_BFC0096C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00970: 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(0xBFC00970u); #endif if (psx_delay_BFC0096C) { psx_delay_BFC0096C = 0; if (psx_taken_BFC0096C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC009B8u); goto label_BFC009B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00974u); } label_BFC00974: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00974u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00974: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00978u); #endif /* 0xBFC00978: 8C424BA0 lw $v0, 19360($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00978u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424BA0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0097Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0097C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0097Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00980: 104000A2 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00980 = cpu->gpr[2]; uint32_t psx_brB_BFC00980 = cpu->gpr[0]; psx_taken_BFC00980 = (psx_brA_BFC00980 == psx_brB_BFC00980); psx_delay_BFC00980 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC00984: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00984u); #endif if (psx_delay_BFC00980) { psx_delay_BFC00980 = 0; if (psx_taken_BFC00980) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00988u); } label_BFC00988: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00988u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00988u); #endif /* 0xBFC00988: 8FBF0074 lw $ra, 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, 0xBFC00988u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0098Cu); #endif /* 0xBFC0098C: 8FBE0070 lw $fp, 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, 0xBFC0098Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0070u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC0098Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00990u); #endif /* 0xBFC00990: 8FB7006C lw $s7, 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, 0xBFC00990u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7006Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC00990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00994u); #endif /* 0xBFC00994: 8FB60068 lw $s6, 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, 0xBFC00994u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC00994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00998u); #endif /* 0xBFC00998: 8FB50064 lw $s5, 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, 0xBFC00998u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC00998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0099Cu); #endif /* 0xBFC0099C: 8FB3005C lw $s3, 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, 0xBFC0099Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3005Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC0099Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009A0u); #endif /* 0xBFC009A0: 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, 0xBFC009A0u); 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(0xBFC009A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009A4u); #endif /* 0xBFC009A4: 8FB10054 lw $s1, 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, 0xBFC009A4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC009A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009A8u); #endif /* 0xBFC009A8: 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, 0xBFC009A8u); 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(0xBFC009A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009ACu); #endif /* 0xBFC009AC: 8FB40060 lw $s4, 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, 0xBFC009ACu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC009ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC009B0: 0BF001B2 j 0xBFC006C8 */ psx_delay_BFC009B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC009B4: 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(0xBFC009B4u); #endif if (psx_delay_BFC009B0) { psx_delay_BFC009B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC006C8u); cpu->pc = 0xBFC006C8u; return; } label_BFC009B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC009B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC009B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200000u); #endif /* 0xBFC009B8: 02A0F809 jalr $ra, $s5 */ cpu->gpr[31] = 0xBFC009C0u; /* jalr link before delay slot */ psx_delay_BFC009B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC009BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC009BCu); #endif if (psx_delay_BFC009B8) { psx_delay_BFC009B8 = 0; { uint32_t _t = cpu->gpr[21]; cpu->gpr[31] = 0xBFC009C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC009C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC009C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC009C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC009C0: 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(0xBFC009C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC009C4: 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(0xBFC009C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC009C8: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC009C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200000u); #endif /* 0xBFC009CC: 02A0F809 jalr $ra, $s5 */ cpu->gpr[31] = 0xBFC009D4u; /* jalr link before delay slot */ psx_delay_BFC009CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC009D0: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC009D0u); #endif if (psx_delay_BFC009CC) { psx_delay_BFC009CC = 0; { uint32_t _t = cpu->gpr[21]; cpu->gpr[31] = 0xBFC009D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC009D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC009D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC009D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC009D4: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC009DCu; /* jal link before delay slot */ psx_delay_BFC009D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x810000u); #endif /* 0xBFC009D8: 261701E0 addiu $s7, $s0, 480 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[16] + (480)); PGXP_ALU(0x261701E0u, cpu->gpr[23], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC009D8u); #endif if (psx_delay_BFC009D4) { psx_delay_BFC009D4 = 0; cpu->gpr[31] = 0xBFC009DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } 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, 0x210001u); #endif /* 0xBFC009DC: 0200A825 or $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(0x0200A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC009DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x410001u); #endif /* 0xBFC009E0: 0200B025 or $s6, $s0, $zero */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[16] | cpu->gpr[0]; PGXP_ALU(0x0200B025u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC009E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC009E4: 241E00A0 addiu $fp, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241E00A0u, cpu->gpr[30], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC009E4u); #endif label_BFC009E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC009E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC009E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC009E8: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _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: 0FF01821 jal 0xBFC06084 */ 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, 0x21u); #endif /* 0xBFC009F0: 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(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, 0xBFC06084u); cpu->pc = 0xBFC06084u; 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, 0x400000u); #endif /* 0xBFC009F4: 26D60020 addiu $s6, $s6, 32 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (32)); PGXP_ALU(0x26D60020u, cpu->gpr[22], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC009F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40400000u); #endif /* 0xBFC009F8: AEDEFFE0 sw $fp, -32($s6) */ { uint32_t _pgxa = cpu->gpr[22] + -32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (-32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC009F8u); return; } g_debug_last_store_pc = 0xBFC009F8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAEDEFFE0u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC009F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC009FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC00000u); #endif /* 0xBFC009FC: 16D7FFFA bne $s6, $s7, 0xBFC009E8 */ uint32_t psx_brA_BFC009FC = cpu->gpr[22]; uint32_t psx_brB_BFC009FC = cpu->gpr[23]; psx_taken_BFC009FC = (psx_brA_BFC009FC != psx_brB_BFC009FC); psx_delay_BFC009FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC00A00: AEC0FFE4 sw $zero, -28($s6) */ { uint32_t _pgxa = cpu->gpr[22] + -28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (-28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00A00u); return; } g_debug_last_store_pc = 0xBFC00A00u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEC0FFE4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00A00u); #endif if (psx_delay_BFC009FC) { psx_delay_BFC009FC = 0; if (psx_taken_BFC009FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC009E8u); goto label_BFC009E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A04u); } 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, 0x40010001u); #endif /* 0xBFC00A04: 0200F025 or $fp, $s0, $zero */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[16] | cpu->gpr[0]; PGXP_ALU(0x0200F025u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC00A08: 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(0xBFC00A08u); #endif label_BFC00A0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC00A0C: 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(0xBFC00A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00A10: 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(0xBFC00A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00A14: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #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, 0x20041u); #endif /* 0xBFC00A18: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400021u); #endif /* 0xBFC00A1C: 02C02825 or $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(0x02C02825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000004u); #endif /* 0xBFC00A20: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00A28u; /* jalr link before delay slot */ psx_delay_BFC00A20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC00A24: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A24u); #endif if (psx_delay_BFC00A20) { psx_delay_BFC00A20 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00A28u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00A28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00A28: 10400078 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00A28 = cpu->gpr[2]; 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, 0x1u); #endif /* 0xBFC00A2C: 00000000 nop */ /* nop */ #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, 0xBFC00C0Cu); goto label_BFC00C0C; } #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, 0x80000000u); #endif /* 0xBFC00A30: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC00A38u; /* jal link before delay slot */ psx_delay_BFC00A30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00A34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00A34u); #endif if (psx_delay_BFC00A30) { psx_delay_BFC00A30 = 0; cpu->gpr[31] = 0xBFC00A38u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } 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, 0x5u); #endif /* 0xBFC00A38: 10400074 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00A38 = cpu->gpr[2]; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00A3C: 00000000 nop */ /* nop */ #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, 0xBFC00C0Cu); goto label_BFC00C0C; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00A40: 0FF000F1 jal 0xBFC003C4 */ cpu->gpr[31] = 0xBFC00A48u; /* jal link before delay slot */ psx_delay_BFC00A40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC00A44: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A44u); #endif if (psx_delay_BFC00A40) { psx_delay_BFC00A40 = 0; cpu->gpr[31] = 0xBFC00A48u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003C4u); cpu->pc = 0xBFC003C4u; return; } label_BFC00A48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00A48: 10400070 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00A48 = cpu->gpr[2]; uint32_t psx_brB_BFC00A48 = cpu->gpr[0]; psx_taken_BFC00A48 = (psx_brA_BFC00A48 == psx_brB_BFC00A48); psx_delay_BFC00A48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000011u); #endif /* 0xBFC00A4C: 03C02025 or $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(0x03C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A4Cu); #endif if (psx_delay_BFC00A48) { psx_delay_BFC00A48 = 0; if (psx_taken_BFC00A48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A50u); } label_BFC00A50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC00A50: 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(0xBFC00A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00A54: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC00A5Cu; /* jal link before delay slot */ psx_delay_BFC00A54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC00A58: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A58u); #endif if (psx_delay_BFC00A54) { psx_delay_BFC00A54 = 0; cpu->gpr[31] = 0xBFC00A5Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC00A5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00A5C: 2402000F addiu $v0, $zero, 15 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); PGXP_ALU(0x2402000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC00A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC00A60: 16C2FFEA bne $s6, $v0, 0xBFC00A0C */ uint32_t psx_brA_BFC00A60 = cpu->gpr[22]; uint32_t psx_brB_BFC00A60 = cpu->gpr[2]; psx_taken_BFC00A60 = (psx_brA_BFC00A60 != psx_brB_BFC00A60); psx_delay_BFC00A60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC00A64: 27DE0020 addiu $fp, $fp, 32 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (32)); PGXP_ALU(0x27DE0020u, cpu->gpr[30], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC00A64u); #endif if (psx_delay_BFC00A60) { psx_delay_BFC00A60 = 0; if (psx_taken_BFC00A60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A0Cu); goto label_BFC00A0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A68u); } label_BFC00A68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000800u); #endif /* 0xBFC00A68: 27AB0010 addiu $t3, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27AB0010u, cpu->gpr[11], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC00A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2801u); #endif /* 0xBFC00A6C: 01606825 or $t5, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01606825u, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC00A70: 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(0xBFC00A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC00A74: 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(0xBFC00A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC00A78: 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(0xBFC00A78u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC00A7C: 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, 0xBFC00A7Cu); return; } g_debug_last_store_pc = 0xBFC00A7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xADA00000u, _pgxa, cpu->gpr[0]); } #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, 0x1021u); #endif /* 0xBFC00A80: 01802825 or $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(0x01802825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC00A84: 0FF000FE jal 0xBFC003F8 */ cpu->gpr[31] = 0xBFC00A8Cu; /* jal link before delay slot */ psx_delay_BFC00A84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC00A88: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00A88u); #endif if (psx_delay_BFC00A84) { psx_delay_BFC00A84 = 0; cpu->gpr[31] = 0xBFC00A8Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003F8u); cpu->pc = 0xBFC003F8u; return; } label_BFC00A8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00A8C: 10400002 beq $v0, $zero, 0xBFC00A98 */ uint32_t psx_brA_BFC00A8C = cpu->gpr[2]; uint32_t psx_brB_BFC00A8C = cpu->gpr[0]; psx_taken_BFC00A8C = (psx_brA_BFC00A8C == psx_brB_BFC00A8C); psx_delay_BFC00A8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00A90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00A90u); #endif if (psx_delay_BFC00A8C) { psx_delay_BFC00A8C = 0; if (psx_taken_BFC00A8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A98u); goto label_BFC00A98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00A94u); } label_BFC00A94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA000u); #endif /* 0xBFC00A94: ADAF0000 sw $t7, 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, 0xBFC00A94u); return; } g_debug_last_store_pc = 0xBFC00A94u; cpu->write_word(psx_addr, cpu->gpr[15]); } PGXP_STORE(0xADAF0000u, _pgxa, cpu->gpr[15]); } #ifdef PSX_COSIM cosim_instr(0xBFC00A94u); #endif label_BFC00A98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00A98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC00A98: 258C0001 addiu $t4, $t4, 1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); PGXP_ALU(0x258C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } #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, 0x5000u); #endif /* 0xBFC00A9C: 158EFFF7 bne $t4, $t6, 0xBFC00A7C */ uint32_t psx_brA_BFC00A9C = cpu->gpr[12]; uint32_t psx_brB_BFC00A9C = cpu->gpr[14]; 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, 0x2000u); #endif /* 0xBFC00AA0: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #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, 0xBFC00A7Cu); goto label_BFC00A7C; } #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, 0x808u); #endif /* 0xBFC00AA4: 2563003C addiu $v1, $t3, 60 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[11] + (60)); PGXP_ALU(0x2563003Cu, cpu->gpr[3], _pgx1, 0x0000003Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC00AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x805u); #endif /* 0xBFC00AA8: 01601025 or $v0, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00AA8u); #endif 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, 0x5u); #endif /* 0xBFC00AAC: 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, 0xBFC00AACu); return; } g_debug_last_store_pc = 0xBFC00AACu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00AB0: 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(0xBFC00AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00AB4: 1443FFFD bne $v0, $v1, 0xBFC00AAC */ uint32_t psx_brA_BFC00AB4 = cpu->gpr[2]; uint32_t psx_brB_BFC00AB4 = cpu->gpr[3]; psx_taken_BFC00AB4 = (psx_brA_BFC00AB4 != psx_brB_BFC00AB4); psx_delay_BFC00AB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x841u); #endif /* 0xBFC00AB8: 01603025 or $a2, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01603025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00AB8u); #endif if (psx_delay_BFC00AB4) { psx_delay_BFC00AB4 = 0; if (psx_taken_BFC00AB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AACu); goto label_BFC00AAC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00ABCu); } label_BFC00ABC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00ABCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00ABC: 02002025 or $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(0x02002025u, cpu->gpr[4], _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, 0x101u); #endif /* 0xBFC00AC0: 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(0xBFC00AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00AC4: 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(0xBFC00AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC00AC8: 240AFFFF addiu $t2, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x240AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } #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, 0x1001u); #endif /* 0xBFC00ACC: 240C00A1 addiu $t4, $zero, 161 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); PGXP_ALU(0x240C00A1u, cpu->gpr[12], _pgx1, 0x000000A1u); } #ifdef PSX_COSIM cosim_instr(0xBFC00ACCu); #endif label_BFC00AD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00AD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AD0u); #endif /* 0xBFC00AD0: 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, 0xBFC00AD0u); 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(0xBFC00AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00AD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC00AD8: 10480003 beq $v0, $t0, 0xBFC00AE8 */ uint32_t psx_brA_BFC00AD8 = cpu->gpr[2]; uint32_t psx_brB_BFC00AD8 = cpu->gpr[8]; psx_taken_BFC00AD8 = (psx_brA_BFC00AD8 == psx_brB_BFC00AD8); psx_delay_BFC00AD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00ADC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00ADCu); #endif if (psx_delay_BFC00AD8) { psx_delay_BFC00AD8 = 0; if (psx_taken_BFC00AD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AE8u); goto label_BFC00AE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AE0u); } 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, 0x1004u); #endif /* 0xBFC00AE0: 144C000C bne $v0, $t4, 0xBFC00B14 */ uint32_t psx_brA_BFC00AE0 = cpu->gpr[2]; uint32_t psx_brB_BFC00AE0 = cpu->gpr[12]; 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, 0x1u); #endif /* 0xBFC00AE4: 00000000 nop */ /* nop */ #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, 0xBFC00B14u); goto label_BFC00B14; } #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 /* 0xBFC00AE8: 8C820004 lw $v0, 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, 0xBFC00AE8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AECu); #endif /* 0xBFC00AEC: 84830008 lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00AECu); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x84830008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00AF0: 04410002 bgez $v0, 0xBFC00AFC */ uint32_t psx_brA_BFC00AF0 = cpu->gpr[2]; psx_taken_BFC00AF0 = ((int32_t)psx_brA_BFC00AF0 >= 0); psx_delay_BFC00AF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x240u); #endif /* 0xBFC00AF4: 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, 0xBFC00AF4u); return; } g_debug_last_store_pc = 0xBFC00AF4u; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xACC90000u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0xBFC00AF4u); #endif if (psx_delay_BFC00AF0) { psx_delay_BFC00AF0 = 0; if (psx_taken_BFC00AF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AFCu); goto label_BFC00AFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AF8u); } label_BFC00AF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00AF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00AF8: 24421FFF addiu $v0, $v0, 8191 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8191)); PGXP_ALU(0x24421FFFu, cpu->gpr[2], _pgx1, 0x00001FFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC00AF8u); #endif label_BFC00AFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00AFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00AFC: 00021343 sra $v0, $v0, 13 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 13u); PGXP_ALU(0x00021343u, cpu->gpr[2], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0xBFC00AFCu); #endif label_BFC00B00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00B00: 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(0xBFC00B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00B04: 18400003 blez $v0, 0xBFC00B14 */ uint32_t psx_brA_BFC00B04 = cpu->gpr[2]; psx_taken_BFC00B04 = ((int32_t)psx_brA_BFC00B04 <= 0); 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; if (psx_taken_BFC00B04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B14u); goto label_BFC00B14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B0Cu); } 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, 0x408u); #endif /* 0xBFC00B0C: 146A0037 bne $v1, $t2, 0xBFC00BEC */ uint32_t psx_brA_BFC00B0C = cpu->gpr[3]; uint32_t psx_brB_BFC00B0C = cpu->gpr[10]; psx_taken_BFC00B0C = (psx_brA_BFC00B0C != psx_brB_BFC00B0C); psx_delay_BFC00B0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC00B10: 00032880 sll $a1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] << 2u; PGXP_ALU(0x00032880u, cpu->gpr[5], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC00B10u); #endif if (psx_delay_BFC00B0C) { psx_delay_BFC00B0C = 0; if (psx_taken_BFC00B0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00BECu); goto label_BFC00BEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B14u); } label_BFC00B14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC00B14: 24840020 addiu $a0, $a0, 32 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (32)); PGXP_ALU(0x24840020u, cpu->gpr[4], _pgx1, 0x00000020u); } #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, 0x800010u); #endif /* 0xBFC00B18: 1497FFED bne $a0, $s7, 0xBFC00AD0 */ uint32_t psx_brA_BFC00B18 = cpu->gpr[4]; uint32_t psx_brB_BFC00B18 = cpu->gpr[23]; psx_taken_BFC00B18 = (psx_brA_BFC00B18 != psx_brB_BFC00B18); psx_delay_BFC00B18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC00B1C: 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(0xBFC00B1Cu); #endif if (psx_delay_BFC00B18) { psx_delay_BFC00B18 = 0; if (psx_taken_BFC00B18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00AD0u); goto label_BFC00AD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B20u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00B20: 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(0xBFC00B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00B24: 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(0xBFC00B24u); #endif label_BFC00B28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B28u); #endif /* 0xBFC00B28: 8D640000 lw $a0, 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, 0xBFC00B28u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800u); } PGXP_LOAD(0x8D640000u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC00B2C: 00000000 nop */ /* nop */ #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, 0x11u); #endif /* 0xBFC00B30: 14800004 bne $a0, $zero, 0xBFC00B44 */ uint32_t psx_brA_BFC00B30 = cpu->gpr[4]; uint32_t psx_brB_BFC00B30 = cpu->gpr[0]; psx_taken_BFC00B30 = (psx_brA_BFC00B30 != psx_brB_BFC00B30); psx_delay_BFC00B30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00B34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00B34u); #endif if (psx_delay_BFC00B30) { psx_delay_BFC00B30 = 0; if (psx_taken_BFC00B30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B44u); goto label_BFC00B44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B38u); } label_BFC00B38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC00B38: AEA00004 sw $zero, 4($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B38u); return; } g_debug_last_store_pc = 0xBFC00B38u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEA00004u, _pgxa, cpu->gpr[0]); } #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, 0x200004u); #endif /* 0xBFC00B3C: AEA20000 sw $v0, 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, 0xBFC00B3Cu); return; } g_debug_last_store_pc = 0xBFC00B3Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEA20000u, _pgxa, cpu->gpr[2]); } #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, 0x200008u); #endif /* 0xBFC00B40: A6A30008 sh $v1, 8($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00B40u); return; } g_debug_last_store_pc = 0xBFC00B40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA6A30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00B40u); #endif label_BFC00B44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC00B44: 26B50020 addiu $s5, $s5, 32 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (32)); PGXP_ALU(0x26B50020u, cpu->gpr[21], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC00B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA00000u); #endif /* 0xBFC00B48: 16B7FFF7 bne $s5, $s7, 0xBFC00B28 */ uint32_t psx_brA_BFC00B48 = cpu->gpr[21]; uint32_t psx_brB_BFC00B48 = cpu->gpr[23]; psx_taken_BFC00B48 = (psx_brA_BFC00B48 != psx_brB_BFC00B48); psx_delay_BFC00B48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC00B4C: 256B0004 addiu $t3, $t3, 4 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); PGXP_ALU(0x256B0004u, cpu->gpr[11], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC00B4Cu); #endif if (psx_delay_BFC00B48) { psx_delay_BFC00B48 = 0; if (psx_taken_BFC00B48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B28u); goto label_BFC00B28; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B50u); } label_BFC00B50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x440001u); #endif /* 0xBFC00B50: 0240B025 or $s6, $s2, $zero */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[18] | cpu->gpr[0]; PGXP_ALU(0x0240B025u, cpu->gpr[22], _pgx1, _pgx2); } #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, 0x200001u); #endif /* 0xBFC00B54: 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(0xBFC00B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC00B58: 241E00B0 addiu $fp, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241E00B0u, cpu->gpr[30], _pgx1, 0x000000B0u); } #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, 0x800001u); #endif /* 0xBFC00B5C: 24170024 addiu $s7, $zero, 36 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (36)); PGXP_ALU(0x24170024u, cpu->gpr[23], _pgx1, 0x00000024u); } #ifdef PSX_COSIM cosim_instr(0xBFC00B5Cu); #endif label_BFC00B60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00B60: 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(0xBFC00B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC00B64: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200021u); #endif /* 0xBFC00B68: 02A02825 or $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(0x02A02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0000000u); #endif /* 0xBFC00B6C: 03C0F809 jalr $ra, $fp */ cpu->gpr[31] = 0xBFC00B74u; /* jalr link before delay slot */ psx_delay_BFC00B6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC00B70: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00B70u); #endif if (psx_delay_BFC00B6C) { psx_delay_BFC00B6C = 0; { uint32_t _t = cpu->gpr[30]; cpu->gpr[31] = 0xBFC00B74u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00B74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00B74: 10400025 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00B74 = cpu->gpr[2]; uint32_t psx_brB_BFC00B74 = cpu->gpr[0]; psx_taken_BFC00B74 = (psx_brA_BFC00B74 == psx_brB_BFC00B74); psx_delay_BFC00B74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00B78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00B78u); #endif if (psx_delay_BFC00B74) { psx_delay_BFC00B74 = 0; if (psx_taken_BFC00B74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B7Cu); } 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, 0x80000000u); #endif /* 0xBFC00B7C: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC00B84u; /* jal link before delay slot */ psx_delay_BFC00B7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00B80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00B80u); #endif if (psx_delay_BFC00B7C) { psx_delay_BFC00B7C = 0; cpu->gpr[31] = 0xBFC00B84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } label_BFC00B84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00B84: 10400021 beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00B84 = cpu->gpr[2]; uint32_t psx_brB_BFC00B84 = cpu->gpr[0]; psx_taken_BFC00B84 = (psx_brA_BFC00B84 == psx_brB_BFC00B84); psx_delay_BFC00B84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00B88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00B88u); #endif if (psx_delay_BFC00B84) { psx_delay_BFC00B84 = 0; if (psx_taken_BFC00B84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B8Cu); } label_BFC00B8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00B8C: 0FF000F1 jal 0xBFC003C4 */ cpu->gpr[31] = 0xBFC00B94u; /* jal link before delay slot */ psx_delay_BFC00B8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC00B90: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00B90u); #endif if (psx_delay_BFC00B8C) { psx_delay_BFC00B8C = 0; cpu->gpr[31] = 0xBFC00B94u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003C4u); cpu->pc = 0xBFC003C4u; return; } label_BFC00B94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00B94: 1040001D beq $v0, $zero, 0xBFC00C0C */ uint32_t psx_brA_BFC00B94 = cpu->gpr[2]; uint32_t psx_brB_BFC00B94 = cpu->gpr[0]; psx_taken_BFC00B94 = (psx_brA_BFC00B94 == psx_brB_BFC00B94); psx_delay_BFC00B94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC00B98: 00409825 or $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(0x00409825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00B98u); #endif if (psx_delay_BFC00B94) { psx_delay_BFC00B94 = 0; if (psx_taken_BFC00B94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C0Cu); goto label_BFC00C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B9Cu); } label_BFC00B9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00B9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC00B9C: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x41u); #endif /* 0xBFC00BA0: 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(0xBFC00BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC00BA4: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00BA8: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC00BB0u; /* jal link before delay slot */ psx_delay_BFC00BA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC00BAC: 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(0xBFC00BACu); #endif if (psx_delay_BFC00BA8) { psx_delay_BFC00BA8 = 0; cpu->gpr[31] = 0xBFC00BB0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC00BB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00BB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA00000u); #endif /* 0xBFC00BB0: 16B7FFEB bne $s5, $s7, 0xBFC00B60 */ uint32_t psx_brA_BFC00BB0 = cpu->gpr[21]; uint32_t psx_brB_BFC00BB0 = cpu->gpr[23]; psx_taken_BFC00BB0 = (psx_brA_BFC00BB0 != psx_brB_BFC00BB0); psx_delay_BFC00BB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC00BB4: 26D60004 addiu $s6, $s6, 4 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (4)); PGXP_ALU(0x26D60004u, cpu->gpr[22], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC00BB4u); #endif if (psx_delay_BFC00BB0) { psx_delay_BFC00BB0 = 0; if (psx_taken_BFC00BB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00B60u); goto label_BFC00B60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00BB8u); } label_BFC00BB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00BB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BB8u); #endif /* 0xBFC00BB8: 8FBF0074 lw $ra, 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, 0xBFC00BB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BBCu); #endif /* 0xBFC00BBC: 8FBE0070 lw $fp, 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, 0xBFC00BBCu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0070u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BC0u); #endif /* 0xBFC00BC0: 8FB7006C lw $s7, 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, 0xBFC00BC0u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7006Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BC4u); #endif /* 0xBFC00BC4: 8FB60068 lw $s6, 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, 0xBFC00BC4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BC8u); #endif /* 0xBFC00BC8: 8FB50064 lw $s5, 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, 0xBFC00BC8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BCCu); #endif /* 0xBFC00BCC: 8FB40060 lw $s4, 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, 0xBFC00BCCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BD0u); #endif /* 0xBFC00BD0: 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, 0xBFC00BD0u); 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(0xBFC00BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BD4u); #endif /* 0xBFC00BD4: 8FB10054 lw $s1, 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, 0xBFC00BD4u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC00BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BD8u); #endif /* 0xBFC00BD8: 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, 0xBFC00BD8u); 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(0xBFC00BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC00BDC: 02601025 or $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(0x02601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BE0u); #endif /* 0xBFC00BE0: 8FB3005C lw $s3, 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, 0xBFC00BE0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3005Cu, _pgxa, cpu->gpr[19]); } #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, 0x80000001u); #endif /* 0xBFC00BE4: 03E00008 jr $ra */ psx_delay_BFC00BE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00BE8: 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(0xBFC00BE8u); #endif if (psx_delay_BFC00BE4) { psx_delay_BFC00BE4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC00BEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00BECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820u); #endif /* 0xBFC00BEC: 01652821 addu $a1, $t3, $a1 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[11] + cpu->gpr[5]; PGXP_ALU(0x01652821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BF0u); #endif /* 0xBFC00BF0: 8CA70000 lw $a3, 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, 0xBFC00BF0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70000u, _pgxa, cpu->gpr[7]); } #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, 0x8u); #endif /* 0xBFC00BF4: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #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, 0x80u); #endif /* 0xBFC00BF8: 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(0xBFC00BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC00BFC: 02031821 addu $v1, $s0, $v1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[16] + cpu->gpr[3]; PGXP_ALU(0x02031821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C00u); #endif /* 0xBFC00C00: 84630008 lh $v1, 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, 0xBFC00C00u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x84630008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00C04: 1000FFBE beq $zero, $zero, 0xBFC00B00 */ uint32_t psx_brA_BFC00C04 = cpu->gpr[0]; uint32_t psx_brB_BFC00C04 = cpu->gpr[0]; psx_taken_BFC00C04 = (psx_brA_BFC00C04 == psx_brB_BFC00C04); psx_delay_BFC00C04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC00C08: ACA70000 sw $a3, 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, 0xBFC00C08u); return; } g_debug_last_store_pc = 0xBFC00C08u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACA70000u, _pgxa, cpu->gpr[7]); } #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, 0xBFC00B00u); goto label_BFC00B00; } #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, 0x30000u); #endif /* 0xBFC00C0C: 261101E0 addiu $s1, $s0, 480 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (480)); PGXP_ALU(0x261101E0u, cpu->gpr[17], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00C10: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00C10u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00C14: 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(0xBFC00C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00C18: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC00C20u; /* jal link before delay slot */ psx_delay_BFC00C18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00C1C: 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(0xBFC00C1Cu); #endif if (psx_delay_BFC00C18) { psx_delay_BFC00C18 = 0; cpu->gpr[31] = 0xBFC00C20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC00C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00C20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC00C20: 1611FFFC bne $s0, $s1, 0xBFC00C14 */ uint32_t psx_brA_BFC00C20 = cpu->gpr[16]; uint32_t psx_brB_BFC00C20 = cpu->gpr[17]; psx_taken_BFC00C20 = (psx_brA_BFC00C20 != psx_brB_BFC00C20); psx_delay_BFC00C20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00C24: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00C24u); #endif if (psx_delay_BFC00C20) { psx_delay_BFC00C20 = 0; if (psx_taken_BFC00C20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C14u); goto label_BFC00C14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C28u); } label_BFC00C28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00C28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00C28: 26420050 addiu $v0, $s2, 80 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[18] + (80)); PGXP_ALU(0x26420050u, cpu->gpr[2], _pgx1, 0x00000050u); } #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, 0x9u); #endif /* 0xBFC00C2C: 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(0xBFC00C2Cu); #endif label_BFC00C30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00C30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC00C30: AE430000 sw $v1, 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, 0xBFC00C30u); return; } g_debug_last_store_pc = 0xBFC00C30u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC00C34: 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(0xBFC00C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00C38: 1642FFFD bne $s2, $v0, 0xBFC00C30 */ uint32_t psx_brA_BFC00C38 = cpu->gpr[18]; uint32_t psx_brB_BFC00C38 = cpu->gpr[2]; psx_taken_BFC00C38 = (psx_brA_BFC00C38 != psx_brB_BFC00C38); psx_delay_BFC00C38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC00C3C: 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(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, 0xBFC00C30u); goto label_BFC00C30; } #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, 0x1u); #endif /* 0xBFC00C40: 1000FFDD beq $zero, $zero, 0xBFC00BB8 */ uint32_t psx_brA_BFC00C40 = cpu->gpr[0]; uint32_t psx_brB_BFC00C40 = cpu->gpr[0]; psx_taken_BFC00C40 = (psx_brA_BFC00C40 == psx_brB_BFC00C40); psx_delay_BFC00C40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00C44: 00000000 nop */ /* nop */ #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, 0xBFC00BB8u); goto label_BFC00BB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C48u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C48u); cpu->pc = 0xBFC00C48u; return; /* fallthrough */ } void OpenBIOS_func_1FC00C48(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00C48u); int psx_delay_BFC00C80 = 0; int psx_delay_BFC00C98 = 0; int psx_delay_BFC00CA4 = 0; int psx_delay_BFC00CC4 = 0; int psx_taken_BFC00CC4 = 0; int psx_delay_BFC00CCC = 0; int psx_delay_BFC00CD4 = 0; int psx_delay_BFC00CF4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00C88u: goto label_BFC00C88; case 0xBFC00C94u: goto label_BFC00C94; case 0xBFC00CA0u: goto label_BFC00CA0; case 0xBFC00CACu: goto label_BFC00CAC; case 0xBFC00CCCu: goto label_BFC00CCC; case 0xBFC00CD4u: goto label_BFC00CD4; case 0xBFC00CDCu: goto label_BFC00CDC; default: break; } } 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, 0x20000000u); #endif /* 0xBFC00C48: 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(0xBFC00C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00C4C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00C50: 24434BA4 addiu $v1, $v0, 19364 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (19364)); PGXP_ALU(0x24434BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #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, 0x20020000u); #endif /* 0xBFC00C54: 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, 0xBFC00C54u); return; } g_debug_last_store_pc = 0xBFC00C54u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC00C58: 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, 0xBFC00C58u); return; } g_debug_last_store_pc = 0xBFC00C58u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #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, 0x5u); #endif /* 0xBFC00C5C: AC404BA4 sw $zero, 19364($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19364; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19364)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C5Cu); return; } g_debug_last_store_pc = 0xBFC00C5Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404BA4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00C60: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #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, 0x4u); #endif /* 0xBFC00C64: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x20000u); #endif /* 0xBFC00C68: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #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, 0x20080000u); #endif /* 0xBFC00C6C: 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, 0xBFC00C6Cu); return; } g_debug_last_store_pc = 0xBFC00C6Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC00C70: 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, 0xBFC00C70u); return; } g_debug_last_store_pc = 0xBFC00C70u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00C74: 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, 0xBFC00C74u); return; } g_debug_last_store_pc = 0xBFC00C74u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00C78: 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, 0xBFC00C78u); return; } g_debug_last_store_pc = 0xBFC00C78u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00C7C: AC404BA0 sw $zero, 19360($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19360; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00C7Cu); return; } g_debug_last_store_pc = 0xBFC00C7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404BA0u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00C80: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC00C88u; /* jal link before delay slot */ psx_delay_BFC00C80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00C84: 26104E28 addiu $s0, $s0, 20008 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (20008)); PGXP_ALU(0x26104E28u, cpu->gpr[16], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00C84u); #endif if (psx_delay_BFC00C80) { psx_delay_BFC00C80 = 0; cpu->gpr[31] = 0xBFC00C88u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC00C88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00C88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC00C88: 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(0xBFC00C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC00C8C: 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(0xBFC00C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC00C90: 26315008 addiu $s1, $s1, 20488 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (20488)); PGXP_ALU(0x26315008u, cpu->gpr[17], _pgx1, 0x00005008u); } #ifdef PSX_COSIM cosim_instr(0xBFC00C90u); #endif label_BFC00C94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00C94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00C94: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC00C98: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC00CA0u; /* jal link before delay slot */ psx_delay_BFC00C98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00C9C: 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(0xBFC00C9Cu); #endif if (psx_delay_BFC00C98) { psx_delay_BFC00C98 = 0; cpu->gpr[31] = 0xBFC00CA0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC00CA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC00CA0: 260401E0 addiu $a0, $s0, 480 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (480)); PGXP_ALU(0x260401E0u, cpu->gpr[4], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00CA4: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC00CACu; /* jal link before delay slot */ psx_delay_BFC00CA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00CA8: 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(0xBFC00CA8u); #endif if (psx_delay_BFC00CA4) { psx_delay_BFC00CA4 = 0; cpu->gpr[31] = 0xBFC00CACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC00CAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00CAC: 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(0xBFC00CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90000u); #endif /* 0xBFC00CB0: AE1301C0 sw $s3, 448($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00CB0u); return; } g_debug_last_store_pc = 0xBFC00CB0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAE1301C0u, _pgxa, cpu->gpr[19]); } #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, 0x90000u); #endif /* 0xBFC00CB4: AE13FFE0 sw $s3, -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, 0xBFC00CB4u); return; } g_debug_last_store_pc = 0xBFC00CB4u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAE13FFE0u, _pgxa, cpu->gpr[19]); } #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, 0x50000u); #endif /* 0xBFC00CB8: A61201C8 sh $s2, 456($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (456)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00CB8u); return; } g_debug_last_store_pc = 0xBFC00CB8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } PGXP_STORE(0xA61201C8u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC00CBC: A612FFE8 sh $s2, -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, 0xBFC00CBCu); return; } g_debug_last_store_pc = 0xBFC00CBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[18] & 0xFFFFu)); } PGXP_STORE(0xA612FFE8u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC00CC0: AE0001C4 sw $zero, 452($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00CC0u); return; } g_debug_last_store_pc = 0xBFC00CC0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE0001C4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC00CC4: 1611FFF3 bne $s0, $s1, 0xBFC00C94 */ uint32_t psx_brA_BFC00CC4 = cpu->gpr[16]; uint32_t psx_brB_BFC00CC4 = cpu->gpr[17]; psx_taken_BFC00CC4 = (psx_brA_BFC00CC4 != psx_brB_BFC00CC4); psx_delay_BFC00CC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC00CC8: AE00FFE4 sw $zero, -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, 0xBFC00CC8u); return; } g_debug_last_store_pc = 0xBFC00CC8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE00FFE4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00CC8u); #endif if (psx_delay_BFC00CC4) { psx_delay_BFC00CC4 = 0; if (psx_taken_BFC00CC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00C94u); goto label_BFC00C94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00CCCu); } label_BFC00CCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00CCC: 0FF00225 jal 0xBFC00894 */ cpu->gpr[31] = 0xBFC00CD4u; /* jal link before delay slot */ psx_delay_BFC00CCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC00CD0: 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(0xBFC00CD0u); #endif if (psx_delay_BFC00CCC) { psx_delay_BFC00CCC = 0; cpu->gpr[31] = 0xBFC00CD4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00894u); cpu->pc = 0xBFC00894u; return; } label_BFC00CD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00CD4: 0FF00225 jal 0xBFC00894 */ cpu->gpr[31] = 0xBFC00CDCu; /* jal link before delay slot */ psx_delay_BFC00CD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC00CD8: 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(0xBFC00CD8u); #endif if (psx_delay_BFC00CD4) { psx_delay_BFC00CD4 = 0; cpu->gpr[31] = 0xBFC00CDCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00894u); cpu->pc = 0xBFC00894u; return; } label_BFC00CDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CDCu); #endif /* 0xBFC00CDC: 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, 0xBFC00CDCu); 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(0xBFC00CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CE0u); #endif /* 0xBFC00CE0: 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, 0xBFC00CE0u); 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(0xBFC00CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CE4u); #endif /* 0xBFC00CE4: 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, 0xBFC00CE4u); 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(0xBFC00CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CE8u); #endif /* 0xBFC00CE8: 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, 0xBFC00CE8u); 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(0xBFC00CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CECu); #endif /* 0xBFC00CEC: 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, 0xBFC00CECu); 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(0xBFC00CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00CF0: 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(0xBFC00CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00CF4: 03E00008 jr $ra */ psx_delay_BFC00CF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00CF8: 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(0xBFC00CF8u); #endif if (psx_delay_BFC00CF4) { psx_delay_BFC00CF4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC00CFC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00CFCu); int psx_delay_BFC00D08 = 0; int psx_taken_BFC00D08 = 0; int psx_delay_BFC00D38 = 0; int psx_delay_BFC00D40 = 0; int psx_taken_BFC00D40 = 0; int psx_delay_BFC00D58 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00D10u: goto label_BFC00D10; case 0xBFC00D14u: goto label_BFC00D14; case 0xBFC00D40u: goto label_BFC00D40; case 0xBFC00D48u: goto label_BFC00D48; case 0xBFC00D4Cu: goto label_BFC00D4C; default: break; } } label_BFC00CFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00CFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00CFC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC00CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC00D00: 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, 0xBFC00D00u); return; } g_debug_last_store_pc = 0xBFC00D00u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00D04: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00D04u); return; } g_debug_last_store_pc = 0xBFC00D04u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC00D08: 04800002 bltz $a0, 0xBFC00D14 */ uint32_t psx_brA_BFC00D08 = cpu->gpr[4]; psx_taken_BFC00D08 = ((int32_t)psx_brA_BFC00D08 < 0); psx_delay_BFC00D08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC00D0C: 2490000F addiu $s0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2490000Fu, cpu->gpr[16], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC00D0Cu); #endif if (psx_delay_BFC00D08) { psx_delay_BFC00D08 = 0; if (psx_taken_BFC00D08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D14u); goto label_BFC00D14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D10u); } label_BFC00D10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00D10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00D10: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00D10u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC00D14: 00108103 sra $s0, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 4u); PGXP_ALU(0x00108103u, cpu->gpr[16], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00D18: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC00D1C: 24424BA4 addiu $v0, $v0, 19364 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19364)); PGXP_ALU(0x24424BA4u, cpu->gpr[2], _pgx1, 0x00004BA4u); } #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, 0x10000u); #endif /* 0xBFC00D20: 00108080 sll $s0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 2u; PGXP_ALU(0x00108080u, cpu->gpr[16], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC00D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00D24: 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(0xBFC00D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00D28: 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(0xBFC00D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00D2C: AE020000 sw $v0, 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, 0xBFC00D2Cu); return; } g_debug_last_store_pc = 0xBFC00D2Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020000u, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC00D30: 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(0xBFC00D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00D34: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00D38: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00D40u; /* jalr link before delay slot */ psx_delay_BFC00D38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00D3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00D3Cu); #endif if (psx_delay_BFC00D38) { psx_delay_BFC00D38 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00D40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00D40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00D40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00D40: 14400002 bne $v0, $zero, 0xBFC00D4C */ uint32_t psx_brA_BFC00D40 = cpu->gpr[2]; uint32_t psx_brB_BFC00D40 = cpu->gpr[0]; psx_taken_BFC00D40 = (psx_brA_BFC00D40 != psx_brB_BFC00D40); psx_delay_BFC00D40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00D44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00D44u); #endif if (psx_delay_BFC00D40) { psx_delay_BFC00D40 = 0; if (psx_taken_BFC00D40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D4Cu); goto label_BFC00D4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D48u); } 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, 0x10001u); #endif /* 0xBFC00D48: 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, 0xBFC00D48u); return; } g_debug_last_store_pc = 0xBFC00D48u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D48u); #endif label_BFC00D4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00D4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D4Cu); #endif /* 0xBFC00D4C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D50u); #endif /* 0xBFC00D50: 8FB00010 lw $s0, 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, 0xBFC00D50u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x5u); #endif /* 0xBFC00D54: 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(0xBFC00D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00D58: 03E00008 jr $ra */ psx_delay_BFC00D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00D5C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC00D5Cu); #endif if (psx_delay_BFC00D58) { psx_delay_BFC00D58 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC00D60(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00D60u); int psx_delay_BFC00D98 = 0; int psx_taken_BFC00D98 = 0; int psx_delay_BFC00DE8 = 0; int psx_delay_BFC00DF0 = 0; int psx_taken_BFC00DF0 = 0; int psx_delay_BFC00DFC = 0; int psx_delay_BFC00E04 = 0; int psx_delay_BFC00E18 = 0; int psx_delay_BFC00E20 = 0; int psx_taken_BFC00E20 = 0; int psx_delay_BFC00E28 = 0; int psx_delay_BFC00E30 = 0; int psx_taken_BFC00E30 = 0; int psx_delay_BFC00E3C = 0; int psx_delay_BFC00E44 = 0; int psx_taken_BFC00E44 = 0; int psx_delay_BFC00E4C = 0; int psx_delay_BFC00E54 = 0; int psx_taken_BFC00E54 = 0; int psx_delay_BFC00E5C = 0; int psx_delay_BFC00E64 = 0; int psx_taken_BFC00E64 = 0; int psx_delay_BFC00E90 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00DA0u: goto label_BFC00DA0; case 0xBFC00DA4u: goto label_BFC00DA4; case 0xBFC00DDCu: goto label_BFC00DDC; case 0xBFC00DF0u: goto label_BFC00DF0; case 0xBFC00DF8u: goto label_BFC00DF8; case 0xBFC00E04u: goto label_BFC00E04; case 0xBFC00E0Cu: goto label_BFC00E0C; case 0xBFC00E20u: goto label_BFC00E20; case 0xBFC00E28u: goto label_BFC00E28; case 0xBFC00E30u: goto label_BFC00E30; case 0xBFC00E38u: goto label_BFC00E38; case 0xBFC00E44u: goto label_BFC00E44; case 0xBFC00E4Cu: goto label_BFC00E4C; case 0xBFC00E54u: goto label_BFC00E54; case 0xBFC00E5Cu: goto label_BFC00E5C; case 0xBFC00E64u: goto label_BFC00E64; case 0xBFC00E6Cu: goto label_BFC00E6C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC00D60: 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(0xBFC00D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC00D64: 2482000F addiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2482000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC00D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC00D68: 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, 0xBFC00D68u); return; } g_debug_last_store_pc = 0xBFC00D68u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC00D6C: 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, 0xBFC00D6Cu); return; } g_debug_last_store_pc = 0xBFC00D6Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } #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, 0x20010000u); #endif /* 0xBFC00D70: 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, 0xBFC00D70u); return; } g_debug_last_store_pc = 0xBFC00D70u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00D74: 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, 0xBFC00D74u); return; } g_debug_last_store_pc = 0xBFC00D74u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC00D78: 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, 0xBFC00D78u); return; } g_debug_last_store_pc = 0xBFC00D78u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC00D7C: 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, 0xBFC00D7Cu); return; } g_debug_last_store_pc = 0xBFC00D7Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } #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, 0x20080000u); #endif /* 0xBFC00D80: 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, 0xBFC00D80u); return; } g_debug_last_store_pc = 0xBFC00D80u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC00D84: 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, 0xBFC00D84u); return; } g_debug_last_store_pc = 0xBFC00D84u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC00D88: 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, 0xBFC00D88u); return; } g_debug_last_store_pc = 0xBFC00D88u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00D8C: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC00D90: 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, 0xBFC00D90u); return; } g_debug_last_store_pc = 0xBFC00D90u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC00D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100041u); #endif /* 0xBFC00D94: 00C0A025 or $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(0x00C0A025u, cpu->gpr[20], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC00D98: 04800002 bltz $a0, 0xBFC00DA4 */ uint32_t psx_brA_BFC00D98 = cpu->gpr[4]; psx_taken_BFC00D98 = ((int32_t)psx_brA_BFC00D98 < 0); psx_delay_BFC00D98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200081u); #endif /* 0xBFC00D9C: 00E0A825 or $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(0x00E0A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00D9Cu); #endif if (psx_delay_BFC00D98) { psx_delay_BFC00D98 = 0; if (psx_taken_BFC00D98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00DA4u); goto label_BFC00DA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00DA0u); } 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, 0x15u); #endif /* 0xBFC00DA0: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00DA0u); #endif label_BFC00DA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00DA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00DA4: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #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, 0x40000u); #endif /* 0xBFC00DA8: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #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, 0xCu); #endif /* 0xBFC00DAC: 000219C0 sll $v1, $v0, 7 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 7u; PGXP_ALU(0x000219C0u, cpu->gpr[3], _pgx1, 7u); } #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, 0x40000u); #endif /* 0xBFC00DB0: 26524D28 addiu $s2, $s2, 19752 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19752)); PGXP_ALU(0x26524D28u, cpu->gpr[18], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC00DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC00DB4: 02439021 addu $s2, $s2, $v1 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[3]; PGXP_ALU(0x02439021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00DB8: 00021900 sll $v1, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00DBC: 00621023 subu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[2]; PGXP_ALU(0x00621023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC00DC0: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #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, 0x4u); #endif /* 0xBFC00DC4: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #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, 0x20000u); #endif /* 0xBFC00DC8: 26314E28 addiu $s1, $s1, 20008 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (20008)); PGXP_ALU(0x26314E28u, cpu->gpr[17], _pgx1, 0x00004E28u); } #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, 0x20004u); #endif /* 0xBFC00DCC: 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(0xBFC00DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC00DD0: 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(0xBFC00DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC00DD4: 241700B0 addiu $s7, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241700B0u, cpu->gpr[23], _pgx1, 0x000000B0u); } #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, 0x400001u); #endif /* 0xBFC00DD8: 2416000F addiu $s6, $zero, 15 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); PGXP_ALU(0x2416000Fu, cpu->gpr[22], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC00DD8u); #endif label_BFC00DDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00DDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC00DDC: 00131080 sll $v0, $s3, 2 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[19] << 2u; PGXP_ALU(0x00131080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x200004u); #endif /* 0xBFC00DE0: 02A21021 addu $v0, $s5, $v0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[2]; PGXP_ALU(0x02A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DE4u); #endif /* 0xBFC00DE4: 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, 0xBFC00DE4u); 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(0xBFC00DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80100000u); #endif /* 0xBFC00DE8: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC00DF0u; /* jalr link before delay slot */ psx_delay_BFC00DE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC00DEC: 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(0xBFC00DECu); #endif if (psx_delay_BFC00DE8) { psx_delay_BFC00DE8 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC00DF0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00DF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00DF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00DF0: 14400014 bne $v0, $zero, 0xBFC00E44 */ uint32_t psx_brA_BFC00DF0 = cpu->gpr[2]; uint32_t psx_brB_BFC00DF0 = cpu->gpr[0]; psx_taken_BFC00DF0 = (psx_brA_BFC00DF0 != psx_brB_BFC00DF0); psx_delay_BFC00DF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC00DF4: 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(0xBFC00DF4u); #endif if (psx_delay_BFC00DF0) { psx_delay_BFC00DF0 = 0; if (psx_taken_BFC00DF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E44u); goto label_BFC00E44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00DF8u); } label_BFC00DF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00DF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC00DF8: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC00DFC: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC00E04u; /* jal link before delay slot */ psx_delay_BFC00DFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC00E00: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00E00u); #endif if (psx_delay_BFC00DFC) { psx_delay_BFC00DFC = 0; cpu->gpr[31] = 0xBFC00E04u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC00E04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00E04: 0FF000E7 jal 0xBFC0039C */ cpu->gpr[31] = 0xBFC00E0Cu; /* jal link before delay slot */ psx_delay_BFC00E04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC00E08: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00E08u); #endif if (psx_delay_BFC00E04) { psx_delay_BFC00E04 = 0; cpu->gpr[31] = 0xBFC00E0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0039Cu); cpu->pc = 0xBFC0039Cu; return; } label_BFC00E0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00E0C: 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(0xBFC00E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC00E10: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x80021u); #endif /* 0xBFC00E14: 02602825 or $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(0x02602825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80800000u); #endif /* 0xBFC00E18: 02E0F809 jalr $ra, $s7 */ cpu->gpr[31] = 0xBFC00E20u; /* jalr link before delay slot */ psx_delay_BFC00E18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00E1C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00E1Cu); #endif if (psx_delay_BFC00E18) { psx_delay_BFC00E18 = 0; { uint32_t _t = cpu->gpr[23]; cpu->gpr[31] = 0xBFC00E20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00E20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00E20: 10400005 beq $v0, $zero, 0xBFC00E38 */ uint32_t psx_brA_BFC00E20 = cpu->gpr[2]; uint32_t psx_brB_BFC00E20 = cpu->gpr[0]; psx_taken_BFC00E20 = (psx_brA_BFC00E20 == psx_brB_BFC00E20); psx_delay_BFC00E20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00E24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00E24u); #endif if (psx_delay_BFC00E20) { psx_delay_BFC00E20 = 0; if (psx_taken_BFC00E20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E38u); goto label_BFC00E38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E28u); } label_BFC00E28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00E28: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC00E30u; /* jal link before delay slot */ psx_delay_BFC00E28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00E2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00E2Cu); #endif if (psx_delay_BFC00E28) { psx_delay_BFC00E28 = 0; cpu->gpr[31] = 0xBFC00E30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } label_BFC00E30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00E30: 14400004 bne $v0, $zero, 0xBFC00E44 */ uint32_t psx_brA_BFC00E30 = cpu->gpr[2]; uint32_t psx_brB_BFC00E30 = cpu->gpr[0]; psx_taken_BFC00E30 = (psx_brA_BFC00E30 != psx_brB_BFC00E30); psx_delay_BFC00E30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00E34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00E34u); #endif if (psx_delay_BFC00E30) { psx_delay_BFC00E30 = 0; if (psx_taken_BFC00E30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E44u); goto label_BFC00E44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E38u); } label_BFC00E38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E38u); #endif /* 0xBFC00E38: 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, 0xBFC00E38u); 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(0xBFC00E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00E3C: 0FF019BB jal 0xBFC066EC */ cpu->gpr[31] = 0xBFC00E44u; /* jal link before delay slot */ psx_delay_BFC00E3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00E40: 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(0xBFC00E40u); #endif if (psx_delay_BFC00E3C) { psx_delay_BFC00E3C = 0; cpu->gpr[31] = 0xBFC00E44u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066ECu); cpu->pc = 0xBFC066ECu; return; } label_BFC00E44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480000u); #endif /* 0xBFC00E44: 1676FFE5 bne $s3, $s6, 0xBFC00DDC */ uint32_t psx_brA_BFC00E44 = cpu->gpr[19]; uint32_t psx_brB_BFC00E44 = cpu->gpr[22]; psx_taken_BFC00E44 = (psx_brA_BFC00E44 != psx_brB_BFC00E44); psx_delay_BFC00E44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC00E48: 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(0xBFC00E48u); #endif if (psx_delay_BFC00E44) { psx_delay_BFC00E44 = 0; if (psx_taken_BFC00E44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00DDCu); goto label_BFC00DDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E4Cu); } label_BFC00E4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00E4C: 0FF0033F jal 0xBFC00CFC */ cpu->gpr[31] = 0xBFC00E54u; /* jal link before delay slot */ psx_delay_BFC00E4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00E50: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00E50u); #endif if (psx_delay_BFC00E4C) { psx_delay_BFC00E4C = 0; cpu->gpr[31] = 0xBFC00E54u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00CFCu); cpu->pc = 0xBFC00CFCu; return; } label_BFC00E54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00E54: 1040FFF8 beq $v0, $zero, 0xBFC00E38 */ uint32_t psx_brA_BFC00E54 = cpu->gpr[2]; uint32_t psx_brB_BFC00E54 = cpu->gpr[0]; psx_taken_BFC00E54 = (psx_brA_BFC00E54 == psx_brB_BFC00E54); psx_delay_BFC00E54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00E58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00E58u); #endif if (psx_delay_BFC00E54) { psx_delay_BFC00E54 = 0; if (psx_taken_BFC00E54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E38u); goto label_BFC00E38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E5Cu); } 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, 0x80000000u); #endif /* 0xBFC00E5C: 0FF01D81 jal 0xBFC07604 */ cpu->gpr[31] = 0xBFC00E64u; /* jal link before delay slot */ psx_delay_BFC00E5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00E60: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00E60u); #endif if (psx_delay_BFC00E5C) { psx_delay_BFC00E5C = 0; cpu->gpr[31] = 0xBFC00E64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07604u); cpu->pc = 0xBFC07604u; return; } 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, 0x5u); #endif /* 0xBFC00E64: 1040FFF4 beq $v0, $zero, 0xBFC00E38 */ uint32_t psx_brA_BFC00E64 = cpu->gpr[2]; uint32_t psx_brB_BFC00E64 = cpu->gpr[0]; psx_taken_BFC00E64 = (psx_brA_BFC00E64 == psx_brB_BFC00E64); 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; if (psx_taken_BFC00E64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E38u); goto label_BFC00E38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E6Cu); } 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 /* 0xBFC00E6C: 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, 0xBFC00E6Cu); 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(0xBFC00E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E70u); #endif /* 0xBFC00E70: 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, 0xBFC00E70u); 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(0xBFC00E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E74u); #endif /* 0xBFC00E74: 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, 0xBFC00E74u); 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(0xBFC00E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E78u); #endif /* 0xBFC00E78: 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, 0xBFC00E78u); 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(0xBFC00E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E7Cu); #endif /* 0xBFC00E7C: 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, 0xBFC00E7Cu); 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(0xBFC00E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E80u); #endif /* 0xBFC00E80: 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, 0xBFC00E80u); 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(0xBFC00E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E84u); #endif /* 0xBFC00E84: 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, 0xBFC00E84u); 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(0xBFC00E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E88u); #endif /* 0xBFC00E88: 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, 0xBFC00E88u); 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(0xBFC00E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E8Cu); #endif /* 0xBFC00E8C: 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, 0xBFC00E8Cu); 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(0xBFC00E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC00E90: 03E00008 jr $ra */ psx_delay_BFC00E90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC00E94: 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(0xBFC00E94u); #endif if (psx_delay_BFC00E90) { psx_delay_BFC00E90 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC00E98(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00E98u); int psx_delay_BFC00ED8 = 0; label_BFC00E98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00E98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00E98: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x10u); #endif /* 0xBFC00E9C: 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(0xBFC00E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00EA0: 24424BA4 addiu $v0, $v0, 19364 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19364)); PGXP_ALU(0x24424BA4u, cpu->gpr[2], _pgx1, 0x00004BA4u); } #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, 0x14u); #endif /* 0xBFC00EA4: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00EA8: 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, 0xBFC00EA8u); return; } g_debug_last_store_pc = 0xBFC00EA8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #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, 0x4u); #endif /* 0xBFC00EAC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC00EB0: 24424C80 addiu $v0, $v0, 19584 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19584)); PGXP_ALU(0x24424C80u, cpu->gpr[2], _pgx1, 0x00004C80u); } #ifdef PSX_COSIM cosim_instr(0xBFC00EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC00EB4: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00EB8: 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, 0xBFC00EB8u); return; } g_debug_last_store_pc = 0xBFC00EB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00EBC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00EC0: 24424C78 addiu $v0, $v0, 19576 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19576)); PGXP_ALU(0x24424C78u, cpu->gpr[2], _pgx1, 0x00004C78u); } #ifdef PSX_COSIM cosim_instr(0xBFC00EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC00EC4: 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(0xBFC00EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC00EC8: 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, 0xBFC00EC8u); return; } g_debug_last_store_pc = 0xBFC00EC8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC00EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00ECC: 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(0xBFC00ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC00ED0: 3C04F400 lui $a0, 0xF400 */ cpu->gpr[4] = 0xF4000000u; PGXP_ALU(0x3C04F400u, cpu->gpr[4], 0u, 0u); #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, 0x2000001u); #endif /* 0xBFC00ED4: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #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, 0x2000001u); #endif /* 0xBFC00ED8: 03200008 jr $t9 */ psx_delay_BFC00ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC00EDC: 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(0xBFC00EDCu); #endif if (psx_delay_BFC00ED8) { psx_delay_BFC00ED8 = 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 OpenBIOS_func_1FC00EE0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00EE0u); int psx_delay_BFC00F20 = 0; int psx_delay_BFC00F2C = 0; int psx_taken_BFC00F2C = 0; int psx_delay_BFC00F68 = 0; int psx_taken_BFC00F68 = 0; int psx_delay_BFC00F84 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00F28u: goto label_BFC00F28; case 0xBFC00F34u: goto label_BFC00F34; case 0xBFC00F38u: goto label_BFC00F38; case 0xBFC00F70u: goto label_BFC00F70; default: break; } } 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, 0x20000000u); #endif /* 0xBFC00EE0: 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(0xBFC00EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00EE4: 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(0xBFC00EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC00EE8: AFB50064 sw $s5, 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, 0xBFC00EE8u); return; } g_debug_last_store_pc = 0xBFC00EE8u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC00EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC00EEC: 3C150000 lui $s5, 0x0 */ cpu->gpr[21] = 0x00000000u; PGXP_ALU(0x3C150000u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC00EF0: AFBF0074 sw $ra, 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, 0xBFC00EF0u); return; } g_debug_last_store_pc = 0xBFC00EF0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC00EF4: AFBE0070 sw $fp, 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, 0xBFC00EF4u); return; } g_debug_last_store_pc = 0xBFC00EF4u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0070u, _pgxa, cpu->gpr[30]); } #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, 0x20800000u); #endif /* 0xBFC00EF8: AFB7006C sw $s7, 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, 0xBFC00EF8u); return; } g_debug_last_store_pc = 0xBFC00EF8u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB7006Cu, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC00EFC: AFB60068 sw $s6, 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, 0xBFC00EFCu); return; } g_debug_last_store_pc = 0xBFC00EFCu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC00EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC00F00: AFB40060 sw $s4, 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, 0xBFC00F00u); return; } g_debug_last_store_pc = 0xBFC00F00u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC00F04: AFB3005C sw $s3, 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, 0xBFC00F04u); return; } g_debug_last_store_pc = 0xBFC00F04u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3005Cu, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC00F08: 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, 0xBFC00F08u); return; } g_debug_last_store_pc = 0xBFC00F08u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20058u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC00F0C: AFB10054 sw $s1, 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, 0xBFC00F0Cu); return; } g_debug_last_store_pc = 0xBFC00F0Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC00F10: 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, 0xBFC00F10u); return; } g_debug_last_store_pc = 0xBFC00F10u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00050u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC00F14: AEA24C00 sw $v0, 19456($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00F14u); return; } g_debug_last_store_pc = 0xBFC00F14u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEA24C00u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00F18: 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(0xBFC00F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00F1C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00F20: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00F28u; /* jalr link before delay slot */ psx_delay_BFC00F20 = 1; #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 if (psx_delay_BFC00F20) { psx_delay_BFC00F20 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00F28u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00F28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00F28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100005u); #endif /* 0xBFC00F28: 0040A025 or $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(0x0040A025u, cpu->gpr[20], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC00F2C: 04400002 bltz $v0, 0xBFC00F38 */ uint32_t psx_brA_BFC00F2C = cpu->gpr[2]; psx_taken_BFC00F2C = ((int32_t)psx_brA_BFC00F2C < 0); psx_delay_BFC00F2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC00F30: 2450000F addiu $s0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2450000Fu, cpu->gpr[16], _pgx1, 0x0000000Fu); } #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, 0xBFC00F38u); goto label_BFC00F38; } #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, 0x10005u); #endif /* 0xBFC00F34: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x10000u); #endif /* 0xBFC00F38: 00108103 sra $s0, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 4u); PGXP_ALU(0x00108103u, cpu->gpr[16], _pgx1, 4u); } #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, 0x400000u); #endif /* 0xBFC00F3C: 3C160000 lui $s6, 0x0 */ cpu->gpr[22] = 0x00000000u; PGXP_ALU(0x3C160000u, cpu->gpr[22], 0u, 0u); #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, 0x30000u); #endif /* 0xBFC00F40: 00108880 sll $s1, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = cpu->gpr[16] << 2u; PGXP_ALU(0x00108880u, cpu->gpr[17], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC00F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC00F44: 26D64BAC addiu $s6, $s6, 19372 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (19372)); PGXP_ALU(0x26D64BACu, cpu->gpr[22], _pgx1, 0x00004BACu); } #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, 0x80000u); #endif /* 0xBFC00F48: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #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, 0x420004u); #endif /* 0xBFC00F4C: 02361021 addu $v0, $s1, $s6 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[22]; PGXP_ALU(0x02361021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80000u); #endif /* 0xBFC00F50: 26734BA4 addiu $s3, $s3, 19364 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (19364)); PGXP_ALU(0x26734BA4u, cpu->gpr[19], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F54u); #endif /* 0xBFC00F54: 8C520000 lw $s2, 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, 0xBFC00F54u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x4u); } PGXP_LOAD(0x8C520000u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0004u); #endif /* 0xBFC00F58: 02331021 addu $v0, $s1, $s3 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[19]; PGXP_ALU(0x02331021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F5Cu); #endif /* 0xBFC00F5C: 8C420000 lw $v0, 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, 0xBFC00F5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0xCu); #endif /* 0xBFC00F64: 2C430009 sltiu $v1, $v0, 9 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000009u ? 1 : 0); PGXP_ALU(0x2C430009u, cpu->gpr[3], _pgx1, 0x0009u); } #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, 0x9u); #endif /* 0xBFC00F68: 106000E5 beq $v1, $zero, 0xBFC01300 */ uint32_t psx_brA_BFC00F68 = cpu->gpr[3]; 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, 0xCu); #endif /* 0xBFC00F6C: 00021880 sll $v1, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 2u; PGXP_ALU(0x00021880u, cpu->gpr[3], _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, 0xBFC01300u); cpu->pc = 0xBFC01300u; return; } #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, 0x4u); #endif /* 0xBFC00F70: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00F74: 24429FAC addiu $v0, $v0, -24660 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-24660)); PGXP_ALU(0x24429FACu, cpu->gpr[2], _pgx1, 0xFFFF9FACu); } #ifdef PSX_COSIM cosim_instr(0xBFC00F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00F78: 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(0xBFC00F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F7Cu); #endif /* 0xBFC00F7C: 8C420000 lw $v0, 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, 0xBFC00F7Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00F80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00F84: 00400008 jr $v0 */ psx_delay_BFC00F84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00F88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00F88u); #endif if (psx_delay_BFC00F84) { psx_delay_BFC00F84 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC00F8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00F8Cu); int psx_delay_BFC00F98 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC00FA0u: goto label_BFC00FA0; default: break; } } 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, 0x201u); #endif /* 0xBFC00F8C: 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(0xBFC00F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F90u); #endif /* 0xBFC00F90: 8E440028 lw $a0, 40($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00F90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } PGXP_LOAD(0x8E440028u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC00F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC00F94: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC00F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC00F98: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC00FA0u; /* jalr link before delay slot */ psx_delay_BFC00F98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00F9C: 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(0xBFC00F9Cu); #endif if (psx_delay_BFC00F98) { psx_delay_BFC00F98 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC00FA0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC00FA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00FA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FA0u); #endif /* 0xBFC00FA0: 8E420010 lw $v0, 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, 0xBFC00FA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420010u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC00FA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC00FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00FA8: 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(0xBFC00FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC00FAC: AE420010 sw $v0, 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, 0xBFC00FACu); return; } g_debug_last_store_pc = 0xBFC00FACu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00FB0u); cpu->pc = 0xBFC00FB0u; return; /* fallthrough */ } void OpenBIOS_func_1FC00FB0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00FB0u); int psx_delay_BFC00FB0 = 0; int psx_taken_BFC00FB0 = 0; label_BFC00FB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00FB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00FB0: 100000B2 beq $zero, $zero, 0xBFC0127C */ uint32_t psx_brA_BFC00FB0 = cpu->gpr[0]; uint32_t psx_brB_BFC00FB0 = cpu->gpr[0]; psx_taken_BFC00FB0 = (psx_brA_BFC00FB0 == psx_brB_BFC00FB0); psx_delay_BFC00FB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00FB4: 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(0xBFC00FB4u); #endif if (psx_delay_BFC00FB0) { psx_delay_BFC00FB0 = 0; if (psx_taken_BFC00FB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0127Cu); cpu->pc = 0xBFC0127Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00FB8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00FB8u); cpu->pc = 0xBFC00FB8u; return; /* fallthrough */ } void OpenBIOS_func_1FC00FB8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC00FB8u); int psx_delay_BFC00FD0 = 0; int psx_taken_BFC00FD0 = 0; int psx_delay_BFC00FE0 = 0; int psx_delay_BFC01024 = 0; int psx_delay_BFC01070 = 0; int psx_delay_BFC01080 = 0; int psx_delay_BFC0108C = 0; int psx_taken_BFC0108C = 0; int psx_delay_BFC010AC = 0; int psx_delay_BFC010B4 = 0; int psx_taken_BFC010B4 = 0; int psx_delay_BFC010BC = 0; int psx_taken_BFC010BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC010A4u: goto label_BFC010A4; case 0xBFC010A8u: goto label_BFC010A8; case 0xBFC00FD8u: goto label_BFC00FD8; case 0xBFC00FE8u: goto label_BFC00FE8; case 0xBFC0102Cu: goto label_BFC0102C; case 0xBFC01078u: goto label_BFC01078; case 0xBFC01088u: goto label_BFC01088; case 0xBFC01094u: goto label_BFC01094; case 0xBFC01098u: goto label_BFC01098; case 0xBFC010B4u: goto label_BFC010B4; case 0xBFC010BCu: goto label_BFC010BC; default: break; } } label_BFC00FB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00FB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00FB8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC00FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC00FBC: 24424BC4 addiu $v0, $v0, 19396 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19396)); PGXP_ALU(0x24424BC4u, cpu->gpr[2], _pgx1, 0x00004BC4u); } #ifdef PSX_COSIM cosim_instr(0xBFC00FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC00FC0: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FC4u); #endif /* 0xBFC00FC4: 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, 0xBFC00FC4u); 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(0xBFC00FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC00FC8: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC00FCC: 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(0xBFC00FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC00FD0: 14600016 bne $v1, $zero, 0xBFC0102C */ uint32_t psx_brA_BFC00FD0 = cpu->gpr[3]; uint32_t psx_brB_BFC00FD0 = cpu->gpr[0]; psx_taken_BFC00FD0 = (psx_brA_BFC00FD0 != psx_brB_BFC00FD0); psx_delay_BFC00FD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC00FD4: 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, 0xBFC00FD4u); return; } g_debug_last_store_pc = 0xBFC00FD4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FD4u); #endif if (psx_delay_BFC00FD0) { psx_delay_BFC00FD0 = 0; if (psx_taken_BFC00FD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0102Cu); goto label_BFC0102C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00FD8u); } label_BFC00FD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC00FD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC00FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC00FD8: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC00FDC: 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(0xBFC00FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC00FE0: 0FF003A6 jal 0xBFC00E98 */ cpu->gpr[31] = 0xBFC00FE8u; /* jal link before delay slot */ psx_delay_BFC00FE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420000u); #endif /* 0xBFC00FE4: 02D1B021 addu $s6, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D1B021u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC00FE4u); #endif if (psx_delay_BFC00FE0) { psx_delay_BFC00FE0 = 0; cpu->gpr[31] = 0xBFC00FE8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } 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 /* 0xBFC00FE8: 8EC20000 lw $v0, 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, 0xBFC00FE8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x400000u); } PGXP_LOAD(0x8EC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC00FEC: 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(0xBFC00FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FF0u); #endif /* 0xBFC00FF0: 8C440028 lw $a0, 40($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC00FF0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C440028u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FF4u); #endif /* 0xBFC00FF4: 8FBF0074 lw $ra, 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, 0xBFC00FF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FF8u); #endif /* 0xBFC00FF8: 8FBE0070 lw $fp, 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, 0xBFC00FF8u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0070u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC00FFCu); #endif /* 0xBFC00FFC: 8FB7006C lw $s7, 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, 0xBFC00FFCu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7006Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC00FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01000u); #endif /* 0xBFC01000: 8FB60068 lw $s6, 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, 0xBFC01000u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01004u); #endif /* 0xBFC01004: 8FB50064 lw $s5, 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, 0xBFC01004u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01008u); #endif /* 0xBFC01008: 8FB40060 lw $s4, 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, 0xBFC01008u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0100Cu); #endif /* 0xBFC0100C: 8FB3005C lw $s3, 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, 0xBFC0100Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3005Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC0100Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01010u); #endif /* 0xBFC01010: 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, 0xBFC01010u); 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(0xBFC01010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01014u); #endif /* 0xBFC01014: 8FB10054 lw $s1, 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, 0xBFC01014u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01018u); #endif /* 0xBFC01018: 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, 0xBFC01018u); 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(0xBFC01018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0101Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0101C: 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(0xBFC0101Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC01020: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC01024: 03200008 jr $t9 */ psx_delay_BFC01024 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01028: 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(0xBFC01028u); #endif if (psx_delay_BFC01024) { psx_delay_BFC01024 = 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; } label_BFC0102C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0102Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0102Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0102Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0102C: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0102Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC01030: 26734BB4 addiu $s3, $s3, 19380 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (19380)); PGXP_ALU(0x26734BB4u, cpu->gpr[19], _pgx1, 0x00004BB4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0008u); #endif /* 0xBFC01034: 02711821 addu $v1, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02711821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01038u); #endif /* 0xBFC01038: 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, 0xBFC01038u); 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(0xBFC01038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0103Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0103C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0103Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01040: 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(0xBFC01040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01044: 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, 0xBFC01044u); return; } g_debug_last_store_pc = 0xBFC01044u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01048u); #endif /* 0xBFC01048: 8E420010 lw $v0, 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, 0xBFC01048u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0104Cu); #endif /* 0xBFC0104C: 8E450024 lw $a1, 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, 0xBFC0104Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } PGXP_LOAD(0x8E450024u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC01050: 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(0xBFC01050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC01054: AE420010 sw $v0, 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, 0xBFC01054u); return; } g_debug_last_store_pc = 0xBFC01054u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01058: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0105Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0105C: 24424BCC addiu $v0, $v0, 19404 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19404)); PGXP_ALU(0x24424BCCu, cpu->gpr[2], _pgx1, 0x00004BCCu); } #ifdef PSX_COSIM cosim_instr(0xBFC0105Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01060: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01064u); #endif /* 0xBFC01064: 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, 0xBFC01064u); 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(0xBFC01064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01068: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0106Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0106C: 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(0xBFC0106Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01070: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC01078u; /* jal link before delay slot */ psx_delay_BFC01070 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC01074: AC460000 sw $a2, 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, 0xBFC01074u); return; } g_debug_last_store_pc = 0xBFC01074u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC01074u); #endif if (psx_delay_BFC01070) { psx_delay_BFC01070 = 0; cpu->gpr[31] = 0xBFC01078u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC01078: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0107Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0107C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC01080: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC01088u; /* jal link before delay slot */ psx_delay_BFC01080 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC01084: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01084u); #endif if (psx_delay_BFC01080) { psx_delay_BFC01080 = 0; cpu->gpr[31] = 0xBFC01088u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC01088: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01088u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC01088: 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(0xBFC01088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0108Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0108C: 10430002 beq $v0, $v1, 0xBFC01098 */ uint32_t psx_brA_BFC0108C = cpu->gpr[2]; uint32_t psx_brB_BFC0108C = cpu->gpr[3]; psx_taken_BFC0108C = (psx_brA_BFC0108C == psx_brB_BFC0108C); psx_delay_BFC0108C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01090: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01090u); #endif if (psx_delay_BFC0108C) { psx_delay_BFC0108C = 0; if (psx_taken_BFC0108C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01098u); goto label_BFC01098; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01094u); } label_BFC01094: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01094u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC01094: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01094u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000u); #endif /* 0xBFC01098: 02719821 addu $s3, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02719821u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0109Cu); #endif /* 0xBFC0109C: 8E660000 lw $a2, 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[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x80000u); } PGXP_LOAD(0x8E660000u, _pgxa, cpu->gpr[6]); } #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, 0x201u); #endif /* 0xBFC010A0: 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(0xBFC010A0u); #endif label_BFC010A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC010A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC010A4: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC010A4u); #endif label_BFC010A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC010A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC010A8: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC010A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC010AC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC010B4u; /* jalr link before delay slot */ psx_delay_BFC010AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC010B0: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC010B0u); #endif if (psx_delay_BFC010AC) { psx_delay_BFC010AC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC010B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC010B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC010B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC010B4: 1440001B bne $v0, $zero, 0xBFC01124 */ uint32_t psx_brA_BFC010B4 = cpu->gpr[2]; uint32_t psx_brB_BFC010B4 = cpu->gpr[0]; psx_taken_BFC010B4 = (psx_brA_BFC010B4 != psx_brB_BFC010B4); psx_delay_BFC010B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC010B8: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC010B8u); #endif if (psx_delay_BFC010B4) { psx_delay_BFC010B4 = 0; if (psx_taken_BFC010B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01124u); cpu->pc = 0xBFC01124u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010BCu); } label_BFC010BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC010BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC010BC: 10000092 beq $zero, $zero, 0xBFC01308 */ uint32_t psx_brA_BFC010BC = cpu->gpr[0]; uint32_t psx_brB_BFC010BC = cpu->gpr[0]; psx_taken_BFC010BC = (psx_brA_BFC010BC == psx_brB_BFC010BC); psx_delay_BFC010BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC010C0: 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(0xBFC010C0u); #endif if (psx_delay_BFC010BC) { psx_delay_BFC010BC = 0; if (psx_taken_BFC010BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01308u); cpu->pc = 0xBFC01308u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010C4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010C4u); cpu->pc = 0xBFC010C4u; return; /* fallthrough */ } void OpenBIOS_func_1FC010C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC010C4u); label_BFC010C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0004u); #endif /* 0xBFC010C4: 02711021 addu $v0, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02711021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC010C8: 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(0xBFC010C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC010CC: 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, 0xBFC010CCu); return; } g_debug_last_store_pc = 0xBFC010CCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC010CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010D0u); cpu->pc = 0xBFC010D0u; return; /* fallthrough */ } void OpenBIOS_func_1FC010D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC010D0u); int psx_delay_BFC010E8 = 0; int psx_taken_BFC010E8 = 0; int psx_delay_BFC010F4 = 0; int psx_delay_BFC010FC = 0; int psx_taken_BFC010FC = 0; int psx_delay_BFC01110 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC010F0u: goto label_BFC010F0; case 0xBFC010FCu: goto label_BFC010FC; case 0xBFC01104u: goto label_BFC01104; case 0xBFC01118u: goto label_BFC01118; default: break; } } label_BFC010D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC010D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC010D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC010D0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC010D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC010D4: 24424BC4 addiu $v0, $v0, 19396 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19396)); PGXP_ALU(0x24424BC4u, cpu->gpr[2], _pgx1, 0x00004BC4u); } #ifdef PSX_COSIM cosim_instr(0xBFC010D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC010D8: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC010D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010DCu); #endif /* 0xBFC010DC: 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, 0xBFC010DCu); 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(0xBFC010DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC010E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC010E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC010E4: 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(0xBFC010E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC010E8: 1460001A bne $v1, $zero, 0xBFC01154 */ uint32_t psx_brA_BFC010E8 = cpu->gpr[3]; 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, 0xCu); #endif /* 0xBFC010EC: 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, 0xBFC010ECu); return; } g_debug_last_store_pc = 0xBFC010ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0xBFC01154u); cpu->pc = 0xBFC01154u; return; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC010F0: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC010F4: 0FF0033F jal 0xBFC00CFC */ cpu->gpr[31] = 0xBFC010FCu; /* jal link before delay slot */ psx_delay_BFC010F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC010F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC010F8: AEA04C00 sw $zero, 19456($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC010F8u); return; } g_debug_last_store_pc = 0xBFC010F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEA04C00u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC010F8u); #endif if (psx_delay_BFC010F4) { psx_delay_BFC010F4 = 0; cpu->gpr[31] = 0xBFC010FCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00CFCu); cpu->pc = 0xBFC00CFCu; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC010FC: 14400006 bne $v0, $zero, 0xBFC01118 */ uint32_t psx_brA_BFC010FC = cpu->gpr[2]; uint32_t psx_brB_BFC010FC = cpu->gpr[0]; psx_taken_BFC010FC = (psx_brA_BFC010FC != psx_brB_BFC010FC); psx_delay_BFC010FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01100: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01100u); #endif if (psx_delay_BFC010FC) { psx_delay_BFC010FC = 0; if (psx_taken_BFC010FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01118u); goto label_BFC01118; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01104u); } 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, 0x9u); #endif /* 0xBFC01104: 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(0xBFC01104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01108: 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(0xBFC01108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0110Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0110C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC01110: 0FF003A6 jal 0xBFC00E98 */ cpu->gpr[31] = 0xBFC01118u; /* jal link before delay slot */ psx_delay_BFC01110 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01114: AC43AE9C sw $v1, -20836($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01114u); return; } g_debug_last_store_pc = 0xBFC01114u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AE9Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC01114u); #endif if (psx_delay_BFC01110) { psx_delay_BFC01110 = 0; cpu->gpr[31] = 0xBFC01118u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC01118: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01118u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000u); #endif /* 0xBFC01118: 02719821 addu $s3, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02719821u, cpu->gpr[19], _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, 0x5u); #endif /* 0xBFC0111C: 24020007 addiu $v0, $zero, 7 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); PGXP_ALU(0x24020007u, cpu->gpr[2], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0xBFC0111Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC01120: AE620000 sw $v0, 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, 0xBFC01120u); return; } g_debug_last_store_pc = 0xBFC01120u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01124u); cpu->pc = 0xBFC01124u; return; /* fallthrough */ } void OpenBIOS_func_1FC01124(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01124u); int psx_delay_BFC0114C = 0; 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: 8FBF0074 lw $ra, 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, 0xBFC01124u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01128u); #endif /* 0xBFC01128: 8FBE0070 lw $fp, 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, 0xBFC01128u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0070u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC01128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0112Cu); #endif /* 0xBFC0112C: 8FB7006C lw $s7, 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, 0xBFC0112Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7006Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC0112Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01130u); #endif /* 0xBFC01130: 8FB60068 lw $s6, 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, 0xBFC01130u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01134u); #endif /* 0xBFC01134: 8FB50064 lw $s5, 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, 0xBFC01134u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01138u); #endif /* 0xBFC01138: 8FB40060 lw $s4, 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, 0xBFC01138u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0113Cu); #endif /* 0xBFC0113C: 8FB3005C lw $s3, 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, 0xBFC0113Cu); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3005Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC0113Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01140u); #endif /* 0xBFC01140: 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, 0xBFC01140u); 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(0xBFC01140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01144u); #endif /* 0xBFC01144: 8FB10054 lw $s1, 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, 0xBFC01144u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01148u); #endif /* 0xBFC01148: 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, 0xBFC01148u); 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(0xBFC01148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0114Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0114C: 03E00008 jr $ra */ psx_delay_BFC0114C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01150: 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(0xBFC01150u); #endif if (psx_delay_BFC0114C) { psx_delay_BFC0114C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC01154(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01154u); int psx_delay_BFC01198 = 0; int psx_delay_BFC011A8 = 0; int psx_delay_BFC011B4 = 0; int psx_taken_BFC011B4 = 0; int psx_delay_BFC011D8 = 0; int psx_taken_BFC011D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC011A0u: goto label_BFC011A0; case 0xBFC011B0u: goto label_BFC011B0; case 0xBFC011BCu: goto label_BFC011BC; case 0xBFC011C0u: goto label_BFC011C0; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC01154: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #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, 0x80000u); #endif /* 0xBFC01158: 26734BB4 addiu $s3, $s3, 19380 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (19380)); PGXP_ALU(0x26734BB4u, cpu->gpr[19], _pgx1, 0x00004BB4u); } #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, 0xA0008u); #endif /* 0xBFC0115C: 02711821 addu $v1, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02711821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0115Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01160u); #endif /* 0xBFC01160: 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, 0xBFC01160u); 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(0xBFC01160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC01164: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC01168: 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(0xBFC01168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0116Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0116C: 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, 0xBFC0116Cu); return; } g_debug_last_store_pc = 0xBFC0116Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0116Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01170u); #endif /* 0xBFC01170: 8E420010 lw $v0, 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, 0xBFC01170u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01174u); #endif /* 0xBFC01174: 8E450024 lw $a1, 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, 0xBFC01174u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } PGXP_LOAD(0x8E450024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC01174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01178: 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(0xBFC01178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0117Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0117C: AE420010 sw $v0, 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, 0xBFC0117Cu); return; } g_debug_last_store_pc = 0xBFC0117Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420010u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC01180: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC01184: 24424BCC addiu $v0, $v0, 19404 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19404)); PGXP_ALU(0x24424BCCu, cpu->gpr[2], _pgx1, 0x00004BCCu); } #ifdef PSX_COSIM cosim_instr(0xBFC01184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01188: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0118Cu); #endif /* 0xBFC0118C: 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, 0xBFC0118Cu); 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(0xBFC0118Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01190: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC01194: 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(0xBFC01194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01198: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC011A0u; /* jal link before delay slot */ psx_delay_BFC01198 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0119Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0119C: AC460000 sw $a2, 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, 0xBFC0119Cu); return; } g_debug_last_store_pc = 0xBFC0119Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC0119Cu); #endif if (psx_delay_BFC01198) { psx_delay_BFC01198 = 0; cpu->gpr[31] = 0xBFC011A0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } label_BFC011A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC011A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC011A0: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC011A4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC011A8: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC011B0u; /* jal link before delay slot */ psx_delay_BFC011A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC011AC: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011ACu); #endif if (psx_delay_BFC011A8) { psx_delay_BFC011A8 = 0; cpu->gpr[31] = 0xBFC011B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC011B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC011B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC011B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC011B0: 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(0xBFC011B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC011B4: 10430002 beq $v0, $v1, 0xBFC011C0 */ uint32_t psx_brA_BFC011B4 = cpu->gpr[2]; uint32_t psx_brB_BFC011B4 = cpu->gpr[3]; psx_taken_BFC011B4 = (psx_brA_BFC011B4 == psx_brB_BFC011B4); psx_delay_BFC011B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC011B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC011B8u); #endif if (psx_delay_BFC011B4) { psx_delay_BFC011B4 = 0; if (psx_taken_BFC011B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC011C0u); goto label_BFC011C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC011BCu); } label_BFC011BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC011BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC011BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC011BC: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011BCu); #endif label_BFC011C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC011C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC011C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC011C0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC011C4: 24424BBC addiu $v0, $v0, 19388 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19388)); PGXP_ALU(0x24424BBCu, cpu->gpr[2], _pgx1, 0x00004BBCu); } #ifdef PSX_COSIM cosim_instr(0xBFC011C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC011C8: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000u); #endif /* 0xBFC011CC: 02719821 addu $s3, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02719821u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011D0u); #endif /* 0xBFC011D0: 8E660000 lw $a2, 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, 0xBFC011D0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x80000u); } PGXP_LOAD(0x8E660000u, _pgxa, cpu->gpr[6]); } #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, 0x40004u); #endif /* 0xBFC011D4: 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, 0xBFC011D4u); return; } g_debug_last_store_pc = 0xBFC011D4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAC520000u, _pgxa, cpu->gpr[18]); } #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, 0x1u); #endif /* 0xBFC011D8: 1000FFB2 beq $zero, $zero, 0xBFC010A4 */ uint32_t psx_brA_BFC011D8 = cpu->gpr[0]; uint32_t psx_brB_BFC011D8 = cpu->gpr[0]; psx_taken_BFC011D8 = (psx_brA_BFC011D8 == psx_brB_BFC011D8); psx_delay_BFC011D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC011DC: 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(0xBFC011DCu); #endif if (psx_delay_BFC011D8) { psx_delay_BFC011D8 = 0; if (psx_taken_BFC011D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010A4u); cpu->pc = 0xBFC010A4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC011E0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC011E0u); cpu->pc = 0xBFC011E0u; return; /* fallthrough */ } void OpenBIOS_func_1FC011E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC011E0u); int psx_delay_BFC01230 = 0; int psx_taken_BFC01230 = 0; int psx_delay_BFC01238 = 0; int psx_taken_BFC01238 = 0; int psx_delay_BFC01240 = 0; int psx_taken_BFC01240 = 0; int psx_delay_BFC01250 = 0; int psx_taken_BFC01250 = 0; int psx_delay_BFC01260 = 0; int psx_taken_BFC01260 = 0; int psx_delay_BFC012A8 = 0; int psx_delay_BFC012BC = 0; int psx_delay_BFC012D8 = 0; int psx_taken_BFC012D8 = 0; int psx_delay_BFC012F0 = 0; int psx_delay_BFC012F8 = 0; int psx_taken_BFC012F8 = 0; int psx_delay_BFC01310 = 0; int psx_taken_BFC01310 = 0; int psx_delay_BFC0132C = 0; int psx_taken_BFC0132C = 0; int psx_delay_BFC01338 = 0; int psx_delay_BFC01340 = 0; int psx_taken_BFC01340 = 0; int psx_delay_BFC0135C = 0; int psx_delay_BFC0137C = 0; int psx_taken_BFC0137C = 0; int psx_delay_BFC013A0 = 0; int psx_delay_BFC013A8 = 0; int psx_taken_BFC013A8 = 0; int psx_delay_BFC013B8 = 0; int psx_taken_BFC013B8 = 0; int psx_delay_BFC013D0 = 0; int psx_taken_BFC013D0 = 0; int psx_delay_BFC013F8 = 0; int psx_taken_BFC013F8 = 0; int psx_delay_BFC01408 = 0; int psx_taken_BFC01408 = 0; int psx_delay_BFC0141C = 0; int psx_taken_BFC0141C = 0; int psx_delay_BFC01424 = 0; int psx_taken_BFC01424 = 0; int psx_delay_BFC01430 = 0; int psx_taken_BFC01430 = 0; int psx_delay_BFC01448 = 0; int psx_taken_BFC01448 = 0; int psx_delay_BFC01460 = 0; int psx_taken_BFC01460 = 0; int psx_delay_BFC01478 = 0; int psx_taken_BFC01478 = 0; int psx_delay_BFC01490 = 0; int psx_delay_BFC01498 = 0; int psx_taken_BFC01498 = 0; int psx_delay_BFC014A0 = 0; int psx_delay_BFC014B4 = 0; int psx_taken_BFC014B4 = 0; int psx_delay_BFC014D4 = 0; int psx_taken_BFC014D4 = 0; int psx_delay_BFC014E0 = 0; int psx_delay_BFC014E8 = 0; int psx_taken_BFC014E8 = 0; int psx_delay_BFC01504 = 0; int psx_delay_BFC01524 = 0; int psx_taken_BFC01524 = 0; int psx_delay_BFC01534 = 0; int psx_taken_BFC01534 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0127Cu: goto label_BFC0127C; case 0xBFC01300u: goto label_BFC01300; case 0xBFC01308u: goto label_BFC01308; case 0xBFC01238u: goto label_BFC01238; case 0xBFC01240u: goto label_BFC01240; case 0xBFC01248u: goto label_BFC01248; case 0xBFC01258u: goto label_BFC01258; case 0xBFC01268u: goto label_BFC01268; case 0xBFC012B0u: goto label_BFC012B0; case 0xBFC012BCu: goto label_BFC012BC; case 0xBFC012C4u: goto label_BFC012C4; case 0xBFC012E0u: goto label_BFC012E0; case 0xBFC012F8u: goto label_BFC012F8; case 0xBFC01318u: goto label_BFC01318; case 0xBFC0132Cu: goto label_BFC0132C; case 0xBFC01334u: goto label_BFC01334; case 0xBFC01340u: goto label_BFC01340; case 0xBFC01348u: goto label_BFC01348; case 0xBFC01364u: goto label_BFC01364; case 0xBFC01384u: goto label_BFC01384; case 0xBFC01398u: goto label_BFC01398; case 0xBFC013A8u: goto label_BFC013A8; case 0xBFC013B0u: goto label_BFC013B0; case 0xBFC013B4u: goto label_BFC013B4; case 0xBFC013C0u: goto label_BFC013C0; case 0xBFC013C8u: goto label_BFC013C8; case 0xBFC013D8u: goto label_BFC013D8; case 0xBFC013F0u: goto label_BFC013F0; case 0xBFC01400u: goto label_BFC01400; case 0xBFC01410u: goto label_BFC01410; case 0xBFC01414u: goto label_BFC01414; case 0xBFC01418u: goto label_BFC01418; case 0xBFC01424u: goto label_BFC01424; case 0xBFC0142Cu: goto label_BFC0142C; case 0xBFC01438u: goto label_BFC01438; case 0xBFC01440u: goto label_BFC01440; case 0xBFC01450u: goto label_BFC01450; case 0xBFC0145Cu: goto label_BFC0145C; case 0xBFC01468u: goto label_BFC01468; case 0xBFC01470u: goto label_BFC01470; case 0xBFC01480u: goto label_BFC01480; case 0xBFC01498u: goto label_BFC01498; case 0xBFC014A0u: goto label_BFC014A0; case 0xBFC014A8u: goto label_BFC014A8; case 0xBFC014BCu: goto label_BFC014BC; case 0xBFC014DCu: goto label_BFC014DC; case 0xBFC014E8u: goto label_BFC014E8; case 0xBFC014F0u: goto label_BFC014F0; case 0xBFC0150Cu: goto label_BFC0150C; case 0xBFC0152Cu: goto label_BFC0152C; case 0xBFC01530u: goto label_BFC01530; default: break; } } label_BFC011E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC011E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC011E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC011E0: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC011E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC011E4: 001011C0 sll $v0, $s0, 7 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 7u; PGXP_ALU(0x001011C0u, cpu->gpr[2], _pgx1, 7u); } #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, 0x40000u); #endif /* 0xBFC011E8: 26524D28 addiu $s2, $s2, 19752 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19752)); PGXP_ALU(0x26524D28u, cpu->gpr[18], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC011E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC011EC: 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(0xBFC011ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC011F0: 00101100 sll $v0, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 4u; PGXP_ALU(0x00101100u, cpu->gpr[2], _pgx1, 4u); } #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, 0x10004u); #endif /* 0xBFC011F4: 00501023 subu $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(0x00501023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC011F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC011F8: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC011F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC011FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC011FC: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #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, 0x80000u); #endif /* 0xBFC01200: 26734E28 addiu $s3, $s3, 20008 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (20008)); PGXP_ALU(0x26734E28u, cpu->gpr[19], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC01200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40080004u); #endif /* 0xBFC01204: 0262F021 addu $fp, $s3, $v0 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[30] = cpu->gpr[19] + cpu->gpr[2]; PGXP_ALU(0x0262F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC01208: 3C160000 lui $s6, 0x0 */ cpu->gpr[22] = 0x00000000u; PGXP_ALU(0x3C160000u, cpu->gpr[22], 0u, 0u); #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, 0x30004u); #endif /* 0xBFC0120C: 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(0xBFC0120Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC01210: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01214: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC01218: 26734C88 addiu $s3, $s3, 19592 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (19592)); PGXP_ALU(0x26734C88u, cpu->gpr[19], _pgx1, 0x00004C88u); } #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, 0x400000u); #endif /* 0xBFC0121C: 26D64C80 addiu $s6, $s6, 19584 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (19584)); PGXP_ALU(0x26D64C80u, cpu->gpr[22], _pgx1, 0x00004C80u); } #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, 0x80004u); #endif /* 0xBFC01220: 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(0xBFC01220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420004u); #endif /* 0xBFC01224: 02D11021 addu $v0, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D11021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01228u); #endif /* 0xBFC01228: 8C420000 lw $v0, 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, 0xBFC01228u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC0122C: 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(0xBFC0122Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01230: 10430040 beq $v0, $v1, 0xBFC01334 */ uint32_t psx_brA_BFC01230 = cpu->gpr[2]; uint32_t psx_brB_BFC01230 = cpu->gpr[3]; 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, 0x9u); #endif /* 0xBFC01234: 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(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, 0xBFC01334u); goto label_BFC01334; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01238: 104300A8 beq $v0, $v1, 0xBFC014DC */ uint32_t psx_brA_BFC01238 = cpu->gpr[2]; uint32_t psx_brB_BFC01238 = cpu->gpr[3]; psx_taken_BFC01238 = (psx_brA_BFC01238 == psx_brB_BFC01238); psx_delay_BFC01238 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0123Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0123C: 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(0xBFC0123Cu); #endif if (psx_delay_BFC01238) { psx_delay_BFC01238 = 0; if (psx_taken_BFC01238) { #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, 0xBFC01240u); } label_BFC01240: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01240u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01240: 1443FFB8 bne $v0, $v1, 0xBFC01124 */ uint32_t psx_brA_BFC01240 = cpu->gpr[2]; uint32_t psx_brB_BFC01240 = cpu->gpr[3]; psx_taken_BFC01240 = (psx_brA_BFC01240 != psx_brB_BFC01240); psx_delay_BFC01240 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01244: 2402004D addiu $v0, $zero, 77 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); PGXP_ALU(0x2402004Du, cpu->gpr[2], _pgx1, 0x0000004Du); } #ifdef PSX_COSIM cosim_instr(0xBFC01244u); #endif if (psx_delay_BFC01240) { psx_delay_BFC01240 = 0; if (psx_taken_BFC01240) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01124u); cpu->pc = 0xBFC01124u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01248u); } label_BFC01248: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01248u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01248u); #endif /* 0xBFC01248: 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(0xBFC01248u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01250: 14620005 bne $v1, $v0, 0xBFC01268 */ uint32_t psx_brA_BFC01250 = cpu->gpr[3]; uint32_t psx_brB_BFC01250 = cpu->gpr[2]; psx_taken_BFC01250 = (psx_brA_BFC01250 != psx_brB_BFC01250); psx_delay_BFC01250 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01254: 24020043 addiu $v0, $zero, 67 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); PGXP_ALU(0x24020043u, cpu->gpr[2], _pgx1, 0x00000043u); } #ifdef PSX_COSIM cosim_instr(0xBFC01254u); #endif if (psx_delay_BFC01250) { psx_delay_BFC01250 = 0; if (psx_taken_BFC01250) { #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, 0xBFC01258u); } label_BFC01258: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01258u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01258u); #endif /* 0xBFC01258: 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(0xBFC01258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0125Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0125C: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC01260: 10620013 beq $v1, $v0, 0xBFC012B0 */ uint32_t psx_brA_BFC01260 = cpu->gpr[3]; uint32_t psx_brB_BFC01260 = cpu->gpr[2]; psx_taken_BFC01260 = (psx_brA_BFC01260 == psx_brB_BFC01260); psx_delay_BFC01260 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40800000u); #endif /* 0xBFC01264: 27D701E0 addiu $s7, $fp, 480 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[30] + (480)); PGXP_ALU(0x27D701E0u, cpu->gpr[23], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01264u); #endif if (psx_delay_BFC01260) { psx_delay_BFC01260 = 0; if (psx_taken_BFC01260) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC012B0u); goto label_BFC012B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01268u); } 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, 0x4u); #endif /* 0xBFC01268: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC0126C: 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(0xBFC0126Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC01270: AEA04C00 sw $zero, 19456($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01270u); return; } g_debug_last_store_pc = 0xBFC01270u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEA04C00u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01274: AC43AEA4 sw $v1, -20828($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20828; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20828)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01274u); return; } g_debug_last_store_pc = 0xBFC01274u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEA4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC01274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01278: 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(0xBFC01278u); #endif 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 /* 0xBFC0127C: 8FBF0074 lw $ra, 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, 0xBFC0127Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0127Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01280u); #endif /* 0xBFC01280: 8FBE0070 lw $fp, 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, 0xBFC01280u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0070u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC01280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01284u); #endif /* 0xBFC01284: 8FB7006C lw $s7, 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, 0xBFC01284u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7006Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC01284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01288u); #endif /* 0xBFC01288: 8FB60068 lw $s6, 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, 0xBFC01288u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60068u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0128Cu); #endif /* 0xBFC0128C: 8FB50064 lw $s5, 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, 0xBFC0128Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50064u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC0128Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01290u); #endif /* 0xBFC01290: 8FB40060 lw $s4, 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, 0xBFC01290u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40060u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01294u); #endif /* 0xBFC01294: 8FB3005C lw $s3, 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, 0xBFC01294u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3005Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01298u); #endif /* 0xBFC01298: 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, 0xBFC01298u); 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(0xBFC01298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0129Cu); #endif /* 0xBFC0129C: 8FB10054 lw $s1, 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, 0xBFC0129Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10054u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC0129Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC012A0: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC012A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012A4u); #endif /* 0xBFC012A4: 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, 0xBFC012A4u); 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(0xBFC012A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC012A8: 0BF003A6 j 0xBFC00E98 */ psx_delay_BFC012A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC012AC: 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(0xBFC012ACu); #endif if (psx_delay_BFC012A8) { psx_delay_BFC012A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC012B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC012B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC012B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40080001u); #endif /* 0xBFC012B0: 03C09825 or $s3, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C09825u, cpu->gpr[19], _pgx1, _pgx2); } #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, 0x40000001u); #endif /* 0xBFC012B4: 241E00A0 addiu $fp, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241E00A0u, cpu->gpr[30], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC012B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC012B8: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC012B8u); #endif label_BFC012BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC012BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC012BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC012BC: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC012C4u; /* jal link before delay slot */ psx_delay_BFC012BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC012C0: 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(0xBFC012C0u); #endif if (psx_delay_BFC012BC) { psx_delay_BFC012BC = 0; cpu->gpr[31] = 0xBFC012C4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC012C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC012C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC012C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC012C4: 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(0xBFC012C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC012C8: AE600004 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC012C8u); return; } g_debug_last_store_pc = 0xBFC012C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE600004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC012C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80008u); #endif /* 0xBFC012CC: A6630008 sh $v1, 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, 0xBFC012CCu); return; } g_debug_last_store_pc = 0xBFC012CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA6630008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC012CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40080000u); #endif /* 0xBFC012D0: AE7E0000 sw $fp, 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, 0xBFC012D0u); return; } g_debug_last_store_pc = 0xBFC012D0u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAE7E0000u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC012D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC012D4: 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(0xBFC012D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x880000u); #endif /* 0xBFC012D8: 16F3FFF8 bne $s7, $s3, 0xBFC012BC */ uint32_t psx_brA_BFC012D8 = cpu->gpr[23]; uint32_t psx_brB_BFC012D8 = cpu->gpr[19]; psx_taken_BFC012D8 = (psx_brA_BFC012D8 != psx_brB_BFC012D8); psx_delay_BFC012D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC012DC: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC012DCu); #endif if (psx_delay_BFC012D8) { psx_delay_BFC012D8 = 0; if (psx_taken_BFC012D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC012BCu); goto label_BFC012BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC012E0u); } label_BFC012E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC012E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC012E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC012E0: 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(0xBFC012E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC012E4: 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(0xBFC012E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC012E8: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC012EC: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC012ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC012F0: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC012F8u; /* jalr link before delay slot */ psx_delay_BFC012F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC012F4: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC012F4u); #endif if (psx_delay_BFC012F0) { psx_delay_BFC012F0 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC012F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC012F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC012F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC012F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC012F8: 14400007 bne $v0, $zero, 0xBFC01318 */ uint32_t psx_brA_BFC012F8 = cpu->gpr[2]; uint32_t psx_brB_BFC012F8 = cpu->gpr[0]; psx_taken_BFC012F8 = (psx_brA_BFC012F8 != psx_brB_BFC012F8); psx_delay_BFC012F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC012FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC012FC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC012FCu); #endif if (psx_delay_BFC012F8) { psx_delay_BFC012F8 = 0; if (psx_taken_BFC012F8) { #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, 0xBFC01300u); } label_BFC01300: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01300u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01300: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC01304: 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(0xBFC01304u); #endif label_BFC01308: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01308u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC01308: AEA04C00 sw $zero, 19456($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01308u); return; } g_debug_last_store_pc = 0xBFC01308u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEA04C00u, _pgxa, cpu->gpr[0]); } #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, 0xCu); #endif /* 0xBFC0130C: AC43AE9C sw $v1, -20836($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0130Cu); return; } g_debug_last_store_pc = 0xBFC0130Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AE9Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0130Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01310: 1000FFDA beq $zero, $zero, 0xBFC0127C */ uint32_t psx_brA_BFC01310 = cpu->gpr[0]; uint32_t psx_brB_BFC01310 = cpu->gpr[0]; psx_taken_BFC01310 = (psx_brA_BFC01310 == psx_brB_BFC01310); psx_delay_BFC01310 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01314: 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(0xBFC01314u); #endif if (psx_delay_BFC01310) { psx_delay_BFC01310 = 0; if (psx_taken_BFC01310) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0127Cu); goto label_BFC0127C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01318u); } 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, 0x4u); #endif /* 0xBFC01318: 24424C78 addiu $v0, $v0, 19576 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19576)); PGXP_ALU(0x24424C78u, cpu->gpr[2], _pgx1, 0x00004C78u); } #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, 0x20004u); #endif /* 0xBFC0131C: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC01320: 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, 0xBFC01320u); return; } g_debug_last_store_pc = 0xBFC01320u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420000u); #endif /* 0xBFC01324: 02D1B021 addu $s6, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D1B021u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01328: 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(0xBFC01328u); #endif label_BFC0132C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0132Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0132Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0132Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0132C: 1000FF7D beq $zero, $zero, 0xBFC01124 */ uint32_t psx_brA_BFC0132C = cpu->gpr[0]; uint32_t psx_brB_BFC0132C = cpu->gpr[0]; psx_taken_BFC0132C = (psx_brA_BFC0132C == psx_brB_BFC0132C); psx_delay_BFC0132C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC01330: AEC20000 sw $v0, 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, 0xBFC01330u); return; } g_debug_last_store_pc = 0xBFC01330u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01330u); #endif if (psx_delay_BFC0132C) { psx_delay_BFC0132C = 0; if (psx_taken_BFC0132C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01124u); cpu->pc = 0xBFC01124u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01334u); } label_BFC01334: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01334u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC01334: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01338: 0FF000F1 jal 0xBFC003C4 */ cpu->gpr[31] = 0xBFC01340u; /* jal link before delay slot */ psx_delay_BFC01338 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0133Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC0133C: 3C170000 lui $s7, 0x0 */ cpu->gpr[23] = 0x00000000u; PGXP_ALU(0x3C170000u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0133Cu); #endif if (psx_delay_BFC01338) { psx_delay_BFC01338 = 0; cpu->gpr[31] = 0xBFC01340u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003C4u); cpu->pc = 0xBFC003C4u; return; } label_BFC01340: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01340u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01340: 10400008 beq $v0, $zero, 0xBFC01364 */ uint32_t psx_brA_BFC01340 = cpu->gpr[2]; uint32_t psx_brB_BFC01340 = cpu->gpr[0]; psx_taken_BFC01340 = (psx_brA_BFC01340 == psx_brB_BFC01340); psx_delay_BFC01340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC01344: 26F74C78 addiu $s7, $s7, 19576 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (19576)); PGXP_ALU(0x26F74C78u, cpu->gpr[23], _pgx1, 0x00004C78u); } #ifdef PSX_COSIM cosim_instr(0xBFC01344u); #endif if (psx_delay_BFC01340) { psx_delay_BFC01340 = 0; if (psx_taken_BFC01340) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01364u); goto label_BFC01364; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01348u); } label_BFC01348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820004u); #endif /* 0xBFC01348: 02F11021 addu $v0, $s7, $s1 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[23] + cpu->gpr[17]; PGXP_ALU(0x02F11021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0134Cu); #endif /* 0xBFC0134C: 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, 0xBFC0134Cu); 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(0xBFC0134Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC01350: 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(0xBFC01350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01354: 00042140 sll $a0, $a0, 5 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 5u; PGXP_ALU(0x00042140u, cpu->gpr[4], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC01354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC01358: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC0135C: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC01364u; /* jal link before delay slot */ psx_delay_BFC0135C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000010u); #endif /* 0xBFC01360: 03C42021 addu $a0, $fp, $a0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[30] + cpu->gpr[4]; PGXP_ALU(0x03C42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01360u); #endif if (psx_delay_BFC0135C) { psx_delay_BFC0135C = 0; cpu->gpr[31] = 0xBFC01364u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC01364: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01364u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820008u); #endif /* 0xBFC01364: 02F11821 addu $v1, $s7, $s1 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[23] + cpu->gpr[17]; PGXP_ALU(0x02F11821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01368u); #endif /* 0xBFC01368: 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, 0xBFC01368u); 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(0xBFC01368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0136Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0136C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0136Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC01370: 24A20001 addiu $v0, $a1, 1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); PGXP_ALU(0x24A20001u, cpu->gpr[2], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC01370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01374: 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, 0xBFC01374u); return; } g_debug_last_store_pc = 0xBFC01374u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01378: 2842000F slti $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (15) ? 1 : 0); PGXP_ALU(0x2842000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } #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, 0x5u); #endif /* 0xBFC0137C: 1440006C bne $v0, $zero, 0xBFC01530 */ uint32_t psx_brA_BFC0137C = cpu->gpr[2]; uint32_t psx_brB_BFC0137C = cpu->gpr[0]; psx_taken_BFC0137C = (psx_brA_BFC0137C != psx_brB_BFC0137C); psx_delay_BFC0137C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC01380: 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(0xBFC01380u); #endif if (psx_delay_BFC0137C) { psx_delay_BFC0137C = 0; if (psx_taken_BFC0137C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01530u); goto label_BFC01530; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01384u); } label_BFC01384: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01384u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000800u); #endif /* 0xBFC01384: 27AB0010 addiu $t3, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27AB0010u, cpu->gpr[11], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC01384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2801u); #endif /* 0xBFC01388: 01606825 or $t5, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01606825u, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0138Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC0138C: 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(0xBFC0138Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC01390: 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(0xBFC01390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC01394: 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(0xBFC01394u); #endif label_BFC01398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC01398: 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, 0xBFC01398u); return; } g_debug_last_store_pc = 0xBFC01398u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xADA00000u, _pgxa, cpu->gpr[0]); } #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, 0x1021u); #endif /* 0xBFC0139C: 01802825 or $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(0x01802825u, cpu->gpr[5], _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, 0x80000000u); #endif /* 0xBFC013A0: 0FF000FE jal 0xBFC003F8 */ cpu->gpr[31] = 0xBFC013A8u; /* jal link before delay slot */ psx_delay_BFC013A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC013A4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC013A4u); #endif if (psx_delay_BFC013A0) { psx_delay_BFC013A0 = 0; cpu->gpr[31] = 0xBFC013A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003F8u); cpu->pc = 0xBFC003F8u; return; } 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, 0x5u); #endif /* 0xBFC013A8: 10400002 beq $v0, $zero, 0xBFC013B4 */ uint32_t psx_brA_BFC013A8 = cpu->gpr[2]; uint32_t psx_brB_BFC013A8 = cpu->gpr[0]; psx_taken_BFC013A8 = (psx_brA_BFC013A8 == psx_brB_BFC013A8); psx_delay_BFC013A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC013AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC013ACu); #endif if (psx_delay_BFC013A8) { psx_delay_BFC013A8 = 0; if (psx_taken_BFC013A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013B4u); goto label_BFC013B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013B0u); } 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, 0xA000u); #endif /* 0xBFC013B0: ADAF0000 sw $t7, 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, 0xBFC013B0u); return; } g_debug_last_store_pc = 0xBFC013B0u; cpu->write_word(psx_addr, cpu->gpr[15]); } PGXP_STORE(0xADAF0000u, _pgxa, cpu->gpr[15]); } #ifdef PSX_COSIM cosim_instr(0xBFC013B0u); #endif label_BFC013B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC013B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC013B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC013B4: 258C0001 addiu $t4, $t4, 1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); PGXP_ALU(0x258C0001u, cpu->gpr[12], _pgx1, 0x00000001u); } #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, 0x5000u); #endif /* 0xBFC013B8: 158EFFF7 bne $t4, $t6, 0xBFC01398 */ uint32_t psx_brA_BFC013B8 = cpu->gpr[12]; uint32_t psx_brB_BFC013B8 = cpu->gpr[14]; psx_taken_BFC013B8 = (psx_brA_BFC013B8 != psx_brB_BFC013B8); psx_delay_BFC013B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC013BC: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC013BCu); #endif if (psx_delay_BFC013B8) { psx_delay_BFC013B8 = 0; if (psx_taken_BFC013B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01398u); goto label_BFC01398; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013C0u); } label_BFC013C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC013C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC013C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC013C0: 2563003C addiu $v1, $t3, 60 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[11] + (60)); PGXP_ALU(0x2563003Cu, cpu->gpr[3], _pgx1, 0x0000003Cu); } #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, 0x805u); #endif /* 0xBFC013C4: 01601025 or $v0, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC013C4u); #endif label_BFC013C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC013C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC013C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC013C8: 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, 0xBFC013C8u); return; } g_debug_last_store_pc = 0xBFC013C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #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, 0x4u); #endif /* 0xBFC013CC: 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(0xBFC013CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC013D0: 1443FFFD bne $v0, $v1, 0xBFC013C8 */ uint32_t psx_brA_BFC013D0 = cpu->gpr[2]; uint32_t psx_brB_BFC013D0 = cpu->gpr[3]; psx_taken_BFC013D0 = (psx_brA_BFC013D0 != psx_brB_BFC013D0); psx_delay_BFC013D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000021u); #endif /* 0xBFC013D4: 03C02825 or $a1, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC013D4u); #endif if (psx_delay_BFC013D0) { psx_delay_BFC013D0 = 0; if (psx_taken_BFC013D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013C8u); goto label_BFC013C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013D8u); } label_BFC013D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC013D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC013D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000200u); #endif /* 0xBFC013D8: 27C901E0 addiu $t1, $fp, 480 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[30] + (480)); PGXP_ALU(0x27C901E0u, cpu->gpr[9], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC013D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x881u); #endif /* 0xBFC013DC: 01603825 or $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(0x01603825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC013DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000011u); #endif /* 0xBFC013E0: 03C02025 or $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(0x03C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC013E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC013E4: 240A0051 addiu $t2, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x240A0051u, cpu->gpr[10], _pgx1, 0x00000051u); } #ifdef PSX_COSIM cosim_instr(0xBFC013E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC013E8: 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(0xBFC013E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC013EC: 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(0xBFC013ECu); #endif label_BFC013F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC013F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC013F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013F0u); #endif /* 0xBFC013F0: 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, 0xBFC013F0u); 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(0xBFC013F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC013F4: 00000000 nop */ /* nop */ #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, 0x404u); #endif /* 0xBFC013F8: 144A000C bne $v0, $t2, 0xBFC0142C */ uint32_t psx_brA_BFC013F8 = cpu->gpr[2]; uint32_t psx_brB_BFC013F8 = cpu->gpr[10]; psx_taken_BFC013F8 = (psx_brA_BFC013F8 != psx_brB_BFC013F8); psx_delay_BFC013F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC013FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC013FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC013FCu); #endif if (psx_delay_BFC013F8) { psx_delay_BFC013F8 = 0; if (psx_taken_BFC013F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0142Cu); goto label_BFC0142C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01400u); } label_BFC01400: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01400u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01400u); #endif /* 0xBFC01400: 8C820004 lw $v0, 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, 0xBFC01400u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01404u); #endif /* 0xBFC01404: 84830008 lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01404u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x84830008u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC01408: 04410002 bgez $v0, 0xBFC01414 */ uint32_t psx_brA_BFC01408 = cpu->gpr[2]; psx_taken_BFC01408 = ((int32_t)psx_brA_BFC01408 >= 0); psx_delay_BFC01408 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0140Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1080u); #endif /* 0xBFC0140C: 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, 0xBFC0140Cu); return; } g_debug_last_store_pc = 0xBFC0140Cu; cpu->write_word(psx_addr, cpu->gpr[12]); } PGXP_STORE(0xACEC0000u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0xBFC0140Cu); #endif if (psx_delay_BFC01408) { psx_delay_BFC01408 = 0; if (psx_taken_BFC01408) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01414u); goto label_BFC01414; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01410u); } 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, 0x4u); #endif /* 0xBFC01410: 24421FFF addiu $v0, $v0, 8191 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (8191)); PGXP_ALU(0x24421FFFu, cpu->gpr[2], _pgx1, 0x00001FFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC01410u); #endif label_BFC01414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01414u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01414: 00021343 sra $v0, $v0, 13 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 13u); PGXP_ALU(0x00021343u, cpu->gpr[2], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0xBFC01414u); #endif label_BFC01418: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01418u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01418: 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(0xBFC01418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0141Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0141C: 18400003 blez $v0, 0xBFC0142C */ uint32_t psx_brA_BFC0141C = cpu->gpr[2]; psx_taken_BFC0141C = ((int32_t)psx_brA_BFC0141C <= 0); psx_delay_BFC0141C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01420: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01420u); #endif if (psx_delay_BFC0141C) { psx_delay_BFC0141C = 0; if (psx_taken_BFC0141C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0142Cu); goto label_BFC0142C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01424u); } 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, 0x2008u); #endif /* 0xBFC01424: 146D0025 bne $v1, $t5, 0xBFC014BC */ uint32_t psx_brA_BFC01424 = cpu->gpr[3]; uint32_t psx_brB_BFC01424 = cpu->gpr[13]; psx_taken_BFC01424 = (psx_brA_BFC01424 != psx_brB_BFC01424); psx_delay_BFC01424 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC01428: 00033080 sll $a2, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[3] << 2u; PGXP_ALU(0x00033080u, cpu->gpr[6], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC01428u); #endif if (psx_delay_BFC01424) { psx_delay_BFC01424 = 0; if (psx_taken_BFC01424) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC014BCu); goto label_BFC014BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0142Cu); } label_BFC0142C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0142Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0142Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0142Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0142C: 24840020 addiu $a0, $a0, 32 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (32)); PGXP_ALU(0x24840020u, cpu->gpr[4], _pgx1, 0x00000020u); } #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, 0x210u); #endif /* 0xBFC01430: 1489FFEF bne $a0, $t1, 0xBFC013F0 */ uint32_t psx_brA_BFC01430 = cpu->gpr[4]; uint32_t psx_brB_BFC01430 = cpu->gpr[9]; psx_taken_BFC01430 = (psx_brA_BFC01430 != psx_brB_BFC01430); psx_delay_BFC01430 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC01434: 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(0xBFC01434u); #endif if (psx_delay_BFC01430) { psx_delay_BFC01430 = 0; if (psx_taken_BFC01430) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC013F0u); goto label_BFC013F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01438u); } label_BFC01438: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01438u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01438: 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(0xBFC01438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0143Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0143C: 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(0xBFC0143Cu); #endif label_BFC01440: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01440u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01440u); #endif /* 0xBFC01440: 8D640000 lw $a0, 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, 0xBFC01440u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800u); } PGXP_LOAD(0x8D640000u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC01444: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01448: 14800004 bne $a0, $zero, 0xBFC0145C */ uint32_t psx_brA_BFC01448 = cpu->gpr[4]; uint32_t psx_brB_BFC01448 = cpu->gpr[0]; psx_taken_BFC01448 = (psx_brA_BFC01448 != psx_brB_BFC01448); psx_delay_BFC01448 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0144Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0144C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0144Cu); #endif if (psx_delay_BFC01448) { psx_delay_BFC01448 = 0; if (psx_taken_BFC01448) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0145Cu); goto label_BFC0145C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01450u); } label_BFC01450: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01450u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01450: ACA00004 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01450u); return; } g_debug_last_store_pc = 0xBFC01450u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA00004u, _pgxa, cpu->gpr[0]); } #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, 0x24u); #endif /* 0xBFC01454: 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, 0xBFC01454u); return; } g_debug_last_store_pc = 0xBFC01454u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } #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, 0x28u); #endif /* 0xBFC01458: A4A30008 sh $v1, 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, 0xBFC01458u); return; } g_debug_last_store_pc = 0xBFC01458u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC01458u); #endif label_BFC0145C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0145Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0145Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0145Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0145C: 24A50020 addiu $a1, $a1, 32 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (32)); PGXP_ALU(0x24A50020u, cpu->gpr[5], _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, 0x220u); #endif /* 0xBFC01460: 14A9FFF7 bne $a1, $t1, 0xBFC01440 */ uint32_t psx_brA_BFC01460 = cpu->gpr[5]; uint32_t psx_brB_BFC01460 = cpu->gpr[9]; psx_taken_BFC01460 = (psx_brA_BFC01460 != psx_brB_BFC01460); psx_delay_BFC01460 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC01464: 256B0004 addiu $t3, $t3, 4 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); PGXP_ALU(0x256B0004u, cpu->gpr[11], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC01464u); #endif if (psx_delay_BFC01460) { psx_delay_BFC01460 = 0; if (psx_taken_BFC01460) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01440u); goto label_BFC01440; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01468u); } label_BFC01468: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01468u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC01468: 26620050 addiu $v0, $s3, 80 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] + (80)); PGXP_ALU(0x26620050u, cpu->gpr[2], _pgx1, 0x00000050u); } #ifdef PSX_COSIM cosim_instr(0xBFC01468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0146Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0146C: 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(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, 0x80008u); #endif /* 0xBFC01470: AE630000 sw $v1, 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, 0xBFC01470u); return; } g_debug_last_store_pc = 0xBFC01470u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE630000u, _pgxa, cpu->gpr[3]); } #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, 0x80000u); #endif /* 0xBFC01474: 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(0xBFC01474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC01478: 1662FFFD bne $s3, $v0, 0xBFC01470 */ uint32_t psx_brA_BFC01478 = cpu->gpr[19]; uint32_t psx_brB_BFC01478 = cpu->gpr[2]; psx_taken_BFC01478 = (psx_brA_BFC01478 != psx_brB_BFC01478); psx_delay_BFC01478 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0147Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0147C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0147Cu); #endif if (psx_delay_BFC01478) { psx_delay_BFC01478 = 0; if (psx_taken_BFC01478) { #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, 0xBFC01480u); } label_BFC01480: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01480u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01480: 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(0xBFC01480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01484: 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(0xBFC01484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC01488: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0148Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0148C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC0148Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC01490: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01498u; /* jalr 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, 0x100011u); #endif /* 0xBFC01494: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01494u); #endif if (psx_delay_BFC01490) { psx_delay_BFC01490 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01498u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x5u); #endif /* 0xBFC01498: 14400003 bne $v0, $zero, 0xBFC014A8 */ uint32_t psx_brA_BFC01498 = cpu->gpr[2]; uint32_t psx_brB_BFC01498 = cpu->gpr[0]; psx_taken_BFC01498 = (psx_brA_BFC01498 != psx_brB_BFC01498); psx_delay_BFC01498 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0149Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0149C: 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(0xBFC0149Cu); #endif if (psx_delay_BFC01498) { psx_delay_BFC01498 = 0; if (psx_taken_BFC01498) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC014A8u); goto label_BFC014A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC014A0u); } label_BFC014A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC014A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC014A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC014A0: 0FF003A6 jal 0xBFC00E98 */ cpu->gpr[31] = 0xBFC014A8u; /* jal link before delay slot */ psx_delay_BFC014A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC014A4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC014A4u); #endif if (psx_delay_BFC014A0) { psx_delay_BFC014A0 = 0; cpu->gpr[31] = 0xBFC014A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC014A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC014A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC014A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820000u); #endif /* 0xBFC014A8: 02F1B821 addu $s7, $s7, $s1 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[23] = cpu->gpr[23] + cpu->gpr[17]; PGXP_ALU(0x02F1B821u, cpu->gpr[23], _pgx1, _pgx2); } #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, 0x800001u); #endif /* 0xBFC014AC: AEE00000 sw $zero, 0($s7) */ { uint32_t _pgxa = cpu->gpr[23]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC014ACu); return; } g_debug_last_store_pc = 0xBFC014ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAEE00000u, _pgxa, cpu->gpr[0]); } #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, 0x420000u); #endif /* 0xBFC014B0: 02D1B021 addu $s6, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D1B021u, cpu->gpr[22], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC014B4: 1000FF9D beq $zero, $zero, 0xBFC0132C */ uint32_t psx_brA_BFC014B4 = cpu->gpr[0]; uint32_t psx_brB_BFC014B4 = cpu->gpr[0]; psx_taken_BFC014B4 = (psx_brA_BFC014B4 == psx_brB_BFC014B4); psx_delay_BFC014B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC014B8: 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(0xBFC014B8u); #endif if (psx_delay_BFC014B4) { psx_delay_BFC014B4 = 0; if (psx_taken_BFC014B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0132Cu); goto label_BFC0132C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC014BCu); } label_BFC014BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC014BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC014BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC014BC: 01663021 addu $a2, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[11] + cpu->gpr[6]; PGXP_ALU(0x01663021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC014BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014C0u); #endif /* 0xBFC014C0: 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, 0xBFC014C0u); 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(0xBFC014C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC014C4: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC014C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC014C8: 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(0xBFC014C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000008u); #endif /* 0xBFC014CC: 03C31821 addu $v1, $fp, $v1 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[30] + cpu->gpr[3]; PGXP_ALU(0x03C31821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC014CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014D0u); #endif /* 0xBFC014D0: 84630008 lh $v1, 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, 0xBFC014D0u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x84630008u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC014D4: 1000FFD0 beq $zero, $zero, 0xBFC01418 */ uint32_t psx_brA_BFC014D4 = cpu->gpr[0]; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC014D8: 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, 0xBFC014D8u); return; } g_debug_last_store_pc = 0xBFC014D8u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACC80000u, _pgxa, cpu->gpr[8]); } #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, 0xBFC01418u); goto label_BFC01418; } #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, 0x40011u); #endif /* 0xBFC014DC: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC014DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC014E0: 0FF000F1 jal 0xBFC003C4 */ cpu->gpr[31] = 0xBFC014E8u; /* jal link before delay slot */ psx_delay_BFC014E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC014E4: 3C160000 lui $s6, 0x0 */ cpu->gpr[22] = 0x00000000u; PGXP_ALU(0x3C160000u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC014E4u); #endif if (psx_delay_BFC014E0) { psx_delay_BFC014E0 = 0; cpu->gpr[31] = 0xBFC014E8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC003C4u); cpu->pc = 0xBFC003C4u; return; } label_BFC014E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC014E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC014E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC014E8: 10400008 beq $v0, $zero, 0xBFC0150C */ uint32_t psx_brA_BFC014E8 = cpu->gpr[2]; uint32_t psx_brB_BFC014E8 = cpu->gpr[0]; psx_taken_BFC014E8 = (psx_brA_BFC014E8 == psx_brB_BFC014E8); psx_delay_BFC014E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC014EC: 26D64C78 addiu $s6, $s6, 19576 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (19576)); PGXP_ALU(0x26D64C78u, cpu->gpr[22], _pgx1, 0x00004C78u); } #ifdef PSX_COSIM cosim_instr(0xBFC014ECu); #endif if (psx_delay_BFC014E8) { psx_delay_BFC014E8 = 0; if (psx_taken_BFC014E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0150Cu); goto label_BFC0150C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC014F0u); } label_BFC014F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC014F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC014F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420004u); #endif /* 0xBFC014F0: 02D11021 addu $v0, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D11021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC014F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014F4u); #endif /* 0xBFC014F4: 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, 0xBFC014F4u); 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(0xBFC014F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC014F8: 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(0xBFC014F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC014FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC014FC: 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(0xBFC014FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC01500: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC01504: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC0150Cu; /* jal link before delay slot */ psx_delay_BFC01504 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010u); #endif /* 0xBFC01508: 02642021 addu $a0, $s3, $a0 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[19] + cpu->gpr[4]; PGXP_ALU(0x02642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01508u); #endif if (psx_delay_BFC01504) { psx_delay_BFC01504 = 0; cpu->gpr[31] = 0xBFC0150Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC0150C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0150Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420000u); #endif /* 0xBFC0150C: 02D1B021 addu $s6, $s6, $s1 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[22] = cpu->gpr[22] + cpu->gpr[17]; PGXP_ALU(0x02D1B021u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01510u); #endif /* 0xBFC01510: 8EC50000 lw $a1, 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, 0xBFC01510u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x400000u); } PGXP_LOAD(0x8EC50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC01510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01514: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC01518: 24A20001 addiu $v0, $a1, 1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); PGXP_ALU(0x24A20001u, cpu->gpr[2], _pgx1, 0x00000001u); } #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, 0x400004u); #endif /* 0xBFC0151C: AEC20000 sw $v0, 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, 0xBFC0151Cu); return; } g_debug_last_store_pc = 0xBFC0151Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0151Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01520: 28420014 slti $v0, $v0, 20 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (20) ? 1 : 0); PGXP_ALU(0x28420014u, cpu->gpr[2], _pgx1, 0x0014u); } #ifdef PSX_COSIM cosim_instr(0xBFC01520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01524: 1040FEA2 beq $v0, $zero, 0xBFC00FB0 */ uint32_t psx_brA_BFC01524 = cpu->gpr[2]; uint32_t psx_brB_BFC01524 = cpu->gpr[0]; psx_taken_BFC01524 = (psx_brA_BFC01524 == psx_brB_BFC01524); psx_delay_BFC01524 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01528: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01528u); #endif if (psx_delay_BFC01524) { psx_delay_BFC01524 = 0; if (psx_taken_BFC01524) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00FB0u); cpu->pc = 0xBFC00FB0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0152Cu); } label_BFC0152C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0152Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0152Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0152Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0152C: 24A50011 addiu $a1, $a1, 17 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17)); PGXP_ALU(0x24A50011u, cpu->gpr[5], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0xBFC0152Cu); #endif 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, 0x201u); #endif /* 0xBFC01530: 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(0xBFC01530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01534: 1000FEDC beq $zero, $zero, 0xBFC010A8 */ uint32_t psx_brA_BFC01534 = cpu->gpr[0]; uint32_t psx_brB_BFC01534 = cpu->gpr[0]; psx_taken_BFC01534 = (psx_brA_BFC01534 == psx_brB_BFC01534); psx_delay_BFC01534 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC01538: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01538u); #endif if (psx_delay_BFC01534) { psx_delay_BFC01534 = 0; if (psx_taken_BFC01534) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC010A8u); cpu->pc = 0xBFC010A8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0153Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0153Cu); cpu->pc = 0xBFC0153Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0153C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0153Cu); int psx_delay_BFC0154C = 0; int psx_delay_BFC01558 = 0; int psx_delay_BFC01568 = 0; int psx_taken_BFC01568 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01554u: goto label_BFC01554; case 0xBFC01560u: goto label_BFC01560; case 0xBFC01568u: goto label_BFC01568; default: break; } } label_BFC0153C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0153Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0153Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0153Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0153C: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x10u); #endif /* 0xBFC01540: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x41u); #endif /* 0xBFC01544: 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(0xBFC01544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC01548: 24A59620 addiu $a1, $a1, -27104 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-27104)); PGXP_ALU(0x24A59620u, cpu->gpr[5], _pgx1, 0xFFFF9620u); } #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, 0x80000000u); #endif /* 0xBFC0154C: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC01554u; /* jal link before delay slot */ psx_delay_BFC0154C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01550: 24849638 addiu $a0, $a0, -27080 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27080)); PGXP_ALU(0x24849638u, cpu->gpr[4], _pgx1, 0xFFFF9638u); } #ifdef PSX_COSIM cosim_instr(0xBFC01550u); #endif if (psx_delay_BFC0154C) { psx_delay_BFC0154C = 0; cpu->gpr[31] = 0xBFC01554u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC01554: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01554u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01554: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01558: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC01560u; /* jal link before delay slot */ psx_delay_BFC01558 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0155Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0155C: 24849670 addiu $a0, $a0, -27024 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27024)); PGXP_ALU(0x24849670u, cpu->gpr[4], _pgx1, 0xFFFF9670u); } #ifdef PSX_COSIM cosim_instr(0xBFC0155Cu); #endif if (psx_delay_BFC01558) { psx_delay_BFC01558 = 0; cpu->gpr[31] = 0xBFC01560u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC01560: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01560u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01560: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01564: A0402081 sb $zero, 8321($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8321; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01564u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8321)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0402081u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01564u); #endif label_BFC01568: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01568u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01568: 1000FFFF beq $zero, $zero, 0xBFC01568 */ uint32_t psx_brA_BFC01568 = cpu->gpr[0]; uint32_t psx_brB_BFC01568 = cpu->gpr[0]; psx_taken_BFC01568 = (psx_brA_BFC01568 == psx_brB_BFC01568); psx_delay_BFC01568 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0156Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0156C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0156Cu); #endif if (psx_delay_BFC01568) { psx_delay_BFC01568 = 0; if (psx_taken_BFC01568) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01568u); goto label_BFC01568; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01570u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01570u); cpu->pc = 0xBFC01570u; return; /* fallthrough */ } void OpenBIOS_func_1FC01570(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01570u); int psx_delay_BFC0158C = 0; int psx_delay_BFC01594 = 0; int psx_taken_BFC01594 = 0; int psx_delay_BFC015BC = 0; int psx_taken_BFC015BC = 0; int psx_delay_BFC015C8 = 0; int psx_delay_BFC015D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01594u: goto label_BFC01594; case 0xBFC0159Cu: goto label_BFC0159C; case 0xBFC015A4u: goto label_BFC015A4; case 0xBFC015C4u: goto label_BFC015C4; case 0xBFC015D0u: goto label_BFC015D0; default: break; } } label_BFC01570: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01570u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01570: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x4u); #endif /* 0xBFC01574: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC01578: 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(0xBFC01578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0157Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0157C: AC43AE9C sw $v1, -20836($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0157Cu); return; } g_debug_last_store_pc = 0xBFC0157Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AE9Cu, _pgxa, cpu->gpr[3]); } #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, 0xA0000000u); #endif /* 0xBFC01580: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01580u); return; } g_debug_last_store_pc = 0xBFC01580u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x201u); #endif /* 0xBFC01584: 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(0xBFC01584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01588: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #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, 0x80000004u); #endif /* 0xBFC0158C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01594u; /* jalr link before delay slot */ psx_delay_BFC0158C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01590: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01590u); #endif if (psx_delay_BFC0158C) { psx_delay_BFC0158C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01594u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x4u); #endif /* 0xBFC01594: 04410003 bgez $v0, 0xBFC015A4 */ uint32_t psx_brA_BFC01594 = cpu->gpr[2]; psx_taken_BFC01594 = ((int32_t)psx_brA_BFC01594 >= 0); psx_delay_BFC01594 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01598: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01598u); #endif if (psx_delay_BFC01594) { psx_delay_BFC01594 = 0; if (psx_taken_BFC01594) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC015A4u); goto label_BFC015A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0159Cu); } label_BFC0159C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0159Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0159Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0159Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0159C: 2442000F addiu $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2442000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC0159Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC015A0: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC015A0u); #endif label_BFC015A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC015A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC015A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC015A4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x14u); #endif /* 0xBFC015A8: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x8u); #endif /* 0xBFC015AC: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC015ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC015B0: 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(0xBFC015B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015B4u); #endif /* 0xBFC015B4: 8C420000 lw $v0, 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, 0xBFC015B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC015B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC015B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC015B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC015BC: 10400004 beq $v0, $zero, 0xBFC015D0 */ uint32_t psx_brA_BFC015BC = cpu->gpr[2]; uint32_t psx_brB_BFC015BC = cpu->gpr[0]; psx_taken_BFC015BC = (psx_brA_BFC015BC == psx_brB_BFC015BC); psx_delay_BFC015BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC015C0: 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(0xBFC015C0u); #endif if (psx_delay_BFC015BC) { psx_delay_BFC015BC = 0; if (psx_taken_BFC015BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC015D0u); goto label_BFC015D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC015C4u); } label_BFC015C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC015C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC015C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015C4u); #endif /* 0xBFC015C4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015C4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x0u); #endif /* 0xBFC015C8: 0BF003A6 j 0xBFC00E98 */ psx_delay_BFC015C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC015CC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC015CCu); #endif if (psx_delay_BFC015C8) { psx_delay_BFC015C8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC015D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC015D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC015D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015D0u); #endif /* 0xBFC015D0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC015D4: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC015D8: 03E00008 jr $ra */ psx_delay_BFC015D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC015DC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC015DCu); #endif if (psx_delay_BFC015D8) { psx_delay_BFC015D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC015E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC015E0u); int psx_delay_BFC015FC = 0; int psx_delay_BFC01604 = 0; int psx_taken_BFC01604 = 0; int psx_delay_BFC0162C = 0; int psx_taken_BFC0162C = 0; int psx_delay_BFC01638 = 0; int psx_delay_BFC01648 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01604u: goto label_BFC01604; case 0xBFC0160Cu: goto label_BFC0160C; case 0xBFC01614u: goto label_BFC01614; case 0xBFC01634u: goto label_BFC01634; case 0xBFC01640u: goto label_BFC01640; default: break; } } label_BFC015E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC015E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC015E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC015E0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC015E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC015E4: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC015E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC015E8: 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(0xBFC015E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC015EC: AC43AEA0 sw $v1, -20832($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20832; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20832)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015ECu); return; } g_debug_last_store_pc = 0xBFC015ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEA0u, _pgxa, cpu->gpr[3]); } #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, 0xA0000000u); #endif /* 0xBFC015F0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC015F0u); return; } g_debug_last_store_pc = 0xBFC015F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x201u); #endif /* 0xBFC015F4: 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(0xBFC015F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC015F8: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC015F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC015FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC015FC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01604u; /* jalr link before delay slot */ psx_delay_BFC015FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01600: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01600u); #endif if (psx_delay_BFC015FC) { psx_delay_BFC015FC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01604u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01604: 04410003 bgez $v0, 0xBFC01614 */ uint32_t psx_brA_BFC01604 = cpu->gpr[2]; psx_taken_BFC01604 = ((int32_t)psx_brA_BFC01604 >= 0); psx_delay_BFC01604 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01608: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01608u); #endif if (psx_delay_BFC01604) { psx_delay_BFC01604 = 0; if (psx_taken_BFC01604) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01614u); goto label_BFC01614; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0160Cu); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0160C: 2442000F addiu $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2442000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #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, 0x14u); #endif /* 0xBFC01610: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01610u); #endif label_BFC01614: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01614u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01614: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x14u); #endif /* 0xBFC01618: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC01618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0161Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0161C: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0161Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01620: 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(0xBFC01620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01624u); #endif /* 0xBFC01624: 8C420000 lw $v0, 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, 0xBFC01624u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01628: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0162Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0162C: 10400004 beq $v0, $zero, 0xBFC01640 */ uint32_t psx_brA_BFC0162C = cpu->gpr[2]; uint32_t psx_brB_BFC0162C = cpu->gpr[0]; psx_taken_BFC0162C = (psx_brA_BFC0162C == psx_brB_BFC0162C); psx_delay_BFC0162C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01630: 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(0xBFC01630u); #endif if (psx_delay_BFC0162C) { psx_delay_BFC0162C = 0; if (psx_taken_BFC0162C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01640u); goto label_BFC01640; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01634u); } label_BFC01634: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01634u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01634u); #endif /* 0xBFC01634: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01634u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC01638: 0BF003A6 j 0xBFC00E98 */ psx_delay_BFC01638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0163Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0163C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0163Cu); #endif if (psx_delay_BFC01638) { psx_delay_BFC01638 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC01640: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01640u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01640u); #endif /* 0xBFC01640: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01640u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC01648: 03E00008 jr $ra */ psx_delay_BFC01648 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0164Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0164C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0164Cu); #endif if (psx_delay_BFC01648) { psx_delay_BFC01648 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC01650(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01650u); int psx_delay_BFC0166C = 0; int psx_delay_BFC01674 = 0; int psx_taken_BFC01674 = 0; int psx_delay_BFC0169C = 0; int psx_taken_BFC0169C = 0; int psx_delay_BFC016A8 = 0; int psx_delay_BFC016B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01674u: goto label_BFC01674; case 0xBFC0167Cu: goto label_BFC0167C; case 0xBFC01684u: goto label_BFC01684; case 0xBFC016A4u: goto label_BFC016A4; case 0xBFC016B0u: goto label_BFC016B0; default: break; } } label_BFC01650: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01650u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01650: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC01650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01654: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC01658: 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(0xBFC01658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0165Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0165C: AC43AEA4 sw $v1, -20828($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20828; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20828)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0165Cu); return; } g_debug_last_store_pc = 0xBFC0165Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEA4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0165Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC01660: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01660u); return; } g_debug_last_store_pc = 0xBFC01660u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01664: 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(0xBFC01664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01668: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0166Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC0166C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01674u; /* jalr link before delay slot */ psx_delay_BFC0166C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01670: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01670u); #endif if (psx_delay_BFC0166C) { psx_delay_BFC0166C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01674u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x4u); #endif /* 0xBFC01674: 04410003 bgez $v0, 0xBFC01684 */ uint32_t psx_brA_BFC01674 = cpu->gpr[2]; psx_taken_BFC01674 = ((int32_t)psx_brA_BFC01674 >= 0); psx_delay_BFC01674 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01678: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #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, 0xBFC01684u); goto label_BFC01684; } #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, 0x4u); #endif /* 0xBFC0167C: 2442000F addiu $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2442000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC0167Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01680: 00022103 sra $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00022103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01680u); #endif 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, 0x8u); #endif /* 0xBFC01684: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01688: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC01688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0168Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0168C: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0168Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01690: 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(0xBFC01690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01694u); #endif /* 0xBFC01694: 8C420000 lw $v0, 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, 0xBFC01694u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01694u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0169Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0169C: 10400004 beq $v0, $zero, 0xBFC016B0 */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC016A0: 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(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, 0xBFC016B0u); goto label_BFC016B0; } #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 /* 0xBFC016A4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC016A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC016A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC016A8: 0BF003A6 j 0xBFC00E98 */ psx_delay_BFC016A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC016AC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC016ACu); #endif if (psx_delay_BFC016A8) { psx_delay_BFC016A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC016B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC016B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC016B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016B0u); #endif /* 0xBFC016B0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC016B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC016B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC016B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC016B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC016B8: 03E00008 jr $ra */ psx_delay_BFC016B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC016BC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC016BCu); #endif if (psx_delay_BFC016B8) { psx_delay_BFC016B8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC016C0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC016C0u); int psx_delay_BFC016D4 = 0; int psx_taken_BFC016D4 = 0; int psx_delay_BFC01714 = 0; int psx_delay_BFC0171C = 0; int psx_taken_BFC0171C = 0; int psx_delay_BFC0174C = 0; int psx_delay_BFC01754 = 0; int psx_taken_BFC01754 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC016DCu: goto label_BFC016DC; case 0xBFC016E0u: goto label_BFC016E0; case 0xBFC0171Cu: goto label_BFC0171C; case 0xBFC01724u: goto label_BFC01724; case 0xBFC0173Cu: goto label_BFC0173C; case 0xBFC01754u: goto label_BFC01754; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC016C0: 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(0xBFC016C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC016C4: 2486000F addiu $a2, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2486000Fu, cpu->gpr[6], _pgx1, 0x0000000Fu); } #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, 0xA0000000u); #endif /* 0xBFC016C8: 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, 0xBFC016C8u); return; } g_debug_last_store_pc = 0xBFC016C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x20040000u); #endif /* 0xBFC016CC: 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, 0xBFC016CCu); return; } g_debug_last_store_pc = 0xBFC016CCu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC016D0: 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, 0xBFC016D0u); return; } g_debug_last_store_pc = 0xBFC016D0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #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, 0x10u); #endif /* 0xBFC016D4: 04800002 bltz $a0, 0xBFC016E0 */ uint32_t psx_brA_BFC016D4 = cpu->gpr[4]; psx_taken_BFC016D4 = ((int32_t)psx_brA_BFC016D4 < 0); psx_delay_BFC016D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC016D8: 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, 0xBFC016D8u); return; } g_debug_last_store_pc = 0xBFC016D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC016D8u); #endif if (psx_delay_BFC016D4) { psx_delay_BFC016D4 = 0; if (psx_taken_BFC016D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC016E0u); goto label_BFC016E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC016DCu); } label_BFC016DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC016DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC016DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x51u); #endif /* 0xBFC016DC: 00803025 or $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(0x00803025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC016DCu); #endif label_BFC016E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC016E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC016E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC016E0: 00063103 sra $a2, $a2, 4 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 4u); PGXP_ALU(0x00063103u, cpu->gpr[6], _pgx1, 4u); } #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, 0x10000u); #endif /* 0xBFC016E4: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #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, 0x20040u); #endif /* 0xBFC016E8: 00068880 sll $s1, $a2, 2 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[17] = cpu->gpr[6] << 2u; PGXP_ALU(0x00068880u, cpu->gpr[17], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC016E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC016EC: 26104BA4 addiu $s0, $s0, 19364 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (19364)); PGXP_ALU(0x26104BA4u, cpu->gpr[16], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC016ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC016F0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC016F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC016F4: 02308021 addu $s0, $s1, $s0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[17] + cpu->gpr[16]; PGXP_ALU(0x02308021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC016F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC016F8: 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(0xBFC016F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC016FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC016FC: 24424D28 addiu $v0, $v0, 19752 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19752)); PGXP_ALU(0x24424D28u, cpu->gpr[2], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC016FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC01700: 000631C0 sll $a2, $a2, 7 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 7u; PGXP_ALU(0x000631C0u, cpu->gpr[6], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC01700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC01704: 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, 0xBFC01704u); return; } g_debug_last_store_pc = 0xBFC01704u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120000u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC01708: 00463021 addu $a2, $v0, $a2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[6]; PGXP_ALU(0x00463021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0170Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0170C: 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(0xBFC0170Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01710: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC01714: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC0171Cu; /* jalr link before delay slot */ psx_delay_BFC01714 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01718: 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(0xBFC01718u); #endif if (psx_delay_BFC01714) { psx_delay_BFC01714 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC0171Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0171C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0171Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0171Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0171Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0171C: 1040000D beq $v0, $zero, 0xBFC01754 */ uint32_t psx_brA_BFC0171C = cpu->gpr[2]; uint32_t psx_brB_BFC0171C = cpu->gpr[0]; psx_taken_BFC0171C = (psx_brA_BFC0171C == psx_brB_BFC0171C); psx_delay_BFC0171C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01720: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01720u); #endif if (psx_delay_BFC0171C) { psx_delay_BFC0171C = 0; if (psx_taken_BFC0171C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01754u); goto label_BFC01754; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01724u); } label_BFC01724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01724u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01724: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01728: 24424C80 addiu $v0, $v0, 19584 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19584)); PGXP_ALU(0x24424C80u, cpu->gpr[2], _pgx1, 0x00004C80u); } #ifdef PSX_COSIM cosim_instr(0xBFC01728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0172Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0172C: 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(0xBFC0172Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01730: 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(0xBFC01730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC01734: 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, 0xBFC01734u); return; } g_debug_last_store_pc = 0xBFC01734u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120000u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01738: AE220000 sw $v0, 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, 0xBFC01738u); return; } g_debug_last_store_pc = 0xBFC01738u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01738u); #endif label_BFC0173C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0173Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0173Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0173Cu); #endif /* 0xBFC0173C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0173Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0173Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01740u); #endif /* 0xBFC01740: 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, 0xBFC01740u); 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(0xBFC01740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01744u); #endif /* 0xBFC01744: 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, 0xBFC01744u); 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(0xBFC01744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01748u); #endif /* 0xBFC01748: 8FB00010 lw $s0, 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, 0xBFC01748u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0174Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0174C: 03E00008 jr $ra */ psx_delay_BFC0174C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01750: 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(0xBFC01750u); #endif if (psx_delay_BFC0174C) { psx_delay_BFC0174C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC01754: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01754u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01754: 1000FFF9 beq $zero, $zero, 0xBFC0173C */ uint32_t psx_brA_BFC01754 = cpu->gpr[0]; uint32_t psx_brB_BFC01754 = cpu->gpr[0]; psx_taken_BFC01754 = (psx_brA_BFC01754 == psx_brB_BFC01754); psx_delay_BFC01754 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01758: 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, 0xBFC01758u); return; } g_debug_last_store_pc = 0xBFC01758u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01758u); #endif if (psx_delay_BFC01754) { psx_delay_BFC01754 = 0; if (psx_taken_BFC01754) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0173Cu); goto label_BFC0173C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0175Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0175Cu); cpu->pc = 0xBFC0175Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0175C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0175Cu); int psx_delay_BFC0176C = 0; int psx_delay_BFC01774 = 0; int psx_taken_BFC01774 = 0; int psx_delay_BFC0178C = 0; int psx_delay_BFC017A4 = 0; int psx_delay_BFC017B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01774u: goto label_BFC01774; case 0xBFC0177Cu: goto label_BFC0177C; case 0xBFC01794u: goto label_BFC01794; case 0xBFC017ACu: goto label_BFC017AC; case 0xBFC017B0u: goto label_BFC017B0; default: break; } } label_BFC0175C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0175Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0175Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0175Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0175C: 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(0xBFC0175Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC01760: 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, 0xBFC01760u); return; } g_debug_last_store_pc = 0xBFC01760u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40050u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC01760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC01764: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC01764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC01768: 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, 0xBFC01768u); return; } g_debug_last_store_pc = 0xBFC01768u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC0176C: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC01774u; /* jal link before delay slot */ psx_delay_BFC0176C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC01770: 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, 0xBFC01770u); return; } g_debug_last_store_pc = 0xBFC01770u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50054u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC01770u); #endif if (psx_delay_BFC0176C) { psx_delay_BFC0176C = 0; cpu->gpr[31] = 0xBFC01774u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } 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, 0x5u); #endif /* 0xBFC01774: 1440000E bne $v0, $zero, 0xBFC017B0 */ uint32_t psx_brA_BFC01774 = cpu->gpr[2]; 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, 0x40u); #endif /* 0xBFC01778: 3C06BFC0 lui $a2, 0xBFC0 */ cpu->gpr[6] = 0xBFC00000u; PGXP_ALU(0x3C06BFC0u, cpu->gpr[6], 0u, 0u); #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, 0xBFC017B0u); goto label_BFC017B0; } #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 /* 0xBFC0177C: 8FA70054 lw $a3, 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, 0xBFC0177Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } PGXP_LOAD(0x8FA70054u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC0177Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01780u); #endif /* 0xBFC01780: 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, 0xBFC01780u); 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(0xBFC01780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC01784: 24C60514 addiu $a2, $a2, 1300 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1300)); PGXP_ALU(0x24C60514u, cpu->gpr[6], _pgx1, 0x00000514u); } #ifdef PSX_COSIM cosim_instr(0xBFC01784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC01788: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC01788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0178Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0178C: 0FF00358 jal 0xBFC00D60 */ cpu->gpr[31] = 0xBFC01794u; /* jal link before delay slot */ psx_delay_BFC0178C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC01790: 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, 0xBFC01790u); return; } g_debug_last_store_pc = 0xBFC01790u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01790u); #endif if (psx_delay_BFC0178C) { psx_delay_BFC0178C = 0; cpu->gpr[31] = 0xBFC01794u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D60u); cpu->pc = 0xBFC00D60u; return; } label_BFC01794: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01794u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01794u); #endif /* 0xBFC01794: 8FA70054 lw $a3, 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, 0xBFC01794u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } PGXP_LOAD(0x8FA70054u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC01794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01798u); #endif /* 0xBFC01798: 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, 0xBFC01798u); 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(0xBFC01798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0179Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0179C: 3C06BFC0 lui $a2, 0xBFC0 */ cpu->gpr[6] = 0xBFC00000u; PGXP_ALU(0x3C06BFC0u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0179Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC017A0: 24C60520 addiu $a2, $a2, 1312 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (1312)); PGXP_ALU(0x24C60520u, cpu->gpr[6], _pgx1, 0x00000520u); } #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, 0x80000000u); #endif /* 0xBFC017A4: 0FF00358 jal 0xBFC00D60 */ cpu->gpr[31] = 0xBFC017ACu; /* jal link before delay slot */ psx_delay_BFC017A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC017A8: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC017A8u); #endif if (psx_delay_BFC017A4) { psx_delay_BFC017A4 = 0; cpu->gpr[31] = 0xBFC017ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00D60u); cpu->pc = 0xBFC00D60u; return; } 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 /* 0xBFC017AC: 8FA20040 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC017ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC017ACu); #endif label_BFC017B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC017B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC017B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017B0u); #endif /* 0xBFC017B0: 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, 0xBFC017B0u); 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(0xBFC017B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC017B4: 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(0xBFC017B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC017B8: 03E00008 jr $ra */ psx_delay_BFC017B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC017BC: 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(0xBFC017BCu); #endif if (psx_delay_BFC017B8) { psx_delay_BFC017B8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC017C0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC017C0u); int psx_delay_BFC017C8 = 0; 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, 0x8u); #endif /* 0xBFC017C0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC017C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017C4u); #endif /* 0xBFC017C4: 8C624BA0 lw $v0, 19360($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC017C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C624BA0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC017C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC017C8: 03E00008 jr $ra */ psx_delay_BFC017C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC017CC: AC644BA0 sw $a0, 19360($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19360; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC017CCu); return; } g_debug_last_store_pc = 0xBFC017CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644BA0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC017CCu); #endif if (psx_delay_BFC017C8) { psx_delay_BFC017C8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC017D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC017D0u); int psx_delay_BFC017D8 = 0; int psx_taken_BFC017D8 = 0; int psx_delay_BFC01800 = 0; int psx_taken_BFC01800 = 0; int psx_delay_BFC01810 = 0; int psx_delay_BFC01820 = 0; int psx_delay_BFC01828 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC017E0u: goto label_BFC017E0; case 0xBFC017E4u: goto label_BFC017E4; case 0xBFC01808u: goto label_BFC01808; case 0xBFC01818u: goto label_BFC01818; case 0xBFC01828u: goto label_BFC01828; default: break; } } 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 /* 0xBFC017D0: 8C820004 lw $v0, 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, 0xBFC017D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC017D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC017D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC017D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC017D8: 04410002 bgez $v0, 0xBFC017E4 */ uint32_t psx_brA_BFC017D8 = cpu->gpr[2]; psx_taken_BFC017D8 = ((int32_t)psx_brA_BFC017D8 >= 0); psx_delay_BFC017D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC017DC: 00000000 nop */ /* nop */ #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, 0xBFC017E4u); goto label_BFC017E4; } #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, 0x4u); #endif /* 0xBFC017E0: 2442000F addiu $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2442000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC017E0u); #endif label_BFC017E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC017E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC017E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC017E4: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC017E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC017E8: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC017E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC017EC: 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(0xBFC017ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC017F0: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC017F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC017F4: 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(0xBFC017F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC017F8u); #endif /* 0xBFC017F8: 8C420000 lw $v0, 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, 0xBFC017F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC017FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC017FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01800: 14400009 bne $v0, $zero, 0xBFC01828 */ uint32_t psx_brA_BFC01800 = cpu->gpr[2]; uint32_t psx_brB_BFC01800 = cpu->gpr[0]; psx_taken_BFC01800 = (psx_brA_BFC01800 != psx_brB_BFC01800); psx_delay_BFC01800 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01804: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01804u); #endif if (psx_delay_BFC01800) { psx_delay_BFC01800 = 0; if (psx_taken_BFC01800) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01828u); goto label_BFC01828; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01808u); } label_BFC01808: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01808u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01808: 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(0xBFC01808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0180Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0180C: 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, 0xBFC0180Cu); return; } g_debug_last_store_pc = 0xBFC0180Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC01810: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC01818u; /* jal link before delay slot */ psx_delay_BFC01810 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC01814: 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, 0xBFC01814u); return; } g_debug_last_store_pc = 0xBFC01814u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01814u); #endif if (psx_delay_BFC01810) { psx_delay_BFC01810 = 0; cpu->gpr[31] = 0xBFC01818u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } 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 /* 0xBFC01818: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01818u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0181Cu); #endif /* 0xBFC0181C: 8FA20010 lw $v0, 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, 0xBFC0181Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0181Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC01820: 03E00008 jr $ra */ psx_delay_BFC01820 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01824: 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(0xBFC01824u); #endif if (psx_delay_BFC01820) { psx_delay_BFC01820 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x80000001u); #endif /* 0xBFC01828: 03E00008 jr $ra */ psx_delay_BFC01828 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0182Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0182C: 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(0xBFC0182Cu); #endif if (psx_delay_BFC01828) { psx_delay_BFC01828 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC01830(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01830u); int psx_delay_BFC01850 = 0; int psx_taken_BFC01850 = 0; int psx_delay_BFC01880 = 0; int psx_delay_BFC01888 = 0; int psx_taken_BFC01888 = 0; int psx_delay_BFC018B8 = 0; int psx_delay_BFC018C0 = 0; int psx_taken_BFC018C0 = 0; int psx_delay_BFC018F4 = 0; int psx_taken_BFC018F4 = 0; int psx_delay_BFC01918 = 0; int psx_delay_BFC01920 = 0; int psx_delay_BFC01928 = 0; int psx_taken_BFC01928 = 0; int psx_delay_BFC01930 = 0; int psx_taken_BFC01930 = 0; int psx_delay_BFC01954 = 0; int psx_delay_BFC01964 = 0; int psx_taken_BFC01964 = 0; int psx_delay_BFC01974 = 0; int psx_taken_BFC01974 = 0; int psx_delay_BFC01988 = 0; int psx_taken_BFC01988 = 0; int psx_delay_BFC019AC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01858u: goto label_BFC01858; case 0xBFC0185Cu: goto label_BFC0185C; case 0xBFC01888u: goto label_BFC01888; case 0xBFC01890u: goto label_BFC01890; case 0xBFC018B0u: goto label_BFC018B0; case 0xBFC018C0u: goto label_BFC018C0; case 0xBFC018C8u: goto label_BFC018C8; case 0xBFC018ECu: goto label_BFC018EC; case 0xBFC018FCu: goto label_BFC018FC; case 0xBFC01920u: goto label_BFC01920; case 0xBFC01928u: goto label_BFC01928; case 0xBFC01930u: goto label_BFC01930; case 0xBFC01938u: goto label_BFC01938; case 0xBFC0195Cu: goto label_BFC0195C; case 0xBFC0196Cu: goto label_BFC0196C; case 0xBFC0197Cu: goto label_BFC0197C; case 0xBFC01990u: goto label_BFC01990; default: break; } } 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, 0x20000000u); #endif /* 0xBFC01830: 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(0xBFC01830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC01834: 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, 0xBFC01834u); return; } g_debug_last_store_pc = 0xBFC01834u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC01838: 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, 0xBFC01838u); return; } g_debug_last_store_pc = 0xBFC01838u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0183Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0183C: 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, 0xBFC0183Cu); return; } g_debug_last_store_pc = 0xBFC0183Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0183Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC01840: 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, 0xBFC01840u); return; } g_debug_last_store_pc = 0xBFC01840u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC01844: 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, 0xBFC01844u); return; } g_debug_last_store_pc = 0xBFC01844u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20010000u); #endif /* 0xBFC01848: 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, 0xBFC01848u); return; } g_debug_last_store_pc = 0xBFC01848u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0184Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC0184C: 00809825 or $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(0x00809825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0184Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01850: 04800002 bltz $a0, 0xBFC0185C */ uint32_t psx_brA_BFC01850 = cpu->gpr[4]; psx_taken_BFC01850 = ((int32_t)psx_brA_BFC01850 < 0); psx_delay_BFC01850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC01854: 2491000F addiu $s1, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2491000Fu, cpu->gpr[17], _pgx1, 0x0000000Fu); } #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, 0xBFC0185Cu); goto label_BFC0185C; } #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, 0x20011u); #endif /* 0xBFC01858: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01858u); #endif label_BFC0185C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0185Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0185C: 00118903 sra $s1, $s1, 4 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 4u); PGXP_ALU(0x00118903u, cpu->gpr[17], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC01860: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01864: 001111C0 sll $v0, $s1, 7 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] << 7u; PGXP_ALU(0x001111C0u, cpu->gpr[2], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC01864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC01868: 26524D28 addiu $s2, $s2, 19752 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19752)); PGXP_ALU(0x26524D28u, cpu->gpr[18], _pgx1, 0x00004D28u); } #ifdef PSX_COSIM cosim_instr(0xBFC01868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0186Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0186C: 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(0xBFC0186Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01870: 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(0xBFC01870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01874: 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(0xBFC01874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC01878: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC0187C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC0187Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC01880: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01888u; /* jalr link before delay slot */ psx_delay_BFC01880 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC01884: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01884u); #endif if (psx_delay_BFC01880) { psx_delay_BFC01880 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01888u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC01888: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01888u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01888: 14400025 bne $v0, $zero, 0xBFC01920 */ uint32_t psx_brA_BFC01888 = cpu->gpr[2]; uint32_t psx_brB_BFC01888 = cpu->gpr[0]; psx_taken_BFC01888 = (psx_brA_BFC01888 != psx_brB_BFC01888); psx_delay_BFC01888 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0188Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC0188C: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0188Cu); #endif if (psx_delay_BFC01888) { psx_delay_BFC01888 = 0; if (psx_taken_BFC01888) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01920u); goto label_BFC01920; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01890u); } label_BFC01890: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01890u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01890: 00111100 sll $v0, $s1, 4 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] << 4u; PGXP_ALU(0x00111100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01894: 00511023 subu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[17]; PGXP_ALU(0x00511023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC01898: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0189Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0189C: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC0189Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC018A0: 26524E28 addiu $s2, $s2, 20008 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (20008)); PGXP_ALU(0x26524E28u, cpu->gpr[18], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC018A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC018A4: 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(0xBFC018A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC018A8: 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(0xBFC018A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC018AC: 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(0xBFC018ACu); #endif 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, 0x40011u); #endif /* 0xBFC018B0: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC018B4: 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(0xBFC018B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC018B8: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC018C0u; /* jal link before delay slot */ psx_delay_BFC018B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC018BC: 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(0xBFC018BCu); #endif if (psx_delay_BFC018B8) { psx_delay_BFC018B8 = 0; cpu->gpr[31] = 0xBFC018C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC018C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC018C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC018C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180000u); #endif /* 0xBFC018C0: 1674FFFB bne $s3, $s4, 0xBFC018B0 */ uint32_t psx_brA_BFC018C0 = cpu->gpr[19]; uint32_t psx_brB_BFC018C0 = cpu->gpr[20]; psx_taken_BFC018C0 = (psx_brA_BFC018C0 != psx_brB_BFC018C0); psx_delay_BFC018C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC018C4: 26520020 addiu $s2, $s2, 32 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (32)); PGXP_ALU(0x26520020u, cpu->gpr[18], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC018C4u); #endif if (psx_delay_BFC018C0) { psx_delay_BFC018C0 = 0; if (psx_taken_BFC018C0) { #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, 0xBFC018C8u); } label_BFC018C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC018C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC018C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC018C8: 00111880 sll $v1, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[17] << 2u; PGXP_ALU(0x00111880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC018C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC018CC: 00711821 addu $v1, $v1, $s1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[17]; PGXP_ALU(0x00711821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC018CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC018D0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x8u); #endif /* 0xBFC018D4: 00031900 sll $v1, $v1, 4 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 4u; PGXP_ALU(0x00031900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC018D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC018D8: 24424C88 addiu $v0, $v0, 19592 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19592)); PGXP_ALU(0x24424C88u, cpu->gpr[2], _pgx1, 0x00004C88u); } #ifdef PSX_COSIM cosim_instr(0xBFC018D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC018DC: 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(0xBFC018DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC018E0: 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(0xBFC018E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC018E4: 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(0xBFC018E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC018E8: 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(0xBFC018E8u); #endif label_BFC018EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC018ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC018ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC018EC: 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(0xBFC018ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC018F0: 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, 0xBFC018F0u); return; } g_debug_last_store_pc = 0xBFC018F0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _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, 0x18u); #endif /* 0xBFC018F4: 1464FFFD bne $v1, $a0, 0xBFC018EC */ uint32_t psx_brA_BFC018F4 = cpu->gpr[3]; uint32_t psx_brB_BFC018F4 = cpu->gpr[4]; psx_taken_BFC018F4 = (psx_brA_BFC018F4 != psx_brB_BFC018F4); psx_delay_BFC018F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC018F8: 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(0xBFC018F8u); #endif if (psx_delay_BFC018F4) { psx_delay_BFC018F4 = 0; if (psx_taken_BFC018F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC018ECu); goto label_BFC018EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC018FCu); } label_BFC018FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC018FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC018FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC018FCu); #endif /* 0xBFC018FC: 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, 0xBFC018FCu); 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(0xBFC018FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01900u); #endif /* 0xBFC01900: 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, 0xBFC01900u); 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(0xBFC01900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01904u); #endif /* 0xBFC01904: 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, 0xBFC01904u); 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(0xBFC01904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01908u); #endif /* 0xBFC01908: 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, 0xBFC01908u); 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(0xBFC01908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0190Cu); #endif /* 0xBFC0190C: 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, 0xBFC0190Cu); 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(0xBFC0190Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC01910: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01914u); #endif /* 0xBFC01914: 8FB00010 lw $s0, 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, 0xBFC01914u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x20000000u); #endif /* 0xBFC0191C: 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(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 */ } 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, 0x80000000u); #endif /* 0xBFC01920: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC01928u; /* jal link before delay slot */ psx_delay_BFC01920 = 1; #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 if (psx_delay_BFC01920) { psx_delay_BFC01920 = 0; cpu->gpr[31] = 0xBFC01928u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC01928: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01928u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01928: 1040000C beq $v0, $zero, 0xBFC0195C */ uint32_t psx_brA_BFC01928 = cpu->gpr[2]; uint32_t psx_brB_BFC01928 = cpu->gpr[0]; psx_taken_BFC01928 = (psx_brA_BFC01928 == psx_brB_BFC01928); psx_delay_BFC01928 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0192Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0192C: 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(0xBFC0192Cu); #endif if (psx_delay_BFC01928) { psx_delay_BFC01928 = 0; if (psx_taken_BFC01928) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0195Cu); goto label_BFC0195C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01930u); } label_BFC01930: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01930u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01930: 1443FFF2 bne $v0, $v1, 0xBFC018FC */ uint32_t psx_brA_BFC01930 = cpu->gpr[2]; uint32_t psx_brB_BFC01930 = cpu->gpr[3]; psx_taken_BFC01930 = (psx_brA_BFC01930 != psx_brB_BFC01930); psx_delay_BFC01930 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01934: 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(0xBFC01934u); #endif if (psx_delay_BFC01930) { psx_delay_BFC01930 = 0; if (psx_taken_BFC01930) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC018FCu); goto label_BFC018FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01938u); } label_BFC01938: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01938u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01938u); #endif /* 0xBFC01938: 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, 0xBFC01938u); 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(0xBFC01938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0193Cu); #endif /* 0xBFC0193C: 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, 0xBFC0193Cu); 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(0xBFC0193Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01940u); #endif /* 0xBFC01940: 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, 0xBFC01940u); 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(0xBFC01940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01944u); #endif /* 0xBFC01944: 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, 0xBFC01944u); 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(0xBFC01944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01948u); #endif /* 0xBFC01948: 8FB00010 lw $s0, 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, 0xBFC01948u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80011u); #endif /* 0xBFC0194C: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0194Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01950u); #endif /* 0xBFC01950: 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, 0xBFC01950u); 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(0xBFC01950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC01954: 0BF00225 j 0xBFC00894 */ psx_delay_BFC01954 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01958: 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(0xBFC01958u); #endif if (psx_delay_BFC01954) { psx_delay_BFC01954 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00894u); cpu->pc = 0xBFC00894u; return; } label_BFC0195C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0195Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0195Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0195Cu); #endif /* 0xBFC0195C: 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(0xBFC0195Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01960: 2402004D addiu $v0, $zero, 77 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); PGXP_ALU(0x2402004Du, cpu->gpr[2], _pgx1, 0x0000004Du); } #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, 0xCu); #endif /* 0xBFC01964: 14620005 bne $v1, $v0, 0xBFC0197C */ uint32_t psx_brA_BFC01964 = cpu->gpr[3]; uint32_t psx_brB_BFC01964 = cpu->gpr[2]; psx_taken_BFC01964 = (psx_brA_BFC01964 != psx_brB_BFC01964); psx_delay_BFC01964 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01968: 24020043 addiu $v0, $zero, 67 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); PGXP_ALU(0x24020043u, cpu->gpr[2], _pgx1, 0x00000043u); } #ifdef PSX_COSIM cosim_instr(0xBFC01968u); #endif if (psx_delay_BFC01964) { psx_delay_BFC01964 = 0; if (psx_taken_BFC01964) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0197Cu); goto label_BFC0197C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0196Cu); } label_BFC0196C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0196Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0196Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0196Cu); #endif /* 0xBFC0196C: 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(0xBFC0196Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01970: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC01974: 1062FFE1 beq $v1, $v0, 0xBFC018FC */ uint32_t psx_brA_BFC01974 = cpu->gpr[3]; uint32_t psx_brB_BFC01974 = cpu->gpr[2]; psx_taken_BFC01974 = (psx_brA_BFC01974 == psx_brB_BFC01974); psx_delay_BFC01974 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01978: 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(0xBFC01978u); #endif if (psx_delay_BFC01974) { psx_delay_BFC01974 = 0; if (psx_taken_BFC01974) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC018FCu); goto label_BFC018FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0197Cu); } label_BFC0197C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0197Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0197Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0197Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0197C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0197Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01980u); #endif /* 0xBFC01980: 8C504BA0 lw $s0, 19360($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19360; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19360)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01980u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C504BA0u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01984: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01988: 1200FFDC beq $s0, $zero, 0xBFC018FC */ uint32_t psx_brA_BFC01988 = cpu->gpr[16]; uint32_t psx_brB_BFC01988 = cpu->gpr[0]; psx_taken_BFC01988 = (psx_brA_BFC01988 == psx_brB_BFC01988); psx_delay_BFC01988 = 1; #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 if (psx_delay_BFC01988) { psx_delay_BFC01988 = 0; if (psx_taken_BFC01988) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC018FCu); goto label_BFC018FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01990u); } label_BFC01990: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01990u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01990u); #endif /* 0xBFC01990: 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, 0xBFC01990u); 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(0xBFC01990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01994u); #endif /* 0xBFC01994: 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, 0xBFC01994u); 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(0xBFC01994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01998u); #endif /* 0xBFC01998: 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, 0xBFC01998u); 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(0xBFC01998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0199Cu); #endif /* 0xBFC0199C: 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, 0xBFC0199Cu); 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(0xBFC0199Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019A0u); #endif /* 0xBFC019A0: 8FB00010 lw $s0, 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, 0xBFC019A0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80011u); #endif /* 0xBFC019A4: 02602025 or $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(0x02602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC019A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019A8u); #endif /* 0xBFC019A8: 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, 0xBFC019A8u); 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(0xBFC019A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC019AC: 0BF001B2 j 0xBFC006C8 */ psx_delay_BFC019AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC019B0: 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(0xBFC019B0u); #endif if (psx_delay_BFC019AC) { psx_delay_BFC019AC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC006C8u); cpu->pc = 0xBFC006C8u; return; } } void OpenBIOS_func_1FC019B4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC019B4u); int psx_delay_BFC019D0 = 0; int psx_taken_BFC019D0 = 0; int psx_delay_BFC019F8 = 0; int psx_taken_BFC019F8 = 0; int psx_delay_BFC01A00 = 0; int psx_delay_BFC01A0C = 0; int psx_delay_BFC01A14 = 0; int psx_taken_BFC01A14 = 0; int psx_delay_BFC01A30 = 0; int psx_delay_BFC01A3C = 0; int psx_taken_BFC01A3C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC019D8u: goto label_BFC019D8; case 0xBFC019DCu: goto label_BFC019DC; case 0xBFC01A00u: goto label_BFC01A00; case 0xBFC01A08u: goto label_BFC01A08; case 0xBFC01A14u: goto label_BFC01A14; case 0xBFC01A1Cu: goto label_BFC01A1C; case 0xBFC01A38u: goto label_BFC01A38; default: break; } } label_BFC019B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC019B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC019B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC019B4: 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(0xBFC019B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC019B8: 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, 0xBFC019B8u); return; } g_debug_last_store_pc = 0xBFC019B8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0xA0000000u); #endif /* 0xBFC019BC: 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, 0xBFC019BCu); return; } g_debug_last_store_pc = 0xBFC019BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #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, 0x20010000u); #endif /* 0xBFC019C0: 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, 0xBFC019C0u); return; } g_debug_last_store_pc = 0xBFC019C0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #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, 0x20011u); #endif /* 0xBFC019C4: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC019C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019C8u); #endif /* 0xBFC019C8: 8C840004 lw $a0, 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, 0xBFC019C8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } PGXP_LOAD(0x8C840004u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC019CC: 00000000 nop */ /* nop */ #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, 0x10u); #endif /* 0xBFC019D0: 04800002 bltz $a0, 0xBFC019DC */ uint32_t psx_brA_BFC019D0 = cpu->gpr[4]; psx_taken_BFC019D0 = ((int32_t)psx_brA_BFC019D0 < 0); psx_delay_BFC019D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC019D4: 2482000F addiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2482000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC019D4u); #endif if (psx_delay_BFC019D0) { psx_delay_BFC019D0 = 0; if (psx_taken_BFC019D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC019DCu); goto label_BFC019DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC019D8u); } label_BFC019D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC019D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC019D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC019D8: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC019D8u); #endif label_BFC019DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC019DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC019DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC019DC: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #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, 0x8u); #endif /* 0xBFC019E0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x4u); #endif /* 0xBFC019E4: 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(0xBFC019E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC019E8: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #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, 0xCu); #endif /* 0xBFC019EC: 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(0xBFC019ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019F0u); #endif /* 0xBFC019F0: 8C500000 lw $s0, 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, 0xBFC019F0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500000u, _pgxa, cpu->gpr[16]); } #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, 0x1u); #endif /* 0xBFC019F4: 00000000 nop */ /* nop */ #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, 0x10001u); #endif /* 0xBFC019F8: 1600000F bne $s0, $zero, 0xBFC01A38 */ uint32_t psx_brA_BFC019F8 = cpu->gpr[16]; uint32_t psx_brB_BFC019F8 = cpu->gpr[0]; psx_taken_BFC019F8 = (psx_brA_BFC019F8 != psx_brB_BFC019F8); psx_delay_BFC019F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC019FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC019FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC019FCu); #endif if (psx_delay_BFC019F8) { psx_delay_BFC019F8 = 0; if (psx_taken_BFC019F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A38u); goto label_BFC01A38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A00u); } label_BFC01A00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01A00: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC01A08u; /* jal link before delay slot */ psx_delay_BFC01A00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC01A04: AFA40010 sw $a0, 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, 0xBFC01A04u); return; } g_debug_last_store_pc = 0xBFC01A04u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A04u); #endif if (psx_delay_BFC01A00) { psx_delay_BFC01A00 = 0; cpu->gpr[31] = 0xBFC01A08u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC01A08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A08u); #endif /* 0xBFC01A08: 8FA40010 lw $a0, 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, 0xBFC01A08u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x80000000u); #endif /* 0xBFC01A0C: 0FF001B2 jal 0xBFC006C8 */ cpu->gpr[31] = 0xBFC01A14u; /* jal link before delay slot */ psx_delay_BFC01A0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01A10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01A10u); #endif if (psx_delay_BFC01A0C) { psx_delay_BFC01A0C = 0; cpu->gpr[31] = 0xBFC01A14u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC006C8u); cpu->pc = 0xBFC006C8u; return; } label_BFC01A14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01A14: 10400008 beq $v0, $zero, 0xBFC01A38 */ uint32_t psx_brA_BFC01A14 = cpu->gpr[2]; uint32_t psx_brB_BFC01A14 = cpu->gpr[0]; psx_taken_BFC01A14 = (psx_brA_BFC01A14 == psx_brB_BFC01A14); psx_delay_BFC01A14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01A18: 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(0xBFC01A18u); #endif if (psx_delay_BFC01A14) { psx_delay_BFC01A14 = 0; if (psx_taken_BFC01A14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A38u); goto label_BFC01A38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A1Cu); } label_BFC01A1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01A1C: AE220018 sw $v0, 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, 0xBFC01A1Cu); return; } g_debug_last_store_pc = 0xBFC01A1Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A20u); #endif /* 0xBFC01A20: 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, 0xBFC01A20u); 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(0xBFC01A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A24u); #endif /* 0xBFC01A24: 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, 0xBFC01A24u); 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(0xBFC01A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC01A28: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A2Cu); #endif /* 0xBFC01A2C: 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, 0xBFC01A2Cu); 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(0xBFC01A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC01A30: 03E00008 jr $ra */ psx_delay_BFC01A30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01A34: 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(0xBFC01A34u); #endif if (psx_delay_BFC01A30) { psx_delay_BFC01A30 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x5u); #endif /* 0xBFC01A38: 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(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: 1000FFF7 beq $zero, $zero, 0xBFC01A1C */ uint32_t psx_brA_BFC01A3C = cpu->gpr[0]; uint32_t psx_brB_BFC01A3C = cpu->gpr[0]; psx_taken_BFC01A3C = (psx_brA_BFC01A3C == psx_brB_BFC01A3C); psx_delay_BFC01A3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01A40: 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(0xBFC01A40u); #endif if (psx_delay_BFC01A3C) { psx_delay_BFC01A3C = 0; if (psx_taken_BFC01A3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A1Cu); goto label_BFC01A1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A44u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A44u); cpu->pc = 0xBFC01A44u; return; /* fallthrough */ } void OpenBIOS_func_1FC01A44(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01A44u); int psx_delay_BFC01A60 = 0; int psx_delay_BFC01A6C = 0; int psx_delay_BFC01A7C = 0; int psx_taken_BFC01A7C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01A68u: goto label_BFC01A68; case 0xBFC01A74u: goto label_BFC01A74; case 0xBFC01A7Cu: goto label_BFC01A7C; default: break; } } label_BFC01A44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC01A44: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x10u); #endif /* 0xBFC01A48: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x20000000u); #endif /* 0xBFC01A4C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20u); #endif /* 0xBFC01A50: 24A59684 addiu $a1, $a1, -27004 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-27004)); PGXP_ALU(0x24A59684u, cpu->gpr[5], _pgx1, 0xFFFF9684u); } #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, 0x10u); #endif /* 0xBFC01A54: 24849690 addiu $a0, $a0, -26992 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26992)); PGXP_ALU(0x24849690u, cpu->gpr[4], _pgx1, 0xFFFF9690u); } #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, 0xA0000000u); #endif /* 0xBFC01A58: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01A58u); return; } g_debug_last_store_pc = 0xBFC01A58u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000041u); #endif /* 0xBFC01A5C: 03E03025 or $a2, $ra, $zero */ { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[31] | cpu->gpr[0]; PGXP_ALU(0x03E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01A60: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC01A68u; /* jal link before delay slot */ psx_delay_BFC01A60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01A64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01A64u); #endif if (psx_delay_BFC01A60) { psx_delay_BFC01A60 = 0; cpu->gpr[31] = 0xBFC01A68u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC01A68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01A68: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC01A6C: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC01A74u; /* jal link before delay slot */ psx_delay_BFC01A6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01A70: 24849670 addiu $a0, $a0, -27024 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27024)); PGXP_ALU(0x24849670u, cpu->gpr[4], _pgx1, 0xFFFF9670u); } #ifdef PSX_COSIM cosim_instr(0xBFC01A70u); #endif if (psx_delay_BFC01A6C) { psx_delay_BFC01A6C = 0; cpu->gpr[31] = 0xBFC01A74u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC01A74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01A74: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01A78: A0402081 sb $zero, 8321($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8321; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01A78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8321)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0402081u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A78u); #endif label_BFC01A7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01A7C: 1000FFFF beq $zero, $zero, 0xBFC01A7C */ uint32_t psx_brA_BFC01A7C = cpu->gpr[0]; uint32_t psx_brB_BFC01A7C = cpu->gpr[0]; psx_taken_BFC01A7C = (psx_brA_BFC01A7C == psx_brB_BFC01A7C); psx_delay_BFC01A7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01A80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01A80u); #endif if (psx_delay_BFC01A7C) { psx_delay_BFC01A7C = 0; if (psx_taken_BFC01A7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A7Cu); goto label_BFC01A7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; /* fallthrough */ } void OpenBIOS_func_1FC01A84(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01A84u); int psx_delay_BFC01AAC = 0; int psx_taken_BFC01AAC = 0; int psx_delay_BFC01AEC = 0; int psx_taken_BFC01AEC = 0; int psx_delay_BFC01AF4 = 0; int psx_taken_BFC01AF4 = 0; int psx_delay_BFC01AFC = 0; int psx_delay_BFC01B08 = 0; int psx_taken_BFC01B08 = 0; int psx_delay_BFC01B10 = 0; int psx_taken_BFC01B10 = 0; int psx_delay_BFC01B1C = 0; int psx_taken_BFC01B1C = 0; int psx_delay_BFC01B24 = 0; int psx_taken_BFC01B24 = 0; int psx_delay_BFC01B3C = 0; int psx_taken_BFC01B3C = 0; int psx_delay_BFC01B44 = 0; int psx_taken_BFC01B44 = 0; int psx_delay_BFC01B54 = 0; int psx_taken_BFC01B54 = 0; int psx_delay_BFC01B5C = 0; int psx_taken_BFC01B5C = 0; int psx_delay_BFC01B64 = 0; int psx_taken_BFC01B64 = 0; int psx_delay_BFC01B98 = 0; int psx_delay_BFC01BA0 = 0; int psx_taken_BFC01BA0 = 0; int psx_delay_BFC01BA8 = 0; int psx_taken_BFC01BA8 = 0; int psx_delay_BFC01BB0 = 0; int psx_taken_BFC01BB0 = 0; int psx_delay_BFC01BBC = 0; int psx_taken_BFC01BBC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01AB4u: goto label_BFC01AB4; case 0xBFC01AB8u: goto label_BFC01AB8; case 0xBFC01AE8u: goto label_BFC01AE8; case 0xBFC01AF4u: goto label_BFC01AF4; case 0xBFC01AFCu: goto label_BFC01AFC; case 0xBFC01B04u: goto label_BFC01B04; case 0xBFC01B10u: goto label_BFC01B10; case 0xBFC01B18u: goto label_BFC01B18; case 0xBFC01B24u: goto label_BFC01B24; case 0xBFC01B2Cu: goto label_BFC01B2C; case 0xBFC01B30u: goto label_BFC01B30; case 0xBFC01B44u: goto label_BFC01B44; case 0xBFC01B4Cu: goto label_BFC01B4C; case 0xBFC01B5Cu: goto label_BFC01B5C; case 0xBFC01B64u: goto label_BFC01B64; case 0xBFC01B6Cu: goto label_BFC01B6C; case 0xBFC01B74u: goto label_BFC01B74; case 0xBFC01BA0u: goto label_BFC01BA0; case 0xBFC01BA8u: goto label_BFC01BA8; case 0xBFC01BB0u: goto label_BFC01BB0; case 0xBFC01BB8u: goto label_BFC01BB8; default: break; } } label_BFC01A84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01A84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01A84: 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(0xBFC01A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC01A88: 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, 0xBFC01A88u); return; } g_debug_last_store_pc = 0xBFC01A88u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC01A8C: 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, 0xBFC01A8Cu); return; } g_debug_last_store_pc = 0xBFC01A8Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC01A90: 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, 0xBFC01A90u); return; } g_debug_last_store_pc = 0xBFC01A90u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC01A94: 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, 0xBFC01A94u); return; } g_debug_last_store_pc = 0xBFC01A94u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60028u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC01A98: 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, 0xBFC01A98u); return; } g_debug_last_store_pc = 0xBFC01A98u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50024u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC01A9C: 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, 0xBFC01A9Cu); return; } g_debug_last_store_pc = 0xBFC01A9Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC01AA0: 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, 0xBFC01AA0u); return; } g_debug_last_store_pc = 0xBFC01AA0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC01AA4: 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, 0xBFC01AA4u); return; } g_debug_last_store_pc = 0xBFC01AA4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC01AA8: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC01AAC: 04810002 bgez $a0, 0xBFC01AB8 */ uint32_t psx_brA_BFC01AAC = cpu->gpr[4]; psx_taken_BFC01AAC = ((int32_t)psx_brA_BFC01AAC >= 0); psx_delay_BFC01AAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC01AB0: 00C09025 or $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(0x00C09025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01AB0u); #endif if (psx_delay_BFC01AAC) { psx_delay_BFC01AAC = 0; if (psx_taken_BFC01AAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01AB8u); goto label_BFC01AB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01AB4u); } label_BFC01AB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01AB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01AB4: 2484000F addiu $a0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2484000Fu, cpu->gpr[4], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01AB4u); #endif label_BFC01AB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01AB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01AB8: 00042103 sra $a0, $a0, 4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 4u); PGXP_ALU(0x00042103u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01ABC: 00041100 sll $v0, $a0, 4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 4u; PGXP_ALU(0x00041100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01AC0: 00441023 subu $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(0x00441023u, 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, 0x10004u); #endif /* 0xBFC01AC4: 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(0xBFC01AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC01AC8: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01ACC: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC01ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC01AD0: 26314E28 addiu $s1, $s1, 20008 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (20008)); PGXP_ALU(0x26314E28u, cpu->gpr[17], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC01AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01AD4: 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(0xBFC01AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC01AD8: 241300C0 addiu $s3, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241300C0u, cpu->gpr[19], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC01ADC: 2414003F addiu $s4, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2414003Fu, cpu->gpr[20], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC01AE0: 241500A1 addiu $s5, $zero, 161 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); PGXP_ALU(0x241500A1u, cpu->gpr[21], _pgx1, 0x000000A1u); } #ifdef PSX_COSIM cosim_instr(0xBFC01AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC01AE4: 24160051 addiu $s6, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24160051u, cpu->gpr[22], _pgx1, 0x00000051u); } #ifdef PSX_COSIM cosim_instr(0xBFC01AE4u); #endif label_BFC01AE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01AE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC01AE8: 2A02000F slti $v0, $s0, 15 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] < (15) ? 1 : 0); PGXP_ALU(0x2A02000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01AEC: 14400003 bne $v0, $zero, 0xBFC01AFC */ uint32_t psx_brA_BFC01AEC = cpu->gpr[2]; uint32_t psx_brB_BFC01AEC = cpu->gpr[0]; psx_taken_BFC01AEC = (psx_brA_BFC01AEC != psx_brB_BFC01AEC); psx_delay_BFC01AEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01AF0: 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(0xBFC01AF0u); #endif if (psx_delay_BFC01AEC) { psx_delay_BFC01AEC = 0; if (psx_taken_BFC01AEC) { #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, 0xBFC01AF4u); } label_BFC01AF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01AF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01AF4: 1000001F beq $zero, $zero, 0xBFC01B74 */ uint32_t psx_brA_BFC01AF4 = cpu->gpr[0]; uint32_t psx_brB_BFC01AF4 = cpu->gpr[0]; psx_taken_BFC01AF4 = (psx_brA_BFC01AF4 == psx_brB_BFC01AF4); psx_delay_BFC01AF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC01AF8: 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(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, 0xBFC01B74u); goto label_BFC01B74; } #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, 0x80080000u); #endif /* 0xBFC01AFC: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC01B04u; /* jalr link before delay slot */ psx_delay_BFC01AFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01B00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01B00u); #endif if (psx_delay_BFC01AFC) { psx_delay_BFC01AFC = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC01B04u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC01B04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01B04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B04u); #endif /* 0xBFC01B04: 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, 0xBFC01B04u); 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(0xBFC01B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01B08: 14400006 bne $v0, $zero, 0xBFC01B24 */ uint32_t psx_brA_BFC01B08 = cpu->gpr[2]; 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, 0xBFC01B24u); goto label_BFC01B24; } #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, 0x400008u); #endif /* 0xBFC01B10: 10760006 beq $v1, $s6, 0xBFC01B2C */ uint32_t psx_brA_BFC01B10 = cpu->gpr[3]; uint32_t psx_brB_BFC01B10 = cpu->gpr[22]; 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, 0x20008u); #endif /* 0xBFC01B14: 2623000A addiu $v1, $s1, 10 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] + (10)); PGXP_ALU(0x2623000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } #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, 0xBFC01B2Cu); goto label_BFC01B2C; } #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, 0x10000u); #endif /* 0xBFC01B18: 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(0xBFC01B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01B1C: 1000FFF2 beq $zero, $zero, 0xBFC01AE8 */ uint32_t psx_brA_BFC01B1C = cpu->gpr[0]; uint32_t psx_brB_BFC01B1C = cpu->gpr[0]; psx_taken_BFC01B1C = (psx_brA_BFC01B1C == psx_brB_BFC01B1C); psx_delay_BFC01B1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC01B20: 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(0xBFC01B20u); #endif if (psx_delay_BFC01B1C) { psx_delay_BFC01B1C = 0; if (psx_taken_BFC01B1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01AE8u); goto label_BFC01AE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01B24u); } 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, 0x200008u); #endif /* 0xBFC01B24: 1475FFFC bne $v1, $s5, 0xBFC01B18 */ uint32_t psx_brA_BFC01B24 = cpu->gpr[3]; uint32_t psx_brB_BFC01B24 = cpu->gpr[21]; psx_taken_BFC01B24 = (psx_brA_BFC01B24 != psx_brB_BFC01B24); psx_delay_BFC01B24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC01B28: 2623000A addiu $v1, $s1, 10 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] + (10)); PGXP_ALU(0x2623000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } #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, 0xBFC01B18u); goto label_BFC01B18; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01B2C: 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(0xBFC01B2Cu); #endif label_BFC01B30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01B30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC01B30: 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(0xBFC01B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B34u); #endif /* 0xBFC01B34: 80840000 lb $a0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 4, 0x10u); PGXP_LOAD(0x80840000u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC01B38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01B3C: 14800018 bne $a0, $zero, 0xBFC01BA0 */ uint32_t psx_brA_BFC01B3C = cpu->gpr[4]; uint32_t psx_brB_BFC01B3C = cpu->gpr[0]; psx_taken_BFC01B3C = (psx_brA_BFC01B3C != psx_brB_BFC01B3C); psx_delay_BFC01B3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01B40: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01B40u); #endif if (psx_delay_BFC01B3C) { psx_delay_BFC01B3C = 0; if (psx_taken_BFC01B3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01BA0u); goto label_BFC01BA0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01B44u); } label_BFC01B44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01B44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01B44: 1040FFF4 beq $v0, $zero, 0xBFC01B18 */ uint32_t psx_brA_BFC01B44 = cpu->gpr[2]; uint32_t psx_brB_BFC01B44 = cpu->gpr[0]; psx_taken_BFC01B44 = (psx_brA_BFC01B44 == psx_brB_BFC01B44); psx_delay_BFC01B44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC01B48: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0xBFC01B18u); goto label_BFC01B18; } #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 /* 0xBFC01B4C: 80650000 lb $a1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 5, 0x8u); PGXP_LOAD(0x80650000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC01B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B50u); #endif /* 0xBFC01B50: 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(0xBFC01B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01B54: 14A00014 bne $a1, $zero, 0xBFC01BA8 */ uint32_t psx_brA_BFC01B54 = cpu->gpr[5]; 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, 0x1u); #endif /* 0xBFC01B58: 00000000 nop */ /* nop */ #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, 0xBFC01BA8u); goto label_BFC01BA8; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01B5C: 10400003 beq $v0, $zero, 0xBFC01B6C */ uint32_t psx_brA_BFC01B5C = cpu->gpr[2]; uint32_t psx_brB_BFC01B5C = cpu->gpr[0]; psx_taken_BFC01B5C = (psx_brA_BFC01B5C == psx_brB_BFC01B5C); psx_delay_BFC01B5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC01B60: 2403003F addiu $v1, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2403003Fu, cpu->gpr[3], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01B60u); #endif if (psx_delay_BFC01B5C) { psx_delay_BFC01B5C = 0; if (psx_taken_BFC01B5C) { #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, 0xBFC01B64u); } label_BFC01B64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01B64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01B64: 1443FFEC bne $v0, $v1, 0xBFC01B18 */ uint32_t psx_brA_BFC01B64 = cpu->gpr[2]; uint32_t psx_brB_BFC01B64 = cpu->gpr[3]; psx_taken_BFC01B64 = (psx_brA_BFC01B64 != psx_brB_BFC01B64); psx_delay_BFC01B64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01B68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01B68u); #endif if (psx_delay_BFC01B64) { psx_delay_BFC01B64 = 0; if (psx_taken_BFC01B64) { #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, 0xBFC01B6Cu); } 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, 0x4u); #endif /* 0xBFC01B6C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x10004u); #endif /* 0xBFC01B70: AC5051F0 sw $s0, 20976($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01B70u); return; } g_debug_last_store_pc = 0xBFC01B70u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC5051F0u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01B70u); #endif label_BFC01B74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01B74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B74u); #endif /* 0xBFC01B74: 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, 0xBFC01B74u); 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(0xBFC01B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B78u); #endif /* 0xBFC01B78: 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, 0xBFC01B78u); 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(0xBFC01B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B7Cu); #endif /* 0xBFC01B7C: 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, 0xBFC01B7Cu); 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(0xBFC01B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B80u); #endif /* 0xBFC01B80: 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, 0xBFC01B80u); 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(0xBFC01B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B84u); #endif /* 0xBFC01B84: 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, 0xBFC01B84u); 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(0xBFC01B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B88u); #endif /* 0xBFC01B88: 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, 0xBFC01B88u); 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(0xBFC01B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B8Cu); #endif /* 0xBFC01B8C: 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, 0xBFC01B8Cu); 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(0xBFC01B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC01B90: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B94u); #endif /* 0xBFC01B94: 8FB00010 lw $s0, 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, 0xBFC01B94u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC01B98: 03E00008 jr $ra */ psx_delay_BFC01B98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01B9C: 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(0xBFC01B9Cu); #endif if (psx_delay_BFC01B98) { psx_delay_BFC01B98 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x1u); #endif /* 0xBFC01BA0: 1000FFE3 beq $zero, $zero, 0xBFC01B30 */ uint32_t psx_brA_BFC01BA0 = cpu->gpr[0]; uint32_t psx_brB_BFC01BA0 = cpu->gpr[0]; psx_taken_BFC01BA0 = (psx_brA_BFC01BA0 == psx_brB_BFC01BA0); psx_delay_BFC01BA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01BA4: 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(0xBFC01BA4u); #endif if (psx_delay_BFC01BA0) { psx_delay_BFC01BA0 = 0; if (psx_taken_BFC01BA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01B30u); goto label_BFC01B30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01BA8u); } label_BFC01BA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01BA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC01BA8: 10540003 beq $v0, $s4, 0xBFC01BB8 */ uint32_t psx_brA_BFC01BA8 = cpu->gpr[2]; uint32_t psx_brB_BFC01BA8 = cpu->gpr[20]; psx_taken_BFC01BA8 = (psx_brA_BFC01BA8 == psx_brB_BFC01BA8); psx_delay_BFC01BA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01BAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01BACu); #endif if (psx_delay_BFC01BA8) { psx_delay_BFC01BA8 = 0; if (psx_taken_BFC01BA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01BB8u); goto label_BFC01BB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01BB0u); } 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, 0x24u); #endif /* 0xBFC01BB0: 14A2FFD9 bne $a1, $v0, 0xBFC01B18 */ uint32_t psx_brA_BFC01BB0 = cpu->gpr[5]; uint32_t psx_brB_BFC01BB0 = cpu->gpr[2]; psx_taken_BFC01BB0 = (psx_brA_BFC01BB0 != psx_brB_BFC01BB0); psx_delay_BFC01BB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01BB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01BB4u); #endif if (psx_delay_BFC01BB0) { psx_delay_BFC01BB0 = 0; if (psx_taken_BFC01BB0) { #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, 0xBFC01BB8u); } label_BFC01BB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01BB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01BB8: 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(0xBFC01BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01BBC: 1000FFE3 beq $zero, $zero, 0xBFC01B4C */ uint32_t psx_brA_BFC01BBC = cpu->gpr[0]; uint32_t psx_brB_BFC01BBC = cpu->gpr[0]; psx_taken_BFC01BBC = (psx_brA_BFC01BBC == psx_brB_BFC01BBC); psx_delay_BFC01BBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01BC0: 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(0xBFC01BC0u); #endif if (psx_delay_BFC01BBC) { psx_delay_BFC01BBC = 0; if (psx_taken_BFC01BBC) { #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, 0xBFC01BC4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01BC4u); cpu->pc = 0xBFC01BC4u; return; /* fallthrough */ } void OpenBIOS_func_1FC01BC4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01BC4u); int psx_delay_BFC01C08 = 0; int psx_taken_BFC01C08 = 0; int psx_delay_BFC01C30 = 0; int psx_taken_BFC01C30 = 0; int psx_delay_BFC01C38 = 0; int psx_delay_BFC01C44 = 0; int psx_taken_BFC01C44 = 0; int psx_delay_BFC01C4C = 0; int psx_delay_BFC01C54 = 0; int psx_taken_BFC01C54 = 0; int psx_delay_BFC01C74 = 0; int psx_taken_BFC01C74 = 0; int psx_delay_BFC01C80 = 0; int psx_delay_BFC01C90 = 0; int psx_delay_BFC01CA0 = 0; int psx_taken_BFC01CA0 = 0; int psx_delay_BFC01CC8 = 0; int psx_taken_BFC01CC8 = 0; int psx_delay_BFC01CD8 = 0; int psx_taken_BFC01CD8 = 0; int psx_delay_BFC01CEC = 0; int psx_taken_BFC01CEC = 0; int psx_delay_BFC01D18 = 0; int psx_taken_BFC01D18 = 0; int psx_delay_BFC01D20 = 0; int psx_taken_BFC01D20 = 0; int psx_delay_BFC01D44 = 0; int psx_taken_BFC01D44 = 0; int psx_delay_BFC01D58 = 0; int psx_taken_BFC01D58 = 0; int psx_delay_BFC01D74 = 0; int psx_taken_BFC01D74 = 0; int psx_delay_BFC01D80 = 0; int psx_taken_BFC01D80 = 0; int psx_delay_BFC01DA4 = 0; int psx_delay_BFC01DC4 = 0; int psx_taken_BFC01DC4 = 0; int psx_delay_BFC01DE4 = 0; int psx_taken_BFC01DE4 = 0; int psx_delay_BFC01E04 = 0; int psx_taken_BFC01E04 = 0; int psx_delay_BFC01E0C = 0; int psx_taken_BFC01E0C = 0; int psx_delay_BFC01E14 = 0; int psx_taken_BFC01E14 = 0; int psx_delay_BFC01E38 = 0; int psx_taken_BFC01E38 = 0; int psx_delay_BFC01E54 = 0; int psx_taken_BFC01E54 = 0; int psx_delay_BFC01E5C = 0; int psx_taken_BFC01E5C = 0; int psx_delay_BFC01E68 = 0; int psx_taken_BFC01E68 = 0; int psx_delay_BFC01EA8 = 0; int psx_delay_BFC01EB0 = 0; int psx_taken_BFC01EB0 = 0; int psx_delay_BFC01EBC = 0; int psx_delay_BFC01ECC = 0; int psx_delay_BFC01EDC = 0; int psx_taken_BFC01EDC = 0; int psx_delay_BFC01EE4 = 0; int psx_taken_BFC01EE4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01C10u: goto label_BFC01C10; case 0xBFC01C14u: goto label_BFC01C14; case 0xBFC01C38u: goto label_BFC01C38; case 0xBFC01C40u: goto label_BFC01C40; case 0xBFC01C4Cu: goto label_BFC01C4C; case 0xBFC01C54u: goto label_BFC01C54; case 0xBFC01C5Cu: goto label_BFC01C5C; case 0xBFC01C7Cu: goto label_BFC01C7C; case 0xBFC01C88u: goto label_BFC01C88; case 0xBFC01C98u: goto label_BFC01C98; case 0xBFC01CA8u: goto label_BFC01CA8; case 0xBFC01CBCu: goto label_BFC01CBC; case 0xBFC01CD0u: goto label_BFC01CD0; case 0xBFC01CD4u: goto label_BFC01CD4; case 0xBFC01CE0u: goto label_BFC01CE0; case 0xBFC01CF4u: goto label_BFC01CF4; case 0xBFC01D0Cu: goto label_BFC01D0C; case 0xBFC01D20u: goto label_BFC01D20; case 0xBFC01D28u: goto label_BFC01D28; case 0xBFC01D40u: goto label_BFC01D40; case 0xBFC01D4Cu: goto label_BFC01D4C; case 0xBFC01D58u: goto label_BFC01D58; case 0xBFC01D60u: goto label_BFC01D60; case 0xBFC01D6Cu: goto label_BFC01D6C; case 0xBFC01D7Cu: goto label_BFC01D7C; case 0xBFC01D88u: goto label_BFC01D88; case 0xBFC01D90u: goto label_BFC01D90; case 0xBFC01DACu: goto label_BFC01DAC; case 0xBFC01DCCu: goto label_BFC01DCC; case 0xBFC01DD0u: goto label_BFC01DD0; case 0xBFC01DECu: goto label_BFC01DEC; case 0xBFC01E0Cu: goto label_BFC01E0C; case 0xBFC01E14u: goto label_BFC01E14; case 0xBFC01E1Cu: goto label_BFC01E1C; case 0xBFC01E24u: goto label_BFC01E24; case 0xBFC01E40u: goto label_BFC01E40; case 0xBFC01E48u: goto label_BFC01E48; case 0xBFC01E5Cu: goto label_BFC01E5C; case 0xBFC01E64u: goto label_BFC01E64; case 0xBFC01E70u: goto label_BFC01E70; case 0xBFC01E74u: goto label_BFC01E74; case 0xBFC01E78u: goto label_BFC01E78; case 0xBFC01E7Cu: goto label_BFC01E7C; case 0xBFC01EB0u: goto label_BFC01EB0; case 0xBFC01EB8u: goto label_BFC01EB8; case 0xBFC01EC4u: goto label_BFC01EC4; case 0xBFC01ED4u: goto label_BFC01ED4; case 0xBFC01EE4u: goto label_BFC01EE4; default: break; } } label_BFC01BC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01BC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01BC4: 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(0xBFC01BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC01BC8: AFB7007C sw $s7, 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, 0xBFC01BC8u); return; } g_debug_last_store_pc = 0xBFC01BC8u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB7007Cu, _pgxa, cpu->gpr[23]); } #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, 0x20100000u); #endif /* 0xBFC01BCC: AFB40070 sw $s4, 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, 0xBFC01BCCu); return; } g_debug_last_store_pc = 0xBFC01BCCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40070u, _pgxa, cpu->gpr[20]); } #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, 0x20020000u); #endif /* 0xBFC01BD0: AFB10064 sw $s1, 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, 0xBFC01BD0u); return; } g_debug_last_store_pc = 0xBFC01BD0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10064u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC01BD4: 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, 0xBFC01BD4u); return; } g_debug_last_store_pc = 0xBFC01BD4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00060u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC01BD8: AFBF0084 sw $ra, 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, 0xBFC01BD8u); return; } g_debug_last_store_pc = 0xBFC01BD8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0084u, _pgxa, cpu->gpr[31]); } #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, 0x60000000u); #endif /* 0xBFC01BDC: AFBE0080 sw $fp, 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, 0xBFC01BDCu); return; } g_debug_last_store_pc = 0xBFC01BDCu; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0080u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC01BE0: AFB60078 sw $s6, 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, 0xBFC01BE0u); return; } g_debug_last_store_pc = 0xBFC01BE0u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60078u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC01BE4: AFB50074 sw $s5, 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, 0xBFC01BE4u); return; } g_debug_last_store_pc = 0xBFC01BE4u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50074u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC01BE8: AFB3006C sw $s3, 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, 0xBFC01BE8u); return; } g_debug_last_store_pc = 0xBFC01BE8u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3006Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC01BEC: AFB20068 sw $s2, 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, 0xBFC01BECu); return; } g_debug_last_store_pc = 0xBFC01BECu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20068u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BF0u); #endif /* 0xBFC01BF0: 8C920004 lw $s2, 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, 0xBFC01BF0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10u); } PGXP_LOAD(0x8C920004u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01BF4: 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(0xBFC01BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC01BF8: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100021u); #endif /* 0xBFC01BFC: 00A0A025 or $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(0x00A0A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800041u); #endif /* 0xBFC01C00: 00C0B825 or $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(0x00C0B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01C04: AC820018 sw $v0, 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, 0xBFC01C04u); return; } g_debug_last_store_pc = 0xBFC01C04u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC01C08: 06400002 bltz $s2, 0xBFC01C14 */ uint32_t psx_brA_BFC01C08 = cpu->gpr[18]; psx_taken_BFC01C08 = ((int32_t)psx_brA_BFC01C08 < 0); psx_delay_BFC01C08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC01C0C: 2650000F addiu $s0, $s2, 15 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[18] + (15)); PGXP_ALU(0x2650000Fu, cpu->gpr[16], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01C0Cu); #endif if (psx_delay_BFC01C08) { psx_delay_BFC01C08 = 0; if (psx_taken_BFC01C08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01C14u); goto label_BFC01C14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01C10u); } label_BFC01C10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50001u); #endif /* 0xBFC01C10: 02408025 or $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(0x02408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C10u); #endif label_BFC01C14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC01C14: 00108103 sra $s0, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 4u); PGXP_ALU(0x00108103u, cpu->gpr[16], _pgx1, 4u); } #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, 0x8u); #endif /* 0xBFC01C18: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x10004u); #endif /* 0xBFC01C1C: 00101080 sll $v0, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 2u; PGXP_ALU(0x00101080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x8u); #endif /* 0xBFC01C20: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01C24: 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(0xBFC01C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C28u); #endif /* 0xBFC01C28: 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, 0xBFC01C28u); 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(0xBFC01C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01C2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC01C30: 16600091 bne $s3, $zero, 0xBFC01E78 */ uint32_t psx_brA_BFC01C30 = cpu->gpr[19]; uint32_t psx_brB_BFC01C30 = cpu->gpr[0]; psx_taken_BFC01C30 = (psx_brA_BFC01C30 != psx_brB_BFC01C30); psx_delay_BFC01C30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01C34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01C34u); #endif if (psx_delay_BFC01C30) { psx_delay_BFC01C30 = 0; if (psx_taken_BFC01C30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E78u); goto label_BFC01E78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01C38u); } label_BFC01C38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01C38: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC01C40u; /* jal link before delay slot */ psx_delay_BFC01C38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01C3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01C3Cu); #endif if (psx_delay_BFC01C38) { psx_delay_BFC01C38 = 0; cpu->gpr[31] = 0xBFC01C40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC01C40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01C40: 32E28000 andi $v0, $s7, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] & 0x8000u; PGXP_ALU(0x32E28000u, cpu->gpr[2], _pgx1, 0x8000u); } #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, 0x5u); #endif /* 0xBFC01C44: 14400005 bne $v0, $zero, 0xBFC01C5C */ uint32_t psx_brA_BFC01C44 = cpu->gpr[2]; uint32_t psx_brB_BFC01C44 = cpu->gpr[0]; psx_taken_BFC01C44 = (psx_brA_BFC01C44 != psx_brB_BFC01C44); psx_delay_BFC01C44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC01C48: 00101900 sll $v1, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[16] << 4u; PGXP_ALU(0x00101900u, cpu->gpr[3], _pgx1, 4u); } #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, 0xBFC01C5Cu); goto label_BFC01C5C; } #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, 0x80000000u); #endif /* 0xBFC01C4C: 0FF0060C jal 0xBFC01830 */ cpu->gpr[31] = 0xBFC01C54u; /* jal link before delay slot */ psx_delay_BFC01C4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC01C50: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C50u); #endif if (psx_delay_BFC01C4C) { psx_delay_BFC01C4C = 0; cpu->gpr[31] = 0xBFC01C54u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01830u); cpu->pc = 0xBFC01830u; return; } label_BFC01C54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01C54: 10400088 beq $v0, $zero, 0xBFC01E78 */ uint32_t psx_brA_BFC01C54 = cpu->gpr[2]; uint32_t psx_brB_BFC01C54 = cpu->gpr[0]; psx_taken_BFC01C54 = (psx_brA_BFC01C54 == psx_brB_BFC01C54); psx_delay_BFC01C54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC01C58: 00101900 sll $v1, $s0, 4 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[16] << 4u; PGXP_ALU(0x00101900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01C58u); #endif if (psx_delay_BFC01C54) { psx_delay_BFC01C54 = 0; if (psx_taken_BFC01C54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E78u); goto label_BFC01E78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01C5Cu); } label_BFC01C5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC01C5C: 00701823 subu $v1, $v1, $s0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[16]; PGXP_ALU(0x00701823u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC01C60: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC01C64: 24424E28 addiu $v0, $v0, 20008 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20008)); PGXP_ALU(0x24424E28u, cpu->gpr[2], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC01C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01C68: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC01C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000Cu); #endif /* 0xBFC01C6C: 0043B021 addu $s6, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[22] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x0043B021u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01C70: 32E20200 andi $v0, $s7, 0x200 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] & 0x200u; PGXP_ALU(0x32E20200u, cpu->gpr[2], _pgx1, 0x0200u); } #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, 0x5u); #endif /* 0xBFC01C74: 10400090 beq $v0, $zero, 0xBFC01EB8 */ uint32_t psx_brA_BFC01C74 = cpu->gpr[2]; uint32_t psx_brB_BFC01C74 = cpu->gpr[0]; psx_taken_BFC01C74 = (psx_brA_BFC01C74 == psx_brB_BFC01C74); psx_delay_BFC01C74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01C78: 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(0xBFC01C78u); #endif if (psx_delay_BFC01C74) { psx_delay_BFC01C74 = 0; if (psx_taken_BFC01C74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EB8u); goto label_BFC01EB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01C7Cu); } label_BFC01C7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01C7C: 240200C0 addiu $v0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240200C0u, cpu->gpr[2], _pgx1, 0x000000C0u); } #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, 0x80000004u); #endif /* 0xBFC01C80: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01C88u; /* jalr link before delay slot */ psx_delay_BFC01C80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01C84: 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(0xBFC01C84u); #endif if (psx_delay_BFC01C80) { psx_delay_BFC01C80 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01C88u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC01C88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100041u); #endif /* 0xBFC01C88: 02803025 or $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(0x02803025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01C8C: 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(0xBFC01C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01C90: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC01C98u; /* jal link before delay slot */ psx_delay_BFC01C90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC01C94: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01C94u); #endif if (psx_delay_BFC01C90) { psx_delay_BFC01C90 = 0; cpu->gpr[31] = 0xBFC01C98u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } label_BFC01C98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01C98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC01C98: 00404025 or $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(0x00404025u, cpu->gpr[8], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC01C9C: 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(0xBFC01C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC01CA0: 15020073 bne $t0, $v0, 0xBFC01E70 */ uint32_t psx_brA_BFC01CA0 = cpu->gpr[8]; uint32_t psx_brB_BFC01CA0 = cpu->gpr[2]; psx_taken_BFC01CA0 = (psx_brA_BFC01CA0 != psx_brB_BFC01CA0); psx_delay_BFC01CA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC01CA4: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC01CA4u); #endif if (psx_delay_BFC01CA0) { psx_delay_BFC01CA0 = 0; if (psx_taken_BFC01CA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E70u); goto label_BFC01E70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01CA8u); } label_BFC01CA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01CA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400080u); #endif /* 0xBFC01CA8: 26C701E0 addiu $a3, $s6, 480 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[22] + (480)); PGXP_ALU(0x26C701E0u, cpu->gpr[7], _pgx1, 0x000001E0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC01CAC: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC01CB0: 00602825 or $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(0x00602825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01CB4: 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(0xBFC01CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01CB8: 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(0xBFC01CB8u); #endif label_BFC01CBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01CBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CBCu); #endif /* 0xBFC01CBC: 8C860000 lw $a2, 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, 0xBFC01CBCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } PGXP_LOAD(0x8C860000u, _pgxa, cpu->gpr[6]); } #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, 0x1u); #endif /* 0xBFC01CC0: 00000000 nop */ /* nop */ #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, 0x40u); #endif /* 0xBFC01CC4: 30C600F0 andi $a2, $a2, 0xF0 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xF0u; PGXP_ALU(0x30C600F0u, cpu->gpr[6], _pgx1, 0x00F0u); } #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, 0x240u); #endif /* 0xBFC01CC8: 14C90002 bne $a2, $t1, 0xBFC01CD4 */ uint32_t psx_brA_BFC01CC8 = cpu->gpr[6]; uint32_t psx_brB_BFC01CC8 = cpu->gpr[9]; 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, 0x21u); #endif /* 0xBFC01CCC: 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, 0xBFC01CCCu); return; } g_debug_last_store_pc = 0xBFC01CCCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA00000u, _pgxa, cpu->gpr[0]); } #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, 0xBFC01CD4u); goto label_BFC01CD4; } #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, 0x4u); #endif /* 0xBFC01CD0: 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(0xBFC01CD0u); #endif label_BFC01CD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01CD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC01CD4: 24840020 addiu $a0, $a0, 32 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (32)); PGXP_ALU(0x24840020u, cpu->gpr[4], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC01CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC01CD8: 1487FFF8 bne $a0, $a3, 0xBFC01CBC */ uint32_t psx_brA_BFC01CD8 = cpu->gpr[4]; uint32_t psx_brB_BFC01CD8 = cpu->gpr[7]; psx_taken_BFC01CD8 = (psx_brA_BFC01CD8 != psx_brB_BFC01CD8); psx_delay_BFC01CD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC01CDC: 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(0xBFC01CDCu); #endif if (psx_delay_BFC01CD8) { psx_delay_BFC01CD8 = 0; if (psx_taken_BFC01CD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01CBCu); goto label_BFC01CBC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01CE0u); } label_BFC01CE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01CE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800080u); #endif /* 0xBFC01CE0: 00173C02 srl $a3, $s7, 16 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[7] = cpu->gpr[23] >> 16u; PGXP_ALU(0x00173C02u, cpu->gpr[7], _pgx1, 16u); } #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, 0x90u); #endif /* 0xBFC01CE4: 00072340 sll $a0, $a3, 13 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[7] << 13u; PGXP_ALU(0x00072340u, cpu->gpr[4], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0xBFC01CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC01CE8: 0047102B sltu $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0); PGXP_ALU(0x0047102Bu, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC01CEC: 14400070 bne $v0, $zero, 0xBFC01EB0 */ uint32_t psx_brA_BFC01CEC = cpu->gpr[2]; uint32_t psx_brB_BFC01CEC = cpu->gpr[0]; psx_taken_BFC01CEC = (psx_brA_BFC01CEC != psx_brB_BFC01CEC); psx_delay_BFC01CEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC01CF0: AE240020 sw $a0, 32($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01CF0u); return; } g_debug_last_store_pc = 0xBFC01CF0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE240020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC01CF0u); #endif if (psx_delay_BFC01CEC) { psx_delay_BFC01CEC = 0; if (psx_taken_BFC01CEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EB0u); goto label_BFC01EB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01CF4u); } label_BFC01CF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01CF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC00000u); #endif /* 0xBFC01CF4: 26D7001E addiu $s7, $s6, 30 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[22] + (30)); PGXP_ALU(0x26D7001Eu, cpu->gpr[23], _pgx1, 0x0000001Eu); } #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, 0x40000001u); #endif /* 0xBFC01CF8: 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(0xBFC01CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC01CFC: 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(0xBFC01CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10101u); #endif /* 0xBFC01D00: 01008025 or $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(0x01008025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x201u); #endif /* 0xBFC01D04: 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(0xBFC01D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC01D08: 240AFFFF addiu $t2, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x240AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC01D08u); #endif 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: 8EE2FFE2 lw $v0, -30($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -30; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-30)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D0Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x800000u); } PGXP_LOAD(0x8EE2FFE2u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC01D10: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC01D14: 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(0xBFC01D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC01D18: 1449004B bne $v0, $t1, 0xBFC01E48 */ uint32_t psx_brA_BFC01D18 = cpu->gpr[2]; uint32_t psx_brB_BFC01D18 = cpu->gpr[9]; psx_taken_BFC01D18 = (psx_brA_BFC01D18 != psx_brB_BFC01D18); psx_delay_BFC01D18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01D1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01D1Cu); #endif if (psx_delay_BFC01D18) { psx_delay_BFC01D18 = 0; if (psx_taken_BFC01D18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E48u); goto label_BFC01E48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D20u); } label_BFC01D20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC01D20: 14C00032 bne $a2, $zero, 0xBFC01DEC */ uint32_t psx_brA_BFC01D20 = cpu->gpr[6]; uint32_t psx_brB_BFC01D20 = cpu->gpr[0]; psx_taken_BFC01D20 = (psx_brA_BFC01D20 != psx_brB_BFC01D20); psx_delay_BFC01D20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01D24: 24020051 addiu $v0, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24020051u, cpu->gpr[2], _pgx1, 0x00000051u); } #ifdef PSX_COSIM cosim_instr(0xBFC01D24u); #endif if (psx_delay_BFC01D20) { psx_delay_BFC01D20 = 0; if (psx_taken_BFC01D20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01DECu); goto label_BFC01DEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D28u); } label_BFC01D28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01D28: AEE2FFE2 sw $v0, -30($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-30)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D28u); return; } g_debug_last_store_pc = 0xBFC01D28u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEE2FFE2u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D2Cu); #endif /* 0xBFC01D2C: 8E220020 lw $v0, 32($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D2Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E220020u, _pgxa, cpu->gpr[2]); } #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, 0x100021u); #endif /* 0xBFC01D30: 02802825 or $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(0x02802825u, cpu->gpr[5], _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, 0x800004u); #endif /* 0xBFC01D34: AEE2FFE6 sw $v0, -26($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -26; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-26)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D34u); return; } g_debug_last_store_pc = 0xBFC01D34u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEE2FFE6u, _pgxa, cpu->gpr[2]); } #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, 0x1001u); #endif /* 0xBFC01D38: 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(0xBFC01D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01D3C: 26E2FFEC addiu $v0, $s7, -20 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[23] + (-20)); PGXP_ALU(0x26E2FFECu, cpu->gpr[2], _pgx1, 0xFFFFFFECu); } #ifdef PSX_COSIM cosim_instr(0xBFC01D3Cu); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01D40: 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(0xBFC01D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC01D44: 15800004 bne $t4, $zero, 0xBFC01D58 */ uint32_t psx_brA_BFC01D44 = cpu->gpr[12]; uint32_t psx_brB_BFC01D44 = cpu->gpr[0]; psx_taken_BFC01D44 = (psx_brA_BFC01D44 != psx_brB_BFC01D44); psx_delay_BFC01D44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01D48: 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(0xBFC01D48u); #endif if (psx_delay_BFC01D44) { psx_delay_BFC01D44 = 0; if (psx_taken_BFC01D44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D58u); goto label_BFC01D58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D4Cu); } label_BFC01D4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D4Cu); #endif /* 0xBFC01D4C: 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(0xBFC01D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC01D50: 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(0xBFC01D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1010u); #endif /* 0xBFC01D54: 2C8C0001 sltiu $t4, $a0, 1 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[12] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2C8C0001u, cpu->gpr[12], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC01D54u); #endif label_BFC01D58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01D58: 1457FFF9 bne $v0, $s7, 0xBFC01D40 */ uint32_t psx_brA_BFC01D58 = cpu->gpr[2]; uint32_t psx_brB_BFC01D58 = cpu->gpr[23]; psx_taken_BFC01D58 = (psx_brA_BFC01D58 != psx_brB_BFC01D58); psx_delay_BFC01D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01D5C: A044FFFF sb $a0, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC01D5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA044FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D5Cu); #endif if (psx_delay_BFC01D58) { psx_delay_BFC01D58 = 0; if (psx_taken_BFC01D58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D40u); goto label_BFC01D40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D60u); } label_BFC01D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01D60: 24020051 addiu $v0, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24020051u, cpu->gpr[2], _pgx1, 0x00000051u); } #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, 0xCu); #endif /* 0xBFC01D64: 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, 0xBFC01D64u); return; } g_debug_last_store_pc = 0xBFC01D64u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010001u); #endif /* 0xBFC01D68: 03C08025 or $s0, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[16] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01D68u); #endif label_BFC01D6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC01D6C: 24C20001 addiu $v0, $a2, 1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); PGXP_ALU(0x24C20001u, cpu->gpr[2], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC01D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x94u); #endif /* 0xBFC01D70: 0047202B sltu $a0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[7] ? 1 : 0); PGXP_ALU(0x0047202Bu, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x11u); #endif /* 0xBFC01D74: 1480003B bne $a0, $zero, 0xBFC01E64 */ uint32_t psx_brA_BFC01D74 = cpu->gpr[4]; uint32_t psx_brB_BFC01D74 = cpu->gpr[0]; psx_taken_BFC01D74 = (psx_brA_BFC01D74 != psx_brB_BFC01D74); psx_delay_BFC01D74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01D78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01D78u); #endif if (psx_delay_BFC01D74) { psx_delay_BFC01D74 = 0; if (psx_taken_BFC01D74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E64u); goto label_BFC01E64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D7Cu); } label_BFC01D7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC01D7C: 28420002 slti $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (2) ? 1 : 0); PGXP_ALU(0x28420002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0xBFC01D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01D80: 14400003 bne $v0, $zero, 0xBFC01D90 */ uint32_t psx_brA_BFC01D80 = cpu->gpr[2]; uint32_t psx_brB_BFC01D80 = cpu->gpr[0]; psx_taken_BFC01D80 = (psx_brA_BFC01D80 != psx_brB_BFC01D80); psx_delay_BFC01D80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800400u); #endif /* 0xBFC01D84: A6EAFFEA sh $t2, -22($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -22; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-22)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D84u); return; } g_debug_last_store_pc = 0xBFC01D84u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[10] & 0xFFFFu)); } PGXP_STORE(0xA6EAFFEAu, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D84u); #endif if (psx_delay_BFC01D80) { psx_delay_BFC01D80 = 0; if (psx_taken_BFC01D80) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D90u); goto label_BFC01D90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D88u); } label_BFC01D88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01D88: 24020053 addiu $v0, $zero, 83 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); PGXP_ALU(0x24020053u, cpu->gpr[2], _pgx1, 0x00000053u); } #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, 0x800004u); #endif /* 0xBFC01D8C: AEE2FFE2 sw $v0, -30($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-30)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01D8Cu); return; } g_debug_last_store_pc = 0xBFC01D8Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEE2FFE2u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D8Cu); #endif label_BFC01D90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01D90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC01D90: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #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, 0x40011u); #endif /* 0xBFC01D94: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000100u); #endif /* 0xBFC01D98: AFA8005C sw $t0, 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, 0xBFC01D98u); return; } g_debug_last_store_pc = 0xBFC01D98u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAFA8005Cu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC01D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC01D9C: 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, 0xBFC01D9Cu); return; } g_debug_last_store_pc = 0xBFC01D9Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30058u, _pgxa, cpu->gpr[3]); } #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, 0x20000080u); #endif /* 0xBFC01DA0: 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, 0xBFC01DA0u); return; } g_debug_last_store_pc = 0xBFC01DA0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70054u, _pgxa, cpu->gpr[7]); } #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, 0x80000000u); #endif /* 0xBFC01DA4: 0FF005D7 jal 0xBFC0175C */ cpu->gpr[31] = 0xBFC01DACu; /* jal link before delay slot */ psx_delay_BFC01DA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC01DA8: 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, 0xBFC01DA8u); return; } g_debug_last_store_pc = 0xBFC01DA8u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60050u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DA8u); #endif if (psx_delay_BFC01DA4) { psx_delay_BFC01DA4 = 0; cpu->gpr[31] = 0xBFC01DACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0175Cu); cpu->pc = 0xBFC0175Cu; return; } 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 /* 0xBFC01DAC: 8FA60050 lw $a2, 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, 0xBFC01DACu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA60050u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DB0u); #endif /* 0xBFC01DB0: 8FA70054 lw $a3, 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, 0xBFC01DB0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } PGXP_LOAD(0x8FA70054u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DB4u); #endif /* 0xBFC01DB4: 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, 0xBFC01DB4u); 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(0xBFC01DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DB8u); #endif /* 0xBFC01DB8: 8FA8005C lw $t0, 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, 0xBFC01DB8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20000000u); } PGXP_LOAD(0x8FA8005Cu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01DBC: 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(0xBFC01DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC01DC0: 240AFFFF addiu $t2, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x240AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC01DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01DC4: 14400013 bne $v0, $zero, 0xBFC01E14 */ uint32_t psx_brA_BFC01DC4 = cpu->gpr[2]; uint32_t psx_brB_BFC01DC4 = cpu->gpr[0]; psx_taken_BFC01DC4 = (psx_brA_BFC01DC4 != psx_brB_BFC01DC4); psx_delay_BFC01DC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC01DC8: 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(0xBFC01DC8u); #endif if (psx_delay_BFC01DC4) { psx_delay_BFC01DC4 = 0; if (psx_taken_BFC01DC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E14u); goto label_BFC01E14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01DCCu); } label_BFC01DCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01DCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC01DCC: AE300024 sw $s0, 36($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DCCu); return; } g_debug_last_store_pc = 0xBFC01DCCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAE300024u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DCCu); #endif label_BFC01DD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01DD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC01DD0: 00108140 sll $s0, $s0, 5 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 5u; PGXP_ALU(0x00108140u, cpu->gpr[16], _pgx1, 5u); } #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, 0x20001u); #endif /* 0xBFC01DD4: AE200010 sw $zero, 16($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DD4u); return; } g_debug_last_store_pc = 0xBFC01DD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE200010u, _pgxa, cpu->gpr[0]); } #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, 0x20001u); #endif /* 0xBFC01DD8: AE200018 sw $zero, 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, 0xBFC01DD8u); return; } g_debug_last_store_pc = 0xBFC01DD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE200018u, _pgxa, cpu->gpr[0]); } #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, 0x410004u); #endif /* 0xBFC01DDC: 02D01021 addu $v0, $s6, $s0 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[22] + cpu->gpr[16]; PGXP_ALU(0x02D01021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DE0u); #endif /* 0xBFC01DE0: 8C420004 lw $v0, 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, 0xBFC01DE0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420004u, _pgxa, cpu->gpr[2]); } #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: 10000025 beq $zero, $zero, 0xBFC01E7C */ uint32_t psx_brA_BFC01DE4 = cpu->gpr[0]; uint32_t psx_brB_BFC01DE4 = cpu->gpr[0]; psx_taken_BFC01DE4 = (psx_brA_BFC01DE4 == psx_brB_BFC01DE4); psx_delay_BFC01DE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01DE8: AE220020 sw $v0, 32($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01DE8u); return; } g_debug_last_store_pc = 0xBFC01DE8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01DE8u); #endif if (psx_delay_BFC01DE4) { psx_delay_BFC01DE4 = 0; if (psx_taken_BFC01DE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E7Cu); goto label_BFC01E7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01DECu); } label_BFC01DEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01DECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC01DEC: 0015A940 sll $s5, $s5, 5 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[21] << 5u; PGXP_ALU(0x0015A940u, cpu->gpr[21], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC01DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DF0u); #endif /* 0xBFC01DF0: 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, 0xBFC01DF0u); 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(0xBFC01DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600000u); #endif /* 0xBFC01DF4: 02D5A821 addu $s5, $s6, $s5 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[21] = cpu->gpr[22] + cpu->gpr[21]; PGXP_ALU(0x02D5A821u, cpu->gpr[21], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC01DF8: 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(0xBFC01DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01DFC: 24040051 addiu $a0, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24040051u, cpu->gpr[4], _pgx1, 0x00000051u); } #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, 0x40200000u); #endif /* 0xBFC01E00: A6BE0008 sh $fp, 8($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (8)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E00u); return; } g_debug_last_store_pc = 0xBFC01E00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[30] & 0xFFFFu)); } PGXP_STORE(0xA6BE0008u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC01E04: 10A4FFD9 beq $a1, $a0, 0xBFC01D6C */ uint32_t psx_brA_BFC01E04 = cpu->gpr[5]; uint32_t psx_brB_BFC01E04 = cpu->gpr[4]; psx_taken_BFC01E04 = (psx_brA_BFC01E04 == psx_brB_BFC01E04); psx_delay_BFC01E04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC01E08: AEE2FFE2 sw $v0, -30($s7) */ { uint32_t _pgxa = cpu->gpr[23] + -30; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (-30)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01E08u); return; } g_debug_last_store_pc = 0xBFC01E08u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEE2FFE2u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E08u); #endif if (psx_delay_BFC01E04) { psx_delay_BFC01E04 = 0; if (psx_taken_BFC01E04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D6Cu); goto label_BFC01D6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E0Cu); } 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, 0x1u); #endif /* 0xBFC01E0C: 1000FFD7 beq $zero, $zero, 0xBFC01D6C */ uint32_t psx_brA_BFC01E0C = cpu->gpr[0]; 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, 0xCu); #endif /* 0xBFC01E10: 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, 0xBFC01E10u); return; } g_debug_last_store_pc = 0xBFC01E10u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #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, 0xBFC01D6Cu); goto label_BFC01D6C; } #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, 0x10001u); #endif /* 0xBFC01E14: 1200000A beq $s0, $zero, 0xBFC01E40 */ uint32_t psx_brA_BFC01E14 = cpu->gpr[16]; uint32_t psx_brB_BFC01E14 = cpu->gpr[0]; psx_taken_BFC01E14 = (psx_brA_BFC01E14 == psx_brB_BFC01E14); psx_delay_BFC01E14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40200001u); #endif /* 0xBFC01E18: 03C0A825 or $s5, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C0A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01E18u); #endif if (psx_delay_BFC01E14) { psx_delay_BFC01E14 = 0; if (psx_taken_BFC01E14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E40u); goto label_BFC01E40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E1Cu); } 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, 0x9u); #endif /* 0xBFC01E1C: 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(0xBFC01E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01E20: 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(0xBFC01E20u); #endif 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, 0x10000u); #endif /* 0xBFC01E24: 00108140 sll $s0, $s0, 5 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 5u; PGXP_ALU(0x00108140u, cpu->gpr[16], _pgx1, 5u); } #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, 0x410000u); #endif /* 0xBFC01E28: 02D08021 addu $s0, $s6, $s0 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[22] + cpu->gpr[16]; PGXP_ALU(0x02D08021u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x10008u); #endif /* 0xBFC01E2C: A6030008 sh $v1, 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, 0xBFC01E2Cu); return; } g_debug_last_store_pc = 0xBFC01E2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA6030008u, _pgxa, cpu->gpr[3]); } #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, 0x10004u); #endif /* 0xBFC01E30: AE020000 sw $v0, 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, 0xBFC01E30u); return; } g_debug_last_store_pc = 0xBFC01E30u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020000u, _pgxa, cpu->gpr[2]); } #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, 0x10001u); #endif /* 0xBFC01E34: 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, 0xBFC01E34u); return; } g_debug_last_store_pc = 0xBFC01E34u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000004u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC01E38: 1000FFFA beq $zero, $zero, 0xBFC01E24 */ uint32_t psx_brA_BFC01E38 = cpu->gpr[0]; uint32_t psx_brB_BFC01E38 = cpu->gpr[0]; psx_taken_BFC01E38 = (psx_brA_BFC01E38 == psx_brB_BFC01E38); psx_delay_BFC01E38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10101u); #endif /* 0xBFC01E3C: 01008025 or $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(0x01008025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01E3Cu); #endif if (psx_delay_BFC01E38) { psx_delay_BFC01E38 = 0; if (psx_taken_BFC01E38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E24u); goto label_BFC01E24; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E40u); } label_BFC01E40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800u); #endif /* 0xBFC01E40: AE2B0018 sw $t3, 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, 0xBFC01E40u); return; } g_debug_last_store_pc = 0xBFC01E40u; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAE2B0018u, _pgxa, cpu->gpr[11]); } #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, 0x40u); #endif /* 0xBFC01E44: 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(0xBFC01E44u); #endif label_BFC01E48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC01E48: 27DE0001 addiu $fp, $fp, 1 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (1)); PGXP_ALU(0x27DE0001u, cpu->gpr[30], _pgx1, 0x00000001u); } #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, 0x5u); #endif /* 0xBFC01E4C: 2402000F addiu $v0, $zero, 15 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); PGXP_ALU(0x2402000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #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, 0x8u); #endif /* 0xBFC01E50: 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(0xBFC01E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC01E54: 17C2FFAD bne $fp, $v0, 0xBFC01D0C */ uint32_t psx_brA_BFC01E54 = cpu->gpr[30]; uint32_t psx_brB_BFC01E54 = cpu->gpr[2]; psx_taken_BFC01E54 = (psx_brA_BFC01E54 != psx_brB_BFC01E54); psx_delay_BFC01E54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC01E58: 26F70020 addiu $s7, $s7, 32 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (32)); PGXP_ALU(0x26F70020u, cpu->gpr[23], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC01E58u); #endif if (psx_delay_BFC01E54) { psx_delay_BFC01E54 = 0; if (psx_taken_BFC01E54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01D0Cu); goto label_BFC01D0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E5Cu); } 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, 0x1u); #endif /* 0xBFC01E5C: 1000FFDC beq $zero, $zero, 0xBFC01DD0 */ uint32_t psx_brA_BFC01E5C = cpu->gpr[0]; uint32_t psx_brB_BFC01E5C = cpu->gpr[0]; psx_taken_BFC01E5C = (psx_brA_BFC01E5C == psx_brB_BFC01E5C); psx_delay_BFC01E5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC01E60: AE300024 sw $s0, 36($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (36)); 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[16]); } PGXP_STORE(0xAE300024u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E60u); #endif if (psx_delay_BFC01E5C) { psx_delay_BFC01E5C = 0; if (psx_taken_BFC01E5C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01DD0u); goto label_BFC01DD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E64u); } label_BFC01E64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40200001u); #endif /* 0xBFC01E64: 03C0A825 or $s5, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C0A825u, cpu->gpr[21], _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, 0x1u); #endif /* 0xBFC01E68: 1000FFF7 beq $zero, $zero, 0xBFC01E48 */ uint32_t psx_brA_BFC01E68 = cpu->gpr[0]; uint32_t psx_brB_BFC01E68 = cpu->gpr[0]; psx_taken_BFC01E68 = (psx_brA_BFC01E68 == psx_brB_BFC01E68); psx_delay_BFC01E68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC01E6C: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01E6Cu); #endif if (psx_delay_BFC01E68) { psx_delay_BFC01E68 = 0; if (psx_taken_BFC01E68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E48u); goto label_BFC01E48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E70u); } label_BFC01E70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01E70: 24020011 addiu $v0, $zero, 17 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); PGXP_ALU(0x24020011u, cpu->gpr[2], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0xBFC01E70u); #endif label_BFC01E74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01E74: AE220018 sw $v0, 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, 0xBFC01E74u); return; } g_debug_last_store_pc = 0xBFC01E74u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E74u); #endif label_BFC01E78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC01E78: 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(0xBFC01E78u); #endif label_BFC01E7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01E7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E7Cu); #endif /* 0xBFC01E7C: 8FBF0084 lw $ra, 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, 0xBFC01E7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0084u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E80u); #endif /* 0xBFC01E80: 8FBE0080 lw $fp, 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, 0xBFC01E80u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0080u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E84u); #endif /* 0xBFC01E84: 8FB7007C lw $s7, 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, 0xBFC01E84u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB7007Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E88u); #endif /* 0xBFC01E88: 8FB60078 lw $s6, 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, 0xBFC01E88u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60078u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E8Cu); #endif /* 0xBFC01E8C: 8FB50074 lw $s5, 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, 0xBFC01E8Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50074u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E90u); #endif /* 0xBFC01E90: 8FB40070 lw $s4, 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, 0xBFC01E90u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40070u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E94u); #endif /* 0xBFC01E94: 8FB20068 lw $s2, 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, 0xBFC01E94u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB20068u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E98u); #endif /* 0xBFC01E98: 8FB10064 lw $s1, 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, 0xBFC01E98u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10064u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01E9Cu); #endif /* 0xBFC01E9C: 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, 0xBFC01E9Cu); 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(0xBFC01E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC01EA0: 02601025 or $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(0x02601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EA4u); #endif /* 0xBFC01EA4: 8FB3006C lw $s3, 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, 0xBFC01EA4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3006Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC01EA8: 03E00008 jr $ra */ psx_delay_BFC01EA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01EAC: 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(0xBFC01EACu); #endif if (psx_delay_BFC01EA8) { psx_delay_BFC01EA8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC01EB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01EB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01EB0: 1000FFF0 beq $zero, $zero, 0xBFC01E74 */ uint32_t psx_brA_BFC01EB0 = cpu->gpr[0]; uint32_t psx_brB_BFC01EB0 = cpu->gpr[0]; psx_taken_BFC01EB0 = (psx_brA_BFC01EB0 == psx_brB_BFC01EB0); psx_delay_BFC01EB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01EB4: 2402001C addiu $v0, $zero, 28 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); PGXP_ALU(0x2402001Cu, cpu->gpr[2], _pgx1, 0x0000001Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC01EB4u); #endif if (psx_delay_BFC01EB0) { psx_delay_BFC01EB0 = 0; if (psx_taken_BFC01EB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E74u); goto label_BFC01E74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EB8u); } label_BFC01EB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01EB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01EB8: 240200C0 addiu $v0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240200C0u, cpu->gpr[2], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC01EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC01EBC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01EC4u; /* jalr link before delay slot */ psx_delay_BFC01EBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01EC0: 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(0xBFC01EC0u); #endif if (psx_delay_BFC01EBC) { psx_delay_BFC01EBC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01EC4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC01EC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01EC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100041u); #endif /* 0xBFC01EC4: 02803025 or $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(0x02803025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC01EC8: 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(0xBFC01EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01ECC: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC01ED4u; /* jal link before delay slot */ psx_delay_BFC01ECC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC01ED0: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01ED0u); #endif if (psx_delay_BFC01ECC) { psx_delay_BFC01ECC = 0; cpu->gpr[31] = 0xBFC01ED4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } label_BFC01ED4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01ED4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC01ED4: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC01ED8: 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(0xBFC01ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC01EDC: 1602FFBB bne $s0, $v0, 0xBFC01DCC */ uint32_t psx_brA_BFC01EDC = cpu->gpr[16]; uint32_t psx_brB_BFC01EDC = cpu->gpr[2]; psx_taken_BFC01EDC = (psx_brA_BFC01EDC != psx_brB_BFC01EDC); psx_delay_BFC01EDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01EE0: 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(0xBFC01EE0u); #endif if (psx_delay_BFC01EDC) { psx_delay_BFC01EDC = 0; if (psx_taken_BFC01EDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01DCCu); goto label_BFC01DCC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EE4u); } label_BFC01EE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01EE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01EE4: 1000FFE4 beq $zero, $zero, 0xBFC01E78 */ uint32_t psx_brA_BFC01EE4 = cpu->gpr[0]; uint32_t psx_brB_BFC01EE4 = cpu->gpr[0]; psx_taken_BFC01EE4 = (psx_brA_BFC01EE4 == psx_brB_BFC01EE4); psx_delay_BFC01EE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC01EE8: AE220018 sw $v0, 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, 0xBFC01EE8u); return; } g_debug_last_store_pc = 0xBFC01EE8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EE8u); #endif if (psx_delay_BFC01EE4) { psx_delay_BFC01EE4 = 0; if (psx_taken_BFC01EE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01E78u); goto label_BFC01E78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EECu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01EECu); cpu->pc = 0xBFC01EECu; return; /* fallthrough */ } void OpenBIOS_func_1FC01EEC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC01EECu); int psx_delay_BFC01F20 = 0; int psx_taken_BFC01F20 = 0; int psx_delay_BFC01F48 = 0; int psx_taken_BFC01F48 = 0; int psx_delay_BFC01F50 = 0; int psx_delay_BFC01F58 = 0; int psx_delay_BFC01F60 = 0; int psx_taken_BFC01F60 = 0; int psx_delay_BFC01F6C = 0; int psx_delay_BFC01F7C = 0; int psx_delay_BFC01F88 = 0; int psx_taken_BFC01F88 = 0; int psx_delay_BFC01FB8 = 0; int psx_delay_BFC01FD0 = 0; int psx_taken_BFC01FD0 = 0; int psx_delay_BFC02010 = 0; int psx_taken_BFC02010 = 0; int psx_delay_BFC02024 = 0; int psx_taken_BFC02024 = 0; int psx_delay_BFC0205C = 0; int psx_taken_BFC0205C = 0; int psx_delay_BFC0206C = 0; int psx_taken_BFC0206C = 0; int psx_delay_BFC0208C = 0; int psx_taken_BFC0208C = 0; int psx_delay_BFC0209C = 0; int psx_taken_BFC0209C = 0; int psx_delay_BFC020BC = 0; int psx_delay_BFC020C8 = 0; int psx_taken_BFC020C8 = 0; int psx_delay_BFC020E8 = 0; int psx_taken_BFC020E8 = 0; int psx_delay_BFC02100 = 0; int psx_taken_BFC02100 = 0; int psx_delay_BFC02108 = 0; int psx_taken_BFC02108 = 0; int psx_delay_BFC02120 = 0; int psx_taken_BFC02120 = 0; int psx_delay_BFC02134 = 0; int psx_taken_BFC02134 = 0; int psx_delay_BFC0213C = 0; int psx_taken_BFC0213C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC01F28u: goto label_BFC01F28; case 0xBFC01F2Cu: goto label_BFC01F2C; case 0xBFC01F50u: goto label_BFC01F50; case 0xBFC01F58u: goto label_BFC01F58; case 0xBFC01F60u: goto label_BFC01F60; case 0xBFC01F68u: goto label_BFC01F68; case 0xBFC01F74u: goto label_BFC01F74; case 0xBFC01F84u: goto label_BFC01F84; case 0xBFC01F90u: goto label_BFC01F90; case 0xBFC01F94u: goto label_BFC01F94; case 0xBFC01F98u: goto label_BFC01F98; case 0xBFC01F9Cu: goto label_BFC01F9C; case 0xBFC01FC0u: goto label_BFC01FC0; case 0xBFC01FC8u: goto label_BFC01FC8; case 0xBFC01FD8u: goto label_BFC01FD8; case 0xBFC02018u: goto label_BFC02018; case 0xBFC0201Cu: goto label_BFC0201C; case 0xBFC0202Cu: goto label_BFC0202C; case 0xBFC02054u: goto label_BFC02054; case 0xBFC02064u: goto label_BFC02064; case 0xBFC02074u: goto label_BFC02074; case 0xBFC02094u: goto label_BFC02094; case 0xBFC020A4u: goto label_BFC020A4; case 0xBFC020B8u: goto label_BFC020B8; case 0xBFC020C4u: goto label_BFC020C4; case 0xBFC020D0u: goto label_BFC020D0; case 0xBFC020E0u: goto label_BFC020E0; case 0xBFC020F0u: goto label_BFC020F0; case 0xBFC020FCu: goto label_BFC020FC; case 0xBFC02108u: goto label_BFC02108; case 0xBFC02110u: goto label_BFC02110; case 0xBFC02128u: goto label_BFC02128; case 0xBFC0213Cu: goto label_BFC0213C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC01EEC: 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(0xBFC01EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC01EF0: AFB30068 sw $s3, 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, 0xBFC01EF0u); return; } g_debug_last_store_pc = 0xBFC01EF0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30068u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC01EF4: AFB20064 sw $s2, 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, 0xBFC01EF4u); return; } g_debug_last_store_pc = 0xBFC01EF4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20064u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC01EF8: AFB0005C sw $s0, 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, 0xBFC01EF8u); return; } g_debug_last_store_pc = 0xBFC01EF8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0005Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC01EFC: AFBF0074 sw $ra, 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, 0xBFC01EFCu); return; } g_debug_last_store_pc = 0xBFC01EFCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC01F00: AFB50070 sw $s5, 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, 0xBFC01F00u); return; } g_debug_last_store_pc = 0xBFC01F00u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50070u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC01F04: AFB4006C sw $s4, 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, 0xBFC01F04u); return; } g_debug_last_store_pc = 0xBFC01F04u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB4006Cu, _pgxa, cpu->gpr[20]); } #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, 0x20020000u); #endif /* 0xBFC01F08: AFB10060 sw $s1, 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, 0xBFC01F08u); return; } g_debug_last_store_pc = 0xBFC01F08u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10060u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F0Cu); #endif /* 0xBFC01F0C: 8C910004 lw $s1, 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, 0xBFC01F0Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } PGXP_LOAD(0x8C910004u, _pgxa, cpu->gpr[17]); } #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, 0x5u); #endif /* 0xBFC01F10: 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(0xBFC01F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC01F14: 00809825 or $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(0x00809825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC01F18: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01F1C: AC820018 sw $v0, 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, 0xBFC01F1Cu); return; } g_debug_last_store_pc = 0xBFC01F1Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #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, 0x20000u); #endif /* 0xBFC01F20: 06200002 bltz $s1, 0xBFC01F2C */ uint32_t psx_brA_BFC01F20 = cpu->gpr[17]; psx_taken_BFC01F20 = ((int32_t)psx_brA_BFC01F20 < 0); psx_delay_BFC01F20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000u); #endif /* 0xBFC01F24: 2632000F addiu $s2, $s1, 15 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[17] + (15)); PGXP_ALU(0x2632000Fu, cpu->gpr[18], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC01F24u); #endif if (psx_delay_BFC01F20) { psx_delay_BFC01F20 = 0; if (psx_taken_BFC01F20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F2Cu); goto label_BFC01F2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F28u); } label_BFC01F28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60001u); #endif /* 0xBFC01F28: 02209025 or $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(0x02209025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01F28u); #endif label_BFC01F2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC01F2C: 00129103 sra $s2, $s2, 4 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] >> 4u); PGXP_ALU(0x00129103u, cpu->gpr[18], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01F30: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC01F34: 00121080 sll $v0, $s2, 2 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] << 2u; PGXP_ALU(0x00121080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC01F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01F38: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #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, 0xCu); #endif /* 0xBFC01F3C: 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(0xBFC01F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F40u); #endif /* 0xBFC01F40: 8C420000 lw $v0, 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, 0xBFC01F40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01F44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01F48: 14400013 bne $v0, $zero, 0xBFC01F98 */ uint32_t psx_brA_BFC01F48 = cpu->gpr[2]; uint32_t psx_brB_BFC01F48 = cpu->gpr[0]; psx_taken_BFC01F48 = (psx_brA_BFC01F48 != psx_brB_BFC01F48); psx_delay_BFC01F48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01F4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01F4Cu); #endif if (psx_delay_BFC01F48) { psx_delay_BFC01F48 = 0; if (psx_taken_BFC01F48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F98u); goto label_BFC01F98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F50u); } label_BFC01F50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01F50: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC01F58u; /* jal link before delay slot */ psx_delay_BFC01F50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC01F54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC01F54u); #endif if (psx_delay_BFC01F50) { psx_delay_BFC01F50 = 0; cpu->gpr[31] = 0xBFC01F58u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } 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, 0x80000000u); #endif /* 0xBFC01F58: 0FF0060C jal 0xBFC01830 */ cpu->gpr[31] = 0xBFC01F60u; /* jal link before delay slot */ psx_delay_BFC01F58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC01F5C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01F5Cu); #endif if (psx_delay_BFC01F58) { psx_delay_BFC01F58 = 0; cpu->gpr[31] = 0xBFC01F60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01830u); cpu->pc = 0xBFC01830u; return; } label_BFC01F60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01F60: 1040000D beq $v0, $zero, 0xBFC01F98 */ uint32_t psx_brA_BFC01F60 = cpu->gpr[2]; uint32_t psx_brB_BFC01F60 = cpu->gpr[0]; psx_taken_BFC01F60 = (psx_brA_BFC01F60 == psx_brB_BFC01F60); psx_delay_BFC01F60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC01F64: 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(0xBFC01F64u); #endif if (psx_delay_BFC01F60) { psx_delay_BFC01F60 = 0; if (psx_taken_BFC01F60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F98u); goto label_BFC01F98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F68u); } label_BFC01F68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01F68: 240200C0 addiu $v0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240200C0u, cpu->gpr[2], _pgx1, 0x000000C0u); } #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, 0x80000004u); #endif /* 0xBFC01F6C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC01F74u; /* jalr link before delay slot */ psx_delay_BFC01F6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01F70: 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(0xBFC01F70u); #endif if (psx_delay_BFC01F6C) { psx_delay_BFC01F6C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC01F74u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC01F74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC01F74: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC01F78: 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(0xBFC01F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC01F7C: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC01F84u; /* jal link before delay slot */ psx_delay_BFC01F7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC01F80: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01F80u); #endif if (psx_delay_BFC01F7C) { psx_delay_BFC01F7C = 0; cpu->gpr[31] = 0xBFC01F84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } 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, 0x9u); #endif /* 0xBFC01F84: 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(0xBFC01F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01F88: 1443000D bne $v0, $v1, 0xBFC01FC0 */ uint32_t psx_brA_BFC01F88 = cpu->gpr[2]; uint32_t psx_brB_BFC01F88 = cpu->gpr[3]; psx_taken_BFC01F88 = (psx_brA_BFC01F88 != psx_brB_BFC01F88); psx_delay_BFC01F88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC01F8C: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC01F8Cu); #endif if (psx_delay_BFC01F88) { psx_delay_BFC01F88 = 0; if (psx_taken_BFC01F88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01FC0u); goto label_BFC01FC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F90u); } label_BFC01F90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01F90: 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(0xBFC01F90u); #endif label_BFC01F94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC01F94: AE620018 sw $v0, 24($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC01F94u); return; } g_debug_last_store_pc = 0xBFC01F94u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE620018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC01F94u); #endif label_BFC01F98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC01F98: 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(0xBFC01F98u); #endif label_BFC01F9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01F9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC01F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01F9Cu); #endif /* 0xBFC01F9C: 8FBF0074 lw $ra, 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, 0xBFC01F9Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0074u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC01F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FA0u); #endif /* 0xBFC01FA0: 8FB50070 lw $s5, 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, 0xBFC01FA0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50070u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC01FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FA4u); #endif /* 0xBFC01FA4: 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, 0xBFC01FA4u); 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(0xBFC01FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FA8u); #endif /* 0xBFC01FA8: 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, 0xBFC01FA8u); 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(0xBFC01FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FACu); #endif /* 0xBFC01FAC: 8FB20064 lw $s2, 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, 0xBFC01FACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB20064u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC01FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FB0u); #endif /* 0xBFC01FB0: 8FB10060 lw $s1, 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, 0xBFC01FB0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10060u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC01FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FB4u); #endif /* 0xBFC01FB4: 8FB0005C lw $s0, 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, 0xBFC01FB4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB0005Cu, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC01FB8: 03E00008 jr $ra */ psx_delay_BFC01FB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC01FBC: 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(0xBFC01FBCu); #endif if (psx_delay_BFC01FB8) { psx_delay_BFC01FB8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC01FC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01FC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC01FC0: 27B5004C addiu $s5, $sp, 76 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[29] + (76)); PGXP_ALU(0x27B5004Cu, cpu->gpr[21], _pgx1, 0x0000004Cu); } #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, 0x29u); #endif /* 0xBFC01FC4: 00A01825 or $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(0x00A01825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01FC4u); #endif label_BFC01FC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01FC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC01FC8: 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, 0xBFC01FC8u); return; } g_debug_last_store_pc = 0xBFC01FC8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC01FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01FCC: 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(0xBFC01FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200008u); #endif /* 0xBFC01FD0: 1475FFFD bne $v1, $s5, 0xBFC01FC8 */ uint32_t psx_brA_BFC01FD0 = cpu->gpr[3]; uint32_t psx_brB_BFC01FD0 = cpu->gpr[21]; psx_taken_BFC01FD0 = (psx_brA_BFC01FD0 != psx_brB_BFC01FD0); psx_delay_BFC01FD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC01FD4: 00128100 sll $s0, $s2, 4 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = cpu->gpr[18] << 4u; PGXP_ALU(0x00128100u, cpu->gpr[16], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC01FD4u); #endif if (psx_delay_BFC01FD0) { psx_delay_BFC01FD0 = 0; if (psx_taken_BFC01FD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01FC8u); goto label_BFC01FC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01FD8u); } label_BFC01FD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC01FD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC01FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50008u); #endif /* 0xBFC01FD8: 02121823 subu $v1, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[16] - cpu->gpr[18]; PGXP_ALU(0x02121823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC01FDC: 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(0xBFC01FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC01FE0: 3C140000 lui $s4, 0x0 */ cpu->gpr[20] = 0x00000000u; PGXP_ALU(0x3C140000u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC01FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC01FE4: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC01FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC01FE8: 26944E28 addiu $s4, $s4, 20008 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (20008)); PGXP_ALU(0x26944E28u, cpu->gpr[20], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC01FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC01FEC: 00741821 addu $v1, $v1, $s4 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[20]; PGXP_ALU(0x00741821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC01FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC01FF0: 240400A1 addiu $a0, $zero, 161 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (161)); PGXP_ALU(0x240400A1u, cpu->gpr[4], _pgx1, 0x000000A1u); } #ifdef PSX_COSIM cosim_instr(0xBFC01FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC01FF4: 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, 0xBFC01FF4u); return; } g_debug_last_store_pc = 0xBFC01FF4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC01FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC01FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC01FF8: 00022080 sll $a0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 2u; PGXP_ALU(0x00022080u, cpu->gpr[4], _pgx1, 2u); } #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, 0x41u); #endif /* 0xBFC01FFC: 24060051 addiu $a2, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24060051u, cpu->gpr[6], _pgx1, 0x00000051u); } #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, 0x30u); #endif /* 0xBFC02000: 00A42021 addu $a0, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[4]; PGXP_ALU(0x00A42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC02004: AC860000 sw $a2, 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, 0xBFC02004u); return; } g_debug_last_store_pc = 0xBFC02004u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02008u); #endif /* 0xBFC02008: 8C660004 lw $a2, 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, 0xBFC02008u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x8u); } PGXP_LOAD(0x8C660004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0200Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0200C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0200Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC02010: 04C10002 bgez $a2, 0xBFC0201C */ uint32_t psx_brA_BFC02010 = cpu->gpr[6]; psx_taken_BFC02010 = ((int32_t)psx_brA_BFC02010 >= 0); psx_delay_BFC02010 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02014: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02014u); #endif if (psx_delay_BFC02010) { psx_delay_BFC02010 = 0; if (psx_taken_BFC02010) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0201Cu); goto label_BFC0201C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02018u); } label_BFC02018: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02018u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC02018: 24C61FFF addiu $a2, $a2, 8191 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (8191)); PGXP_ALU(0x24C61FFFu, cpu->gpr[6], _pgx1, 0x00001FFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC02018u); #endif label_BFC0201C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0201Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0201Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0201Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0201C: 00063343 sra $a2, $a2, 13 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 13u); PGXP_ALU(0x00063343u, cpu->gpr[6], _pgx1, 13u); } #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, 0x40u); #endif /* 0xBFC02020: 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(0xBFC02020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC02024: 18C00024 blez $a2, 0xBFC020B8 */ uint32_t psx_brA_BFC02024 = cpu->gpr[6]; psx_taken_BFC02024 = ((int32_t)psx_brA_BFC02024 <= 0); psx_delay_BFC02024 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50010u); #endif /* 0xBFC02028: 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(0xBFC02028u); #endif if (psx_delay_BFC02024) { psx_delay_BFC02024 = 0; if (psx_taken_BFC02024) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020B8u); goto label_BFC020B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0202Cu); } label_BFC0202C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0202Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0202Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0202Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0202C: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0202Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02030: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #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, 0x100004u); #endif /* 0xBFC02034: 02821021 addu $v0, $s4, $v0 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[2]; PGXP_ALU(0x02821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02038u); #endif /* 0xBFC02038: 84420008 lh $v0, 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, 0xBFC02038u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x84420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0203Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0203C: 240AFFFF addiu $t2, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x240AFFFFu, cpu->gpr[10], _pgx1, 0xFFFFFFFFu); } #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, 0x1Cu); #endif /* 0xBFC02040: 00441821 addu $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(0x00441821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02044: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #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, 0x100008u); #endif /* 0xBFC02048: 02831821 addu $v1, $s4, $v1 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[20] + cpu->gpr[3]; PGXP_ALU(0x02831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0204Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0204C: 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(0xBFC0204Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC02050: 240B00A2 addiu $t3, $zero, 162 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (162)); PGXP_ALU(0x240B00A2u, cpu->gpr[11], _pgx1, 0x000000A2u); } #ifdef PSX_COSIM cosim_instr(0xBFC02050u); #endif label_BFC02054: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02054u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02054u); #endif /* 0xBFC02054: 84680008 lh $t0, 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, 0xBFC02054u); return; } cpu->gpr[8] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 8, 0x8u); } PGXP_LOAD(0x84680008u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC02054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02058: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0205Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC0205C: 110A0005 beq $t0, $t2, 0xBFC02074 */ uint32_t psx_brA_BFC0205C = cpu->gpr[8]; uint32_t psx_brB_BFC0205C = cpu->gpr[10]; psx_taken_BFC0205C = (psx_brA_BFC0205C == psx_brB_BFC0205C); psx_delay_BFC0205C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02060: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02060u); #endif if (psx_delay_BFC0205C) { psx_delay_BFC0205C = 0; if (psx_taken_BFC0205C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02074u); goto label_BFC02074; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02064u); } label_BFC02064: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02064u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02064u); #endif /* 0xBFC02064: 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, 0xBFC02064u); 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(0xBFC02064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02068: 00000000 nop */ /* nop */ #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, 0x280u); #endif /* 0xBFC0206C: 11270028 beq $t1, $a3, 0xBFC02110 */ uint32_t psx_brA_BFC0206C = cpu->gpr[9]; uint32_t psx_brB_BFC0206C = cpu->gpr[7]; psx_taken_BFC0206C = (psx_brA_BFC0206C == psx_brB_BFC0206C); psx_delay_BFC0206C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02070: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02070u); #endif if (psx_delay_BFC0206C) { psx_delay_BFC0206C = 0; if (psx_taken_BFC0206C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02110u); goto label_BFC02110; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02074u); } label_BFC02074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02074u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50008u); #endif /* 0xBFC02074: 02121823 subu $v1, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[16] - cpu->gpr[18]; PGXP_ALU(0x02121823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02078: 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(0xBFC02078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0207Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0207C: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #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, 0x100008u); #endif /* 0xBFC02080: 02831821 addu $v1, $s4, $v1 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[20] + cpu->gpr[3]; PGXP_ALU(0x02831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02084u); #endif /* 0xBFC02084: 84660008 lh $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, 0xBFC02084u); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x8u); } PGXP_LOAD(0x84660008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02088: 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(0xBFC02088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0208Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0208C: 14C4000A bne $a2, $a0, 0xBFC020B8 */ uint32_t psx_brA_BFC0208C = cpu->gpr[6]; uint32_t psx_brB_BFC0208C = cpu->gpr[4]; psx_taken_BFC0208C = (psx_brA_BFC0208C != psx_brB_BFC0208C); psx_delay_BFC0208C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02090: 24040053 addiu $a0, $zero, 83 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (83)); PGXP_ALU(0x24040053u, cpu->gpr[4], _pgx1, 0x00000053u); } #ifdef PSX_COSIM cosim_instr(0xBFC02090u); #endif if (psx_delay_BFC0208C) { psx_delay_BFC0208C = 0; if (psx_taken_BFC0208C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020B8u); goto label_BFC020B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02094u); } label_BFC02094: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02094u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02094u); #endif /* 0xBFC02094: 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, 0xBFC02094u); 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(0xBFC02094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02098: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0209Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0209C: 14C40006 bne $a2, $a0, 0xBFC020B8 */ uint32_t psx_brA_BFC0209C = cpu->gpr[6]; uint32_t psx_brB_BFC0209C = cpu->gpr[4]; psx_taken_BFC0209C = (psx_brA_BFC0209C != psx_brB_BFC0209C); psx_delay_BFC0209C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC020A0: 240400A3 addiu $a0, $zero, 163 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (163)); PGXP_ALU(0x240400A3u, cpu->gpr[4], _pgx1, 0x000000A3u); } #ifdef PSX_COSIM cosim_instr(0xBFC020A0u); #endif if (psx_delay_BFC0209C) { psx_delay_BFC0209C = 0; if (psx_taken_BFC0209C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020B8u); goto label_BFC020B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020A4u); } label_BFC020A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC020A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC020A4: 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(0xBFC020A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC020A8: 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, 0xBFC020A8u); return; } g_debug_last_store_pc = 0xBFC020A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #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, 0x24u); #endif /* 0xBFC020AC: 00A21021 addu $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC020ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC020B0: 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(0xBFC020B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC020B4: 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, 0xBFC020B4u); return; } g_debug_last_store_pc = 0xBFC020B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC020B4u); #endif label_BFC020B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC020B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC020B8: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC020B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC020BC: 0FF005D7 jal 0xBFC0175C */ cpu->gpr[31] = 0xBFC020C4u; /* jal link before delay slot */ psx_delay_BFC020BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC020C0: AFA50050 sw $a1, 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, 0xBFC020C0u); return; } g_debug_last_store_pc = 0xBFC020C0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50050u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC020C0u); #endif if (psx_delay_BFC020BC) { psx_delay_BFC020BC = 0; cpu->gpr[31] = 0xBFC020C4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0175Cu); cpu->pc = 0xBFC0175Cu; return; } label_BFC020C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC020C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020C4u); #endif /* 0xBFC020C4: 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, 0xBFC020C4u); 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(0xBFC020C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC020C8: 1040001C beq $v0, $zero, 0xBFC0213C */ uint32_t psx_brA_BFC020C8 = cpu->gpr[2]; uint32_t psx_brB_BFC020C8 = cpu->gpr[0]; psx_taken_BFC020C8 = (psx_brA_BFC020C8 == psx_brB_BFC020C8); psx_delay_BFC020C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC020CC: 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(0xBFC020CCu); #endif if (psx_delay_BFC020C8) { psx_delay_BFC020C8 = 0; if (psx_taken_BFC020C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0213Cu); goto label_BFC0213C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020D0u); } label_BFC020D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC020D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC020D0: 00108140 sll $s0, $s0, 5 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 5u; PGXP_ALU(0x00108140u, cpu->gpr[16], _pgx1, 5u); } #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, 0x110000u); #endif /* 0xBFC020D4: 02908021 addu $s0, $s4, $s0 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[20] + cpu->gpr[16]; PGXP_ALU(0x02908021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC020D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC020D8: 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(0xBFC020D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC020DC: 240300A0 addiu $v1, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x240300A0u, cpu->gpr[3], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC020DCu); #endif label_BFC020E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC020E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020E0u); #endif /* 0xBFC020E0: 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, 0xBFC020E0u); 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(0xBFC020E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC020E4: 00000000 nop */ /* nop */ #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, 0x11u); #endif /* 0xBFC020E8: 10800004 beq $a0, $zero, 0xBFC020FC */ uint32_t psx_brA_BFC020E8 = cpu->gpr[4]; uint32_t psx_brB_BFC020E8 = cpu->gpr[0]; psx_taken_BFC020E8 = (psx_brA_BFC020E8 == psx_brB_BFC020E8); psx_delay_BFC020E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC020EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC020ECu); #endif if (psx_delay_BFC020E8) { psx_delay_BFC020E8 = 0; if (psx_taken_BFC020E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020FCu); goto label_BFC020FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020F0u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC020F0: 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, 0xBFC020F0u); return; } g_debug_last_store_pc = 0xBFC020F0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000004u, _pgxa, cpu->gpr[0]); } #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, 0x10004u); #endif /* 0xBFC020F4: A6020008 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020F4u); return; } g_debug_last_store_pc = 0xBFC020F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6020008u, _pgxa, cpu->gpr[2]); } #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, 0x10008u); #endif /* 0xBFC020F8: AE030000 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC020F8u); return; } g_debug_last_store_pc = 0xBFC020F8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC020F8u); #endif label_BFC020FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC020FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC020FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC020FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC020FC: 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(0xBFC020FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200020u); #endif /* 0xBFC02100: 14B5FFF7 bne $a1, $s5, 0xBFC020E0 */ uint32_t psx_brA_BFC02100 = cpu->gpr[5]; uint32_t psx_brB_BFC02100 = cpu->gpr[21]; psx_taken_BFC02100 = (psx_brA_BFC02100 != psx_brB_BFC02100); psx_delay_BFC02100 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC02104: 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(0xBFC02104u); #endif if (psx_delay_BFC02100) { psx_delay_BFC02100 = 0; if (psx_taken_BFC02100) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020E0u); goto label_BFC020E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02108u); } label_BFC02108: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02108u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02108: 1000FFA2 beq $zero, $zero, 0xBFC01F94 */ uint32_t psx_brA_BFC02108 = cpu->gpr[0]; uint32_t psx_brB_BFC02108 = cpu->gpr[0]; psx_taken_BFC02108 = (psx_brA_BFC02108 == psx_brB_BFC02108); psx_delay_BFC02108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0210Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0210C: 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(0xBFC0210Cu); #endif if (psx_delay_BFC02108) { psx_delay_BFC02108 = 0; if (psx_taken_BFC02108) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01F94u); goto label_BFC01F94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02110u); } label_BFC02110: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02110u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02110: 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(0xBFC02110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC02114: 00A21021 addu $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC02118: 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(0xBFC02118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0211Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0211C: 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, 0xBFC0211Cu); return; } g_debug_last_store_pc = 0xBFC0211Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0xBFC0211Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC02120: 10C0FFE5 beq $a2, $zero, 0xBFC020B8 */ uint32_t psx_brA_BFC02120 = cpu->gpr[6]; uint32_t psx_brB_BFC02120 = cpu->gpr[0]; psx_taken_BFC02120 = (psx_brA_BFC02120 == psx_brB_BFC02120); psx_delay_BFC02120 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC02124: AC470000 sw $a3, 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, 0xBFC02124u); return; } g_debug_last_store_pc = 0xBFC02124u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC470000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC02124u); #endif if (psx_delay_BFC02120) { psx_delay_BFC02120 = 0; if (psx_taken_BFC02120) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC020B8u); goto label_BFC020B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02128u); } label_BFC02128: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02128u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x118u); #endif /* 0xBFC02128: 01041821 addu $v1, $t0, $a0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[8] + cpu->gpr[4]; PGXP_ALU(0x01041821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0212Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0212C: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC0212Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC02130: 01001025 or $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(0x01001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02134: 1000FFC7 beq $zero, $zero, 0xBFC02054 */ uint32_t psx_brA_BFC02134 = cpu->gpr[0]; uint32_t psx_brB_BFC02134 = cpu->gpr[0]; psx_taken_BFC02134 = (psx_brA_BFC02134 == psx_brB_BFC02134); psx_delay_BFC02134 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC02138: 02831821 addu $v1, $s4, $v1 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[20] + cpu->gpr[3]; PGXP_ALU(0x02831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02138u); #endif if (psx_delay_BFC02134) { psx_delay_BFC02134 = 0; if (psx_taken_BFC02134) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02054u); goto label_BFC02054; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0213Cu); } 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: 1000FF97 beq $zero, $zero, 0xBFC01F9C */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC02140: AE600018 sw $zero, 24($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02140u); return; } g_debug_last_store_pc = 0xBFC02140u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE600018u, _pgxa, cpu->gpr[0]); } #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, 0xBFC01F9Cu); goto label_BFC01F9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02144u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02144u); cpu->pc = 0xBFC02144u; return; /* fallthrough */ } void OpenBIOS_func_1FC02144(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02144u); int psx_delay_BFC02164 = 0; int psx_taken_BFC02164 = 0; int psx_delay_BFC0218C = 0; int psx_taken_BFC0218C = 0; int psx_delay_BFC02194 = 0; int psx_delay_BFC021B0 = 0; int psx_delay_BFC021BC = 0; int psx_taken_BFC021BC = 0; int psx_delay_BFC02218 = 0; int psx_taken_BFC02218 = 0; int psx_delay_BFC0223C = 0; int psx_delay_BFC02248 = 0; int psx_taken_BFC02248 = 0; int psx_delay_BFC02250 = 0; int psx_taken_BFC02250 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0216Cu: goto label_BFC0216C; case 0xBFC02170u: goto label_BFC02170; case 0xBFC02194u: goto label_BFC02194; case 0xBFC0219Cu: goto label_BFC0219C; case 0xBFC021B8u: goto label_BFC021B8; case 0xBFC021C4u: goto label_BFC021C4; case 0xBFC02204u: goto label_BFC02204; case 0xBFC02220u: goto label_BFC02220; case 0xBFC02224u: goto label_BFC02224; case 0xBFC02244u: goto label_BFC02244; case 0xBFC02248u: goto label_BFC02248; case 0xBFC02250u: goto label_BFC02250; default: break; } } 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, 0x20000000u); #endif /* 0xBFC02144: 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(0xBFC02144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC02148: 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, 0xBFC02148u); return; } g_debug_last_store_pc = 0xBFC02148u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC0214C: 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, 0xBFC0214Cu); return; } g_debug_last_store_pc = 0xBFC0214Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC0214Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC02150: 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, 0xBFC02150u); return; } g_debug_last_store_pc = 0xBFC02150u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC02154: 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, 0xBFC02154u); return; } g_debug_last_store_pc = 0xBFC02154u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #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, 0x40011u); #endif /* 0xBFC02158: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0215Cu); #endif /* 0xBFC0215C: 8C840004 lw $a0, 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, 0xBFC0215Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } PGXP_LOAD(0x8C840004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0215Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC02160: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _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, 0x10u); #endif /* 0xBFC02164: 04800002 bltz $a0, 0xBFC02170 */ uint32_t psx_brA_BFC02164 = cpu->gpr[4]; psx_taken_BFC02164 = ((int32_t)psx_brA_BFC02164 < 0); psx_delay_BFC02164 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02168: 2491000F addiu $s1, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2491000Fu, cpu->gpr[17], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02168u); #endif if (psx_delay_BFC02164) { psx_delay_BFC02164 = 0; if (psx_taken_BFC02164) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02170u); goto label_BFC02170; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0216Cu); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC0216C: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0216Cu); #endif label_BFC02170: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02170u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02170: 00118903 sra $s1, $s1, 4 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 4u); PGXP_ALU(0x00118903u, cpu->gpr[17], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02174: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC02178: 00111080 sll $v0, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] << 2u; PGXP_ALU(0x00111080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x8u); #endif /* 0xBFC0217C: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0217Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02180: 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(0xBFC02180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02184u); #endif /* 0xBFC02184: 8C420000 lw $v0, 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, 0xBFC02184u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02188: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0218Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0218C: 1440002D bne $v0, $zero, 0xBFC02244 */ uint32_t psx_brA_BFC0218C = cpu->gpr[2]; uint32_t psx_brB_BFC0218C = cpu->gpr[0]; psx_taken_BFC0218C = (psx_brA_BFC0218C != psx_brB_BFC0218C); psx_delay_BFC0218C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02190: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02190u); #endif if (psx_delay_BFC0218C) { psx_delay_BFC0218C = 0; if (psx_taken_BFC0218C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02244u); goto label_BFC02244; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02194u); } label_BFC02194: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02194u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02194: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC0219Cu; /* jal link before delay slot */ psx_delay_BFC02194 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC02198: AFA40010 sw $a0, 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, 0xBFC02198u); return; } g_debug_last_store_pc = 0xBFC02198u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02198u); #endif if (psx_delay_BFC02194) { psx_delay_BFC02194 = 0; cpu->gpr[31] = 0xBFC0219Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC0219C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0219Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0219C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021A0u); #endif /* 0xBFC021A0: 8C4551F0 lw $a1, 20976($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20976; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC021A0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C4551F0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC021A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021A4u); #endif /* 0xBFC021A4: 8FA40010 lw $a0, 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, 0xBFC021A4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x40u); #endif /* 0xBFC021A8: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #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, 0x40u); #endif /* 0xBFC021AC: 24C651F4 addiu $a2, $a2, 20980 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (20980)); PGXP_ALU(0x24C651F4u, cpu->gpr[6], _pgx1, 0x000051F4u); } #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, 0x80000000u); #endif /* 0xBFC021B0: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC021B8u; /* jal link before delay slot */ psx_delay_BFC021B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC021B4: 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(0xBFC021B4u); #endif if (psx_delay_BFC021B0) { psx_delay_BFC021B0 = 0; cpu->gpr[31] = 0xBFC021B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } label_BFC021B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC021B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC021B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC021B8: 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(0xBFC021B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC021BC: 10430024 beq $v0, $v1, 0xBFC02250 */ uint32_t psx_brA_BFC021BC = cpu->gpr[2]; uint32_t psx_brB_BFC021BC = cpu->gpr[3]; psx_taken_BFC021BC = (psx_brA_BFC021BC == psx_brB_BFC021BC); psx_delay_BFC021BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC021C0: 00111900 sll $v1, $s1, 4 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[17] << 4u; PGXP_ALU(0x00111900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC021C0u); #endif if (psx_delay_BFC021BC) { psx_delay_BFC021BC = 0; if (psx_taken_BFC021BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02250u); goto label_BFC02250; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC021C4u); } label_BFC021C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC021C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC021C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC021C4: 00711823 subu $v1, $v1, $s1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[17]; PGXP_ALU(0x00711823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC021C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC021C8: 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(0xBFC021C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC021CC: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC021CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC021D0: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC021D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC021D4: 24844E28 addiu $a0, $a0, 20008 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20008)); PGXP_ALU(0x24844E28u, cpu->gpr[4], _pgx1, 0x00004E28u); } #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, 0x58u); #endif /* 0xBFC021D8: 00643021 addu $a2, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00643021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC021D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021DCu); #endif /* 0xBFC021DC: 8CC50000 lw $a1, 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, 0xBFC021DCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40u); } PGXP_LOAD(0x8CC50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC021DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC021E0: 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(0xBFC021E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC021E4: 30A500F0 andi $a1, $a1, 0xF0 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0xF0u; PGXP_ALU(0x30A500F0u, cpu->gpr[5], _pgx1, 0x00F0u); } #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, 0x10020u); #endif /* 0xBFC021E8: AE050014 sw $a1, 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, 0xBFC021E8u); return; } g_debug_last_store_pc = 0xBFC021E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC021E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021ECu); #endif /* 0xBFC021EC: 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, 0xBFC021ECu); 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(0xBFC021ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC021F0: 00021180 sll $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 6u; PGXP_ALU(0x00021180u, cpu->gpr[2], _pgx1, 6u); } #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, 0x10004u); #endif /* 0xBFC021F4: AE020020 sw $v0, 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, 0xBFC021F4u); return; } g_debug_last_store_pc = 0xBFC021F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC021F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC021F8: AE050018 sw $a1, 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, 0xBFC021F8u); return; } g_debug_last_store_pc = 0xBFC021F8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050018u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC021F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC021FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC021FC: 2463000A addiu $v1, $v1, 10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (10)); PGXP_ALU(0x2463000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC021FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02200: 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(0xBFC02200u); #endif label_BFC02204: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02204u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2Cu); #endif /* 0xBFC02204: 00432821 addu $a1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00432821u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x30u); #endif /* 0xBFC02208: 00852821 addu $a1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0220Cu); #endif /* 0xBFC0220C: 80A50000 lb $a1, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 5, 0x20u); PGXP_LOAD(0x80A50000u, _pgxa, cpu->gpr[5]); } #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, 0x10044u); #endif /* 0xBFC02210: 02023021 addu $a2, $s0, $v0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[2]; PGXP_ALU(0x02023021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x60u); #endif /* 0xBFC02214: A0C50000 sb $a1, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02214u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0C50000u, _pgxa, cpu->gpr[5]); } #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, 0x21u); #endif /* 0xBFC02218: 14A0FFFA bne $a1, $zero, 0xBFC02204 */ uint32_t psx_brA_BFC02218 = cpu->gpr[5]; uint32_t psx_brB_BFC02218 = cpu->gpr[0]; psx_taken_BFC02218 = (psx_brA_BFC02218 != psx_brB_BFC02218); psx_delay_BFC02218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0221Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0221C: 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(0xBFC0221Cu); #endif if (psx_delay_BFC02218) { psx_delay_BFC02218 = 0; if (psx_taken_BFC02218) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02204u); goto label_BFC02204; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02220u); } label_BFC02220: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02220u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02220: 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(0xBFC02220u); #endif label_BFC02224: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02224u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC02224: AE420018 sw $v0, 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, 0xBFC02224u); return; } g_debug_last_store_pc = 0xBFC02224u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02228u); #endif /* 0xBFC02228: 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, 0xBFC02228u); 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(0xBFC02228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0222Cu); #endif /* 0xBFC0222C: 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, 0xBFC0222Cu); 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(0xBFC0222Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02230u); #endif /* 0xBFC02230: 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, 0xBFC02230u); 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(0xBFC02230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC02234: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02238u); #endif /* 0xBFC02238: 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, 0xBFC02238u); 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(0xBFC02238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0223Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0223C: 03E00008 jr $ra */ psx_delay_BFC0223C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02240: 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(0xBFC02240u); #endif if (psx_delay_BFC0223C) { psx_delay_BFC0223C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC02244: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02244u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02244: 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(0xBFC02244u); #endif label_BFC02248: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02248u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02248: 1000FFF6 beq $zero, $zero, 0xBFC02224 */ uint32_t psx_brA_BFC02248 = cpu->gpr[0]; uint32_t psx_brB_BFC02248 = cpu->gpr[0]; psx_taken_BFC02248 = (psx_brA_BFC02248 == psx_brB_BFC02248); psx_delay_BFC02248 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0224Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC0224C: 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(0xBFC0224Cu); #endif if (psx_delay_BFC02248) { psx_delay_BFC02248 = 0; if (psx_taken_BFC02248) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02224u); goto label_BFC02224; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02250u); } label_BFC02250: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02250u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02250: 1000FFFD beq $zero, $zero, 0xBFC02248 */ uint32_t psx_brA_BFC02250 = cpu->gpr[0]; uint32_t psx_brB_BFC02250 = cpu->gpr[0]; psx_taken_BFC02250 = (psx_brA_BFC02250 == psx_brB_BFC02250); psx_delay_BFC02250 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02254: 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(0xBFC02254u); #endif if (psx_delay_BFC02250) { psx_delay_BFC02250 = 0; if (psx_taken_BFC02250) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02248u); goto label_BFC02248; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02258u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02258u); cpu->pc = 0xBFC02258u; return; /* fallthrough */ } void OpenBIOS_func_1FC02258(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02258u); int psx_delay_BFC0227C = 0; int psx_taken_BFC0227C = 0; int psx_delay_BFC022A4 = 0; int psx_taken_BFC022A4 = 0; int psx_delay_BFC022B0 = 0; int psx_delay_BFC022B8 = 0; int psx_delay_BFC022C0 = 0; int psx_taken_BFC022C0 = 0; int psx_delay_BFC022E4 = 0; int psx_taken_BFC022E4 = 0; int psx_delay_BFC022FC = 0; int psx_taken_BFC022FC = 0; int psx_delay_BFC02304 = 0; int psx_taken_BFC02304 = 0; int psx_delay_BFC02330 = 0; int psx_delay_BFC02338 = 0; int psx_taken_BFC02338 = 0; int psx_delay_BFC02340 = 0; int psx_taken_BFC02340 = 0; int psx_delay_BFC02358 = 0; int psx_taken_BFC02358 = 0; int psx_delay_BFC02360 = 0; int psx_taken_BFC02360 = 0; int psx_delay_BFC02368 = 0; int psx_taken_BFC02368 = 0; int psx_delay_BFC0237C = 0; int psx_taken_BFC0237C = 0; int psx_delay_BFC02388 = 0; int psx_taken_BFC02388 = 0; int psx_delay_BFC02390 = 0; int psx_taken_BFC02390 = 0; int psx_delay_BFC023A4 = 0; int psx_taken_BFC023A4 = 0; int psx_delay_BFC023C0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02284u: goto label_BFC02284; case 0xBFC02288u: goto label_BFC02288; case 0xBFC022ACu: goto label_BFC022AC; case 0xBFC022B8u: goto label_BFC022B8; case 0xBFC022C0u: goto label_BFC022C0; case 0xBFC022C8u: goto label_BFC022C8; case 0xBFC022DCu: goto label_BFC022DC; case 0xBFC022ECu: goto label_BFC022EC; case 0xBFC022F0u: goto label_BFC022F0; case 0xBFC02304u: goto label_BFC02304; case 0xBFC0230Cu: goto label_BFC0230C; case 0xBFC02310u: goto label_BFC02310; case 0xBFC02338u: goto label_BFC02338; case 0xBFC02340u: goto label_BFC02340; case 0xBFC02348u: goto label_BFC02348; case 0xBFC02350u: goto label_BFC02350; case 0xBFC02360u: goto label_BFC02360; case 0xBFC02368u: goto label_BFC02368; case 0xBFC02370u: goto label_BFC02370; case 0xBFC02378u: goto label_BFC02378; case 0xBFC02384u: goto label_BFC02384; case 0xBFC02390u: goto label_BFC02390; case 0xBFC02398u: goto label_BFC02398; case 0xBFC023ACu: goto label_BFC023AC; default: break; } } label_BFC02258: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02258u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02258: 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(0xBFC02258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0225Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0225C: 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, 0xBFC0225Cu); return; } g_debug_last_store_pc = 0xBFC0225Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC02260: 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, 0xBFC02260u); return; } g_debug_last_store_pc = 0xBFC02260u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #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, 0x20040000u); #endif /* 0xBFC02264: 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, 0xBFC02264u); return; } g_debug_last_store_pc = 0xBFC02264u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC02268: 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, 0xBFC02268u); return; } g_debug_last_store_pc = 0xBFC02268u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC02268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0226Cu); #endif /* 0xBFC0226C: 8C910004 lw $s1, 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, 0xBFC0226Cu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } PGXP_LOAD(0x8C910004u, _pgxa, cpu->gpr[17]); } #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: 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(0xBFC02270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC02274: AC820018 sw $v0, 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, 0xBFC02274u); return; } g_debug_last_store_pc = 0xBFC02274u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC02278: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0227Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0227C: 06200002 bltz $s1, 0xBFC02288 */ uint32_t psx_brA_BFC0227C = cpu->gpr[17]; psx_taken_BFC0227C = ((int32_t)psx_brA_BFC0227C < 0); psx_delay_BFC0227C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC02280: 2622000F addiu $v0, $s1, 15 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] + (15)); PGXP_ALU(0x2622000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02280u); #endif if (psx_delay_BFC0227C) { psx_delay_BFC0227C = 0; if (psx_taken_BFC0227C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02288u); goto label_BFC02288; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02284u); } label_BFC02284: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02284u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20005u); #endif /* 0xBFC02284: 02201025 or $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(0x02201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02284u); #endif label_BFC02288: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02288u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02288: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0228Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0228C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0228Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02290: 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(0xBFC02290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02294: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02298: 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(0xBFC02298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0229Cu); #endif /* 0xBFC0229C: 8C420000 lw $v0, 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, 0xBFC0229Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0229Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC022A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC022A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC022A4: 14400041 bne $v0, $zero, 0xBFC023AC */ uint32_t psx_brA_BFC022A4 = cpu->gpr[2]; uint32_t psx_brB_BFC022A4 = cpu->gpr[0]; psx_taken_BFC022A4 = (psx_brA_BFC022A4 != psx_brB_BFC022A4); psx_delay_BFC022A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC022A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC022A8u); #endif if (psx_delay_BFC022A4) { psx_delay_BFC022A4 = 0; if (psx_taken_BFC022A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC023ACu); goto label_BFC023AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC022ACu); } label_BFC022AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC022ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC022ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC022AC: AFA60010 sw $a2, 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, 0xBFC022ACu); return; } g_debug_last_store_pc = 0xBFC022ACu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60010u, _pgxa, cpu->gpr[6]); } #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, 0x80000000u); #endif /* 0xBFC022B0: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC022B8u; /* jal link before delay slot */ psx_delay_BFC022B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC022B4: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC022B4u); #endif if (psx_delay_BFC022B0) { psx_delay_BFC022B0 = 0; cpu->gpr[31] = 0xBFC022B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC022B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC022B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC022B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC022B8: 0FF0060C jal 0xBFC01830 */ cpu->gpr[31] = 0xBFC022C0u; /* jal link before delay slot */ psx_delay_BFC022B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC022BC: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC022BCu); #endif if (psx_delay_BFC022B8) { psx_delay_BFC022B8 = 0; cpu->gpr[31] = 0xBFC022C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01830u); cpu->pc = 0xBFC01830u; return; } 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, 0x5u); #endif /* 0xBFC022C0: 1040003A beq $v0, $zero, 0xBFC023AC */ uint32_t psx_brA_BFC022C0 = cpu->gpr[2]; uint32_t psx_brB_BFC022C0 = cpu->gpr[0]; psx_taken_BFC022C0 = (psx_brA_BFC022C0 == psx_brB_BFC022C0); psx_delay_BFC022C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC022C4: 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(0xBFC022C4u); #endif if (psx_delay_BFC022C0) { psx_delay_BFC022C0 = 0; if (psx_taken_BFC022C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC023ACu); goto label_BFC023AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC022C8u); } label_BFC022C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC022C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC022C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC022C8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC022C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022CCu); #endif /* 0xBFC022CC: 8FA50010 lw $a1, 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, 0xBFC022CCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50010u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC022D0: 244251F4 addiu $v0, $v0, 20980 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20980)); PGXP_ALU(0x244251F4u, cpu->gpr[2], _pgx1, 0x000051F4u); } #ifdef PSX_COSIM cosim_instr(0xBFC022D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC022D4: 2407003F addiu $a3, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2407003Fu, cpu->gpr[7], _pgx1, 0x0000003Fu); } #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, 0x11u); #endif /* 0xBFC022D8: 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(0xBFC022D8u); #endif label_BFC022DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC022DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC022DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC022DC: 00433021 addu $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(0x00433021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x8u); #endif /* 0xBFC022E0: 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(0xBFC022E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC022E4: 1464FFFD bne $v1, $a0, 0xBFC022DC */ uint32_t psx_brA_BFC022E4 = cpu->gpr[3]; uint32_t psx_brB_BFC022E4 = cpu->gpr[4]; psx_taken_BFC022E4 = (psx_brA_BFC022E4 != psx_brB_BFC022E4); psx_delay_BFC022E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC022E8: A0C70000 sb $a3, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC022E8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0C70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC022E8u); #endif if (psx_delay_BFC022E4) { psx_delay_BFC022E4 = 0; if (psx_taken_BFC022E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC022DCu); goto label_BFC022DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC022ECu); } label_BFC022EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC022ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC022ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC022EC: 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(0xBFC022ECu); #endif 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, 0x10018u); #endif /* 0xBFC022F0: 02032021 addu $a0, $s0, $v1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[3]; PGXP_ALU(0x02032021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC022F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022F4u); #endif /* 0xBFC022F4: 80840000 lb $a0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 4, 0x10u); PGXP_LOAD(0x80840000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC022F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC022F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC022F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC022FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC022FC: 1480000E bne $a0, $zero, 0xBFC02338 */ uint32_t psx_brA_BFC022FC = cpu->gpr[4]; uint32_t psx_brB_BFC022FC = cpu->gpr[0]; psx_taken_BFC022FC = (psx_brA_BFC022FC != psx_brB_BFC022FC); 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; if (psx_taken_BFC022FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02338u); goto label_BFC02338; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02304u); } 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, 0x9u); #endif /* 0xBFC02304: 14600018 bne $v1, $zero, 0xBFC02368 */ uint32_t psx_brA_BFC02304 = cpu->gpr[3]; 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, 0x1u); #endif /* 0xBFC02308: 00000000 nop */ /* nop */ #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, 0xBFC02368u); goto label_BFC02368; } #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, 0x5u); #endif /* 0xBFC0230C: A0400013 sb $zero, 19($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0230Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (19)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0400013u, _pgxa, cpu->gpr[0]); } #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 /* 0xBFC02310: 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, 0xBFC02310u); 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(0xBFC02310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02314u); #endif /* 0xBFC02314: 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, 0xBFC02314u); 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(0xBFC02314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02318u); #endif /* 0xBFC02318: 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, 0xBFC02318u); 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(0xBFC02318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0231C: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02320u); #endif /* 0xBFC02320: 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, 0xBFC02320u); 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(0xBFC02320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02324: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02328: 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(0xBFC02328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0232Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0232C: 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(0xBFC0232Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC02330: 0BF00851 j 0xBFC02144 */ psx_delay_BFC02330 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02334: AC4351F0 sw $v1, 20976($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20976; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20976)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02334u); return; } g_debug_last_store_pc = 0xBFC02334u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4351F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02334u); #endif if (psx_delay_BFC02330) { psx_delay_BFC02330 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02144u); cpu->pc = 0xBFC02144u; return; } label_BFC02338: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02338u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02338: 1000FFED beq $zero, $zero, 0xBFC022F0 */ uint32_t psx_brA_BFC02338 = cpu->gpr[0]; uint32_t psx_brB_BFC02338 = cpu->gpr[0]; psx_taken_BFC02338 = (psx_brA_BFC02338 == psx_brB_BFC02338); psx_delay_BFC02338 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0233Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0233C: 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(0xBFC0233Cu); #endif if (psx_delay_BFC02338) { psx_delay_BFC02338 = 0; if (psx_taken_BFC02338) { #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, 0xBFC02340u); } label_BFC02340: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02340u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC02340: 10640015 beq $v1, $a0, 0xBFC02398 */ uint32_t psx_brA_BFC02340 = cpu->gpr[3]; uint32_t psx_brB_BFC02340 = cpu->gpr[4]; psx_taken_BFC02340 = (psx_brA_BFC02340 == psx_brB_BFC02340); psx_delay_BFC02340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC02344: 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(0xBFC02344u); #endif if (psx_delay_BFC02340) { psx_delay_BFC02340 = 0; if (psx_taken_BFC02340) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02398u); goto label_BFC02398; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02348u); } label_BFC02348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02348: 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(0xBFC02348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0234Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0234C: A043FFFF sb $v1, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0234Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA043FFFFu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0234Cu); #endif label_BFC02350: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02350u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02350u); #endif /* 0xBFC02350: 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(0xBFC02350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02354: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02358: 1460FFF9 bne $v1, $zero, 0xBFC02340 */ uint32_t psx_brA_BFC02358 = cpu->gpr[3]; uint32_t psx_brB_BFC02358 = cpu->gpr[0]; psx_taken_BFC02358 = (psx_brA_BFC02358 != psx_brB_BFC02358); psx_delay_BFC02358 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0235Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0235C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0235Cu); #endif if (psx_delay_BFC02358) { psx_delay_BFC02358 = 0; if (psx_taken_BFC02358) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02340u); goto label_BFC02340; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02360u); } label_BFC02360: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02360u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02360: 1000FFEB beq $zero, $zero, 0xBFC02310 */ uint32_t psx_brA_BFC02360 = cpu->gpr[0]; uint32_t psx_brB_BFC02360 = cpu->gpr[0]; psx_taken_BFC02360 = (psx_brA_BFC02360 == psx_brB_BFC02360); psx_delay_BFC02360 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02364: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02364u; 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(0xBFC02364u); #endif if (psx_delay_BFC02360) { psx_delay_BFC02360 = 0; if (psx_taken_BFC02360) { #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, 0xBFC02368u); } label_BFC02368: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02368u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02368: 1000FFF9 beq $zero, $zero, 0xBFC02350 */ uint32_t psx_brA_BFC02368 = cpu->gpr[0]; uint32_t psx_brB_BFC02368 = cpu->gpr[0]; psx_taken_BFC02368 = (psx_brA_BFC02368 == psx_brB_BFC02368); psx_delay_BFC02368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0236Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0236C: 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(0xBFC0236Cu); #endif if (psx_delay_BFC02368) { psx_delay_BFC02368 = 0; if (psx_taken_BFC02368) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02350u); goto label_BFC02350; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02370u); } label_BFC02370: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02370u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02370: 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(0xBFC02370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC02374: A087FFFF sb $a3, -1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02374u; 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(0xBFC02374u); #endif label_BFC02378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC02378: 0083302B sltu $a2, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[4] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0083302Bu, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0237Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0237C: 14C0FFFC bne $a2, $zero, 0xBFC02370 */ uint32_t psx_brA_BFC0237C = cpu->gpr[6]; uint32_t psx_brB_BFC0237C = cpu->gpr[0]; psx_taken_BFC0237C = (psx_brA_BFC0237C != psx_brB_BFC0237C); psx_delay_BFC0237C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02380: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02380u); #endif if (psx_delay_BFC0237C) { psx_delay_BFC0237C = 0; if (psx_taken_BFC0237C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02370u); goto label_BFC02370; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02384u); } label_BFC02384: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02384u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC02384: 0043202B sltu $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02388: 1080FFF5 beq $a0, $zero, 0xBFC02360 */ uint32_t psx_brA_BFC02388 = cpu->gpr[4]; uint32_t psx_brB_BFC02388 = cpu->gpr[0]; psx_taken_BFC02388 = (psx_brA_BFC02388 == psx_brB_BFC02388); psx_delay_BFC02388 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0238Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0238C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0238Cu); #endif if (psx_delay_BFC02388) { psx_delay_BFC02388 = 0; if (psx_taken_BFC02388) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02360u); goto label_BFC02360; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02390u); } label_BFC02390: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02390u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02390: 1000FFF3 beq $zero, $zero, 0xBFC02360 */ uint32_t psx_brA_BFC02390 = cpu->gpr[0]; uint32_t psx_brB_BFC02390 = cpu->gpr[0]; psx_taken_BFC02390 = (psx_brA_BFC02390 == psx_brB_BFC02390); psx_delay_BFC02390 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC02394: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02394u); #endif if (psx_delay_BFC02390) { psx_delay_BFC02390 = 0; if (psx_taken_BFC02390) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02360u); goto label_BFC02360; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02398u); } label_BFC02398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02398: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0239Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0239C: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0239Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC023A0: 24635208 addiu $v1, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24635208u, cpu->gpr[3], _pgx1, 0x00005208u); } #ifdef PSX_COSIM cosim_instr(0xBFC023A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC023A4: 1000FFF4 beq $zero, $zero, 0xBFC02378 */ uint32_t psx_brA_BFC023A4 = cpu->gpr[0]; uint32_t psx_brB_BFC023A4 = cpu->gpr[0]; psx_taken_BFC023A4 = (psx_brA_BFC023A4 == psx_brB_BFC023A4); psx_delay_BFC023A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC023A8: 2407003F addiu $a3, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2407003Fu, cpu->gpr[7], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC023A8u); #endif if (psx_delay_BFC023A4) { psx_delay_BFC023A4 = 0; if (psx_taken_BFC023A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02378u); goto label_BFC02378; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC023ACu); } label_BFC023AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC023ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC023ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023ACu); #endif /* 0xBFC023AC: 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, 0xBFC023ACu); 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(0xBFC023ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023B0u); #endif /* 0xBFC023B0: 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, 0xBFC023B0u); 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(0xBFC023B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023B4u); #endif /* 0xBFC023B4: 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, 0xBFC023B4u); 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(0xBFC023B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023B8u); #endif /* 0xBFC023B8: 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, 0xBFC023B8u); 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(0xBFC023B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC023BC: 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(0xBFC023BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC023C0: 03E00008 jr $ra */ psx_delay_BFC023C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC023C4: 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(0xBFC023C4u); #endif if (psx_delay_BFC023C0) { psx_delay_BFC023C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC023C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC023C8u); int psx_delay_BFC02400 = 0; int psx_taken_BFC02400 = 0; int psx_delay_BFC02428 = 0; int psx_taken_BFC02428 = 0; int psx_delay_BFC02430 = 0; int psx_delay_BFC02438 = 0; int psx_delay_BFC02440 = 0; int psx_taken_BFC02440 = 0; int psx_delay_BFC0244C = 0; int psx_delay_BFC0245C = 0; int psx_delay_BFC0246C = 0; int psx_taken_BFC0246C = 0; int psx_delay_BFC02498 = 0; int psx_delay_BFC024A8 = 0; int psx_delay_BFC024B0 = 0; int psx_taken_BFC024B0 = 0; int psx_delay_BFC024B8 = 0; int psx_taken_BFC024B8 = 0; int psx_delay_BFC024D0 = 0; int psx_taken_BFC024D0 = 0; int psx_delay_BFC02508 = 0; int psx_taken_BFC02508 = 0; int psx_delay_BFC02520 = 0; int psx_delay_BFC02528 = 0; int psx_taken_BFC02528 = 0; int psx_delay_BFC0253C = 0; int psx_taken_BFC0253C = 0; int psx_delay_BFC02544 = 0; int psx_taken_BFC02544 = 0; int psx_delay_BFC0254C = 0; int psx_taken_BFC0254C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02408u: goto label_BFC02408; case 0xBFC0240Cu: goto label_BFC0240C; case 0xBFC02430u: goto label_BFC02430; case 0xBFC02438u: goto label_BFC02438; case 0xBFC02440u: goto label_BFC02440; case 0xBFC02448u: goto label_BFC02448; case 0xBFC02454u: goto label_BFC02454; case 0xBFC02464u: goto label_BFC02464; case 0xBFC02474u: goto label_BFC02474; case 0xBFC02478u: goto label_BFC02478; case 0xBFC0247Cu: goto label_BFC0247C; case 0xBFC024A0u: goto label_BFC024A0; case 0xBFC024B0u: goto label_BFC024B0; case 0xBFC024B8u: goto label_BFC024B8; case 0xBFC024C0u: goto label_BFC024C0; case 0xBFC024C8u: goto label_BFC024C8; case 0xBFC024D8u: goto label_BFC024D8; case 0xBFC024FCu: goto label_BFC024FC; case 0xBFC02510u: goto label_BFC02510; case 0xBFC02528u: goto label_BFC02528; case 0xBFC02530u: goto label_BFC02530; case 0xBFC02544u: goto label_BFC02544; case 0xBFC0254Cu: goto label_BFC0254C; default: break; } } label_BFC023C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC023C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC023C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC023C8: 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(0xBFC023C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC023CC: AFB40064 sw $s4, 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, 0xBFC023CCu); return; } g_debug_last_store_pc = 0xBFC023CCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40064u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC023CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC023D0: AFB30060 sw $s3, 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, 0xBFC023D0u); return; } g_debug_last_store_pc = 0xBFC023D0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30060u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC023D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC023D4: AFB2005C sw $s2, 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, 0xBFC023D4u); return; } g_debug_last_store_pc = 0xBFC023D4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2005Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC023D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC023D8: AFB00054 sw $s0, 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, 0xBFC023D8u); return; } g_debug_last_store_pc = 0xBFC023D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00054u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC023D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC023DC: AFBF006C sw $ra, 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, 0xBFC023DCu); return; } g_debug_last_store_pc = 0xBFC023DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF006Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC023DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC023E0: AFB50068 sw $s5, 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, 0xBFC023E0u); return; } g_debug_last_store_pc = 0xBFC023E0u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50068u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC023E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC023E4: AFB10058 sw $s1, 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, 0xBFC023E4u); return; } g_debug_last_store_pc = 0xBFC023E4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10058u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC023E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023E8u); #endif /* 0xBFC023E8: 8C910004 lw $s1, 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, 0xBFC023E8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } PGXP_LOAD(0x8C910004u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC023E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC023EC: 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(0xBFC023ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC023F0: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC023F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC023F4: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC023F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80081u); #endif /* 0xBFC023F8: 00E09825 or $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(0x00E09825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC023F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC023FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC023FC: AC820018 sw $v0, 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, 0xBFC023FCu); return; } g_debug_last_store_pc = 0xBFC023FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC023FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02400: 06200002 bltz $s1, 0xBFC0240C */ uint32_t psx_brA_BFC02400 = cpu->gpr[17]; psx_taken_BFC02400 = ((int32_t)psx_brA_BFC02400 < 0); psx_delay_BFC02400 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120000u); #endif /* 0xBFC02404: 2634000F addiu $s4, $s1, 15 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[17] + (15)); PGXP_ALU(0x2634000Fu, cpu->gpr[20], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02404u); #endif if (psx_delay_BFC02400) { psx_delay_BFC02400 = 0; if (psx_taken_BFC02400) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0240Cu); goto label_BFC0240C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02408u); } label_BFC02408: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02408u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120001u); #endif /* 0xBFC02408: 0220A025 or $s4, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[20] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x0220A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02408u); #endif label_BFC0240C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0240Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0240Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0240Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0240C: 0014A103 sra $s4, $s4, 4 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] >> 4u); PGXP_ALU(0x0014A103u, cpu->gpr[20], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC0240Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02410: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02414: 00141080 sll $v0, $s4, 2 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[20] << 2u; PGXP_ALU(0x00141080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC02414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02418: 24634BA4 addiu $v1, $v1, 19364 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19364)); PGXP_ALU(0x24634BA4u, cpu->gpr[3], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0241Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0241C: 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(0xBFC0241Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02420u); #endif /* 0xBFC02420: 8C420000 lw $v0, 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, 0xBFC02420u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02424: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02428: 14400013 bne $v0, $zero, 0xBFC02478 */ uint32_t psx_brA_BFC02428 = cpu->gpr[2]; uint32_t psx_brB_BFC02428 = cpu->gpr[0]; psx_taken_BFC02428 = (psx_brA_BFC02428 != psx_brB_BFC02428); psx_delay_BFC02428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0242Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0242C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0242Cu); #endif if (psx_delay_BFC02428) { psx_delay_BFC02428 = 0; if (psx_taken_BFC02428) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02478u); goto label_BFC02478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02430u); } label_BFC02430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02430: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC02438u; /* jal link before delay slot */ psx_delay_BFC02430 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02434: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02434u); #endif if (psx_delay_BFC02430) { psx_delay_BFC02430 = 0; cpu->gpr[31] = 0xBFC02438u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC02438: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02438u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02438: 0FF0060C jal 0xBFC01830 */ cpu->gpr[31] = 0xBFC02440u; /* jal link before delay slot */ psx_delay_BFC02438 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0243Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC0243C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0243Cu); #endif if (psx_delay_BFC02438) { psx_delay_BFC02438 = 0; cpu->gpr[31] = 0xBFC02440u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01830u); cpu->pc = 0xBFC01830u; return; } label_BFC02440: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02440u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02440: 1040000D beq $v0, $zero, 0xBFC02478 */ uint32_t psx_brA_BFC02440 = cpu->gpr[2]; uint32_t psx_brB_BFC02440 = cpu->gpr[0]; psx_taken_BFC02440 = (psx_brA_BFC02440 == psx_brB_BFC02440); psx_delay_BFC02440 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02444: 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(0xBFC02444u); #endif if (psx_delay_BFC02440) { psx_delay_BFC02440 = 0; if (psx_taken_BFC02440) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02478u); goto label_BFC02478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02448u); } label_BFC02448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02448u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02448: 240200C0 addiu $v0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240200C0u, cpu->gpr[2], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0244Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC0244C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC02454u; /* jalr link before delay slot */ psx_delay_BFC0244C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02450: 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(0xBFC02450u); #endif if (psx_delay_BFC0244C) { psx_delay_BFC0244C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC02454u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02454: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02454u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80041u); #endif /* 0xBFC02454: 02603025 or $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(0x02603025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02458: 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(0xBFC02458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0245Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0245C: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC02464u; /* jal link before delay slot */ psx_delay_BFC0245C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC02460: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02460u); #endif if (psx_delay_BFC0245C) { psx_delay_BFC0245C = 0; cpu->gpr[31] = 0xBFC02464u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } label_BFC02464: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02464u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200005u); #endif /* 0xBFC02464: 0040A825 or $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(0x0040A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02468: 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(0xBFC02468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0246Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC0246C: 12A2000C beq $s5, $v0, 0xBFC024A0 */ uint32_t psx_brA_BFC0246C = cpu->gpr[21]; uint32_t psx_brB_BFC0246C = cpu->gpr[2]; psx_taken_BFC0246C = (psx_brA_BFC0246C == psx_brB_BFC0246C); psx_delay_BFC0246C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02470: 24020011 addiu $v0, $zero, 17 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (17)); PGXP_ALU(0x24020011u, cpu->gpr[2], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0xBFC02470u); #endif if (psx_delay_BFC0246C) { psx_delay_BFC0246C = 0; if (psx_taken_BFC0246C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024A0u); goto label_BFC024A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02474u); } label_BFC02474: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02474u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02474: AE020018 sw $v0, 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, 0xBFC02474u); return; } g_debug_last_store_pc = 0xBFC02474u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02474u); #endif label_BFC02478: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02478u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02478: 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(0xBFC02478u); #endif label_BFC0247C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0247Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0247Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0247Cu); #endif /* 0xBFC0247C: 8FBF006C lw $ra, 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, 0xBFC0247Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF006Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0247Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02480u); #endif /* 0xBFC02480: 8FB50068 lw $s5, 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, 0xBFC02480u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50068u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC02480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02484u); #endif /* 0xBFC02484: 8FB40064 lw $s4, 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, 0xBFC02484u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40064u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC02484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02488u); #endif /* 0xBFC02488: 8FB30060 lw $s3, 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, 0xBFC02488u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB30060u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC02488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0248Cu); #endif /* 0xBFC0248C: 8FB2005C lw $s2, 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, 0xBFC0248Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB2005Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC0248Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02490u); #endif /* 0xBFC02490: 8FB10058 lw $s1, 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, 0xBFC02490u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10058u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC02490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02494u); #endif /* 0xBFC02494: 8FB00054 lw $s0, 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, 0xBFC02494u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00054u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC02498: 03E00008 jr $ra */ psx_delay_BFC02498 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0249Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0249C: 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(0xBFC0249Cu); #endif if (psx_delay_BFC02498) { psx_delay_BFC02498 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC024A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC024A0: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC024A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC024A4: 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(0xBFC024A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC024A8: 0FF006A1 jal 0xBFC01A84 */ cpu->gpr[31] = 0xBFC024B0u; /* jal link before delay slot */ psx_delay_BFC024A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC024AC: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC024ACu); #endif if (psx_delay_BFC024A8) { psx_delay_BFC024A8 = 0; cpu->gpr[31] = 0xBFC024B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC01A84u); cpu->pc = 0xBFC01A84u; return; } label_BFC024B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC024B0: 14550003 bne $v0, $s5, 0xBFC024C0 */ uint32_t psx_brA_BFC024B0 = cpu->gpr[2]; uint32_t psx_brB_BFC024B0 = cpu->gpr[21]; psx_taken_BFC024B0 = (psx_brA_BFC024B0 != psx_brB_BFC024B0); psx_delay_BFC024B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC024B4: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC024B4u); #endif if (psx_delay_BFC024B0) { psx_delay_BFC024B0 = 0; if (psx_taken_BFC024B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024C0u); goto label_BFC024C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024B8u); } label_BFC024B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC024B8: 1000FFEE beq $zero, $zero, 0xBFC02474 */ uint32_t psx_brA_BFC024B8 = cpu->gpr[0]; uint32_t psx_brB_BFC024B8 = cpu->gpr[0]; psx_taken_BFC024B8 = (psx_brA_BFC024B8 == psx_brB_BFC024B8); psx_delay_BFC024B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC024BC: 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(0xBFC024BCu); #endif if (psx_delay_BFC024B8) { psx_delay_BFC024B8 = 0; if (psx_taken_BFC024B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02474u); goto label_BFC02474; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024C0u); } label_BFC024C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC024C0: 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(0xBFC024C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC024C4: 00602825 or $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(0x00602825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC024C4u); #endif label_BFC024C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC024C8: 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, 0xBFC024C8u); return; } g_debug_last_store_pc = 0xBFC024C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC024CC: 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(0xBFC024CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC024D0: 1464FFFD bne $v1, $a0, 0xBFC024C8 */ uint32_t psx_brA_BFC024D0 = cpu->gpr[3]; uint32_t psx_brB_BFC024D0 = cpu->gpr[4]; psx_taken_BFC024D0 = (psx_brA_BFC024D0 != psx_brB_BFC024D0); psx_delay_BFC024D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC024D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC024D4u); #endif if (psx_delay_BFC024D0) { psx_delay_BFC024D0 = 0; if (psx_taken_BFC024D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024C8u); goto label_BFC024C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024D8u); } label_BFC024D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC024D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC024D8: 00141900 sll $v1, $s4, 4 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[3] = cpu->gpr[20] << 4u; PGXP_ALU(0x00141900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC024D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC024DC: 00741823 subu $v1, $v1, $s4 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[20]; PGXP_ALU(0x00741823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC024DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC024E0: 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(0xBFC024E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC024E4: 00031940 sll $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 5u; PGXP_ALU(0x00031940u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC024E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC024E8: 3C140000 lui $s4, 0x0 */ cpu->gpr[20] = 0x00000000u; PGXP_ALU(0x3C140000u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC024E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC024EC: 2463000A addiu $v1, $v1, 10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (10)); PGXP_ALU(0x2463000Au, cpu->gpr[3], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC024ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC024F0: 26944E28 addiu $s4, $s4, 20008 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (20008)); PGXP_ALU(0x26944E28u, cpu->gpr[20], _pgx1, 0x00004E28u); } #ifdef PSX_COSIM cosim_instr(0xBFC024F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC024F4: 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(0xBFC024F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100009u); #endif /* 0xBFC024F8: 02801825 or $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(0x02801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC024F8u); #endif label_BFC024FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC024FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC024FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC024FCu); #endif /* 0xBFC024FC: 82640000 lb $a0, 0($s3) */ { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 4, 0x80000u); PGXP_LOAD(0x82640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC024FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02500: 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(0xBFC02500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02504: 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(0xBFC02504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02508: 1480FFFC bne $a0, $zero, 0xBFC024FC */ uint32_t psx_brA_BFC02508 = cpu->gpr[4]; uint32_t psx_brB_BFC02508 = cpu->gpr[0]; psx_taken_BFC02508 = (psx_brA_BFC02508 != psx_brB_BFC02508); psx_delay_BFC02508 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0250Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0250C: A064FFFF sb $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0250Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA064FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0250Cu); #endif if (psx_delay_BFC02508) { psx_delay_BFC02508 = 0; if (psx_taken_BFC02508) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC024FCu); goto label_BFC024FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02510u); } label_BFC02510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02510u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02510: 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(0xBFC02510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC02514: 00A21021 addu $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02518: 24030051 addiu $v1, $zero, 81 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (81)); PGXP_ALU(0x24030051u, cpu->gpr[3], _pgx1, 0x00000051u); } #ifdef PSX_COSIM cosim_instr(0xBFC02518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0251Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC0251C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0251Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02520: 0FF005D7 jal 0xBFC0175C */ cpu->gpr[31] = 0xBFC02528u; /* jal link before delay slot */ psx_delay_BFC02520 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02524: 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, 0xBFC02524u); return; } g_debug_last_store_pc = 0xBFC02524u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02524u); #endif if (psx_delay_BFC02520) { psx_delay_BFC02520 = 0; cpu->gpr[31] = 0xBFC02528u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0175Cu); cpu->pc = 0xBFC0175Cu; return; } label_BFC02528: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02528u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02528: 10400008 beq $v0, $zero, 0xBFC0254C */ uint32_t psx_brA_BFC02528 = cpu->gpr[2]; uint32_t psx_brB_BFC02528 = cpu->gpr[0]; psx_taken_BFC02528 = (psx_brA_BFC02528 == psx_brB_BFC02528); psx_delay_BFC02528 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0252Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0252C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0252Cu); #endif if (psx_delay_BFC02528) { psx_delay_BFC02528 = 0; if (psx_taken_BFC02528) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0254Cu); goto label_BFC0254C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02530u); } label_BFC02530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02530u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02530u); #endif /* 0xBFC02530: 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(0xBFC02530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC02534: 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(0xBFC02534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC02538: 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(0xBFC02538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0253Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0253C: 1440FFFC bne $v0, $zero, 0xBFC02530 */ uint32_t psx_brA_BFC0253C = cpu->gpr[2]; uint32_t psx_brB_BFC0253C = cpu->gpr[0]; psx_taken_BFC0253C = (psx_brA_BFC0253C != psx_brB_BFC0253C); psx_delay_BFC0253C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02540: A282FFFF sb $v0, -1($s4) */ { uint32_t _pgxa = cpu->gpr[20] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02540u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[20] + (-1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA282FFFFu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02540u); #endif if (psx_delay_BFC0253C) { psx_delay_BFC0253C = 0; if (psx_taken_BFC0253C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02530u); goto label_BFC02530; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02544u); } label_BFC02544: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02544u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02544: 1000FFCB beq $zero, $zero, 0xBFC02474 */ uint32_t psx_brA_BFC02544 = cpu->gpr[0]; uint32_t psx_brB_BFC02544 = cpu->gpr[0]; psx_taken_BFC02544 = (psx_brA_BFC02544 == psx_brB_BFC02544); psx_delay_BFC02544 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02548: 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(0xBFC02548u); #endif if (psx_delay_BFC02544) { psx_delay_BFC02544 = 0; if (psx_taken_BFC02544) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02474u); goto label_BFC02474; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0254Cu); } label_BFC0254C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0254Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0254C: 1000FFCB beq $zero, $zero, 0xBFC0247C */ uint32_t psx_brA_BFC0254C = cpu->gpr[0]; uint32_t psx_brB_BFC0254C = cpu->gpr[0]; psx_taken_BFC0254C = (psx_brA_BFC0254C == psx_brB_BFC0254C); psx_delay_BFC0254C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02550: 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, 0xBFC02550u); return; } g_debug_last_store_pc = 0xBFC02550u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02550u); #endif if (psx_delay_BFC0254C) { psx_delay_BFC0254C = 0; if (psx_taken_BFC0254C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0247Cu); goto label_BFC0247C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02554u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02554u); cpu->pc = 0xBFC02554u; return; /* fallthrough */ } void OpenBIOS_func_1FC02554(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02554u); int psx_delay_BFC02570 = 0; int psx_delay_BFC0257C = 0; int psx_delay_BFC0258C = 0; int psx_taken_BFC0258C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02578u: goto label_BFC02578; case 0xBFC02584u: goto label_BFC02584; case 0xBFC0258Cu: goto label_BFC0258C; default: break; } } label_BFC02554: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02554u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC02554: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02558: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0255Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0255C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0255Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC02560: 24A596C8 addiu $a1, $a1, -26936 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26936)); PGXP_ALU(0x24A596C8u, cpu->gpr[5], _pgx1, 0xFFFF96C8u); } #ifdef PSX_COSIM cosim_instr(0xBFC02560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02564: 24849690 addiu $a0, $a0, -26992 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26992)); PGXP_ALU(0x24849690u, cpu->gpr[4], _pgx1, 0xFFFF9690u); } #ifdef PSX_COSIM cosim_instr(0xBFC02564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC02568: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02568u); return; } g_debug_last_store_pc = 0xBFC02568u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC02568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0256Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000041u); #endif /* 0xBFC0256C: 03E03025 or $a2, $ra, $zero */ { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[31] | cpu->gpr[0]; PGXP_ALU(0x03E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0256Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02570: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC02578u; /* jal link before delay slot */ psx_delay_BFC02570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02574: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02574u); #endif if (psx_delay_BFC02570) { psx_delay_BFC02570 = 0; cpu->gpr[31] = 0xBFC02578u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC02578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02578u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02578: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0257Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0257C: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC02584u; /* jal link before delay slot */ psx_delay_BFC0257C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02580: 24849670 addiu $a0, $a0, -27024 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27024)); PGXP_ALU(0x24849670u, cpu->gpr[4], _pgx1, 0xFFFF9670u); } #ifdef PSX_COSIM cosim_instr(0xBFC02580u); #endif if (psx_delay_BFC0257C) { psx_delay_BFC0257C = 0; cpu->gpr[31] = 0xBFC02584u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC02584: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02584u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02584: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02588: A0402081 sb $zero, 8321($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8321; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02588u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8321)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0402081u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02588u); #endif label_BFC0258C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0258Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0258Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0258Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0258C: 1000FFFF beq $zero, $zero, 0xBFC0258C */ uint32_t psx_brA_BFC0258C = cpu->gpr[0]; uint32_t psx_brB_BFC0258C = cpu->gpr[0]; psx_taken_BFC0258C = (psx_brA_BFC0258C == psx_brB_BFC0258C); psx_delay_BFC0258C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02590: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02590u); #endif if (psx_delay_BFC0258C) { psx_delay_BFC0258C = 0; if (psx_taken_BFC0258C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0258Cu); goto label_BFC0258C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; /* fallthrough */ } void OpenBIOS_func_1FC02594(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02594u); int psx_delay_BFC025B0 = 0; int psx_taken_BFC025B0 = 0; int psx_delay_BFC025C0 = 0; int psx_delay_BFC025DC = 0; int psx_taken_BFC025DC = 0; int psx_delay_BFC025E4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC025ACu: goto label_BFC025AC; case 0xBFC025B8u: goto label_BFC025B8; case 0xBFC025C8u: goto label_BFC025C8; case 0xBFC025E4u: goto label_BFC025E4; default: break; } } label_BFC02594: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02594u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC02594: 00041900 sll $v1, $a0, 4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 4u; PGXP_ALU(0x00041900u, cpu->gpr[3], _pgx1, 4u); } #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, 0x18u); #endif /* 0xBFC02598: 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(0xBFC02598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0259Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0259C: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0259Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC025A0: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC025A4: 24844E28 addiu $a0, $a0, 20008 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20008)); PGXP_ALU(0x24844E28u, cpu->gpr[4], _pgx1, 0x00004E28u); } #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, 0x81u); #endif /* 0xBFC025A8: 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(0xBFC025A8u); #endif label_BFC025AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC025ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC025ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC025AC: 28C50040 slti $a1, $a2, 64 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (64) ? 1 : 0); PGXP_ALU(0x28C50040u, cpu->gpr[5], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0xBFC025ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC025B0: 10A00005 beq $a1, $zero, 0xBFC025C8 */ uint32_t psx_brA_BFC025B0 = cpu->gpr[5]; uint32_t psx_brB_BFC025B0 = cpu->gpr[0]; psx_taken_BFC025B0 = (psx_brA_BFC025B0 == psx_brB_BFC025B0); psx_delay_BFC025B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC025B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC025B4u); #endif if (psx_delay_BFC025B0) { psx_delay_BFC025B0 = 0; if (psx_taken_BFC025B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025C8u); goto label_BFC025C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025B8u); } label_BFC025B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC025B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC025B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC025B8: 00021180 sll $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 6u; PGXP_ALU(0x00021180u, cpu->gpr[2], _pgx1, 6u); } #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, 0x44u); #endif /* 0xBFC025BC: 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(0xBFC025BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC025C0: 03E00008 jr $ra */ psx_delay_BFC025C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC025C4: 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(0xBFC025C4u); #endif if (psx_delay_BFC025C0) { psx_delay_BFC025C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC025C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC025C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC025C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC025C8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _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, 0x4u); #endif /* 0xBFC025CC: 00021140 sll $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 5u; PGXP_ALU(0x00021140u, cpu->gpr[2], _pgx1, 5u); } #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, 0x14u); #endif /* 0xBFC025D0: 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(0xBFC025D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025D4u); #endif /* 0xBFC025D4: 84420008 lh $v0, 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, 0xBFC025D4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x84420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC025D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC025D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC025D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC025DC: 1447FFF3 bne $v0, $a3, 0xBFC025AC */ uint32_t psx_brA_BFC025DC = cpu->gpr[2]; uint32_t psx_brB_BFC025DC = cpu->gpr[7]; psx_taken_BFC025DC = (psx_brA_BFC025DC != psx_brB_BFC025DC); psx_delay_BFC025DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC025E0: 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(0xBFC025E0u); #endif if (psx_delay_BFC025DC) { psx_delay_BFC025DC = 0; if (psx_taken_BFC025DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ACu); goto label_BFC025AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025E4u); } label_BFC025E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC025E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC025E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC025E4: 03E00008 jr $ra */ psx_delay_BFC025E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC025E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC025E8u); #endif if (psx_delay_BFC025E4) { psx_delay_BFC025E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC025EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC025ECu); int psx_delay_BFC0261C = 0; int psx_taken_BFC0261C = 0; int psx_delay_BFC02628 = 0; int psx_delay_BFC02630 = 0; int psx_taken_BFC02630 = 0; int psx_delay_BFC02638 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02608u: goto label_BFC02608; case 0xBFC02624u: goto label_BFC02624; case 0xBFC02630u: goto label_BFC02630; case 0xBFC02638u: goto label_BFC02638; default: break; } } label_BFC025EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC025ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC025ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC025EC: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x14u); #endif /* 0xBFC025F0: 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(0xBFC025F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC025F4: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC025F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC025F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC025F8: 00022100 sll $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 4u; PGXP_ALU(0x00022100u, cpu->gpr[4], _pgx1, 4u); } #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, 0x40u); #endif /* 0xBFC025FC: 24C64C88 addiu $a2, $a2, 19592 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (19592)); PGXP_ALU(0x24C64C88u, cpu->gpr[6], _pgx1, 0x00004C88u); } #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, 0x5u); #endif /* 0xBFC02600: 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(0xBFC02600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02604: 24070014 addiu $a3, $zero, 20 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); PGXP_ALU(0x24070014u, cpu->gpr[7], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC02604u); #endif label_BFC02608: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02608u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02608: 00021880 sll $v1, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 2u; PGXP_ALU(0x00021880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC02608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0260Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0260C: 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(0xBFC0260Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC02610: 00C31821 addu $v1, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[3]; PGXP_ALU(0x00C31821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02614u); #endif /* 0xBFC02614: 8C630000 lw $v1, 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, 0xBFC02614u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC02618: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0261Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0261C: 14650004 bne $v1, $a1, 0xBFC02630 */ uint32_t psx_brA_BFC0261C = cpu->gpr[3]; uint32_t psx_brB_BFC0261C = cpu->gpr[5]; psx_taken_BFC0261C = (psx_brA_BFC0261C != psx_brB_BFC0261C); psx_delay_BFC0261C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02620: 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(0xBFC02620u); #endif if (psx_delay_BFC0261C) { psx_delay_BFC0261C = 0; if (psx_taken_BFC0261C) { #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, 0xBFC02624u); } label_BFC02624: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02624u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02624: 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(0xBFC02624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC02628: 03E00008 jr $ra */ psx_delay_BFC02628 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0262Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0262C: 24420024 addiu $v0, $v0, 36 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (36)); PGXP_ALU(0x24420024u, cpu->gpr[2], _pgx1, 0x00000024u); } #ifdef PSX_COSIM cosim_instr(0xBFC0262Cu); #endif if (psx_delay_BFC02628) { psx_delay_BFC02628 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x84u); #endif /* 0xBFC02630: 1447FFF5 bne $v0, $a3, 0xBFC02608 */ uint32_t psx_brA_BFC02630 = cpu->gpr[2]; uint32_t psx_brB_BFC02630 = cpu->gpr[7]; 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, 0x1u); #endif /* 0xBFC02634: 00000000 nop */ /* nop */ #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, 0xBFC02608u); goto label_BFC02608; } #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, 0x80000001u); #endif /* 0xBFC02638: 03E00008 jr $ra */ psx_delay_BFC02638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0263Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0263C: 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(0xBFC0263Cu); #endif if (psx_delay_BFC02638) { psx_delay_BFC02638 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC02640(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02640u); int psx_delay_BFC0267C = 0; int psx_taken_BFC0267C = 0; int psx_delay_BFC026AC = 0; int psx_taken_BFC026AC = 0; int psx_delay_BFC026B4 = 0; int psx_delay_BFC026C8 = 0; int psx_taken_BFC026C8 = 0; int psx_delay_BFC026DC = 0; int psx_taken_BFC026DC = 0; int psx_delay_BFC0271C = 0; int psx_delay_BFC0272C = 0; int psx_taken_BFC0272C = 0; int psx_delay_BFC02744 = 0; int psx_taken_BFC02744 = 0; int psx_delay_BFC0274C = 0; int psx_taken_BFC0274C = 0; int psx_delay_BFC02764 = 0; int psx_taken_BFC02764 = 0; int psx_delay_BFC0276C = 0; int psx_taken_BFC0276C = 0; int psx_delay_BFC02778 = 0; int psx_taken_BFC02778 = 0; int psx_delay_BFC02790 = 0; int psx_taken_BFC02790 = 0; int psx_delay_BFC027A4 = 0; int psx_delay_BFC027C0 = 0; int psx_delay_BFC027D0 = 0; int psx_taken_BFC027D0 = 0; int psx_delay_BFC027E8 = 0; int psx_delay_BFC027F0 = 0; int psx_taken_BFC027F0 = 0; int psx_delay_BFC027F8 = 0; int psx_delay_BFC02800 = 0; int psx_taken_BFC02800 = 0; int psx_delay_BFC02850 = 0; int psx_taken_BFC02850 = 0; int psx_delay_BFC02868 = 0; int psx_taken_BFC02868 = 0; int psx_delay_BFC02884 = 0; int psx_taken_BFC02884 = 0; int psx_delay_BFC028CC = 0; int psx_delay_BFC028D4 = 0; int psx_taken_BFC028D4 = 0; int psx_delay_BFC028EC = 0; int psx_delay_BFC028F4 = 0; int psx_taken_BFC028F4 = 0; int psx_delay_BFC02904 = 0; int psx_delay_BFC02910 = 0; int psx_delay_BFC0291C = 0; int psx_taken_BFC0291C = 0; int psx_delay_BFC0294C = 0; int psx_delay_BFC02954 = 0; int psx_taken_BFC02954 = 0; int psx_delay_BFC0295C = 0; int psx_taken_BFC0295C = 0; int psx_delay_BFC0296C = 0; int psx_taken_BFC0296C = 0; int psx_delay_BFC02978 = 0; int psx_taken_BFC02978 = 0; int psx_delay_BFC02994 = 0; int psx_taken_BFC02994 = 0; int psx_delay_BFC0299C = 0; int psx_taken_BFC0299C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02684u: goto label_BFC02684; case 0xBFC02688u: goto label_BFC02688; case 0xBFC026B4u: goto label_BFC026B4; case 0xBFC026BCu: goto label_BFC026BC; case 0xBFC026D0u: goto label_BFC026D0; case 0xBFC026E4u: goto label_BFC026E4; case 0xBFC026ECu: goto label_BFC026EC; case 0xBFC026F0u: goto label_BFC026F0; case 0xBFC02724u: goto label_BFC02724; case 0xBFC02734u: goto label_BFC02734; case 0xBFC02738u: goto label_BFC02738; case 0xBFC0274Cu: goto label_BFC0274C; case 0xBFC02754u: goto label_BFC02754; case 0xBFC02758u: goto label_BFC02758; case 0xBFC02764u: goto label_BFC02764; case 0xBFC0276Cu: goto label_BFC0276C; case 0xBFC02774u: goto label_BFC02774; case 0xBFC02780u: goto label_BFC02780; case 0xBFC02784u: goto label_BFC02784; case 0xBFC02798u: goto label_BFC02798; case 0xBFC0279Cu: goto label_BFC0279C; case 0xBFC027ACu: goto label_BFC027AC; case 0xBFC027BCu: goto label_BFC027BC; case 0xBFC027C8u: goto label_BFC027C8; case 0xBFC027D8u: goto label_BFC027D8; case 0xBFC027DCu: goto label_BFC027DC; case 0xBFC027F0u: goto label_BFC027F0; case 0xBFC027F8u: goto label_BFC027F8; case 0xBFC02800u: goto label_BFC02800; case 0xBFC02808u: goto label_BFC02808; case 0xBFC02820u: goto label_BFC02820; case 0xBFC02858u: goto label_BFC02858; case 0xBFC02870u: goto label_BFC02870; case 0xBFC0288Cu: goto label_BFC0288C; case 0xBFC028D4u: goto label_BFC028D4; case 0xBFC028DCu: goto label_BFC028DC; case 0xBFC028F4u: goto label_BFC028F4; case 0xBFC028FCu: goto label_BFC028FC; case 0xBFC0290Cu: goto label_BFC0290C; case 0xBFC02918u: goto label_BFC02918; case 0xBFC02924u: goto label_BFC02924; case 0xBFC02928u: goto label_BFC02928; case 0xBFC02954u: goto label_BFC02954; case 0xBFC0295Cu: goto label_BFC0295C; case 0xBFC02964u: goto label_BFC02964; case 0xBFC02974u: goto label_BFC02974; case 0xBFC02980u: goto label_BFC02980; case 0xBFC0299Cu: goto label_BFC0299C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC02640: 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(0xBFC02640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC02644: 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, 0xBFC02644u); return; } g_debug_last_store_pc = 0xBFC02644u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0048u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC02644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC02648: 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, 0xBFC02648u); return; } g_debug_last_store_pc = 0xBFC02648u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70044u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC02648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0264Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC0264C: 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, 0xBFC0264Cu); return; } g_debug_last_store_pc = 0xBFC0264Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60040u, _pgxa, cpu->gpr[22]); } #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, 0xA0000000u); #endif /* 0xBFC02650: 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, 0xBFC02650u); return; } g_debug_last_store_pc = 0xBFC02650u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC02650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC02654: 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, 0xBFC02654u); return; } g_debug_last_store_pc = 0xBFC02654u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5003Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC02654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC02658: 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, 0xBFC02658u); return; } g_debug_last_store_pc = 0xBFC02658u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40038u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC02658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0265Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0265C: 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, 0xBFC0265Cu); return; } g_debug_last_store_pc = 0xBFC0265Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30034u, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC02660: 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, 0xBFC02660u); return; } g_debug_last_store_pc = 0xBFC02660u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20030u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC02664: 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, 0xBFC02664u); return; } g_debug_last_store_pc = 0xBFC02664u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1002Cu, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC02668: 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, 0xBFC02668u); return; } g_debug_last_store_pc = 0xBFC02668u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00028u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0266Cu); #endif /* 0xBFC0266C: 8C950004 lw $s5, 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, 0xBFC0266Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x10u); } PGXP_LOAD(0x8C950004u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC0266Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000011u); #endif /* 0xBFC02670: 0080F025 or $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(0x0080F025u, cpu->gpr[30], _pgx1, _pgx2); } #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, 0x800021u); #endif /* 0xBFC02674: 00A0B825 or $s7, $a1, $zero */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[5] | cpu->gpr[0]; PGXP_ALU(0x00A0B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC02678: 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, 0xBFC02678u); return; } g_debug_last_store_pc = 0xBFC02678u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60058u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0267Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0267C: 06A00002 bltz $s5, 0xBFC02688 */ uint32_t psx_brA_BFC0267C = cpu->gpr[21]; psx_taken_BFC0267C = ((int32_t)psx_brA_BFC0267C < 0); psx_delay_BFC0267C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600000u); #endif /* 0xBFC02680: 26B6000F addiu $s6, $s5, 15 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[21] + (15)); PGXP_ALU(0x26B6000Fu, cpu->gpr[22], _pgx1, 0x0000000Fu); } #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, 0xBFC02688u); goto label_BFC02688; } #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, 0x600001u); #endif /* 0xBFC02684: 02A0B025 or $s6, $s5, $zero */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[21] | cpu->gpr[0]; PGXP_ALU(0x02A0B025u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02684u); #endif label_BFC02688: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02688u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC02688: 00161103 sra $v0, $s6, 4 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] >> 4u); PGXP_ALU(0x00161103u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0268Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0268C: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #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, 0x100004u); #endif /* 0xBFC02690: 0002A080 sll $s4, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[2] << 2u; PGXP_ALU(0x0002A080u, cpu->gpr[20], _pgx1, 2u); } #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, 0x20000004u); #endif /* 0xBFC02694: 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, 0xBFC02694u); return; } g_debug_last_store_pc = 0xBFC02694u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC02698: 26424BA4 addiu $v0, $s2, 19364 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[18] + (19364)); PGXP_ALU(0x26424BA4u, cpu->gpr[2], _pgx1, 0x00004BA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0269Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0269C: AFA20018 sw $v0, 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, 0xBFC0269Cu); return; } g_debug_last_store_pc = 0xBFC0269Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20018u, _pgxa, cpu->gpr[2]); } #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, 0x100004u); #endif /* 0xBFC026A0: 02821021 addu $v0, $s4, $v0 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[2]; PGXP_ALU(0x02821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC026A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026A4u); #endif /* 0xBFC026A4: 8C420000 lw $v0, 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, 0xBFC026A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC026A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC026A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC026A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC026AC: 14400010 bne $v0, $zero, 0xBFC026F0 */ uint32_t psx_brA_BFC026AC = cpu->gpr[2]; uint32_t psx_brB_BFC026AC = cpu->gpr[0]; psx_taken_BFC026AC = (psx_brA_BFC026AC != psx_brB_BFC026AC); psx_delay_BFC026AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC026B0: 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(0xBFC026B0u); #endif if (psx_delay_BFC026AC) { psx_delay_BFC026AC = 0; if (psx_taken_BFC026AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026F0u); goto label_BFC026F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026B4u); } 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, 0x80000000u); #endif /* 0xBFC026B4: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC026BCu; /* jal link before delay slot */ psx_delay_BFC026B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC026B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC026B8u); #endif if (psx_delay_BFC026B4) { psx_delay_BFC026B4 = 0; cpu->gpr[31] = 0xBFC026BCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC026BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC026BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC026BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026BCu); #endif /* 0xBFC026BC: 8FD10010 lw $s1, 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, 0xBFC026BCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x40000000u); } PGXP_LOAD(0x8FD10010u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC026BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC026C0: 00000000 nop */ /* nop */ #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, 0x20004u); #endif /* 0xBFC026C4: 3222007F andi $v0, $s1, 0x7F */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x7Fu; PGXP_ALU(0x3222007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC026C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC026C8: 14400006 bne $v0, $zero, 0xBFC026E4 */ uint32_t psx_brA_BFC026C8 = cpu->gpr[2]; uint32_t psx_brB_BFC026C8 = cpu->gpr[0]; psx_taken_BFC026C8 = (psx_brA_BFC026C8 != psx_brB_BFC026C8); psx_delay_BFC026C8 = 1; #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 if (psx_delay_BFC026C8) { psx_delay_BFC026C8 = 0; if (psx_taken_BFC026C8) { #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, 0xBFC026D0u); } 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 /* 0xBFC026D0: 8FC20020 lw $v0, 32($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC026D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x8FC20020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC026D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC026D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC026D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC026D8: 0222102B sltu $v0, $s1, $v0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0222102Bu, cpu->gpr[2], _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, 0x5u); #endif /* 0xBFC026DC: 14400011 bne $v0, $zero, 0xBFC02724 */ uint32_t psx_brA_BFC026DC = cpu->gpr[2]; 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, 0x1u); #endif /* 0xBFC026E0: 00000000 nop */ /* nop */ #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, 0xBFC02724u); goto label_BFC02724; } #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, 0x5u); #endif /* 0xBFC026E4: 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(0xBFC026E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC026E8: AFC20018 sw $v0, 24($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC026E8u); return; } g_debug_last_store_pc = 0xBFC026E8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFC20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC026E8u); #endif label_BFC026EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC026ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC026ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC026EC: 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(0xBFC026ECu); #endif label_BFC026F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC026F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC026F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026F0u); #endif /* 0xBFC026F0: 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, 0xBFC026F0u); 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(0xBFC026F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026F4u); #endif /* 0xBFC026F4: 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, 0xBFC026F4u); 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(0xBFC026F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026F8u); #endif /* 0xBFC026F8: 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, 0xBFC026F8u); 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(0xBFC026F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC026FCu); #endif /* 0xBFC026FC: 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, 0xBFC026FCu); 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(0xBFC026FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02700u); #endif /* 0xBFC02700: 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, 0xBFC02700u); 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(0xBFC02700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02704u); #endif /* 0xBFC02704: 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, 0xBFC02704u); 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(0xBFC02704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02708u); #endif /* 0xBFC02708: 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, 0xBFC02708u); 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(0xBFC02708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0270Cu); #endif /* 0xBFC0270C: 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, 0xBFC0270Cu); 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(0xBFC0270Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02710u); #endif /* 0xBFC02710: 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, 0xBFC02710u); 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(0xBFC02710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC02714: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02718u); #endif /* 0xBFC02718: 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, 0xBFC02718u); 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(0xBFC02718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0271Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0271C: 03E00008 jr $ra */ psx_delay_BFC0271C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02720: 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(0xBFC02720u); #endif if (psx_delay_BFC0271C) { psx_delay_BFC0271C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC02724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02724u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02724u); #endif /* 0xBFC02724: 8FB30058 lw $s3, 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, 0xBFC02724u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB30058u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC02724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02728: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0272Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0272C: 06610002 bgez $s3, 0xBFC02738 */ uint32_t psx_brA_BFC0272C = cpu->gpr[19]; psx_taken_BFC0272C = ((int32_t)psx_brA_BFC0272C >= 0); psx_delay_BFC0272C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02730: 001189C2 srl $s1, $s1, 7 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[17] >> 7u; PGXP_ALU(0x001189C2u, cpu->gpr[17], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02730u); #endif if (psx_delay_BFC0272C) { psx_delay_BFC0272C = 0; if (psx_taken_BFC0272C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02738u); goto label_BFC02738; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02734u); } label_BFC02734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02734u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02734: 2673007F addiu $s3, $s3, 127 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (127)); PGXP_ALU(0x2673007Fu, cpu->gpr[19], _pgx1, 0x0000007Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02734u); #endif 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 /* 0xBFC02738: 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, 0xBFC02738u); 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(0xBFC02738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0273Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0273C: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC02740: 30428000 andi $v0, $v0, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8000u; PGXP_ALU(0x30428000u, cpu->gpr[2], _pgx1, 0x8000u); } #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, 0x5u); #endif /* 0xBFC02744: 1440004A bne $v0, $zero, 0xBFC02870 */ uint32_t psx_brA_BFC02744 = cpu->gpr[2]; uint32_t psx_brB_BFC02744 = cpu->gpr[0]; psx_taken_BFC02744 = (psx_brA_BFC02744 != psx_brB_BFC02744); psx_delay_BFC02744 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02748: 001399C3 sra $s3, $s3, 7 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] >> 7u); PGXP_ALU(0x001399C3u, cpu->gpr[19], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02748u); #endif if (psx_delay_BFC02744) { psx_delay_BFC02744 = 0; if (psx_taken_BFC02744) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02870u); goto label_BFC02870; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0274Cu); } label_BFC0274C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0274Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0274Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0274Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0274C: 06A10002 bgez $s5, 0xBFC02758 */ uint32_t psx_brA_BFC0274C = cpu->gpr[21]; psx_taken_BFC0274C = ((int32_t)psx_brA_BFC0274C >= 0); psx_delay_BFC0274C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200005u); #endif /* 0xBFC02750: 02A01025 or $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(0x02A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02750u); #endif if (psx_delay_BFC0274C) { psx_delay_BFC0274C = 0; if (psx_taken_BFC0274C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02758u); goto label_BFC02758; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02754u); } label_BFC02754: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02754u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02754: 26A2000F addiu $v0, $s5, 15 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] + (15)); PGXP_ALU(0x26A2000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02754u); #endif label_BFC02758: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02758u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02758: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #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, 0x20000001u); #endif /* 0xBFC0275C: 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, 0xBFC0275Cu); return; } g_debug_last_store_pc = 0xBFC0275Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAFA00014u, _pgxa, cpu->gpr[0]); } #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, 0x20000004u); #endif /* 0xBFC02760: 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, 0xBFC02760u); return; } g_debug_last_store_pc = 0xBFC02760u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02760u); #endif label_BFC02764: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02764u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02764: 1A60002E blez $s3, 0xBFC02820 */ uint32_t psx_brA_BFC02764 = cpu->gpr[19]; psx_taken_BFC02764 = ((int32_t)psx_brA_BFC02764 <= 0); psx_delay_BFC02764 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02768: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02768u); #endif if (psx_delay_BFC02764) { psx_delay_BFC02764 = 0; if (psx_taken_BFC02764) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02820u); goto label_BFC02820; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0276Cu); } label_BFC0276C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0276Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0276Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0276Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC0276C: 12200005 beq $s1, $zero, 0xBFC02784 */ uint32_t psx_brA_BFC0276C = cpu->gpr[17]; uint32_t psx_brB_BFC0276C = cpu->gpr[0]; psx_taken_BFC0276C = (psx_brA_BFC0276C == psx_brB_BFC0276C); psx_delay_BFC0276C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02770: 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(0xBFC02770u); #endif if (psx_delay_BFC0276C) { psx_delay_BFC0276C = 0; if (psx_taken_BFC0276C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02784u); goto label_BFC02784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02774u); } label_BFC02774: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02774u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC02774: 3222003F andi $v0, $s1, 0x3F */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] & 0x3Fu; PGXP_ALU(0x3222003Fu, cpu->gpr[2], _pgx1, 0x003Fu); } #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, 0x5u); #endif /* 0xBFC02778: 14400002 bne $v0, $zero, 0xBFC02784 */ uint32_t psx_brA_BFC02778 = cpu->gpr[2]; uint32_t psx_brB_BFC02778 = cpu->gpr[0]; psx_taken_BFC02778 = (psx_brA_BFC02778 != psx_brB_BFC02778); psx_delay_BFC02778 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0277Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0277C: 2447FFC0 addiu $a3, $v0, -64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[2] + (-64)); PGXP_ALU(0x2447FFC0u, cpu->gpr[7], _pgx1, 0xFFFFFFC0u); } #ifdef PSX_COSIM cosim_instr(0xBFC0277Cu); #endif if (psx_delay_BFC02778) { psx_delay_BFC02778 = 0; if (psx_taken_BFC02778) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02784u); goto label_BFC02784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02780u); } label_BFC02780: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02780u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02780: 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(0xBFC02780u); #endif label_BFC02784: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02784u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02784: 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(0xBFC02784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10084u); #endif /* 0xBFC02788: 00478023 subu $s0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[16] = cpu->gpr[2] - cpu->gpr[7]; PGXP_ALU(0x00478023u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x90004u); #endif /* 0xBFC0278C: 0270102A slt $v0, $s3, $s0 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[16] ? 1 : 0); PGXP_ALU(0x0270102Au, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC02790: 10400002 beq $v0, $zero, 0xBFC0279C */ uint32_t psx_brA_BFC02790 = cpu->gpr[2]; uint32_t psx_brB_BFC02790 = cpu->gpr[0]; psx_taken_BFC02790 = (psx_brA_BFC02790 == psx_brB_BFC02790); psx_delay_BFC02790 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02794: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02794u); #endif if (psx_delay_BFC02790) { psx_delay_BFC02790 = 0; if (psx_taken_BFC02790) { #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, 0xBFC02798u); } label_BFC02798: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02798u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90001u); #endif /* 0xBFC02798: 02608025 or $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(0x02608025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02798u); #endif 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: 8FC50024 lw $a1, 36($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0279Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } PGXP_LOAD(0x8FC50024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0279Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027A0u); #endif /* 0xBFC027A0: 8FA40010 lw $a0, 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, 0xBFC027A0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x80000000u); #endif /* 0xBFC027A4: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC027ACu; /* jal link before delay slot */ psx_delay_BFC027A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC027A8: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027A8u); #endif if (psx_delay_BFC027A4) { psx_delay_BFC027A4 = 0; cpu->gpr[31] = 0xBFC027ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } label_BFC027AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC027ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC027ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC027AC: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x10004u); #endif /* 0xBFC027B0: 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(0xBFC027B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC027B4: 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, 0xBFC027B4u); return; } g_debug_last_store_pc = 0xBFC027B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20020u, _pgxa, cpu->gpr[2]); } #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, 0x400001u); #endif /* 0xBFC027B8: 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(0xBFC027B8u); #endif label_BFC027BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC027BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC027BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027BCu); #endif /* 0xBFC027BC: 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, 0xBFC027BCu); 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(0xBFC027BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC027C0: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC027C8u; /* jal link before delay slot */ psx_delay_BFC027C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC027C4: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027C4u); #endif if (psx_delay_BFC027C0) { psx_delay_BFC027C0 = 0; cpu->gpr[31] = 0xBFC027C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC027C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC027C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC027C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC027C8: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC027CC: 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(0xBFC027CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC027D0: 14A20002 bne $a1, $v0, 0xBFC027DC */ uint32_t psx_brA_BFC027D0 = cpu->gpr[5]; uint32_t psx_brB_BFC027D0 = cpu->gpr[2]; psx_taken_BFC027D0 = (psx_brA_BFC027D0 != psx_brB_BFC027D0); psx_delay_BFC027D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC00800u); #endif /* 0xBFC027D4: 02F65821 addu $t3, $s7, $s6 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[11] = cpu->gpr[23] + cpu->gpr[22]; PGXP_ALU(0x02F65821u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027D4u); #endif if (psx_delay_BFC027D0) { psx_delay_BFC027D0 = 0; if (psx_taken_BFC027D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC027DCu); goto label_BFC027DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC027D8u); } label_BFC027D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC027D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC027D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC027D8: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027D8u); #endif 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, 0x201u); #endif /* 0xBFC027DC: 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(0xBFC027DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC027E0: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC027E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x841u); #endif /* 0xBFC027E4: 01603025 or $a2, $t3, $zero */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[11] | cpu->gpr[0]; PGXP_ALU(0x01603025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC027E8: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC027F0u; /* jalr link before delay slot */ psx_delay_BFC027E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200011u); #endif /* 0xBFC027EC: 02A02025 or $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(0x02A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC027ECu); #endif if (psx_delay_BFC027E8) { psx_delay_BFC027E8 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC027F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x5u); #endif /* 0xBFC027F0: 1040006A beq $v0, $zero, 0xBFC0299C */ uint32_t psx_brA_BFC027F0 = cpu->gpr[2]; uint32_t psx_brB_BFC027F0 = cpu->gpr[0]; psx_taken_BFC027F0 = (psx_brA_BFC027F0 == psx_brB_BFC027F0); psx_delay_BFC027F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC027F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC027F4u); #endif if (psx_delay_BFC027F0) { psx_delay_BFC027F0 = 0; if (psx_taken_BFC027F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0299Cu); goto label_BFC0299C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC027F8u); } label_BFC027F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC027F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC027F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC027F8: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC02800u; /* jal link before delay slot */ psx_delay_BFC027F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC027FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC027FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC027FCu); #endif if (psx_delay_BFC027F8) { psx_delay_BFC027F8 = 0; cpu->gpr[31] = 0xBFC02800u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC02800: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02800u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02800: 10400058 beq $v0, $zero, 0xBFC02964 */ uint32_t psx_brA_BFC02800 = cpu->gpr[2]; uint32_t psx_brB_BFC02800 = cpu->gpr[0]; psx_taken_BFC02800 = (psx_brA_BFC02800 == psx_brB_BFC02800); psx_delay_BFC02800 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC02804: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02804u); #endif if (psx_delay_BFC02800) { psx_delay_BFC02800 = 0; if (psx_taken_BFC02800) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02964u); goto label_BFC02964; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02808u); } label_BFC02808: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02808u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02808u); #endif /* 0xBFC02808: 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, 0xBFC02808u); 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(0xBFC02808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0280Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0280C: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC02810: 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(0xBFC02810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC02814: 24A551E8 addiu $a1, $a1, 20968 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (20968)); PGXP_ALU(0x24A551E8u, cpu->gpr[5], _pgx1, 0x000051E8u); } #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, 0x30u); #endif /* 0xBFC02818: 00852021 addu $a0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0281Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0281C: 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, 0xBFC0281Cu); return; } g_debug_last_store_pc = 0xBFC0281Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0281Cu); #endif 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 /* 0xBFC02820: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02820u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #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, 0x40000001u); #endif /* 0xBFC02824: AFC00018 sw $zero, 24($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02824u); return; } g_debug_last_store_pc = 0xBFC02824u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAFC00018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02828: 000281C0 sll $s0, $v0, 7 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[16] = cpu->gpr[2] << 7u; PGXP_ALU(0x000281C0u, cpu->gpr[16], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0282Cu); #endif /* 0xBFC0282C: 8FC20010 lw $v0, 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, 0xBFC0282Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x8FC20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0282Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02830: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02834: 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(0xBFC02834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC02838: 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, 0xBFC02838u); return; } g_debug_last_store_pc = 0xBFC02838u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFC20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0283Cu); #endif /* 0xBFC0283C: 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, 0xBFC0283Cu); 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(0xBFC0283Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02840: 00000000 nop */ /* nop */ #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, 0x140004u); #endif /* 0xBFC02844: 00549021 addu $s2, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00549021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02848u); #endif /* 0xBFC02848: 8FA20058 lw $v0, 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, 0xBFC02848u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20058u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0284Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0284C: 00000000 nop */ /* nop */ #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, 0x10004u); #endif /* 0xBFC02850: 1050FFA7 beq $v0, $s0, 0xBFC026F0 */ uint32_t psx_brA_BFC02850 = cpu->gpr[2]; uint32_t psx_brB_BFC02850 = cpu->gpr[16]; psx_taken_BFC02850 = (psx_brA_BFC02850 == psx_brB_BFC02850); psx_delay_BFC02850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC02854: AE400000 sw $zero, 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, 0xBFC02854u); return; } g_debug_last_store_pc = 0xBFC02854u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02854u); #endif if (psx_delay_BFC02850) { psx_delay_BFC02850 = 0; if (psx_taken_BFC02850) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026F0u); goto label_BFC026F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02858u); } label_BFC02858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02858: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0285Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0285C: 244251E8 addiu $v0, $v0, 20968 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20968)); PGXP_ALU(0x244251E8u, cpu->gpr[2], _pgx1, 0x000051E8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0285Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02860: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02864u); #endif /* 0xBFC02864: 8C500000 lw $s0, 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, 0xBFC02864u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500000u, _pgxa, cpu->gpr[16]); } #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, 0x1u); #endif /* 0xBFC02868: 1000FFA1 beq $zero, $zero, 0xBFC026F0 */ uint32_t psx_brA_BFC02868 = cpu->gpr[0]; uint32_t psx_brB_BFC02868 = cpu->gpr[0]; 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, 0x10001u); #endif /* 0xBFC0286C: 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(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, 0xBFC026F0u); goto label_BFC026F0; } #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 /* 0xBFC02870: 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, 0xBFC02870u); 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(0xBFC02870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02874: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140004u); #endif /* 0xBFC02878: 00549021 addu $s2, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00549021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0287Cu); #endif /* 0xBFC0287C: 8E500000 lw $s0, 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, 0xBFC0287Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x40000u); } PGXP_LOAD(0x8E500000u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC0287Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02880: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02884: 1600FF99 bne $s0, $zero, 0xBFC026EC */ uint32_t psx_brA_BFC02884 = cpu->gpr[16]; uint32_t psx_brB_BFC02884 = cpu->gpr[0]; psx_taken_BFC02884 = (psx_brA_BFC02884 != psx_brB_BFC02884); psx_delay_BFC02884 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02888: 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(0xBFC02888u); #endif if (psx_delay_BFC02884) { psx_delay_BFC02884 = 0; if (psx_taken_BFC02884) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026ECu); goto label_BFC026EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0288Cu); } label_BFC0288C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0288Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0288Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0288Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0288C: AE420000 sw $v0, 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, 0xBFC0288Cu); return; } g_debug_last_store_pc = 0xBFC0288Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0288Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02890: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02894: 24424BCC addiu $v0, $v0, 19404 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19404)); PGXP_ALU(0x24424BCCu, cpu->gpr[2], _pgx1, 0x00004BCCu); } #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, 0x100004u); #endif /* 0xBFC02898: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x20004u); #endif /* 0xBFC0289C: AC510000 sw $s1, 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, 0xBFC0289Cu); return; } g_debug_last_store_pc = 0xBFC0289Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAC510000u, _pgxa, cpu->gpr[17]); } #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, 0x4u); #endif /* 0xBFC028A0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC028A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC028A4: 24424BC4 addiu $v0, $v0, 19396 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19396)); PGXP_ALU(0x24424BC4u, cpu->gpr[2], _pgx1, 0x00004BC4u); } #ifdef PSX_COSIM cosim_instr(0xBFC028A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC028A8: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC028A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC028AC: AC530000 sw $s3, 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, 0xBFC028ACu); return; } g_debug_last_store_pc = 0xBFC028ACu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAC530000u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC028ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC028B0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC028B4: 24424BB4 addiu $v0, $v0, 19380 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19380)); PGXP_ALU(0x24424BB4u, cpu->gpr[2], _pgx1, 0x00004BB4u); } #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, 0x100004u); #endif /* 0xBFC028B8: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x800004u); #endif /* 0xBFC028BC: AC570000 sw $s7, 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, 0xBFC028BCu); return; } g_debug_last_store_pc = 0xBFC028BCu; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAC570000u, _pgxa, cpu->gpr[23]); } #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, 0x4u); #endif /* 0xBFC028C0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC028C4: 24424BAC addiu $v0, $v0, 19372 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19372)); PGXP_ALU(0x24424BACu, cpu->gpr[2], _pgx1, 0x00004BACu); } #ifdef PSX_COSIM cosim_instr(0xBFC028C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC028C8: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC028C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC028CC: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC028D4u; /* jal link before delay slot */ psx_delay_BFC028CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC028D0: AC5E0000 sw $fp, 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, 0xBFC028D0u); return; } g_debug_last_store_pc = 0xBFC028D0u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC5E0000u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC028D0u); #endif if (psx_delay_BFC028CC) { psx_delay_BFC028CC = 0; cpu->gpr[31] = 0xBFC028D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC028D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC028D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC028D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC028D4: 16600009 bne $s3, $zero, 0xBFC028FC */ uint32_t psx_brA_BFC028D4 = cpu->gpr[19]; 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, 0x4u); #endif /* 0xBFC028D8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xBFC028FCu); goto label_BFC028FC; } #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 /* 0xBFC028DC: 8FA40010 lw $a0, 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, 0xBFC028DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC028DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC028E0: 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(0xBFC028E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC028E4: AFC00018 sw $zero, 24($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028E4u); return; } g_debug_last_store_pc = 0xBFC028E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAFC00018u, _pgxa, cpu->gpr[0]); } #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, 0x21u); #endif /* 0xBFC028E8: 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(0xBFC028E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC028EC: 0FF003A6 jal 0xBFC00E98 */ cpu->gpr[31] = 0xBFC028F4u; /* jal link before delay slot */ psx_delay_BFC028EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC028F0: AC434C00 sw $v1, 19456($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028F0u); return; } g_debug_last_store_pc = 0xBFC028F0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C00u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC028F0u); #endif if (psx_delay_BFC028EC) { psx_delay_BFC028EC = 0; cpu->gpr[31] = 0xBFC028F4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC028F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC028F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC028F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC028F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC028F4: 1000FF7E beq $zero, $zero, 0xBFC026F0 */ uint32_t psx_brA_BFC028F4 = cpu->gpr[0]; uint32_t psx_brB_BFC028F4 = cpu->gpr[0]; psx_taken_BFC028F4 = (psx_brA_BFC028F4 == psx_brB_BFC028F4); psx_delay_BFC028F4 = 1; #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 if (psx_delay_BFC028F4) { psx_delay_BFC028F4 = 0; if (psx_taken_BFC028F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026F0u); goto label_BFC026F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC028FCu); } 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: 8FC50024 lw $a1, 36($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC028FCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000000u); } PGXP_LOAD(0x8FC50024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC028FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02900u); #endif /* 0xBFC02900: 8FA40010 lw $a0, 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, 0xBFC02900u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02904: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC0290Cu; /* jal link before delay slot */ psx_delay_BFC02904 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC02908: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02908u); #endif if (psx_delay_BFC02904) { psx_delay_BFC02904 = 0; cpu->gpr[31] = 0xBFC0290Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } label_BFC0290C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0290Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0290Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0290Cu); #endif /* 0xBFC0290C: 8FA40010 lw $a0, 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, 0xBFC0290Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x80000000u); #endif /* 0xBFC02910: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC02918u; /* jal link before delay slot */ psx_delay_BFC02910 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC02914: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02914u); #endif if (psx_delay_BFC02910) { psx_delay_BFC02910 = 0; cpu->gpr[31] = 0xBFC02918u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } 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, 0x11u); #endif /* 0xBFC02918: 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(0xBFC02918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0291Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0291C: 10440002 beq $v0, $a0, 0xBFC02928 */ uint32_t psx_brA_BFC0291C = cpu->gpr[2]; uint32_t psx_brB_BFC0291C = cpu->gpr[4]; psx_taken_BFC0291C = (psx_brA_BFC0291C == psx_brB_BFC0291C); psx_delay_BFC0291C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02920: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02920u); #endif if (psx_delay_BFC0291C) { psx_delay_BFC0291C = 0; if (psx_taken_BFC0291C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02928u); goto label_BFC02928; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02924u); } label_BFC02924: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02924u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC02924: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02924u); #endif 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, 0x4u); #endif /* 0xBFC02928: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0292Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0292C: 24424BBC addiu $v0, $v0, 19388 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19388)); PGXP_ALU(0x24424BBCu, cpu->gpr[2], _pgx1, 0x00004BBCu); } #ifdef PSX_COSIM cosim_instr(0xBFC0292Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02930: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC02934: 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, 0xBFC02934u); return; } g_debug_last_store_pc = 0xBFC02934u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC02934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02938: 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(0xBFC02938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0293Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC0293C: AFC20018 sw $v0, 24($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0293Cu); return; } g_debug_last_store_pc = 0xBFC0293Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFC20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0293Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02940: 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(0xBFC02940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02944: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800041u); #endif /* 0xBFC02948: 02E03025 or $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(0x02E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0294Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC0294C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC02954u; /* jalr link before delay slot */ psx_delay_BFC0294C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200011u); #endif /* 0xBFC02950: 02A02025 or $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(0x02A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02950u); #endif if (psx_delay_BFC0294C) { psx_delay_BFC0294C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC02954u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02954: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02954u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02954: 1040FF65 beq $v0, $zero, 0xBFC026EC */ uint32_t psx_brA_BFC02954 = cpu->gpr[2]; uint32_t psx_brB_BFC02954 = cpu->gpr[0]; psx_taken_BFC02954 = (psx_brA_BFC02954 == psx_brB_BFC02954); psx_delay_BFC02954 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02958: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02958u); #endif if (psx_delay_BFC02954) { psx_delay_BFC02954 = 0; if (psx_taken_BFC02954) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026ECu); goto label_BFC026EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0295Cu); } label_BFC0295C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0295Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0295Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0295Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0295C: 1000FF64 beq $zero, $zero, 0xBFC026F0 */ uint32_t psx_brA_BFC0295C = cpu->gpr[0]; uint32_t psx_brB_BFC0295C = cpu->gpr[0]; psx_taken_BFC0295C = (psx_brA_BFC0295C == psx_brB_BFC0295C); psx_delay_BFC0295C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC02960: AFC00018 sw $zero, 24($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 24; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (24)); 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[0]); } PGXP_STORE(0xAFC00018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02960u); #endif if (psx_delay_BFC0295C) { psx_delay_BFC0295C = 0; if (psx_taken_BFC0295C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC026F0u); goto label_BFC026F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02964u); } label_BFC02964: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02964u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02964u); #endif /* 0xBFC02964: 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, 0xBFC02964u); 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(0xBFC02964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC02968: 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(0xBFC02968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0296Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0296C: 1642FF93 bne $s2, $v0, 0xBFC027BC */ uint32_t psx_brA_BFC0296C = cpu->gpr[18]; uint32_t psx_brB_BFC0296C = cpu->gpr[2]; psx_taken_BFC0296C = (psx_brA_BFC0296C != psx_brB_BFC0296C); psx_delay_BFC0296C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC02970: 26D60080 addiu $s6, $s6, 128 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (128)); PGXP_ALU(0x26D60080u, cpu->gpr[22], _pgx1, 0x00000080u); } #ifdef PSX_COSIM cosim_instr(0xBFC02970u); #endif if (psx_delay_BFC0296C) { psx_delay_BFC0296C = 0; if (psx_taken_BFC0296C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC027BCu); goto label_BFC027BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02974u); } label_BFC02974: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02974u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02974: 001011C0 sll $v0, $s0, 7 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = cpu->gpr[16] << 7u; PGXP_ALU(0x001011C0u, cpu->gpr[2], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC02978: 1456FFA9 bne $v0, $s6, 0xBFC02820 */ uint32_t psx_brA_BFC02978 = cpu->gpr[2]; uint32_t psx_brB_BFC02978 = cpu->gpr[22]; psx_taken_BFC02978 = (psx_brA_BFC02978 != psx_brB_BFC02978); psx_delay_BFC02978 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0297Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0297C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0297Cu); #endif if (psx_delay_BFC02978) { psx_delay_BFC02978 = 0; if (psx_taken_BFC02978) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02820u); goto label_BFC02820; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02980u); } label_BFC02980: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02980u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02980u); #endif /* 0xBFC02980: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02980u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90000u); #endif /* 0xBFC02984: 02709823 subu $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(0x02709823u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02988: 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(0xBFC02988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0298Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC0298C: 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(0xBFC0298Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC00000u); #endif /* 0xBFC02990: 02F6B821 addu $s7, $s7, $s6 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[23] = cpu->gpr[23] + cpu->gpr[22]; PGXP_ALU(0x02F6B821u, cpu->gpr[23], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC02994: 1000FF73 beq $zero, $zero, 0xBFC02764 */ uint32_t psx_brA_BFC02994 = cpu->gpr[0]; uint32_t psx_brB_BFC02994 = cpu->gpr[0]; psx_taken_BFC02994 = (psx_brA_BFC02994 == psx_brB_BFC02994); psx_delay_BFC02994 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC02998: 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, 0xBFC02998u); return; } g_debug_last_store_pc = 0xBFC02998u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02998u); #endif if (psx_delay_BFC02994) { psx_delay_BFC02994 = 0; if (psx_taken_BFC02994) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02764u); goto label_BFC02764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0299Cu); } label_BFC0299C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0299Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0299Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0299Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0299C: 1000FFF5 beq $zero, $zero, 0xBFC02974 */ uint32_t psx_brA_BFC0299C = cpu->gpr[0]; uint32_t psx_brB_BFC0299C = cpu->gpr[0]; psx_taken_BFC0299C = (psx_brA_BFC0299C == psx_brB_BFC0299C); psx_delay_BFC0299C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC029A0: 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(0xBFC029A0u); #endif if (psx_delay_BFC0299C) { psx_delay_BFC0299C = 0; if (psx_taken_BFC0299C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02974u); goto label_BFC02974; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC029A4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC029A4u); cpu->pc = 0xBFC029A4u; return; /* fallthrough */ } void OpenBIOS_func_1FC029A4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC029A4u); int psx_delay_BFC029E0 = 0; int psx_taken_BFC029E0 = 0; int psx_delay_BFC02A10 = 0; int psx_taken_BFC02A10 = 0; int psx_delay_BFC02A18 = 0; int psx_delay_BFC02A2C = 0; int psx_taken_BFC02A2C = 0; int psx_delay_BFC02A40 = 0; int psx_taken_BFC02A40 = 0; int psx_delay_BFC02A80 = 0; int psx_delay_BFC02A90 = 0; int psx_taken_BFC02A90 = 0; int psx_delay_BFC02AA8 = 0; int psx_taken_BFC02AA8 = 0; int psx_delay_BFC02AB0 = 0; int psx_taken_BFC02AB0 = 0; int psx_delay_BFC02AC4 = 0; int psx_taken_BFC02AC4 = 0; int psx_delay_BFC02ACC = 0; int psx_taken_BFC02ACC = 0; int psx_delay_BFC02AD8 = 0; int psx_taken_BFC02AD8 = 0; int psx_delay_BFC02AF0 = 0; int psx_taken_BFC02AF0 = 0; int psx_delay_BFC02B04 = 0; int psx_delay_BFC02B20 = 0; int psx_delay_BFC02B30 = 0; int psx_taken_BFC02B30 = 0; int psx_delay_BFC02B44 = 0; int psx_delay_BFC02B4C = 0; int psx_taken_BFC02B4C = 0; int psx_delay_BFC02B54 = 0; int psx_delay_BFC02B60 = 0; int psx_taken_BFC02B60 = 0; int psx_delay_BFC02B68 = 0; int psx_delay_BFC02B74 = 0; int psx_taken_BFC02B74 = 0; int psx_delay_BFC02B88 = 0; int psx_delay_BFC02B90 = 0; int psx_taken_BFC02B90 = 0; int psx_delay_BFC02BE0 = 0; int psx_taken_BFC02BE0 = 0; int psx_delay_BFC02BF8 = 0; int psx_taken_BFC02BF8 = 0; int psx_delay_BFC02C14 = 0; int psx_taken_BFC02C14 = 0; int psx_delay_BFC02C5C = 0; int psx_delay_BFC02C64 = 0; int psx_taken_BFC02C64 = 0; int psx_delay_BFC02C7C = 0; int psx_delay_BFC02C84 = 0; int psx_taken_BFC02C84 = 0; int psx_delay_BFC02C94 = 0; int psx_delay_BFC02CA0 = 0; int psx_delay_BFC02CAC = 0; int psx_taken_BFC02CAC = 0; int psx_delay_BFC02CDC = 0; int psx_delay_BFC02CE4 = 0; int psx_taken_BFC02CE4 = 0; int psx_delay_BFC02CEC = 0; int psx_taken_BFC02CEC = 0; int psx_delay_BFC02CF8 = 0; int psx_taken_BFC02CF8 = 0; int psx_delay_BFC02D00 = 0; int psx_taken_BFC02D00 = 0; int psx_delay_BFC02D14 = 0; int psx_taken_BFC02D14 = 0; int psx_delay_BFC02D40 = 0; int psx_taken_BFC02D40 = 0; int psx_delay_BFC02D48 = 0; int psx_delay_BFC02D50 = 0; int psx_taken_BFC02D50 = 0; int psx_delay_BFC02D58 = 0; int psx_delay_BFC02D64 = 0; int psx_taken_BFC02D64 = 0; int psx_delay_BFC02D6C = 0; int psx_delay_BFC02D78 = 0; int psx_taken_BFC02D78 = 0; int psx_delay_BFC02D8C = 0; int psx_delay_BFC02D94 = 0; int psx_taken_BFC02D94 = 0; int psx_delay_BFC02DA4 = 0; int psx_taken_BFC02DA4 = 0; int psx_delay_BFC02DC0 = 0; int psx_taken_BFC02DC0 = 0; int psx_delay_BFC02DC8 = 0; int psx_taken_BFC02DC8 = 0; int psx_delay_BFC02DD0 = 0; int psx_taken_BFC02DD0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC029E8u: goto label_BFC029E8; case 0xBFC029ECu: goto label_BFC029EC; case 0xBFC02A18u: goto label_BFC02A18; case 0xBFC02A20u: goto label_BFC02A20; case 0xBFC02A34u: goto label_BFC02A34; case 0xBFC02A48u: goto label_BFC02A48; case 0xBFC02A50u: goto label_BFC02A50; case 0xBFC02A54u: goto label_BFC02A54; case 0xBFC02A88u: goto label_BFC02A88; case 0xBFC02A98u: goto label_BFC02A98; case 0xBFC02A9Cu: goto label_BFC02A9C; case 0xBFC02AB0u: goto label_BFC02AB0; case 0xBFC02AB8u: goto label_BFC02AB8; case 0xBFC02ABCu: goto label_BFC02ABC; case 0xBFC02AC4u: goto label_BFC02AC4; case 0xBFC02ACCu: goto label_BFC02ACC; case 0xBFC02AD4u: goto label_BFC02AD4; case 0xBFC02AE0u: goto label_BFC02AE0; case 0xBFC02AE4u: goto label_BFC02AE4; case 0xBFC02AF8u: goto label_BFC02AF8; case 0xBFC02AFCu: goto label_BFC02AFC; case 0xBFC02B0Cu: goto label_BFC02B0C; case 0xBFC02B1Cu: goto label_BFC02B1C; case 0xBFC02B28u: goto label_BFC02B28; case 0xBFC02B38u: goto label_BFC02B38; case 0xBFC02B3Cu: goto label_BFC02B3C; case 0xBFC02B4Cu: goto label_BFC02B4C; case 0xBFC02B54u: goto label_BFC02B54; case 0xBFC02B5Cu: goto label_BFC02B5C; case 0xBFC02B68u: goto label_BFC02B68; case 0xBFC02B70u: goto label_BFC02B70; case 0xBFC02B7Cu: goto label_BFC02B7C; case 0xBFC02B80u: goto label_BFC02B80; case 0xBFC02B90u: goto label_BFC02B90; case 0xBFC02B98u: goto label_BFC02B98; case 0xBFC02BACu: goto label_BFC02BAC; case 0xBFC02BE8u: goto label_BFC02BE8; case 0xBFC02C00u: goto label_BFC02C00; case 0xBFC02C1Cu: goto label_BFC02C1C; case 0xBFC02C64u: goto label_BFC02C64; case 0xBFC02C6Cu: goto label_BFC02C6C; case 0xBFC02C84u: goto label_BFC02C84; case 0xBFC02C8Cu: goto label_BFC02C8C; case 0xBFC02C9Cu: goto label_BFC02C9C; case 0xBFC02CA8u: goto label_BFC02CA8; case 0xBFC02CB4u: goto label_BFC02CB4; case 0xBFC02CB8u: goto label_BFC02CB8; case 0xBFC02CE4u: goto label_BFC02CE4; case 0xBFC02CECu: goto label_BFC02CEC; case 0xBFC02CF4u: goto label_BFC02CF4; case 0xBFC02D00u: goto label_BFC02D00; case 0xBFC02D08u: goto label_BFC02D08; case 0xBFC02D1Cu: goto label_BFC02D1C; case 0xBFC02D48u: goto label_BFC02D48; case 0xBFC02D50u: goto label_BFC02D50; case 0xBFC02D58u: goto label_BFC02D58; case 0xBFC02D60u: goto label_BFC02D60; case 0xBFC02D6Cu: goto label_BFC02D6C; case 0xBFC02D74u: goto label_BFC02D74; case 0xBFC02D80u: goto label_BFC02D80; case 0xBFC02D84u: goto label_BFC02D84; case 0xBFC02D94u: goto label_BFC02D94; case 0xBFC02D9Cu: goto label_BFC02D9C; case 0xBFC02DACu: goto label_BFC02DAC; case 0xBFC02DC8u: goto label_BFC02DC8; case 0xBFC02DD0u: goto label_BFC02DD0; default: break; } } label_BFC029A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC029A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC029A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC029A4: 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(0xBFC029A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC029A8: 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, 0xBFC029A8u); return; } g_debug_last_store_pc = 0xBFC029A8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0050u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC029A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC029AC: 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, 0xBFC029ACu); return; } g_debug_last_store_pc = 0xBFC029ACu; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB7004Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC029ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC029B0: 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, 0xBFC029B0u); return; } g_debug_last_store_pc = 0xBFC029B0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC029B4: 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, 0xBFC029B4u); return; } g_debug_last_store_pc = 0xBFC029B4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0054u, _pgxa, cpu->gpr[31]); } #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, 0x20400000u); #endif /* 0xBFC029B8: 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, 0xBFC029B8u); return; } g_debug_last_store_pc = 0xBFC029B8u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60048u, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC029BC: 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, 0xBFC029BCu); return; } g_debug_last_store_pc = 0xBFC029BCu; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50044u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC029BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC029C0: 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, 0xBFC029C0u); return; } g_debug_last_store_pc = 0xBFC029C0u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40040u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC029C4: 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, 0xBFC029C4u); return; } g_debug_last_store_pc = 0xBFC029C4u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3003Cu, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC029C8: 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, 0xBFC029C8u); return; } g_debug_last_store_pc = 0xBFC029C8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20038u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC029CC: 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, 0xBFC029CCu); return; } g_debug_last_store_pc = 0xBFC029CCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10034u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC029CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029D0u); #endif /* 0xBFC029D0: 8C910004 lw $s1, 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, 0xBFC029D0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x10u); } PGXP_LOAD(0x8C910004u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC029D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC029D4: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x40000021u); #endif /* 0xBFC029D8: 00A0F025 or $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(0x00A0F025u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC029D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC029DC: 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, 0xBFC029DCu); return; } g_debug_last_store_pc = 0xBFC029DCu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60060u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC029DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC029E0: 06200002 bltz $s1, 0xBFC029EC */ uint32_t psx_brA_BFC029E0 = cpu->gpr[17]; psx_taken_BFC029E0 = ((int32_t)psx_brA_BFC029E0 < 0); psx_delay_BFC029E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820000u); #endif /* 0xBFC029E4: 2637000F addiu $s7, $s1, 15 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[17] + (15)); PGXP_ALU(0x2637000Fu, cpu->gpr[23], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC029E4u); #endif if (psx_delay_BFC029E0) { psx_delay_BFC029E0 = 0; if (psx_taken_BFC029E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC029ECu); goto label_BFC029EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC029E8u); } label_BFC029E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC029E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC029E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820001u); #endif /* 0xBFC029E8: 0220B825 or $s7, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x0220B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC029E8u); #endif label_BFC029EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC029ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC029ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC029EC: 00171103 sra $v0, $s7, 4 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[23] >> 4u); PGXP_ALU(0x00171103u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC029ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC029F0: 0002A080 sll $s4, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[2] << 2u; PGXP_ALU(0x0002A080u, cpu->gpr[20], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC029F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC029F4: 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, 0xBFC029F4u); return; } g_debug_last_store_pc = 0xBFC029F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC029F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC029F8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC029F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC029FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC029FC: 24424BA4 addiu $v0, $v0, 19364 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19364)); PGXP_ALU(0x24424BA4u, cpu->gpr[2], _pgx1, 0x00004BA4u); } #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, 0x20000004u); #endif /* 0xBFC02A00: 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, 0xBFC02A00u); return; } g_debug_last_store_pc = 0xBFC02A00u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20024u, _pgxa, cpu->gpr[2]); } #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, 0x100004u); #endif /* 0xBFC02A04: 02821021 addu $v0, $s4, $v0 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[20] + cpu->gpr[2]; PGXP_ALU(0x02821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A08u); #endif /* 0xBFC02A08: 8C420000 lw $v0, 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, 0xBFC02A08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02A0C: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC02A10: 14400010 bne $v0, $zero, 0xBFC02A54 */ uint32_t psx_brA_BFC02A10 = cpu->gpr[2]; uint32_t psx_brB_BFC02A10 = cpu->gpr[0]; psx_taken_BFC02A10 = (psx_brA_BFC02A10 != psx_brB_BFC02A10); psx_delay_BFC02A10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC02A14: 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(0xBFC02A14u); #endif if (psx_delay_BFC02A10) { psx_delay_BFC02A10 = 0; if (psx_taken_BFC02A10) { #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, 0xBFC02A18u); } label_BFC02A18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02A18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02A18: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC02A20u; /* jal link before delay slot */ psx_delay_BFC02A18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02A1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02A1Cu); #endif if (psx_delay_BFC02A18) { psx_delay_BFC02A18 = 0; cpu->gpr[31] = 0xBFC02A20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC02A20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02A20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A20u); #endif /* 0xBFC02A20: 8E120010 lw $s2, 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, 0xBFC02A20u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x10000u); } PGXP_LOAD(0x8E120010u, _pgxa, cpu->gpr[18]); } #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: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC02A28: 3242007F andi $v0, $s2, 0x7F */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[18] & 0x7Fu; PGXP_ALU(0x3242007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02A2C: 14400006 bne $v0, $zero, 0xBFC02A48 */ uint32_t psx_brA_BFC02A2C = cpu->gpr[2]; uint32_t psx_brB_BFC02A2C = cpu->gpr[0]; psx_taken_BFC02A2C = (psx_brA_BFC02A2C != psx_brB_BFC02A2C); psx_delay_BFC02A2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02A30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02A30u); #endif if (psx_delay_BFC02A2C) { psx_delay_BFC02A2C = 0; if (psx_taken_BFC02A2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02A48u); goto label_BFC02A48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02A34u); } label_BFC02A34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02A34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A34u); #endif /* 0xBFC02A34: 8E020020 lw $v0, 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, 0xBFC02A34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02A38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC02A3C: 0242102B sltu $v0, $s2, $v0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[18] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0242102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02A40: 14400011 bne $v0, $zero, 0xBFC02A88 */ uint32_t psx_brA_BFC02A40 = cpu->gpr[2]; uint32_t psx_brB_BFC02A40 = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC02A44: 00000000 nop */ /* nop */ #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, 0xBFC02A88u); goto label_BFC02A88; } #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, 0x5u); #endif /* 0xBFC02A48: 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(0xBFC02A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02A4C: AE020018 sw $v0, 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, 0xBFC02A4Cu); return; } g_debug_last_store_pc = 0xBFC02A4Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02A4Cu); #endif 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: 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(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 /* 0xBFC02A54: 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, 0xBFC02A54u); 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(0xBFC02A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A58u); #endif /* 0xBFC02A58: 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, 0xBFC02A58u); 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(0xBFC02A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A5Cu); #endif /* 0xBFC02A5C: 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, 0xBFC02A5Cu); 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(0xBFC02A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A60u); #endif /* 0xBFC02A60: 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, 0xBFC02A60u); 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(0xBFC02A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A64u); #endif /* 0xBFC02A64: 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, 0xBFC02A64u); 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(0xBFC02A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A68u); #endif /* 0xBFC02A68: 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, 0xBFC02A68u); 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(0xBFC02A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A6Cu); #endif /* 0xBFC02A6C: 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, 0xBFC02A6Cu); 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(0xBFC02A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A70u); #endif /* 0xBFC02A70: 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, 0xBFC02A70u); 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(0xBFC02A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A74u); #endif /* 0xBFC02A74: 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, 0xBFC02A74u); 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(0xBFC02A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200005u); #endif /* 0xBFC02A78: 02A01025 or $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(0x02A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A7Cu); #endif /* 0xBFC02A7C: 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, 0xBFC02A7Cu); 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(0xBFC02A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC02A80: 03E00008 jr $ra */ psx_delay_BFC02A80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02A84: 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(0xBFC02A84u); #endif if (psx_delay_BFC02A80) { psx_delay_BFC02A80 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 /* 0xBFC02A88: 8FB30060 lw $s3, 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, 0xBFC02A88u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB30060u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC02A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02A8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02A90: 06610002 bgez $s3, 0xBFC02A9C */ uint32_t psx_brA_BFC02A90 = cpu->gpr[19]; psx_taken_BFC02A90 = ((int32_t)psx_brA_BFC02A90 >= 0); psx_delay_BFC02A90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC02A94: 001291C2 srl $s2, $s2, 7 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] >> 7u; PGXP_ALU(0x001291C2u, cpu->gpr[18], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02A94u); #endif if (psx_delay_BFC02A90) { psx_delay_BFC02A90 = 0; if (psx_taken_BFC02A90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02A9Cu); goto label_BFC02A9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02A98u); } label_BFC02A98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02A98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02A98: 2673007F addiu $s3, $s3, 127 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (127)); PGXP_ALU(0x2673007Fu, cpu->gpr[19], _pgx1, 0x0000007Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02A98u); #endif label_BFC02A9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02A9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02A9Cu); #endif /* 0xBFC02A9C: 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, 0xBFC02A9Cu); 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(0xBFC02A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02AA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02AA4: 30428000 andi $v0, $v0, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8000u; PGXP_ALU(0x30428000u, cpu->gpr[2], _pgx1, 0x8000u); } #ifdef PSX_COSIM cosim_instr(0xBFC02AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02AA8: 14400055 bne $v0, $zero, 0xBFC02C00 */ uint32_t psx_brA_BFC02AA8 = cpu->gpr[2]; uint32_t psx_brB_BFC02AA8 = cpu->gpr[0]; psx_taken_BFC02AA8 = (psx_brA_BFC02AA8 != psx_brB_BFC02AA8); psx_delay_BFC02AA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02AAC: 001399C3 sra $s3, $s3, 7 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] >> 7u); PGXP_ALU(0x001399C3u, cpu->gpr[19], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02AACu); #endif if (psx_delay_BFC02AA8) { psx_delay_BFC02AA8 = 0; if (psx_taken_BFC02AA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02C00u); goto label_BFC02C00; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AB0u); } label_BFC02AB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02AB0: 06210002 bgez $s1, 0xBFC02ABC */ uint32_t psx_brA_BFC02AB0 = cpu->gpr[17]; psx_taken_BFC02AB0 = ((int32_t)psx_brA_BFC02AB0 >= 0); psx_delay_BFC02AB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20005u); #endif /* 0xBFC02AB4: 02201025 or $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(0x02201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02AB4u); #endif if (psx_delay_BFC02AB0) { psx_delay_BFC02AB0 = 0; if (psx_taken_BFC02AB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02ABCu); goto label_BFC02ABC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AB8u); } label_BFC02AB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC02AB8: 2622000F addiu $v0, $s1, 15 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] + (15)); PGXP_ALU(0x2622000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02AB8u); #endif label_BFC02ABC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02ABCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000001u); #endif /* 0xBFC02ABC: 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, 0xBFC02ABCu); return; } g_debug_last_store_pc = 0xBFC02ABCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAFA0001Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC02AC0: 0002B903 sra $s7, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x0002B903u, cpu->gpr[23], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02AC0u); #endif label_BFC02AC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02AC4: 1A600039 blez $s3, 0xBFC02BAC */ uint32_t psx_brA_BFC02AC4 = cpu->gpr[19]; psx_taken_BFC02AC4 = ((int32_t)psx_brA_BFC02AC4 <= 0); psx_delay_BFC02AC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02AC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02AC8u); #endif if (psx_delay_BFC02AC4) { psx_delay_BFC02AC4 = 0; if (psx_taken_BFC02AC4) { #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, 0xBFC02ACCu); } label_BFC02ACC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02ACCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC02ACC: 12400005 beq $s2, $zero, 0xBFC02AE4 */ uint32_t psx_brA_BFC02ACC = cpu->gpr[18]; uint32_t psx_brB_BFC02ACC = cpu->gpr[0]; psx_taken_BFC02ACC = (psx_brA_BFC02ACC == psx_brB_BFC02ACC); psx_delay_BFC02ACC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02AD0: 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(0xBFC02AD0u); #endif if (psx_delay_BFC02ACC) { psx_delay_BFC02ACC = 0; if (psx_taken_BFC02ACC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AE4u); goto label_BFC02AE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AD4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC02AD4: 3243003F andi $v1, $s2, 0x3F */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[18] & 0x3Fu; PGXP_ALU(0x3243003Fu, cpu->gpr[3], _pgx1, 0x003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02AD8: 14600002 bne $v1, $zero, 0xBFC02AE4 */ uint32_t psx_brA_BFC02AD8 = cpu->gpr[3]; uint32_t psx_brB_BFC02AD8 = cpu->gpr[0]; psx_taken_BFC02AD8 = (psx_brA_BFC02AD8 != psx_brB_BFC02AD8); psx_delay_BFC02AD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02ADC: 2462FFC0 addiu $v0, $v1, -64 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] + (-64)); PGXP_ALU(0x2462FFC0u, cpu->gpr[2], _pgx1, 0xFFFFFFC0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02ADCu); #endif if (psx_delay_BFC02AD8) { psx_delay_BFC02AD8 = 0; if (psx_taken_BFC02AD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AE4u); goto label_BFC02AE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AE0u); } label_BFC02AE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02AE0: 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(0xBFC02AE0u); #endif label_BFC02AE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC02AE4: 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(0xBFC02AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02AE8: 02A2A823 subu $s5, $s5, $v0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[21] = cpu->gpr[21] - cpu->gpr[2]; PGXP_ALU(0x02A2A823u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280004u); #endif /* 0xBFC02AEC: 0275102A slt $v0, $s3, $s5 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[19] < (int32_t)cpu->gpr[21] ? 1 : 0); PGXP_ALU(0x0275102Au, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02AF0: 10400002 beq $v0, $zero, 0xBFC02AFC */ uint32_t psx_brA_BFC02AF0 = cpu->gpr[2]; uint32_t psx_brB_BFC02AF0 = cpu->gpr[0]; psx_taken_BFC02AF0 = (psx_brA_BFC02AF0 == psx_brB_BFC02AF0); psx_delay_BFC02AF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02AF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02AF4u); #endif if (psx_delay_BFC02AF0) { psx_delay_BFC02AF0 = 0; if (psx_taken_BFC02AF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AFCu); goto label_BFC02AFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AF8u); } label_BFC02AF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280001u); #endif /* 0xBFC02AF8: 0260A825 or $s5, $s3, $zero */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[19] | cpu->gpr[0]; PGXP_ALU(0x0260A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02AF8u); #endif label_BFC02AFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02AFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02AFCu); #endif /* 0xBFC02AFC: 8E050024 lw $a1, 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, 0xBFC02AFCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC02AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B00u); #endif /* 0xBFC02B00: 8FA40010 lw $a0, 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, 0xBFC02B00u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x80000000u); #endif /* 0xBFC02B04: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC02B0Cu; /* jal link before delay slot */ psx_delay_BFC02B04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC02B08: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B08u); #endif if (psx_delay_BFC02B04) { psx_delay_BFC02B04 = 0; cpu->gpr[31] = 0xBFC02B0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } label_BFC02B0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400005u); #endif /* 0xBFC02B0C: 0040B025 or $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(0x0040B025u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02B10: 00551021 addu $v0, $v0, $s5 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[21]; PGXP_ALU(0x00551021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x20000004u); #endif /* 0xBFC02B14: 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, 0xBFC02B14u); return; } g_debug_last_store_pc = 0xBFC02B14u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20028u, _pgxa, cpu->gpr[2]); } #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, 0x60000000u); #endif /* 0xBFC02B18: AFBE0014 sw $fp, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[30]); } PGXP_STORE(0xAFBE0014u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC02B18u); #endif label_BFC02B1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400021u); #endif /* 0xBFC02B1C: 02C02825 or $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(0x02C02825u, cpu->gpr[5], _pgx1, _pgx2); } #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: 0FF0097B jal 0xBFC025EC */ 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, 0x800011u); #endif /* 0xBFC02B24: 02E02025 or $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(0x02E02025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC02B28: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC02B2C: 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(0xBFC02B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC02B30: 14A20002 bne $a1, $v0, 0xBFC02B3C */ uint32_t psx_brA_BFC02B30 = cpu->gpr[5]; uint32_t psx_brB_BFC02B30 = cpu->gpr[2]; psx_taken_BFC02B30 = (psx_brA_BFC02B30 != psx_brB_BFC02B30); psx_delay_BFC02B30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02B34: 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(0xBFC02B34u); #endif if (psx_delay_BFC02B30) { psx_delay_BFC02B30 = 0; if (psx_taken_BFC02B30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B3Cu); goto label_BFC02B3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B38u); } label_BFC02B38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400021u); #endif /* 0xBFC02B38: 02C02825 or $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(0x02C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B38u); #endif label_BFC02B3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B3Cu); #endif /* 0xBFC02B3C: 8FA60014 lw $a2, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B3Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA60014u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02B40: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC02B44: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC02B4Cu; /* jalr link before delay slot */ psx_delay_BFC02B44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC02B48: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B48u); #endif if (psx_delay_BFC02B44) { psx_delay_BFC02B44 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC02B4Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02B4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02B4C: 10400093 beq $v0, $zero, 0xBFC02D9C */ uint32_t psx_brA_BFC02B4C = cpu->gpr[2]; uint32_t psx_brB_BFC02B4C = cpu->gpr[0]; psx_taken_BFC02B4C = (psx_brA_BFC02B4C == psx_brB_BFC02B4C); psx_delay_BFC02B4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC02B50: AFA20018 sw $v0, 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, 0xBFC02B50u); return; } g_debug_last_store_pc = 0xBFC02B50u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02B50u); #endif if (psx_delay_BFC02B4C) { psx_delay_BFC02B4C = 0; if (psx_taken_BFC02B4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D9Cu); goto label_BFC02D9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B54u); } label_BFC02B54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02B54: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC02B5Cu; /* jal link before delay slot */ psx_delay_BFC02B54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02B58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02B58u); #endif if (psx_delay_BFC02B54) { psx_delay_BFC02B54 = 0; cpu->gpr[31] = 0xBFC02B5Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC02B5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02B5C: 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(0xBFC02B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02B60: 14430067 bne $v0, $v1, 0xBFC02D00 */ uint32_t psx_brA_BFC02B60 = cpu->gpr[2]; uint32_t psx_brB_BFC02B60 = cpu->gpr[3]; psx_taken_BFC02B60 = (psx_brA_BFC02B60 != psx_brB_BFC02B60); psx_delay_BFC02B60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400020u); #endif /* 0xBFC02B64: 26C5FFFF addiu $a1, $s6, -1 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); PGXP_ALU(0x26C5FFFFu, cpu->gpr[5], _pgx1, 0xFFFFFFFFu); } #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, 0xBFC02D00u); goto label_BFC02D00; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02B68: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC02B70u; /* jal link before delay slot */ psx_delay_BFC02B68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800011u); #endif /* 0xBFC02B6C: 02E02025 or $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(0x02E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B6Cu); #endif if (psx_delay_BFC02B68) { psx_delay_BFC02B68 = 0; cpu->gpr[31] = 0xBFC02B70u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC02B70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02B70: 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(0xBFC02B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02B74: 10430002 beq $v0, $v1, 0xBFC02B80 */ uint32_t psx_brA_BFC02B74 = cpu->gpr[2]; uint32_t psx_brB_BFC02B74 = cpu->gpr[3]; psx_taken_BFC02B74 = (psx_brA_BFC02B74 == psx_brB_BFC02B74); psx_delay_BFC02B74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02B78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02B78u); #endif if (psx_delay_BFC02B74) { psx_delay_BFC02B74 = 0; if (psx_taken_BFC02B74) { #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, 0xBFC02B7Cu); } label_BFC02B7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC02B7C: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B7Cu); #endif 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 /* 0xBFC02B80: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02B80u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #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, 0x20011u); #endif /* 0xBFC02B84: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02B88: 0FF0014B jal 0xBFC0052C */ cpu->gpr[31] = 0xBFC02B90u; /* jal link before delay slot */ psx_delay_BFC02B88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC02B8C: 2446FF80 addiu $a2, $v0, -128 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[2] + (-128)); PGXP_ALU(0x2446FF80u, cpu->gpr[6], _pgx1, 0xFFFFFF80u); } #ifdef PSX_COSIM cosim_instr(0xBFC02B8Cu); #endif if (psx_delay_BFC02B88) { psx_delay_BFC02B88 = 0; cpu->gpr[31] = 0xBFC02B90u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0052Cu); cpu->pc = 0xBFC0052Cu; return; } label_BFC02B90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02B90: 14400062 bne $v0, $zero, 0xBFC02D1C */ uint32_t psx_brA_BFC02B90 = cpu->gpr[2]; uint32_t psx_brB_BFC02B90 = cpu->gpr[0]; psx_taken_BFC02B90 = (psx_brA_BFC02B90 != psx_brB_BFC02B90); psx_delay_BFC02B90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02B94: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02B94u); #endif if (psx_delay_BFC02B90) { psx_delay_BFC02B90 = 0; if (psx_taken_BFC02B90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D1Cu); goto label_BFC02D1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B98u); } label_BFC02B98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02B98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02B98: 246351E8 addiu $v1, $v1, 20968 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (20968)); PGXP_ALU(0x246351E8u, cpu->gpr[3], _pgx1, 0x000051E8u); } #ifdef PSX_COSIM cosim_instr(0xBFC02B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC02B9C: 00171080 sll $v0, $s7, 2 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] << 2u; PGXP_ALU(0x00171080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC02B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02BA0: 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(0xBFC02BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02BA4: 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(0xBFC02BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02BA8: 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, 0xBFC02BA8u); return; } g_debug_last_store_pc = 0xBFC02BA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02BA8u); #endif 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 /* 0xBFC02BAC: 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, 0xBFC02BACu); 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(0xBFC02BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02BB0: 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, 0xBFC02BB0u); return; } g_debug_last_store_pc = 0xBFC02BB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } #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, 0x200004u); #endif /* 0xBFC02BB4: 0002A9C0 sll $s5, $v0, 7 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[21] = cpu->gpr[2] << 7u; PGXP_ALU(0x0002A9C0u, cpu->gpr[21], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0xBFC02BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BB8u); #endif /* 0xBFC02BB8: 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, 0xBFC02BB8u); 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(0xBFC02BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02BBC: 00000000 nop */ /* nop */ #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, 0x200004u); #endif /* 0xBFC02BC0: 00551021 addu $v0, $v0, $s5 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[21]; PGXP_ALU(0x00551021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02BC4: AE020010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02BC4u); return; } g_debug_last_store_pc = 0xBFC02BC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BC8u); #endif /* 0xBFC02BC8: 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, 0xBFC02BC8u); 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(0xBFC02BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02BCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02BD0: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02BD4: 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, 0xBFC02BD4u); return; } g_debug_last_store_pc = 0xBFC02BD4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BD8u); #endif /* 0xBFC02BD8: 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, 0xBFC02BD8u); 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(0xBFC02BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02BDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02BE0: 1055FF9C beq $v0, $s5, 0xBFC02A54 */ uint32_t psx_brA_BFC02BE0 = cpu->gpr[2]; uint32_t psx_brB_BFC02BE0 = cpu->gpr[21]; psx_taken_BFC02BE0 = (psx_brA_BFC02BE0 == psx_brB_BFC02BE0); psx_delay_BFC02BE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02BE4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02BE4u); #endif if (psx_delay_BFC02BE0) { psx_delay_BFC02BE0 = 0; if (psx_taken_BFC02BE0) { #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, 0xBFC02BE8u); } label_BFC02BE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02BE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02BE8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC02BEC: 244251E8 addiu $v0, $v0, 20968 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20968)); PGXP_ALU(0x244251E8u, cpu->gpr[2], _pgx1, 0x000051E8u); } #ifdef PSX_COSIM cosim_instr(0xBFC02BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02BF0: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BF4u); #endif /* 0xBFC02BF4: 8C550000 lw $s5, 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, 0xBFC02BF4u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x4u); } PGXP_LOAD(0x8C550000u, _pgxa, cpu->gpr[21]); } #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, 0x1u); #endif /* 0xBFC02BF8: 1000FF96 beq $zero, $zero, 0xBFC02A54 */ uint32_t psx_brA_BFC02BF8 = cpu->gpr[0]; uint32_t psx_brB_BFC02BF8 = cpu->gpr[0]; psx_taken_BFC02BF8 = (psx_brA_BFC02BF8 == psx_brB_BFC02BF8); psx_delay_BFC02BF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC02BFC: 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(0xBFC02BFCu); #endif if (psx_delay_BFC02BF8) { psx_delay_BFC02BF8 = 0; if (psx_taken_BFC02BF8) { #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, 0xBFC02C00u); } label_BFC02C00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02C00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C00u); #endif /* 0xBFC02C00: 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, 0xBFC02C00u); 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(0xBFC02C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02C04: 00000000 nop */ /* nop */ #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, 0x100004u); #endif /* 0xBFC02C08: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C0Cu); #endif /* 0xBFC02C0C: 8C550000 lw $s5, 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, 0xBFC02C0Cu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x4u); } PGXP_LOAD(0x8C550000u, _pgxa, cpu->gpr[21]); } #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, 0x1u); #endif /* 0xBFC02C10: 00000000 nop */ /* nop */ #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, 0x200001u); #endif /* 0xBFC02C14: 16A0FF8E bne $s5, $zero, 0xBFC02A50 */ uint32_t psx_brA_BFC02C14 = cpu->gpr[21]; uint32_t psx_brB_BFC02C14 = cpu->gpr[0]; psx_taken_BFC02C14 = (psx_brA_BFC02C14 != psx_brB_BFC02C14); psx_delay_BFC02C14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02C18: 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(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, 0xBFC02A50u); goto label_BFC02A50; } #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, 0xCu); #endif /* 0xBFC02C1C: 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, 0xBFC02C1Cu); return; } g_debug_last_store_pc = 0xBFC02C1Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C20: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C24: 24424BCC addiu $v0, $v0, 19404 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19404)); PGXP_ALU(0x24424BCCu, cpu->gpr[2], _pgx1, 0x00004BCCu); } #ifdef PSX_COSIM cosim_instr(0xBFC02C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02C28: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC02C2C: 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, 0xBFC02C2Cu); return; } g_debug_last_store_pc = 0xBFC02C2Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAC520000u, _pgxa, cpu->gpr[18]); } #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, 0x4u); #endif /* 0xBFC02C30: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC02C34: 24424BC4 addiu $v0, $v0, 19396 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19396)); PGXP_ALU(0x24424BC4u, cpu->gpr[2], _pgx1, 0x00004BC4u); } #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, 0x100004u); #endif /* 0xBFC02C38: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80004u); #endif /* 0xBFC02C3C: AC530000 sw $s3, 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, 0xBFC02C3Cu); return; } g_debug_last_store_pc = 0xBFC02C3Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAC530000u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C40: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C44: 24424BB4 addiu $v0, $v0, 19380 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19380)); PGXP_ALU(0x24424BB4u, cpu->gpr[2], _pgx1, 0x00004BB4u); } #ifdef PSX_COSIM cosim_instr(0xBFC02C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02C48: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC02C4C: AC5E0000 sw $fp, 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, 0xBFC02C4Cu); return; } g_debug_last_store_pc = 0xBFC02C4Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC5E0000u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C50: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C54: 24424BAC addiu $v0, $v0, 19372 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19372)); PGXP_ALU(0x24424BACu, cpu->gpr[2], _pgx1, 0x00004BACu); } #ifdef PSX_COSIM cosim_instr(0xBFC02C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02C58: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02C5C: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC02C64u; /* jal link before delay slot */ psx_delay_BFC02C5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02C60: 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, 0xBFC02C60u); return; } g_debug_last_store_pc = 0xBFC02C60u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC500000u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C60u); #endif if (psx_delay_BFC02C5C) { psx_delay_BFC02C5C = 0; cpu->gpr[31] = 0xBFC02C64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC02C64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02C64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC02C64: 16600009 bne $s3, $zero, 0xBFC02C8C */ uint32_t psx_brA_BFC02C64 = cpu->gpr[19]; uint32_t psx_brB_BFC02C64 = cpu->gpr[0]; psx_taken_BFC02C64 = (psx_brA_BFC02C64 != psx_brB_BFC02C64); psx_delay_BFC02C64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02C68: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02C68u); #endif if (psx_delay_BFC02C64) { psx_delay_BFC02C64 = 0; if (psx_taken_BFC02C64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02C8Cu); goto label_BFC02C8C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02C6Cu); } 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 /* 0xBFC02C6C: 8FA40010 lw $a0, 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, 0xBFC02C6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02C70: 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(0xBFC02C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02C74: 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, 0xBFC02C74u); return; } g_debug_last_store_pc = 0xBFC02C74u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02C78: 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(0xBFC02C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02C7C: 0FF003A6 jal 0xBFC00E98 */ cpu->gpr[31] = 0xBFC02C84u; /* jal link before delay slot */ psx_delay_BFC02C7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02C80: AC434C00 sw $v1, 19456($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02C80u); return; } g_debug_last_store_pc = 0xBFC02C80u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C00u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C80u); #endif if (psx_delay_BFC02C7C) { psx_delay_BFC02C7C = 0; cpu->gpr[31] = 0xBFC02C84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00E98u); cpu->pc = 0xBFC00E98u; return; } label_BFC02C84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02C84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02C84: 1000FF73 beq $zero, $zero, 0xBFC02A54 */ uint32_t psx_brA_BFC02C84 = cpu->gpr[0]; uint32_t psx_brB_BFC02C84 = cpu->gpr[0]; psx_taken_BFC02C84 = (psx_brA_BFC02C84 == psx_brB_BFC02C84); psx_delay_BFC02C84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02C88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02C88u); #endif if (psx_delay_BFC02C84) { psx_delay_BFC02C84 = 0; if (psx_taken_BFC02C84) { #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, 0xBFC02C8Cu); } label_BFC02C8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02C8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C8Cu); #endif /* 0xBFC02C8C: 8E050024 lw $a1, 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, 0xBFC02C8Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C90u); #endif /* 0xBFC02C90: 8FA40010 lw $a0, 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, 0xBFC02C90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02C94: 0FF00965 jal 0xBFC02594 */ cpu->gpr[31] = 0xBFC02C9Cu; /* jal link before delay slot */ psx_delay_BFC02C94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40041u); #endif /* 0xBFC02C98: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02C98u); #endif if (psx_delay_BFC02C94) { psx_delay_BFC02C94 = 0; cpu->gpr[31] = 0xBFC02C9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02594u); cpu->pc = 0xBFC02594u; return; } 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 /* 0xBFC02C9C: 8FA40010 lw $a0, 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, 0xBFC02C9Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02CA0: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC02CA8u; /* jal link before delay slot */ psx_delay_BFC02CA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC02CA4: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02CA4u); #endif if (psx_delay_BFC02CA0) { psx_delay_BFC02CA0 = 0; cpu->gpr[31] = 0xBFC02CA8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC02CA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02CA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02CA8: 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(0xBFC02CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02CAC: 10430002 beq $v0, $v1, 0xBFC02CB8 */ uint32_t psx_brA_BFC02CAC = cpu->gpr[2]; uint32_t psx_brB_BFC02CAC = cpu->gpr[3]; psx_taken_BFC02CAC = (psx_brA_BFC02CAC == psx_brB_BFC02CAC); psx_delay_BFC02CAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02CB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02CB0u); #endif if (psx_delay_BFC02CAC) { psx_delay_BFC02CAC = 0; if (psx_taken_BFC02CAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02CB8u); goto label_BFC02CB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02CB4u); } 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, 0x25u); #endif /* 0xBFC02CB4: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02CB4u); #endif label_BFC02CB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02CB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02CB8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02CBC: 24424BBC addiu $v0, $v0, 19388 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19388)); PGXP_ALU(0x24424BBCu, cpu->gpr[2], _pgx1, 0x00004BBCu); } #ifdef PSX_COSIM cosim_instr(0xBFC02CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC02CC0: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC02CC4: 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, 0xBFC02CC4u); return; } g_debug_last_store_pc = 0xBFC02CC4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC02CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02CC8: 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(0xBFC02CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC02CCC: AE020018 sw $v0, 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, 0xBFC02CCCu); return; } g_debug_last_store_pc = 0xBFC02CCCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02CD0: 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(0xBFC02CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02CD4: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000041u); #endif /* 0xBFC02CD8: 03C03025 or $a2, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC02CDC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC02CE4u; /* jalr link before delay slot */ psx_delay_BFC02CDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC02CE0: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02CE0u); #endif if (psx_delay_BFC02CDC) { psx_delay_BFC02CDC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC02CE4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02CE4: 1040FF5A beq $v0, $zero, 0xBFC02A50 */ uint32_t psx_brA_BFC02CE4 = cpu->gpr[2]; uint32_t psx_brB_BFC02CE4 = cpu->gpr[0]; psx_taken_BFC02CE4 = (psx_brA_BFC02CE4 == psx_brB_BFC02CE4); psx_delay_BFC02CE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02CE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02CE8u); #endif if (psx_delay_BFC02CE4) { psx_delay_BFC02CE4 = 0; if (psx_taken_BFC02CE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02A50u); goto label_BFC02A50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02CECu); } label_BFC02CEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02CECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02CEC: 1000FF59 beq $zero, $zero, 0xBFC02A54 */ uint32_t psx_brA_BFC02CEC = cpu->gpr[0]; uint32_t psx_brB_BFC02CEC = cpu->gpr[0]; 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, 0x10001u); #endif /* 0xBFC02CF0: 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, 0xBFC02CF0u); return; } g_debug_last_store_pc = 0xBFC02CF0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } #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, 0xBFC02A54u); goto label_BFC02A54; } #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 /* 0xBFC02CF4: 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, 0xBFC02CF4u); 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(0xBFC02CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02CF8: 1000FF88 beq $zero, $zero, 0xBFC02B1C */ uint32_t psx_brA_BFC02CF8 = cpu->gpr[0]; uint32_t psx_brB_BFC02CF8 = cpu->gpr[0]; psx_taken_BFC02CF8 = (psx_brA_BFC02CF8 == psx_brB_BFC02CF8); psx_delay_BFC02CF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC02CFC: 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, 0xBFC02CFCu); return; } g_debug_last_store_pc = 0xBFC02CFCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02CFCu); #endif if (psx_delay_BFC02CF8) { psx_delay_BFC02CF8 = 0; if (psx_taken_BFC02CF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B1Cu); goto label_BFC02B1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D00u); } 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, 0x5u); #endif /* 0xBFC02D00: 10400006 beq $v0, $zero, 0xBFC02D1C */ uint32_t psx_brA_BFC02D00 = cpu->gpr[2]; uint32_t psx_brB_BFC02D00 = cpu->gpr[0]; psx_taken_BFC02D00 = (psx_brA_BFC02D00 == psx_brB_BFC02D00); psx_delay_BFC02D00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02D04: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #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, 0xBFC02D1Cu); goto label_BFC02D1C; } #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, 0x800008u); #endif /* 0xBFC02D08: 00171880 sll $v1, $s7, 2 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[3] = cpu->gpr[23] << 2u; PGXP_ALU(0x00171880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC02D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02D0C: 248451E8 addiu $a0, $a0, 20968 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20968)); PGXP_ALU(0x248451E8u, cpu->gpr[4], _pgx1, 0x000051E8u); } #ifdef PSX_COSIM cosim_instr(0xBFC02D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC02D10: 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(0xBFC02D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02D14: 1000FFA5 beq $zero, $zero, 0xBFC02BAC */ uint32_t psx_brA_BFC02D14 = cpu->gpr[0]; uint32_t psx_brB_BFC02D14 = cpu->gpr[0]; psx_taken_BFC02D14 = (psx_brA_BFC02D14 == psx_brB_BFC02D14); psx_delay_BFC02D14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02D18: 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, 0xBFC02D18u); return; } g_debug_last_store_pc = 0xBFC02D18u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02D18u); #endif if (psx_delay_BFC02D14) { psx_delay_BFC02D14 = 0; if (psx_taken_BFC02D14) { #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, 0xBFC02D1Cu); } label_BFC02D1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D1Cu); #endif /* 0xBFC02D1C: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D1Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400010u); #endif /* 0xBFC02D20: 26C40001 addiu $a0, $s6, 1 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); PGXP_ALU(0x26C40001u, cpu->gpr[4], _pgx1, 0x00000001u); } #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, 0x4u); #endif /* 0xBFC02D24: 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(0xBFC02D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000Cu); #endif /* 0xBFC02D28: 005E1823 subu $v1, $v0, $fp */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[3] = cpu->gpr[2] - cpu->gpr[30]; PGXP_ALU(0x005E1823u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x20000008u); #endif /* 0xBFC02D2C: 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, 0xBFC02D2Cu); return; } g_debug_last_store_pc = 0xBFC02D2Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } #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, 0x400008u); #endif /* 0xBFC02D30: 26C30001 addiu $v1, $s6, 1 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[22] + (1)); PGXP_ALU(0x26C30001u, cpu->gpr[3], _pgx1, 0x00000001u); } #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, 0x20000008u); #endif /* 0xBFC02D34: 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, 0xBFC02D34u); return; } g_debug_last_store_pc = 0xBFC02D34u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC02D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D38u); #endif /* 0xBFC02D38: 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, 0xBFC02D38u); 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(0xBFC02D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02D3C: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC02D40: 1464FFEC bne $v1, $a0, 0xBFC02CF4 */ uint32_t psx_brA_BFC02D40 = cpu->gpr[3]; uint32_t psx_brB_BFC02D40 = cpu->gpr[4]; psx_taken_BFC02D40 = (psx_brA_BFC02D40 != psx_brB_BFC02D40); psx_delay_BFC02D40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02D44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02D44u); #endif if (psx_delay_BFC02D40) { psx_delay_BFC02D40 = 0; if (psx_taken_BFC02D40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02CF4u); goto label_BFC02CF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D48u); } label_BFC02D48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02D48: 0FF0033F jal 0xBFC00CFC */ cpu->gpr[31] = 0xBFC02D50u; /* jal link before delay slot */ psx_delay_BFC02D48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC02D4C: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02D4Cu); #endif if (psx_delay_BFC02D48) { psx_delay_BFC02D48 = 0; cpu->gpr[31] = 0xBFC02D50u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00CFCu); cpu->pc = 0xBFC00CFCu; return; } label_BFC02D50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02D50: 1040FF96 beq $v0, $zero, 0xBFC02BAC */ uint32_t psx_brA_BFC02D50 = cpu->gpr[2]; uint32_t psx_brB_BFC02D50 = cpu->gpr[0]; psx_taken_BFC02D50 = (psx_brA_BFC02D50 == psx_brB_BFC02D50); psx_delay_BFC02D50 = 1; #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 if (psx_delay_BFC02D50) { psx_delay_BFC02D50 = 0; if (psx_taken_BFC02D50) { #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, 0xBFC02D58u); } 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, 0x80000000u); #endif /* 0xBFC02D58: 0FF01D9F jal 0xBFC0767C */ cpu->gpr[31] = 0xBFC02D60u; /* jal link before delay slot */ psx_delay_BFC02D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02D5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02D5Cu); #endif if (psx_delay_BFC02D58) { psx_delay_BFC02D58 = 0; cpu->gpr[31] = 0xBFC02D60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; } label_BFC02D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02D60: 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(0xBFC02D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02D64: 14430018 bne $v0, $v1, 0xBFC02DC8 */ uint32_t psx_brA_BFC02D64 = cpu->gpr[2]; uint32_t psx_brB_BFC02D64 = cpu->gpr[3]; 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, 0x400021u); #endif /* 0xBFC02D68: 02C02825 or $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(0x02C02825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0xBFC02DC8u); goto label_BFC02DC8; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02D6C: 0FF0097B jal 0xBFC025EC */ cpu->gpr[31] = 0xBFC02D74u; /* jal link before delay slot */ psx_delay_BFC02D6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800011u); #endif /* 0xBFC02D70: 02E02025 or $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(0x02E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02D70u); #endif if (psx_delay_BFC02D6C) { psx_delay_BFC02D6C = 0; cpu->gpr[31] = 0xBFC02D74u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC025ECu); cpu->pc = 0xBFC025ECu; return; } label_BFC02D74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC02D74: 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(0xBFC02D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC02D78: 10430002 beq $v0, $v1, 0xBFC02D84 */ uint32_t psx_brA_BFC02D78 = cpu->gpr[2]; uint32_t psx_brB_BFC02D78 = cpu->gpr[3]; psx_taken_BFC02D78 = (psx_brA_BFC02D78 == psx_brB_BFC02D78); psx_delay_BFC02D78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02D7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02D7Cu); #endif if (psx_delay_BFC02D78) { psx_delay_BFC02D78 = 0; if (psx_taken_BFC02D78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D84u); goto label_BFC02D84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D80u); } label_BFC02D80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC02D80: 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, 0xBFC02D80u); return; } g_debug_last_store_pc = 0xBFC02D80u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02D80u); #endif 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: 8FA60014 lw $a2, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02D84u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA60014u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC02D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D88u); #endif /* 0xBFC02D88: 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, 0xBFC02D88u); 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(0xBFC02D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC02D8C: 0FF0014B jal 0xBFC0052C */ cpu->gpr[31] = 0xBFC02D94u; /* jal link before delay slot */ psx_delay_BFC02D8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC02D90: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02D90u); #endif if (psx_delay_BFC02D8C) { psx_delay_BFC02D8C = 0; cpu->gpr[31] = 0xBFC02D94u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0052Cu); cpu->pc = 0xBFC0052Cu; return; } label_BFC02D94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02D94: 1040FF80 beq $v0, $zero, 0xBFC02B98 */ uint32_t psx_brA_BFC02D94 = cpu->gpr[2]; uint32_t psx_brB_BFC02D94 = cpu->gpr[0]; psx_taken_BFC02D94 = (psx_brA_BFC02D94 == psx_brB_BFC02D94); psx_delay_BFC02D94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC02D98: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02D98u); #endif if (psx_delay_BFC02D94) { psx_delay_BFC02D94 = 0; if (psx_taken_BFC02D94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02B98u); goto label_BFC02B98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D9Cu); } label_BFC02D9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02D9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02D9Cu); #endif /* 0xBFC02D9C: 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, 0xBFC02D9Cu); 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(0xBFC02D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02DA0: 001511C0 sll $v0, $s5, 7 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = cpu->gpr[21] << 7u; PGXP_ALU(0x001511C0u, cpu->gpr[2], _pgx1, 7u); } #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, 0xCu); #endif /* 0xBFC02DA4: 1443FF81 bne $v0, $v1, 0xBFC02BAC */ uint32_t psx_brA_BFC02DA4 = cpu->gpr[2]; uint32_t psx_brB_BFC02DA4 = cpu->gpr[3]; psx_taken_BFC02DA4 = (psx_brA_BFC02DA4 != psx_brB_BFC02DA4); psx_delay_BFC02DA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02DA8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02DA8u); #endif if (psx_delay_BFC02DA4) { psx_delay_BFC02DA4 = 0; if (psx_taken_BFC02DA4) { #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, 0xBFC02DACu); } 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, 0x40000004u); #endif /* 0xBFC02DAC: 03C2F021 addu $fp, $fp, $v0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[2]; PGXP_ALU(0x03C2F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC02DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DB0u); #endif /* 0xBFC02DB0: 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, 0xBFC02DB0u); 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(0xBFC02DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280000u); #endif /* 0xBFC02DB4: 02759823 subu $s3, $s3, $s5 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[19] = cpu->gpr[19] - cpu->gpr[21]; PGXP_ALU(0x02759823u, cpu->gpr[19], _pgx1, _pgx2); } #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, 0x200004u); #endif /* 0xBFC02DB8: 00551021 addu $v0, $v0, $s5 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[21]; PGXP_ALU(0x00551021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x240000u); #endif /* 0xBFC02DBC: 02559021 addu $s2, $s2, $s5 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[21]; PGXP_ALU(0x02559021u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC02DC0: 1000FF40 beq $zero, $zero, 0xBFC02AC4 */ uint32_t psx_brA_BFC02DC0 = cpu->gpr[0]; uint32_t psx_brB_BFC02DC0 = cpu->gpr[0]; psx_taken_BFC02DC0 = (psx_brA_BFC02DC0 == psx_brB_BFC02DC0); psx_delay_BFC02DC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC02DC4: 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, 0xBFC02DC4u); return; } g_debug_last_store_pc = 0xBFC02DC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02DC4u); #endif if (psx_delay_BFC02DC0) { psx_delay_BFC02DC0 = 0; if (psx_taken_BFC02DC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02AC4u); goto label_BFC02AC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02DC8u); } label_BFC02DC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02DC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02DC8: 1040FFF4 beq $v0, $zero, 0xBFC02D9C */ uint32_t psx_brA_BFC02DC8 = cpu->gpr[2]; uint32_t psx_brB_BFC02DC8 = cpu->gpr[0]; psx_taken_BFC02DC8 = (psx_brA_BFC02DC8 == psx_brB_BFC02DC8); psx_delay_BFC02DC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02DCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02DCCu); #endif if (psx_delay_BFC02DC8) { psx_delay_BFC02DC8 = 0; if (psx_taken_BFC02DC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D9Cu); goto label_BFC02D9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02DD0u); } label_BFC02DD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02DD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02DD0: 1000FFCD beq $zero, $zero, 0xBFC02D08 */ uint32_t psx_brA_BFC02DD0 = cpu->gpr[0]; uint32_t psx_brB_BFC02DD0 = cpu->gpr[0]; psx_taken_BFC02DD0 = (psx_brA_BFC02DD0 == psx_brB_BFC02DD0); psx_delay_BFC02DD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02DD4: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02DD4u); #endif if (psx_delay_BFC02DD0) { psx_delay_BFC02DD0 = 0; if (psx_taken_BFC02DD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02D08u); goto label_BFC02D08; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02DD8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02DD8u); cpu->pc = 0xBFC02DD8u; return; /* fallthrough */ } void OpenBIOS_func_1FC02DD8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02DD8u); int psx_delay_BFC02DE4 = 0; label_BFC02DD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02DD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02DD8: 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(0xBFC02DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02DDC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x2000001u); #endif /* 0xBFC02DE0: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC02DE4: 03200008 jr $t9 */ psx_delay_BFC02DE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC02DE8: 24849FD0 addiu $a0, $a0, -24624 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24624)); PGXP_ALU(0x24849FD0u, cpu->gpr[4], _pgx1, 0xFFFF9FD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02DE8u); #endif if (psx_delay_BFC02DE4) { psx_delay_BFC02DE4 = 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 OpenBIOS_func_1FC02DEC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02DECu); int psx_delay_BFC02E10 = 0; int psx_delay_BFC02E20 = 0; int psx_delay_BFC02E30 = 0; int psx_delay_BFC02E40 = 0; int psx_delay_BFC02E50 = 0; int psx_delay_BFC02E68 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02E18u: goto label_BFC02E18; case 0xBFC02E28u: goto label_BFC02E28; case 0xBFC02E38u: goto label_BFC02E38; case 0xBFC02E48u: goto label_BFC02E48; case 0xBFC02E58u: goto label_BFC02E58; default: break; } } label_BFC02DEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02DECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02DEC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC02DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC02DF0: 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(0xBFC02DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC02DF4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02DF4u); return; } g_debug_last_store_pc = 0xBFC02DF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20010000u); #endif /* 0xBFC02DF8: 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, 0xBFC02DF8u); return; } g_debug_last_store_pc = 0xBFC02DF8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC02DFC: 0000000C syscall */ cpu->pc = 0xBFC02DFCu; if (psx_syscall(cpu, cpu->gpr[2])) return; #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, 0x4u); #endif /* 0xBFC02E00: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E04u); #endif /* 0xBFC02E04: 8C444BE4 lw $a0, 19428($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19428)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E04u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444BE4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E08: 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(0xBFC02E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02E0C: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02E10: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02E18u; /* jalr link before delay slot */ psx_delay_BFC02E10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02E14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02E14u); #endif if (psx_delay_BFC02E10) { psx_delay_BFC02E10 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02E18u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02E18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02E18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02E18: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E1Cu); #endif /* 0xBFC02E1C: 8C444BE0 lw $a0, 19424($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E1Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444BE0u, _pgxa, cpu->gpr[4]); } #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, 0x80010000u); #endif /* 0xBFC02E20: 0200F809 jalr $ra, $s0 */ 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, 0x201u); #endif /* 0xBFC02E24: 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(0xBFC02E24u); #endif if (psx_delay_BFC02E20) { psx_delay_BFC02E20 = 0; { uint32_t _t = cpu->gpr[16]; 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: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E2Cu); #endif /* 0xBFC02E2C: 8C444BDC lw $a0, 19420($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E2Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444BDCu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02E30: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02E38u; /* jalr link before delay slot */ psx_delay_BFC02E30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E34: 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(0xBFC02E34u); #endif if (psx_delay_BFC02E30) { psx_delay_BFC02E30 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02E38u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x4u); #endif /* 0xBFC02E38: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E3Cu); #endif /* 0xBFC02E3C: 8C444BD8 lw $a0, 19416($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E3Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444BD8u, _pgxa, cpu->gpr[4]); } #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, 0x80010000u); #endif /* 0xBFC02E40: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02E48u; /* jalr link before delay slot */ psx_delay_BFC02E40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E44: 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(0xBFC02E44u); #endif if (psx_delay_BFC02E40) { psx_delay_BFC02E40 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02E48u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x4u); #endif /* 0xBFC02E48: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E4Cu); #endif /* 0xBFC02E4C: 8C444BD4 lw $a0, 19412($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E4Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444BD4u, _pgxa, cpu->gpr[4]); } #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, 0x80010000u); #endif /* 0xBFC02E50: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02E58u; /* jalr link before delay slot */ psx_delay_BFC02E50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E54: 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(0xBFC02E54u); #endif if (psx_delay_BFC02E50) { psx_delay_BFC02E50 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02E58u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02E58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02E58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E58: 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(0xBFC02E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E5Cu); #endif /* 0xBFC02E5C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02E5Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E60u); #endif /* 0xBFC02E60: 8FB00010 lw $s0, 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, 0xBFC02E60u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC02E64: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC02E68: 03200008 jr $t9 */ psx_delay_BFC02E68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02E6C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC02E6Cu); #endif if (psx_delay_BFC02E68) { psx_delay_BFC02E68 = 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 OpenBIOS_func_1FC02E70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02E70u); int psx_delay_BFC02E98 = 0; int psx_delay_BFC02EB8 = 0; int psx_delay_BFC02ED8 = 0; int psx_delay_BFC02EF8 = 0; int psx_delay_BFC02F18 = 0; int psx_delay_BFC02F38 = 0; int psx_delay_BFC02F4C = 0; int psx_delay_BFC02F58 = 0; int psx_delay_BFC02F64 = 0; int psx_delay_BFC02F70 = 0; int psx_delay_BFC02F7C = 0; int psx_delay_BFC02FB0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02EA0u: goto label_BFC02EA0; case 0xBFC02EC0u: goto label_BFC02EC0; case 0xBFC02EE0u: goto label_BFC02EE0; case 0xBFC02F00u: goto label_BFC02F00; case 0xBFC02F20u: goto label_BFC02F20; case 0xBFC02F40u: goto label_BFC02F40; case 0xBFC02F54u: goto label_BFC02F54; case 0xBFC02F60u: goto label_BFC02F60; case 0xBFC02F6Cu: goto label_BFC02F6C; case 0xBFC02F78u: goto label_BFC02F78; case 0xBFC02F84u: goto label_BFC02F84; default: break; } } 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, 0x20000000u); #endif /* 0xBFC02E70: 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(0xBFC02E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02E74: 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(0xBFC02E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC02E78: 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, 0xBFC02E78u); return; } g_debug_last_store_pc = 0xBFC02E78u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC02E7C: 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, 0xBFC02E7Cu); return; } g_debug_last_store_pc = 0xBFC02E7Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC02E80: 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, 0xBFC02E80u); return; } g_debug_last_store_pc = 0xBFC02E80u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC02E84: 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, 0xBFC02E84u); return; } g_debug_last_store_pc = 0xBFC02E84u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC02E88: 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, 0xBFC02E88u); return; } g_debug_last_store_pc = 0xBFC02E88u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC02E8C: 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, 0xBFC02E8Cu); return; } g_debug_last_store_pc = 0xBFC02E8Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC02E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC02E90: 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, 0xBFC02E90u); return; } g_debug_last_store_pc = 0xBFC02E90u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #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, 0x5u); #endif /* 0xBFC02E94: 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(0xBFC02E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC02E98: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC02EA0u; /* jalr link before delay slot */ psx_delay_BFC02E98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02E9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02E9Cu); #endif if (psx_delay_BFC02E98) { psx_delay_BFC02E98 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC02EA0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x201u); #endif /* 0xBFC02EA0: 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(0xBFC02EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02EA4: 3C11F000 lui $s1, 0xF000 */ cpu->gpr[17] = 0xF0000000u; PGXP_ALU(0x3C11F000u, cpu->gpr[17], 0u, 0u); #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, 0x10001u); #endif /* 0xBFC02EA8: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #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, 0x81u); #endif /* 0xBFC02EAC: 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(0xBFC02EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC02EB0: 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(0xBFC02EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02EB4: 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(0xBFC02EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02EB8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02EC0u; /* jalr link before delay slot */ psx_delay_BFC02EB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02EBC: 26240003 addiu $a0, $s1, 3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (3)); PGXP_ALU(0x26240003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0xBFC02EBCu); #endif if (psx_delay_BFC02EB8) { psx_delay_BFC02EB8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02EC0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02EC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02EC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC02EC0: 3C150000 lui $s5, 0x0 */ cpu->gpr[21] = 0x00000000u; PGXP_ALU(0x3C150000u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC02EC4: AEA24BE4 sw $v0, 19428($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19428; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19428)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02EC4u); return; } g_debug_last_store_pc = 0xBFC02EC4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEA24BE4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC02EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02EC8: 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(0xBFC02EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02ECC: 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(0xBFC02ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC02ED0: 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(0xBFC02ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02ED4: 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(0xBFC02ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02ED8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02EE0u; /* jalr link before delay slot */ psx_delay_BFC02ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02EDC: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0xBFC02EDCu); #endif if (psx_delay_BFC02ED8) { psx_delay_BFC02ED8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02EE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02EE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02EE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC02EE0: 3C140000 lui $s4, 0x0 */ cpu->gpr[20] = 0x00000000u; PGXP_ALU(0x3C140000u, cpu->gpr[20], 0u, 0u); #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, 0x100004u); #endif /* 0xBFC02EE4: AE824BE0 sw $v0, 19424($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 19424; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02EE4u); return; } g_debug_last_store_pc = 0xBFC02EE4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE824BE0u, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC02EE8: 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(0xBFC02EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02EEC: 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(0xBFC02EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC02EF0: 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(0xBFC02EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02EF4: 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(0xBFC02EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02EF8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F00u; /* jalr link before delay slot */ psx_delay_BFC02EF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02EFC: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0xBFC02EFCu); #endif if (psx_delay_BFC02EF8) { psx_delay_BFC02EF8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC02F00: 3C130000 lui $s3, 0x0 */ cpu->gpr[19] = 0x00000000u; PGXP_ALU(0x3C130000u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC02F04: AE624BDC sw $v0, 19420($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19420; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F04u); return; } g_debug_last_store_pc = 0xBFC02F04u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE624BDCu, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC02F08: 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(0xBFC02F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02F0C: 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(0xBFC02F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC02F10: 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(0xBFC02F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02F14: 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(0xBFC02F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02F18: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F20u; /* jalr link before delay slot */ psx_delay_BFC02F18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02F1C: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0xBFC02F1Cu); #endif if (psx_delay_BFC02F18) { psx_delay_BFC02F18 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x40000u); #endif /* 0xBFC02F20: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #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, 0x40004u); #endif /* 0xBFC02F24: AE424BD8 sw $v0, 19416($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19416)); 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[2]); } PGXP_STORE(0xAE424BD8u, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC02F28: 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(0xBFC02F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC02F2C: 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(0xBFC02F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC02F30: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #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, 0x41u); #endif /* 0xBFC02F34: 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(0xBFC02F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02F38: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F40u; /* jalr link before delay slot */ psx_delay_BFC02F38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC02F3C: 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(0xBFC02F3Cu); #endif if (psx_delay_BFC02F38) { psx_delay_BFC02F38 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC02F40: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F44u); #endif /* 0xBFC02F44: 8EA44BE4 lw $a0, 19428($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19428; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19428)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F44u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200000u); } PGXP_LOAD(0x8EA44BE4u, _pgxa, cpu->gpr[4]); } #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, 0x20004u); #endif /* 0xBFC02F48: AE224BD4 sw $v0, 19412($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19412; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F48u); return; } g_debug_last_store_pc = 0xBFC02F48u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE224BD4u, _pgxa, cpu->gpr[2]); } #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, 0x80010000u); #endif /* 0xBFC02F4C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F54u; /* jalr link before delay slot */ psx_delay_BFC02F4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02F50: 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(0xBFC02F50u); #endif if (psx_delay_BFC02F4C) { psx_delay_BFC02F4C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F54u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F54u); #endif /* 0xBFC02F54: 8E844BE0 lw $a0, 19424($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 19424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F54u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } PGXP_LOAD(0x8E844BE0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02F58: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F60u; /* jalr link before delay slot */ psx_delay_BFC02F58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02F5C: 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(0xBFC02F5Cu); #endif if (psx_delay_BFC02F58) { psx_delay_BFC02F58 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F60u); #endif /* 0xBFC02F60: 8E644BDC lw $a0, 19420($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19420; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19420)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80000u); } PGXP_LOAD(0x8E644BDCu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02F64: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F6Cu; /* jalr link before delay slot */ psx_delay_BFC02F64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02F68: 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(0xBFC02F68u); #endif if (psx_delay_BFC02F64) { psx_delay_BFC02F64 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F6Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F6Cu); #endif /* 0xBFC02F6C: 8E444BD8 lw $a0, 19416($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } PGXP_LOAD(0x8E444BD8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC02F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC02F70: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F78u; /* jalr link before delay slot */ psx_delay_BFC02F70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02F74: 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(0xBFC02F74u); #endif if (psx_delay_BFC02F70) { psx_delay_BFC02F70 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F78u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC02F78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02F78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F78u); #endif /* 0xBFC02F78: 8E244BD4 lw $a0, 19412($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02F78u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } PGXP_LOAD(0x8E244BD4u, _pgxa, cpu->gpr[4]); } #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, 0x80010000u); #endif /* 0xBFC02F7C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02F84u; /* jalr 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, 0x201u); #endif /* 0xBFC02F80: 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(0xBFC02F80u); #endif if (psx_delay_BFC02F7C) { psx_delay_BFC02F7C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02F84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x11u); #endif /* 0xBFC02F84: 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(0xBFC02F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC02F88: 0000000C syscall */ cpu->pc = 0xBFC02F88u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC02F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F8Cu); #endif /* 0xBFC02F8C: 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, 0xBFC02F8Cu); 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(0xBFC02F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02F90: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC02F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F94u); #endif /* 0xBFC02F94: 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, 0xBFC02F94u); 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(0xBFC02F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F98u); #endif /* 0xBFC02F98: 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, 0xBFC02F98u); 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(0xBFC02F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02F9Cu); #endif /* 0xBFC02F9C: 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, 0xBFC02F9Cu); 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(0xBFC02F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FA0u); #endif /* 0xBFC02FA0: 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, 0xBFC02FA0u); 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(0xBFC02FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FA4u); #endif /* 0xBFC02FA4: 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, 0xBFC02FA4u); 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(0xBFC02FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FA8u); #endif /* 0xBFC02FA8: 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, 0xBFC02FA8u); 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(0xBFC02FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02FAC: A0405E38 sb $zero, 24120($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24120; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC02FACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (24120)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0405E38u, _pgxa, cpu->gpr[0]); } #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, 0x80000001u); #endif /* 0xBFC02FB0: 03E00008 jr $ra */ psx_delay_BFC02FB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02FB4: 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(0xBFC02FB4u); #endif if (psx_delay_BFC02FB0) { psx_delay_BFC02FB0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC02FB8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC02FB8u); int psx_delay_BFC02FC4 = 0; int psx_delay_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_BFC02FF8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC02FCCu: goto label_BFC02FCC; case 0xBFC02FD0u: goto label_BFC02FD0; case 0xBFC02FD8u: goto label_BFC02FD8; case 0xBFC02FE0u: goto label_BFC02FE0; case 0xBFC02FE4u: goto label_BFC02FE4; case 0xBFC02FF0u: goto label_BFC02FF0; default: break; } } label_BFC02FB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02FB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02FB8: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20010000u); #endif /* 0xBFC02FBC: 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, 0xBFC02FBCu); return; } g_debug_last_store_pc = 0xBFC02FBCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC02FC0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02FC0u); return; } g_debug_last_store_pc = 0xBFC02FC0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC02FC4: 0FF00B9C jal 0xBFC02E70 */ cpu->gpr[31] = 0xBFC02FCCu; /* jal link before delay slot */ psx_delay_BFC02FC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC02FC8: 241000A0 addiu $s0, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241000A0u, cpu->gpr[16], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC02FC8u); #endif if (psx_delay_BFC02FC4) { psx_delay_BFC02FC4 = 0; cpu->gpr[31] = 0xBFC02FCCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02E70u); cpu->pc = 0xBFC02E70u; return; } label_BFC02FCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02FCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC02FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC02FCC: 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(0xBFC02FCCu); #endif 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, 0x80010000u); #endif /* 0xBFC02FD0: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC02FD8u; /* jalr link before delay slot */ psx_delay_BFC02FD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC02FD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC02FD4u); #endif if (psx_delay_BFC02FD0) { psx_delay_BFC02FD0 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC02FD8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x5u); #endif /* 0xBFC02FD8: 1040FFFD beq $v0, $zero, 0xBFC02FD0 */ uint32_t psx_brA_BFC02FD8 = cpu->gpr[2]; 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, 0x201u); #endif /* 0xBFC02FDC: 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(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, 0xBFC02FD0u); goto label_BFC02FD0; } #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, 0x5u); #endif /* 0xBFC02FE0: 3402C34F ori $v0, $zero, 0xC34F */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0xC34Fu; PGXP_ALU(0x3402C34Fu, cpu->gpr[2], _pgx1, 0xC34Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC02FE0u); #endif label_BFC02FE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC02FE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC02FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC02FE4: 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(0xBFC02FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC02FE8: 1440FFFE bne $v0, $zero, 0xBFC02FE4 */ uint32_t psx_brA_BFC02FE8 = cpu->gpr[2]; 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, 0x1u); #endif /* 0xBFC02FEC: 00000000 nop */ /* nop */ #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, 0xBFC02FE4u); goto label_BFC02FE4; } #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 /* 0xBFC02FF0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC02FF0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC02FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FF4u); #endif /* 0xBFC02FF4: 8FB00010 lw $s0, 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, 0xBFC02FF4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC02FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC02FF8: 0BF00D01 j 0xBFC03404 */ psx_delay_BFC02FF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC02FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC02FFC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC02FFCu); #endif if (psx_delay_BFC02FF8) { psx_delay_BFC02FF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } } void OpenBIOS_func_1FC03000(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03000u); int psx_delay_BFC03020 = 0; int psx_delay_BFC03028 = 0; int psx_taken_BFC03028 = 0; int psx_delay_BFC03044 = 0; int psx_delay_BFC0304C = 0; int psx_taken_BFC0304C = 0; int psx_delay_BFC03068 = 0; int psx_delay_BFC03070 = 0; int psx_taken_BFC03070 = 0; int psx_delay_BFC03080 = 0; int psx_delay_BFC03088 = 0; int psx_taken_BFC03088 = 0; int psx_delay_BFC03094 = 0; int psx_delay_BFC0309C = 0; int psx_taken_BFC0309C = 0; int psx_delay_BFC030AC = 0; int psx_delay_BFC030B4 = 0; int psx_taken_BFC030B4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03020u: goto label_BFC03020; case 0xBFC03028u: goto label_BFC03028; case 0xBFC03030u: goto label_BFC03030; case 0xBFC03040u: goto label_BFC03040; case 0xBFC0304Cu: goto label_BFC0304C; case 0xBFC03054u: goto label_BFC03054; case 0xBFC03058u: goto label_BFC03058; case 0xBFC03070u: goto label_BFC03070; case 0xBFC03078u: goto label_BFC03078; case 0xBFC03088u: goto label_BFC03088; case 0xBFC03090u: goto label_BFC03090; case 0xBFC0309Cu: goto label_BFC0309C; case 0xBFC030A4u: goto label_BFC030A4; case 0xBFC030B4u: goto label_BFC030B4; default: break; } } label_BFC03000: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03000u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03000: 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(0xBFC03000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC03004: 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, 0xBFC03004u); return; } g_debug_last_store_pc = 0xBFC03004u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC03008: 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, 0xBFC03008u); return; } g_debug_last_store_pc = 0xBFC03008u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC0300C: 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, 0xBFC0300Cu); return; } g_debug_last_store_pc = 0xBFC0300Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0300Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC03010: 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, 0xBFC03010u); return; } g_debug_last_store_pc = 0xBFC03010u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC03010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03014: 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(0xBFC03014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03018: 241100A0 addiu $s1, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241100A0u, cpu->gpr[17], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0301Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0301C: 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(0xBFC0301Cu); #endif label_BFC03020: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03020u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03020: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03028u; /* jalr link before delay slot */ psx_delay_BFC03020 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03024: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03024u); #endif if (psx_delay_BFC03020) { psx_delay_BFC03020 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03028u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03028: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03028u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03028: 10400011 beq $v0, $zero, 0xBFC03070 */ uint32_t psx_brA_BFC03028 = cpu->gpr[2]; uint32_t psx_brB_BFC03028 = cpu->gpr[0]; psx_taken_BFC03028 = (psx_brA_BFC03028 == psx_brB_BFC03028); psx_delay_BFC03028 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0302Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0302C: 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(0xBFC0302Cu); #endif if (psx_delay_BFC03028) { psx_delay_BFC03028 = 0; if (psx_taken_BFC03028) { #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, 0xBFC03030u); } label_BFC03030: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03030u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC03030: 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(0xBFC03030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03034: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03038: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0303Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0303C: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0303Cu); #endif 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 /* 0xBFC03040: 8E244BE0 lw $a0, 19424($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03040u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } PGXP_LOAD(0x8E244BE0u, _pgxa, cpu->gpr[4]); } #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, 0x80010000u); #endif /* 0xBFC03044: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC0304Cu; /* jalr link before delay slot */ psx_delay_BFC03044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03048: 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(0xBFC03048u); #endif if (psx_delay_BFC03044) { psx_delay_BFC03044 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC0304Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0304C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0304Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0304Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0304Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0304C: 10400010 beq $v0, $zero, 0xBFC03090 */ uint32_t psx_brA_BFC0304C = cpu->gpr[2]; uint32_t psx_brB_BFC0304C = cpu->gpr[0]; psx_taken_BFC0304C = (psx_brA_BFC0304C == psx_brB_BFC0304C); psx_delay_BFC0304C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03050: 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(0xBFC03050u); #endif if (psx_delay_BFC0304C) { psx_delay_BFC0304C = 0; if (psx_taken_BFC0304C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03090u); goto label_BFC03090; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03054u); } label_BFC03054: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03054u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03054u); #endif /* 0xBFC03054: 93A20010 lbu $v0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (16)), 2, 0x20000000u); PGXP_LOAD(0x93A20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03054u); #endif label_BFC03058: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03058u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03058u); #endif /* 0xBFC03058: 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, 0xBFC03058u); 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(0xBFC03058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0305Cu); #endif /* 0xBFC0305C: 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, 0xBFC0305Cu); 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(0xBFC0305Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03060u); #endif /* 0xBFC03060: 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, 0xBFC03060u); 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(0xBFC03060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03064u); #endif /* 0xBFC03064: 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, 0xBFC03064u); 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(0xBFC03064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03068: 03E00008 jr $ra */ psx_delay_BFC03068 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0306Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0306C: 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(0xBFC0306Cu); #endif if (psx_delay_BFC03068) { psx_delay_BFC03068 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03070: 1600FFEB bne $s0, $zero, 0xBFC03020 */ uint32_t psx_brA_BFC03070 = cpu->gpr[16]; uint32_t psx_brB_BFC03070 = cpu->gpr[0]; psx_taken_BFC03070 = (psx_brA_BFC03070 != psx_brB_BFC03070); psx_delay_BFC03070 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03074: 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(0xBFC03074u); #endif if (psx_delay_BFC03070) { psx_delay_BFC03070 = 0; if (psx_taken_BFC03070) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03020u); goto label_BFC03020; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03078u); } label_BFC03078: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03078u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03078: 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(0xBFC03078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0307Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0307C: 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(0xBFC0307Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03080: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03088u; /* jalr link before delay slot */ psx_delay_BFC03080 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03084: 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(0xBFC03084u); #endif if (psx_delay_BFC03080) { psx_delay_BFC03080 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03088u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03088: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03088u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03088: 1000FFF3 beq $zero, $zero, 0xBFC03058 */ uint32_t psx_brA_BFC03088 = cpu->gpr[0]; uint32_t psx_brB_BFC03088 = cpu->gpr[0]; psx_taken_BFC03088 = (psx_brA_BFC03088 == psx_brB_BFC03088); psx_delay_BFC03088 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0308Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0308C: 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(0xBFC0308Cu); #endif if (psx_delay_BFC03088) { psx_delay_BFC03088 = 0; if (psx_taken_BFC03088) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03058u); goto label_BFC03058; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03090u); } label_BFC03090: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03090u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03090u); #endif /* 0xBFC03090: 8E444BD4 lw $a0, 19412($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03090u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } PGXP_LOAD(0x8E444BD4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC03094: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC0309Cu; /* jalr link before delay slot */ psx_delay_BFC03094 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03098: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03098u); #endif if (psx_delay_BFC03094) { psx_delay_BFC03094 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC0309Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0309C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0309Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0309C: 1040FFE8 beq $v0, $zero, 0xBFC03040 */ uint32_t psx_brA_BFC0309C = cpu->gpr[2]; uint32_t psx_brB_BFC0309C = cpu->gpr[0]; psx_taken_BFC0309C = (psx_brA_BFC0309C == psx_brB_BFC0309C); psx_delay_BFC0309C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC030A0: 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(0xBFC030A0u); #endif if (psx_delay_BFC0309C) { psx_delay_BFC0309C = 0; if (psx_taken_BFC0309C) { #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, 0xBFC030A4u); } label_BFC030A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC030A4: 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(0xBFC030A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC030A8: 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(0xBFC030A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC030AC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC030B4u; /* jalr link before delay slot */ psx_delay_BFC030AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC030B0: 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(0xBFC030B0u); #endif if (psx_delay_BFC030AC) { psx_delay_BFC030AC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC030B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC030B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC030B4: 1000FFE8 beq $zero, $zero, 0xBFC03058 */ uint32_t psx_brA_BFC030B4 = cpu->gpr[0]; uint32_t psx_brB_BFC030B4 = cpu->gpr[0]; psx_taken_BFC030B4 = (psx_brA_BFC030B4 == psx_brB_BFC030B4); psx_delay_BFC030B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC030B8: 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(0xBFC030B8u); #endif if (psx_delay_BFC030B4) { psx_delay_BFC030B4 = 0; if (psx_taken_BFC030B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03058u); goto label_BFC03058; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030BCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030BCu); cpu->pc = 0xBFC030BCu; return; /* fallthrough */ } void OpenBIOS_func_1FC030BC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC030BCu); int psx_delay_BFC030C8 = 0; label_BFC030BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC030BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC030BC: 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(0xBFC030BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC030C0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x2000001u); #endif /* 0xBFC030C4: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC030C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC030C8: 03200008 jr $t9 */ psx_delay_BFC030C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC030CC: 2484A020 addiu $a0, $a0, -24544 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24544)); PGXP_ALU(0x2484A020u, cpu->gpr[4], _pgx1, 0xFFFFA020u); } #ifdef PSX_COSIM cosim_instr(0xBFC030CCu); #endif if (psx_delay_BFC030C8) { psx_delay_BFC030C8 = 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 OpenBIOS_func_1FC030D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC030D0u); int psx_delay_BFC030D8 = 0; int psx_taken_BFC030D8 = 0; int psx_delay_BFC030E8 = 0; int psx_taken_BFC030E8 = 0; int psx_delay_BFC030F0 = 0; int psx_delay_BFC030F8 = 0; int psx_taken_BFC030F8 = 0; int psx_delay_BFC03104 = 0; int psx_taken_BFC03104 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC030E0u: goto label_BFC030E0; case 0xBFC030F0u: goto label_BFC030F0; case 0xBFC030F8u: goto label_BFC030F8; case 0xBFC03100u: goto label_BFC03100; default: break; } } label_BFC030D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030D0u); #endif /* 0xBFC030D0: 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(0xBFC030D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC030D4: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC030D8: 14400007 bne $v0, $zero, 0xBFC030F8 */ uint32_t psx_brA_BFC030D8 = cpu->gpr[2]; uint32_t psx_brB_BFC030D8 = cpu->gpr[0]; psx_taken_BFC030D8 = (psx_brA_BFC030D8 != psx_brB_BFC030D8); psx_delay_BFC030D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC030DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC030DCu); #endif if (psx_delay_BFC030D8) { psx_delay_BFC030D8 = 0; if (psx_taken_BFC030D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030F8u); goto label_BFC030F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030E0u); } label_BFC030E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030E0u); #endif /* 0xBFC030E0: 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(0xBFC030E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC030E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC030E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC030E8: 14400005 bne $v0, $zero, 0xBFC03100 */ uint32_t psx_brA_BFC030E8 = cpu->gpr[2]; uint32_t psx_brB_BFC030E8 = cpu->gpr[0]; psx_taken_BFC030E8 = (psx_brA_BFC030E8 != psx_brB_BFC030E8); psx_delay_BFC030E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC030EC: 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(0xBFC030ECu); #endif if (psx_delay_BFC030E8) { psx_delay_BFC030E8 = 0; if (psx_taken_BFC030E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03100u); goto label_BFC03100; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030F0u); } label_BFC030F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC030F0: 03E00008 jr $ra */ psx_delay_BFC030F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC030F4: A0800000 sb $zero, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC030F4u; 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(0xBFC030F4u); #endif if (psx_delay_BFC030F0) { psx_delay_BFC030F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC030F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC030F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC030F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC030F8: 1000FFF5 beq $zero, $zero, 0xBFC030D0 */ uint32_t psx_brA_BFC030F8 = cpu->gpr[0]; uint32_t psx_brB_BFC030F8 = cpu->gpr[0]; psx_taken_BFC030F8 = (psx_brA_BFC030F8 == psx_brB_BFC030F8); psx_delay_BFC030F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC030FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC030FC: 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(0xBFC030FCu); #endif if (psx_delay_BFC030F8) { psx_delay_BFC030F8 = 0; if (psx_taken_BFC030F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030D0u); goto label_BFC030D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03100u); } label_BFC03100: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03100u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03100: 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(0xBFC03100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03104: 1000FFF6 beq $zero, $zero, 0xBFC030E0 */ uint32_t psx_brA_BFC03104 = cpu->gpr[0]; uint32_t psx_brB_BFC03104 = cpu->gpr[0]; psx_taken_BFC03104 = (psx_brA_BFC03104 == psx_brB_BFC03104); psx_delay_BFC03104 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03108: A082FFFF sb $v0, -1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03108u; 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(0xBFC03108u); #endif if (psx_delay_BFC03104) { psx_delay_BFC03104 = 0; if (psx_taken_BFC03104) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030E0u); goto label_BFC030E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0310Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0310Cu); cpu->pc = 0xBFC0310Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0310C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0310Cu); int psx_delay_BFC03148 = 0; int psx_taken_BFC03148 = 0; int psx_delay_BFC03160 = 0; int psx_taken_BFC03160 = 0; int psx_delay_BFC03198 = 0; int psx_taken_BFC03198 = 0; int psx_delay_BFC031A0 = 0; int psx_taken_BFC031A0 = 0; int psx_delay_BFC031AC = 0; int psx_taken_BFC031AC = 0; int psx_delay_BFC031CC = 0; int psx_taken_BFC031CC = 0; int psx_delay_BFC031DC = 0; int psx_delay_BFC031E8 = 0; int psx_delay_BFC031F0 = 0; int psx_taken_BFC031F0 = 0; int psx_delay_BFC031FC = 0; int psx_taken_BFC031FC = 0; int psx_delay_BFC03210 = 0; int psx_taken_BFC03210 = 0; int psx_delay_BFC03240 = 0; int psx_delay_BFC0324C = 0; int psx_taken_BFC0324C = 0; int psx_delay_BFC0326C = 0; int psx_taken_BFC0326C = 0; int psx_delay_BFC03278 = 0; int psx_delay_BFC03290 = 0; int psx_delay_BFC032AC = 0; int psx_delay_BFC032CC = 0; int psx_taken_BFC032CC = 0; int psx_delay_BFC032D8 = 0; int psx_taken_BFC032D8 = 0; int psx_delay_BFC03310 = 0; int psx_taken_BFC03310 = 0; int psx_delay_BFC03328 = 0; int psx_taken_BFC03328 = 0; int psx_delay_BFC03330 = 0; int psx_taken_BFC03330 = 0; int psx_delay_BFC03338 = 0; int psx_taken_BFC03338 = 0; int psx_delay_BFC03344 = 0; int psx_taken_BFC03344 = 0; int psx_delay_BFC03358 = 0; int psx_taken_BFC03358 = 0; int psx_delay_BFC03368 = 0; int psx_taken_BFC03368 = 0; int psx_delay_BFC03384 = 0; int psx_taken_BFC03384 = 0; int psx_delay_BFC03390 = 0; int psx_taken_BFC03390 = 0; int psx_delay_BFC0339C = 0; int psx_taken_BFC0339C = 0; int psx_delay_BFC033D4 = 0; int psx_delay_BFC033E0 = 0; int psx_taken_BFC033E0 = 0; int psx_delay_BFC033E8 = 0; int psx_taken_BFC033E8 = 0; int psx_delay_BFC033F0 = 0; int psx_taken_BFC033F0 = 0; int psx_delay_BFC033FC = 0; int psx_taken_BFC033FC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03150u: goto label_BFC03150; case 0xBFC03154u: goto label_BFC03154; case 0xBFC03168u: goto label_BFC03168; case 0xBFC0316Cu: goto label_BFC0316C; case 0xBFC03188u: goto label_BFC03188; case 0xBFC03190u: goto label_BFC03190; case 0xBFC031A0u: goto label_BFC031A0; case 0xBFC031A8u: goto label_BFC031A8; case 0xBFC031B4u: goto label_BFC031B4; case 0xBFC031C0u: goto label_BFC031C0; case 0xBFC031D4u: goto label_BFC031D4; case 0xBFC031E4u: goto label_BFC031E4; case 0xBFC031F0u: goto label_BFC031F0; case 0xBFC031F8u: goto label_BFC031F8; case 0xBFC031FCu: goto label_BFC031FC; case 0xBFC03204u: goto label_BFC03204; case 0xBFC03218u: goto label_BFC03218; case 0xBFC03248u: goto label_BFC03248; case 0xBFC03254u: goto label_BFC03254; case 0xBFC03264u: goto label_BFC03264; case 0xBFC03274u: goto label_BFC03274; case 0xBFC03280u: goto label_BFC03280; case 0xBFC03298u: goto label_BFC03298; case 0xBFC032B4u: goto label_BFC032B4; case 0xBFC032D4u: goto label_BFC032D4; case 0xBFC032E0u: goto label_BFC032E0; case 0xBFC032ECu: goto label_BFC032EC; case 0xBFC0330Cu: goto label_BFC0330C; case 0xBFC03318u: goto label_BFC03318; case 0xBFC03320u: goto label_BFC03320; 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 0xBFC03360u: goto label_BFC03360; case 0xBFC03370u: goto label_BFC03370; case 0xBFC03378u: goto label_BFC03378; case 0xBFC0338Cu: goto label_BFC0338C; case 0xBFC03398u: goto label_BFC03398; case 0xBFC033A4u: goto label_BFC033A4; case 0xBFC033A8u: goto label_BFC033A8; case 0xBFC033DCu: goto label_BFC033DC; case 0xBFC033E8u: goto label_BFC033E8; case 0xBFC033F0u: goto label_BFC033F0; case 0xBFC033F8u: goto label_BFC033F8; default: break; } } label_BFC0310C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0310Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0310Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0310Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0310C: 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(0xBFC0310Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC03110: AFB1004C sw $s1, 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, 0xBFC03110u); return; } g_debug_last_store_pc = 0xBFC03110u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1004Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC03110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC03114: AFBF006C sw $ra, 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, 0xBFC03114u); return; } g_debug_last_store_pc = 0xBFC03114u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF006Cu, _pgxa, cpu->gpr[31]); } #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, 0x60000000u); #endif /* 0xBFC03118: AFBE0068 sw $fp, 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, 0xBFC03118u); return; } g_debug_last_store_pc = 0xBFC03118u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0068u, _pgxa, cpu->gpr[30]); } #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, 0x20800000u); #endif /* 0xBFC0311C: AFB70064 sw $s7, 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, 0xBFC0311Cu); return; } g_debug_last_store_pc = 0xBFC0311Cu; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70064u, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC03120: AFB60060 sw $s6, 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, 0xBFC03120u); return; } g_debug_last_store_pc = 0xBFC03120u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60060u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC03120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC03124: AFB5005C sw $s5, 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, 0xBFC03124u); return; } g_debug_last_store_pc = 0xBFC03124u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5005Cu, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC03128: AFB40058 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03128u); return; } g_debug_last_store_pc = 0xBFC03128u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40058u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC0312C: AFB30054 sw $s3, 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, 0xBFC0312Cu); return; } g_debug_last_store_pc = 0xBFC0312Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30054u, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC03130: AFB20050 sw $s2, 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, 0xBFC03130u); return; } g_debug_last_store_pc = 0xBFC03130u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20050u, _pgxa, cpu->gpr[18]); } #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, 0x20010000u); #endif /* 0xBFC03134: 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, 0xBFC03134u); return; } g_debug_last_store_pc = 0xBFC03134u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00048u, _pgxa, cpu->gpr[16]); } #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, 0x20011u); #endif /* 0xBFC03138: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0313Cu); #endif /* 0xBFC0313C: 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(0xBFC0313Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03140: 2402005C addiu $v0, $zero, 92 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); PGXP_ALU(0x2402005Cu, cpu->gpr[2], _pgx1, 0x0000005Cu); } #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, 0x61u); #endif /* 0xBFC03144: 00A03025 or $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(0x00A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03148: 1482001A bne $a0, $v0, 0xBFC031B4 */ uint32_t psx_brA_BFC03148 = cpu->gpr[4]; uint32_t psx_brB_BFC03148 = cpu->gpr[2]; psx_taken_BFC03148 = (psx_brA_BFC03148 != psx_brB_BFC03148); psx_delay_BFC03148 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0314Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0314C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0314Cu); #endif if (psx_delay_BFC03148) { psx_delay_BFC03148 = 0; if (psx_taken_BFC03148) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031B4u); goto label_BFC031B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03150u); } label_BFC03150: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03150u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03150: 24625208 addiu $v0, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24625208u, cpu->gpr[2], _pgx1, 0x00005208u); } #ifdef PSX_COSIM cosim_instr(0xBFC03150u); #endif label_BFC03154: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03154u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03154u); #endif /* 0xBFC03154: 80C40000 lb $a0, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 4, 0x40u); PGXP_LOAD(0x80C40000u, _pgxa, cpu->gpr[4]); } #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, 0x40u); #endif /* 0xBFC03158: 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(0xBFC03158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0315Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0315C: 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(0xBFC0315Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03160: 1480FFFC bne $a0, $zero, 0xBFC03154 */ uint32_t psx_brA_BFC03160 = cpu->gpr[4]; uint32_t psx_brB_BFC03160 = cpu->gpr[0]; psx_taken_BFC03160 = (psx_brA_BFC03160 != psx_brB_BFC03160); psx_delay_BFC03160 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03164: A044FFFF sb $a0, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03164u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA044FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03164u); #endif if (psx_delay_BFC03160) { psx_delay_BFC03160 = 0; if (psx_taken_BFC03160) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03154u); goto label_BFC03154; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03168u); } label_BFC03168: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03168u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03168: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03168u); #endif label_BFC0316C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0316Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0316Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0316Cu); #endif /* 0xBFC0316C: 8C495E30 lw $t1, 24112($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0316Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x4u); } PGXP_LOAD(0x8C495E30u, _pgxa, cpu->gpr[9]); } #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, 0x20000001u); #endif /* 0xBFC03170: A3A00010 sb $zero, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03170u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA3A00010u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC03170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03174: 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(0xBFC03174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC03178: 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(0xBFC03178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0317Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0317C: 24635208 addiu $v1, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24635208u, cpu->gpr[3], _pgx1, 0x00005208u); } #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, 0x401u); #endif /* 0xBFC03180: 240A005C addiu $t2, $zero, 92 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (92)); PGXP_ALU(0x240A005Cu, cpu->gpr[10], _pgx1, 0x0000005Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC03180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC03184: 3C0B0000 lui $t3, 0x0 */ cpu->gpr[11] = 0x00000000u; PGXP_ALU(0x3C0B0000u, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03184u); #endif label_BFC03188: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03188u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC03188: 27A20010 addiu $v0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A20010u, cpu->gpr[2], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0318Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100005u); #endif /* 0xBFC0318C: 0040A025 or $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(0x0040A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0318Cu); #endif 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 /* 0xBFC03190: 80640001 lb $a0, 1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 1; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (1)), 4, 0x8u); PGXP_LOAD(0x80640001u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03190u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x410u); #endif /* 0xBFC03198: 108A0017 beq $a0, $t2, 0xBFC031F8 */ uint32_t psx_brA_BFC03198 = cpu->gpr[4]; uint32_t psx_brB_BFC03198 = cpu->gpr[10]; 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, 0x8u); #endif /* 0xBFC0319C: 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(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, 0xBFC031F8u); goto label_BFC031F8; } #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, 0x11u); #endif /* 0xBFC031A0: 10800016 beq $a0, $zero, 0xBFC031FC */ uint32_t psx_brA_BFC031A0 = cpu->gpr[4]; uint32_t psx_brB_BFC031A0 = cpu->gpr[0]; psx_taken_BFC031A0 = (psx_brA_BFC031A0 == psx_brB_BFC031A0); psx_delay_BFC031A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC031A4: 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(0xBFC031A4u); #endif if (psx_delay_BFC031A0) { psx_delay_BFC031A0 = 0; if (psx_taken_BFC031A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031FCu); goto label_BFC031FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031A8u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC031A8: 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(0xBFC031A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC031AC: 1000FFF8 beq $zero, $zero, 0xBFC03190 */ uint32_t psx_brA_BFC031AC = cpu->gpr[0]; uint32_t psx_brB_BFC031AC = cpu->gpr[0]; psx_taken_BFC031AC = (psx_brA_BFC031AC == psx_brB_BFC031AC); psx_delay_BFC031AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC031B0: A044FFFF sb $a0, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC031B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA044FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC031B0u); #endif if (psx_delay_BFC031AC) { psx_delay_BFC031AC = 0; if (psx_taken_BFC031AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03190u); goto label_BFC03190; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031B4u); } label_BFC031B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC031B4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC031B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC031B8: 24425E38 addiu $v0, $v0, 24120 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (24120)); PGXP_ALU(0x24425E38u, cpu->gpr[2], _pgx1, 0x00005E38u); } #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, 0x18u); #endif /* 0xBFC031BC: 24645208 addiu $a0, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24645208u, cpu->gpr[4], _pgx1, 0x00005208u); } #ifdef PSX_COSIM cosim_instr(0xBFC031BCu); #endif label_BFC031C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031C0u); #endif /* 0xBFC031C0: 80450000 lb $a1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 5, 0x4u); PGXP_LOAD(0x80450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC031C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC031C4: 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(0xBFC031C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC031C8: 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(0xBFC031C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC031CC: 14A0FFFC bne $a1, $zero, 0xBFC031C0 */ uint32_t psx_brA_BFC031CC = cpu->gpr[5]; uint32_t psx_brB_BFC031CC = cpu->gpr[0]; psx_taken_BFC031CC = (psx_brA_BFC031CC != psx_brB_BFC031CC); psx_delay_BFC031CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC031D0: A085FFFF sb $a1, -1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC031D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (-1)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA085FFFFu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC031D0u); #endif if (psx_delay_BFC031CC) { psx_delay_BFC031CC = 0; if (psx_taken_BFC031CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031C0u); goto label_BFC031C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031D4u); } label_BFC031D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC031D4: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x18u); #endif /* 0xBFC031D8: 24645208 addiu $a0, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24645208u, cpu->gpr[4], _pgx1, 0x00005208u); } #ifdef PSX_COSIM cosim_instr(0xBFC031D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC031DC: 0FF00C34 jal 0xBFC030D0 */ cpu->gpr[31] = 0xBFC031E4u; /* jal link before delay slot */ psx_delay_BFC031DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC031E0: 24A596F4 addiu $a1, $a1, -26892 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26892)); PGXP_ALU(0x24A596F4u, cpu->gpr[5], _pgx1, 0xFFFF96F4u); } #ifdef PSX_COSIM cosim_instr(0xBFC031E0u); #endif if (psx_delay_BFC031DC) { psx_delay_BFC031DC = 0; cpu->gpr[31] = 0xBFC031E4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030D0u); cpu->pc = 0xBFC030D0u; return; } label_BFC031E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC031E4: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC031E8: 0FF00C34 jal 0xBFC030D0 */ cpu->gpr[31] = 0xBFC031F0u; /* jal link before delay slot */ psx_delay_BFC031E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC031EC: 24645208 addiu $a0, $v1, 21000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (21000)); PGXP_ALU(0x24645208u, cpu->gpr[4], _pgx1, 0x00005208u); } #ifdef PSX_COSIM cosim_instr(0xBFC031ECu); #endif if (psx_delay_BFC031E8) { psx_delay_BFC031E8 = 0; cpu->gpr[31] = 0xBFC031F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030D0u); cpu->pc = 0xBFC030D0u; return; } label_BFC031F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC031F0: 1000FFDE beq $zero, $zero, 0xBFC0316C */ uint32_t psx_brA_BFC031F0 = cpu->gpr[0]; uint32_t psx_brB_BFC031F0 = cpu->gpr[0]; psx_taken_BFC031F0 = (psx_brA_BFC031F0 == psx_brB_BFC031F0); psx_delay_BFC031F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC031F4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC031F4u); #endif if (psx_delay_BFC031F0) { psx_delay_BFC031F0 = 0; if (psx_taken_BFC031F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0316Cu); goto label_BFC0316C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC031F8u); } label_BFC031F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC031F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC031F8: 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(0xBFC031F8u); #endif label_BFC031FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC031FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC031FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC031FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC031FC: 16600077 bne $s3, $zero, 0xBFC033DC */ uint32_t psx_brA_BFC031FC = cpu->gpr[19]; uint32_t psx_brB_BFC031FC = cpu->gpr[0]; psx_taken_BFC031FC = (psx_brA_BFC031FC != psx_brB_BFC031FC); psx_delay_BFC031FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03200: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03200u; 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(0xBFC03200u); #endif if (psx_delay_BFC031FC) { psx_delay_BFC031FC = 0; if (psx_taken_BFC031FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC033DCu); goto label_BFC033DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03204u); } label_BFC03204: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03204u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC03204: 3C170000 lui $s7, 0x0 */ cpu->gpr[23] = 0x00000000u; PGXP_ALU(0x3C170000u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03208u); #endif /* 0xBFC03208: 8EE35670 lw $v1, 22128($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 22128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (22128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03208u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800000u); } PGXP_LOAD(0x8EE35670u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0320Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0320C: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0320Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400008u); #endif /* 0xBFC03210: 12C30036 beq $s6, $v1, 0xBFC032EC */ uint32_t psx_brA_BFC03210 = cpu->gpr[22]; uint32_t psx_brB_BFC03210 = cpu->gpr[3]; psx_taken_BFC03210 = (psx_brA_BFC03210 == psx_brB_BFC03210); psx_delay_BFC03210 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC03214: 265252AC addiu $s2, $s2, 21164 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (21164)); PGXP_ALU(0x265252ACu, cpu->gpr[18], _pgx1, 0x000052ACu); } #ifdef PSX_COSIM cosim_instr(0xBFC03214u); #endif if (psx_delay_BFC03210) { psx_delay_BFC03210 = 0; if (psx_taken_BFC03210) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC032ECu); goto label_BFC032EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03218u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400008u); #endif /* 0xBFC03218: 26C3FFFF addiu $v1, $s6, -1 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[22] + (-1)); PGXP_ALU(0x26C3FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } #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, 0x5u); #endif /* 0xBFC0321C: 2402002C addiu $v0, $zero, 44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); PGXP_ALU(0x2402002Cu, cpu->gpr[2], _pgx1, 0x0000002Cu); } #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, 0xCu); #endif /* 0xBFC03220: 00620018 mult $v1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00620018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC03220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03224: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03228: 24635674 addiu $v1, $v1, 22132 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (22132)); PGXP_ALU(0x24635674u, cpu->gpr[3], _pgx1, 0x00005674u); } #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, 0x10000u); #endif /* 0xBFC0322C: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #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, 0x10040u); #endif /* 0xBFC03230: 26068598 addiu $a2, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26068598u, cpu->gpr[6], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC03230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03234: 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(0xBFC03234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03238: 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(0xBFC03238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0323Cu); #endif /* 0xBFC0323C: 8C450008 lw $a1, 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, 0xBFC0323Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450008u, _pgxa, cpu->gpr[5]); } #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, 0x80000000u); #endif /* 0xBFC03240: 0FF00E9E jal 0xBFC03A78 */ cpu->gpr[31] = 0xBFC03248u; /* jal link before delay slot */ psx_delay_BFC03240 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03244: 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(0xBFC03244u); #endif if (psx_delay_BFC03240) { psx_delay_BFC03240 = 0; cpu->gpr[31] = 0xBFC03248u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A78u); cpu->pc = 0xBFC03A78u; return; } label_BFC03248: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03248u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03248: 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(0xBFC03248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0324Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0324C: 14430027 bne $v0, $v1, 0xBFC032EC */ uint32_t psx_brA_BFC0324C = cpu->gpr[2]; uint32_t psx_brB_BFC0324C = cpu->gpr[3]; psx_taken_BFC0324C = (psx_brA_BFC0324C != psx_brB_BFC0324C); psx_delay_BFC0324C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03250: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03250u); #endif if (psx_delay_BFC0324C) { psx_delay_BFC0324C = 0; if (psx_taken_BFC0324C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC032ECu); goto label_BFC032EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03254u); } label_BFC03254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03254u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC03254: 3C1E0001 lui $fp, 0x1 */ cpu->gpr[30] = 0x00010000u; PGXP_ALU(0x3C1E0001u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x240001u); #endif /* 0xBFC03258: 0240A825 or $s5, $s2, $zero */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[18] | cpu->gpr[0]; PGXP_ALU(0x0240A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0325Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0325C: 26108598 addiu $s0, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26108598u, cpu->gpr[16], _pgx1, 0xFFFF8598u); } #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, 0x40000000u); #endif /* 0xBFC03260: 27DE8D98 addiu $fp, $fp, -29288 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (-29288)); PGXP_ALU(0x27DE8D98u, cpu->gpr[30], _pgx1, 0xFFFF8D98u); } #ifdef PSX_COSIM cosim_instr(0xBFC03260u); #endif label_BFC03264: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03264u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03264u); #endif /* 0xBFC03264: 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(0xBFC03264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03268: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC0326C: 1040001C beq $v0, $zero, 0xBFC032E0 */ uint32_t psx_brA_BFC0326C = cpu->gpr[2]; uint32_t psx_brB_BFC0326C = cpu->gpr[0]; psx_taken_BFC0326C = (psx_brA_BFC0326C == psx_brB_BFC0326C); psx_delay_BFC0326C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC03270: 26050002 addiu $a1, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (2)); PGXP_ALU(0x26050002u, cpu->gpr[5], _pgx1, 0x00000002u); } #ifdef PSX_COSIM cosim_instr(0xBFC03270u); #endif if (psx_delay_BFC0326C) { psx_delay_BFC0326C = 0; if (psx_taken_BFC0326C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC032E0u); goto label_BFC032E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03274u); } label_BFC03274: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03274u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03274: 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(0xBFC03274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03278: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC03280u; /* jal link before delay slot */ psx_delay_BFC03278 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0327Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0327C: 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(0xBFC0327Cu); #endif if (psx_delay_BFC03278) { psx_delay_BFC03278 = 0; cpu->gpr[31] = 0xBFC03280u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC03280: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03280u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03280u); #endif /* 0xBFC03280: 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, 0xBFC03280u); 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(0xBFC03280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC03284: 2605000A addiu $a1, $s0, 10 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (10)); PGXP_ALU(0x2605000Au, cpu->gpr[5], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC03284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03288: 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(0xBFC03288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0328Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0328C: 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(0xBFC0328Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03290: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC03298u; /* jal link before delay slot */ psx_delay_BFC03290 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC03294: AEA20004 sw $v0, 4($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 4; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03294u); return; } g_debug_last_store_pc = 0xBFC03294u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEA20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03294u); #endif if (psx_delay_BFC03290) { psx_delay_BFC03290 = 0; cpu->gpr[31] = 0xBFC03298u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } 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 /* 0xBFC03298: 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, 0xBFC03298u); 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(0xBFC03298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0329Cu); #endif /* 0xBFC0329C: 92060020 lbu $a2, 32($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 32; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (32)), 6, 0x10000u); PGXP_LOAD(0x92060020u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC0329Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC032A0: 26050021 addiu $a1, $s0, 33 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (33)); PGXP_ALU(0x26050021u, cpu->gpr[5], _pgx1, 0x00000021u); } #ifdef PSX_COSIM cosim_instr(0xBFC032A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC032A4: AEA20008 sw $v0, 8($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 8; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC032A4u); return; } g_debug_last_store_pc = 0xBFC032A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEA20008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC032A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200010u); #endif /* 0xBFC032A8: 26A4000C addiu $a0, $s5, 12 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[21] + (12)); PGXP_ALU(0x26A4000Cu, cpu->gpr[4], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC032A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC032AC: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC032B4u; /* jal link before delay slot */ psx_delay_BFC032AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC032B0: 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, 0xBFC032B0u); return; } g_debug_last_store_pc = 0xBFC032B0u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60040u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC032B0u); #endif if (psx_delay_BFC032AC) { psx_delay_BFC032AC = 0; cpu->gpr[31] = 0xBFC032B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC032B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC032B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC032B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032B4u); #endif /* 0xBFC032B4: 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(0xBFC032B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032B8u); #endif /* 0xBFC032B8: 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, 0xBFC032B8u); 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(0xBFC032B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC032BC: 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(0xBFC032BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200040u); #endif /* 0xBFC032C0: 02A63021 addu $a2, $s5, $a2 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[21] + cpu->gpr[6]; PGXP_ALU(0x02A63021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC032C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010004u); #endif /* 0xBFC032C4: 021E102B sltu $v0, $s0, $fp */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[30] ? 1 : 0); PGXP_ALU(0x021E102Bu, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x41u); #endif /* 0xBFC032C8: A0C0000C sb $zero, 12($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC032C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (12)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0C0000Cu, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC032CC: 10400004 beq $v0, $zero, 0xBFC032E0 */ uint32_t psx_brA_BFC032CC = cpu->gpr[2]; uint32_t psx_brB_BFC032CC = cpu->gpr[0]; 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, 0x80000u); #endif /* 0xBFC032D0: 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(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, 0xBFC032E0u); goto label_BFC032E0; } #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, 0x9u); #endif /* 0xBFC032D4: 24030028 addiu $v1, $zero, 40 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); PGXP_ALU(0x24030028u, cpu->gpr[3], _pgx1, 0x00000028u); } #ifdef PSX_COSIM cosim_instr(0xBFC032D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80008u); #endif /* 0xBFC032D8: 1663FFE2 bne $s3, $v1, 0xBFC03264 */ uint32_t psx_brA_BFC032D8 = cpu->gpr[19]; uint32_t psx_brB_BFC032D8 = cpu->gpr[3]; 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, 0x200000u); #endif /* 0xBFC032DC: 26B50018 addiu $s5, $s5, 24 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (24)); PGXP_ALU(0x26B50018u, cpu->gpr[21], _pgx1, 0x00000018u); } #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, 0xBFC03264u); goto label_BFC03264; } #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, 0x4u); #endif /* 0xBFC032E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC032E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC032E4: AC53566C sw $s3, 22124($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 22124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (22124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC032E4u); return; } g_debug_last_store_pc = 0xBFC032E4u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAC53566Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC032E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC00000u); #endif /* 0xBFC032E8: AEF65670 sw $s6, 22128($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 22128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (22128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC032E8u); return; } g_debug_last_store_pc = 0xBFC032E8u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAEF65670u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC032E8u); #endif label_BFC032EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC032ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC032ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC032EC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC032ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032F0u); #endif /* 0xBFC032F0: 8C48566C lw $t0, 22124($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 22124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (22124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC032F0u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x4u); } PGXP_LOAD(0x8C48566Cu, _pgxa, cpu->gpr[8]); } #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, 0x20004u); #endif /* 0xBFC032F4: 00111040 sll $v0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[17] << 1u; PGXP_ALU(0x00111040u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC032F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC032F8: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC032F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC032FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC032FC: 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(0xBFC032FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC03300: 02421021 addu $v0, $s2, $v0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[18] + cpu->gpr[2]; PGXP_ALU(0x02421021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC03304: 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(0xBFC03304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03308: 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(0xBFC03308u); #endif label_BFC0330C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0330Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20108u); #endif /* 0xBFC0330C: 0228182A slt $v1, $s1, $t0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0228182Au, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03310: 10600024 beq $v1, $zero, 0xBFC033A4 */ uint32_t psx_brA_BFC03310 = cpu->gpr[3]; 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, 0xBFC033A4u); goto label_BFC033A4; } #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, 0x25u); #endif /* 0xBFC03318: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0331Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC0331C: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0331Cu); #endif 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 /* 0xBFC03320: 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(0xBFC03320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03324u); #endif /* 0xBFC03324: 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(0xBFC03324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC03328: 14E0002F bne $a3, $zero, 0xBFC033E8 */ uint32_t psx_brA_BFC03328 = cpu->gpr[7]; uint32_t psx_brB_BFC03328 = cpu->gpr[0]; psx_taken_BFC03328 = (psx_brA_BFC03328 != psx_brB_BFC03328); psx_delay_BFC03328 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0332Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0332C: 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(0xBFC0332Cu); #endif if (psx_delay_BFC03328) { psx_delay_BFC03328 = 0; if (psx_taken_BFC03328) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC033E8u); goto label_BFC033E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03330u); } 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, 0x9u); #endif /* 0xBFC03330: 10600003 beq $v1, $zero, 0xBFC03340 */ uint32_t psx_brA_BFC03330 = cpu->gpr[3]; 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, 0x20u); #endif /* 0xBFC03334: 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(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, 0x48u); #endif /* 0xBFC03338: 1466002F bne $v1, $a2, 0xBFC033F8 */ uint32_t psx_brA_BFC03338 = cpu->gpr[3]; uint32_t psx_brB_BFC03338 = cpu->gpr[6]; psx_taken_BFC03338 = (psx_brA_BFC03338 != psx_brB_BFC03338); psx_delay_BFC03338 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0333Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0333C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0333Cu); #endif if (psx_delay_BFC03338) { psx_delay_BFC03338 = 0; if (psx_taken_BFC03338) { #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, 0xBFC03340u); } 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, 0x4u); #endif /* 0xBFC03340: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03344: 10000018 beq $zero, $zero, 0xBFC033A8 */ uint32_t psx_brA_BFC03344 = cpu->gpr[0]; uint32_t psx_brB_BFC03344 = cpu->gpr[0]; psx_taken_BFC03344 = (psx_brA_BFC03344 == psx_brB_BFC03344); psx_delay_BFC03344 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC03348: AC5152A8 sw $s1, 21160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 21160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (21160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03348u); return; } g_debug_last_store_pc = 0xBFC03348u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAC5152A8u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC03348u); #endif if (psx_delay_BFC03344) { psx_delay_BFC03344 = 0; if (psx_taken_BFC03344) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC033A8u); goto label_BFC033A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0334Cu); } 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, 0x4u); #endif /* 0xBFC0334C: 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(0xBFC0334Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03350: 2484002C addiu $a0, $a0, 44 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (44)); PGXP_ALU(0x2484002Cu, cpu->gpr[4], _pgx1, 0x0000002Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC03350u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x244u); #endif /* 0xBFC03354: 0049302A slt $a2, $v0, $t1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[9] ? 1 : 0); PGXP_ALU(0x0049302Au, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03358: 10C00012 beq $a2, $zero, 0xBFC033A4 */ uint32_t psx_brA_BFC03358 = cpu->gpr[6]; uint32_t psx_brB_BFC03358 = cpu->gpr[0]; psx_taken_BFC03358 = (psx_brA_BFC03358 == psx_brB_BFC03358); psx_delay_BFC03358 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0335Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0335C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0335Cu); #endif if (psx_delay_BFC03358) { psx_delay_BFC03358 = 0; if (psx_taken_BFC03358) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC033A4u); goto label_BFC033A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03360u); } label_BFC03360: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03360u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03360u); #endif /* 0xBFC03360: 8C860004 lw $a2, 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, 0xBFC03360u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } PGXP_LOAD(0x8C860004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC03360u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400040u); #endif /* 0xBFC03368: 14D6FFF8 bne $a2, $s6, 0xBFC0334C */ uint32_t psx_brA_BFC03368 = cpu->gpr[6]; uint32_t psx_brB_BFC03368 = cpu->gpr[22]; psx_taken_BFC03368 = (psx_brA_BFC03368 != psx_brB_BFC03368); psx_delay_BFC03368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0336Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0336C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0336Cu); #endif if (psx_delay_BFC03368) { psx_delay_BFC03368 = 0; if (psx_taken_BFC03368) { #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, 0xBFC03370u); } label_BFC03370: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03370u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC03370: 2487000C addiu $a3, $a0, 12 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[4] + (12)); PGXP_ALU(0x2487000Cu, cpu->gpr[7], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC03370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100041u); #endif /* 0xBFC03374: 02803025 or $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(0x02803025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03374u); #endif label_BFC03378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03378u); #endif /* 0xBFC03378: 80E80000 lb $t0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 8, 0x80u); PGXP_LOAD(0x80E80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC03378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0337Cu); #endif /* 0xBFC0337C: 80CC0000 lb $t4, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[12] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 12, 0x40u); PGXP_LOAD(0x80CC0000u, _pgxa, cpu->gpr[12]); } #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, 0x1u); #endif /* 0xBFC03380: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1100u); #endif /* 0xBFC03384: 150CFFF1 bne $t0, $t4, 0xBFC0334C */ uint32_t psx_brA_BFC03384 = cpu->gpr[8]; uint32_t psx_brB_BFC03384 = cpu->gpr[12]; psx_taken_BFC03384 = (psx_brA_BFC03384 != psx_brB_BFC03384); psx_delay_BFC03384 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03388: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03388u); #endif if (psx_delay_BFC03384) { psx_delay_BFC03384 = 0; if (psx_taken_BFC03384) { #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, 0xBFC0338Cu); } label_BFC0338C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0338Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0338C: 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(0xBFC0338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC03390: 1500FFF9 bne $t0, $zero, 0xBFC03378 */ uint32_t psx_brA_BFC03390 = cpu->gpr[8]; uint32_t psx_brB_BFC03390 = cpu->gpr[0]; psx_taken_BFC03390 = (psx_brA_BFC03390 != psx_brB_BFC03390); psx_delay_BFC03390 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03394: 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(0xBFC03394u); #endif if (psx_delay_BFC03390) { psx_delay_BFC03390 = 0; if (psx_taken_BFC03390) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03378u); goto label_BFC03378; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03398u); } label_BFC03398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03398: 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(0xBFC03398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0339Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0339C: 14A0FF7A bne $a1, $zero, 0xBFC03188 */ uint32_t psx_brA_BFC0339C = cpu->gpr[5]; uint32_t psx_brB_BFC0339C = cpu->gpr[0]; psx_taken_BFC0339C = (psx_brA_BFC0339C != psx_brB_BFC0339C); psx_delay_BFC0339C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC033A0: 24560001 addiu $s6, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); PGXP_ALU(0x24560001u, cpu->gpr[22], _pgx1, 0x00000001u); } #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, 0xBFC03188u); goto label_BFC03188; } #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, 0x20001u); #endif /* 0xBFC033A4: 2411FFFF addiu $s1, $zero, -1 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (-1)); PGXP_ALU(0x2411FFFFu, cpu->gpr[17], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC033A4u); #endif label_BFC033A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC033A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC033A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033A8u); #endif /* 0xBFC033A8: 8FBF006C lw $ra, 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, 0xBFC033A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF006Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC033A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033ACu); #endif /* 0xBFC033AC: 8FBE0068 lw $fp, 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, 0xBFC033ACu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE0068u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC033ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033B0u); #endif /* 0xBFC033B0: 8FB70064 lw $s7, 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, 0xBFC033B0u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB70064u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC033B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033B4u); #endif /* 0xBFC033B4: 8FB60060 lw $s6, 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, 0xBFC033B4u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB60060u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC033B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033B8u); #endif /* 0xBFC033B8: 8FB5005C lw $s5, 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, 0xBFC033B8u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB5005Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC033B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033BCu); #endif /* 0xBFC033BC: 8FB40058 lw $s4, 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, 0xBFC033BCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40058u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC033BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033C0u); #endif /* 0xBFC033C0: 8FB30054 lw $s3, 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, 0xBFC033C0u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB30054u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC033C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033C4u); #endif /* 0xBFC033C4: 8FB20050 lw $s2, 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, 0xBFC033C4u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB20050u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC033C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033C8u); #endif /* 0xBFC033C8: 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, 0xBFC033C8u); 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(0xBFC033C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20005u); #endif /* 0xBFC033CC: 02201025 or $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(0x02201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC033CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033D0u); #endif /* 0xBFC033D0: 8FB1004C lw $s1, 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, 0xBFC033D0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB1004Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC033D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC033D4: 03E00008 jr $ra */ psx_delay_BFC033D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC033D8: 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(0xBFC033D8u); #endif if (psx_delay_BFC033D4) { psx_delay_BFC033D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC033DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC033DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC033DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC033DC: 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(0xBFC033DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC033E0: 1000FFDC beq $zero, $zero, 0xBFC03354 */ uint32_t psx_brA_BFC033E0 = cpu->gpr[0]; uint32_t psx_brB_BFC033E0 = cpu->gpr[0]; psx_taken_BFC033E0 = (psx_brA_BFC033E0 == psx_brB_BFC033E0); psx_delay_BFC033E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x810u); #endif /* 0xBFC033E4: 25645674 addiu $a0, $t3, 22132 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[11] + (22132)); PGXP_ALU(0x25645674u, cpu->gpr[4], _pgx1, 0x00005674u); } #ifdef PSX_COSIM cosim_instr(0xBFC033E4u); #endif if (psx_delay_BFC033E0) { psx_delay_BFC033E0 = 0; if (psx_taken_BFC033E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03354u); goto label_BFC03354; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC033E8u); } label_BFC033E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC033E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC033E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC033E8: 1066FFCD beq $v1, $a2, 0xBFC03320 */ uint32_t psx_brA_BFC033E8 = cpu->gpr[3]; uint32_t psx_brB_BFC033E8 = cpu->gpr[6]; psx_taken_BFC033E8 = (psx_brA_BFC033E8 == psx_brB_BFC033E8); psx_delay_BFC033E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC033EC: 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(0xBFC033ECu); #endif if (psx_delay_BFC033E8) { psx_delay_BFC033E8 = 0; if (psx_taken_BFC033E8) { #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, 0xBFC033F0u); } label_BFC033F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC033F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC033F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC033F0: 10E3FFCB beq $a3, $v1, 0xBFC03320 */ uint32_t psx_brA_BFC033F0 = cpu->gpr[7]; uint32_t psx_brB_BFC033F0 = cpu->gpr[3]; 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, 0x1u); #endif /* 0xBFC033F4: 00000000 nop */ /* nop */ #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, 0xBFC03320u); goto label_BFC03320; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC033F8: 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(0xBFC033F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC033FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC033FC: 1000FFC3 beq $zero, $zero, 0xBFC0330C */ uint32_t psx_brA_BFC033FC = cpu->gpr[0]; uint32_t psx_brB_BFC033FC = cpu->gpr[0]; psx_taken_BFC033FC = (psx_brA_BFC033FC == psx_brB_BFC033FC); psx_delay_BFC033FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03400: 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(0xBFC03400u); #endif if (psx_delay_BFC033FC) { psx_delay_BFC033FC = 0; if (psx_taken_BFC033FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0330Cu); goto label_BFC0330C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; /* fallthrough */ } void OpenBIOS_func_1FC03404(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03404u); int psx_delay_BFC03434 = 0; int psx_delay_BFC03440 = 0; int psx_taken_BFC03440 = 0; int psx_delay_BFC03470 = 0; int psx_delay_BFC0349C = 0; int psx_taken_BFC0349C = 0; int psx_delay_BFC034A4 = 0; int psx_taken_BFC034A4 = 0; int psx_delay_BFC034B0 = 0; int psx_taken_BFC034B0 = 0; int psx_delay_BFC034D4 = 0; int psx_delay_BFC034E4 = 0; int psx_taken_BFC034E4 = 0; int psx_delay_BFC03500 = 0; int psx_taken_BFC03500 = 0; int psx_delay_BFC03524 = 0; int psx_taken_BFC03524 = 0; int psx_delay_BFC03530 = 0; int psx_delay_BFC0355C = 0; int psx_delay_BFC03570 = 0; int psx_taken_BFC03570 = 0; int psx_delay_BFC03584 = 0; int psx_taken_BFC03584 = 0; int psx_delay_BFC0358C = 0; int psx_taken_BFC0358C = 0; int psx_delay_BFC035A4 = 0; int psx_taken_BFC035A4 = 0; int psx_delay_BFC035AC = 0; int psx_taken_BFC035AC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0343Cu: goto label_BFC0343C; case 0xBFC03448u: goto label_BFC03448; case 0xBFC0344Cu: goto label_BFC0344C; case 0xBFC03478u: goto label_BFC03478; case 0xBFC0348Cu: goto label_BFC0348C; case 0xBFC034A4u: goto label_BFC034A4; case 0xBFC034ACu: goto label_BFC034AC; case 0xBFC034B8u: goto label_BFC034B8; case 0xBFC034DCu: goto label_BFC034DC; case 0xBFC034ECu: goto label_BFC034EC; case 0xBFC034F8u: goto label_BFC034F8; case 0xBFC03508u: goto label_BFC03508; case 0xBFC0351Cu: goto label_BFC0351C; case 0xBFC0352Cu: goto label_BFC0352C; case 0xBFC03538u: goto label_BFC03538; case 0xBFC03564u: goto label_BFC03564; case 0xBFC03578u: goto label_BFC03578; case 0xBFC0357Cu: goto label_BFC0357C; case 0xBFC0358Cu: goto label_BFC0358C; case 0xBFC03594u: goto label_BFC03594; case 0xBFC035ACu: goto label_BFC035AC; default: break; } } label_BFC03404: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03404u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03404: 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(0xBFC03404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC03408: 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, 0xBFC03408u); return; } g_debug_last_store_pc = 0xBFC03408u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC03408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0340Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0340C: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #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, 0x10040u); #endif /* 0xBFC03410: 26068598 addiu $a2, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26068598u, cpu->gpr[6], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC03410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03414: 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(0xBFC03414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03418: 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(0xBFC03418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0341Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0341C: 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, 0xBFC0341Cu); return; } g_debug_last_store_pc = 0xBFC0341Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0341Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC03420: 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, 0xBFC03420u); return; } g_debug_last_store_pc = 0xBFC03420u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC03420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC03424: 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, 0xBFC03424u); return; } g_debug_last_store_pc = 0xBFC03424u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC03424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC03428: 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, 0xBFC03428u); return; } g_debug_last_store_pc = 0xBFC03428u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC03428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0342Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0342C: 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, 0xBFC0342Cu); return; } g_debug_last_store_pc = 0xBFC0342Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC0342Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC03430: 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, 0xBFC03430u); return; } g_debug_last_store_pc = 0xBFC03430u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x80000000u); #endif /* 0xBFC03434: 0FF00E9E jal 0xBFC03A78 */ cpu->gpr[31] = 0xBFC0343Cu; /* jal link before delay slot */ psx_delay_BFC03434 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC03438: 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, 0xBFC03438u); return; } g_debug_last_store_pc = 0xBFC03438u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC03438u); #endif if (psx_delay_BFC03434) { psx_delay_BFC03434 = 0; cpu->gpr[31] = 0xBFC0343Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A78u); cpu->pc = 0xBFC03A78u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0343C: 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(0xBFC0343Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03440: 1043000D beq $v0, $v1, 0xBFC03478 */ uint32_t psx_brA_BFC03440 = cpu->gpr[2]; uint32_t psx_brB_BFC03440 = cpu->gpr[3]; psx_taken_BFC03440 = (psx_brA_BFC03440 == psx_brB_BFC03440); psx_delay_BFC03440 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC03444: 26028598 addiu $v0, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26028598u, cpu->gpr[2], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC03444u); #endif if (psx_delay_BFC03440) { psx_delay_BFC03440 = 0; if (psx_taken_BFC03440) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03478u); goto label_BFC03478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03448u); } label_BFC03448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03448u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03448: 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(0xBFC03448u); #endif label_BFC0344C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0344Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0344Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0344Cu); #endif /* 0xBFC0344C: 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, 0xBFC0344Cu); 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(0xBFC0344Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03450u); #endif /* 0xBFC03450: 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, 0xBFC03450u); 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(0xBFC03450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03454u); #endif /* 0xBFC03454: 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, 0xBFC03454u); 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(0xBFC03454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03458u); #endif /* 0xBFC03458: 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, 0xBFC03458u); 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(0xBFC03458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0345Cu); #endif /* 0xBFC0345C: 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, 0xBFC0345Cu); 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(0xBFC0345Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03460u); #endif /* 0xBFC03460: 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, 0xBFC03460u); 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(0xBFC03460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03464u); #endif /* 0xBFC03464: 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, 0xBFC03464u); 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(0xBFC03464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20005u); #endif /* 0xBFC03468: 02201025 or $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(0x02201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0346Cu); #endif /* 0xBFC0346C: 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, 0xBFC0346Cu); 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(0xBFC0346Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03470: 03E00008 jr $ra */ psx_delay_BFC03470 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03474: 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(0xBFC03474u); #endif if (psx_delay_BFC03470) { psx_delay_BFC03470 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03478: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03478u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03478: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0347Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0347C: 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(0xBFC0347Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC03480: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03484: 248496F8 addiu $a0, $a0, -26888 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26888)); PGXP_ALU(0x248496F8u, cpu->gpr[4], _pgx1, 0xFFFF96F8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03488: 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(0xBFC03488u); #endif label_BFC0348C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0348Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0348Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0348Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC0348C: 00833021 addu $a2, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00833021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0348Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03490u); #endif /* 0xBFC03490: 80510001 lb $s1, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[17] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 17, 0x4u); PGXP_LOAD(0x80510001u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC03490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03494u); #endif /* 0xBFC03494: 80C60000 lb $a2, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 6, 0x40u); PGXP_LOAD(0x80C60000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC03494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03498: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0349Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040u); #endif /* 0xBFC0349C: 1626FFEA bne $s1, $a2, 0xBFC03448 */ uint32_t psx_brA_BFC0349C = cpu->gpr[17]; uint32_t psx_brB_BFC0349C = cpu->gpr[6]; psx_taken_BFC0349C = (psx_brA_BFC0349C != psx_brB_BFC0349C); psx_delay_BFC0349C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC034A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC034A0u); #endif if (psx_delay_BFC0349C) { psx_delay_BFC0349C = 0; if (psx_taken_BFC0349C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03448u); goto label_BFC03448; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC034A4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC034A4: 12200004 beq $s1, $zero, 0xBFC034B8 */ uint32_t psx_brA_BFC034A4 = cpu->gpr[17]; uint32_t psx_brB_BFC034A4 = cpu->gpr[0]; psx_taken_BFC034A4 = (psx_brA_BFC034A4 == psx_brB_BFC034A4); psx_delay_BFC034A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC034A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC034A8u); #endif if (psx_delay_BFC034A4) { psx_delay_BFC034A4 = 0; if (psx_taken_BFC034A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC034B8u); goto label_BFC034B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC034ACu); } label_BFC034AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC034ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC034ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC034AC: 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(0xBFC034ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC034B0: 1465FFF6 bne $v1, $a1, 0xBFC0348C */ uint32_t psx_brA_BFC034B0 = cpu->gpr[3]; uint32_t psx_brB_BFC034B0 = cpu->gpr[5]; psx_taken_BFC034B0 = (psx_brA_BFC034B0 != psx_brB_BFC034B0); psx_delay_BFC034B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC034B4: 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(0xBFC034B4u); #endif if (psx_delay_BFC034B0) { psx_delay_BFC034B0 = 0; if (psx_taken_BFC034B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0348Cu); goto label_BFC0348C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC034B8u); } label_BFC034B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC034B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC034B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034B8u); #endif /* 0xBFC034B8: 8A020053 lwl $v0, 83($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 83; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (83)); 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, 2, 0x10000u); uint32_t psx_old_rt = cpu->gpr[2]; cpu->gpr[2] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } PGXP_LOAD(0x8A020053u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC034B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034BCu); #endif /* 0xBFC034BC: 8A05008F lwl $a1, 143($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 143; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (143)); 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, 5, 0x10000u); uint32_t psx_old_rt = cpu->gpr[5]; cpu->gpr[5] = (psx_old_rt & psx_keep_mask) | (psx_word << psx_shift_left); } PGXP_LOAD(0x8A05008Fu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC034BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034C0u); #endif /* 0xBFC034C0: 9A020050 lwr $v0, 80($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (80)); 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, 2, 0x10000u); uint32_t psx_old_rt = cpu->gpr[2]; cpu->gpr[2] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } PGXP_LOAD(0x9A020050u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC034C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034C4u); #endif /* 0xBFC034C4: 9A05008C lwr $a1, 140($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (140)); 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, 5, 0x10000u); uint32_t psx_old_rt = cpu->gpr[5]; cpu->gpr[5] = (psx_old_rt & psx_keep_mask) | (psx_word >> psx_shift_right); } PGXP_LOAD(0x9A05008Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC034C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC034C8: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC034C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC034CC: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC034CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC034D0: 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(0xBFC034D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC034D4: 0FF00E9E jal 0xBFC03A78 */ cpu->gpr[31] = 0xBFC034DCu; /* jal link before delay slot */ psx_delay_BFC034D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC034D8: AE425E34 sw $v0, 24116($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 24116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC034D8u); return; } g_debug_last_store_pc = 0xBFC034D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE425E34u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC034D8u); #endif if (psx_delay_BFC034D4) { psx_delay_BFC034D4 = 0; cpu->gpr[31] = 0xBFC034DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A78u); cpu->pc = 0xBFC03A78u; return; } 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, 0x20005u); #endif /* 0xBFC034DC: 00408825 or $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(0x00408825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC034DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC034E0: 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(0xBFC034E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC034E4: 1622FFD8 bne $s1, $v0, 0xBFC03448 */ uint32_t psx_brA_BFC034E4 = cpu->gpr[17]; uint32_t psx_brB_BFC034E4 = cpu->gpr[2]; psx_taken_BFC034E4 = (psx_brA_BFC034E4 != psx_brB_BFC034E4); psx_delay_BFC034E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC034E8: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC034E8u); #endif if (psx_delay_BFC034E4) { psx_delay_BFC034E4 = 0; if (psx_taken_BFC034E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03448u); goto label_BFC03448; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC034ECu); } label_BFC034EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC034ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC034ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034ECu); #endif /* 0xBFC034EC: 8E435E34 lw $v1, 24116($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 24116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC034ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E435E34u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC034ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC034F0: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC034F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC034F4: 26948D98 addiu $s4, $s4, -29288 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-29288)); PGXP_ALU(0x26948D98u, cpu->gpr[20], _pgx1, 0xFFFF8D98u); } #ifdef PSX_COSIM cosim_instr(0xBFC034F4u); #endif label_BFC034F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC034F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC034F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034F8u); #endif /* 0xBFC034F8: 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, 0xBFC034F8u); 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(0xBFC034F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC034FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC034FC: 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(0xBFC034FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC03500: 1454FFFD bne $v0, $s4, 0xBFC034F8 */ uint32_t psx_brA_BFC03500 = cpu->gpr[2]; uint32_t psx_brB_BFC03500 = cpu->gpr[20]; 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, 0x18u); #endif /* 0xBFC03504: 00641826 xor $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(0x00641826u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0xBFC034F8u); goto label_BFC034F8; } #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, 0x40008u); #endif /* 0xBFC03508: AE435E34 sw $v1, 24116($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 24116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03508u); return; } g_debug_last_store_pc = 0xBFC03508u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE435E34u, _pgxa, cpu->gpr[3]); } #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, 0x40000u); #endif /* 0xBFC0350C: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0350Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0001u); #endif /* 0xBFC03510: 02209825 or $s3, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x02209825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC03514: 26525674 addiu $s2, $s2, 22132 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (22132)); PGXP_ALU(0x26525674u, cpu->gpr[18], _pgx1, 0x00005674u); } #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, 0x400001u); #endif /* 0xBFC03518: 2416002E addiu $s6, $zero, 46 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (46)); PGXP_ALU(0x2416002Eu, cpu->gpr[22], _pgx1, 0x0000002Eu); } #ifdef PSX_COSIM cosim_instr(0xBFC03518u); #endif label_BFC0351C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0351Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0351Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0351Cu); #endif /* 0xBFC0351C: 92150000 lbu $s5, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[21] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 21, 0x10000u); PGXP_LOAD(0x92150000u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC0351Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03520: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC03524: 12A0001B beq $s5, $zero, 0xBFC03594 */ uint32_t psx_brA_BFC03524 = cpu->gpr[21]; uint32_t psx_brB_BFC03524 = cpu->gpr[0]; psx_taken_BFC03524 = (psx_brA_BFC03524 == psx_brB_BFC03524); psx_delay_BFC03524 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03528: 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(0xBFC03528u); #endif if (psx_delay_BFC03524) { psx_delay_BFC03524 = 0; if (psx_taken_BFC03524) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03594u); goto label_BFC03594; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0352Cu); } label_BFC0352C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0352Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0352Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0352Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC0352C: 26050002 addiu $a1, $s0, 2 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (2)); PGXP_ALU(0x26050002u, cpu->gpr[5], _pgx1, 0x00000002u); } #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, 0x80000000u); #endif /* 0xBFC03530: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC03538u; /* jal link before delay slot */ psx_delay_BFC03530 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03534: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03534u); #endif if (psx_delay_BFC03530) { psx_delay_BFC03530 = 0; cpu->gpr[31] = 0xBFC03538u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } 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: 8FA20010 lw $v0, 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, 0xBFC03538u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0353Cu); #endif /* 0xBFC0353C: 92030007 lbu $v1, 7($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 7; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (7)), 3, 0x10000u); PGXP_LOAD(0x92030007u, _pgxa, cpu->gpr[3]); } #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, 0x40004u); #endif /* 0xBFC03540: 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, 0xBFC03540u); return; } g_debug_last_store_pc = 0xBFC03540u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03544u); #endif /* 0xBFC03544: 92020006 lbu $v0, 6($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 6; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (6)), 2, 0x10000u); PGXP_LOAD(0x92020006u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0000u); #endif /* 0xBFC03548: 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, 0xBFC03548u); return; } g_debug_last_store_pc = 0xBFC03548u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAE530000u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC03548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0354Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0354C: 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(0xBFC0354Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC03550: 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, 0xBFC03550u); return; } g_debug_last_store_pc = 0xBFC03550u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420004u, _pgxa, cpu->gpr[2]); } #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, 0x200041u); #endif /* 0xBFC03554: 02A03025 or $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(0x02A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC03558: 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(0xBFC03558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0355Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0355C: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC03564u; /* jal link before delay slot */ psx_delay_BFC0355C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010u); #endif /* 0xBFC03560: 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(0xBFC03560u); #endif if (psx_delay_BFC0355C) { psx_delay_BFC0355C = 0; cpu->gpr[31] = 0xBFC03564u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } 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 /* 0xBFC03564: 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(0xBFC03564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03568: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0356Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0356C: 30430001 andi $v1, $v0, 0x1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x1u; PGXP_ALU(0x30430001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC0356Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03570: 1060000E beq $v1, $zero, 0xBFC035AC */ uint32_t psx_brA_BFC03570 = cpu->gpr[3]; uint32_t psx_brB_BFC03570 = cpu->gpr[0]; psx_taken_BFC03570 = (psx_brA_BFC03570 == psx_brB_BFC03570); psx_delay_BFC03570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03574: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03574u); #endif if (psx_delay_BFC03570) { psx_delay_BFC03570 = 0; if (psx_taken_BFC03570) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035ACu); goto label_BFC035AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03578u); } label_BFC03578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03578u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03578: 24420009 addiu $v0, $v0, 9 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (9)); PGXP_ALU(0x24420009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0xBFC03578u); #endif 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, 0x10004u); #endif /* 0xBFC0357C: 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(0xBFC0357Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110004u); #endif /* 0xBFC03580: 0214102B sltu $v0, $s0, $s4 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[20] ? 1 : 0); PGXP_ALU(0x0214102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03584: 10400003 beq $v0, $zero, 0xBFC03594 */ uint32_t psx_brA_BFC03584 = cpu->gpr[2]; uint32_t psx_brB_BFC03584 = cpu->gpr[0]; psx_taken_BFC03584 = (psx_brA_BFC03584 == psx_brB_BFC03584); psx_delay_BFC03584 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC03588: 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(0xBFC03588u); #endif if (psx_delay_BFC03584) { psx_delay_BFC03584 = 0; if (psx_taken_BFC03584) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03594u); goto label_BFC03594; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0358Cu); } label_BFC0358C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0358Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0358Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0358Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480000u); #endif /* 0xBFC0358C: 1676FFE3 bne $s3, $s6, 0xBFC0351C */ uint32_t psx_brA_BFC0358C = cpu->gpr[19]; uint32_t psx_brB_BFC0358C = cpu->gpr[22]; psx_taken_BFC0358C = (psx_brA_BFC0358C != psx_brB_BFC0358C); psx_delay_BFC0358C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC03590: 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(0xBFC03590u); #endif if (psx_delay_BFC0358C) { psx_delay_BFC0358C = 0; if (psx_taken_BFC0358C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0351Cu); goto label_BFC0351C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03594u); } label_BFC03594: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03594u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03594: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC03598: AC405670 sw $zero, 22128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 22128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (22128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03598u); return; } g_debug_last_store_pc = 0xBFC03598u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC405670u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC03598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0359Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0359C: 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(0xBFC0359Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC035A0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC035A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC035A4: 1000FFA9 beq $zero, $zero, 0xBFC0344C */ uint32_t psx_brA_BFC035A4 = cpu->gpr[0]; uint32_t psx_brB_BFC035A4 = cpu->gpr[0]; psx_taken_BFC035A4 = (psx_brA_BFC035A4 == psx_brB_BFC035A4); psx_delay_BFC035A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC035A8: AC535E30 sw $s3, 24112($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC035A8u); return; } g_debug_last_store_pc = 0xBFC035A8u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAC535E30u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC035A8u); #endif if (psx_delay_BFC035A4) { psx_delay_BFC035A4 = 0; if (psx_taken_BFC035A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0344Cu); goto label_BFC0344C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035ACu); } label_BFC035AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC035ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC035ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC035AC: 1000FFF3 beq $zero, $zero, 0xBFC0357C */ uint32_t psx_brA_BFC035AC = cpu->gpr[0]; 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, 0x4u); #endif /* 0xBFC035B0: 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(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, 0xBFC0357Cu); goto label_BFC0357C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035B4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035B4u); cpu->pc = 0xBFC035B4u; return; /* fallthrough */ } void OpenBIOS_func_1FC035B4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC035B4u); int psx_delay_BFC035C8 = 0; int psx_delay_BFC035D4 = 0; int psx_taken_BFC035D4 = 0; int psx_delay_BFC035DC = 0; int psx_delay_BFC035E4 = 0; int psx_taken_BFC035E4 = 0; int psx_delay_BFC03604 = 0; int psx_delay_BFC03620 = 0; int psx_taken_BFC03620 = 0; int psx_delay_BFC03638 = 0; int psx_taken_BFC03638 = 0; int psx_delay_BFC03650 = 0; int psx_taken_BFC03650 = 0; int psx_delay_BFC03658 = 0; int psx_taken_BFC03658 = 0; int psx_delay_BFC03664 = 0; int psx_delay_BFC03670 = 0; int psx_taken_BFC03670 = 0; int psx_delay_BFC03678 = 0; int psx_taken_BFC03678 = 0; int psx_delay_BFC036C0 = 0; int psx_taken_BFC036C0 = 0; int psx_delay_BFC036D0 = 0; int psx_delay_BFC036D8 = 0; int psx_taken_BFC036D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC035D0u: goto label_BFC035D0; case 0xBFC035DCu: goto label_BFC035DC; case 0xBFC035E4u: goto label_BFC035E4; case 0xBFC035ECu: goto label_BFC035EC; case 0xBFC035F8u: goto label_BFC035F8; case 0xBFC0360Cu: goto label_BFC0360C; case 0xBFC03610u: goto label_BFC03610; case 0xBFC03628u: goto label_BFC03628; case 0xBFC03634u: goto label_BFC03634; case 0xBFC03640u: goto label_BFC03640; case 0xBFC03648u: goto label_BFC03648; case 0xBFC03658u: goto label_BFC03658; case 0xBFC03660u: goto label_BFC03660; case 0xBFC03664u: goto label_BFC03664; case 0xBFC0366Cu: goto label_BFC0366C; case 0xBFC03678u: goto label_BFC03678; case 0xBFC03680u: goto label_BFC03680; case 0xBFC036C8u: goto label_BFC036C8; case 0xBFC036D8u: goto label_BFC036D8; default: break; } } 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, 0x20000000u); #endif /* 0xBFC035B4: 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(0xBFC035B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC035B8: 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, 0xBFC035B8u); return; } g_debug_last_store_pc = 0xBFC035B8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC035B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC035BC: 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, 0xBFC035BCu); return; } g_debug_last_store_pc = 0xBFC035BCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC035BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC035C0: 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, 0xBFC035C0u); return; } g_debug_last_store_pc = 0xBFC035C0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #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, 0x10011u); #endif /* 0xBFC035C4: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC035C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC035C8: 0FF00C00 jal 0xBFC03000 */ cpu->gpr[31] = 0xBFC035D0u; /* jal link before delay slot */ psx_delay_BFC035C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC035CC: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC035CCu); #endif if (psx_delay_BFC035C8) { psx_delay_BFC035C8 = 0; cpu->gpr[31] = 0xBFC035D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03000u); cpu->pc = 0xBFC03000u; return; } label_BFC035D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC035D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC035D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC035D0: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC035D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC035D4: 1040000D beq $v0, $zero, 0xBFC0360C */ uint32_t psx_brA_BFC035D4 = cpu->gpr[2]; uint32_t psx_brB_BFC035D4 = cpu->gpr[0]; psx_taken_BFC035D4 = (psx_brA_BFC035D4 == psx_brB_BFC035D4); psx_delay_BFC035D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC035D8: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC035D8u); #endif if (psx_delay_BFC035D4) { psx_delay_BFC035D4 = 0; if (psx_taken_BFC035D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0360Cu); goto label_BFC0360C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035DCu); } label_BFC035DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC035DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC035DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC035DC: 0FF00D01 jal 0xBFC03404 */ cpu->gpr[31] = 0xBFC035E4u; /* jal link before delay slot */ psx_delay_BFC035DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC035E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC035E0u); #endif if (psx_delay_BFC035DC) { psx_delay_BFC035DC = 0; cpu->gpr[31] = 0xBFC035E4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC035E4: 14400009 bne $v0, $zero, 0xBFC0360C */ uint32_t psx_brA_BFC035E4 = cpu->gpr[2]; uint32_t psx_brB_BFC035E4 = cpu->gpr[0]; psx_taken_BFC035E4 = (psx_brA_BFC035E4 != psx_brB_BFC035E4); psx_delay_BFC035E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC035E8: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC035E8u); #endif if (psx_delay_BFC035E4) { psx_delay_BFC035E4 = 0; if (psx_taken_BFC035E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0360Cu); goto label_BFC0360C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC035ECu); } label_BFC035EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC035ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC035ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC035EC: 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(0xBFC035ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC035F0: AE020018 sw $v0, 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, 0xBFC035F0u); return; } g_debug_last_store_pc = 0xBFC035F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC035F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC035F4: 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(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: 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, 0xBFC035F8u); 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(0xBFC035F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC035FCu); #endif /* 0xBFC035FC: 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, 0xBFC035FCu); 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(0xBFC035FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03600u); #endif /* 0xBFC03600: 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, 0xBFC03600u); 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(0xBFC03600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03604: 03E00008 jr $ra */ psx_delay_BFC03604 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03608: 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(0xBFC03608u); #endif if (psx_delay_BFC03604) { psx_delay_BFC03604 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0360C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0360Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0360Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0360Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0360C: 2405FFDF addiu $a1, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2405FFDFu, cpu->gpr[5], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC0360Cu); #endif 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 /* 0xBFC03610: 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(0xBFC03610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03614: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03618: 2444FF9F addiu $a0, $v0, -97 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (-97)); PGXP_ALU(0x2444FF9Fu, cpu->gpr[4], _pgx1, 0xFFFFFF9Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC03618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0361Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0361C: 2C84001A sltiu $a0, $a0, 26 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C84001Au, cpu->gpr[4], _pgx1, 0x001Au); } #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, 0x11u); #endif /* 0xBFC03620: 10800004 beq $a0, $zero, 0xBFC03634 */ uint32_t psx_brA_BFC03620 = cpu->gpr[4]; uint32_t psx_brB_BFC03620 = cpu->gpr[0]; psx_taken_BFC03620 = (psx_brA_BFC03620 == psx_brB_BFC03620); psx_delay_BFC03620 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03624: 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(0xBFC03624u); #endif if (psx_delay_BFC03620) { psx_delay_BFC03620 = 0; if (psx_taken_BFC03620) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03634u); goto label_BFC03634; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03628u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC03628: 00451024 and $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5]; PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC0362C: 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(0xBFC0362Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03630: 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(0xBFC03630u); #endif label_BFC03634: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03634u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03634: 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(0xBFC03634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03638: 1440FFF5 bne $v0, $zero, 0xBFC03610 */ uint32_t psx_brA_BFC03638 = cpu->gpr[2]; uint32_t psx_brB_BFC03638 = cpu->gpr[0]; psx_taken_BFC03638 = (psx_brA_BFC03638 != psx_brB_BFC03638); psx_delay_BFC03638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0363Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0363C: A062FFFF sb $v0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0363Cu; 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(0xBFC0363Cu); #endif if (psx_delay_BFC03638) { psx_delay_BFC03638 = 0; if (psx_taken_BFC03638) { #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, 0xBFC03640u); } 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, 0x20000004u); #endif /* 0xBFC03640: 27A20010 addiu $v0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A20010u, cpu->gpr[2], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03644: 2404003B addiu $a0, $zero, 59 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); PGXP_ALU(0x2404003Bu, cpu->gpr[4], _pgx1, 0x0000003Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC03644u); #endif 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: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03650: 1060001D beq $v1, $zero, 0xBFC036C8 */ uint32_t psx_brA_BFC03650 = cpu->gpr[3]; uint32_t psx_brB_BFC03650 = cpu->gpr[0]; 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, 0xBFC036C8u); goto label_BFC036C8; } #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, 0x18u); #endif /* 0xBFC03658: 1464FFFB bne $v1, $a0, 0xBFC03648 */ uint32_t psx_brA_BFC03658 = cpu->gpr[3]; uint32_t psx_brB_BFC03658 = cpu->gpr[4]; psx_taken_BFC03658 = (psx_brA_BFC03658 != psx_brB_BFC03658); psx_delay_BFC03658 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0365Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0365C: 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(0xBFC0365Cu); #endif if (psx_delay_BFC03658) { psx_delay_BFC03658 = 0; if (psx_taken_BFC03658) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03648u); goto label_BFC03648; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03660u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC03660: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03660u); #endif label_BFC03664: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03664u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03664: 0FF00C43 jal 0xBFC0310C */ cpu->gpr[31] = 0xBFC0366Cu; /* jal link before delay slot */ psx_delay_BFC03664 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03668: 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(0xBFC03668u); #endif if (psx_delay_BFC03664) { psx_delay_BFC03664 = 0; cpu->gpr[31] = 0xBFC0366Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0310Cu); cpu->pc = 0xBFC0310Cu; return; } label_BFC0366C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0366Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0366Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0366Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0366C: 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(0xBFC0366Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03670: 14430003 bne $v0, $v1, 0xBFC03680 */ uint32_t psx_brA_BFC03670 = cpu->gpr[2]; uint32_t psx_brB_BFC03670 = cpu->gpr[3]; psx_taken_BFC03670 = (psx_brA_BFC03670 != psx_brB_BFC03670); psx_delay_BFC03670 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03674: 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(0xBFC03674u); #endif if (psx_delay_BFC03670) { psx_delay_BFC03670 = 0; if (psx_taken_BFC03670) { #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, 0xBFC03678u); } label_BFC03678: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03678u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03678: 1000FFDF beq $zero, $zero, 0xBFC035F8 */ uint32_t psx_brA_BFC03678 = cpu->gpr[0]; 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, 0x10008u); #endif /* 0xBFC0367C: AE030018 sw $v1, 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, 0xBFC0367Cu); return; } g_debug_last_store_pc = 0xBFC0367Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030018u, _pgxa, cpu->gpr[3]); } #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, 0xBFC035F8u); goto label_BFC035F8; } #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: 00022040 sll $a0, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 1u; PGXP_ALU(0x00022040u, cpu->gpr[4], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC03680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03684: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03688: 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(0xBFC03688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0368Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0368C: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC0368Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03690: 246252AC addiu $v0, $v1, 21164 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] + (21164)); PGXP_ALU(0x246252ACu, cpu->gpr[2], _pgx1, 0x000052ACu); } #ifdef PSX_COSIM cosim_instr(0xBFC03690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03694: 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(0xBFC03694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03698u); #endif /* 0xBFC03698: 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, 0xBFC03698u); 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(0xBFC03698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0369Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0369C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0369Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC036A0: AE030024 sw $v1, 36($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC036A0u); return; } g_debug_last_store_pc = 0xBFC036A0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030024u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC036A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036A4u); #endif /* 0xBFC036A4: 8C420008 lw $v0, 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, 0xBFC036A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420008u, _pgxa, cpu->gpr[2]); } #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, 0x10001u); #endif /* 0xBFC036A8: AE000010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC036A8u); return; } g_debug_last_store_pc = 0xBFC036A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000010u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC036A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC036AC: AE020020 sw $v0, 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, 0xBFC036ACu); return; } g_debug_last_store_pc = 0xBFC036ACu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC036ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC036B0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC036B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036B4u); #endif /* 0xBFC036B4: 8C425E34 lw $v0, 24116($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC036B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425E34u, _pgxa, cpu->gpr[2]); } #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, 0x10001u); #endif /* 0xBFC036B8: 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, 0xBFC036B8u); return; } g_debug_last_store_pc = 0xBFC036B8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC036B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC036BC: 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, 0xBFC036BCu); return; } g_debug_last_store_pc = 0xBFC036BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC036BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC036C0: 1000FFCD beq $zero, $zero, 0xBFC035F8 */ uint32_t psx_brA_BFC036C0 = cpu->gpr[0]; uint32_t psx_brB_BFC036C0 = cpu->gpr[0]; psx_taken_BFC036C0 = (psx_brA_BFC036C0 == psx_brB_BFC036C0); psx_delay_BFC036C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC036C4: 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(0xBFC036C4u); #endif if (psx_delay_BFC036C0) { psx_delay_BFC036C0 = 0; if (psx_taken_BFC036C0) { #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, 0xBFC036C8u); } label_BFC036C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC036C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC036C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC036C8: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x20u); #endif /* 0xBFC036CC: 24A59700 addiu $a1, $a1, -26880 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-26880)); PGXP_ALU(0x24A59700u, cpu->gpr[5], _pgx1, 0xFFFF9700u); } #ifdef PSX_COSIM cosim_instr(0xBFC036CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC036D0: 0FF00C34 jal 0xBFC030D0 */ cpu->gpr[31] = 0xBFC036D8u; /* jal link before delay slot */ psx_delay_BFC036D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC036D4: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC036D4u); #endif if (psx_delay_BFC036D0) { psx_delay_BFC036D0 = 0; cpu->gpr[31] = 0xBFC036D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC030D0u); cpu->pc = 0xBFC030D0u; return; } label_BFC036D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC036D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC036D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC036D8: 1000FFE2 beq $zero, $zero, 0xBFC03664 */ uint32_t psx_brA_BFC036D8 = cpu->gpr[0]; uint32_t psx_brB_BFC036D8 = cpu->gpr[0]; psx_taken_BFC036D8 = (psx_brA_BFC036D8 == psx_brB_BFC036D8); psx_delay_BFC036D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC036DC: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC036DCu); #endif if (psx_delay_BFC036D8) { psx_delay_BFC036D8 = 0; if (psx_taken_BFC036D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03664u); goto label_BFC03664; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC036E0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC036E0u); cpu->pc = 0xBFC036E0u; return; /* fallthrough */ } void OpenBIOS_func_1FC036E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC036E0u); int psx_delay_BFC036F8 = 0; int psx_taken_BFC036F8 = 0; int psx_delay_BFC0370C = 0; int psx_taken_BFC0370C = 0; int psx_delay_BFC03714 = 0; int psx_taken_BFC03714 = 0; int psx_delay_BFC03728 = 0; int psx_taken_BFC03728 = 0; int psx_delay_BFC03748 = 0; int psx_delay_BFC03750 = 0; int psx_delay_BFC0375C = 0; int psx_taken_BFC0375C = 0; int psx_delay_BFC03764 = 0; int psx_taken_BFC03764 = 0; int psx_delay_BFC0376C = 0; int psx_delay_BFC03774 = 0; int psx_taken_BFC03774 = 0; int psx_delay_BFC0378C = 0; int psx_taken_BFC0378C = 0; int psx_delay_BFC037A8 = 0; int psx_delay_BFC037B8 = 0; int psx_taken_BFC037B8 = 0; int psx_delay_BFC037D8 = 0; int psx_taken_BFC037D8 = 0; int psx_delay_BFC037E8 = 0; int psx_taken_BFC037E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03700u: goto label_BFC03700; case 0xBFC03714u: goto label_BFC03714; case 0xBFC0371Cu: goto label_BFC0371C; case 0xBFC03730u: goto label_BFC03730; case 0xBFC03734u: goto label_BFC03734; case 0xBFC0373Cu: goto label_BFC0373C; case 0xBFC03750u: goto label_BFC03750; case 0xBFC03758u: goto label_BFC03758; case 0xBFC03764u: goto label_BFC03764; case 0xBFC0376Cu: goto label_BFC0376C; case 0xBFC03774u: goto label_BFC03774; case 0xBFC0377Cu: goto label_BFC0377C; case 0xBFC03794u: goto label_BFC03794; case 0xBFC037B0u: goto label_BFC037B0; case 0xBFC037C0u: goto label_BFC037C0; case 0xBFC037E0u: goto label_BFC037E0; case 0xBFC037E4u: goto label_BFC037E4; default: break; } } label_BFC036E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC036E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC036E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC036E0: 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(0xBFC036E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC036E4: 30C207FF andi $v0, $a2, 0x7FF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x7FFu; PGXP_ALU(0x30C207FFu, cpu->gpr[2], _pgx1, 0x07FFu); } #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, 0x20010000u); #endif /* 0xBFC036E8: 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, 0xBFC036E8u); return; } g_debug_last_store_pc = 0xBFC036E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC036EC: 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, 0xBFC036ECu); return; } g_debug_last_store_pc = 0xBFC036ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC036ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC036F0: 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, 0xBFC036F0u); return; } g_debug_last_store_pc = 0xBFC036F0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC036F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC036F4: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC036F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC036F8: 1440000D bne $v0, $zero, 0xBFC03730 */ uint32_t psx_brA_BFC036F8 = cpu->gpr[2]; uint32_t psx_brB_BFC036F8 = cpu->gpr[0]; psx_taken_BFC036F8 = (psx_brA_BFC036F8 != psx_brB_BFC036F8); psx_delay_BFC036F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC036FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC036FC: 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, 0xBFC036FCu); return; } g_debug_last_store_pc = 0xBFC036FCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC036FCu); #endif if (psx_delay_BFC036F8) { psx_delay_BFC036F8 = 0; if (psx_taken_BFC036F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03730u); goto label_BFC03730; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03700u); } label_BFC03700: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03700u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03700u); #endif /* 0xBFC03700: 8C820010 lw $v0, 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, 0xBFC03700u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820010u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC03704: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03708: 304307FF andi $v1, $v0, 0x7FF */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x7FFu; PGXP_ALU(0x304307FFu, cpu->gpr[3], _pgx1, 0x07FFu); } #ifdef PSX_COSIM cosim_instr(0xBFC03708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0370Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0370C: 14600008 bne $v1, $zero, 0xBFC03730 */ uint32_t psx_brA_BFC0370C = cpu->gpr[3]; uint32_t psx_brB_BFC0370C = cpu->gpr[0]; psx_taken_BFC0370C = (psx_brA_BFC0370C != psx_brB_BFC0370C); psx_delay_BFC0370C = 1; #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 if (psx_delay_BFC0370C) { psx_delay_BFC0370C = 0; if (psx_taken_BFC0370C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03730u); goto label_BFC03730; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03714u); } 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, 0x40u); #endif /* 0xBFC03714: 04C00006 bltz $a2, 0xBFC03730 */ uint32_t psx_brA_BFC03714 = cpu->gpr[6]; psx_taken_BFC03714 = ((int32_t)psx_brA_BFC03714 < 0); psx_delay_BFC03714 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC03718: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _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, 0xBFC03730u); goto label_BFC03730; } #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: 8C830020 lw $v1, 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, 0xBFC0371Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830020u, _pgxa, cpu->gpr[3]); } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03724: 0043102B sltu $v0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03728: 14400009 bne $v0, $zero, 0xBFC03750 */ uint32_t psx_brA_BFC03728 = cpu->gpr[2]; uint32_t psx_brB_BFC03728 = cpu->gpr[0]; psx_taken_BFC03728 = (psx_brA_BFC03728 != psx_brB_BFC03728); psx_delay_BFC03728 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0372Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0372C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0372Cu); #endif if (psx_delay_BFC03728) { psx_delay_BFC03728 = 0; if (psx_taken_BFC03728) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03750u); goto label_BFC03750; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03730u); } label_BFC03730: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03730u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03730: 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(0xBFC03730u); #endif label_BFC03734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03734u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC03734: AE020018 sw $v0, 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, 0xBFC03734u); return; } g_debug_last_store_pc = 0xBFC03734u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03738: 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(0xBFC03738u); #endif 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: 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, 0xBFC0373Cu); 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(0xBFC0373Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03740u); #endif /* 0xBFC03740: 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, 0xBFC03740u); 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(0xBFC03740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03744u); #endif /* 0xBFC03744: 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, 0xBFC03744u); 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(0xBFC03744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03748: 03E00008 jr $ra */ psx_delay_BFC03748 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0374Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0374C: 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(0xBFC0374Cu); #endif if (psx_delay_BFC03748) { psx_delay_BFC03748 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03750: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03750u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03750: 0FF00C00 jal 0xBFC03000 */ cpu->gpr[31] = 0xBFC03758u; /* jal link before delay slot */ psx_delay_BFC03750 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03754: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03754u); #endif if (psx_delay_BFC03750) { psx_delay_BFC03750 = 0; cpu->gpr[31] = 0xBFC03758u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03000u); cpu->pc = 0xBFC03000u; return; } label_BFC03758: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03758u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03758: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0375Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0375C: 10400003 beq $v0, $zero, 0xBFC0376C */ uint32_t psx_brA_BFC0375C = cpu->gpr[2]; uint32_t psx_brB_BFC0375C = cpu->gpr[0]; psx_taken_BFC0375C = (psx_brA_BFC0375C == psx_brB_BFC0375C); psx_delay_BFC0375C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03760: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03760u); #endif if (psx_delay_BFC0375C) { psx_delay_BFC0375C = 0; if (psx_taken_BFC0375C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0376Cu); goto label_BFC0376C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03764u); } 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, 0x1u); #endif /* 0xBFC03764: 1000FFF3 beq $zero, $zero, 0xBFC03734 */ uint32_t psx_brA_BFC03764 = cpu->gpr[0]; uint32_t psx_brB_BFC03764 = cpu->gpr[0]; psx_taken_BFC03764 = (psx_brA_BFC03764 == psx_brB_BFC03764); psx_delay_BFC03764 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03768: 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(0xBFC03768u); #endif if (psx_delay_BFC03764) { psx_delay_BFC03764 = 0; if (psx_taken_BFC03764) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03734u); goto label_BFC03734; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0376Cu); } label_BFC0376C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0376Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0376Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0376Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0376C: 0FF00D01 jal 0xBFC03404 */ cpu->gpr[31] = 0xBFC03774u; /* jal link before delay slot */ psx_delay_BFC0376C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03770: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03770u); #endif if (psx_delay_BFC0376C) { psx_delay_BFC0376C = 0; cpu->gpr[31] = 0xBFC03774u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } label_BFC03774: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03774u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03774: 1040FFFB beq $v0, $zero, 0xBFC03764 */ uint32_t psx_brA_BFC03774 = cpu->gpr[2]; uint32_t psx_brB_BFC03774 = cpu->gpr[0]; psx_taken_BFC03774 = (psx_brA_BFC03774 == psx_brB_BFC03774); psx_delay_BFC03774 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03778: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03778u); #endif if (psx_delay_BFC03774) { psx_delay_BFC03774 = 0; if (psx_taken_BFC03774) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03764u); goto label_BFC03764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0377Cu); } label_BFC0377C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0377Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0377Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0377Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0377C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0377Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03780u); #endif /* 0xBFC03780: 8E030004 lw $v1, 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, 0xBFC03780u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03784u); #endif /* 0xBFC03784: 8C425E34 lw $v0, 24116($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03784u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425E34u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03788: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC0378C: 1462FFF5 bne $v1, $v0, 0xBFC03764 */ uint32_t psx_brA_BFC0378C = cpu->gpr[3]; uint32_t psx_brB_BFC0378C = cpu->gpr[2]; psx_taken_BFC0378C = (psx_brA_BFC0378C != psx_brB_BFC0378C); psx_delay_BFC0378C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC03790: 001122C3 sra $a0, $s1, 11 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] >> 11u); PGXP_ALU(0x001122C3u, cpu->gpr[4], _pgx1, 11u); } #ifdef PSX_COSIM cosim_instr(0xBFC03790u); #endif if (psx_delay_BFC0378C) { psx_delay_BFC0378C = 0; if (psx_taken_BFC0378C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03764u); goto label_BFC03764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03794u); } label_BFC03794: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03794u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03794u); #endif /* 0xBFC03794: 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, 0xBFC03794u); 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(0xBFC03794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03798u); #endif /* 0xBFC03798: 8E050024 lw $a1, 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, 0xBFC03798u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC03798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0379Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0379C: 000212C2 srl $v0, $v0, 11 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 11u; PGXP_ALU(0x000212C2u, cpu->gpr[2], _pgx1, 11u); } #ifdef PSX_COSIM cosim_instr(0xBFC0379Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037A0u); #endif /* 0xBFC037A0: 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, 0xBFC037A0u); 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(0xBFC037A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC037A4: 00452821 addu $a1, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00452821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC037A8: 0FF00E9E jal 0xBFC03A78 */ cpu->gpr[31] = 0xBFC037B0u; /* jal link before delay slot */ psx_delay_BFC037A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC037AC: AFA40010 sw $a0, 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, 0xBFC037ACu); return; } g_debug_last_store_pc = 0xBFC037ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC037ACu); #endif if (psx_delay_BFC037A8) { psx_delay_BFC037A8 = 0; cpu->gpr[31] = 0xBFC037B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A78u); cpu->pc = 0xBFC03A78u; return; } label_BFC037B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC037B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC037B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037B0u); #endif /* 0xBFC037B0: 8FA40010 lw $a0, 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, 0xBFC037B0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC037B0u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC037B8: 1444FFEA bne $v0, $a0, 0xBFC03764 */ uint32_t psx_brA_BFC037B8 = cpu->gpr[2]; uint32_t psx_brB_BFC037B8 = cpu->gpr[4]; psx_taken_BFC037B8 = (psx_brA_BFC037B8 != psx_brB_BFC037B8); psx_delay_BFC037B8 = 1; #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 if (psx_delay_BFC037B8) { psx_delay_BFC037B8 = 0; if (psx_taken_BFC037B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03764u); goto label_BFC03764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC037C0u); } 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 /* 0xBFC037C0: 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, 0xBFC037C0u); 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(0xBFC037C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC037C4: 2402F800 addiu $v0, $zero, -2048 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-2048)); PGXP_ALU(0x2402F800u, cpu->gpr[2], _pgx1, 0xFFFFF800u); } #ifdef PSX_COSIM cosim_instr(0xBFC037C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037C8u); #endif /* 0xBFC037C8: 8E050020 lw $a1, 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, 0xBFC037C8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050020u, _pgxa, cpu->gpr[5]); } #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, 0x20004u); #endif /* 0xBFC037CC: 02221024 and $v0, $s1, $v0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2]; PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC037D0: 00432021 addu $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00432021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC037D4: 00A4202B sltu $a0, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x00A4202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC037D8: 10800002 beq $a0, $zero, 0xBFC037E4 */ uint32_t psx_brA_BFC037D8 = cpu->gpr[4]; uint32_t psx_brB_BFC037D8 = cpu->gpr[0]; psx_taken_BFC037D8 = (psx_brA_BFC037D8 == psx_brB_BFC037D8); psx_delay_BFC037D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC037DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC037DCu); #endif if (psx_delay_BFC037D8) { psx_delay_BFC037D8 = 0; if (psx_taken_BFC037D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC037E4u); goto label_BFC037E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC037E0u); } label_BFC037E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC037E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC037E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2Cu); #endif /* 0xBFC037E0: 00A31023 subu $v0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[5] - cpu->gpr[3]; PGXP_ALU(0x00A31023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037E0u); #endif label_BFC037E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC037E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC037E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC037E4: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC037E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC037E8: 1000FFD4 beq $zero, $zero, 0xBFC0373C */ uint32_t psx_brA_BFC037E8 = cpu->gpr[0]; uint32_t psx_brB_BFC037E8 = cpu->gpr[0]; psx_taken_BFC037E8 = (psx_brA_BFC037E8 == psx_brB_BFC037E8); psx_delay_BFC037E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC037EC: 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, 0xBFC037ECu); return; } g_debug_last_store_pc = 0xBFC037ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC037ECu); #endif if (psx_delay_BFC037E8) { psx_delay_BFC037E8 = 0; if (psx_taken_BFC037E8) { #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, 0xBFC037F0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC037F0u); cpu->pc = 0xBFC037F0u; return; /* fallthrough */ } void OpenBIOS_func_1FC037F0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC037F0u); int psx_delay_BFC03804 = 0; int psx_delay_BFC03810 = 0; int psx_taken_BFC03810 = 0; int psx_delay_BFC0381C = 0; int psx_delay_BFC03824 = 0; int psx_taken_BFC03824 = 0; int psx_delay_BFC03834 = 0; int psx_taken_BFC03834 = 0; int psx_delay_BFC03840 = 0; int psx_taken_BFC03840 = 0; int psx_delay_BFC03854 = 0; int psx_taken_BFC03854 = 0; int psx_delay_BFC0386C = 0; int psx_taken_BFC0386C = 0; int psx_delay_BFC03888 = 0; int psx_delay_BFC03894 = 0; int psx_taken_BFC03894 = 0; int psx_delay_BFC038DC = 0; int psx_taken_BFC038DC = 0; int psx_delay_BFC038F4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0380Cu: goto label_BFC0380C; case 0xBFC03818u: goto label_BFC03818; case 0xBFC03824u: goto label_BFC03824; case 0xBFC0382Cu: goto label_BFC0382C; case 0xBFC0383Cu: goto label_BFC0383C; case 0xBFC03840u: goto label_BFC03840; case 0xBFC03848u: goto label_BFC03848; case 0xBFC0385Cu: goto label_BFC0385C; case 0xBFC03874u: goto label_BFC03874; case 0xBFC03890u: goto label_BFC03890; case 0xBFC0389Cu: goto label_BFC0389C; case 0xBFC038D0u: goto label_BFC038D0; case 0xBFC038E4u: goto label_BFC038E4; default: break; } } label_BFC037F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC037F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC037F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC037F0: 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(0xBFC037F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC037F4: 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, 0xBFC037F4u); return; } g_debug_last_store_pc = 0xBFC037F4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC037F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC037F8: 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, 0xBFC037F8u); return; } g_debug_last_store_pc = 0xBFC037F8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC037F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC037FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC037FC: 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, 0xBFC037FCu); return; } g_debug_last_store_pc = 0xBFC037FCu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC037FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC03800: 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, 0xBFC03800u); return; } g_debug_last_store_pc = 0xBFC03800u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #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, 0x80000000u); #endif /* 0xBFC03804: 0FF00C00 jal 0xBFC03000 */ cpu->gpr[31] = 0xBFC0380Cu; /* jal link before delay slot */ psx_delay_BFC03804 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC03808: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03808u); #endif if (psx_delay_BFC03804) { psx_delay_BFC03804 = 0; cpu->gpr[31] = 0xBFC0380Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03000u); cpu->pc = 0xBFC03000u; return; } 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, 0x4u); #endif /* 0xBFC0380C: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC0380Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03810: 1040000D beq $v0, $zero, 0xBFC03848 */ uint32_t psx_brA_BFC03810 = cpu->gpr[2]; uint32_t psx_brB_BFC03810 = cpu->gpr[0]; psx_taken_BFC03810 = (psx_brA_BFC03810 == psx_brB_BFC03810); psx_delay_BFC03810 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03814: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03814u); #endif if (psx_delay_BFC03810) { psx_delay_BFC03810 = 0; if (psx_taken_BFC03810) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03848u); goto label_BFC03848; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03818u); } label_BFC03818: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03818u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03818u); #endif /* 0xBFC03818: 8E325E34 lw $s2, 24116($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03818u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000u); } PGXP_LOAD(0x8E325E34u, _pgxa, cpu->gpr[18]); } #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, 0x80000000u); #endif /* 0xBFC0381C: 0FF00D01 jal 0xBFC03404 */ cpu->gpr[31] = 0xBFC03824u; /* jal link before delay slot */ 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; cpu->gpr[31] = 0xBFC03824u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03824: 10400006 beq $v0, $zero, 0xBFC03840 */ uint32_t psx_brA_BFC03824 = cpu->gpr[2]; uint32_t psx_brB_BFC03824 = cpu->gpr[0]; psx_taken_BFC03824 = (psx_brA_BFC03824 == psx_brB_BFC03824); psx_delay_BFC03824 = 1; #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 if (psx_delay_BFC03824) { psx_delay_BFC03824 = 0; if (psx_taken_BFC03824) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03840u); goto label_BFC03840; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0382Cu); } 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 /* 0xBFC0382C: 8E225E34 lw $v0, 24116($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0382Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E225E34u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0382Cu); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC03834: 10520004 beq $v0, $s2, 0xBFC03848 */ uint32_t psx_brA_BFC03834 = cpu->gpr[2]; uint32_t psx_brB_BFC03834 = cpu->gpr[18]; psx_taken_BFC03834 = (psx_brA_BFC03834 == psx_brB_BFC03834); psx_delay_BFC03834 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03838: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03838u); #endif if (psx_delay_BFC03834) { psx_delay_BFC03834 = 0; if (psx_taken_BFC03834) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03848u); goto label_BFC03848; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0383Cu); } label_BFC0383C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0383Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0383Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0383Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000u); #endif /* 0xBFC0383C: AE325E34 sw $s2, 24116($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0383Cu); return; } g_debug_last_store_pc = 0xBFC0383Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE325E34u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC0383Cu); #endif label_BFC03840: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03840u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03840: 10000028 beq $zero, $zero, 0xBFC038E4 */ uint32_t psx_brA_BFC03840 = cpu->gpr[0]; uint32_t psx_brB_BFC03840 = cpu->gpr[0]; psx_taken_BFC03840 = (psx_brA_BFC03840 == psx_brB_BFC03840); psx_delay_BFC03840 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03844: 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(0xBFC03844u); #endif if (psx_delay_BFC03840) { psx_delay_BFC03840 = 0; if (psx_taken_BFC03840) { #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, 0xBFC03848u); } label_BFC03848: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03848u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03848: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0384Cu); #endif /* 0xBFC0384C: 8C4352A4 lw $v1, 21156($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 21156; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (21156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0384Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4352A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0384Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03850: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03854: 14600007 bne $v1, $zero, 0xBFC03874 */ uint32_t psx_brA_BFC03854 = cpu->gpr[3]; 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, 0x8u); #endif /* 0xBFC03858: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0xBFC03874u); goto label_BFC03874; } #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 /* 0xBFC0385C: 8C645670 lw $a0, 22128($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 22128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (22128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0385Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C645670u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0385Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03860: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03864u); #endif /* 0xBFC03864: 8C6352A0 lw $v1, 21152($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 21152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (21152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03864u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C6352A0u, _pgxa, cpu->gpr[3]); } #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: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0386Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0386C: 1483FFF4 bne $a0, $v1, 0xBFC03840 */ uint32_t psx_brA_BFC0386C = cpu->gpr[4]; uint32_t psx_brB_BFC0386C = cpu->gpr[3]; psx_taken_BFC0386C = (psx_brA_BFC0386C != psx_brB_BFC0386C); psx_delay_BFC0386C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03870: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03870u); #endif if (psx_delay_BFC0386C) { psx_delay_BFC0386C = 0; if (psx_taken_BFC0386C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03840u); goto label_BFC03840; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03874u); } label_BFC03874: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03874u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03874: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03878u); #endif /* 0xBFC03878: 8E2452A8 lw $a0, 21160($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 21160; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (21160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03878u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000u); } PGXP_LOAD(0x8E2452A8u, _pgxa, cpu->gpr[4]); } #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, 0x20u); #endif /* 0xBFC0387C: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0x20u); #endif /* 0xBFC03880: 24A55288 addiu $a1, $a1, 21128 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (21128)); PGXP_ALU(0x24A55288u, cpu->gpr[5], _pgx1, 0x00005288u); } #ifdef PSX_COSIM cosim_instr(0xBFC03880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03884: 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(0xBFC03884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03888: 0FF00C43 jal 0xBFC0310C */ cpu->gpr[31] = 0xBFC03890u; /* jal link before delay slot */ psx_delay_BFC03888 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0388Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0388C: AC4052A4 sw $zero, 21156($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 21156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (21156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0388Cu); return; } g_debug_last_store_pc = 0xBFC0388Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC4052A4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0388Cu); #endif if (psx_delay_BFC03888) { psx_delay_BFC03888 = 0; cpu->gpr[31] = 0xBFC03890u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0310Cu); cpu->pc = 0xBFC0310Cu; return; } label_BFC03890: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03890u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03890: 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(0xBFC03890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03894: 1043FFEA beq $v0, $v1, 0xBFC03840 */ uint32_t psx_brA_BFC03894 = cpu->gpr[2]; uint32_t psx_brB_BFC03894 = cpu->gpr[3]; psx_taken_BFC03894 = (psx_brA_BFC03894 == psx_brB_BFC03894); psx_delay_BFC03894 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03898: 00022040 sll $a0, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 1u; PGXP_ALU(0x00022040u, cpu->gpr[4], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC03898u); #endif if (psx_delay_BFC03894) { psx_delay_BFC03894 = 0; if (psx_taken_BFC03894) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03840u); goto label_BFC03840; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0389Cu); } label_BFC0389C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0389Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0389Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0389Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0389C: AE2252A8 sw $v0, 21160($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 21160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (21160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0389Cu); return; } g_debug_last_store_pc = 0xBFC0389Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE2252A8u, _pgxa, cpu->gpr[2]); } #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, 0x8u); #endif /* 0xBFC038A0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC038A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC038A4: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC038A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC038A8: 246352AC addiu $v1, $v1, 21164 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (21164)); PGXP_ALU(0x246352ACu, cpu->gpr[3], _pgx1, 0x000052ACu); } #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, 0x4u); #endif /* 0xBFC038AC: 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(0xBFC038ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC038B0: 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(0xBFC038B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC038B4: 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, 0xBFC038B4u); return; } g_debug_last_store_pc = 0xBFC038B4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000014u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC038B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038B8u); #endif /* 0xBFC038B8: 8C850004 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC038B8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10u); } PGXP_LOAD(0x8C850004u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC038BC: 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(0xBFC038BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC038C0: AE050020 sw $a1, 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, 0xBFC038C0u); return; } g_debug_last_store_pc = 0xBFC038C0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050020u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC038C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038C4u); #endif /* 0xBFC038C4: 8C840008 lw $a0, 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, 0xBFC038C4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } PGXP_LOAD(0x8C840008u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC038C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC038C8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC038C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC038CC: AE040018 sw $a0, 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, 0xBFC038CCu); return; } g_debug_last_store_pc = 0xBFC038CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE040018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC038CCu); #endif 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 /* 0xBFC038D0: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC038D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC038D4: 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(0xBFC038D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC038D8: 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(0xBFC038D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC038DC: 1460FFFC bne $v1, $zero, 0xBFC038D0 */ uint32_t psx_brA_BFC038DC = cpu->gpr[3]; 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, 0x10008u); #endif /* 0xBFC038E0: A203FFFF sb $v1, -1($s0) */ { uint32_t _pgxa = cpu->gpr[16] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC038E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA203FFFFu, _pgxa, cpu->gpr[3]); } #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, 0xBFC038D0u); goto label_BFC038D0; } #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 /* 0xBFC038E4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC038E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC038E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038E8u); #endif /* 0xBFC038E8: 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, 0xBFC038E8u); 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(0xBFC038E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038ECu); #endif /* 0xBFC038EC: 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, 0xBFC038ECu); 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(0xBFC038ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038F0u); #endif /* 0xBFC038F0: 8FB00010 lw $s0, 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, 0xBFC038F0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC038F4: 03E00008 jr $ra */ psx_delay_BFC038F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC038F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC038F8: 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(0xBFC038F8u); #endif if (psx_delay_BFC038F4) { psx_delay_BFC038F4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC038FC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC038FCu); int psx_delay_BFC03910 = 0; int psx_delay_BFC0391C = 0; int psx_taken_BFC0391C = 0; int psx_delay_BFC0393C = 0; int psx_taken_BFC0393C = 0; int psx_delay_BFC03944 = 0; int psx_taken_BFC03944 = 0; int psx_delay_BFC0395C = 0; int psx_taken_BFC0395C = 0; int psx_delay_BFC03978 = 0; int psx_delay_BFC03998 = 0; int psx_delay_BFC039A0 = 0; int psx_taken_BFC039A0 = 0; int psx_delay_BFC039A8 = 0; int psx_taken_BFC039A8 = 0; int psx_delay_BFC039B4 = 0; int psx_taken_BFC039B4 = 0; int psx_delay_BFC039D8 = 0; int psx_taken_BFC039D8 = 0; int psx_delay_BFC039E0 = 0; int psx_taken_BFC039E0 = 0; int psx_delay_BFC039EC = 0; int psx_taken_BFC039EC = 0; int psx_delay_BFC03A00 = 0; int psx_taken_BFC03A00 = 0; int psx_delay_BFC03A0C = 0; int psx_taken_BFC03A0C = 0; int psx_delay_BFC03A14 = 0; int psx_taken_BFC03A14 = 0; int psx_delay_BFC03A28 = 0; int psx_taken_BFC03A28 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03918u: goto label_BFC03918; case 0xBFC03924u: goto label_BFC03924; case 0xBFC03930u: goto label_BFC03930; case 0xBFC03944u: goto label_BFC03944; case 0xBFC0394Cu: goto label_BFC0394C; case 0xBFC03954u: goto label_BFC03954; case 0xBFC03964u: goto label_BFC03964; case 0xBFC03968u: goto label_BFC03968; case 0xBFC03980u: goto label_BFC03980; case 0xBFC03990u: goto label_BFC03990; case 0xBFC039A0u: goto label_BFC039A0; case 0xBFC039A8u: goto label_BFC039A8; case 0xBFC039B0u: goto label_BFC039B0; case 0xBFC039BCu: goto label_BFC039BC; case 0xBFC039C8u: goto label_BFC039C8; case 0xBFC039D0u: goto label_BFC039D0; case 0xBFC039E0u: goto label_BFC039E0; case 0xBFC039E8u: goto label_BFC039E8; case 0xBFC039F4u: goto label_BFC039F4; case 0xBFC039FCu: goto label_BFC039FC; case 0xBFC03A08u: goto label_BFC03A08; case 0xBFC03A14u: goto label_BFC03A14; case 0xBFC03A1Cu: goto label_BFC03A1C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC038FC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20010000u); #endif /* 0xBFC03900: 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, 0xBFC03900u); return; } g_debug_last_store_pc = 0xBFC03900u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC03900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC03904: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03904u); return; } g_debug_last_store_pc = 0xBFC03904u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03908: 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, 0xBFC03908u); return; } g_debug_last_store_pc = 0xBFC03908u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0390Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0390C: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0390Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03910: 0FF00D01 jal 0xBFC03404 */ cpu->gpr[31] = 0xBFC03918u; /* jal link before delay slot */ psx_delay_BFC03910 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC03914: 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, 0xBFC03914u); return; } g_debug_last_store_pc = 0xBFC03914u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC03914u); #endif if (psx_delay_BFC03910) { psx_delay_BFC03910 = 0; cpu->gpr[31] = 0xBFC03918u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } label_BFC03918: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03918u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC03918: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0391Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0391C: 1060001C beq $v1, $zero, 0xBFC03990 */ uint32_t psx_brA_BFC0391C = cpu->gpr[3]; uint32_t psx_brB_BFC0391C = cpu->gpr[0]; psx_taken_BFC0391C = (psx_brA_BFC0391C == psx_brB_BFC0391C); psx_delay_BFC0391C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03920: 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(0xBFC03920u); #endif if (psx_delay_BFC0391C) { psx_delay_BFC0391C = 0; if (psx_taken_BFC0391C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03990u); goto label_BFC03990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03924u); } label_BFC03924: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03924u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03924u); #endif /* 0xBFC03924: 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, 0xBFC03924u); 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(0xBFC03924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03928u); #endif /* 0xBFC03928: 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, 0xBFC03928u); 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(0xBFC03928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0392Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0392C: 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(0xBFC0392Cu); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000Cu); #endif /* 0xBFC03930: 02031021 addu $v0, $s0, $v1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[3]; PGXP_ALU(0x02031021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03934u); #endif /* 0xBFC03934: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC03938: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC0393C: 14400018 bne $v0, $zero, 0xBFC039A0 */ uint32_t psx_brA_BFC0393C = cpu->gpr[2]; 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, 0x4u); #endif /* 0xBFC03940: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xBFC039A0u); goto label_BFC039A0; } #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, 0x9u); #endif /* 0xBFC03944: 14600028 bne $v1, $zero, 0xBFC039E8 */ uint32_t psx_brA_BFC03944 = cpu->gpr[3]; uint32_t psx_brB_BFC03944 = cpu->gpr[0]; psx_taken_BFC03944 = (psx_brA_BFC03944 != psx_brB_BFC03944); psx_delay_BFC03944 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03948: 24425288 addiu $v0, $v0, 21128 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (21128)); PGXP_ALU(0x24425288u, cpu->gpr[2], _pgx1, 0x00005288u); } #ifdef PSX_COSIM cosim_instr(0xBFC03948u); #endif if (psx_delay_BFC03944) { psx_delay_BFC03944 = 0; if (psx_taken_BFC03944) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039E8u); goto label_BFC039E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0394Cu); } label_BFC0394C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0394Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0394Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0394Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0394C: 2408003F addiu $t0, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2408003Fu, cpu->gpr[8], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC0394Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03950: 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(0xBFC03950u); #endif label_BFC03954: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03954u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8Cu); #endif /* 0xBFC03954: 00433821 addu $a3, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00433821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03958: 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(0xBFC03958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0395Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0395C: 1466FFFD bne $v1, $a2, 0xBFC03954 */ uint32_t psx_brA_BFC0395C = cpu->gpr[3]; uint32_t psx_brB_BFC0395C = cpu->gpr[6]; psx_taken_BFC0395C = (psx_brA_BFC0395C != psx_brB_BFC0395C); psx_delay_BFC0395C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC03960: A0E80000 sb $t0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03960u; 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(0xBFC03960u); #endif if (psx_delay_BFC0395C) { psx_delay_BFC0395C = 0; if (psx_taken_BFC0395C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03954u); goto label_BFC03954; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03964u); } label_BFC03964: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03964u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03964: A0400014 sb $zero, 20($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03964u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (20)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0400014u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC03964u); #endif 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, 0x4u); #endif /* 0xBFC03968: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, 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, 0x9u); #endif /* 0xBFC0396C: 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(0xBFC0396Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03970: AC4052A8 sw $zero, 21160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 21160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (21160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03970u); return; } g_debug_last_store_pc = 0xBFC03970u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC4052A8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC03970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03974: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03978: 0FF00DFC jal 0xBFC037F0 */ cpu->gpr[31] = 0xBFC03980u; /* jal link before delay slot */ psx_delay_BFC03978 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0397Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0397C: AC4352A4 sw $v1, 21156($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 21156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (21156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0397Cu); return; } g_debug_last_store_pc = 0xBFC0397Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4352A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0397Cu); #endif if (psx_delay_BFC03978) { psx_delay_BFC03978 = 0; cpu->gpr[31] = 0xBFC03980u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC037F0u); cpu->pc = 0xBFC037F0u; return; } label_BFC03980: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03980u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03980: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03984u); #endif /* 0xBFC03984: 8C645670 lw $a0, 22128($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 22128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (22128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03984u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C645670u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03988: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0398Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0398C: AC6452A0 sw $a0, 21152($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 21152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (21152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0398Cu); return; } g_debug_last_store_pc = 0xBFC0398Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC6452A0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0398Cu); #endif 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 /* 0xBFC03990: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03990u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03994u); #endif /* 0xBFC03994: 8FB00010 lw $s0, 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, 0xBFC03994u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC03998: 03E00008 jr $ra */ psx_delay_BFC03998 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0399Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0399C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0399Cu); #endif if (psx_delay_BFC03998) { psx_delay_BFC03998 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC039A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC039A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC039A0: 1000FFE3 beq $zero, $zero, 0xBFC03930 */ uint32_t psx_brA_BFC039A0 = cpu->gpr[0]; uint32_t psx_brB_BFC039A0 = cpu->gpr[0]; psx_taken_BFC039A0 = (psx_brA_BFC039A0 == psx_brB_BFC039A0); psx_delay_BFC039A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC039A4: 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(0xBFC039A4u); #endif if (psx_delay_BFC039A0) { psx_delay_BFC039A0 = 0; if (psx_taken_BFC039A0) { #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, 0xBFC039A8u); } label_BFC039A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC039A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC039A8: 1067001C beq $v1, $a3, 0xBFC03A1C */ uint32_t psx_brA_BFC039A8 = cpu->gpr[3]; uint32_t psx_brB_BFC039A8 = cpu->gpr[7]; psx_taken_BFC039A8 = (psx_brA_BFC039A8 == psx_brB_BFC039A8); psx_delay_BFC039A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC039AC: 2466FF9F addiu $a2, $v1, -97 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] + (-97)); PGXP_ALU(0x2466FF9Fu, cpu->gpr[6], _pgx1, 0xFFFFFF9Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC039ACu); #endif if (psx_delay_BFC039A8) { psx_delay_BFC039A8 = 0; if (psx_taken_BFC039A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A1Cu); goto label_BFC03A1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039B0u); } 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, 0x40u); #endif /* 0xBFC039B0: 2CC6001A sltiu $a2, $a2, 26 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2CC6001Au, cpu->gpr[6], _pgx1, 0x001Au); } #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, 0x41u); #endif /* 0xBFC039B4: 10C00004 beq $a2, $zero, 0xBFC039C8 */ uint32_t psx_brA_BFC039B4 = cpu->gpr[6]; uint32_t psx_brB_BFC039B4 = cpu->gpr[0]; psx_taken_BFC039B4 = (psx_brA_BFC039B4 == psx_brB_BFC039B4); psx_delay_BFC039B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC039B8: 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(0xBFC039B8u); #endif if (psx_delay_BFC039B4) { psx_delay_BFC039B4 = 0; if (psx_taken_BFC039B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039C8u); goto label_BFC039C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039BCu); } label_BFC039BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC039BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC039BC: 00681824 and $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(0x00681824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC039BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC039C0: 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(0xBFC039C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC039C4: 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(0xBFC039C4u); #endif label_BFC039C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC039C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC039C8: 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(0xBFC039C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC039CC: A043FFFF sb $v1, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC039CCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA043FFFFu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC039CCu); #endif label_BFC039D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC039D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039D0u); #endif /* 0xBFC039D0: 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(0xBFC039D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC039D4: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC039D8: 1460FFF3 bne $v1, $zero, 0xBFC039A8 */ uint32_t psx_brA_BFC039D8 = cpu->gpr[3]; uint32_t psx_brB_BFC039D8 = cpu->gpr[0]; psx_taken_BFC039D8 = (psx_brA_BFC039D8 != psx_brB_BFC039D8); psx_delay_BFC039D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC039DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC039DCu); #endif if (psx_delay_BFC039D8) { psx_delay_BFC039D8 = 0; if (psx_taken_BFC039D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039A8u); goto label_BFC039A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039E0u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC039E0: 1000FFE1 beq $zero, $zero, 0xBFC03968 */ uint32_t psx_brA_BFC039E0 = cpu->gpr[0]; uint32_t psx_brB_BFC039E0 = cpu->gpr[0]; psx_taken_BFC039E0 = (psx_brA_BFC039E0 == psx_brB_BFC039E0); psx_delay_BFC039E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC039E4: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC039E4u; 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(0xBFC039E4u); #endif if (psx_delay_BFC039E0) { psx_delay_BFC039E0 = 0; if (psx_taken_BFC039E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03968u); goto label_BFC03968; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039E8u); } label_BFC039E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC039E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC039E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC039E8: 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(0xBFC039E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC039EC: 1000FFF8 beq $zero, $zero, 0xBFC039D0 */ uint32_t psx_brA_BFC039EC = cpu->gpr[0]; uint32_t psx_brB_BFC039EC = cpu->gpr[0]; psx_taken_BFC039EC = (psx_brA_BFC039EC == psx_brB_BFC039EC); psx_delay_BFC039EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC039F0: 2408FFDF addiu $t0, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2408FFDFu, cpu->gpr[8], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC039F0u); #endif if (psx_delay_BFC039EC) { psx_delay_BFC039EC = 0; if (psx_taken_BFC039EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039D0u); goto label_BFC039D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039F4u); } 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, 0x40u); #endif /* 0xBFC039F4: 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(0xBFC039F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC039F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC039F8: A0C8FFFF sb $t0, -1($a2) */ { uint32_t _pgxa = cpu->gpr[6] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC039F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-1)), (uint8_t)(cpu->gpr[8] & 0xFFu)); PGXP_STORE(0xA0C8FFFFu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC039F8u); #endif 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, 0xC8u); #endif /* 0xBFC039FC: 00C3382B sltu $a3, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)(cpu->gpr[6] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x00C3382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC039FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC03A00: 14E0FFFC bne $a3, $zero, 0xBFC039F4 */ uint32_t psx_brA_BFC03A00 = cpu->gpr[7]; uint32_t psx_brB_BFC03A00 = cpu->gpr[0]; psx_taken_BFC03A00 = (psx_brA_BFC03A00 != psx_brB_BFC03A00); psx_delay_BFC03A00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03A04u); #endif if (psx_delay_BFC03A00) { psx_delay_BFC03A00 = 0; if (psx_taken_BFC03A00) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039F4u); goto label_BFC039F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A08u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC03A08: 0043302B sltu $a2, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x41u); #endif /* 0xBFC03A0C: 10C0FFF4 beq $a2, $zero, 0xBFC039E0 */ uint32_t psx_brA_BFC03A0C = cpu->gpr[6]; uint32_t psx_brB_BFC03A0C = cpu->gpr[0]; psx_taken_BFC03A0C = (psx_brA_BFC03A0C == psx_brB_BFC03A0C); psx_delay_BFC03A0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03A10u); #endif if (psx_delay_BFC03A0C) { psx_delay_BFC03A0C = 0; if (psx_taken_BFC03A0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039E0u); goto label_BFC039E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A14u); } label_BFC03A14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A14: 1000FFF2 beq $zero, $zero, 0xBFC039E0 */ uint32_t psx_brA_BFC03A14 = cpu->gpr[0]; uint32_t psx_brB_BFC03A14 = cpu->gpr[0]; psx_taken_BFC03A14 = (psx_brA_BFC03A14 == psx_brB_BFC03A14); psx_delay_BFC03A14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC03A18: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03A18u); #endif if (psx_delay_BFC03A14) { psx_delay_BFC03A14 = 0; if (psx_taken_BFC03A14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC039E0u); goto label_BFC039E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A1Cu); } label_BFC03A1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03A1C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x45u); #endif /* 0xBFC03A20: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x8u); #endif /* 0xBFC03A24: 2463529C addiu $v1, $v1, 21148 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (21148)); PGXP_ALU(0x2463529Cu, cpu->gpr[3], _pgx1, 0x0000529Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC03A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A28: 1000FFF4 beq $zero, $zero, 0xBFC039FC */ uint32_t psx_brA_BFC03A28 = cpu->gpr[0]; uint32_t psx_brB_BFC03A28 = cpu->gpr[0]; psx_taken_BFC03A28 = (psx_brA_BFC03A28 == psx_brB_BFC03A28); psx_delay_BFC03A28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC03A2C: 2408003F addiu $t0, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2408003Fu, cpu->gpr[8], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC03A2Cu); #endif if (psx_delay_BFC03A28) { psx_delay_BFC03A28 = 0; if (psx_taken_BFC03A28) { #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, 0xBFC03A30u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A30u); cpu->pc = 0xBFC03A30u; return; /* fallthrough */ } void OpenBIOS_func_1FC03A30(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03A30u); int psx_delay_BFC03A44 = 0; int psx_taken_BFC03A44 = 0; int psx_delay_BFC03A4C = 0; int psx_delay_BFC03A58 = 0; int psx_taken_BFC03A58 = 0; int psx_delay_BFC03A70 = 0; int psx_taken_BFC03A70 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03A3Cu: goto label_BFC03A3C; case 0xBFC03A4Cu: goto label_BFC03A4C; case 0xBFC03A54u: goto label_BFC03A54; case 0xBFC03A60u: goto label_BFC03A60; case 0xBFC03A6Cu: goto label_BFC03A6C; default: break; } } label_BFC03A30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03A30: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03A34: 24635E38 addiu $v1, $v1, 24120 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (24120)); PGXP_ALU(0x24635E38u, cpu->gpr[3], _pgx1, 0x00005E38u); } #ifdef PSX_COSIM cosim_instr(0xBFC03A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03A38: 2406FFDF addiu $a2, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2406FFDFu, cpu->gpr[6], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC03A38u); #endif 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: 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(0xBFC03A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A40: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03A44: 14400003 bne $v0, $zero, 0xBFC03A54 */ uint32_t psx_brA_BFC03A44 = cpu->gpr[2]; uint32_t psx_brB_BFC03A44 = cpu->gpr[0]; psx_taken_BFC03A44 = (psx_brA_BFC03A44 != psx_brB_BFC03A44); psx_delay_BFC03A44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03A48: 2444FF9F addiu $a0, $v0, -97 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (-97)); PGXP_ALU(0x2444FF9Fu, cpu->gpr[4], _pgx1, 0xFFFFFF9Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC03A48u); #endif if (psx_delay_BFC03A44) { psx_delay_BFC03A44 = 0; if (psx_taken_BFC03A44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A54u); goto label_BFC03A54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A4Cu); } label_BFC03A4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC03A4C: 0BF00D01 j 0xBFC03404 */ psx_delay_BFC03A4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03A50: A0600000 sb $zero, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03A50u; 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(0xBFC03A50u); #endif if (psx_delay_BFC03A4C) { psx_delay_BFC03A4C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03404u); cpu->pc = 0xBFC03404u; return; } 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, 0x10u); #endif /* 0xBFC03A54: 2C84001A sltiu $a0, $a0, 26 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C84001Au, cpu->gpr[4], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0xBFC03A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03A58: 10800004 beq $a0, $zero, 0xBFC03A6C */ uint32_t psx_brA_BFC03A58 = cpu->gpr[4]; uint32_t psx_brB_BFC03A58 = cpu->gpr[0]; psx_taken_BFC03A58 = (psx_brA_BFC03A58 == psx_brB_BFC03A58); psx_delay_BFC03A58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03A5C: 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(0xBFC03A5Cu); #endif if (psx_delay_BFC03A58) { psx_delay_BFC03A58 = 0; if (psx_taken_BFC03A58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A6Cu); goto label_BFC03A6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A60u); } label_BFC03A60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC03A60: 00461024 and $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(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03A64: 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(0xBFC03A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03A68: 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(0xBFC03A68u); #endif label_BFC03A6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03A6C: 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(0xBFC03A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03A70: 1000FFF2 beq $zero, $zero, 0xBFC03A3C */ uint32_t psx_brA_BFC03A70 = cpu->gpr[0]; uint32_t psx_brB_BFC03A70 = cpu->gpr[0]; psx_taken_BFC03A70 = (psx_brA_BFC03A70 == psx_brB_BFC03A70); psx_delay_BFC03A70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03A74: A062FFFF sb $v0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03A74u; 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(0xBFC03A74u); #endif if (psx_delay_BFC03A70) { psx_delay_BFC03A70 = 0; if (psx_taken_BFC03A70) { #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, 0xBFC03A78u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A78u); cpu->pc = 0xBFC03A78u; return; /* fallthrough */ } void OpenBIOS_func_1FC03A78(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03A78u); int psx_delay_BFC03A80 = 0; int psx_taken_BFC03A80 = 0; int psx_delay_BFC03ADC = 0; int psx_taken_BFC03ADC = 0; int psx_delay_BFC03AF8 = 0; int psx_taken_BFC03AF8 = 0; int psx_delay_BFC03B18 = 0; int psx_taken_BFC03B18 = 0; int psx_delay_BFC03B2C = 0; int psx_taken_BFC03B2C = 0; int psx_delay_BFC03B44 = 0; int psx_taken_BFC03B44 = 0; int psx_delay_BFC03B70 = 0; int psx_delay_BFC03B78 = 0; int psx_taken_BFC03B78 = 0; int psx_delay_BFC03B94 = 0; int psx_delay_BFC03B9C = 0; int psx_taken_BFC03B9C = 0; int psx_delay_BFC03BBC = 0; int psx_delay_BFC03BC4 = 0; int psx_taken_BFC03BC4 = 0; int psx_delay_BFC03BE0 = 0; int psx_delay_BFC03BE8 = 0; int psx_taken_BFC03BE8 = 0; int psx_delay_BFC03BF4 = 0; int psx_delay_BFC03BFC = 0; int psx_taken_BFC03BFC = 0; int psx_delay_BFC03C08 = 0; int psx_delay_BFC03C10 = 0; int psx_taken_BFC03C10 = 0; int psx_delay_BFC03C18 = 0; int psx_taken_BFC03C18 = 0; int psx_delay_BFC03C20 = 0; int psx_taken_BFC03C20 = 0; int psx_delay_BFC03C30 = 0; int psx_delay_BFC03C64 = 0; int psx_delay_BFC03C70 = 0; int psx_delay_BFC03C78 = 0; int psx_taken_BFC03C78 = 0; int psx_delay_BFC03C88 = 0; int psx_delay_BFC03C90 = 0; int psx_taken_BFC03C90 = 0; int psx_delay_BFC03C98 = 0; int psx_taken_BFC03C98 = 0; int psx_delay_BFC03CA8 = 0; int psx_delay_BFC03CB0 = 0; int psx_taken_BFC03CB0 = 0; int psx_delay_BFC03CC8 = 0; int psx_delay_BFC03CD0 = 0; int psx_taken_BFC03CD0 = 0; int psx_delay_BFC03CDC = 0; int psx_delay_BFC03CE4 = 0; int psx_taken_BFC03CE4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03A88u: goto label_BFC03A88; case 0xBFC03A8Cu: goto label_BFC03A8C; case 0xBFC03AE4u: goto label_BFC03AE4; case 0xBFC03AE8u: goto label_BFC03AE8; case 0xBFC03B00u: goto label_BFC03B00; case 0xBFC03B04u: goto label_BFC03B04; case 0xBFC03B20u: goto label_BFC03B20; case 0xBFC03B24u: goto label_BFC03B24; case 0xBFC03B34u: goto label_BFC03B34; case 0xBFC03B38u: goto label_BFC03B38; case 0xBFC03B4Cu: goto label_BFC03B4C; case 0xBFC03B50u: goto label_BFC03B50; case 0xBFC03B68u: goto label_BFC03B68; case 0xBFC03B70u: goto label_BFC03B70; case 0xBFC03B78u: goto label_BFC03B78; case 0xBFC03B80u: goto label_BFC03B80; case 0xBFC03B90u: goto label_BFC03B90; case 0xBFC03B9Cu: goto label_BFC03B9C; case 0xBFC03BA4u: goto label_BFC03BA4; case 0xBFC03BB4u: goto label_BFC03BB4; case 0xBFC03BC4u: goto label_BFC03BC4; case 0xBFC03BCCu: goto label_BFC03BCC; case 0xBFC03BDCu: goto label_BFC03BDC; case 0xBFC03BE8u: goto label_BFC03BE8; case 0xBFC03BF0u: goto label_BFC03BF0; case 0xBFC03BFCu: goto label_BFC03BFC; case 0xBFC03C04u: goto label_BFC03C04; case 0xBFC03C10u: goto label_BFC03C10; case 0xBFC03C18u: goto label_BFC03C18; case 0xBFC03C20u: goto label_BFC03C20; case 0xBFC03C28u: goto label_BFC03C28; case 0xBFC03C38u: goto label_BFC03C38; case 0xBFC03C3Cu: goto label_BFC03C3C; case 0xBFC03C6Cu: goto label_BFC03C6C; case 0xBFC03C78u: goto label_BFC03C78; case 0xBFC03C80u: goto label_BFC03C80; case 0xBFC03C84u: goto label_BFC03C84; case 0xBFC03C90u: goto label_BFC03C90; case 0xBFC03C98u: goto label_BFC03C98; case 0xBFC03CA0u: goto label_BFC03CA0; case 0xBFC03CB0u: goto label_BFC03CB0; case 0xBFC03CB8u: goto label_BFC03CB8; case 0xBFC03CD0u: goto label_BFC03CD0; case 0xBFC03CD8u: goto label_BFC03CD8; case 0xBFC03CE4u: goto label_BFC03CE4; default: break; } } label_BFC03A78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC03A78: 24A30096 addiu $v1, $a1, 150 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[5] + (150)); PGXP_ALU(0x24A30096u, cpu->gpr[3], _pgx1, 0x00000096u); } #ifdef PSX_COSIM cosim_instr(0xBFC03A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03A7C: 24021194 addiu $v0, $zero, 4500 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (4500)); PGXP_ALU(0x24021194u, cpu->gpr[2], _pgx1, 0x00001194u); } #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, 0x5u); #endif /* 0xBFC03A80: 14400002 bne $v0, $zero, 0xBFC03A8C */ uint32_t psx_brA_BFC03A80 = cpu->gpr[2]; uint32_t psx_brB_BFC03A80 = cpu->gpr[0]; psx_taken_BFC03A80 = (psx_brA_BFC03A80 != psx_brB_BFC03A80); psx_delay_BFC03A80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03A84: 0062001A div $v1, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0062001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC03A84u); #endif if (psx_delay_BFC03A80) { psx_delay_BFC03A80 = 0; if (psx_taken_BFC03A80) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A8Cu); goto label_BFC03A8C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03A88u); } 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, 0x0u); #endif /* 0xBFC03A88: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03A88u); return; #ifdef PSX_COSIM cosim_instr(0xBFC03A88u); #endif label_BFC03A8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03A8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03A8C: 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(0xBFC03A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03A90: 2402000A addiu $v0, $zero, 10 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); PGXP_ALU(0x2402000Au, cpu->gpr[2], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC03A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC03A94: 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, 0xBFC03A94u); return; } g_debug_last_store_pc = 0xBFC03A94u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #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, 0x10011u); #endif /* 0xBFC03A98: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x81u); #endif /* 0xBFC03A9C: 2407004B addiu $a3, $zero, 75 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); PGXP_ALU(0x2407004Bu, cpu->gpr[7], _pgx1, 0x0000004Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC03A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC03AA0: 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, 0xBFC03AA0u); return; } g_debug_last_store_pc = 0xBFC03AA0u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC03AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC03AA4: 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, 0xBFC03AA4u); return; } g_debug_last_store_pc = 0xBFC03AA4u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC03AA8: 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, 0xBFC03AA8u); return; } g_debug_last_store_pc = 0xBFC03AA8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } #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, 0xA0000000u); #endif /* 0xBFC03AAC: 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, 0xBFC03AACu); return; } g_debug_last_store_pc = 0xBFC03AACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #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, 0x20800000u); #endif /* 0xBFC03AB0: 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, 0xBFC03AB0u); return; } g_debug_last_store_pc = 0xBFC03AB0u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70038u, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC03AB4: 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, 0xBFC03AB4u); return; } g_debug_last_store_pc = 0xBFC03AB4u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60034u, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC03AB8: 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, 0xBFC03AB8u); return; } g_debug_last_store_pc = 0xBFC03AB8u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC03AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC03ABC: 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, 0xBFC03ABCu); return; } g_debug_last_store_pc = 0xBFC03ABCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0x20000040u); #endif /* 0xBFC03AC0: 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, 0xBFC03AC0u); return; } g_debug_last_store_pc = 0xBFC03AC0u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60048u, _pgxa, cpu->gpr[6]); } #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, 0x40001u); #endif /* 0xBFC03AC4: 2412000A addiu $s2, $zero, 10 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); PGXP_ALU(0x2412000Au, cpu->gpr[18], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC03AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC03AC8: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC03ACC: 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(0xBFC03ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03AD0: 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(0xBFC03AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03AD4: 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(0xBFC03AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03AD8: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC03ADC: 14400002 bne $v0, $zero, 0xBFC03AE8 */ uint32_t psx_brA_BFC03ADC = cpu->gpr[2]; uint32_t psx_brB_BFC03ADC = cpu->gpr[0]; psx_taken_BFC03ADC = (psx_brA_BFC03ADC != psx_brB_BFC03ADC); psx_delay_BFC03ADC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03AE0: 0082001A div $a0, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[4]; 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(0x0082001Au, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC03AE0u); #endif if (psx_delay_BFC03ADC) { psx_delay_BFC03ADC = 0; if (psx_taken_BFC03ADC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03AE8u); goto label_BFC03AE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03AE4u); } label_BFC03AE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03AE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC03AE4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03AE4u); return; #ifdef PSX_COSIM cosim_instr(0xBFC03AE4u); #endif label_BFC03AE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03AE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03AE8: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #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, 0x10u); #endif /* 0xBFC03AEC: 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(0xBFC03AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03AF0: 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(0xBFC03AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC03AF4: 00852021 addu $a0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC03AF8: 14E00002 bne $a3, $zero, 0xBFC03B04 */ uint32_t psx_brA_BFC03AF8 = cpu->gpr[7]; uint32_t psx_brB_BFC03AF8 = cpu->gpr[0]; psx_taken_BFC03AF8 = (psx_brA_BFC03AF8 != psx_brB_BFC03AF8); psx_delay_BFC03AF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC03AFC: 0067001A div $v1, $a3 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0067001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[7]); #ifdef PSX_COSIM cosim_instr(0xBFC03AFCu); #endif if (psx_delay_BFC03AF8) { psx_delay_BFC03AF8 = 0; if (psx_taken_BFC03AF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B04u); goto label_BFC03B04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B00u); } label_BFC03B00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC03B00: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03B00u); return; #ifdef PSX_COSIM cosim_instr(0xBFC03B00u); #endif label_BFC03B04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03B04: A3A40010 sb $a0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03B04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA3A40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03B08: 240502EE addiu $a1, $zero, 750 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (750)); PGXP_ALU(0x240502EEu, cpu->gpr[5], _pgx1, 0x000002EEu); } #ifdef PSX_COSIM cosim_instr(0xBFC03B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03B0C: 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(0xBFC03B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC03B10: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #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, 0x1u); #endif /* 0xBFC03B14: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC03B18: 14400002 bne $v0, $zero, 0xBFC03B24 */ uint32_t psx_brA_BFC03B18 = cpu->gpr[2]; uint32_t psx_brB_BFC03B18 = cpu->gpr[0]; psx_taken_BFC03B18 = (psx_brA_BFC03B18 != psx_brB_BFC03B18); psx_delay_BFC03B18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03B1C: 0082001A div $a0, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[4]; 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(0x0082001Au, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC03B1Cu); #endif if (psx_delay_BFC03B18) { psx_delay_BFC03B18 = 0; if (psx_taken_BFC03B18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B24u); goto label_BFC03B24; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B20u); } 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, 0x0u); #endif /* 0xBFC03B20: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03B20u); return; #ifdef PSX_COSIM cosim_instr(0xBFC03B20u); #endif label_BFC03B24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03B24: 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(0xBFC03B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03B28: 00000000 nop */ /* nop */ #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, 0x21u); #endif /* 0xBFC03B2C: 14A00002 bne $a1, $zero, 0xBFC03B38 */ uint32_t psx_brA_BFC03B2C = cpu->gpr[5]; uint32_t psx_brB_BFC03B2C = cpu->gpr[0]; psx_taken_BFC03B2C = (psx_brA_BFC03B2C != psx_brB_BFC03B2C); psx_delay_BFC03B2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC03B30: 0065001A div $v1, $a1 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0065001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0xBFC03B30u); #endif if (psx_delay_BFC03B2C) { psx_delay_BFC03B2C = 0; if (psx_taken_BFC03B2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B38u); goto label_BFC03B38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B34u); } label_BFC03B34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC03B34: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03B34u); return; #ifdef PSX_COSIM cosim_instr(0xBFC03B34u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03B38: 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(0xBFC03B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03B3C: 00031900 sll $v1, $v1, 4 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 4u; PGXP_ALU(0x00031900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC03B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC03B40: 00832021 addu $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00832021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03B44: 14400002 bne $v0, $zero, 0xBFC03B50 */ uint32_t psx_brA_BFC03B44 = cpu->gpr[2]; uint32_t psx_brB_BFC03B44 = cpu->gpr[0]; psx_taken_BFC03B44 = (psx_brA_BFC03B44 != psx_brB_BFC03B44); psx_delay_BFC03B44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC03B48: 00E2001A div $a3, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[7]; 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(0x00E2001Au, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC03B48u); #endif if (psx_delay_BFC03B44) { psx_delay_BFC03B44 = 0; if (psx_taken_BFC03B44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B50u); goto label_BFC03B50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B4Cu); } label_BFC03B4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC03B4C: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC03B4Cu); return; #ifdef PSX_COSIM cosim_instr(0xBFC03B4Cu); #endif label_BFC03B50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03B50: A3A40011 sb $a0, 17($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 17; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03B50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (17)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA3A40011u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03B54: 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(0xBFC03B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03B58: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #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, 0x80u); #endif /* 0xBFC03B5C: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #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, 0x84u); #endif /* 0xBFC03B60: 00471021 addu $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[7]; PGXP_ALU(0x00471021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC03B64: A3A20012 sb $v0, 18($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 18; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03B64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (18)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA3A20012u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03B64u); #endif 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, 0x120000u); #endif /* 0xBFC03B68: 3691869F ori $s1, $s4, 0x869F */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[17] = cpu->gpr[20] | 0x869Fu; PGXP_ALU(0x3691869Fu, cpu->gpr[17], _pgx1, 0x869Fu); } #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, 0x201u); #endif /* 0xBFC03B6C: 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(0xBFC03B6Cu); #endif label_BFC03B70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80080000u); #endif /* 0xBFC03B70: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC03B78u; /* jalr 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: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03B74u); #endif if (psx_delay_BFC03B70) { psx_delay_BFC03B70 = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC03B78u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x5u); #endif /* 0xBFC03B78: 10400029 beq $v0, $zero, 0xBFC03C20 */ uint32_t psx_brA_BFC03B78 = cpu->gpr[2]; uint32_t psx_brB_BFC03B78 = cpu->gpr[0]; psx_taken_BFC03B78 = (psx_brA_BFC03B78 == psx_brB_BFC03B78); psx_delay_BFC03B78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03B7C: 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(0xBFC03B7Cu); #endif if (psx_delay_BFC03B78) { psx_delay_BFC03B78 = 0; if (psx_taken_BFC03B78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C20u); goto label_BFC03C20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B80u); } label_BFC03B80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03B80: 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(0xBFC03B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC03B84: 3C150000 lui $s5, 0x0 */ cpu->gpr[21] = 0x00000000u; PGXP_ALU(0x3C150000u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03B88: 241100B0 addiu $s1, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241100B0u, cpu->gpr[17], _pgx1, 0x000000B0u); } #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, 0x400000u); #endif /* 0xBFC03B8C: 3C160000 lui $s6, 0x0 */ cpu->gpr[22] = 0x00000000u; PGXP_ALU(0x3C160000u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03B8Cu); #endif label_BFC03B90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03B90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03B90u); #endif /* 0xBFC03B90: 8EA44BE0 lw $a0, 19424($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03B90u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200000u); } PGXP_LOAD(0x8EA44BE0u, _pgxa, cpu->gpr[4]); } #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, 0x80020000u); #endif /* 0xBFC03B94: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03B9Cu; /* jalr 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, 0x201u); #endif /* 0xBFC03B98: 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(0xBFC03B98u); #endif if (psx_delay_BFC03B94) { psx_delay_BFC03B94 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03B9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x5u); #endif /* 0xBFC03B9C: 10400033 beq $v0, $zero, 0xBFC03C6C */ uint32_t psx_brA_BFC03B9C = cpu->gpr[2]; uint32_t psx_brB_BFC03B9C = cpu->gpr[0]; psx_taken_BFC03B9C = (psx_brA_BFC03B9C == psx_brB_BFC03B9C); psx_delay_BFC03B9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03BA0: 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(0xBFC03BA0u); #endif if (psx_delay_BFC03B9C) { psx_delay_BFC03B9C = 0; if (psx_taken_BFC03B9C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C6Cu); goto label_BFC03C6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03BA4u); } label_BFC03BA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03BA4: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #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, 0x20000u); #endif /* 0xBFC03BA8: 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(0xBFC03BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC03BAC: 241600A0 addiu $s6, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241600A0u, cpu->gpr[22], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03BB0: 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(0xBFC03BB0u); #endif label_BFC03BB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BB4u); #endif /* 0xBFC03BB4: 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, 0xBFC03BB4u); 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(0xBFC03BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03BB8: 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(0xBFC03BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80400000u); #endif /* 0xBFC03BBC: 02C0F809 jalr $ra, $s6 */ cpu->gpr[31] = 0xBFC03BC4u; /* jalr link before delay slot */ psx_delay_BFC03BBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC03BC0: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03BC0u); #endif if (psx_delay_BFC03BBC) { psx_delay_BFC03BBC = 0; { uint32_t _t = cpu->gpr[22]; cpu->gpr[31] = 0xBFC03BC4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03BC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03BC4: 10400034 beq $v0, $zero, 0xBFC03C98 */ uint32_t psx_brA_BFC03BC4 = cpu->gpr[2]; uint32_t psx_brB_BFC03BC4 = cpu->gpr[0]; psx_taken_BFC03BC4 = (psx_brA_BFC03BC4 == psx_brB_BFC03BC4); psx_delay_BFC03BC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03BC8: 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(0xBFC03BC8u); #endif if (psx_delay_BFC03BC4) { psx_delay_BFC03BC4 = 0; if (psx_taken_BFC03BC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C98u); goto label_BFC03C98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03BCCu); } label_BFC03BCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC03BCC: 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(0xBFC03BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03BD0: 241100B0 addiu $s1, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241100B0u, cpu->gpr[17], _pgx1, 0x000000B0u); } #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, 0x800000u); #endif /* 0xBFC03BD4: 3C170000 lui $s7, 0x0 */ cpu->gpr[23] = 0x00000000u; PGXP_ALU(0x3C170000u, cpu->gpr[23], 0u, 0u); #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, 0x400000u); #endif /* 0xBFC03BD8: 3C160000 lui $s6, 0x0 */ cpu->gpr[22] = 0x00000000u; PGXP_ALU(0x3C160000u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03BD8u); #endif label_BFC03BDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BDCu); #endif /* 0xBFC03BDC: 8EA44BE0 lw $a0, 19424($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19424; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19424)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BDCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200000u); } PGXP_LOAD(0x8EA44BE0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03BE0: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03BE8u; /* jalr link before delay slot */ psx_delay_BFC03BE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03BE4: 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(0xBFC03BE4u); #endif if (psx_delay_BFC03BE0) { psx_delay_BFC03BE0 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03BE8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03BE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03BE8: 14400014 bne $v0, $zero, 0xBFC03C3C */ uint32_t psx_brA_BFC03BE8 = cpu->gpr[2]; uint32_t psx_brB_BFC03BE8 = cpu->gpr[0]; psx_taken_BFC03BE8 = (psx_brA_BFC03BE8 != psx_brB_BFC03BE8); psx_delay_BFC03BE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03BEC: 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(0xBFC03BECu); #endif if (psx_delay_BFC03BE8) { psx_delay_BFC03BE8 = 0; if (psx_taken_BFC03BE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C3Cu); goto label_BFC03C3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03BF0u); } label_BFC03BF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BF0u); #endif /* 0xBFC03BF0: 8EE44BD4 lw $a0, 19412($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03BF0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800000u); } PGXP_LOAD(0x8EE44BD4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03BF4: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03BFCu; /* jalr link before delay slot */ psx_delay_BFC03BF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03BF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03BF8u); #endif if (psx_delay_BFC03BF4) { psx_delay_BFC03BF4 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03BFCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03BFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03BFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03BFC: 1440002E bne $v0, $zero, 0xBFC03CB8 */ uint32_t psx_brA_BFC03BFC = cpu->gpr[2]; uint32_t psx_brB_BFC03BFC = cpu->gpr[0]; psx_taken_BFC03BFC = (psx_brA_BFC03BFC != psx_brB_BFC03BFC); psx_delay_BFC03BFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C00: 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(0xBFC03C00u); #endif if (psx_delay_BFC03BFC) { psx_delay_BFC03BFC = 0; if (psx_taken_BFC03BFC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03CB8u); goto label_BFC03CB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C04u); } label_BFC03C04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C04u); #endif /* 0xBFC03C04: 8EC44BD8 lw $a0, 19416($s6) */ { uint32_t _pgxa = cpu->gpr[22] + 19416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (19416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C04u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } PGXP_LOAD(0x8EC44BD8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03C08: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03C10u; /* jalr link before delay slot */ psx_delay_BFC03C08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03C0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03C0Cu); #endif if (psx_delay_BFC03C08) { psx_delay_BFC03C08 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03C10u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03C10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03C10: 1040FFF2 beq $v0, $zero, 0xBFC03BDC */ uint32_t psx_brA_BFC03C10 = cpu->gpr[2]; uint32_t psx_brB_BFC03C10 = cpu->gpr[0]; psx_taken_BFC03C10 = (psx_brA_BFC03C10 == psx_brB_BFC03C10); psx_delay_BFC03C10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C14: 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(0xBFC03C14u); #endif if (psx_delay_BFC03C10) { psx_delay_BFC03C10 = 0; if (psx_taken_BFC03C10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03BDCu); goto label_BFC03BDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C18u); } label_BFC03C18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03C18: 1000001A beq $zero, $zero, 0xBFC03C84 */ uint32_t psx_brA_BFC03C18 = cpu->gpr[0]; uint32_t psx_brB_BFC03C18 = cpu->gpr[0]; psx_taken_BFC03C18 = (psx_brA_BFC03C18 == psx_brB_BFC03C18); psx_delay_BFC03C18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03C1C: 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(0xBFC03C1Cu); #endif if (psx_delay_BFC03C18) { psx_delay_BFC03C18 = 0; if (psx_taken_BFC03C18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C84u); goto label_BFC03C84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C20u); } label_BFC03C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03C20: 1620FFD3 bne $s1, $zero, 0xBFC03B70 */ uint32_t psx_brA_BFC03C20 = cpu->gpr[17]; uint32_t psx_brB_BFC03C20 = cpu->gpr[0]; psx_taken_BFC03C20 = (psx_brA_BFC03C20 != psx_brB_BFC03C20); psx_delay_BFC03C20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C24: 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(0xBFC03C24u); #endif if (psx_delay_BFC03C20) { psx_delay_BFC03C20 = 0; if (psx_taken_BFC03C20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B70u); goto label_BFC03B70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C28u); } label_BFC03C28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C28: 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(0xBFC03C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03C2C: 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(0xBFC03C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80080000u); #endif /* 0xBFC03C30: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC03C38u; /* jalr link before delay slot */ psx_delay_BFC03C30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03C34: 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(0xBFC03C34u); #endif if (psx_delay_BFC03C30) { psx_delay_BFC03C30 = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC03C38u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03C38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03C38: 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(0xBFC03C38u); #endif label_BFC03C3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C3Cu); #endif /* 0xBFC03C3C: 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, 0xBFC03C3Cu); 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(0xBFC03C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C40u); #endif /* 0xBFC03C40: 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, 0xBFC03C40u); 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(0xBFC03C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C44u); #endif /* 0xBFC03C44: 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, 0xBFC03C44u); 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(0xBFC03C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C48u); #endif /* 0xBFC03C48: 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, 0xBFC03C48u); 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(0xBFC03C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C4Cu); #endif /* 0xBFC03C4C: 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, 0xBFC03C4Cu); 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(0xBFC03C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C50u); #endif /* 0xBFC03C50: 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, 0xBFC03C50u); 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(0xBFC03C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C54u); #endif /* 0xBFC03C54: 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, 0xBFC03C54u); 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(0xBFC03C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C58u); #endif /* 0xBFC03C58: 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, 0xBFC03C58u); 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(0xBFC03C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC03C5C: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C60u); #endif /* 0xBFC03C60: 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, 0xBFC03C60u); 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(0xBFC03C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03C64: 03E00008 jr $ra */ psx_delay_BFC03C64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03C68: 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(0xBFC03C68u); #endif if (psx_delay_BFC03C64) { psx_delay_BFC03C64 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03C6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C6Cu); #endif /* 0xBFC03C6C: 8EC44BD4 lw $a0, 19412($s6) */ { uint32_t _pgxa = cpu->gpr[22] + 19412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (19412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03C6Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400000u); } PGXP_LOAD(0x8EC44BD4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03C70: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03C78u; /* jalr link before delay slot */ psx_delay_BFC03C70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03C74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03C74u); #endif if (psx_delay_BFC03C70) { psx_delay_BFC03C70 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03C78u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03C78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03C78: 1040FFC5 beq $v0, $zero, 0xBFC03B90 */ uint32_t psx_brA_BFC03C78 = cpu->gpr[2]; uint32_t psx_brB_BFC03C78 = cpu->gpr[0]; psx_taken_BFC03C78 = (psx_brA_BFC03C78 == psx_brB_BFC03C78); psx_delay_BFC03C78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C7C: 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(0xBFC03C7Cu); #endif if (psx_delay_BFC03C78) { psx_delay_BFC03C78 = 0; if (psx_taken_BFC03C78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B90u); goto label_BFC03B90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C80u); } label_BFC03C80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03C80: 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(0xBFC03C80u); #endif label_BFC03C84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03C84: 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(0xBFC03C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC03C88: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC03C90u; /* jalr link before delay slot */ psx_delay_BFC03C88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03C8C: 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(0xBFC03C8Cu); #endif if (psx_delay_BFC03C88) { psx_delay_BFC03C88 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC03C90u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x1u); #endif /* 0xBFC03C90: 1000FFEA beq $zero, $zero, 0xBFC03C3C */ uint32_t psx_brA_BFC03C90 = cpu->gpr[0]; uint32_t psx_brB_BFC03C90 = cpu->gpr[0]; psx_taken_BFC03C90 = (psx_brA_BFC03C90 == psx_brB_BFC03C90); psx_delay_BFC03C90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03C94: 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(0xBFC03C94u); #endif if (psx_delay_BFC03C90) { psx_delay_BFC03C90 = 0; if (psx_taken_BFC03C90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C3Cu); goto label_BFC03C3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C98u); } label_BFC03C98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03C98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03C98: 1620FFC6 bne $s1, $zero, 0xBFC03BB4 */ uint32_t psx_brA_BFC03C98 = cpu->gpr[17]; uint32_t psx_brB_BFC03C98 = cpu->gpr[0]; psx_taken_BFC03C98 = (psx_brA_BFC03C98 != psx_brB_BFC03C98); psx_delay_BFC03C98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03C9C: 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(0xBFC03C9Cu); #endif if (psx_delay_BFC03C98) { psx_delay_BFC03C98 = 0; if (psx_taken_BFC03C98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03BB4u); goto label_BFC03BB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03CA0u); } label_BFC03CA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03CA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03CA0: 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(0xBFC03CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03CA4: 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(0xBFC03CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80400000u); #endif /* 0xBFC03CA8: 02C0F809 jalr $ra, $s6 */ cpu->gpr[31] = 0xBFC03CB0u; /* jalr link before delay slot */ psx_delay_BFC03CA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03CAC: 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(0xBFC03CACu); #endif if (psx_delay_BFC03CA8) { psx_delay_BFC03CA8 = 0; { uint32_t _t = cpu->gpr[22]; cpu->gpr[31] = 0xBFC03CB0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03CB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03CB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03CB0: 1000FFE2 beq $zero, $zero, 0xBFC03C3C */ uint32_t psx_brA_BFC03CB0 = cpu->gpr[0]; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03CB4: 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(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, 0xBFC03C3Cu); goto label_BFC03C3C; } #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, 0x201u); #endif /* 0xBFC03CB8: 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(0xBFC03CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC03CBC: 241100A0 addiu $s1, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241100A0u, cpu->gpr[17], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03CC0: 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(0xBFC03CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03CC4: 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(0xBFC03CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03CC8: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03CD0u; /* jalr link before delay slot */ psx_delay_BFC03CC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC03CCC: 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(0xBFC03CCCu); #endif if (psx_delay_BFC03CC8) { psx_delay_BFC03CC8 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03CD0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03CD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03CD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC03CD0: 1640FFA5 bne $s2, $zero, 0xBFC03B68 */ uint32_t psx_brA_BFC03CD0 = cpu->gpr[18]; uint32_t psx_brB_BFC03CD0 = cpu->gpr[0]; psx_taken_BFC03CD0 = (psx_brA_BFC03CD0 != psx_brB_BFC03CD0); psx_delay_BFC03CD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03CD4: 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(0xBFC03CD4u); #endif if (psx_delay_BFC03CD0) { psx_delay_BFC03CD0 = 0; if (psx_taken_BFC03CD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03B68u); goto label_BFC03B68; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03CD8u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03CD8: 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(0xBFC03CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC03CDC: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC03CE4u; /* jalr link before delay slot */ psx_delay_BFC03CDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03CE0: 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(0xBFC03CE0u); #endif if (psx_delay_BFC03CDC) { psx_delay_BFC03CDC = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC03CE4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03CE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03CE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03CE4: 1000FFD5 beq $zero, $zero, 0xBFC03C3C */ uint32_t psx_brA_BFC03CE4 = cpu->gpr[0]; uint32_t psx_brB_BFC03CE4 = cpu->gpr[0]; psx_taken_BFC03CE4 = (psx_brA_BFC03CE4 == psx_brB_BFC03CE4); psx_delay_BFC03CE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC03CE8: 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(0xBFC03CE8u); #endif if (psx_delay_BFC03CE4) { psx_delay_BFC03CE4 = 0; if (psx_taken_BFC03CE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03C3Cu); goto label_BFC03C3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03CECu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03CECu); cpu->pc = 0xBFC03CECu; return; /* fallthrough */ } void OpenBIOS_func_1FC03CEC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03CECu); int psx_delay_BFC03D04 = 0; label_BFC03CEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03CECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03CEC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CF0u); #endif /* 0xBFC03CF0: 90425EED lbu $v0, 24301($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24301; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (24301)), 2, 0x4u); PGXP_LOAD(0x90425EEDu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03CF4: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC03CF8: A0820000 sb $v0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03CF8u; 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(0xBFC03CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03CFC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D00u); #endif /* 0xBFC03D00: 90425EEC lbu $v0, 24300($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24300; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (24300)), 2, 0x4u); PGXP_LOAD(0x90425EECu, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC03D04: 03E00008 jr $ra */ psx_delay_BFC03D04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC03D08: A0A20000 sb $v0, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC03D08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0A20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03D08u); #endif if (psx_delay_BFC03D04) { psx_delay_BFC03D04 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC03D0C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03D0Cu); int psx_delay_BFC03D20 = 0; label_BFC03D0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03D0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D0C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D10: 24425ED8 addiu $v0, $v0, 24280 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (24280)); PGXP_ALU(0x24425ED8u, cpu->gpr[2], _pgx1, 0x00005ED8u); } #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, 0x10u); #endif /* 0xBFC03D14: 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(0xBFC03D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03D18: 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(0xBFC03D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D1Cu); #endif /* 0xBFC03D1C: 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, 0xBFC03D1Cu); 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(0xBFC03D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03D20: 03E00008 jr $ra */ psx_delay_BFC03D20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC03D24: AC850000 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D24u); return; } g_debug_last_store_pc = 0xBFC03D24u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC03D24u); #endif if (psx_delay_BFC03D20) { psx_delay_BFC03D20 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC03D28(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03D28u); int psx_delay_BFC03D5C = 0; int psx_delay_BFC03D98 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03D64u: goto label_BFC03D64; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03D28: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0x4u); #endif /* 0xBFC03D2C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x20000000u); #endif /* 0xBFC03D30: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D34: 24420A14 addiu $v0, $v0, 2580 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2580)); PGXP_ALU(0x24420A14u, cpu->gpr[2], _pgx1, 0x00000A14u); } #ifdef PSX_COSIM cosim_instr(0xBFC03D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03D38: ACA05EC8 sw $zero, 24264($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D38u); return; } g_debug_last_store_pc = 0xBFC03D38u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA05EC8u, _pgxa, cpu->gpr[0]); } #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, 0x20u); #endif /* 0xBFC03D3C: 24A55EC8 addiu $a1, $a1, 24264 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24264)); PGXP_ALU(0x24A55EC8u, cpu->gpr[5], _pgx1, 0x00005EC8u); } #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, 0xA0000000u); #endif /* 0xBFC03D40: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D40u); return; } g_debug_last_store_pc = 0xBFC03D40u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x24u); #endif /* 0xBFC03D44: ACA20004 sw $v0, 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, 0xBFC03D44u); return; } g_debug_last_store_pc = 0xBFC03D44u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20004u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC03D48: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D4C: 24420A8C addiu $v0, $v0, 2700 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2700)); PGXP_ALU(0x24420A8Cu, cpu->gpr[2], _pgx1, 0x00000A8Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC03D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC03D50: ACA20008 sw $v0, 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, 0xBFC03D50u); return; } g_debug_last_store_pc = 0xBFC03D50u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20008u, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC03D54: 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(0xBFC03D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC03D58: 241900C0 addiu $t9, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241900C0u, cpu->gpr[25], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x82000000u); #endif /* 0xBFC03D5C: 0320F809 jalr $ra, $t9 */ cpu->gpr[31] = 0xBFC03D64u; /* jalr link before delay slot */ psx_delay_BFC03D5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03D60: 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(0xBFC03D60u); #endif if (psx_delay_BFC03D5C) { psx_delay_BFC03D5C = 0; { uint32_t _t = cpu->gpr[25]; cpu->gpr[31] = 0xBFC03D64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03D64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03D64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03D64: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D68: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03D6C: ACA05EB8 sw $zero, 24248($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24248; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D6Cu); return; } g_debug_last_store_pc = 0xBFC03D6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA05EB8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC03D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D70: 24420A50 addiu $v0, $v0, 2640 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2640)); PGXP_ALU(0x24420A50u, cpu->gpr[2], _pgx1, 0x00000A50u); } #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, 0x20u); #endif /* 0xBFC03D74: 24A55EB8 addiu $a1, $a1, 24248 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24248)); PGXP_ALU(0x24A55EB8u, cpu->gpr[5], _pgx1, 0x00005EB8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC03D78: ACA20004 sw $v0, 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, 0xBFC03D78u); return; } g_debug_last_store_pc = 0xBFC03D78u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D7C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03D80: 24420978 addiu $v0, $v0, 2424 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2424)); PGXP_ALU(0x24420978u, cpu->gpr[2], _pgx1, 0x00000978u); } #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, 0x24u); #endif /* 0xBFC03D84: ACA20008 sw $v0, 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, 0xBFC03D84u); return; } g_debug_last_store_pc = 0xBFC03D84u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20008u, _pgxa, cpu->gpr[2]); } #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, 0x201u); #endif /* 0xBFC03D88: 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(0xBFC03D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D8Cu); #endif /* 0xBFC03D8C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03D8Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x11u); #endif /* 0xBFC03D90: 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(0xBFC03D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC03D94: 241900C0 addiu $t9, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241900C0u, cpu->gpr[25], _pgx1, 0x000000C0u); } #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, 0x2000001u); #endif /* 0xBFC03D98: 03200008 jr $t9 */ psx_delay_BFC03D98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03D9C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC03D9Cu); #endif if (psx_delay_BFC03D98) { psx_delay_BFC03D98 = 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 OpenBIOS_func_1FC03DA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03DA0u); int psx_delay_BFC03DB8 = 0; int psx_delay_BFC03DD8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03DC0u: goto label_BFC03DC0; default: break; } } label_BFC03DA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03DA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03DA0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x201u); #endif /* 0xBFC03DA4: 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(0xBFC03DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC03DA8: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DA8u); return; } g_debug_last_store_pc = 0xBFC03DA8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20u); #endif /* 0xBFC03DAC: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 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, 0x2000001u); #endif /* 0xBFC03DB0: 241900C0 addiu $t9, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241900C0u, cpu->gpr[25], _pgx1, 0x000000C0u); } #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, 0x20u); #endif /* 0xBFC03DB4: 24A55EC8 addiu $a1, $a1, 24264 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24264)); PGXP_ALU(0x24A55EC8u, cpu->gpr[5], _pgx1, 0x00005EC8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x82000000u); #endif /* 0xBFC03DB8: 0320F809 jalr $ra, $t9 */ cpu->gpr[31] = 0xBFC03DC0u; /* jalr link before delay slot */ psx_delay_BFC03DB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03DBC: 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(0xBFC03DBCu); #endif if (psx_delay_BFC03DB8) { psx_delay_BFC03DB8 = 0; { uint32_t _t = cpu->gpr[25]; cpu->gpr[31] = 0xBFC03DC0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03DC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03DC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC03DC0: 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(0xBFC03DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03DC4: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DC8u); #endif /* 0xBFC03DC8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03DC8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03DCC: 24A55EB8 addiu $a1, $a1, 24248 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24248)); PGXP_ALU(0x24A55EB8u, cpu->gpr[5], _pgx1, 0x00005EB8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC03DD0: 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(0xBFC03DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC03DD4: 241900C0 addiu $t9, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241900C0u, cpu->gpr[25], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC03DD8: 03200008 jr $t9 */ psx_delay_BFC03DD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03DDC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DDCu); #endif if (psx_delay_BFC03DD8) { psx_delay_BFC03DD8 = 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 OpenBIOS_func_1FC03DE0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03DE0u); int psx_delay_BFC03DE8 = 0; int psx_taken_BFC03DE8 = 0; int psx_delay_BFC03E04 = 0; int psx_taken_BFC03E04 = 0; int psx_delay_BFC03E24 = 0; int psx_taken_BFC03E24 = 0; int psx_delay_BFC03E54 = 0; int psx_delay_BFC03E60 = 0; int psx_taken_BFC03E60 = 0; int psx_delay_BFC03E68 = 0; int psx_taken_BFC03E68 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03DF0u: goto label_BFC03DF0; case 0xBFC03DF8u: goto label_BFC03DF8; case 0xBFC03E0Cu: goto label_BFC03E0C; case 0xBFC03E10u: goto label_BFC03E10; case 0xBFC03E2Cu: goto label_BFC03E2C; case 0xBFC03E54u: goto label_BFC03E54; case 0xBFC03E5Cu: goto label_BFC03E5C; case 0xBFC03E68u: goto label_BFC03E68; default: break; } } label_BFC03DE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03DE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03DE0: 3C02BFC6 lui $v0, 0xBFC6 */ cpu->gpr[2] = 0xBFC60000u; PGXP_ALU(0x3C02BFC6u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC03DE4: 24426000 addiu $v0, $v0, 24576 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (24576)); PGXP_ALU(0x24426000u, cpu->gpr[2], _pgx1, 0x00006000u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03DE8: 1040001C beq $v0, $zero, 0xBFC03E5C */ uint32_t psx_brA_BFC03DE8 = cpu->gpr[2]; uint32_t psx_brB_BFC03DE8 = cpu->gpr[0]; psx_taken_BFC03DE8 = (psx_brA_BFC03DE8 == psx_brB_BFC03DE8); psx_delay_BFC03DE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03DEC: 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(0xBFC03DECu); #endif if (psx_delay_BFC03DE8) { psx_delay_BFC03DE8 = 0; if (psx_taken_BFC03DE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E5Cu); goto label_BFC03E5C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03DF0u); } label_BFC03DF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03DF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03DF0: 3C03BFC1 lui $v1, 0xBFC1 */ cpu->gpr[3] = 0xBFC10000u; PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC03DF4: 2463A1B8 addiu $v1, $v1, -24136 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24136)); PGXP_ALU(0x2463A1B8u, cpu->gpr[3], _pgx1, 0xFFFFA1B8u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DF4u); #endif label_BFC03DF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03DF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC03DF8: 24857EC0 addiu $a1, $a0, 32448 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (32448)); PGXP_ALU(0x24857EC0u, cpu->gpr[5], _pgx1, 0x00007EC0u); } #ifdef PSX_COSIM cosim_instr(0xBFC03DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03DFC: 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(0xBFC03DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC03E00: 2CA51733 sltiu $a1, $a1, 5939 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00001733u ? 1 : 0); PGXP_ALU(0x2CA51733u, cpu->gpr[5], _pgx1, 0x1733u); } #ifdef PSX_COSIM cosim_instr(0xBFC03E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC03E04: 10A00013 beq $a1, $zero, 0xBFC03E54 */ uint32_t psx_brA_BFC03E04 = cpu->gpr[5]; uint32_t psx_brB_BFC03E04 = cpu->gpr[0]; psx_taken_BFC03E04 = (psx_brA_BFC03E04 == psx_brB_BFC03E04); psx_delay_BFC03E04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03E08: 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(0xBFC03E08u); #endif if (psx_delay_BFC03E04) { psx_delay_BFC03E04 = 0; if (psx_taken_BFC03E04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E54u); goto label_BFC03E54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E0Cu); } label_BFC03E0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03E0C: 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(0xBFC03E0Cu); #endif label_BFC03E10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC03E10: 00022880 sll $a1, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] << 2u; PGXP_ALU(0x00022880u, cpu->gpr[5], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC03E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC03E14: 00652821 addu $a1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00652821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E18u); #endif /* 0xBFC03E18: 94A50000 lhu $a1, 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, 0xBFC03E18u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x94A50000u, _pgxa, cpu->gpr[5]); } #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, 0x1u); #endif /* 0xBFC03E1C: 00000000 nop */ /* nop */ #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, 0x30u); #endif /* 0xBFC03E20: 0085282B sltu $a1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0085282Bu, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC03E24: 10A00010 beq $a1, $zero, 0xBFC03E68 */ uint32_t psx_brA_BFC03E24 = cpu->gpr[5]; uint32_t psx_brB_BFC03E24 = cpu->gpr[0]; psx_taken_BFC03E24 = (psx_brA_BFC03E24 == psx_brB_BFC03E24); psx_delay_BFC03E24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03E28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03E28u); #endif if (psx_delay_BFC03E24) { psx_delay_BFC03E24 = 0; if (psx_taken_BFC03E24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E68u); goto label_BFC03E68; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E2Cu); } label_BFC03E2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03E2C: 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(0xBFC03E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03E30: 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(0xBFC03E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03E34: 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(0xBFC03E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E38u); #endif /* 0xBFC03E38: 94620002 lhu $v0, 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, 0xBFC03E38u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94620002u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC03E3C: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC03E40: 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(0xBFC03E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E44u); #endif /* 0xBFC03E44: 94620000 lhu $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, 0xBFC03E44u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03E48: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC03E4C: 00822023 subu $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(0x00822023u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x14u); #endif /* 0xBFC03E50: 3082FFFF andi $v0, $a0, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu; PGXP_ALU(0x3082FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC03E50u); #endif label_BFC03E54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03E54: 03E00008 jr $ra */ psx_delay_BFC03E54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03E58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03E58u); #endif if (psx_delay_BFC03E54) { psx_delay_BFC03E54 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03E5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03E5C: 3C03BFC1 lui $v1, 0xBFC1 */ cpu->gpr[3] = 0xBFC10000u; PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); #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, 0x1u); #endif /* 0xBFC03E60: 1000FFE5 beq $zero, $zero, 0xBFC03DF8 */ uint32_t psx_brA_BFC03E60 = cpu->gpr[0]; 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, 0x8u); #endif /* 0xBFC03E64: 2463A0E8 addiu $v1, $v1, -24344 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24344)); PGXP_ALU(0x2463A0E8u, cpu->gpr[3], _pgx1, 0xFFFFA0E8u); } #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, 0xBFC03DF8u); goto label_BFC03DF8; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03E68: 1000FFE9 beq $zero, $zero, 0xBFC03E10 */ uint32_t psx_brA_BFC03E68 = cpu->gpr[0]; uint32_t psx_brB_BFC03E68 = cpu->gpr[0]; psx_taken_BFC03E68 = (psx_brA_BFC03E68 == psx_brB_BFC03E68); psx_delay_BFC03E68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03E6C: 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(0xBFC03E6Cu); #endif if (psx_delay_BFC03E68) { psx_delay_BFC03E68 = 0; if (psx_taken_BFC03E68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E10u); goto label_BFC03E10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E70u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E70u); cpu->pc = 0xBFC03E70u; return; /* fallthrough */ } void OpenBIOS_func_1FC03E70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03E70u); int psx_delay_BFC03E7C = 0; int psx_taken_BFC03E7C = 0; int psx_delay_BFC03E8C = 0; int psx_taken_BFC03E8C = 0; int psx_delay_BFC03E9C = 0; int psx_delay_BFC03EB8 = 0; int psx_delay_BFC03EC8 = 0; int psx_taken_BFC03EC8 = 0; int psx_delay_BFC03ED8 = 0; int psx_taken_BFC03ED8 = 0; int psx_delay_BFC03EE4 = 0; int psx_taken_BFC03EE4 = 0; int psx_delay_BFC03EF0 = 0; int psx_taken_BFC03EF0 = 0; int psx_delay_BFC03EF8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03E84u: goto label_BFC03E84; case 0xBFC03E94u: goto label_BFC03E94; case 0xBFC03EA4u: goto label_BFC03EA4; case 0xBFC03EC0u: goto label_BFC03EC0; case 0xBFC03ED0u: goto label_BFC03ED0; case 0xBFC03EE0u: goto label_BFC03EE0; case 0xBFC03EECu: goto label_BFC03EEC; case 0xBFC03EF8u: goto label_BFC03EF8; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC03E70: 24827EC0 addiu $v0, $a0, 32448 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (32448)); PGXP_ALU(0x24827EC0u, cpu->gpr[2], _pgx1, 0x00007EC0u); } #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, 0x4u); #endif /* 0xBFC03E74: 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(0xBFC03E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03E78: 2C42037F sltiu $v0, $v0, 895 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000037Fu ? 1 : 0); PGXP_ALU(0x2C42037Fu, cpu->gpr[2], _pgx1, 0x037Fu); } #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, 0x5u); #endif /* 0xBFC03E7C: 10400010 beq $v0, $zero, 0xBFC03EC0 */ uint32_t psx_brA_BFC03E7C = cpu->gpr[2]; uint32_t psx_brB_BFC03E7C = cpu->gpr[0]; psx_taken_BFC03E7C = (psx_brA_BFC03E7C == psx_brB_BFC03E7C); psx_delay_BFC03E7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC03E80: 24837761 addiu $v1, $a0, 30561 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] + (30561)); PGXP_ALU(0x24837761u, cpu->gpr[3], _pgx1, 0x00007761u); } #ifdef PSX_COSIM cosim_instr(0xBFC03E80u); #endif if (psx_delay_BFC03E7C) { psx_delay_BFC03E7C = 0; if (psx_taken_BFC03E7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EC0u); goto label_BFC03EC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E84u); } label_BFC03E84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03E84: 3C06BFC6 lui $a2, 0xBFC6 */ cpu->gpr[6] = 0xBFC60000u; PGXP_ALU(0x3C06BFC6u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03E88: 24C66000 addiu $a2, $a2, 24576 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (24576)); PGXP_ALU(0x24C66000u, cpu->gpr[6], _pgx1, 0x00006000u); } #ifdef PSX_COSIM cosim_instr(0xBFC03E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC03E8C: 10C00017 beq $a2, $zero, 0xBFC03EEC */ uint32_t psx_brA_BFC03E8C = cpu->gpr[6]; uint32_t psx_brB_BFC03E8C = cpu->gpr[0]; psx_taken_BFC03E8C = (psx_brA_BFC03E8C == psx_brB_BFC03E8C); psx_delay_BFC03E8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03E90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03E90u); #endif if (psx_delay_BFC03E8C) { psx_delay_BFC03E8C = 0; if (psx_taken_BFC03E8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EECu); goto label_BFC03EEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E94u); } label_BFC03E94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03E94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03E94: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC03E98: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03E98u); return; } g_debug_last_store_pc = 0xBFC03E98u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03E9C: 0FF00F78 jal 0xBFC03DE0 */ cpu->gpr[31] = 0xBFC03EA4u; /* jal link before delay slot */ psx_delay_BFC03E9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC03EA0: 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(0xBFC03EA0u); #endif if (psx_delay_BFC03E9C) { psx_delay_BFC03E9C = 0; cpu->gpr[31] = 0xBFC03EA4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03DE0u); cpu->pc = 0xBFC03DE0u; return; } label_BFC03EA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03EA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03EA4: 00021900 sll $v1, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021900u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC03EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EA8u); #endif /* 0xBFC03EA8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03EA8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0xCu); #endif /* 0xBFC03EAC: 00621823 subu $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(0x00621823u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x8u); #endif /* 0xBFC03EB0: 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(0xBFC03EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC03EB4: 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(0xBFC03EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03EB8: 03E00008 jr $ra */ psx_delay_BFC03EB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03EBC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC03EBCu); #endif if (psx_delay_BFC03EB8) { psx_delay_BFC03EB8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03EC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03EC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03EC0: 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(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: 2C630FD4 sltiu $v1, $v1, 4052 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000FD4u ? 1 : 0); PGXP_ALU(0x2C630FD4u, cpu->gpr[3], _pgx1, 0x0FD4u); } #ifdef PSX_COSIM cosim_instr(0xBFC03EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03EC8: 1060000B beq $v1, $zero, 0xBFC03EF8 */ uint32_t psx_brA_BFC03EC8 = cpu->gpr[3]; uint32_t psx_brB_BFC03EC8 = cpu->gpr[0]; psx_taken_BFC03EC8 = (psx_brA_BFC03EC8 == psx_brB_BFC03EC8); psx_delay_BFC03EC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03ECC: 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(0xBFC03ECCu); #endif if (psx_delay_BFC03EC8) { psx_delay_BFC03EC8 = 0; if (psx_taken_BFC03EC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EF8u); goto label_BFC03EF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03ED0u); } label_BFC03ED0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03ED0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03ED0: 3C06BFC7 lui $a2, 0xBFC7 */ cpu->gpr[6] = 0xBFC70000u; PGXP_ALU(0x3C06BFC7u, cpu->gpr[6], 0u, 0u); #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, 0x40u); #endif /* 0xBFC03ED4: 24C69D68 addiu $a2, $a2, -25240 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-25240)); PGXP_ALU(0x24C69D68u, cpu->gpr[6], _pgx1, 0xFFFF9D68u); } #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, 0x41u); #endif /* 0xBFC03ED8: 14C0FFEE bne $a2, $zero, 0xBFC03E94 */ uint32_t psx_brA_BFC03ED8 = cpu->gpr[6]; uint32_t psx_brB_BFC03ED8 = cpu->gpr[0]; psx_taken_BFC03ED8 = (psx_brA_BFC03ED8 != psx_brB_BFC03ED8); psx_delay_BFC03ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03EDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03EDCu); #endif if (psx_delay_BFC03ED8) { psx_delay_BFC03ED8 = 0; if (psx_taken_BFC03ED8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E94u); goto label_BFC03E94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EE0u); } label_BFC03EE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03EE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03EE0: 3C06BFC6 lui $a2, 0xBFC6 */ cpu->gpr[6] = 0xBFC60000u; PGXP_ALU(0x3C06BFC6u, cpu->gpr[6], 0u, 0u); #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, 0x1u); #endif /* 0xBFC03EE4: 1000FFEB beq $zero, $zero, 0xBFC03E94 */ uint32_t psx_brA_BFC03EE4 = cpu->gpr[0]; uint32_t psx_brB_BFC03EE4 = cpu->gpr[0]; psx_taken_BFC03EE4 = (psx_brA_BFC03EE4 == psx_brB_BFC03EE4); psx_delay_BFC03EE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03EE8: 34C69D68 ori $a2, $a2, 0x9D68 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0x9D68u; PGXP_ALU(0x34C69D68u, cpu->gpr[6], _pgx1, 0x9D68u); } #ifdef PSX_COSIM cosim_instr(0xBFC03EE8u); #endif if (psx_delay_BFC03EE4) { psx_delay_BFC03EE4 = 0; if (psx_taken_BFC03EE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E94u); goto label_BFC03E94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EECu); } label_BFC03EEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03EECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03EEC: 3C06BFC6 lui $a2, 0xBFC6 */ cpu->gpr[6] = 0xBFC60000u; PGXP_ALU(0x3C06BFC6u, cpu->gpr[6], 0u, 0u); #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, 0x1u); #endif /* 0xBFC03EF0: 1000FFE8 beq $zero, $zero, 0xBFC03E94 */ uint32_t psx_brA_BFC03EF0 = cpu->gpr[0]; uint32_t psx_brB_BFC03EF0 = cpu->gpr[0]; psx_taken_BFC03EF0 = (psx_brA_BFC03EF0 == psx_brB_BFC03EF0); psx_delay_BFC03EF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC03EF4: 24C66000 addiu $a2, $a2, 24576 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (24576)); PGXP_ALU(0x24C66000u, cpu->gpr[6], _pgx1, 0x00006000u); } #ifdef PSX_COSIM cosim_instr(0xBFC03EF4u); #endif if (psx_delay_BFC03EF0) { psx_delay_BFC03EF0 = 0; if (psx_taken_BFC03EF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03E94u); goto label_BFC03E94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03EF8u); } label_BFC03EF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03EF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03EF8: 03E00008 jr $ra */ psx_delay_BFC03EF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03EFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03EFCu); #endif if (psx_delay_BFC03EF8) { psx_delay_BFC03EF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC03F00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03F00u); int psx_delay_BFC03F14 = 0; int psx_taken_BFC03F14 = 0; int psx_delay_BFC03F1C = 0; int psx_delay_BFC03F2C = 0; int psx_taken_BFC03F2C = 0; int psx_delay_BFC03F48 = 0; int psx_delay_BFC03F54 = 0; int psx_delay_BFC03F64 = 0; int psx_taken_BFC03F64 = 0; int psx_delay_BFC03F78 = 0; int psx_taken_BFC03F78 = 0; int psx_delay_BFC03FA0 = 0; int psx_delay_BFC03FA8 = 0; int psx_taken_BFC03FA8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03F1Cu: goto label_BFC03F1C; case 0xBFC03F24u: goto label_BFC03F24; case 0xBFC03F34u: goto label_BFC03F34; case 0xBFC03F40u: goto label_BFC03F40; case 0xBFC03F50u: goto label_BFC03F50; case 0xBFC03F54u: goto label_BFC03F54; case 0xBFC03F5Cu: goto label_BFC03F5C; case 0xBFC03F6Cu: goto label_BFC03F6C; case 0xBFC03F80u: goto label_BFC03F80; case 0xBFC03FA8u: goto label_BFC03FA8; default: break; } } label_BFC03F00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03F00: 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(0xBFC03F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC03F04: 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, 0xBFC03F04u); return; } g_debug_last_store_pc = 0xBFC03F04u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0x10000u); #endif /* 0xBFC03F08: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F0Cu); #endif /* 0xBFC03F0C: 8E024BF4 lw $v0, 19444($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F0Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E024BF4u, _pgxa, cpu->gpr[2]); } #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, 0xA0000000u); #endif /* 0xBFC03F10: 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, 0xBFC03F10u); return; } g_debug_last_store_pc = 0xBFC03F10u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x5u); #endif /* 0xBFC03F14: 1440000E bne $v0, $zero, 0xBFC03F50 */ uint32_t psx_brA_BFC03F14 = cpu->gpr[2]; uint32_t psx_brB_BFC03F14 = cpu->gpr[0]; psx_taken_BFC03F14 = (psx_brA_BFC03F14 != psx_brB_BFC03F14); psx_delay_BFC03F14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC03F18: 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, 0xBFC03F18u); return; } g_debug_last_store_pc = 0xBFC03F18u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F18u); #endif if (psx_delay_BFC03F14) { psx_delay_BFC03F14 = 0; if (psx_taken_BFC03F14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F50u); goto label_BFC03F50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F1Cu); } label_BFC03F1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03F1C: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC03F24u; /* jal link before delay slot */ psx_delay_BFC03F1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03F20: 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, 0xBFC03F20u); return; } g_debug_last_store_pc = 0xBFC03F20u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F20u); #endif if (psx_delay_BFC03F1C) { psx_delay_BFC03F1C = 0; cpu->gpr[31] = 0xBFC03F24u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC03F24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC03F24: AE024BF4 sw $v0, 19444($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19444; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F24u); return; } g_debug_last_store_pc = 0xBFC03F24u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE024BF4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F28u); #endif /* 0xBFC03F28: 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, 0xBFC03F28u); 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(0xBFC03F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03F2C: 14400009 bne $v0, $zero, 0xBFC03F54 */ uint32_t psx_brA_BFC03F2C = cpu->gpr[2]; uint32_t psx_brB_BFC03F2C = cpu->gpr[0]; psx_taken_BFC03F2C = (psx_brA_BFC03F2C != psx_brB_BFC03F2C); psx_delay_BFC03F2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC03F30: 27A60014 addiu $a2, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A60014u, cpu->gpr[6], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC03F30u); #endif if (psx_delay_BFC03F2C) { psx_delay_BFC03F2C = 0; if (psx_taken_BFC03F2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F54u); goto label_BFC03F54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F34u); } label_BFC03F34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC03F34: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 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, 0x11u); #endif /* 0xBFC03F38: 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(0xBFC03F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC03F3C: AC644BF0 sw $a0, 19440($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F3Cu); return; } g_debug_last_store_pc = 0xBFC03F3Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644BF0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F3Cu); #endif label_BFC03F40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F40u); #endif /* 0xBFC03F40: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F40u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F44u); #endif /* 0xBFC03F44: 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, 0xBFC03F44u); 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(0xBFC03F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC03F48: 03E00008 jr $ra */ psx_delay_BFC03F48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03F4C: 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(0xBFC03F4Cu); #endif if (psx_delay_BFC03F48) { psx_delay_BFC03F48 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC03F50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC03F50: 27A60014 addiu $a2, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A60014u, cpu->gpr[6], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC03F50u); #endif label_BFC03F54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03F54: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC03F5Cu; /* jal link before delay slot */ psx_delay_BFC03F54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC03F58: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC03F58u); #endif if (psx_delay_BFC03F54) { psx_delay_BFC03F54 = 0; cpu->gpr[31] = 0xBFC03F5Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } 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, 0x9u); #endif /* 0xBFC03F5C: 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(0xBFC03F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F60u); #endif /* 0xBFC03F60: 8E044BF4 lw $a0, 19444($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F60u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } PGXP_LOAD(0x8E044BF4u, _pgxa, cpu->gpr[4]); } #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, 0xCu); #endif /* 0xBFC03F64: 14430006 bne $v0, $v1, 0xBFC03F80 */ uint32_t psx_brA_BFC03F64 = cpu->gpr[2]; uint32_t psx_brB_BFC03F64 = cpu->gpr[3]; psx_taken_BFC03F64 = (psx_brA_BFC03F64 != psx_brB_BFC03F64); psx_delay_BFC03F64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03F68: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #ifdef PSX_COSIM cosim_instr(0xBFC03F68u); #endif if (psx_delay_BFC03F64) { psx_delay_BFC03F64 = 0; if (psx_taken_BFC03F64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F80u); goto label_BFC03F80; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F6Cu); } label_BFC03F6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03F6C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03F70: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F70u); return; } g_debug_last_store_pc = 0xBFC03F70u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x11u); #endif /* 0xBFC03F74: 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, 0xBFC03F74u); return; } g_debug_last_store_pc = 0xBFC03F74u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC03F78: 1000FFF1 beq $zero, $zero, 0xBFC03F40 */ uint32_t psx_brA_BFC03F78 = cpu->gpr[0]; uint32_t psx_brB_BFC03F78 = cpu->gpr[0]; psx_taken_BFC03F78 = (psx_brA_BFC03F78 == psx_brB_BFC03F78); psx_delay_BFC03F78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03F7C: 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(0xBFC03F7Cu); #endif if (psx_delay_BFC03F78) { psx_delay_BFC03F78 = 0; if (psx_taken_BFC03F78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F40u); goto label_BFC03F40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F80u); } label_BFC03F80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03F80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F80u); #endif /* 0xBFC03F80: 8FA30014 lw $v1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F80u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30014u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F84u); #endif /* 0xBFC03F84: 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, 0xBFC03F84u); 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(0xBFC03F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC03F88: AC830004 sw $v1, 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, 0xBFC03F88u); return; } g_debug_last_store_pc = 0xBFC03F88u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC830004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F8Cu); #endif /* 0xBFC03F8C: 8FA30010 lw $v1, 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, 0xBFC03F8Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03F90: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC03F94: AC83001C sw $v1, 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, 0xBFC03F94u); return; } g_debug_last_store_pc = 0xBFC03F94u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC83001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F98u); #endif /* 0xBFC03F98: 8C630034 lw $v1, 52($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03F98u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630034u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03F9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000008u); #endif /* 0xBFC03FA0: 0060F809 jalr $ra, $v1 */ cpu->gpr[31] = 0xBFC03FA8u; /* jalr link before delay slot */ psx_delay_BFC03FA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC03FA4: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03FA4u); #endif if (psx_delay_BFC03FA0) { psx_delay_BFC03FA0 = 0; { uint32_t _t = cpu->gpr[3]; cpu->gpr[31] = 0xBFC03FA8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC03FA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03FA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03FA8: 1000FFE5 beq $zero, $zero, 0xBFC03F40 */ uint32_t psx_brA_BFC03FA8 = cpu->gpr[0]; uint32_t psx_brB_BFC03FA8 = cpu->gpr[0]; psx_taken_BFC03FA8 = (psx_brA_BFC03FA8 == psx_brB_BFC03FA8); psx_delay_BFC03FA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03FAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03FACu); #endif if (psx_delay_BFC03FA8) { psx_delay_BFC03FA8 = 0; if (psx_taken_BFC03FA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03F40u); goto label_BFC03F40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03FB0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03FB0u); cpu->pc = 0xBFC03FB0u; return; /* fallthrough */ } void OpenBIOS_func_1FC03FB0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03FB0u); int psx_delay_BFC03FCC = 0; label_BFC03FB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03FB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03FB0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FB4u); #endif /* 0xBFC03FB4: 8C424BF4 lw $v0, 19444($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19444; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424BF4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC03FB8: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FBCu); #endif /* 0xBFC03FBC: 8C43001C lw $v1, 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, 0xBFC03FBCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C43001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC03FC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC03FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FC4u); #endif /* 0xBFC03FC4: 8C790038 lw $t9, 56($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FC4u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8u); } PGXP_LOAD(0x8C790038u, _pgxa, cpu->gpr[25]); } #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, 0x2000001u); #endif /* 0xBFC03FCC: 03200008 jr $t9 */ psx_delay_BFC03FCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC03FD0: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC03FD0u); #endif if (psx_delay_BFC03FCC) { psx_delay_BFC03FCC = 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 OpenBIOS_func_1FC03FD4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC03FD4u); int psx_delay_BFC03FE0 = 0; int psx_delay_BFC03FEC = 0; int psx_taken_BFC03FEC = 0; int psx_delay_BFC0400C = 0; int psx_delay_BFC04018 = 0; int psx_delay_BFC04024 = 0; int psx_taken_BFC04024 = 0; int psx_delay_BFC04034 = 0; int psx_taken_BFC04034 = 0; int psx_delay_BFC0405C = 0; int psx_delay_BFC0406C = 0; int psx_taken_BFC0406C = 0; int psx_delay_BFC04078 = 0; int psx_taken_BFC04078 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC03FE8u: goto label_BFC03FE8; case 0xBFC03FF4u: goto label_BFC03FF4; case 0xBFC03FFCu: goto label_BFC03FFC; case 0xBFC04000u: goto label_BFC04000; case 0xBFC04004u: goto label_BFC04004; case 0xBFC04014u: goto label_BFC04014; case 0xBFC04020u: goto label_BFC04020; case 0xBFC0402Cu: goto label_BFC0402C; case 0xBFC0403Cu: goto label_BFC0403C; case 0xBFC04064u: goto label_BFC04064; case 0xBFC04074u: goto label_BFC04074; default: break; } } label_BFC03FD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03FD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC03FD4: 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(0xBFC03FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC03FD8: 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, 0xBFC03FD8u); return; } g_debug_last_store_pc = 0xBFC03FD8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC03FDC: 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, 0xBFC03FDCu); return; } g_debug_last_store_pc = 0xBFC03FDCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC03FE0: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC03FE8u; /* jal link before delay slot */ psx_delay_BFC03FE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC03FE4: 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, 0xBFC03FE4u); return; } g_debug_last_store_pc = 0xBFC03FE4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FE4u); #endif if (psx_delay_BFC03FE0) { psx_delay_BFC03FE0 = 0; cpu->gpr[31] = 0xBFC03FE8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC03FE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03FE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC03FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FE8u); #endif /* 0xBFC03FE8: 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, 0xBFC03FE8u); 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(0xBFC03FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC03FEC: 14400009 bne $v0, $zero, 0xBFC04014 */ uint32_t psx_brA_BFC03FEC = cpu->gpr[2]; uint32_t psx_brB_BFC03FEC = cpu->gpr[0]; psx_taken_BFC03FEC = (psx_brA_BFC03FEC != psx_brB_BFC03FEC); psx_delay_BFC03FEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC03FF0: 27A60014 addiu $a2, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A60014u, cpu->gpr[6], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC03FF0u); #endif if (psx_delay_BFC03FEC) { psx_delay_BFC03FEC = 0; if (psx_taken_BFC03FEC) { #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, 0xBFC03FF4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC03FF4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC03FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC03FF8: 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(0xBFC03FF8u); #endif label_BFC03FFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC03FFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC03FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC03FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC03FFC: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC03FFCu); return; } g_debug_last_store_pc = 0xBFC03FFCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC03FFCu); #endif label_BFC04000: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04000u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04000: 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(0xBFC04000u); #endif label_BFC04004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04004u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04004u); #endif /* 0xBFC04004: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04004u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04008u); #endif /* 0xBFC04008: 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, 0xBFC04008u); 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(0xBFC04008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0400Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0400C: 03E00008 jr $ra */ psx_delay_BFC0400C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04010: 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(0xBFC04010u); #endif if (psx_delay_BFC0400C) { psx_delay_BFC0400C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04014: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #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, 0x80000000u); #endif /* 0xBFC04018: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC04020u; /* jal link before delay slot */ psx_delay_BFC04018 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0401Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC0401C: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0401Cu); #endif if (psx_delay_BFC04018) { psx_delay_BFC04018 = 0; cpu->gpr[31] = 0xBFC04020u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } label_BFC04020: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04020u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04020: 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(0xBFC04020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04024: 14430005 bne $v0, $v1, 0xBFC0403C */ uint32_t psx_brA_BFC04024 = cpu->gpr[2]; uint32_t psx_brB_BFC04024 = cpu->gpr[3]; 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, 0x4u); #endif /* 0xBFC04028: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xBFC0403Cu); goto label_BFC0403C; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0402C: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #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, 0xCu); #endif /* 0xBFC04030: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04030u); return; } g_debug_last_store_pc = 0xBFC04030u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC04034: 1000FFF2 beq $zero, $zero, 0xBFC04000 */ uint32_t psx_brA_BFC04034 = cpu->gpr[0]; uint32_t psx_brB_BFC04034 = cpu->gpr[0]; psx_taken_BFC04034 = (psx_brA_BFC04034 == psx_brB_BFC04034); psx_delay_BFC04034 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04038: 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, 0xBFC04038u); return; } g_debug_last_store_pc = 0xBFC04038u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04038u); #endif if (psx_delay_BFC04034) { psx_delay_BFC04034 = 0; if (psx_taken_BFC04034) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04000u); goto label_BFC04000; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0403Cu); } 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 /* 0xBFC0403C: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0403Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC04040: 00000000 nop */ /* nop */ #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, 0x10004u); #endif /* 0xBFC04044: 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, 0xBFC04044u); return; } g_debug_last_store_pc = 0xBFC04044u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04048u); #endif /* 0xBFC04048: 8FA20010 lw $v0, 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, 0xBFC04048u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0404C: 00000000 nop */ /* nop */ #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, 0x10004u); #endif /* 0xBFC04050: AE02001C sw $v0, 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, 0xBFC04050u); return; } g_debug_last_store_pc = 0xBFC04050u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE02001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04054u); #endif /* 0xBFC04054: 8C42003C lw $v0, 60($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04054u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42003Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04058: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0405Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC0405C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04064u; /* jalr link before delay slot */ psx_delay_BFC0405C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04060: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04060u); #endif if (psx_delay_BFC0405C) { psx_delay_BFC0405C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04064u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04064: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04064u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC04064: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x10001u); #endif /* 0xBFC04068: 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, 0xBFC04068u); return; } g_debug_last_store_pc = 0xBFC04068u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #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, 0x9u); #endif /* 0xBFC0406C: 1060FFE5 beq $v1, $zero, 0xBFC04004 */ uint32_t psx_brA_BFC0406C = cpu->gpr[3]; uint32_t psx_brB_BFC0406C = cpu->gpr[0]; psx_taken_BFC0406C = (psx_brA_BFC0406C == psx_brB_BFC0406C); psx_delay_BFC0406C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04070: 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(0xBFC04070u); #endif if (psx_delay_BFC0406C) { psx_delay_BFC0406C = 0; if (psx_taken_BFC0406C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04004u); goto label_BFC04004; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04074u); } label_BFC04074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04074u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04074u); #endif /* 0xBFC04074: 8E030018 lw $v1, 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, 0xBFC04074u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E030018u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC04078: 1000FFE0 beq $zero, $zero, 0xBFC03FFC */ uint32_t psx_brA_BFC04078 = cpu->gpr[0]; uint32_t psx_brB_BFC04078 = cpu->gpr[0]; psx_taken_BFC04078 = (psx_brA_BFC04078 == psx_brB_BFC04078); psx_delay_BFC04078 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0407Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0407C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0407Cu); #endif if (psx_delay_BFC04078) { psx_delay_BFC04078 = 0; if (psx_taken_BFC04078) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC03FFCu); goto label_BFC03FFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04080u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04080u); cpu->pc = 0xBFC04080u; return; /* fallthrough */ } void OpenBIOS_func_1FC04080(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04080u); int psx_delay_BFC040DC = 0; int psx_taken_BFC040DC = 0; int psx_delay_BFC040F4 = 0; int psx_taken_BFC040F4 = 0; int psx_delay_BFC04104 = 0; int psx_delay_BFC0412C = 0; int psx_delay_BFC04144 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC040D4u: goto label_BFC040D4; case 0xBFC040E4u: goto label_BFC040E4; case 0xBFC040ECu: goto label_BFC040EC; case 0xBFC040FCu: goto label_BFC040FC; case 0xBFC0410Cu: goto label_BFC0410C; case 0xBFC04134u: goto label_BFC04134; default: break; } } label_BFC04080: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04080u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04080: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x20000000u); #endif /* 0xBFC04084: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x8u); #endif /* 0xBFC04088: 24630100 addiu $v1, $v1, 256 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (256)); PGXP_ALU(0x24630100u, cpu->gpr[3], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0xBFC04088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0408Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0408C: 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(0xBFC0408Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04090: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04090u); return; } g_debug_last_store_pc = 0xBFC04090u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20010000u); #endif /* 0xBFC04094: 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, 0xBFC04094u); return; } g_debug_last_store_pc = 0xBFC04094u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x28u); #endif /* 0xBFC04098: AC650044 sw $a1, 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, 0xBFC04098u); return; } g_debug_last_store_pc = 0xBFC04098u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC650044u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC04098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0409Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0409C: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0409Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC040A0: 24A55F18 addiu $a1, $a1, 24344 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24344)); PGXP_ALU(0x24A55F18u, cpu->gpr[5], _pgx1, 0x00005F18u); } #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, 0x28u); #endif /* 0xBFC040A4: AC650050 sw $a1, 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, 0xBFC040A4u); return; } g_debug_last_store_pc = 0xBFC040A4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC650050u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC040A8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC040A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC040AC: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0x4u); #endif /* 0xBFC040B0: 24426238 addiu $v0, $v0, 25144 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25144)); PGXP_ALU(0x24426238u, cpu->gpr[2], _pgx1, 0x00006238u); } #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, 0x20u); #endif /* 0xBFC040B4: 24A56238 addiu $a1, $a1, 25144 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (25144)); PGXP_ALU(0x24A56238u, cpu->gpr[5], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC040B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC040B8: AC650054 sw $a1, 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, 0xBFC040B8u); return; } g_debug_last_store_pc = 0xBFC040B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC650054u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC040B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC040BC: AC620040 sw $v0, 64($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040BCu); return; } g_debug_last_store_pc = 0xBFC040BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC040BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC040C0: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0x8u); #endif /* 0xBFC040C4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 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, 0x18u); #endif /* 0xBFC040C8: AC644C6C sw $a0, 19564($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19564; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040C8u); return; } g_debug_last_store_pc = 0xBFC040C8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644C6Cu, _pgxa, cpu->gpr[4]); } #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, 0x20u); #endif /* 0xBFC040CC: 24A564F8 addiu $a1, $a1, 25848 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (25848)); PGXP_ALU(0x24A564F8u, cpu->gpr[5], _pgx1, 0x000064F8u); } #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, 0xDu); #endif /* 0xBFC040D0: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC040D0u); #endif label_BFC040D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC040D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC040D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC040D4: A0600000 sb $zero, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC040D4u; 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(0xBFC040D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC040D8: 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(0xBFC040D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC040DC: 1465FFFD bne $v1, $a1, 0xBFC040D4 */ uint32_t psx_brA_BFC040DC = cpu->gpr[3]; uint32_t psx_brB_BFC040DC = cpu->gpr[5]; psx_taken_BFC040DC = (psx_brA_BFC040DC != psx_brB_BFC040DC); psx_delay_BFC040DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC040E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC040E0u); #endif if (psx_delay_BFC040DC) { psx_delay_BFC040DC = 0; if (psx_taken_BFC040DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC040D4u); goto label_BFC040D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC040E4u); } label_BFC040E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC040E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC040E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC040E4: 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(0xBFC040E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC040E8: 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(0xBFC040E8u); #endif 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, 0xCu); #endif /* 0xBFC040EC: AC430028 sw $v1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC040ECu); return; } g_debug_last_store_pc = 0xBFC040ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430028u, _pgxa, cpu->gpr[3]); } #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, 0x8u); #endif /* 0xBFC040F0: 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(0xBFC040F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC040F4: 1465FFFD bne $v1, $a1, 0xBFC040EC */ uint32_t psx_brA_BFC040F4 = cpu->gpr[3]; uint32_t psx_brB_BFC040F4 = cpu->gpr[5]; psx_taken_BFC040F4 = (psx_brA_BFC040F4 != psx_brB_BFC040F4); psx_delay_BFC040F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC040F8: 2442002C addiu $v0, $v0, 44 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (44)); PGXP_ALU(0x2442002Cu, cpu->gpr[2], _pgx1, 0x0000002Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC040F8u); #endif if (psx_delay_BFC040F4) { psx_delay_BFC040F4 = 0; if (psx_taken_BFC040F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC040ECu); goto label_BFC040EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC040FCu); } label_BFC040FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC040FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC040FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC040FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC040FC: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #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, 0x5u); #endif /* 0xBFC04100: 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(0xBFC04100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04104: 0FF012E1 jal 0xBFC04B84 */ cpu->gpr[31] = 0xBFC0410Cu; /* jal link before delay slot */ psx_delay_BFC04104 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04108: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04108u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04108u); #endif if (psx_delay_BFC04104) { psx_delay_BFC04104 = 0; cpu->gpr[31] = 0xBFC0410Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B84u); cpu->pc = 0xBFC04B84u; return; } label_BFC0410C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0410Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0410Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0410Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0410C: 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(0xBFC0410Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04110: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04110u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC04114: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC04118: AC404BF4 sw $zero, 19444($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19444; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19444)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04118u); return; } g_debug_last_store_pc = 0xBFC04118u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404BF4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0411Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0411C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0411Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04120: AC405F14 sw $zero, 24340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04120u); return; } g_debug_last_store_pc = 0xBFC04120u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC405F14u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04124: 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(0xBFC04124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04128: 241000A0 addiu $s0, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241000A0u, cpu->gpr[16], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0412Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC0412C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC04134u; /* jalr link before delay slot */ psx_delay_BFC0412C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04130: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04130u); #endif if (psx_delay_BFC0412C) { psx_delay_BFC0412C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC04134u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04134: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04134u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04134: 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(0xBFC04134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04138u); #endif /* 0xBFC04138: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04138u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0413Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2010001u); #endif /* 0xBFC0413C: 0200C825 or $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(0x0200C825u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0413Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04140u); #endif /* 0xBFC04140: 8FB00010 lw $s0, 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, 0xBFC04140u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x2000001u); #endif /* 0xBFC04144: 03200008 jr $t9 */ psx_delay_BFC04144 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04148: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC04148u); #endif if (psx_delay_BFC04144) { psx_delay_BFC04144 = 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 OpenBIOS_func_1FC0414C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0414Cu); int psx_delay_BFC04154 = 0; label_BFC0414C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0414Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0414Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0414Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0414C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0414Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04150u); #endif /* 0xBFC04150: 8C425F14 lw $v0, 24340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04150u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F14u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC04154: 03E00008 jr $ra */ psx_delay_BFC04154 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04158: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04158u); #endif if (psx_delay_BFC04154) { psx_delay_BFC04154 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0415C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0415Cu); int psx_delay_BFC04160 = 0; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0415C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x80000001u); #endif /* 0xBFC04160: 03E00008 jr $ra */ psx_delay_BFC04160 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04164: AC445F14 sw $a0, 24340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04164u); return; } g_debug_last_store_pc = 0xBFC04164u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC445F14u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04164u); #endif if (psx_delay_BFC04160) { psx_delay_BFC04160 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04168(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04168u); int psx_delay_BFC04198 = 0; int psx_taken_BFC04198 = 0; int psx_delay_BFC041A4 = 0; int psx_delay_BFC041B4 = 0; int psx_taken_BFC041B4 = 0; int psx_delay_BFC041C8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04190u: goto label_BFC04190; case 0xBFC041A0u: goto label_BFC041A0; case 0xBFC041ACu: goto label_BFC041AC; case 0xBFC041B0u: goto label_BFC041B0; case 0xBFC041BCu: goto label_BFC041BC; default: break; } } label_BFC04168: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04168u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04168: 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(0xBFC04168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0416Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0416C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0416Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC04170: 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, 0xBFC04170u); return; } g_debug_last_store_pc = 0xBFC04170u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04174: 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, 0xBFC04174u); return; } g_debug_last_store_pc = 0xBFC04174u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC04178: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0417Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0417C: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 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, 0xA0000000u); #endif /* 0xBFC04180: 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, 0xBFC04180u); return; } g_debug_last_store_pc = 0xBFC04180u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04184: 26105F18 addiu $s0, $s0, 24344 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (24344)); PGXP_ALU(0x26105F18u, cpu->gpr[16], _pgx1, 0x00005F18u); } #ifdef PSX_COSIM cosim_instr(0xBFC04184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04188: 24849704 addiu $a0, $a0, -26876 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26876)); PGXP_ALU(0x24849704u, cpu->gpr[4], _pgx1, 0xFFFF9704u); } #ifdef PSX_COSIM cosim_instr(0xBFC04188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0418Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0418C: 26316238 addiu $s1, $s1, 25144 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (25144)); PGXP_ALU(0x26316238u, cpu->gpr[17], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC0418Cu); #endif 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: 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, 0xBFC04190u); 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(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, 0x21u); #endif /* 0xBFC04198: 10A00005 beq $a1, $zero, 0xBFC041B0 */ uint32_t psx_brA_BFC04198 = cpu->gpr[5]; uint32_t psx_brB_BFC04198 = cpu->gpr[0]; psx_taken_BFC04198 = (psx_brA_BFC04198 == psx_brB_BFC04198); psx_delay_BFC04198 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0419Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0419C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0419Cu); #endif if (psx_delay_BFC04198) { psx_delay_BFC04198 = 0; if (psx_taken_BFC04198) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC041B0u); goto label_BFC041B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC041A0u); } label_BFC041A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC041A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC041A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041A0u); #endif /* 0xBFC041A0: 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, 0xBFC041A0u); 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(0xBFC041A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC041A4: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC041ACu; /* jal link before delay slot */ psx_delay_BFC041A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC041A8: AFA40010 sw $a0, 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, 0xBFC041A8u); return; } g_debug_last_store_pc = 0xBFC041A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC041A8u); #endif if (psx_delay_BFC041A4) { psx_delay_BFC041A4 = 0; cpu->gpr[31] = 0xBFC041ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } 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 /* 0xBFC041AC: 8FA40010 lw $a0, 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, 0xBFC041ACu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC041ACu); #endif label_BFC041B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC041B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC041B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC041B0: 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(0xBFC041B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC041B4: 1611FFF6 bne $s0, $s1, 0xBFC04190 */ uint32_t psx_brA_BFC041B4 = cpu->gpr[16]; uint32_t psx_brB_BFC041B4 = cpu->gpr[17]; psx_taken_BFC041B4 = (psx_brA_BFC041B4 != psx_brB_BFC041B4); psx_delay_BFC041B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC041B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC041B8u); #endif if (psx_delay_BFC041B4) { psx_delay_BFC041B4 = 0; if (psx_taken_BFC041B4) { #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, 0xBFC041BCu); } label_BFC041BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC041BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC041BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041BCu); #endif /* 0xBFC041BC: 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, 0xBFC041BCu); 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(0xBFC041BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041C0u); #endif /* 0xBFC041C0: 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, 0xBFC041C0u); 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(0xBFC041C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041C4u); #endif /* 0xBFC041C4: 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, 0xBFC041C4u); 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(0xBFC041C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC041C8: 03E00008 jr $ra */ psx_delay_BFC041C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC041CC: 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(0xBFC041CCu); #endif if (psx_delay_BFC041C8) { psx_delay_BFC041C8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC041D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC041D0u); int psx_delay_BFC04204 = 0; int psx_taken_BFC04204 = 0; int psx_delay_BFC04210 = 0; int psx_taken_BFC04210 = 0; int psx_delay_BFC04218 = 0; int psx_delay_BFC04224 = 0; int psx_delay_BFC0422C = 0; int psx_delay_BFC04234 = 0; int psx_taken_BFC04234 = 0; int psx_delay_BFC0423C = 0; int psx_delay_BFC04248 = 0; int psx_taken_BFC04248 = 0; int psx_delay_BFC04268 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC041FCu: goto label_BFC041FC; case 0xBFC0420Cu: goto label_BFC0420C; case 0xBFC04210u: goto label_BFC04210; case 0xBFC04218u: goto label_BFC04218; case 0xBFC04220u: goto label_BFC04220; case 0xBFC0422Cu: goto label_BFC0422C; case 0xBFC04234u: goto label_BFC04234; case 0xBFC0423Cu: goto label_BFC0423C; case 0xBFC04244u: goto label_BFC04244; case 0xBFC04250u: goto label_BFC04250; case 0xBFC04254u: goto label_BFC04254; default: break; } } 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, 0x20000000u); #endif /* 0xBFC041D0: 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(0xBFC041D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC041D4: 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, 0xBFC041D4u); return; } g_debug_last_store_pc = 0xBFC041D4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC041D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC041D8: 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, 0xBFC041D8u); return; } g_debug_last_store_pc = 0xBFC041D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x20000u); #endif /* 0xBFC041DC: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC041DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC041E0: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC041E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC041E4: 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, 0xBFC041E4u); return; } g_debug_last_store_pc = 0xBFC041E4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC041E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC041E8: 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, 0xBFC041E8u); return; } g_debug_last_store_pc = 0xBFC041E8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC041E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC041EC: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x10000u); #endif /* 0xBFC041F0: 26105F18 addiu $s0, $s0, 24344 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (24344)); PGXP_ALU(0x26105F18u, cpu->gpr[16], _pgx1, 0x00005F18u); } #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, 0x40001u); #endif /* 0xBFC041F4: 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(0xBFC041F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC041F8: 26316238 addiu $s1, $s1, 25144 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (25144)); PGXP_ALU(0x26316238u, cpu->gpr[17], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC041F8u); #endif label_BFC041FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC041FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC041FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC041FCu); #endif /* 0xBFC041FC: 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, 0xBFC041FCu); 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(0xBFC041FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04200: 00000000 nop */ /* nop */ #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, 0x11u); #endif /* 0xBFC04204: 1480000D bne $a0, $zero, 0xBFC0423C */ uint32_t psx_brA_BFC04204 = cpu->gpr[4]; uint32_t psx_brB_BFC04204 = cpu->gpr[0]; psx_taken_BFC04204 = (psx_brA_BFC04204 != psx_brB_BFC04204); psx_delay_BFC04204 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04208: 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(0xBFC04208u); #endif if (psx_delay_BFC04204) { psx_delay_BFC04204 = 0; if (psx_taken_BFC04204) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0423Cu); goto label_BFC0423C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0420Cu); } label_BFC0420C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0420Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0420Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0420Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0420C: 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(0xBFC0420Cu); #endif label_BFC04210: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04210u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC04210: 1611FFFA bne $s0, $s1, 0xBFC041FC */ uint32_t psx_brA_BFC04210 = cpu->gpr[16]; uint32_t psx_brB_BFC04210 = cpu->gpr[17]; psx_taken_BFC04210 = (psx_brA_BFC04210 != psx_brB_BFC04210); psx_delay_BFC04210 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04214: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04214u); #endif if (psx_delay_BFC04210) { psx_delay_BFC04210 = 0; if (psx_taken_BFC04210) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC041FCu); goto label_BFC041FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04218u); } label_BFC04218: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04218u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04218: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC04220u; /* jal link before delay slot */ psx_delay_BFC04218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0421Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0421C: 24849710 addiu $a0, $a0, -26864 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26864)); PGXP_ALU(0x24849710u, cpu->gpr[4], _pgx1, 0xFFFF9710u); } #ifdef PSX_COSIM cosim_instr(0xBFC0421Cu); #endif if (psx_delay_BFC04218) { psx_delay_BFC04218 = 0; cpu->gpr[31] = 0xBFC04220u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC04220: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04220u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04220: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04224: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC0422Cu; /* jal link before delay slot */ psx_delay_BFC04224 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04228: 24849728 addiu $a0, $a0, -26840 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26840)); PGXP_ALU(0x24849728u, cpu->gpr[4], _pgx1, 0xFFFF9728u); } #ifdef PSX_COSIM cosim_instr(0xBFC04228u); #endif if (psx_delay_BFC04224) { psx_delay_BFC04224 = 0; cpu->gpr[31] = 0xBFC0422Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } 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, 0x80000000u); #endif /* 0xBFC0422C: 0FF0105A jal 0xBFC04168 */ cpu->gpr[31] = 0xBFC04234u; /* jal link before delay slot */ psx_delay_BFC0422C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04230: 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(0xBFC04230u); #endif if (psx_delay_BFC0422C) { psx_delay_BFC0422C = 0; cpu->gpr[31] = 0xBFC04234u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04168u); cpu->pc = 0xBFC04168u; return; } 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, 0x1u); #endif /* 0xBFC04234: 10000007 beq $zero, $zero, 0xBFC04254 */ uint32_t psx_brA_BFC04234 = cpu->gpr[0]; uint32_t psx_brB_BFC04234 = cpu->gpr[0]; psx_taken_BFC04234 = (psx_brA_BFC04234 == psx_brB_BFC04234); psx_delay_BFC04234 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04238: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04238u); #endif if (psx_delay_BFC04234) { psx_delay_BFC04234 = 0; if (psx_taken_BFC04234) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04254u); goto label_BFC04254; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0423Cu); } label_BFC0423C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0423Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0423Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0423Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC0423C: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC04244u; /* jalr link before delay slot */ psx_delay_BFC0423C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04240: 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, 0xBFC04240u); return; } g_debug_last_store_pc = 0xBFC04240u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50020u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC04240u); #endif if (psx_delay_BFC0423C) { psx_delay_BFC0423C = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC04244u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04244: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04244u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04244u); #endif /* 0xBFC04244: 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, 0xBFC04244u); 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(0xBFC04244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04248: 1440FFF1 bne $v0, $zero, 0xBFC04210 */ uint32_t psx_brA_BFC04248 = cpu->gpr[2]; uint32_t psx_brB_BFC04248 = cpu->gpr[0]; psx_taken_BFC04248 = (psx_brA_BFC04248 != psx_brB_BFC04248); psx_delay_BFC04248 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0424Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0424C: 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(0xBFC0424Cu); #endif if (psx_delay_BFC04248) { psx_delay_BFC04248 = 0; if (psx_taken_BFC04248) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04210u); goto label_BFC04210; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04250u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04250: 2610FFB0 addiu $s0, $s0, -80 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-80)); PGXP_ALU(0x2610FFB0u, cpu->gpr[16], _pgx1, 0xFFFFFFB0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04250u); #endif label_BFC04254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04254u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04254u); #endif /* 0xBFC04254: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04254u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04258u); #endif /* 0xBFC04258: 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, 0xBFC04258u); 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(0xBFC04258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0425Cu); #endif /* 0xBFC0425C: 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, 0xBFC0425Cu); 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(0xBFC0425Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04260: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04264u); #endif /* 0xBFC04264: 8FB00010 lw $s0, 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, 0xBFC04264u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC04268: 03E00008 jr $ra */ psx_delay_BFC04268 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0426Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0426C: 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(0xBFC0426Cu); #endif if (psx_delay_BFC04268) { psx_delay_BFC04268 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04270(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04270u); int psx_delay_BFC042A0 = 0; int psx_taken_BFC042A0 = 0; int psx_delay_BFC042A8 = 0; int psx_delay_BFC042B4 = 0; int psx_taken_BFC042B4 = 0; int psx_delay_BFC042C8 = 0; int psx_delay_BFC042E8 = 0; int psx_delay_BFC042F4 = 0; int psx_taken_BFC042F4 = 0; int psx_delay_BFC042FC = 0; int psx_taken_BFC042FC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04298u: goto label_BFC04298; case 0xBFC042A8u: goto label_BFC042A8; case 0xBFC042B0u: goto label_BFC042B0; case 0xBFC042BCu: goto label_BFC042BC; case 0xBFC042D0u: goto label_BFC042D0; case 0xBFC042D8u: goto label_BFC042D8; case 0xBFC042F0u: goto label_BFC042F0; case 0xBFC042F4u: goto label_BFC042F4; case 0xBFC042FCu: goto label_BFC042FC; default: break; } } label_BFC04270: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04270u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04270: 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(0xBFC04270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC04274: 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, 0xBFC04274u); return; } g_debug_last_store_pc = 0xBFC04274u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04278: 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, 0xBFC04278u); return; } g_debug_last_store_pc = 0xBFC04278u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x20000u); #endif /* 0xBFC0427C: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0427Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04280: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC04284: 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, 0xBFC04284u); return; } g_debug_last_store_pc = 0xBFC04284u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC04284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04288: 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, 0xBFC04288u); return; } g_debug_last_store_pc = 0xBFC04288u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0428Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0428C: 26105F18 addiu $s0, $s0, 24344 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (24344)); PGXP_ALU(0x26105F18u, cpu->gpr[16], _pgx1, 0x00005F18u); } #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, 0x40001u); #endif /* 0xBFC04290: 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(0xBFC04290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC04294: 26316238 addiu $s1, $s1, 25144 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (25144)); PGXP_ALU(0x26316238u, cpu->gpr[17], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC04294u); #endif label_BFC04298: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04298u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04298u); #endif /* 0xBFC04298: 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, 0xBFC04298u); 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(0xBFC04298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0429Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0429C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0429Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC042A0: 10A00013 beq $a1, $zero, 0xBFC042F0 */ uint32_t psx_brA_BFC042A0 = cpu->gpr[5]; uint32_t psx_brB_BFC042A0 = cpu->gpr[0]; psx_taken_BFC042A0 = (psx_brA_BFC042A0 == psx_brB_BFC042A0); psx_delay_BFC042A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC042A4: 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(0xBFC042A4u); #endif if (psx_delay_BFC042A0) { psx_delay_BFC042A0 = 0; if (psx_taken_BFC042A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042F0u); goto label_BFC042F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042A8u); } label_BFC042A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC042A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC042A8: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC042B0u; /* jalr link before delay slot */ psx_delay_BFC042A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC042AC: 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, 0xBFC042ACu); return; } g_debug_last_store_pc = 0xBFC042ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC042ACu); #endif if (psx_delay_BFC042A8) { psx_delay_BFC042A8 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC042B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC042B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC042B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042B0u); #endif /* 0xBFC042B0: 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, 0xBFC042B0u); 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(0xBFC042B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC042B4: 1440000F bne $v0, $zero, 0xBFC042F4 */ uint32_t psx_brA_BFC042B4 = cpu->gpr[2]; uint32_t psx_brB_BFC042B4 = cpu->gpr[0]; psx_taken_BFC042B4 = (psx_brA_BFC042B4 != psx_brB_BFC042B4); psx_delay_BFC042B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC042B8: 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(0xBFC042B8u); #endif if (psx_delay_BFC042B4) { psx_delay_BFC042B4 = 0; if (psx_taken_BFC042B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042F4u); goto label_BFC042F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042BCu); } label_BFC042BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC042BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC042BC: 2610FFB0 addiu $s0, $s0, -80 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-80)); PGXP_ALU(0x2610FFB0u, cpu->gpr[16], _pgx1, 0xFFFFFFB0u); } #ifdef PSX_COSIM cosim_instr(0xBFC042BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042C0u); #endif /* 0xBFC042C0: 8E020048 lw $v0, 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, 0xBFC042C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020048u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC042C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC042C4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC042C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC042C8: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC042D0u; /* jalr link before delay slot */ 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; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC042D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x10001u); #endif /* 0xBFC042D0: 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, 0xBFC042D0u); return; } g_debug_last_store_pc = 0xBFC042D0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC042D4: 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(0xBFC042D4u); #endif label_BFC042D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC042D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042D8u); #endif /* 0xBFC042D8: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC042D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC042D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042DCu); #endif /* 0xBFC042DC: 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, 0xBFC042DCu); 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(0xBFC042DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042E0u); #endif /* 0xBFC042E0: 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, 0xBFC042E0u); 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(0xBFC042E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042E4u); #endif /* 0xBFC042E4: 8FB00010 lw $s0, 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, 0xBFC042E4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC042E8: 03E00008 jr $ra */ psx_delay_BFC042E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC042EC: 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(0xBFC042ECu); #endif if (psx_delay_BFC042E8) { psx_delay_BFC042E8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC042F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC042F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC042F0: 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(0xBFC042F0u); #endif label_BFC042F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC042F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC042F4: 1611FFE8 bne $s0, $s1, 0xBFC04298 */ uint32_t psx_brA_BFC042F4 = cpu->gpr[16]; uint32_t psx_brB_BFC042F4 = cpu->gpr[17]; psx_taken_BFC042F4 = (psx_brA_BFC042F4 != psx_brB_BFC042F4); psx_delay_BFC042F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC042F8: 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(0xBFC042F8u); #endif if (psx_delay_BFC042F4) { psx_delay_BFC042F4 = 0; if (psx_taken_BFC042F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04298u); goto label_BFC04298; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042FCu); } label_BFC042FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC042FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC042FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC042FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC042FC: 1000FFF6 beq $zero, $zero, 0xBFC042D8 */ uint32_t psx_brA_BFC042FC = cpu->gpr[0]; uint32_t psx_brB_BFC042FC = cpu->gpr[0]; psx_taken_BFC042FC = (psx_brA_BFC042FC == psx_brB_BFC042FC); psx_delay_BFC042FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04300: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04300u); #endif if (psx_delay_BFC042FC) { psx_delay_BFC042FC = 0; if (psx_taken_BFC042FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC042D8u); goto label_BFC042D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; /* fallthrough */ } void OpenBIOS_func_1FC04304(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04304u); int psx_delay_BFC04308 = 0; int psx_taken_BFC04308 = 0; int psx_delay_BFC04328 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04310u: goto label_BFC04310; case 0xBFC04328u: goto label_BFC04328; default: break; } } label_BFC04304: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04304u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC04304: 2C830010 sltiu $v1, $a0, 16 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000010u ? 1 : 0); PGXP_ALU(0x2C830010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04308: 10600007 beq $v1, $zero, 0xBFC04328 */ uint32_t psx_brA_BFC04308 = cpu->gpr[3]; uint32_t psx_brB_BFC04308 = cpu->gpr[0]; psx_taken_BFC04308 = (psx_brA_BFC04308 == psx_brB_BFC04308); psx_delay_BFC04308 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0430Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0430C: 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(0xBFC0430Cu); #endif if (psx_delay_BFC04308) { psx_delay_BFC04308 = 0; if (psx_taken_BFC04308) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04328u); goto label_BFC04328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04310u); } label_BFC04310: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04310u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04310: 2402002C addiu $v0, $zero, 44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (44)); PGXP_ALU(0x2402002Cu, cpu->gpr[2], _pgx1, 0x0000002Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC04310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04314: 00820018 mult $a0, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[4] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[4])); #endif PGXP_MULDIV(0x00820018u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC04314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04318: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0431Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0431C: 24426238 addiu $v0, $v0, 25144 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25144)); PGXP_ALU(0x24426238u, cpu->gpr[2], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC0431Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04320: 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(0xBFC04320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04324: 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(0xBFC04324u); #endif label_BFC04328: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04328u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04328: 03E00008 jr $ra */ psx_delay_BFC04328 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0432Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0432C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0432Cu); #endif if (psx_delay_BFC04328) { psx_delay_BFC04328 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04330(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04330u); int psx_delay_BFC04340 = 0; label_BFC04330: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04330u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC04330: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04334: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04338: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC04338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0433Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0433C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0433Cu); return; } g_debug_last_store_pc = 0xBFC0433Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0433Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04340: 0FF019BB jal 0xBFC066EC */ cpu->gpr[31] = 0xBFC04348u; /* jal link before delay slot */ psx_delay_BFC04340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04344: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC04344u); #endif if (psx_delay_BFC04340) { psx_delay_BFC04340 = 0; cpu->gpr[31] = 0xBFC04348u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066ECu); cpu->pc = 0xBFC066ECu; return; } } void OpenBIOS_func_1FC04348(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04348u); int psx_delay_BFC04354 = 0; int psx_delay_BFC0436C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0435Cu: goto label_BFC0435C; default: break; } } label_BFC04348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04348: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0434Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0434C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0434Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04350: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04350u); return; } g_debug_last_store_pc = 0xBFC04350u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04354: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC0435Cu; /* jal link before delay slot */ psx_delay_BFC04354 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04358: 2484973C addiu $a0, $a0, -26820 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26820)); PGXP_ALU(0x2484973Cu, cpu->gpr[4], _pgx1, 0xFFFF973Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC04358u); #endif if (psx_delay_BFC04354) { psx_delay_BFC04354 = 0; cpu->gpr[31] = 0xBFC0435Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC0435C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0435Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0435C: 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(0xBFC0435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04360u); #endif /* 0xBFC04360: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04360u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04364: 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(0xBFC04364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC04368: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0436Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC0436C: 03200008 jr $t9 */ psx_delay_BFC0436C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04370: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC04370u); #endif if (psx_delay_BFC0436C) { psx_delay_BFC0436C = 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 OpenBIOS_func_1FC04374(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04374u); int psx_delay_BFC0438C = 0; int psx_taken_BFC0438C = 0; int psx_delay_BFC04398 = 0; int psx_taken_BFC04398 = 0; int psx_delay_BFC043B0 = 0; int psx_delay_BFC043C0 = 0; int psx_delay_BFC043C8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04384u: goto label_BFC04384; case 0xBFC04394u: goto label_BFC04394; case 0xBFC043A0u: goto label_BFC043A0; case 0xBFC043B8u: goto label_BFC043B8; case 0xBFC043C8u: goto label_BFC043C8; default: break; } } label_BFC04374: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04374u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04374: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04378: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0437Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0437C: 24426238 addiu $v0, $v0, 25144 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25144)); PGXP_ALU(0x24426238u, cpu->gpr[2], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC0437Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04380: 246364F8 addiu $v1, $v1, 25848 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (25848)); PGXP_ALU(0x246364F8u, cpu->gpr[3], _pgx1, 0x000064F8u); } #ifdef PSX_COSIM cosim_instr(0xBFC04380u); #endif label_BFC04384: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04384u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04384u); #endif /* 0xBFC04384: 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, 0xBFC04384u); 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(0xBFC04384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04388: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0438Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0438C: 1080000E beq $a0, $zero, 0xBFC043C8 */ uint32_t psx_brA_BFC0438C = cpu->gpr[4]; uint32_t psx_brB_BFC0438C = cpu->gpr[0]; psx_taken_BFC0438C = (psx_brA_BFC0438C == psx_brB_BFC0438C); psx_delay_BFC0438C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04390: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04390u); #endif if (psx_delay_BFC0438C) { psx_delay_BFC0438C = 0; if (psx_taken_BFC0438C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043C8u); goto label_BFC043C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04394u); } label_BFC04394: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04394u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04394: 2442002C addiu $v0, $v0, 44 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (44)); PGXP_ALU(0x2442002Cu, cpu->gpr[2], _pgx1, 0x0000002Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC04394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04398: 1443FFFA bne $v0, $v1, 0xBFC04384 */ uint32_t psx_brA_BFC04398 = cpu->gpr[2]; uint32_t psx_brB_BFC04398 = cpu->gpr[3]; psx_taken_BFC04398 = (psx_brA_BFC04398 != psx_brB_BFC04398); psx_delay_BFC04398 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0439Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0439C: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0439Cu); #endif if (psx_delay_BFC04398) { psx_delay_BFC04398 = 0; if (psx_taken_BFC04398) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04384u); goto label_BFC04384; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043A0u); } label_BFC043A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC043A0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC043A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC043A4: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC043A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC043A8: 24A59D04 addiu $a1, $a1, -25340 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25340)); PGXP_ALU(0x24A59D04u, cpu->gpr[5], _pgx1, 0xFFFF9D04u); } #ifdef PSX_COSIM cosim_instr(0xBFC043A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC043AC: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC043ACu); return; } g_debug_last_store_pc = 0xBFC043ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC043ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC043B0: 0FF010D2 jal 0xBFC04348 */ cpu->gpr[31] = 0xBFC043B8u; /* jal link before delay slot */ psx_delay_BFC043B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC043B4: 24849754 addiu $a0, $a0, -26796 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26796)); PGXP_ALU(0x24849754u, cpu->gpr[4], _pgx1, 0xFFFF9754u); } #ifdef PSX_COSIM cosim_instr(0xBFC043B4u); #endif if (psx_delay_BFC043B0) { psx_delay_BFC043B0 = 0; cpu->gpr[31] = 0xBFC043B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04348u); cpu->pc = 0xBFC04348u; return; } label_BFC043B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043B8u); #endif /* 0xBFC043B8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC043B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC043B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC043BC: 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(0xBFC043BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC043C0: 03E00008 jr $ra */ psx_delay_BFC043C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC043C4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC043C4u); #endif if (psx_delay_BFC043C0) { psx_delay_BFC043C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC043C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC043C8: 03E00008 jr $ra */ psx_delay_BFC043C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC043CC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC043CCu); #endif if (psx_delay_BFC043C8) { psx_delay_BFC043C8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC043D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC043D0u); int psx_delay_BFC043EC = 0; int psx_taken_BFC043EC = 0; int psx_delay_BFC04404 = 0; int psx_taken_BFC04404 = 0; int psx_delay_BFC0440C = 0; int psx_taken_BFC0440C = 0; int psx_delay_BFC0441C = 0; int psx_taken_BFC0441C = 0; int psx_delay_BFC04434 = 0; int psx_taken_BFC04434 = 0; int psx_delay_BFC04444 = 0; int psx_taken_BFC04444 = 0; int psx_delay_BFC04454 = 0; int psx_taken_BFC04454 = 0; int psx_delay_BFC04468 = 0; int psx_delay_BFC04474 = 0; int psx_taken_BFC04474 = 0; int psx_delay_BFC0448C = 0; int psx_delay_BFC04494 = 0; int psx_taken_BFC04494 = 0; int psx_delay_BFC044A0 = 0; int psx_taken_BFC044A0 = 0; int psx_delay_BFC044A8 = 0; int psx_taken_BFC044A8 = 0; int psx_delay_BFC044B4 = 0; int psx_taken_BFC044B4 = 0; int psx_delay_BFC044C8 = 0; int psx_taken_BFC044C8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC043E4u: goto label_BFC043E4; case 0xBFC043F4u: goto label_BFC043F4; case 0xBFC043FCu: goto label_BFC043FC; case 0xBFC0440Cu: goto label_BFC0440C; case 0xBFC04414u: goto label_BFC04414; case 0xBFC04418u: goto label_BFC04418; case 0xBFC04424u: goto label_BFC04424; case 0xBFC0442Cu: goto label_BFC0442C; case 0xBFC0443Cu: goto label_BFC0443C; case 0xBFC0444Cu: goto label_BFC0444C; case 0xBFC0445Cu: goto label_BFC0445C; case 0xBFC04460u: goto label_BFC04460; case 0xBFC04470u: goto label_BFC04470; case 0xBFC0447Cu: goto label_BFC0447C; case 0xBFC04480u: goto label_BFC04480; case 0xBFC04494u: goto label_BFC04494; case 0xBFC0449Cu: goto label_BFC0449C; case 0xBFC044A8u: goto label_BFC044A8; case 0xBFC044B0u: goto label_BFC044B0; case 0xBFC044BCu: goto label_BFC044BC; case 0xBFC044C0u: goto label_BFC044C0; default: break; } } label_BFC043D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC043D0: 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(0xBFC043D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC043D4: 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(0xBFC043D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC043D8: 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, 0xBFC043D8u); return; } g_debug_last_store_pc = 0xBFC043D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00030u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC043D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC043DC: 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, 0xBFC043DCu); return; } g_debug_last_store_pc = 0xBFC043DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC043DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC043E0: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC043E0u); #endif label_BFC043E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043E4u); #endif /* 0xBFC043E4: 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(0xBFC043E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC043E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC043E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC043EC: 10620029 beq $v1, $v0, 0xBFC04494 */ uint32_t psx_brA_BFC043EC = cpu->gpr[3]; uint32_t psx_brB_BFC043EC = cpu->gpr[2]; psx_taken_BFC043EC = (psx_brA_BFC043EC == psx_brB_BFC043EC); psx_delay_BFC043EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC043F0: 2404003A addiu $a0, $zero, 58 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (58)); PGXP_ALU(0x2404003Au, cpu->gpr[4], _pgx1, 0x0000003Au); } #ifdef PSX_COSIM cosim_instr(0xBFC043F0u); #endif if (psx_delay_BFC043EC) { psx_delay_BFC043EC = 0; if (psx_taken_BFC043EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04494u); goto label_BFC04494; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043F4u); } label_BFC043F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC043F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000001u); #endif /* 0xBFC043F4: A3A00010 sb $zero, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC043F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA3A00010u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC043F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC043F8: 27A20010 addiu $v0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A20010u, cpu->gpr[2], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC043F8u); #endif label_BFC043FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC043FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC043FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC043FCu); #endif /* 0xBFC043FC: 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(0xBFC043FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04400: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC04404: 10640004 beq $v1, $a0, 0xBFC04418 */ uint32_t psx_brA_BFC04404 = cpu->gpr[3]; uint32_t psx_brB_BFC04404 = cpu->gpr[4]; psx_taken_BFC04404 = (psx_brA_BFC04404 == psx_brB_BFC04404); psx_delay_BFC04404 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04408: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04408u); #endif if (psx_delay_BFC04404) { psx_delay_BFC04404 = 0; if (psx_taken_BFC04404) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04418u); goto label_BFC04418; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0440Cu); } label_BFC0440C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0440Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0440Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0440Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0440C: 14600023 bne $v1, $zero, 0xBFC0449C */ uint32_t psx_brA_BFC0440C = cpu->gpr[3]; uint32_t psx_brB_BFC0440C = cpu->gpr[0]; psx_taken_BFC0440C = (psx_brA_BFC0440C != psx_brB_BFC0440C); psx_delay_BFC0440C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04410: 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(0xBFC04410u); #endif if (psx_delay_BFC0440C) { psx_delay_BFC0440C = 0; if (psx_taken_BFC0440C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0449Cu); goto label_BFC0449C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04414u); } label_BFC04414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04414u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04414: 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(0xBFC04414u); #endif label_BFC04418: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04418u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04418: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04418u; 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(0xBFC04418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0441Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0441C: 10600010 beq $v1, $zero, 0xBFC04460 */ uint32_t psx_brA_BFC0441C = cpu->gpr[3]; uint32_t psx_brB_BFC0441C = cpu->gpr[0]; psx_taken_BFC0441C = (psx_brA_BFC0441C == psx_brB_BFC0441C); psx_delay_BFC0441C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04420: 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(0xBFC04420u); #endif if (psx_delay_BFC0441C) { psx_delay_BFC0441C = 0; if (psx_taken_BFC0441C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04460u); goto label_BFC04460; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04424u); } label_BFC04424: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04424u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04424: 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(0xBFC04424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC04428: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04428u); #endif label_BFC0442C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0442Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0442Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0442Cu); #endif /* 0xBFC0442C: 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(0xBFC0442Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04430: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04434: 10400005 beq $v0, $zero, 0xBFC0444C */ uint32_t psx_brA_BFC04434 = cpu->gpr[2]; uint32_t psx_brB_BFC04434 = cpu->gpr[0]; psx_taken_BFC04434 = (psx_brA_BFC04434 == psx_brB_BFC04434); psx_delay_BFC04434 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x89u); #endif /* 0xBFC04438: 00603825 or $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(0x00603825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04438u); #endif if (psx_delay_BFC04434) { psx_delay_BFC04434 = 0; if (psx_taken_BFC04434) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0444Cu); goto label_BFC0444C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0443Cu); } label_BFC0443C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0443Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0443Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0443Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0443C: 2442FFD0 addiu $v0, $v0, -48 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-48)); PGXP_ALU(0x2442FFD0u, cpu->gpr[2], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC0443Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04440: 2C42000A sltiu $v0, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C42000Au, cpu->gpr[2], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC04440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04444: 10400018 beq $v0, $zero, 0xBFC044A8 */ uint32_t psx_brA_BFC04444 = cpu->gpr[2]; uint32_t psx_brB_BFC04444 = cpu->gpr[0]; psx_taken_BFC04444 = (psx_brA_BFC04444 == psx_brB_BFC04444); psx_delay_BFC04444 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04448: 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(0xBFC04448u); #endif if (psx_delay_BFC04444) { psx_delay_BFC04444 = 0; if (psx_taken_BFC04444) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044A8u); goto label_BFC044A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0444Cu); } label_BFC0444C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0444Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0444Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0444Cu); #endif /* 0xBFC0444C: 80E40000 lb $a0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 4, 0x80u); PGXP_LOAD(0x80E40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0444Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04450: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04454: 14800016 bne $a0, $zero, 0xBFC044B0 */ uint32_t psx_brA_BFC04454 = cpu->gpr[4]; uint32_t psx_brB_BFC04454 = cpu->gpr[0]; psx_taken_BFC04454 = (psx_brA_BFC04454 != psx_brB_BFC04454); psx_delay_BFC04454 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC04458: 2488FFD0 addiu $t0, $a0, -48 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[4] + (-48)); PGXP_ALU(0x2488FFD0u, cpu->gpr[8], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04458u); #endif if (psx_delay_BFC04454) { psx_delay_BFC04454 = 0; if (psx_taken_BFC04454) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044B0u); goto label_BFC044B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0445Cu); } label_BFC0445C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0445Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0445Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0445Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0445C: A0600000 sb $zero, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0445Cu; 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(0xBFC0445Cu); #endif label_BFC04460: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04460u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC04460: 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, 0xBFC04460u); return; } g_debug_last_store_pc = 0xBFC04460u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC04464: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04468: 0FF01074 jal 0xBFC041D0 */ cpu->gpr[31] = 0xBFC04470u; /* jal link before delay slot */ psx_delay_BFC04468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0446Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0446C: 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, 0xBFC0446Cu); return; } g_debug_last_store_pc = 0xBFC0446Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0446Cu); #endif if (psx_delay_BFC04468) { psx_delay_BFC04468 = 0; cpu->gpr[31] = 0xBFC04470u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC041D0u); cpu->pc = 0xBFC041D0u; return; } label_BFC04470: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04470u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04470u); #endif /* 0xBFC04470: 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, 0xBFC04470u); 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(0xBFC04470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04474: 14400002 bne $v0, $zero, 0xBFC04480 */ uint32_t psx_brA_BFC04474 = cpu->gpr[2]; uint32_t psx_brB_BFC04474 = cpu->gpr[0]; psx_taken_BFC04474 = (psx_brA_BFC04474 != psx_brB_BFC04474); psx_delay_BFC04474 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC04478: 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, 0xBFC04478u); return; } g_debug_last_store_pc = 0xBFC04478u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04478u); #endif if (psx_delay_BFC04474) { psx_delay_BFC04474 = 0; if (psx_taken_BFC04474) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04480u); goto label_BFC04480; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0447Cu); } label_BFC0447C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0447Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0447Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0447Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC0447C: 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(0xBFC0447Cu); #endif label_BFC04480: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04480u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04480u); #endif /* 0xBFC04480: 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, 0xBFC04480u); 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(0xBFC04480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04484: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04488u); #endif /* 0xBFC04488: 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, 0xBFC04488u); 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(0xBFC04488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0448Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0448C: 03E00008 jr $ra */ psx_delay_BFC0448C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04490: 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(0xBFC04490u); #endif if (psx_delay_BFC0448C) { psx_delay_BFC0448C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC04494: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04494u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04494: 1000FFD3 beq $zero, $zero, 0xBFC043E4 */ uint32_t psx_brA_BFC04494 = cpu->gpr[0]; uint32_t psx_brB_BFC04494 = cpu->gpr[0]; psx_taken_BFC04494 = (psx_brA_BFC04494 == psx_brB_BFC04494); psx_delay_BFC04494 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04498: 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(0xBFC04498u); #endif if (psx_delay_BFC04494) { psx_delay_BFC04494 = 0; if (psx_taken_BFC04494) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043E4u); goto label_BFC043E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0449Cu); } label_BFC0449C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0449Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0449Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0449Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0449C: 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(0xBFC0449Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC044A0: 1000FFD6 beq $zero, $zero, 0xBFC043FC */ uint32_t psx_brA_BFC044A0 = cpu->gpr[0]; uint32_t psx_brB_BFC044A0 = cpu->gpr[0]; psx_taken_BFC044A0 = (psx_brA_BFC044A0 == psx_brB_BFC044A0); psx_delay_BFC044A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC044A4: A043FFFF sb $v1, -1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC044A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA043FFFFu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC044A4u); #endif if (psx_delay_BFC044A0) { psx_delay_BFC044A0 = 0; if (psx_taken_BFC044A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043FCu); goto label_BFC043FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044A8u); } label_BFC044A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC044A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC044A8: 1000FFE0 beq $zero, $zero, 0xBFC0442C */ uint32_t psx_brA_BFC044A8 = cpu->gpr[0]; uint32_t psx_brB_BFC044A8 = cpu->gpr[0]; psx_taken_BFC044A8 = (psx_brA_BFC044A8 == psx_brB_BFC044A8); psx_delay_BFC044A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC044AC: 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(0xBFC044ACu); #endif if (psx_delay_BFC044A8) { psx_delay_BFC044A8 = 0; if (psx_taken_BFC044A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0442Cu); goto label_BFC0442C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044B0u); } label_BFC044B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC044B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC044B0: 2D08000A sltiu $t0, $t0, 10 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)(cpu->gpr[8] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2D08000Au, cpu->gpr[8], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC044B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC044B4: 15000002 bne $t0, $zero, 0xBFC044C0 */ uint32_t psx_brA_BFC044B4 = cpu->gpr[8]; uint32_t psx_brB_BFC044B4 = cpu->gpr[0]; psx_taken_BFC044B4 = (psx_brA_BFC044B4 != psx_brB_BFC044B4); psx_delay_BFC044B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC044B8: 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(0xBFC044B8u); #endif if (psx_delay_BFC044B4) { psx_delay_BFC044B4 = 0; if (psx_taken_BFC044B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044C0u); goto label_BFC044C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044BCu); } label_BFC044BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC044BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC044BC: 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(0xBFC044BCu); #endif label_BFC044C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC044C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC044C0: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC044C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC044C4: 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(0xBFC044C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC044C8: 1000FFE0 beq $zero, $zero, 0xBFC0444C */ uint32_t psx_brA_BFC044C8 = cpu->gpr[0]; uint32_t psx_brB_BFC044C8 = cpu->gpr[0]; psx_taken_BFC044C8 = (psx_brA_BFC044C8 == psx_brB_BFC044C8); psx_delay_BFC044C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC044CC: 2442FFD0 addiu $v0, $v0, -48 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-48)); PGXP_ALU(0x2442FFD0u, cpu->gpr[2], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC044CCu); #endif if (psx_delay_BFC044C8) { psx_delay_BFC044C8 = 0; if (psx_taken_BFC044C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0444Cu); goto label_BFC0444C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044D0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044D0u); cpu->pc = 0xBFC044D0u; return; /* fallthrough */ } void OpenBIOS_func_1FC044D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC044D0u); int psx_delay_BFC044FC = 0; int psx_taken_BFC044FC = 0; int psx_delay_BFC04508 = 0; int psx_delay_BFC0451C = 0; int psx_taken_BFC0451C = 0; int psx_delay_BFC04530 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC044F0u: goto label_BFC044F0; case 0xBFC04504u: goto label_BFC04504; case 0xBFC04510u: goto label_BFC04510; case 0xBFC04518u: goto label_BFC04518; case 0xBFC04524u: goto label_BFC04524; default: break; } } label_BFC044D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC044D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC044D0: 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(0xBFC044D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC044D4: 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, 0xBFC044D4u); return; } g_debug_last_store_pc = 0xBFC044D4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC044D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC044D8: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC044D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC044DC: 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, 0xBFC044DCu); return; } g_debug_last_store_pc = 0xBFC044DCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC044DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC044E0: 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, 0xBFC044E0u); return; } g_debug_last_store_pc = 0xBFC044E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC044E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC044E4: 26106238 addiu $s0, $s0, 25144 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (25144)); PGXP_ALU(0x26106238u, cpu->gpr[16], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC044E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC044E8: 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(0xBFC044E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC044EC: 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(0xBFC044ECu); #endif label_BFC044F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC044F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC044F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044F0u); #endif /* 0xBFC044F0: 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, 0xBFC044F0u); 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(0xBFC044F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC044F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC044F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC044F8: 30421000 andi $v0, $v0, 0x1000 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1000u; PGXP_ALU(0x30421000u, cpu->gpr[2], _pgx1, 0x1000u); } #ifdef PSX_COSIM cosim_instr(0xBFC044F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC044FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC044FC: 10400006 beq $v0, $zero, 0xBFC04518 */ uint32_t psx_brA_BFC044FC = cpu->gpr[2]; uint32_t psx_brB_BFC044FC = cpu->gpr[0]; psx_taken_BFC044FC = (psx_brA_BFC044FC == psx_brB_BFC044FC); psx_delay_BFC044FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04500: 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(0xBFC04500u); #endif if (psx_delay_BFC044FC) { psx_delay_BFC044FC = 0; if (psx_taken_BFC044FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04518u); goto label_BFC04518; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04504u); } label_BFC04504: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04504u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC04504: 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(0xBFC04504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04508: 0FF01303 jal 0xBFC04C0C */ cpu->gpr[31] = 0xBFC04510u; /* jal link before delay slot */ psx_delay_BFC04508 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0450Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0450C: AFA40010 sw $a0, 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, 0xBFC0450Cu); return; } g_debug_last_store_pc = 0xBFC0450Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0450Cu); #endif if (psx_delay_BFC04508) { psx_delay_BFC04508 = 0; cpu->gpr[31] = 0xBFC04510u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C0Cu); cpu->pc = 0xBFC04C0Cu; return; } label_BFC04510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04510u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04510u); #endif /* 0xBFC04510: 8FA40010 lw $a0, 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, 0xBFC04510u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04514: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04514u); #endif label_BFC04518: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04518u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04518: 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(0xBFC04518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0451Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC0451C: 1491FFF4 bne $a0, $s1, 0xBFC044F0 */ uint32_t psx_brA_BFC0451C = cpu->gpr[4]; uint32_t psx_brB_BFC0451C = cpu->gpr[17]; psx_taken_BFC0451C = (psx_brA_BFC0451C != psx_brB_BFC0451C); psx_delay_BFC0451C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04520: 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(0xBFC04520u); #endif if (psx_delay_BFC0451C) { psx_delay_BFC0451C = 0; if (psx_taken_BFC0451C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044F0u); goto label_BFC044F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04524u); } label_BFC04524: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04524u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04524u); #endif /* 0xBFC04524: 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, 0xBFC04524u); 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(0xBFC04524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04528u); #endif /* 0xBFC04528: 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, 0xBFC04528u); 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(0xBFC04528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0452Cu); #endif /* 0xBFC0452C: 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, 0xBFC0452Cu); 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(0xBFC0452Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04530: 03E00008 jr $ra */ psx_delay_BFC04530 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04534: 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(0xBFC04534u); #endif if (psx_delay_BFC04530) { psx_delay_BFC04530 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04538(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04538u); int psx_delay_BFC04554 = 0; int psx_delay_BFC04568 = 0; int psx_taken_BFC04568 = 0; int psx_delay_BFC04574 = 0; int psx_delay_BFC04594 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04554u: goto label_BFC04554; case 0xBFC0455Cu: goto label_BFC0455C; case 0xBFC04570u: goto label_BFC04570; case 0xBFC0457Cu: goto label_BFC0457C; default: break; } } label_BFC04538: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04538u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04538: 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(0xBFC04538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0453Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0453C: 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, 0xBFC0453Cu); return; } g_debug_last_store_pc = 0xBFC0453Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC0453Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04540: 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, 0xBFC04540u); return; } g_debug_last_store_pc = 0xBFC04540u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC04544: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04548: 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, 0xBFC04548u); return; } g_debug_last_store_pc = 0xBFC04548u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0454Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0454C: 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(0xBFC0454Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04550: 24100010 addiu $s0, $zero, 16 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); PGXP_ALU(0x24100010u, cpu->gpr[16], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04550u); #endif label_BFC04554: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04554u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04554: 0FF012AA jal 0xBFC04AA8 */ cpu->gpr[31] = 0xBFC0455Cu; /* jal link before delay slot */ psx_delay_BFC04554 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC04558: AFA40010 sw $a0, 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, 0xBFC04558u); return; } g_debug_last_store_pc = 0xBFC04558u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04558u); #endif if (psx_delay_BFC04554) { psx_delay_BFC04554 = 0; cpu->gpr[31] = 0xBFC0455Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AA8u); cpu->pc = 0xBFC04AA8u; return; } label_BFC0455C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0455Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0455Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0455Cu); #endif /* 0xBFC0455C: 8FA40010 lw $a0, 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, 0xBFC0455Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0455Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04560: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04564: 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(0xBFC04564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC04568: 1490FFFA bne $a0, $s0, 0xBFC04554 */ uint32_t psx_brA_BFC04568 = cpu->gpr[4]; uint32_t psx_brB_BFC04568 = cpu->gpr[16]; psx_taken_BFC04568 = (psx_brA_BFC04568 != psx_brB_BFC04568); psx_delay_BFC04568 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0456Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0456C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0456Cu); #endif if (psx_delay_BFC04568) { psx_delay_BFC04568 = 0; if (psx_taken_BFC04568) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04554u); goto label_BFC04554; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04570u); } label_BFC04570: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04570u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04570u); #endif /* 0xBFC04570: 8C444C6C lw $a0, 19564($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19564; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19564)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04570u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444C6Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04574: 0FF012E1 jal 0xBFC04B84 */ cpu->gpr[31] = 0xBFC0457Cu; /* jal link before delay slot */ psx_delay_BFC04574 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04578: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04578u); #endif if (psx_delay_BFC04574) { psx_delay_BFC04574 = 0; cpu->gpr[31] = 0xBFC0457Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B84u); cpu->pc = 0xBFC04B84u; return; } label_BFC0457C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0457Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0457Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0457Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0457C: 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(0xBFC0457Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04580u); #endif /* 0xBFC04580: 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, 0xBFC04580u); 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(0xBFC04580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04584u); #endif /* 0xBFC04584: 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, 0xBFC04584u); 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(0xBFC04584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC04588: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0458Cu); #endif /* 0xBFC0458C: 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, 0xBFC0458Cu); 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(0xBFC0458Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC04590: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC04594: 03200008 jr $t9 */ psx_delay_BFC04594 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04598: 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(0xBFC04598u); #endif if (psx_delay_BFC04594) { psx_delay_BFC04594 = 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 OpenBIOS_func_1FC0459C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0459Cu); int psx_delay_BFC045A4 = 0; int psx_delay_BFC045B0 = 0; int psx_taken_BFC045B0 = 0; int psx_delay_BFC045D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC045ACu: goto label_BFC045AC; case 0xBFC045B8u: goto label_BFC045B8; case 0xBFC045D0u: goto label_BFC045D0; default: break; } } label_BFC0459C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0459Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0459Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0459Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0459C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0459Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC045A0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC045A0u); return; } g_debug_last_store_pc = 0xBFC045A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC045A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC045A4: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC045ACu; /* jal link before delay slot */ psx_delay_BFC045A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC045A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC045A8u); #endif if (psx_delay_BFC045A4) { psx_delay_BFC045A4 = 0; cpu->gpr[31] = 0xBFC045ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } label_BFC045AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC045ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC045ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC045AC: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC045ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC045B0: 10600007 beq $v1, $zero, 0xBFC045D0 */ uint32_t psx_brA_BFC045B0 = cpu->gpr[3]; uint32_t psx_brB_BFC045B0 = cpu->gpr[0]; psx_taken_BFC045B0 = (psx_brA_BFC045B0 == psx_brB_BFC045B0); psx_delay_BFC045B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC045B4: 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(0xBFC045B4u); #endif if (psx_delay_BFC045B0) { psx_delay_BFC045B0 = 0; if (psx_taken_BFC045B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC045D0u); goto label_BFC045D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC045B8u); } label_BFC045B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC045B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC045B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045B8u); #endif /* 0xBFC045B8: 8C62001C lw $v0, 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, 0xBFC045B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C62001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC045B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC045BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC045BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045C0u); #endif /* 0xBFC045C0: 8C420004 lw $v0, 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, 0xBFC045C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC045C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC045C4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC045C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC045C8: 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(0xBFC045C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC045CC: 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(0xBFC045CCu); #endif label_BFC045D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC045D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC045D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045D0u); #endif /* 0xBFC045D0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC045D0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC045D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC045D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC045D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC045D8: 03E00008 jr $ra */ psx_delay_BFC045D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC045DC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC045DCu); #endif if (psx_delay_BFC045D8) { psx_delay_BFC045D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC045E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC045E0u); int psx_delay_BFC0460C = 0; int psx_taken_BFC0460C = 0; int psx_delay_BFC04618 = 0; int psx_taken_BFC04618 = 0; int psx_delay_BFC04620 = 0; int psx_taken_BFC04620 = 0; int psx_delay_BFC04630 = 0; int psx_delay_BFC04638 = 0; int psx_delay_BFC04648 = 0; int psx_delay_BFC04660 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04604u: goto label_BFC04604; case 0xBFC04614u: goto label_BFC04614; case 0xBFC04620u: goto label_BFC04620; case 0xBFC04628u: goto label_BFC04628; case 0xBFC04638u: goto label_BFC04638; case 0xBFC04640u: goto label_BFC04640; case 0xBFC04650u: goto label_BFC04650; case 0xBFC04654u: goto label_BFC04654; default: break; } } label_BFC045E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC045E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC045E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC045E0: 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(0xBFC045E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC045E4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC045E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC045E8: 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, 0xBFC045E8u); return; } g_debug_last_store_pc = 0xBFC045E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC045E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC045EC: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC045ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC045F0: 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, 0xBFC045F0u); return; } g_debug_last_store_pc = 0xBFC045F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC045F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC045F4: 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, 0xBFC045F4u); return; } g_debug_last_store_pc = 0xBFC045F4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC045F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC045F8: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC045F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC045FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC045FC: 26105F18 addiu $s0, $s0, 24344 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (24344)); PGXP_ALU(0x26105F18u, cpu->gpr[16], _pgx1, 0x00005F18u); } #ifdef PSX_COSIM cosim_instr(0xBFC045FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04600: 24426238 addiu $v0, $v0, 25144 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25144)); PGXP_ALU(0x24426238u, cpu->gpr[2], _pgx1, 0x00006238u); } #ifdef PSX_COSIM cosim_instr(0xBFC04600u); #endif label_BFC04604: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04604u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04604u); #endif /* 0xBFC04604: 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, 0xBFC04604u); 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(0xBFC04604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04608: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0460Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0460C: 10600006 beq $v1, $zero, 0xBFC04628 */ uint32_t psx_brA_BFC0460C = cpu->gpr[3]; uint32_t psx_brB_BFC0460C = cpu->gpr[0]; psx_taken_BFC0460C = (psx_brA_BFC0460C == psx_brB_BFC0460C); psx_delay_BFC0460C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04610: 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(0xBFC04610u); #endif if (psx_delay_BFC0460C) { psx_delay_BFC0460C = 0; if (psx_taken_BFC0460C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04628u); goto label_BFC04628; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04614u); } label_BFC04614: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04614u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04614: 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(0xBFC04614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04618: 1602FFFA bne $s0, $v0, 0xBFC04604 */ uint32_t psx_brA_BFC04618 = cpu->gpr[16]; uint32_t psx_brB_BFC04618 = cpu->gpr[2]; psx_taken_BFC04618 = (psx_brA_BFC04618 != psx_brB_BFC04618); psx_delay_BFC04618 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0461Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0461C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0461Cu); #endif if (psx_delay_BFC04618) { psx_delay_BFC04618 = 0; if (psx_taken_BFC04618) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04604u); goto label_BFC04604; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04620u); } label_BFC04620: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04620u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04620: 1000000C beq $zero, $zero, 0xBFC04654 */ uint32_t psx_brA_BFC04620 = cpu->gpr[0]; uint32_t psx_brB_BFC04620 = cpu->gpr[0]; psx_taken_BFC04620 = (psx_brA_BFC04620 == psx_brB_BFC04620); psx_delay_BFC04620 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04624: 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(0xBFC04624u); #endif if (psx_delay_BFC04620) { psx_delay_BFC04620 = 0; if (psx_taken_BFC04620) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04654u); goto label_BFC04654; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04628u); } label_BFC04628: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04628u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC04628: 241100A0 addiu $s1, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241100A0u, cpu->gpr[17], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0462Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0462C: 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(0xBFC0462Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC04630: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC04638u; /* jalr link before delay slot */ psx_delay_BFC04630 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04634: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04634u); #endif if (psx_delay_BFC04630) { psx_delay_BFC04630 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC04638u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x80020000u); #endif /* 0xBFC04638: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC04640u; /* jalr link before delay slot */ psx_delay_BFC04638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0463Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0463C: 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(0xBFC0463Cu); #endif if (psx_delay_BFC04638) { psx_delay_BFC04638 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC04640u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 /* 0xBFC04640: 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, 0xBFC04640u); 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(0xBFC04640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04644: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC04648: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04650u; /* jalr link before delay slot */ psx_delay_BFC04648 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0464Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0464C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0464Cu); #endif if (psx_delay_BFC04648) { psx_delay_BFC04648 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04650u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04650: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04650u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04650: 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(0xBFC04650u); #endif label_BFC04654: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04654u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04654u); #endif /* 0xBFC04654: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04654u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04658u); #endif /* 0xBFC04658: 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, 0xBFC04658u); 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(0xBFC04658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0465Cu); #endif /* 0xBFC0465C: 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, 0xBFC0465Cu); 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(0xBFC0465Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04660: 03E00008 jr $ra */ psx_delay_BFC04660 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04664: 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(0xBFC04664u); #endif if (psx_delay_BFC04660) { psx_delay_BFC04660 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04668(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04668u); int psx_delay_BFC04688 = 0; int psx_taken_BFC04688 = 0; int psx_delay_BFC046A0 = 0; int psx_delay_BFC046B0 = 0; int psx_delay_BFC046B8 = 0; int psx_taken_BFC046B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04688u: goto label_BFC04688; case 0xBFC04690u: goto label_BFC04690; case 0xBFC046A8u: goto label_BFC046A8; case 0xBFC046B8u: goto label_BFC046B8; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04668: 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(0xBFC04668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0466Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0466C: 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, 0xBFC0466Cu); return; } g_debug_last_store_pc = 0xBFC0466Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC04670: 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, 0xBFC04670u); return; } g_debug_last_store_pc = 0xBFC04670u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04674: 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, 0xBFC04674u); return; } g_debug_last_store_pc = 0xBFC04674u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04678: 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, 0xBFC04678u); return; } g_debug_last_store_pc = 0xBFC04678u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x10011u); #endif /* 0xBFC0467C: 00808025 or $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(0x00808025u, cpu->gpr[16], _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, 0x20030u); #endif /* 0xBFC04680: 00858821 addu $s1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00858821u, cpu->gpr[17], _pgx1, _pgx2); } #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, 0x40001u); #endif /* 0xBFC04684: 241200B0 addiu $s2, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241200B0u, cpu->gpr[18], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04684u); #endif label_BFC04688: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04688u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC04688: 16110007 bne $s0, $s1, 0xBFC046A8 */ uint32_t psx_brA_BFC04688 = cpu->gpr[16]; uint32_t psx_brB_BFC04688 = cpu->gpr[17]; psx_taken_BFC04688 = (psx_brA_BFC04688 != psx_brB_BFC04688); psx_delay_BFC04688 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0468Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0468C: 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(0xBFC0468Cu); #endif if (psx_delay_BFC04688) { psx_delay_BFC04688 = 0; if (psx_taken_BFC04688) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046A8u); goto label_BFC046A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04690u); } label_BFC04690: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04690u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04690u); #endif /* 0xBFC04690: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04690u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04694u); #endif /* 0xBFC04694: 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, 0xBFC04694u); 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(0xBFC04694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04698u); #endif /* 0xBFC04698: 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, 0xBFC04698u); 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(0xBFC04698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0469Cu); #endif /* 0xBFC0469C: 8FB00010 lw $s0, 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, 0xBFC0469Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC046A0: 03E00008 jr $ra */ psx_delay_BFC046A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC046A4: 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(0xBFC046A4u); #endif if (psx_delay_BFC046A0) { psx_delay_BFC046A0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC046A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC046A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC046A8: 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(0xBFC046A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046ACu); #endif /* 0xBFC046AC: 8204FFFF 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(0x8204FFFFu, _pgxa, cpu->gpr[4]); } #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, 0x80040000u); #endif /* 0xBFC046B0: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC046B8u; /* jalr link before delay slot */ psx_delay_BFC046B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC046B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC046B4u); #endif if (psx_delay_BFC046B0) { psx_delay_BFC046B0 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC046B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC046B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC046B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC046B8: 1000FFF3 beq $zero, $zero, 0xBFC04688 */ uint32_t psx_brA_BFC046B8 = cpu->gpr[0]; uint32_t psx_brB_BFC046B8 = cpu->gpr[0]; psx_taken_BFC046B8 = (psx_brA_BFC046B8 == psx_brB_BFC046B8); psx_delay_BFC046B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC046BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC046BCu); #endif if (psx_delay_BFC046B8) { psx_delay_BFC046B8 = 0; if (psx_taken_BFC046B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04688u); goto label_BFC04688; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046C0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046C0u); cpu->pc = 0xBFC046C0u; return; /* fallthrough */ } void OpenBIOS_func_1FC046C0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC046C0u); int psx_delay_BFC046D4 = 0; int psx_delay_BFC046E0 = 0; int psx_taken_BFC046E0 = 0; int psx_delay_BFC04704 = 0; int psx_delay_BFC04710 = 0; int psx_delay_BFC0471C = 0; int psx_taken_BFC0471C = 0; int psx_delay_BFC04730 = 0; int psx_taken_BFC04730 = 0; int psx_delay_BFC04768 = 0; int psx_delay_BFC04770 = 0; int psx_taken_BFC04770 = 0; int psx_delay_BFC0477C = 0; int psx_taken_BFC0477C = 0; int psx_delay_BFC04788 = 0; int psx_taken_BFC04788 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC046DCu: goto label_BFC046DC; case 0xBFC046E8u: goto label_BFC046E8; case 0xBFC046F4u: goto label_BFC046F4; case 0xBFC046F8u: goto label_BFC046F8; case 0xBFC0470Cu: goto label_BFC0470C; case 0xBFC04718u: goto label_BFC04718; case 0xBFC04724u: goto label_BFC04724; case 0xBFC04730u: goto label_BFC04730; case 0xBFC04738u: goto label_BFC04738; case 0xBFC04770u: goto label_BFC04770; case 0xBFC04778u: goto label_BFC04778; case 0xBFC04784u: goto label_BFC04784; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC046C0: 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(0xBFC046C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC046C4: 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, 0xBFC046C4u); return; } g_debug_last_store_pc = 0xBFC046C4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC046C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC046C8: 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, 0xBFC046C8u); return; } g_debug_last_store_pc = 0xBFC046C8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC046C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC046CC: 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, 0xBFC046CCu); return; } g_debug_last_store_pc = 0xBFC046CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC046CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC046D0: 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, 0xBFC046D0u); return; } g_debug_last_store_pc = 0xBFC046D0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC046D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC046D4: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC046DCu; /* jal link before delay slot */ psx_delay_BFC046D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC046D8: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC046D8u); #endif if (psx_delay_BFC046D4) { psx_delay_BFC046D4 = 0; cpu->gpr[31] = 0xBFC046DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC046DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC046DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046DCu); #endif /* 0xBFC046DC: 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, 0xBFC046DCu); 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(0xBFC046DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC046E0: 1440000A bne $v0, $zero, 0xBFC0470C */ uint32_t psx_brA_BFC046E0 = cpu->gpr[2]; uint32_t psx_brB_BFC046E0 = cpu->gpr[0]; psx_taken_BFC046E0 = (psx_brA_BFC046E0 != psx_brB_BFC046E0); psx_delay_BFC046E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC046E4: 27A60014 addiu $a2, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A60014u, cpu->gpr[6], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC046E4u); #endif if (psx_delay_BFC046E0) { psx_delay_BFC046E0 = 0; if (psx_taken_BFC046E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0470Cu); goto label_BFC0470C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046E8u); } label_BFC046E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC046E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC046E8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 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, 0x9u); #endif /* 0xBFC046EC: 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(0xBFC046ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC046F0: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); 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[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC046F0u); #endif label_BFC046F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC046F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC046F4: 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(0xBFC046F4u); #endif label_BFC046F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC046F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC046F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046F8u); #endif /* 0xBFC046F8: 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, 0xBFC046F8u); 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(0xBFC046F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC046FCu); #endif /* 0xBFC046FC: 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, 0xBFC046FCu); 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(0xBFC046FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04700u); #endif /* 0xBFC04700: 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, 0xBFC04700u); 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(0xBFC04700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04704: 03E00008 jr $ra */ psx_delay_BFC04704 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04708: 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(0xBFC04708u); #endif if (psx_delay_BFC04704) { psx_delay_BFC04704 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0470C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0470Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0470Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0470Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0470C: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #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, 0x80000000u); #endif /* 0xBFC04710: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC04718u; /* jal link before delay slot */ psx_delay_BFC04710 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04714: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04714u); #endif if (psx_delay_BFC04710) { psx_delay_BFC04710 = 0; cpu->gpr[31] = 0xBFC04718u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } 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, 0x9u); #endif /* 0xBFC04718: 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(0xBFC04718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0471Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0471C: 14430006 bne $v0, $v1, 0xBFC04738 */ uint32_t psx_brA_BFC0471C = cpu->gpr[2]; uint32_t psx_brB_BFC0471C = cpu->gpr[3]; psx_taken_BFC0471C = (psx_brA_BFC0471C != psx_brB_BFC0471C); psx_delay_BFC0471C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC04720: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04720u); #endif if (psx_delay_BFC0471C) { psx_delay_BFC0471C = 0; if (psx_taken_BFC0471C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04738u); goto label_BFC04738; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04724u); } label_BFC04724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04724u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04724: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04728: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #ifdef PSX_COSIM cosim_instr(0xBFC04728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0472Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0472C: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0472Cu); return; } g_debug_last_store_pc = 0xBFC0472Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0472Cu); #endif label_BFC04730: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04730u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04730: 1000FFF0 beq $zero, $zero, 0xBFC046F4 */ uint32_t psx_brA_BFC04730 = cpu->gpr[0]; uint32_t psx_brB_BFC04730 = cpu->gpr[0]; psx_taken_BFC04730 = (psx_brA_BFC04730 == psx_brB_BFC04730); psx_delay_BFC04730 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04734: 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, 0xBFC04734u); return; } g_debug_last_store_pc = 0xBFC04734u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04734u); #endif if (psx_delay_BFC04730) { psx_delay_BFC04730 = 0; if (psx_taken_BFC04730) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046F4u); goto label_BFC046F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04738u); } label_BFC04738: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04738u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC04738: 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, 0xBFC04738u); return; } g_debug_last_store_pc = 0xBFC04738u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAE110000u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0473Cu); #endif /* 0xBFC0473C: 8FA30014 lw $v1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0473Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30014u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC04740: 00000000 nop */ /* nop */ #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, 0x10008u); #endif /* 0xBFC04744: AE030004 sw $v1, 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, 0xBFC04744u); return; } g_debug_last_store_pc = 0xBFC04744u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04748u); #endif /* 0xBFC04748: 8FA30010 lw $v1, 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, 0xBFC04748u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30010u, _pgxa, cpu->gpr[3]); } #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, 0x25u); #endif /* 0xBFC0474C: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0474Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC04750: AE03001C sw $v1, 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, 0xBFC04750u); return; } g_debug_last_store_pc = 0xBFC04750u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE03001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04754u); #endif /* 0xBFC04754: 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, 0xBFC04754u); 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(0xBFC04754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04758: 00000000 nop */ /* nop */ #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, 0x10010u); #endif /* 0xBFC0475C: AE040014 sw $a0, 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, 0xBFC0475Cu); return; } g_debug_last_store_pc = 0xBFC0475Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE040014u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0475Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04760u); #endif /* 0xBFC04760: 8C630014 lw $v1, 20($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04760u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630014u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC04764: 00000000 nop */ /* nop */ #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, 0x80000008u); #endif /* 0xBFC04768: 0060F809 jalr $ra, $v1 */ cpu->gpr[31] = 0xBFC04770u; /* jalr link before delay slot */ psx_delay_BFC04768 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0476Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0476C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0476Cu); #endif if (psx_delay_BFC04768) { psx_delay_BFC04768 = 0; { uint32_t _t = cpu->gpr[3]; cpu->gpr[31] = 0xBFC04770u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04770: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04770u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04770: 10400004 beq $v0, $zero, 0xBFC04784 */ uint32_t psx_brA_BFC04770 = cpu->gpr[2]; uint32_t psx_brB_BFC04770 = cpu->gpr[0]; psx_taken_BFC04770 = (psx_brA_BFC04770 == psx_brB_BFC04770); psx_delay_BFC04770 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04774: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04774u); #endif if (psx_delay_BFC04770) { psx_delay_BFC04770 = 0; if (psx_taken_BFC04770) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04784u); goto label_BFC04784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04778u); } label_BFC04778: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04778u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04778u); #endif /* 0xBFC04778: 8E030018 lw $v1, 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, 0xBFC04778u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E030018u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0477C: 1000FFEC beq $zero, $zero, 0xBFC04730 */ uint32_t psx_brA_BFC0477C = cpu->gpr[0]; uint32_t psx_brB_BFC0477C = cpu->gpr[0]; psx_taken_BFC0477C = (psx_brA_BFC0477C == psx_brB_BFC0477C); psx_delay_BFC0477C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04780: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04780u); return; } g_debug_last_store_pc = 0xBFC04780u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04780u); #endif if (psx_delay_BFC0477C) { psx_delay_BFC0477C = 0; if (psx_taken_BFC0477C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04730u); goto label_BFC04730; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04784u); } label_BFC04784: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04784u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04784u); #endif /* 0xBFC04784: 8E020028 lw $v0, 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, 0xBFC04784u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020028u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04788: 1000FFDB beq $zero, $zero, 0xBFC046F8 */ uint32_t psx_brA_BFC04788 = cpu->gpr[0]; 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, 0x10001u); #endif /* 0xBFC0478C: AE000010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0478Cu); return; } g_debug_last_store_pc = 0xBFC0478Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000010u, _pgxa, cpu->gpr[0]); } #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, 0xBFC046F8u); goto label_BFC046F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04790u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04790u); cpu->pc = 0xBFC04790u; return; /* fallthrough */ } void OpenBIOS_func_1FC04790(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04790u); int psx_delay_BFC047A0 = 0; int psx_delay_BFC047A8 = 0; int psx_taken_BFC047A8 = 0; int psx_delay_BFC047C0 = 0; int psx_taken_BFC047C0 = 0; int psx_delay_BFC047E0 = 0; int psx_delay_BFC047E8 = 0; int psx_taken_BFC047E8 = 0; int psx_delay_BFC047F0 = 0; int psx_taken_BFC047F0 = 0; int psx_delay_BFC047F8 = 0; int psx_taken_BFC047F8 = 0; int psx_delay_BFC04808 = 0; int psx_taken_BFC04808 = 0; int psx_delay_BFC0481C = 0; int psx_taken_BFC0481C = 0; int psx_delay_BFC04824 = 0; int psx_delay_BFC04838 = 0; int psx_taken_BFC04838 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC047A8u: goto label_BFC047A8; case 0xBFC047B0u: goto label_BFC047B0; case 0xBFC047C8u: goto label_BFC047C8; case 0xBFC047D4u: goto label_BFC047D4; case 0xBFC047D8u: goto label_BFC047D8; case 0xBFC047E8u: goto label_BFC047E8; case 0xBFC047F0u: goto label_BFC047F0; case 0xBFC047F8u: goto label_BFC047F8; case 0xBFC04800u: goto label_BFC04800; case 0xBFC04804u: goto label_BFC04804; case 0xBFC04810u: goto label_BFC04810; case 0xBFC04824u: goto label_BFC04824; case 0xBFC0482Cu: goto label_BFC0482C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC04790: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC04790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04794: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04794u); return; } g_debug_last_store_pc = 0xBFC04794u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04798: 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, 0xBFC04798u); return; } g_debug_last_store_pc = 0xBFC04798u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x20000020u); #endif /* 0xBFC0479C: 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, 0xBFC0479Cu); return; } g_debug_last_store_pc = 0xBFC0479Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0479Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC047A0: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC047A8u; /* jal link before delay slot */ psx_delay_BFC047A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC047A4: 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, 0xBFC047A4u); return; } g_debug_last_store_pc = 0xBFC047A4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC047A4u); #endif if (psx_delay_BFC047A0) { psx_delay_BFC047A0 = 0; cpu->gpr[31] = 0xBFC047A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } label_BFC047A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC047A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC047A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC047A8: 10400007 beq $v0, $zero, 0xBFC047C8 */ 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, 0x1u); #endif /* 0xBFC047AC: 00000000 nop */ /* nop */ #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, 0xBFC047C8u); goto label_BFC047C8; } #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, 0x10005u); #endif /* 0xBFC047B0: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC047B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047B4u); #endif /* 0xBFC047B4: 8C420000 lw $v0, 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, 0xBFC047B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC047B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047B8u); #endif /* 0xBFC047B8: 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, 0xBFC047B8u); 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(0xBFC047B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047BCu); #endif /* 0xBFC047BC: 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, 0xBFC047BCu); 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(0xBFC047BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC047C0: 14400009 bne $v0, $zero, 0xBFC047E8 */ uint32_t psx_brA_BFC047C0 = cpu->gpr[2]; uint32_t psx_brB_BFC047C0 = cpu->gpr[0]; psx_taken_BFC047C0 = (psx_brA_BFC047C0 != psx_brB_BFC047C0); psx_delay_BFC047C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC047C4: 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(0xBFC047C4u); #endif if (psx_delay_BFC047C0) { psx_delay_BFC047C0 = 0; if (psx_taken_BFC047C0) { #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, 0xBFC047C8u); } label_BFC047C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC047C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC047C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC047C8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC047CC: 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(0xBFC047CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC047D0: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047D0u); return; } g_debug_last_store_pc = 0xBFC047D0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC047D0u); #endif 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, 0x5u); #endif /* 0xBFC047D4: 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(0xBFC047D4u); #endif label_BFC047D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC047D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC047D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047D8u); #endif /* 0xBFC047D8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC047D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC047D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047DCu); #endif /* 0xBFC047DC: 8FB00010 lw $s0, 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, 0xBFC047DCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC047DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC047E0: 03E00008 jr $ra */ psx_delay_BFC047E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC047E4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC047E4u); #endif if (psx_delay_BFC047E0) { psx_delay_BFC047E0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x44u); #endif /* 0xBFC047E8: 10C20009 beq $a2, $v0, 0xBFC04810 */ uint32_t psx_brA_BFC047E8 = cpu->gpr[6]; uint32_t psx_brB_BFC047E8 = cpu->gpr[2]; psx_taken_BFC047E8 = (psx_brA_BFC047E8 == psx_brB_BFC047E8); psx_delay_BFC047E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC047EC: 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(0xBFC047ECu); #endif if (psx_delay_BFC047E8) { psx_delay_BFC047E8 = 0; if (psx_taken_BFC047E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04810u); goto label_BFC04810; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC047F0u); } label_BFC047F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC047F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC047F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC047F0: 10C20004 beq $a2, $v0, 0xBFC04804 */ uint32_t psx_brA_BFC047F0 = cpu->gpr[6]; uint32_t psx_brB_BFC047F0 = cpu->gpr[2]; psx_taken_BFC047F0 = (psx_brA_BFC047F0 == psx_brB_BFC047F0); psx_delay_BFC047F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC047F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC047F4u); #endif if (psx_delay_BFC047F0) { psx_delay_BFC047F0 = 0; if (psx_taken_BFC047F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04804u); goto label_BFC04804; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC047F8u); } label_BFC047F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC047F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC047F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC047F8: 14C0000A bne $a2, $zero, 0xBFC04824 */ uint32_t psx_brA_BFC047F8 = cpu->gpr[6]; uint32_t psx_brB_BFC047F8 = cpu->gpr[0]; psx_taken_BFC047F8 = (psx_brA_BFC047F8 != psx_brB_BFC047F8); psx_delay_BFC047F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC047FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC047FC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC047FCu); #endif if (psx_delay_BFC047F8) { psx_delay_BFC047F8 = 0; if (psx_taken_BFC047F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04824u); goto label_BFC04824; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04800u); } label_BFC04800: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04800u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC04800: AE050010 sw $a1, 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, 0xBFC04800u); return; } g_debug_last_store_pc = 0xBFC04800u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC04800u); #endif label_BFC04804: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04804u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04804u); #endif /* 0xBFC04804: 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, 0xBFC04804u); 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(0xBFC04804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04808: 1000FFF3 beq $zero, $zero, 0xBFC047D8 */ uint32_t psx_brA_BFC04808 = cpu->gpr[0]; uint32_t psx_brB_BFC04808 = cpu->gpr[0]; psx_taken_BFC04808 = (psx_brA_BFC04808 == psx_brB_BFC04808); psx_delay_BFC04808 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0480Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0480C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0480Cu); #endif if (psx_delay_BFC04808) { psx_delay_BFC04808 = 0; if (psx_taken_BFC04808) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC047D8u); goto label_BFC047D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04810u); } label_BFC04810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04810u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04810u); #endif /* 0xBFC04810: 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, 0xBFC04810u); 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(0xBFC04810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04814: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC04818: 00451021 addu $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00451021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0481Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0481C: 1000FFF9 beq $zero, $zero, 0xBFC04804 */ uint32_t psx_brA_BFC0481C = cpu->gpr[0]; uint32_t psx_brB_BFC0481C = cpu->gpr[0]; psx_taken_BFC0481C = (psx_brA_BFC0481C == psx_brB_BFC0481C); psx_delay_BFC0481C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04820: AE020010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04820u); return; } g_debug_last_store_pc = 0xBFC04820u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04820u); #endif if (psx_delay_BFC0481C) { psx_delay_BFC0481C = 0; if (psx_taken_BFC0481C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04804u); goto label_BFC04804; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04824u); } label_BFC04824: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04824u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04824: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC0482Cu; /* jal link before delay slot */ psx_delay_BFC04824 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04828: 2484976C addiu $a0, $a0, -26772 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26772)); PGXP_ALU(0x2484976Cu, cpu->gpr[4], _pgx1, 0xFFFF976Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC04828u); #endif if (psx_delay_BFC04824) { psx_delay_BFC04824 = 0; cpu->gpr[31] = 0xBFC0482Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC0482C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0482Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0482Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0482Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0482C: 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(0xBFC0482Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04830: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 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, 0xCu); #endif /* 0xBFC04834: AC624BF0 sw $v0, 19440($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19440)); 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[2]); } PGXP_STORE(0xAC624BF0u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC04838: 1000FFE6 beq $zero, $zero, 0xBFC047D4 */ uint32_t psx_brA_BFC04838 = cpu->gpr[0]; uint32_t psx_brB_BFC04838 = cpu->gpr[0]; psx_taken_BFC04838 = (psx_brA_BFC04838 == psx_brB_BFC04838); psx_delay_BFC04838 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0483Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0483C: AE020018 sw $v0, 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, 0xBFC0483Cu); return; } g_debug_last_store_pc = 0xBFC0483Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0483Cu); #endif if (psx_delay_BFC04838) { psx_delay_BFC04838 = 0; if (psx_taken_BFC04838) { #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, 0xBFC04840u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04840u); cpu->pc = 0xBFC04840u; return; /* fallthrough */ } void OpenBIOS_func_1FC04840(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04840u); int psx_delay_BFC04858 = 0; int psx_delay_BFC04860 = 0; int psx_taken_BFC04860 = 0; int psx_delay_BFC04874 = 0; int psx_taken_BFC04874 = 0; int psx_delay_BFC0489C = 0; int psx_delay_BFC048A4 = 0; int psx_delay_BFC048B8 = 0; int psx_taken_BFC048B8 = 0; int psx_delay_BFC048C8 = 0; int psx_delay_BFC048D0 = 0; int psx_taken_BFC048D0 = 0; int psx_delay_BFC048DC = 0; int psx_taken_BFC048DC = 0; int psx_delay_BFC048F8 = 0; int psx_taken_BFC048F8 = 0; int psx_delay_BFC0490C = 0; int psx_taken_BFC0490C = 0; int psx_delay_BFC0491C = 0; int psx_taken_BFC0491C = 0; int psx_delay_BFC04924 = 0; int psx_delay_BFC0492C = 0; int psx_taken_BFC0492C = 0; int psx_delay_BFC04934 = 0; int psx_taken_BFC04934 = 0; int psx_delay_BFC04950 = 0; int psx_delay_BFC04958 = 0; int psx_taken_BFC04958 = 0; int psx_delay_BFC0496C = 0; int psx_taken_BFC0496C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04860u: goto label_BFC04860; case 0xBFC04868u: goto label_BFC04868; case 0xBFC0487Cu: goto label_BFC0487C; case 0xBFC0488Cu: goto label_BFC0488C; case 0xBFC048A4u: goto label_BFC048A4; case 0xBFC048ACu: goto label_BFC048AC; case 0xBFC048C0u: goto label_BFC048C0; case 0xBFC048D0u: goto label_BFC048D0; case 0xBFC048D8u: goto label_BFC048D8; case 0xBFC048E4u: goto label_BFC048E4; case 0xBFC04900u: goto label_BFC04900; case 0xBFC04914u: goto label_BFC04914; case 0xBFC04918u: goto label_BFC04918; case 0xBFC04924u: goto label_BFC04924; case 0xBFC0492Cu: goto label_BFC0492C; case 0xBFC04934u: goto label_BFC04934; case 0xBFC0493Cu: goto label_BFC0493C; case 0xBFC04940u: goto label_BFC04940; case 0xBFC04948u: goto label_BFC04948; case 0xBFC04958u: goto label_BFC04958; case 0xBFC04960u: goto label_BFC04960; default: break; } } label_BFC04840: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04840u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04840: 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(0xBFC04840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC04844: 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, 0xBFC04844u); return; } g_debug_last_store_pc = 0xBFC04844u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC04848: 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, 0xBFC04848u); return; } g_debug_last_store_pc = 0xBFC04848u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0484Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0484C: 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, 0xBFC0484Cu); return; } g_debug_last_store_pc = 0xBFC0484Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0484Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04850: 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, 0xBFC04850u); return; } g_debug_last_store_pc = 0xBFC04850u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x40021u); #endif /* 0xBFC04854: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC04858: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC04860u; /* jal link before delay slot */ psx_delay_BFC04858 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0485Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC0485C: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0485Cu); #endif if (psx_delay_BFC04858) { psx_delay_BFC04858 = 0; cpu->gpr[31] = 0xBFC04860u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } label_BFC04860: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04860u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04860: 10400006 beq $v0, $zero, 0xBFC0487C */ uint32_t psx_brA_BFC04860 = cpu->gpr[2]; uint32_t psx_brB_BFC04860 = cpu->gpr[0]; psx_taken_BFC04860 = (psx_brA_BFC04860 == psx_brB_BFC04860); psx_delay_BFC04860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04864: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04864u); #endif if (psx_delay_BFC04860) { psx_delay_BFC04860 = 0; if (psx_taken_BFC04860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0487Cu); goto label_BFC0487C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04868u); } label_BFC04868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04868u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04868: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0486Cu); #endif /* 0xBFC0486C: 8C420000 lw $v0, 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, 0xBFC0486Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC04870: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC04874: 1440000B bne $v0, $zero, 0xBFC048A4 */ uint32_t psx_brA_BFC04874 = cpu->gpr[2]; uint32_t psx_brB_BFC04874 = cpu->gpr[0]; psx_taken_BFC04874 = (psx_brA_BFC04874 != psx_brB_BFC04874); psx_delay_BFC04874 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04878: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04878u); #endif if (psx_delay_BFC04874) { psx_delay_BFC04874 = 0; if (psx_taken_BFC04874) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048A4u); goto label_BFC048A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0487Cu); } label_BFC0487C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0487Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0487Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0487Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0487C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 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, 0x9u); #endif /* 0xBFC04880: 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(0xBFC04880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04884: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); 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[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC04888: 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(0xBFC04888u); #endif label_BFC0488C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0488Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0488Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0488Cu); #endif /* 0xBFC0488C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0488Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0488Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04890u); #endif /* 0xBFC04890: 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, 0xBFC04890u); 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(0xBFC04890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04894u); #endif /* 0xBFC04894: 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, 0xBFC04894u); 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(0xBFC04894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04898u); #endif /* 0xBFC04898: 8FB00010 lw $s0, 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, 0xBFC04898u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC0489C: 03E00008 jr $ra */ psx_delay_BFC0489C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC048A0: 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(0xBFC048A0u); #endif if (psx_delay_BFC0489C) { psx_delay_BFC0489C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC048A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC048A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC048A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC048A4: 0FF01134 jal 0xBFC044D0 */ cpu->gpr[31] = 0xBFC048ACu; /* jal link before delay slot */ psx_delay_BFC048A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC048A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC048A8u); #endif if (psx_delay_BFC048A4) { psx_delay_BFC048A4 = 0; cpu->gpr[31] = 0xBFC048ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044D0u); cpu->pc = 0xBFC044D0u; return; } label_BFC048AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC048ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC048ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048ACu); #endif /* 0xBFC048AC: 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, 0xBFC048ACu); 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(0xBFC048ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048B0u); #endif /* 0xBFC048B0: 8E03001C lw $v1, 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, 0xBFC048B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E03001Cu, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC048B4: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #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, 0x5u); #endif /* 0xBFC048B8: 1040000A beq $v0, $zero, 0xBFC048E4 */ uint32_t psx_brA_BFC048B8 = cpu->gpr[2]; uint32_t psx_brB_BFC048B8 = cpu->gpr[0]; psx_taken_BFC048B8 = (psx_brA_BFC048B8 == psx_brB_BFC048B8); psx_delay_BFC048B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC048BC: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC048BCu); #endif if (psx_delay_BFC048B8) { psx_delay_BFC048B8 = 0; if (psx_taken_BFC048B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048E4u); goto label_BFC048E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048C0u); } 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: 8C620024 lw $v0, 36($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C620024u, _pgxa, cpu->gpr[2]); } #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, 0x40021u); #endif /* 0xBFC048C4: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000004u); #endif /* 0xBFC048C8: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC048D0u; /* jalr link before delay slot */ psx_delay_BFC048C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC048CC: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC048CCu); #endif if (psx_delay_BFC048C8) { psx_delay_BFC048C8 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC048D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x4u); #endif /* 0xBFC048D0: 0441FFEE bgez $v0, 0xBFC0488C */ uint32_t psx_brA_BFC048D0 = cpu->gpr[2]; psx_taken_BFC048D0 = ((int32_t)psx_brA_BFC048D0 >= 0); psx_delay_BFC048D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC048D4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC048D4u); #endif if (psx_delay_BFC048D0) { psx_delay_BFC048D0 = 0; if (psx_taken_BFC048D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0488Cu); goto label_BFC0488C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048D8u); } label_BFC048D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC048D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC048D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048D8u); #endif /* 0xBFC048D8: 8E040018 lw $a0, 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, 0xBFC048D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } PGXP_LOAD(0x8E040018u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC048DC: 1000FFEB beq $zero, $zero, 0xBFC0488C */ uint32_t psx_brA_BFC048DC = cpu->gpr[0]; uint32_t psx_brB_BFC048DC = cpu->gpr[0]; psx_taken_BFC048DC = (psx_brA_BFC048DC == psx_brB_BFC048DC); psx_delay_BFC048DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC048E0: AC644BF0 sw $a0, 19440($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC048E0u); return; } g_debug_last_store_pc = 0xBFC048E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644BF0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC048E0u); #endif if (psx_delay_BFC048DC) { psx_delay_BFC048DC = 0; if (psx_taken_BFC048DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0488Cu); goto label_BFC0488C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048E4u); } label_BFC048E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC048E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC048E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC048E4: AE120008 sw $s2, 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, 0xBFC048E4u); return; } g_debug_last_store_pc = 0xBFC048E4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120008u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC048E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC048E8: AE11000C sw $s1, 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, 0xBFC048E8u); return; } g_debug_last_store_pc = 0xBFC048E8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAE11000Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC048E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048ECu); #endif /* 0xBFC048EC: 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, 0xBFC048ECu); 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(0xBFC048ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC048F0: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC048F4: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #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, 0x5u); #endif /* 0xBFC048F8: 10400013 beq $v0, $zero, 0xBFC04948 */ uint32_t psx_brA_BFC048F8 = cpu->gpr[2]; uint32_t psx_brB_BFC048F8 = cpu->gpr[0]; psx_taken_BFC048F8 = (psx_brA_BFC048F8 == psx_brB_BFC048F8); psx_delay_BFC048F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC048FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC048FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC048FCu); #endif if (psx_delay_BFC048F8) { psx_delay_BFC048F8 = 0; if (psx_taken_BFC048F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04948u); goto label_BFC04948; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04900u); } 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: 8E040010 lw $a0, 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, 0xBFC04900u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } PGXP_LOAD(0x8E040010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04904u); #endif /* 0xBFC04904: 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, 0xBFC04904u); 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(0xBFC04904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04908: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0490Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0490C: 14400002 bne $v0, $zero, 0xBFC04918 */ uint32_t psx_brA_BFC0490C = cpu->gpr[2]; uint32_t psx_brB_BFC0490C = cpu->gpr[0]; psx_taken_BFC0490C = (psx_brA_BFC0490C != psx_brB_BFC0490C); psx_delay_BFC0490C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04910: 0082001B divu $a0, $v0 */ { uint32_t psx_n = cpu->gpr[4]; 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(0x0082001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC04910u); #endif if (psx_delay_BFC0490C) { psx_delay_BFC0490C = 0; if (psx_taken_BFC0490C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04918u); goto label_BFC04918; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04914u); } label_BFC04914: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04914u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC04914: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC04914u); return; #ifdef PSX_COSIM cosim_instr(0xBFC04914u); #endif label_BFC04918: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04918u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04918: 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(0xBFC04918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0491Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0491C: 10800005 beq $a0, $zero, 0xBFC04934 */ uint32_t psx_brA_BFC0491C = cpu->gpr[4]; uint32_t psx_brB_BFC0491C = cpu->gpr[0]; psx_taken_BFC0491C = (psx_brA_BFC0491C == psx_brB_BFC0491C); psx_delay_BFC0491C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04920: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04920u); #endif if (psx_delay_BFC0491C) { psx_delay_BFC0491C = 0; if (psx_taken_BFC0491C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04934u); goto label_BFC04934; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04924u); } label_BFC04924: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04924u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04924: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC0492Cu; /* jal link before delay slot */ psx_delay_BFC04924 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04928: 24849780 addiu $a0, $a0, -26752 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26752)); PGXP_ALU(0x24849780u, cpu->gpr[4], _pgx1, 0xFFFF9780u); } #ifdef PSX_COSIM cosim_instr(0xBFC04928u); #endif if (psx_delay_BFC04924) { psx_delay_BFC04924 = 0; cpu->gpr[31] = 0xBFC0492Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC0492C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0492Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0492Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0492Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0492C: 1000FFD7 beq $zero, $zero, 0xBFC0488C */ uint32_t psx_brA_BFC0492C = cpu->gpr[0]; uint32_t psx_brB_BFC0492C = cpu->gpr[0]; psx_taken_BFC0492C = (psx_brA_BFC0492C == psx_brB_BFC0492C); psx_delay_BFC0492C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04930: 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(0xBFC04930u); #endif if (psx_delay_BFC0492C) { psx_delay_BFC0492C = 0; if (psx_taken_BFC0492C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0488Cu); goto label_BFC0488C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04934u); } 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, 0x5u); #endif /* 0xBFC04934: 14400002 bne $v0, $zero, 0xBFC04940 */ uint32_t psx_brA_BFC04934 = cpu->gpr[2]; uint32_t psx_brB_BFC04934 = cpu->gpr[0]; psx_taken_BFC04934 = (psx_brA_BFC04934 != psx_brB_BFC04934); psx_delay_BFC04934 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC04938: 0222001B divu $s1, $v0 */ { uint32_t psx_n = cpu->gpr[17]; 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(0x0222001Bu, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC04938u); #endif if (psx_delay_BFC04934) { psx_delay_BFC04934 = 0; if (psx_taken_BFC04934) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04940u); goto label_BFC04940; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0493Cu); } label_BFC0493C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0493Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0493Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0493Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0493C: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC0493Cu); return; #ifdef PSX_COSIM cosim_instr(0xBFC0493Cu); #endif label_BFC04940: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04940u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04940: 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(0xBFC04940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04944: AE02000C sw $v0, 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, 0xBFC04944u); return; } g_debug_last_store_pc = 0xBFC04944u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE02000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04944u); #endif label_BFC04948: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04948u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04948u); #endif /* 0xBFC04948: 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, 0xBFC04948u); 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(0xBFC04948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0494Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0494C: 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(0xBFC0494Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC04950: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04958u; /* jalr link before delay slot */ psx_delay_BFC04950 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04954: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04954u); #endif if (psx_delay_BFC04950) { psx_delay_BFC04950 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04958u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04958: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04958u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04958: 1840FFDD blez $v0, 0xBFC048D0 */ uint32_t psx_brA_BFC04958 = cpu->gpr[2]; psx_taken_BFC04958 = ((int32_t)psx_brA_BFC04958 <= 0); psx_delay_BFC04958 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0495Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0495C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0495Cu); #endif if (psx_delay_BFC04958) { psx_delay_BFC04958 = 0; if (psx_taken_BFC04958) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC048D0u); goto label_BFC048D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04960u); } label_BFC04960: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04960u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04960u); #endif /* 0xBFC04960: 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, 0xBFC04960u); 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(0xBFC04960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04964: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC04968: 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(0xBFC04968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0496Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0496C: 1000FFC7 beq $zero, $zero, 0xBFC0488C */ uint32_t psx_brA_BFC0496C = cpu->gpr[0]; uint32_t psx_brB_BFC0496C = cpu->gpr[0]; psx_taken_BFC0496C = (psx_brA_BFC0496C == psx_brB_BFC0496C); psx_delay_BFC0496C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC04970: 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, 0xBFC04970u); return; } g_debug_last_store_pc = 0xBFC04970u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04970u); #endif if (psx_delay_BFC0496C) { psx_delay_BFC0496C = 0; if (psx_taken_BFC0496C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0488Cu); goto label_BFC0488C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04974u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04974u); cpu->pc = 0xBFC04974u; return; /* fallthrough */ } void OpenBIOS_func_1FC04974(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04974u); int psx_delay_BFC0498C = 0; int psx_delay_BFC04994 = 0; int psx_taken_BFC04994 = 0; int psx_delay_BFC049A8 = 0; int psx_taken_BFC049A8 = 0; int psx_delay_BFC049D0 = 0; int psx_delay_BFC049D8 = 0; int psx_delay_BFC049EC = 0; int psx_taken_BFC049EC = 0; int psx_delay_BFC049FC = 0; int psx_delay_BFC04A04 = 0; int psx_taken_BFC04A04 = 0; int psx_delay_BFC04A10 = 0; int psx_taken_BFC04A10 = 0; int psx_delay_BFC04A2C = 0; int psx_taken_BFC04A2C = 0; int psx_delay_BFC04A40 = 0; int psx_taken_BFC04A40 = 0; int psx_delay_BFC04A50 = 0; int psx_taken_BFC04A50 = 0; int psx_delay_BFC04A58 = 0; int psx_delay_BFC04A60 = 0; int psx_taken_BFC04A60 = 0; int psx_delay_BFC04A68 = 0; int psx_taken_BFC04A68 = 0; int psx_delay_BFC04A84 = 0; int psx_delay_BFC04A8C = 0; int psx_taken_BFC04A8C = 0; int psx_delay_BFC04AA0 = 0; int psx_taken_BFC04AA0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04994u: goto label_BFC04994; case 0xBFC0499Cu: goto label_BFC0499C; case 0xBFC049B0u: goto label_BFC049B0; case 0xBFC049C0u: goto label_BFC049C0; case 0xBFC049D8u: goto label_BFC049D8; case 0xBFC049E0u: goto label_BFC049E0; case 0xBFC049F4u: goto label_BFC049F4; case 0xBFC04A04u: goto label_BFC04A04; case 0xBFC04A0Cu: goto label_BFC04A0C; case 0xBFC04A18u: goto label_BFC04A18; case 0xBFC04A34u: goto label_BFC04A34; case 0xBFC04A48u: goto label_BFC04A48; case 0xBFC04A4Cu: goto label_BFC04A4C; case 0xBFC04A58u: goto label_BFC04A58; case 0xBFC04A60u: goto label_BFC04A60; case 0xBFC04A68u: goto label_BFC04A68; case 0xBFC04A70u: goto label_BFC04A70; case 0xBFC04A74u: goto label_BFC04A74; case 0xBFC04A7Cu: goto label_BFC04A7C; case 0xBFC04A8Cu: goto label_BFC04A8C; case 0xBFC04A94u: goto label_BFC04A94; default: break; } } label_BFC04974: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04974u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04974: 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(0xBFC04974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC04978: 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, 0xBFC04978u); return; } g_debug_last_store_pc = 0xBFC04978u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC0497C: 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, 0xBFC0497Cu); return; } g_debug_last_store_pc = 0xBFC0497Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #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, 0xA0000000u); #endif /* 0xBFC04980: 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, 0xBFC04980u); return; } g_debug_last_store_pc = 0xBFC04980u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04984: 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, 0xBFC04984u); return; } g_debug_last_store_pc = 0xBFC04984u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x40021u); #endif /* 0xBFC04988: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC0498C: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC04994u; /* jal link before delay slot */ psx_delay_BFC0498C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC04990: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04990u); #endif if (psx_delay_BFC0498C) { psx_delay_BFC0498C = 0; cpu->gpr[31] = 0xBFC04994u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } label_BFC04994: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04994u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04994: 10400006 beq $v0, $zero, 0xBFC049B0 */ uint32_t psx_brA_BFC04994 = cpu->gpr[2]; uint32_t psx_brB_BFC04994 = cpu->gpr[0]; psx_taken_BFC04994 = (psx_brA_BFC04994 == psx_brB_BFC04994); psx_delay_BFC04994 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04998: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04998u); #endif if (psx_delay_BFC04994) { psx_delay_BFC04994 = 0; if (psx_taken_BFC04994) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049B0u); goto label_BFC049B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0499Cu); } label_BFC0499C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0499Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0499Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0499Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC0499C: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0499Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049A0u); #endif /* 0xBFC049A0: 8C420000 lw $v0, 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, 0xBFC049A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC049A4: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC049A8: 1440000B bne $v0, $zero, 0xBFC049D8 */ uint32_t psx_brA_BFC049A8 = cpu->gpr[2]; uint32_t psx_brB_BFC049A8 = cpu->gpr[0]; psx_taken_BFC049A8 = (psx_brA_BFC049A8 != psx_brB_BFC049A8); psx_delay_BFC049A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC049AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC049ACu); #endif if (psx_delay_BFC049A8) { psx_delay_BFC049A8 = 0; if (psx_taken_BFC049A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049D8u); goto label_BFC049D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049B0u); } label_BFC049B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC049B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC049B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC049B0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC049B4: 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(0xBFC049B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC049B8: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); 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[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC049BC: 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(0xBFC049BCu); #endif label_BFC049C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC049C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC049C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049C0u); #endif /* 0xBFC049C0: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049C0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC049C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049C4u); #endif /* 0xBFC049C4: 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, 0xBFC049C4u); 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(0xBFC049C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049C8u); #endif /* 0xBFC049C8: 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, 0xBFC049C8u); 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(0xBFC049C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049CCu); #endif /* 0xBFC049CC: 8FB00010 lw $s0, 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, 0xBFC049CCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC049D0: 03E00008 jr $ra */ psx_delay_BFC049D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC049D4: 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(0xBFC049D4u); #endif if (psx_delay_BFC049D0) { psx_delay_BFC049D0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC049D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC049D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC049D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC049D8: 0FF01134 jal 0xBFC044D0 */ cpu->gpr[31] = 0xBFC049E0u; /* jal link before delay slot */ psx_delay_BFC049D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC049DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC049DCu); #endif if (psx_delay_BFC049D8) { psx_delay_BFC049D8 = 0; cpu->gpr[31] = 0xBFC049E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC044D0u); cpu->pc = 0xBFC044D0u; return; } label_BFC049E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC049E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC049E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049E0u); #endif /* 0xBFC049E0: 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, 0xBFC049E0u); 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(0xBFC049E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049E4u); #endif /* 0xBFC049E4: 8E03001C lw $v1, 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, 0xBFC049E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E03001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC049E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC049E8: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC049E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC049EC: 1040000A beq $v0, $zero, 0xBFC04A18 */ uint32_t psx_brA_BFC049EC = cpu->gpr[2]; uint32_t psx_brB_BFC049EC = cpu->gpr[0]; psx_taken_BFC049EC = (psx_brA_BFC049EC == psx_brB_BFC049EC); psx_delay_BFC049EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC049F0: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC049F0u); #endif if (psx_delay_BFC049EC) { psx_delay_BFC049EC = 0; if (psx_taken_BFC049EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A18u); goto label_BFC04A18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049F4u); } label_BFC049F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC049F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC049F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049F4u); #endif /* 0xBFC049F4: 8C620028 lw $v0, 40($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC049F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C620028u, _pgxa, cpu->gpr[2]); } #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, 0x40021u); #endif /* 0xBFC049F8: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC049F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC049FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC049FC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04A04u; /* jalr link before delay slot */ psx_delay_BFC049FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04A00: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04A00u); #endif if (psx_delay_BFC049FC) { psx_delay_BFC049FC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04A04u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04A04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04A04: 0441FFEE bgez $v0, 0xBFC049C0 */ uint32_t psx_brA_BFC04A04 = cpu->gpr[2]; psx_taken_BFC04A04 = ((int32_t)psx_brA_BFC04A04 >= 0); psx_delay_BFC04A04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04A08: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04A08u); #endif if (psx_delay_BFC04A04) { psx_delay_BFC04A04 = 0; if (psx_taken_BFC04A04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049C0u); goto label_BFC049C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A0Cu); } label_BFC04A0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A0Cu); #endif /* 0xBFC04A0C: 8E040018 lw $a0, 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, 0xBFC04A0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } PGXP_LOAD(0x8E040018u, _pgxa, cpu->gpr[4]); } #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: 1000FFEB beq $zero, $zero, 0xBFC049C0 */ uint32_t psx_brA_BFC04A10 = cpu->gpr[0]; uint32_t psx_brB_BFC04A10 = cpu->gpr[0]; psx_taken_BFC04A10 = (psx_brA_BFC04A10 == psx_brB_BFC04A10); psx_delay_BFC04A10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC04A14: AC644BF0 sw $a0, 19440($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04A14u); return; } g_debug_last_store_pc = 0xBFC04A14u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644BF0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04A14u); #endif if (psx_delay_BFC04A10) { psx_delay_BFC04A10 = 0; if (psx_taken_BFC04A10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049C0u); goto label_BFC049C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A18u); } label_BFC04A18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC04A18: AE120008 sw $s2, 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, 0xBFC04A18u); return; } g_debug_last_store_pc = 0xBFC04A18u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120008u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC04A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC04A1C: AE11000C sw $s1, 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, 0xBFC04A1Cu); return; } g_debug_last_store_pc = 0xBFC04A1Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAE11000Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A20u); #endif /* 0xBFC04A20: 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, 0xBFC04A20u); 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(0xBFC04A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A24: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC04A28: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #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, 0x5u); #endif /* 0xBFC04A2C: 10400013 beq $v0, $zero, 0xBFC04A7C */ uint32_t psx_brA_BFC04A2C = cpu->gpr[2]; uint32_t psx_brB_BFC04A2C = cpu->gpr[0]; psx_taken_BFC04A2C = (psx_brA_BFC04A2C == psx_brB_BFC04A2C); psx_delay_BFC04A2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04A30u); #endif if (psx_delay_BFC04A2C) { psx_delay_BFC04A2C = 0; if (psx_taken_BFC04A2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A7Cu); goto label_BFC04A7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A34u); } label_BFC04A34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A34u); #endif /* 0xBFC04A34: 8E040010 lw $a0, 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, 0xBFC04A34u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10000u); } PGXP_LOAD(0x8E040010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A38u); #endif /* 0xBFC04A38: 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, 0xBFC04A38u); 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(0xBFC04A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A3C: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC04A40: 14400002 bne $v0, $zero, 0xBFC04A4C */ uint32_t psx_brA_BFC04A40 = cpu->gpr[2]; uint32_t psx_brB_BFC04A40 = cpu->gpr[0]; psx_taken_BFC04A40 = (psx_brA_BFC04A40 != psx_brB_BFC04A40); psx_delay_BFC04A40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04A44: 0082001B divu $a0, $v0 */ { uint32_t psx_n = cpu->gpr[4]; 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(0x0082001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC04A44u); #endif if (psx_delay_BFC04A40) { psx_delay_BFC04A40 = 0; if (psx_taken_BFC04A40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A4Cu); goto label_BFC04A4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A48u); } 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, 0x0u); #endif /* 0xBFC04A48: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC04A48u); return; #ifdef PSX_COSIM cosim_instr(0xBFC04A48u); #endif label_BFC04A4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04A4C: 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(0xBFC04A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04A50: 10800005 beq $a0, $zero, 0xBFC04A68 */ uint32_t psx_brA_BFC04A50 = cpu->gpr[4]; uint32_t psx_brB_BFC04A50 = cpu->gpr[0]; psx_taken_BFC04A50 = (psx_brA_BFC04A50 == psx_brB_BFC04A50); psx_delay_BFC04A50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04A54: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04A54u); #endif if (psx_delay_BFC04A50) { psx_delay_BFC04A50 = 0; if (psx_taken_BFC04A50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A68u); goto label_BFC04A68; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A58u); } label_BFC04A58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04A58: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC04A60u; /* jal link before delay slot */ psx_delay_BFC04A58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04A5C: 24849780 addiu $a0, $a0, -26752 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26752)); PGXP_ALU(0x24849780u, cpu->gpr[4], _pgx1, 0xFFFF9780u); } #ifdef PSX_COSIM cosim_instr(0xBFC04A5Cu); #endif if (psx_delay_BFC04A58) { psx_delay_BFC04A58 = 0; cpu->gpr[31] = 0xBFC04A60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC04A60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A60: 1000FFD7 beq $zero, $zero, 0xBFC049C0 */ uint32_t psx_brA_BFC04A60 = cpu->gpr[0]; uint32_t psx_brB_BFC04A60 = cpu->gpr[0]; psx_taken_BFC04A60 = (psx_brA_BFC04A60 == psx_brB_BFC04A60); psx_delay_BFC04A60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04A64: 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(0xBFC04A64u); #endif if (psx_delay_BFC04A60) { psx_delay_BFC04A60 = 0; if (psx_taken_BFC04A60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049C0u); goto label_BFC049C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A68u); } label_BFC04A68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04A68: 14400002 bne $v0, $zero, 0xBFC04A74 */ uint32_t psx_brA_BFC04A68 = cpu->gpr[2]; uint32_t psx_brB_BFC04A68 = cpu->gpr[0]; psx_taken_BFC04A68 = (psx_brA_BFC04A68 != psx_brB_BFC04A68); psx_delay_BFC04A68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC04A6C: 0222001B divu $s1, $v0 */ { uint32_t psx_n = cpu->gpr[17]; 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(0x0222001Bu, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC04A6Cu); #endif if (psx_delay_BFC04A68) { psx_delay_BFC04A68 = 0; if (psx_taken_BFC04A68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A74u); goto label_BFC04A74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A70u); } label_BFC04A70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC04A70: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC04A70u); return; #ifdef PSX_COSIM cosim_instr(0xBFC04A70u); #endif label_BFC04A74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04A74: 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(0xBFC04A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04A78: AE02000C sw $v0, 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, 0xBFC04A78u); return; } g_debug_last_store_pc = 0xBFC04A78u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE02000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04A78u); #endif label_BFC04A7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A7Cu); #endif /* 0xBFC04A7C: 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, 0xBFC04A7Cu); 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(0xBFC04A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC04A80: 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(0xBFC04A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC04A84: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04A8Cu; /* jalr link before delay slot */ psx_delay_BFC04A84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04A88: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04A88u); #endif if (psx_delay_BFC04A84) { psx_delay_BFC04A84 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04A8Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04A8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04A8C: 1840FFDD blez $v0, 0xBFC04A04 */ uint32_t psx_brA_BFC04A8C = cpu->gpr[2]; psx_taken_BFC04A8C = ((int32_t)psx_brA_BFC04A8C <= 0); psx_delay_BFC04A8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04A90u); #endif if (psx_delay_BFC04A8C) { psx_delay_BFC04A8C = 0; if (psx_taken_BFC04A8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A04u); goto label_BFC04A04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04A94u); } label_BFC04A94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04A94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A94u); #endif /* 0xBFC04A94: 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, 0xBFC04A94u); 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(0xBFC04A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04A98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04A9C: 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(0xBFC04A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04AA0: 1000FFC7 beq $zero, $zero, 0xBFC049C0 */ uint32_t psx_brA_BFC04AA0 = cpu->gpr[0]; uint32_t psx_brB_BFC04AA0 = cpu->gpr[0]; psx_taken_BFC04AA0 = (psx_brA_BFC04AA0 == psx_brB_BFC04AA0); psx_delay_BFC04AA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC04AA4: 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, 0xBFC04AA4u); return; } g_debug_last_store_pc = 0xBFC04AA4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AA4u); #endif if (psx_delay_BFC04AA0) { psx_delay_BFC04AA0 = 0; if (psx_taken_BFC04AA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC049C0u); goto label_BFC049C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AA8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AA8u); cpu->pc = 0xBFC04AA8u; return; /* fallthrough */ } void OpenBIOS_func_1FC04AA8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04AA8u); int psx_delay_BFC04AB4 = 0; int psx_delay_BFC04ABC = 0; int psx_taken_BFC04ABC = 0; int psx_delay_BFC04AD0 = 0; int psx_taken_BFC04AD0 = 0; int psx_delay_BFC04AF4 = 0; int psx_delay_BFC04B0C = 0; int psx_delay_BFC04B18 = 0; int psx_taken_BFC04B18 = 0; int psx_delay_BFC04B24 = 0; int psx_taken_BFC04B24 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04ABCu: goto label_BFC04ABC; case 0xBFC04AC4u: goto label_BFC04AC4; case 0xBFC04AD8u: goto label_BFC04AD8; case 0xBFC04AE0u: goto label_BFC04AE0; case 0xBFC04AE8u: goto label_BFC04AE8; case 0xBFC04AFCu: goto label_BFC04AFC; case 0xBFC04B14u: goto label_BFC04B14; case 0xBFC04B20u: goto label_BFC04B20; default: break; } } label_BFC04AA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04AA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04AA8: 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(0xBFC04AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04AAC: 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, 0xBFC04AACu); return; } g_debug_last_store_pc = 0xBFC04AACu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04AB0: 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, 0xBFC04AB0u); return; } g_debug_last_store_pc = 0xBFC04AB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC04AB4: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC04ABCu; /* jal link before delay slot */ psx_delay_BFC04AB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04AB8: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04AB8u); #endif if (psx_delay_BFC04AB4) { psx_delay_BFC04AB4 = 0; cpu->gpr[31] = 0xBFC04ABCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } 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, 0x5u); #endif /* 0xBFC04ABC: 10400006 beq $v0, $zero, 0xBFC04AD8 */ uint32_t psx_brA_BFC04ABC = cpu->gpr[2]; uint32_t psx_brB_BFC04ABC = cpu->gpr[0]; psx_taken_BFC04ABC = (psx_brA_BFC04ABC == psx_brB_BFC04ABC); psx_delay_BFC04ABC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04AC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04AC0u); #endif if (psx_delay_BFC04ABC) { psx_delay_BFC04ABC = 0; if (psx_taken_BFC04ABC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AD8u); goto label_BFC04AD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AC4u); } label_BFC04AC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04AC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC04AC4: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AC8u); #endif /* 0xBFC04AC8: 8C420000 lw $v0, 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, 0xBFC04AC8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04ACC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04AD0: 1440000A bne $v0, $zero, 0xBFC04AFC */ uint32_t psx_brA_BFC04AD0 = cpu->gpr[2]; uint32_t psx_brB_BFC04AD0 = cpu->gpr[0]; psx_taken_BFC04AD0 = (psx_brA_BFC04AD0 != psx_brB_BFC04AD0); psx_delay_BFC04AD0 = 1; #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 if (psx_delay_BFC04AD0) { psx_delay_BFC04AD0 = 0; if (psx_taken_BFC04AD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AFCu); goto label_BFC04AFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AD8u); } label_BFC04AD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04AD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04AD8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04ADC: 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(0xBFC04ADCu); #endif 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, 0xCu); #endif /* 0xBFC04AE0: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04AE0u); return; } g_debug_last_store_pc = 0xBFC04AE0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04AE4: 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(0xBFC04AE4u); #endif 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 /* 0xBFC04AE8: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04AE8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04AEC: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AF0u); #endif /* 0xBFC04AF0: 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, 0xBFC04AF0u); 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(0xBFC04AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04AF4: 03E00008 jr $ra */ psx_delay_BFC04AF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04AF8: 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(0xBFC04AF8u); #endif if (psx_delay_BFC04AF4) { psx_delay_BFC04AF4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC04AFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04AFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04AFCu); #endif /* 0xBFC04AFC: 8C82001C lw $v0, 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, 0xBFC04AFCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC04B00: AFA40010 sw $a0, 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, 0xBFC04B00u); return; } g_debug_last_store_pc = 0xBFC04B00u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B04u); #endif /* 0xBFC04B04: 8C42001C lw $v0, 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, 0xBFC04B04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04B08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC04B0C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04B14u; /* jalr link before delay slot */ 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; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04B14u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 /* 0xBFC04B14: 8FA40010 lw $a0, 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, 0xBFC04B14u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04B18: 1040FFF3 beq $v0, $zero, 0xBFC04AE8 */ uint32_t psx_brA_BFC04B18 = cpu->gpr[2]; uint32_t psx_brB_BFC04B18 = cpu->gpr[0]; psx_taken_BFC04B18 = (psx_brA_BFC04B18 == psx_brB_BFC04B18); psx_delay_BFC04B18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04B1C: 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, 0xBFC04B1Cu); return; } g_debug_last_store_pc = 0xBFC04B1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC800000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B1Cu); #endif if (psx_delay_BFC04B18) { psx_delay_BFC04B18 = 0; if (psx_taken_BFC04B18) { #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, 0xBFC04B20u); } label_BFC04B20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B20u); #endif /* 0xBFC04B20: 8C830018 lw $v1, 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, 0xBFC04B20u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830018u, _pgxa, cpu->gpr[3]); } #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: 1000FFEE beq $zero, $zero, 0xBFC04AE0 */ uint32_t psx_brA_BFC04B24 = cpu->gpr[0]; uint32_t psx_brB_BFC04B24 = cpu->gpr[0]; psx_taken_BFC04B24 = (psx_brA_BFC04B24 == psx_brB_BFC04B24); psx_delay_BFC04B24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04B28: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04B28u); #endif if (psx_delay_BFC04B24) { psx_delay_BFC04B24 = 0; if (psx_taken_BFC04B24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AE0u); goto label_BFC04AE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B2Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B2Cu); cpu->pc = 0xBFC04B2Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC04B2C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04B2Cu); int psx_delay_BFC04B38 = 0; int psx_delay_BFC04B44 = 0; int psx_delay_BFC04B50 = 0; int psx_delay_BFC04B58 = 0; int psx_taken_BFC04B58 = 0; int psx_delay_BFC04B6C = 0; int psx_delay_BFC04B7C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04B40u: goto label_BFC04B40; case 0xBFC04B4Cu: goto label_BFC04B4C; case 0xBFC04B58u: goto label_BFC04B58; case 0xBFC04B60u: goto label_BFC04B60; case 0xBFC04B74u: goto label_BFC04B74; default: break; } } label_BFC04B2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04B2C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC04B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04B30: 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(0xBFC04B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04B34: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B34u); return; } g_debug_last_store_pc = 0xBFC04B34u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04B38: 0FF012AA jal 0xBFC04AA8 */ cpu->gpr[31] = 0xBFC04B40u; /* jal link before delay slot */ psx_delay_BFC04B38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04B3C: 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, 0xBFC04B3Cu); return; } g_debug_last_store_pc = 0xBFC04B3Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B3Cu); #endif if (psx_delay_BFC04B38) { psx_delay_BFC04B38 = 0; cpu->gpr[31] = 0xBFC04B40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AA8u); cpu->pc = 0xBFC04AA8u; return; } label_BFC04B40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04B40: 3C10BFC1 lui $s0, 0xBFC1 */ cpu->gpr[16] = 0xBFC10000u; PGXP_ALU(0x3C10BFC1u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04B44: 0FF012AA jal 0xBFC04AA8 */ cpu->gpr[31] = 0xBFC04B4Cu; /* jal link before delay slot */ psx_delay_BFC04B44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04B48: 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(0xBFC04B48u); #endif if (psx_delay_BFC04B44) { psx_delay_BFC04B44 = 0; cpu->gpr[31] = 0xBFC04B4Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04AA8u); cpu->pc = 0xBFC04AA8u; return; } label_BFC04B4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC04B4C: 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(0xBFC04B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04B50: 0FF011B0 jal 0xBFC046C0 */ cpu->gpr[31] = 0xBFC04B58u; /* jal link before delay slot */ psx_delay_BFC04B50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC04B54: 260497A0 addiu $a0, $s0, -26720 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (-26720)); PGXP_ALU(0x260497A0u, cpu->gpr[4], _pgx1, 0xFFFF97A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04B54u); #endif if (psx_delay_BFC04B50) { psx_delay_BFC04B50 = 0; cpu->gpr[31] = 0xBFC04B58u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046C0u); cpu->pc = 0xBFC046C0u; return; } label_BFC04B58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04B58: 14400006 bne $v0, $zero, 0xBFC04B74 */ uint32_t psx_brA_BFC04B58 = cpu->gpr[2]; uint32_t psx_brB_BFC04B58 = cpu->gpr[0]; psx_taken_BFC04B58 = (psx_brA_BFC04B58 != psx_brB_BFC04B58); psx_delay_BFC04B58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC04B5C: 260497A0 addiu $a0, $s0, -26720 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (-26720)); PGXP_ALU(0x260497A0u, cpu->gpr[4], _pgx1, 0xFFFF97A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC04B5Cu); #endif if (psx_delay_BFC04B58) { psx_delay_BFC04B58 = 0; if (psx_taken_BFC04B58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B74u); goto label_BFC04B74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B60u); } 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 /* 0xBFC04B60: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B64u); #endif /* 0xBFC04B64: 8FB00010 lw $s0, 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, 0xBFC04B64u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC04B68: 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(0xBFC04B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC04B6C: 0BF011B0 j 0xBFC046C0 */ psx_delay_BFC04B6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04B70: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC04B70u); #endif if (psx_delay_BFC04B6C) { psx_delay_BFC04B6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC046C0u); cpu->pc = 0xBFC046C0u; return; } label_BFC04B74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B74u); #endif /* 0xBFC04B74: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04B74u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B78u); #endif /* 0xBFC04B78: 8FB00010 lw $s0, 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, 0xBFC04B78u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04B7C: 03E00008 jr $ra */ psx_delay_BFC04B7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04B80: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC04B80u); #endif if (psx_delay_BFC04B7C) { psx_delay_BFC04B7C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04B84(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04B84u); int psx_delay_BFC04BB0 = 0; int psx_delay_BFC04BC0 = 0; int psx_taken_BFC04BC0 = 0; int psx_delay_BFC04BC8 = 0; int psx_taken_BFC04BC8 = 0; int psx_delay_BFC04BDC = 0; int psx_delay_BFC04BEC = 0; int psx_delay_BFC04BF8 = 0; int psx_delay_BFC04C04 = 0; int psx_taken_BFC04C04 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04BB8u: goto label_BFC04BB8; case 0xBFC04BC8u: goto label_BFC04BC8; case 0xBFC04BD0u: goto label_BFC04BD0; case 0xBFC04BE4u: goto label_BFC04BE4; case 0xBFC04BE8u: goto label_BFC04BE8; case 0xBFC04BF4u: goto label_BFC04BF4; case 0xBFC04C00u: goto label_BFC04C00; default: break; } } label_BFC04B84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04B84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04B84: 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(0xBFC04B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04B88: 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(0xBFC04B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC04B8C: 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, 0xBFC04B8Cu); return; } g_debug_last_store_pc = 0xBFC04B8Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC04B90: 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, 0xBFC04B90u); return; } g_debug_last_store_pc = 0xBFC04B90u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC04B94: 3C11BF80 lui $s1, 0xBF80 */ cpu->gpr[17] = 0xBF800000u; PGXP_ALU(0x3C11BF80u, cpu->gpr[17], 0u, 0u); #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, 0x10011u); #endif /* 0xBFC04B98: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC04B9C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04BA0: 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, 0xBFC04BA0u); return; } g_debug_last_store_pc = 0xBFC04BA0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x10u); #endif /* 0xBFC04BA4: 248497A8 addiu $a0, $a0, -26712 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26712)); PGXP_ALU(0x248497A8u, cpu->gpr[4], _pgx1, 0xFFFF97A8u); } #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, 0x20004u); #endif /* 0xBFC04BA8: A2222041 sb $v0, 8257($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04BA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2222041u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC04BAC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC04BB0: 0FF0109C jal 0xBFC04270 */ cpu->gpr[31] = 0xBFC04BB8u; /* jal link before delay slot */ psx_delay_BFC04BB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04BB4: AC4064F8 sw $zero, 25848($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25848; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BB4u); return; } g_debug_last_store_pc = 0xBFC04BB4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC4064F8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04BB4u); #endif if (psx_delay_BFC04BB0) { psx_delay_BFC04BB0 = 0; cpu->gpr[31] = 0xBFC04BB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04270u); cpu->pc = 0xBFC04270u; return; } label_BFC04BB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04BB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04BB8: 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(0xBFC04BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC04BBC: A2222041 sb $v0, 8257($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04BBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[17] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2222041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04BC0: 12000008 beq $s0, $zero, 0xBFC04BE4 */ uint32_t psx_brA_BFC04BC0 = cpu->gpr[16]; uint32_t psx_brB_BFC04BC0 = cpu->gpr[0]; psx_taken_BFC04BC0 = (psx_brA_BFC04BC0 == psx_brB_BFC04BC0); psx_delay_BFC04BC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04BC4: 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(0xBFC04BC4u); #endif if (psx_delay_BFC04BC0) { psx_delay_BFC04BC0 = 0; if (psx_taken_BFC04BC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04BE4u); goto label_BFC04BE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04BC8u); } label_BFC04BC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04BC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04BC8: 12020007 beq $s0, $v0, 0xBFC04BE8 */ uint32_t psx_brA_BFC04BC8 = cpu->gpr[16]; uint32_t psx_brB_BFC04BC8 = cpu->gpr[2]; psx_taken_BFC04BC8 = (psx_brA_BFC04BC8 == psx_brB_BFC04BC8); psx_delay_BFC04BC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04BCC: 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(0xBFC04BCCu); #endif if (psx_delay_BFC04BC8) { psx_delay_BFC04BC8 = 0; if (psx_taken_BFC04BC8) { #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, 0xBFC04BD0u); } label_BFC04BD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04BD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BD0u); #endif /* 0xBFC04BD0: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04BD0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BD4u); #endif /* 0xBFC04BD4: 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, 0xBFC04BD4u); 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(0xBFC04BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BD8u); #endif /* 0xBFC04BD8: 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, 0xBFC04BD8u); 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(0xBFC04BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04BDC: 03E00008 jr $ra */ psx_delay_BFC04BDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04BE0: 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(0xBFC04BE0u); #endif if (psx_delay_BFC04BDC) { psx_delay_BFC04BDC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC04BE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04BE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC04BE4: 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(0xBFC04BE4u); #endif 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, 0x5u); #endif /* 0xBFC04BE8: 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(0xBFC04BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC04BEC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04BF4u; /* jalr link before delay slot */ psx_delay_BFC04BEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04BF0: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04BF0u); #endif if (psx_delay_BFC04BEC) { psx_delay_BFC04BEC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04BF4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04BF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04BF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04BF4: 24020005 addiu $v0, $zero, 5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); PGXP_ALU(0x24020005u, cpu->gpr[2], _pgx1, 0x00000005u); } #ifdef PSX_COSIM cosim_instr(0xBFC04BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04BF8: 0FF012CB jal 0xBFC04B2C */ cpu->gpr[31] = 0xBFC04C00u; /* jal link before delay slot */ psx_delay_BFC04BF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04BFC: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04BFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04BFCu); #endif if (psx_delay_BFC04BF8) { psx_delay_BFC04BF8 = 0; cpu->gpr[31] = 0xBFC04C00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04B2Cu); cpu->pc = 0xBFC04B2Cu; return; } label_BFC04C00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04C00: 24020006 addiu $v0, $zero, 6 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); PGXP_ALU(0x24020006u, cpu->gpr[2], _pgx1, 0x00000006u); } #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, 0x1u); #endif /* 0xBFC04C04: 1000FFF2 beq $zero, $zero, 0xBFC04BD0 */ uint32_t psx_brA_BFC04C04 = cpu->gpr[0]; uint32_t psx_brB_BFC04C04 = cpu->gpr[0]; psx_taken_BFC04C04 = (psx_brA_BFC04C04 == psx_brB_BFC04C04); psx_delay_BFC04C04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04C08: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04C08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04C08u); #endif if (psx_delay_BFC04C04) { psx_delay_BFC04C04 = 0; if (psx_taken_BFC04C04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04BD0u); goto label_BFC04BD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C0Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C0Cu); cpu->pc = 0xBFC04C0Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC04C0C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04C0Cu); int psx_delay_BFC04C18 = 0; int psx_delay_BFC04C20 = 0; int psx_taken_BFC04C20 = 0; int psx_delay_BFC04C34 = 0; int psx_taken_BFC04C34 = 0; int psx_delay_BFC04C54 = 0; int psx_delay_BFC04C60 = 0; int psx_taken_BFC04C60 = 0; int psx_delay_BFC04C68 = 0; int psx_taken_BFC04C68 = 0; int psx_delay_BFC04C7C = 0; int psx_taken_BFC04C7C = 0; int psx_delay_BFC04C94 = 0; int psx_delay_BFC04CA0 = 0; int psx_taken_BFC04CA0 = 0; int psx_delay_BFC04CB4 = 0; int psx_taken_BFC04CB4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04C20u: goto label_BFC04C20; case 0xBFC04C28u: goto label_BFC04C28; case 0xBFC04C3Cu: goto label_BFC04C3C; case 0xBFC04C4Cu: goto label_BFC04C4C; case 0xBFC04C5Cu: goto label_BFC04C5C; case 0xBFC04C68u: goto label_BFC04C68; case 0xBFC04C70u: goto label_BFC04C70; case 0xBFC04C78u: goto label_BFC04C78; case 0xBFC04C7Cu: goto label_BFC04C7C; case 0xBFC04C84u: goto label_BFC04C84; case 0xBFC04C9Cu: goto label_BFC04C9C; case 0xBFC04CA8u: goto label_BFC04CA8; default: break; } } label_BFC04C0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04C0C: 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(0xBFC04C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04C10: 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, 0xBFC04C10u); return; } g_debug_last_store_pc = 0xBFC04C10u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x20000020u); #endif /* 0xBFC04C14: 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, 0xBFC04C14u); return; } g_debug_last_store_pc = 0xBFC04C14u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } #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, 0x80000000u); #endif /* 0xBFC04C18: 0FF010C1 jal 0xBFC04304 */ cpu->gpr[31] = 0xBFC04C20u; /* jal link before delay slot */ psx_delay_BFC04C18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC04C1C: 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, 0xBFC04C1Cu); return; } g_debug_last_store_pc = 0xBFC04C1Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC04C1Cu); #endif if (psx_delay_BFC04C18) { psx_delay_BFC04C18 = 0; cpu->gpr[31] = 0xBFC04C20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04304u); cpu->pc = 0xBFC04304u; return; } label_BFC04C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04C20: 10400006 beq $v0, $zero, 0xBFC04C3C */ uint32_t psx_brA_BFC04C20 = cpu->gpr[2]; uint32_t psx_brB_BFC04C20 = cpu->gpr[0]; psx_taken_BFC04C20 = (psx_brA_BFC04C20 == psx_brB_BFC04C20); psx_delay_BFC04C20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04C24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04C24u); #endif if (psx_delay_BFC04C20) { psx_delay_BFC04C20 = 0; if (psx_taken_BFC04C20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C3Cu); goto label_BFC04C3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C28u); } 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: 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, 0xBFC04C28u); 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(0xBFC04C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C2Cu); #endif /* 0xBFC04C2C: 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, 0xBFC04C2Cu); 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(0xBFC04C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C30u); #endif /* 0xBFC04C30: 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, 0xBFC04C30u); 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(0xBFC04C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04C34: 14600009 bne $v1, $zero, 0xBFC04C5C */ uint32_t psx_brA_BFC04C34 = cpu->gpr[3]; uint32_t psx_brB_BFC04C34 = cpu->gpr[0]; psx_taken_BFC04C34 = (psx_brA_BFC04C34 != psx_brB_BFC04C34); psx_delay_BFC04C34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC04C38: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04C38u); #endif if (psx_delay_BFC04C34) { psx_delay_BFC04C34 = 0; if (psx_taken_BFC04C34) { #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, 0xBFC04C3Cu); } label_BFC04C3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04C3C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC04C40: 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(0xBFC04C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04C44: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C44u); return; } g_debug_last_store_pc = 0xBFC04C44u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC04C48: 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(0xBFC04C48u); #endif label_BFC04C4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C4Cu); #endif /* 0xBFC04C4C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04C4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04C50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04C54: 03E00008 jr $ra */ psx_delay_BFC04C54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04C58: 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(0xBFC04C58u); #endif if (psx_delay_BFC04C54) { psx_delay_BFC04C54 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x5u); #endif /* 0xBFC04C5C: 24026601 addiu $v0, $zero, 26113 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (26113)); PGXP_ALU(0x24026601u, cpu->gpr[2], _pgx1, 0x00006601u); } #ifdef PSX_COSIM cosim_instr(0xBFC04C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC04C60: 14A20008 bne $a1, $v0, 0xBFC04C84 */ uint32_t psx_brA_BFC04C60 = cpu->gpr[5]; uint32_t psx_brB_BFC04C60 = cpu->gpr[2]; psx_taken_BFC04C60 = (psx_brA_BFC04C60 != psx_brB_BFC04C60); psx_delay_BFC04C60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04C64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04C64u); #endif if (psx_delay_BFC04C60) { psx_delay_BFC04C60 = 0; if (psx_taken_BFC04C60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C84u); goto label_BFC04C84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C68u); } label_BFC04C68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04C68: 14C00003 bne $a2, $zero, 0xBFC04C78 */ uint32_t psx_brA_BFC04C68 = cpu->gpr[6]; uint32_t psx_brB_BFC04C68 = cpu->gpr[0]; psx_taken_BFC04C68 = (psx_brA_BFC04C68 != psx_brB_BFC04C68); psx_delay_BFC04C68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04C6C: 34620004 ori $v0, $v1, 0x4 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] | 0x4u; PGXP_ALU(0x34620004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0xBFC04C6Cu); #endif if (psx_delay_BFC04C68) { psx_delay_BFC04C68 = 0; if (psx_taken_BFC04C68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C78u); goto label_BFC04C78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C70u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04C70: 2402FFFB addiu $v0, $zero, -5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); PGXP_ALU(0x2402FFFBu, cpu->gpr[2], _pgx1, 0xFFFFFFFBu); } #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, 0xCu); #endif /* 0xBFC04C74: 00621024 and $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] & cpu->gpr[2]; PGXP_ALU(0x00621024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04C74u); #endif label_BFC04C78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04C78: 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, 0xBFC04C78u); return; } g_debug_last_store_pc = 0xBFC04C78u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04C78u); #endif label_BFC04C7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04C7C: 1000FFF3 beq $zero, $zero, 0xBFC04C4C */ uint32_t psx_brA_BFC04C7C = cpu->gpr[0]; uint32_t psx_brB_BFC04C7C = cpu->gpr[0]; psx_taken_BFC04C7C = (psx_brA_BFC04C7C == psx_brB_BFC04C7C); psx_delay_BFC04C7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04C80: 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(0xBFC04C80u); #endif if (psx_delay_BFC04C7C) { psx_delay_BFC04C7C = 0; if (psx_taken_BFC04C7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C4Cu); goto label_BFC04C4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C84u); } label_BFC04C84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C84u); #endif /* 0xBFC04C84: 8C82001C lw $v0, 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, 0xBFC04C84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #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, 0x20000010u); #endif /* 0xBFC04C88: AFA40010 sw $a0, 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, 0xBFC04C88u); return; } g_debug_last_store_pc = 0xBFC04C88u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C8Cu); #endif /* 0xBFC04C8C: 8C420020 lw $v0, 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, 0xBFC04C8Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420020u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC04C90: 00000000 nop */ /* nop */ #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, 0x80000004u); #endif /* 0xBFC04C94: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC04C9Cu; /* jalr link before delay slot */ psx_delay_BFC04C94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04C98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04C98u); #endif if (psx_delay_BFC04C94) { psx_delay_BFC04C94 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC04C9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC04C9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04C9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04C9Cu); #endif /* 0xBFC04C9C: 8FA40010 lw $a0, 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, 0xBFC04C9Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x4u); #endif /* 0xBFC04CA0: 0441FFF6 bgez $v0, 0xBFC04C7C */ uint32_t psx_brA_BFC04CA0 = cpu->gpr[2]; psx_taken_BFC04CA0 = ((int32_t)psx_brA_BFC04CA0 >= 0); psx_delay_BFC04CA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04CA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04CA4u); #endif if (psx_delay_BFC04CA0) { psx_delay_BFC04CA0 = 0; if (psx_taken_BFC04CA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04C7Cu); goto label_BFC04C7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04CA8u); } label_BFC04CA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04CA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CA8u); #endif /* 0xBFC04CA8: 8C830018 lw $v1, 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, 0xBFC04CA8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830018u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04CAC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC04CB0: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CB0u); return; } g_debug_last_store_pc = 0xBFC04CB0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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: 1000FFE5 beq $zero, $zero, 0xBFC04C4C */ 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, 0x5u); #endif /* 0xBFC04CB8: 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(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, 0xBFC04C4Cu); goto label_BFC04C4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04CBCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04CBCu); cpu->pc = 0xBFC04CBCu; return; /* fallthrough */ } void OpenBIOS_func_1FC04CBC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04CBCu); int psx_delay_BFC04CC8 = 0; int psx_delay_BFC04CD4 = 0; int psx_taken_BFC04CD4 = 0; int psx_delay_BFC04CE8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04CD0u: goto label_BFC04CD0; case 0xBFC04CDCu: goto label_BFC04CDC; case 0xBFC04CE0u: goto label_BFC04CE0; default: break; } } 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, 0x20000000u); #endif /* 0xBFC04CBC: 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(0xBFC04CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04CC0: 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(0xBFC04CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04CC4: 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, 0xBFC04CC4u); return; } g_debug_last_store_pc = 0xBFC04CC4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04CC8: 0FF01210 jal 0xBFC04840 */ cpu->gpr[31] = 0xBFC04CD0u; /* jal link before delay slot */ psx_delay_BFC04CC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04CCC: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04CCCu); #endif if (psx_delay_BFC04CC8) { psx_delay_BFC04CC8 = 0; cpu->gpr[31] = 0xBFC04CD0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04840u); cpu->pc = 0xBFC04840u; return; } label_BFC04CD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04CD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC04CD0: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC04CD4: 18600002 blez $v1, 0xBFC04CE0 */ uint32_t psx_brA_BFC04CD4 = cpu->gpr[3]; psx_taken_BFC04CD4 = ((int32_t)psx_brA_BFC04CD4 <= 0); psx_delay_BFC04CD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04CD8: 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(0xBFC04CD8u); #endif if (psx_delay_BFC04CD4) { psx_delay_BFC04CD4 = 0; if (psx_taken_BFC04CD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04CE0u); goto label_BFC04CE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04CDCu); } 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 /* 0xBFC04CDC: 83A20010 lb $v0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (16)), 2, 0x20000000u); PGXP_LOAD(0x83A20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04CDCu); #endif label_BFC04CE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04CE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CE0u); #endif /* 0xBFC04CE0: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04CE0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04CE4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04CE8: 03E00008 jr $ra */ psx_delay_BFC04CE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04CEC: 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(0xBFC04CECu); #endif if (psx_delay_BFC04CE8) { psx_delay_BFC04CE8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04CF0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04CF0u); int psx_delay_BFC04D04 = 0; int psx_delay_BFC04D14 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04D0Cu: goto label_BFC04D0C; default: break; } } label_BFC04CF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04CF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04CF0: 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(0xBFC04CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04CF4: 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(0xBFC04CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC04CF8: A3A40010 sb $a0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04CF8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA3A40010u, _pgxa, cpu->gpr[4]); } #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, 0x31u); #endif /* 0xBFC04CFC: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04D00: 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, 0xBFC04D00u); return; } g_debug_last_store_pc = 0xBFC04D00u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04D04: 0FF0125D jal 0xBFC04974 */ cpu->gpr[31] = 0xBFC04D0Cu; /* jal link before delay slot */ psx_delay_BFC04D04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04D08: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04D08u); #endif if (psx_delay_BFC04D04) { psx_delay_BFC04D04 = 0; cpu->gpr[31] = 0xBFC04D0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04974u); cpu->pc = 0xBFC04974u; return; } 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 /* 0xBFC04D0C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC04D10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04D14: 03E00008 jr $ra */ psx_delay_BFC04D14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04D18: 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(0xBFC04D18u); #endif if (psx_delay_BFC04D14) { psx_delay_BFC04D14 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04D1C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04D1Cu); int psx_delay_BFC04D2C = 0; int psx_taken_BFC04D2C = 0; int psx_delay_BFC04D34 = 0; int psx_delay_BFC04D48 = 0; int psx_taken_BFC04D48 = 0; int psx_delay_BFC04D58 = 0; int psx_delay_BFC04D64 = 0; int psx_taken_BFC04D64 = 0; int psx_delay_BFC04D6C = 0; int psx_delay_BFC04D74 = 0; int psx_taken_BFC04D74 = 0; int psx_delay_BFC04D90 = 0; int psx_delay_BFC04D98 = 0; int psx_taken_BFC04D98 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04D34u: goto label_BFC04D34; case 0xBFC04D3Cu: goto label_BFC04D3C; case 0xBFC04D50u: goto label_BFC04D50; case 0xBFC04D60u: goto label_BFC04D60; case 0xBFC04D6Cu: goto label_BFC04D6C; case 0xBFC04D74u: goto label_BFC04D74; case 0xBFC04D7Cu: goto label_BFC04D7C; case 0xBFC04D98u: goto label_BFC04D98; default: break; } } label_BFC04D1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04D1C: 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(0xBFC04D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04D20: 24020009 addiu $v0, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24020009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0xBFC04D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04D24: 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, 0xBFC04D24u); return; } g_debug_last_store_pc = 0xBFC04D24u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC04D28: 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, 0xBFC04D28u); return; } g_debug_last_store_pc = 0xBFC04D28u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x14u); #endif /* 0xBFC04D2C: 1482000C bne $a0, $v0, 0xBFC04D60 */ uint32_t psx_brA_BFC04D2C = cpu->gpr[4]; uint32_t psx_brB_BFC04D2C = cpu->gpr[2]; psx_taken_BFC04D2C = (psx_brA_BFC04D2C != psx_brB_BFC04D2C); psx_delay_BFC04D2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04D30: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04D30u); #endif if (psx_delay_BFC04D2C) { psx_delay_BFC04D2C = 0; if (psx_taken_BFC04D2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D60u); goto label_BFC04D60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D34u); } label_BFC04D34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04D34: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04D3Cu; /* jal link before delay slot */ psx_delay_BFC04D34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04D38: 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(0xBFC04D38u); #endif if (psx_delay_BFC04D34) { psx_delay_BFC04D34 = 0; cpu->gpr[31] = 0xBFC04D3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04D3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D3Cu); #endif /* 0xBFC04D3C: 8E0264F8 lw $v0, 25848($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 25848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D3Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E0264F8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04D40: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC04D44: 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(0xBFC04D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04D48: 1440FFFA bne $v0, $zero, 0xBFC04D34 */ uint32_t psx_brA_BFC04D48 = cpu->gpr[2]; uint32_t psx_brB_BFC04D48 = cpu->gpr[0]; psx_taken_BFC04D48 = (psx_brA_BFC04D48 != psx_brB_BFC04D48); 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; if (psx_taken_BFC04D48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D34u); goto label_BFC04D34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D50u); } 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 /* 0xBFC04D50: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D50u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D54u); #endif /* 0xBFC04D54: 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, 0xBFC04D54u); 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(0xBFC04D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04D58: 03E00008 jr $ra */ psx_delay_BFC04D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04D5C: 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(0xBFC04D5Cu); #endif if (psx_delay_BFC04D58) { psx_delay_BFC04D58 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC04D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04D60: 2402000A addiu $v0, $zero, 10 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); PGXP_ALU(0x2402000Au, cpu->gpr[2], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC04D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC04D64: 14820005 bne $a0, $v0, 0xBFC04D7C */ uint32_t psx_brA_BFC04D64 = cpu->gpr[4]; uint32_t psx_brB_BFC04D64 = cpu->gpr[2]; psx_taken_BFC04D64 = (psx_brA_BFC04D64 != psx_brB_BFC04D64); psx_delay_BFC04D64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04D68: 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(0xBFC04D68u); #endif if (psx_delay_BFC04D64) { psx_delay_BFC04D64 = 0; if (psx_taken_BFC04D64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D7Cu); goto label_BFC04D7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D6Cu); } label_BFC04D6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04D6C: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04D74u; /* jal link before delay slot */ psx_delay_BFC04D6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04D70: 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(0xBFC04D70u); #endif if (psx_delay_BFC04D6C) { psx_delay_BFC04D6C = 0; cpu->gpr[31] = 0xBFC04D74u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04D74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04D74: 1000FFF6 beq $zero, $zero, 0xBFC04D50 */ uint32_t psx_brA_BFC04D74 = cpu->gpr[0]; uint32_t psx_brB_BFC04D74 = cpu->gpr[0]; psx_taken_BFC04D74 = (psx_brA_BFC04D74 == psx_brB_BFC04D74); psx_delay_BFC04D74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04D78: AE0064F8 sw $zero, 25848($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 25848; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D78u); return; } g_debug_last_store_pc = 0xBFC04D78u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE0064F8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D78u); #endif if (psx_delay_BFC04D74) { psx_delay_BFC04D74 = 0; if (psx_taken_BFC04D74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D50u); goto label_BFC04D50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D7Cu); } label_BFC04D7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D7Cu); #endif /* 0xBFC04D7C: 8E0264F8 lw $v0, 25848($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 25848; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D7Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E0264F8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC04D80: A3A40010 sb $a0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04D80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA3A40010u, _pgxa, cpu->gpr[4]); } #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, 0x4u); #endif /* 0xBFC04D84: 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(0xBFC04D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04D88: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04D8C: 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(0xBFC04D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04D90: 0FF0125D jal 0xBFC04974 */ cpu->gpr[31] = 0xBFC04D98u; /* jal link before delay slot */ psx_delay_BFC04D90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04D94: AE0264F8 sw $v0, 25848($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 25848; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04D94u); return; } g_debug_last_store_pc = 0xBFC04D94u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE0264F8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04D94u); #endif if (psx_delay_BFC04D90) { psx_delay_BFC04D90 = 0; cpu->gpr[31] = 0xBFC04D98u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04974u); cpu->pc = 0xBFC04974u; return; } label_BFC04D98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04D98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04D98: 1000FFED beq $zero, $zero, 0xBFC04D50 */ uint32_t psx_brA_BFC04D98 = cpu->gpr[0]; uint32_t psx_brB_BFC04D98 = cpu->gpr[0]; 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, 0xBFC04D50u); goto label_BFC04D50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04DA0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04DA0u); cpu->pc = 0xBFC04DA0u; return; /* fallthrough */ } void OpenBIOS_func_1FC04DA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04DA0u); int psx_delay_BFC04DB0 = 0; int psx_delay_BFC04DC4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04DB8u: goto label_BFC04DB8; default: break; } } 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, 0x20000000u); #endif /* 0xBFC04DA0: 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(0xBFC04DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04DA4: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC04DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC04DA8: 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(0xBFC04DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04DAC: 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, 0xBFC04DACu); return; } g_debug_last_store_pc = 0xBFC04DACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04DB0: 0FF01210 jal 0xBFC04840 */ cpu->gpr[31] = 0xBFC04DB8u; /* jal link before delay slot */ psx_delay_BFC04DB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04DB4: 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(0xBFC04DB4u); #endif if (psx_delay_BFC04DB0) { psx_delay_BFC04DB0 = 0; cpu->gpr[31] = 0xBFC04DB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04840u); cpu->pc = 0xBFC04840u; return; } label_BFC04DB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04DB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DB8u); #endif /* 0xBFC04DB8: 93A20010 lbu $v0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (16)), 2, 0x20000000u); PGXP_LOAD(0x93A20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DBCu); #endif /* 0xBFC04DBC: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04DBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04DC0: 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(0xBFC04DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04DC4: 03E00008 jr $ra */ psx_delay_BFC04DC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04DC8: 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(0xBFC04DC8u); #endif if (psx_delay_BFC04DC4) { psx_delay_BFC04DC4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04DCC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04DCCu); int psx_delay_BFC04E14 = 0; int psx_delay_BFC04E1C = 0; int psx_taken_BFC04E1C = 0; int psx_delay_BFC04E24 = 0; int psx_taken_BFC04E24 = 0; int psx_delay_BFC04E2C = 0; int psx_taken_BFC04E2C = 0; int psx_delay_BFC04E34 = 0; int psx_delay_BFC04E3C = 0; int psx_delay_BFC04E4C = 0; int psx_delay_BFC04E54 = 0; int psx_taken_BFC04E54 = 0; int psx_delay_BFC04E5C = 0; int psx_taken_BFC04E5C = 0; int psx_delay_BFC04E64 = 0; int psx_taken_BFC04E64 = 0; int psx_delay_BFC04E6C = 0; int psx_taken_BFC04E6C = 0; int psx_delay_BFC04E74 = 0; int psx_taken_BFC04E74 = 0; int psx_delay_BFC04E7C = 0; int psx_delay_BFC04E88 = 0; int psx_taken_BFC04E88 = 0; int psx_delay_BFC04E98 = 0; int psx_delay_BFC04EA0 = 0; int psx_taken_BFC04EA0 = 0; int psx_delay_BFC04EA8 = 0; int psx_taken_BFC04EA8 = 0; int psx_delay_BFC04EB4 = 0; int psx_taken_BFC04EB4 = 0; int psx_delay_BFC04EC8 = 0; int psx_taken_BFC04EC8 = 0; int psx_delay_BFC04ED0 = 0; int psx_taken_BFC04ED0 = 0; int psx_delay_BFC04ED8 = 0; int psx_delay_BFC04F14 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04E14u: goto label_BFC04E14; case 0xBFC04E1Cu: goto label_BFC04E1C; case 0xBFC04E24u: goto label_BFC04E24; case 0xBFC04E2Cu: goto label_BFC04E2C; case 0xBFC04E34u: goto label_BFC04E34; case 0xBFC04E3Cu: goto label_BFC04E3C; case 0xBFC04E44u: goto label_BFC04E44; case 0xBFC04E4Cu: goto label_BFC04E4C; case 0xBFC04E54u: goto label_BFC04E54; case 0xBFC04E5Cu: goto label_BFC04E5C; case 0xBFC04E64u: goto label_BFC04E64; case 0xBFC04E6Cu: goto label_BFC04E6C; case 0xBFC04E74u: goto label_BFC04E74; case 0xBFC04E7Cu: goto label_BFC04E7C; case 0xBFC04E84u: goto label_BFC04E84; case 0xBFC04E90u: goto label_BFC04E90; case 0xBFC04E98u: goto label_BFC04E98; case 0xBFC04EA0u: goto label_BFC04EA0; case 0xBFC04EA8u: goto label_BFC04EA8; case 0xBFC04EB0u: goto label_BFC04EB0; case 0xBFC04EBCu: goto label_BFC04EBC; case 0xBFC04EC4u: goto label_BFC04EC4; case 0xBFC04ED0u: goto label_BFC04ED0; case 0xBFC04ED8u: goto label_BFC04ED8; case 0xBFC04EE0u: goto label_BFC04EE0; default: break; } } label_BFC04DCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04DCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04DCC: 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(0xBFC04DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC04DD0: 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, 0xBFC04DD0u); return; } g_debug_last_store_pc = 0xBFC04DD0u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70030u, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC04DD4: 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, 0xBFC04DD4u); return; } g_debug_last_store_pc = 0xBFC04DD4u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB6002Cu, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC04DD8: 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, 0xBFC04DD8u); return; } g_debug_last_store_pc = 0xBFC04DD8u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC04DDC: 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, 0xBFC04DDCu); return; } g_debug_last_store_pc = 0xBFC04DDCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC04DE0: 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, 0xBFC04DE0u); return; } g_debug_last_store_pc = 0xBFC04DE0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC04DE4: 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, 0xBFC04DE4u); return; } g_debug_last_store_pc = 0xBFC04DE4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC04DE8: 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, 0xBFC04DE8u); return; } g_debug_last_store_pc = 0xBFC04DE8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04DEC: 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, 0xBFC04DECu); return; } g_debug_last_store_pc = 0xBFC04DECu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04DF0: 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, 0xBFC04DF0u); return; } g_debug_last_store_pc = 0xBFC04DF0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #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, 0x20011u); #endif /* 0xBFC04DF4: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #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, 0x40010u); #endif /* 0xBFC04DF8: 2492007D addiu $s2, $a0, 125 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[4] + (125)); PGXP_ALU(0x2492007Du, cpu->gpr[18], _pgx1, 0x0000007Du); } #ifdef PSX_COSIM cosim_instr(0xBFC04DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04DFC: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x80001u); #endif /* 0xBFC04E00: 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(0xBFC04E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC04E04: 2414007F addiu $s4, $zero, 127 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (127)); PGXP_ALU(0x2414007Fu, cpu->gpr[20], _pgx1, 0x0000007Fu); } #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, 0x200001u); #endif /* 0xBFC04E08: 24150009 addiu $s5, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24150009u, cpu->gpr[21], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0xBFC04E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC04E0C: 2416000A addiu $s6, $zero, 10 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); PGXP_ALU(0x2416000Au, cpu->gpr[22], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC04E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC04E10: 2417000D addiu $s7, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x2417000Du, cpu->gpr[23], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0xBFC04E10u); #endif label_BFC04E14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04E14: 0FF01368 jal 0xBFC04DA0 */ cpu->gpr[31] = 0xBFC04E1Cu; /* jal link before delay slot */ psx_delay_BFC04E14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04E18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04E18u); #endif if (psx_delay_BFC04E14) { psx_delay_BFC04E14 = 0; cpu->gpr[31] = 0xBFC04E1Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04DA0u); cpu->pc = 0xBFC04DA0u; return; } label_BFC04E1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC04E1C: 10530003 beq $v0, $s3, 0xBFC04E2C */ uint32_t psx_brA_BFC04E1C = cpu->gpr[2]; uint32_t psx_brB_BFC04E1C = cpu->gpr[19]; psx_taken_BFC04E1C = (psx_brA_BFC04E1C == psx_brB_BFC04E1C); psx_delay_BFC04E1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30008u); #endif /* 0xBFC04E20: 0230182B sltu $v1, $s1, $s0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[16] ? 1 : 0); PGXP_ALU(0x0230182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04E20u); #endif if (psx_delay_BFC04E1C) { psx_delay_BFC04E1C = 0; if (psx_taken_BFC04E1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E2Cu); goto label_BFC04E2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E24u); } label_BFC04E24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC04E24: 1454000D bne $v0, $s4, 0xBFC04E5C */ uint32_t psx_brA_BFC04E24 = cpu->gpr[2]; uint32_t psx_brB_BFC04E24 = cpu->gpr[20]; 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, 0x1u); #endif /* 0xBFC04E28: 00000000 nop */ /* nop */ #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, 0xBFC04E5Cu); goto label_BFC04E5C; } #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, 0x9u); #endif /* 0xBFC04E2C: 10600020 beq $v1, $zero, 0xBFC04EB0 */ uint32_t psx_brA_BFC04E2C = cpu->gpr[3]; 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, 0x1u); #endif /* 0xBFC04E30: 00000000 nop */ /* nop */ #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, 0xBFC04EB0u); goto label_BFC04EB0; } #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, 0x80000000u); #endif /* 0xBFC04E34: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04E3Cu; /* jal link before delay slot */ psx_delay_BFC04E34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04E38: 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(0xBFC04E38u); #endif if (psx_delay_BFC04E34) { psx_delay_BFC04E34 = 0; cpu->gpr[31] = 0xBFC04E3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04E3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04E3C: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04E44u; /* jal link before delay slot */ psx_delay_BFC04E3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04E40: 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(0xBFC04E40u); #endif if (psx_delay_BFC04E3C) { psx_delay_BFC04E3C = 0; cpu->gpr[31] = 0xBFC04E44u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04E44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04E44: 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(0xBFC04E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04E48: 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(0xBFC04E48u); #endif label_BFC04E4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04E4C: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04E54u; /* jal link before delay slot */ psx_delay_BFC04E4C = 1; #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 if (psx_delay_BFC04E4C) { psx_delay_BFC04E4C = 0; cpu->gpr[31] = 0xBFC04E54u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04E54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04E54: 1000FFEF beq $zero, $zero, 0xBFC04E14 */ uint32_t psx_brA_BFC04E54 = cpu->gpr[0]; uint32_t psx_brB_BFC04E54 = cpu->gpr[0]; psx_taken_BFC04E54 = (psx_brA_BFC04E54 == psx_brB_BFC04E54); psx_delay_BFC04E54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04E58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04E58u); #endif if (psx_delay_BFC04E54) { psx_delay_BFC04E54 = 0; if (psx_taken_BFC04E54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E14u); goto label_BFC04E14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E5Cu); } label_BFC04E5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC04E5C: 10550019 beq $v0, $s5, 0xBFC04EC4 */ uint32_t psx_brA_BFC04E5C = cpu->gpr[2]; uint32_t psx_brB_BFC04E5C = cpu->gpr[21]; 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, 0x11u); #endif /* 0xBFC04E60: 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(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, 0xBFC04EC4u); goto label_BFC04EC4; } #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, 0x400004u); #endif /* 0xBFC04E64: 1056001C beq $v0, $s6, 0xBFC04ED8 */ uint32_t psx_brA_BFC04E64 = cpu->gpr[2]; uint32_t psx_brB_BFC04E64 = cpu->gpr[22]; psx_taken_BFC04E64 = (psx_brA_BFC04E64 == psx_brB_BFC04E64); psx_delay_BFC04E64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04E68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04E68u); #endif if (psx_delay_BFC04E64) { psx_delay_BFC04E64 = 0; if (psx_taken_BFC04E64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04ED8u); goto label_BFC04ED8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E6Cu); } label_BFC04E6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC04E6C: 1057001A beq $v0, $s7, 0xBFC04ED8 */ uint32_t psx_brA_BFC04E6C = cpu->gpr[2]; uint32_t psx_brB_BFC04E6C = cpu->gpr[23]; psx_taken_BFC04E6C = (psx_brA_BFC04E6C == psx_brB_BFC04E6C); psx_delay_BFC04E6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04E70: 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(0xBFC04E70u); #endif if (psx_delay_BFC04E6C) { psx_delay_BFC04E6C = 0; if (psx_taken_BFC04E6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04ED8u); goto label_BFC04ED8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E74u); } label_BFC04E74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04E74: 1443000E bne $v0, $v1, 0xBFC04EB0 */ uint32_t psx_brA_BFC04E74 = cpu->gpr[2]; uint32_t psx_brB_BFC04E74 = cpu->gpr[3]; psx_taken_BFC04E74 = (psx_brA_BFC04E74 != psx_brB_BFC04E74); psx_delay_BFC04E74 = 1; #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 if (psx_delay_BFC04E74) { psx_delay_BFC04E74 = 0; if (psx_taken_BFC04E74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04EB0u); goto label_BFC04EB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E7Cu); } label_BFC04E7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04E7C: 0FF01368 jal 0xBFC04DA0 */ cpu->gpr[31] = 0xBFC04E84u; /* jal link before delay slot */ psx_delay_BFC04E7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04E80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04E80u); #endif if (psx_delay_BFC04E7C) { psx_delay_BFC04E7C = 0; cpu->gpr[31] = 0xBFC04E84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04DA0u); cpu->pc = 0xBFC04DA0u; return; } label_BFC04E84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50008u); #endif /* 0xBFC04E84: 0212182B sltu $v1, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0212182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04E88: 1060FFF0 beq $v1, $zero, 0xBFC04E4C */ uint32_t psx_brA_BFC04E88 = cpu->gpr[3]; uint32_t psx_brB_BFC04E88 = cpu->gpr[0]; psx_taken_BFC04E88 = (psx_brA_BFC04E88 == psx_brB_BFC04E88); psx_delay_BFC04E88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04E8C: 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(0xBFC04E8Cu); #endif if (psx_delay_BFC04E88) { psx_delay_BFC04E88 = 0; if (psx_taken_BFC04E88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E4Cu); goto label_BFC04E4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E90u); } label_BFC04E90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC04E90: A2020000 sb $v0, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04E90u; 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(0xBFC04E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC04E94: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04E94u); #endif label_BFC04E98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04E98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04E98: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04EA0u; /* jal link before delay slot */ psx_delay_BFC04E98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04E9C: 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(0xBFC04E9Cu); #endif if (psx_delay_BFC04E98) { psx_delay_BFC04E98 = 0; cpu->gpr[31] = 0xBFC04EA0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04EA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04EA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04EA0: 1000FFDC beq $zero, $zero, 0xBFC04E14 */ uint32_t psx_brA_BFC04EA0 = cpu->gpr[0]; uint32_t psx_brB_BFC04EA0 = cpu->gpr[0]; psx_taken_BFC04EA0 = (psx_brA_BFC04EA0 == psx_brB_BFC04EA0); psx_delay_BFC04EA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04EA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04EA4u); #endif if (psx_delay_BFC04EA0) { psx_delay_BFC04EA0 = 0; if (psx_taken_BFC04EA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E14u); goto label_BFC04E14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04EA8u); } label_BFC04EA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04EA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04EA8: 1000FFE8 beq $zero, $zero, 0xBFC04E4C */ uint32_t psx_brA_BFC04EA8 = cpu->gpr[0]; uint32_t psx_brB_BFC04EA8 = cpu->gpr[0]; psx_taken_BFC04EA8 = (psx_brA_BFC04EA8 == psx_brB_BFC04EA8); psx_delay_BFC04EA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04EAC: 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(0xBFC04EACu); #endif if (psx_delay_BFC04EA8) { psx_delay_BFC04EA8 = 0; if (psx_taken_BFC04EA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E4Cu); goto label_BFC04E4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04EB0u); } label_BFC04EB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04EB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC04EB0: 28430020 slti $v1, $v0, 32 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (32) ? 1 : 0); PGXP_ALU(0x28430020u, cpu->gpr[3], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0xBFC04EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04EB4: 1460FFE5 bne $v1, $zero, 0xBFC04E4C */ uint32_t psx_brA_BFC04EB4 = cpu->gpr[3]; uint32_t psx_brB_BFC04EB4 = cpu->gpr[0]; psx_taken_BFC04EB4 = (psx_brA_BFC04EB4 != psx_brB_BFC04EB4); psx_delay_BFC04EB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04EB8: 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(0xBFC04EB8u); #endif if (psx_delay_BFC04EB4) { psx_delay_BFC04EB4 = 0; if (psx_taken_BFC04EB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E4Cu); goto label_BFC04E4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04EBCu); } 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, 0x14u); #endif /* 0xBFC04EBC: 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(0xBFC04EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04EC0: 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(0xBFC04EC0u); #endif label_BFC04EC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04EC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50004u); #endif /* 0xBFC04EC4: 0212102B sltu $v0, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0212102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04EC8: 1040FFF7 beq $v0, $zero, 0xBFC04EA8 */ uint32_t psx_brA_BFC04EC8 = cpu->gpr[2]; uint32_t psx_brB_BFC04EC8 = cpu->gpr[0]; psx_taken_BFC04EC8 = (psx_brA_BFC04EC8 == psx_brB_BFC04EC8); psx_delay_BFC04EC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04ECC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04ECCu); #endif if (psx_delay_BFC04EC8) { psx_delay_BFC04EC8 = 0; if (psx_taken_BFC04EC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04EA8u); goto label_BFC04EA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04ED0u); } label_BFC04ED0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04ED0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04ED0: 1000FFF1 beq $zero, $zero, 0xBFC04E98 */ uint32_t psx_brA_BFC04ED0 = cpu->gpr[0]; uint32_t psx_brB_BFC04ED0 = cpu->gpr[0]; psx_taken_BFC04ED0 = (psx_brA_BFC04ED0 == psx_brB_BFC04ED0); psx_delay_BFC04ED0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC04ED4: A2040000 sb $a0, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04ED4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA2040000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC04ED4u); #endif if (psx_delay_BFC04ED0) { psx_delay_BFC04ED0 = 0; if (psx_taken_BFC04ED0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04E98u); goto label_BFC04E98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04ED8u); } label_BFC04ED8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04ED8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04ED8: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04EE0u; /* jal link before delay slot */ psx_delay_BFC04ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04EDC: 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(0xBFC04EDCu); #endif if (psx_delay_BFC04ED8) { psx_delay_BFC04ED8 = 0; cpu->gpr[31] = 0xBFC04EE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04EE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04EE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC04EE0: A2000000 sb $zero, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC04EE0u; 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(0xBFC04EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EE4u); #endif /* 0xBFC04EE4: 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, 0xBFC04EE4u); 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(0xBFC04EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04EE8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EECu); #endif /* 0xBFC04EEC: 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, 0xBFC04EECu); 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(0xBFC04EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EF0u); #endif /* 0xBFC04EF0: 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, 0xBFC04EF0u); 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(0xBFC04EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EF4u); #endif /* 0xBFC04EF4: 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, 0xBFC04EF4u); 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(0xBFC04EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EF8u); #endif /* 0xBFC04EF8: 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, 0xBFC04EF8u); 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(0xBFC04EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04EFCu); #endif /* 0xBFC04EFC: 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, 0xBFC04EFCu); 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(0xBFC04EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F00u); #endif /* 0xBFC04F00: 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, 0xBFC04F00u); 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(0xBFC04F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F04u); #endif /* 0xBFC04F04: 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, 0xBFC04F04u); 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(0xBFC04F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04F08: AC4064F8 sw $zero, 25848($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25848; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25848)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F08u); return; } g_debug_last_store_pc = 0xBFC04F08u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC4064F8u, _pgxa, cpu->gpr[0]); } #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, 0x20005u); #endif /* 0xBFC04F0C: 02201025 or $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(0x02201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F10u); #endif /* 0xBFC04F10: 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, 0xBFC04F10u); 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(0xBFC04F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04F14: 03E00008 jr $ra */ psx_delay_BFC04F14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04F18: 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(0xBFC04F18u); #endif if (psx_delay_BFC04F14) { psx_delay_BFC04F14 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04F1C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04F1Cu); int psx_delay_BFC04F28 = 0; int psx_taken_BFC04F28 = 0; int psx_delay_BFC04F34 = 0; int psx_taken_BFC04F34 = 0; int psx_delay_BFC04F3C = 0; int psx_delay_BFC04F4C = 0; int psx_taken_BFC04F4C = 0; int psx_delay_BFC04F5C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04F30u: goto label_BFC04F30; case 0xBFC04F3Cu: goto label_BFC04F3C; case 0xBFC04F44u: goto label_BFC04F44; case 0xBFC04F54u: goto label_BFC04F54; default: break; } } 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, 0x20000000u); #endif /* 0xBFC04F1C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20010000u); #endif /* 0xBFC04F20: 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, 0xBFC04F20u); return; } g_debug_last_store_pc = 0xBFC04F20u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC04F24: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F24u); return; } g_debug_last_store_pc = 0xBFC04F24u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04F28: 14800006 bne $a0, $zero, 0xBFC04F44 */ uint32_t psx_brA_BFC04F28 = cpu->gpr[4]; uint32_t psx_brB_BFC04F28 = cpu->gpr[0]; psx_taken_BFC04F28 = (psx_brA_BFC04F28 != psx_brB_BFC04F28); psx_delay_BFC04F28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC04F2C: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04F2Cu); #endif if (psx_delay_BFC04F28) { psx_delay_BFC04F28 = 0; if (psx_taken_BFC04F28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F44u); goto label_BFC04F44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F30u); } label_BFC04F30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04F30: 3C10BFC1 lui $s0, 0xBFC1 */ cpu->gpr[16] = 0xBFC10000u; PGXP_ALU(0x3C10BFC1u, cpu->gpr[16], 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, 0x1u); #endif /* 0xBFC04F34: 10000003 beq $zero, $zero, 0xBFC04F44 */ uint32_t psx_brA_BFC04F34 = cpu->gpr[0]; uint32_t psx_brB_BFC04F34 = cpu->gpr[0]; psx_taken_BFC04F34 = (psx_brA_BFC04F34 == psx_brB_BFC04F34); psx_delay_BFC04F34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04F38: 261097AC addiu $s0, $s0, -26708 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-26708)); PGXP_ALU(0x261097ACu, cpu->gpr[16], _pgx1, 0xFFFF97ACu); } #ifdef PSX_COSIM cosim_instr(0xBFC04F38u); #endif if (psx_delay_BFC04F34) { psx_delay_BFC04F34 = 0; if (psx_taken_BFC04F34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F44u); goto label_BFC04F44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F3Cu); } label_BFC04F3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04F3C: 0FF01347 jal 0xBFC04D1C */ cpu->gpr[31] = 0xBFC04F44u; /* jal link before delay slot */ psx_delay_BFC04F3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC04F40: 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(0xBFC04F40u); #endif if (psx_delay_BFC04F3C) { psx_delay_BFC04F3C = 0; cpu->gpr[31] = 0xBFC04F44u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04D1Cu); cpu->pc = 0xBFC04D1Cu; return; } label_BFC04F44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F44u); #endif /* 0xBFC04F44: 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(0xBFC04F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04F48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC04F4C: 1480FFFB bne $a0, $zero, 0xBFC04F3C */ uint32_t psx_brA_BFC04F4C = cpu->gpr[4]; uint32_t psx_brB_BFC04F4C = cpu->gpr[0]; psx_taken_BFC04F4C = (psx_brA_BFC04F4C != psx_brB_BFC04F4C); psx_delay_BFC04F4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04F50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04F50u); #endif if (psx_delay_BFC04F4C) { psx_delay_BFC04F4C = 0; if (psx_taken_BFC04F4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F3Cu); goto label_BFC04F3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F54u); } label_BFC04F54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F54u); #endif /* 0xBFC04F54: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F54u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F58u); #endif /* 0xBFC04F58: 8FB00010 lw $s0, 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, 0xBFC04F58u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04F5C: 03E00008 jr $ra */ psx_delay_BFC04F5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04F60: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC04F60u); #endif if (psx_delay_BFC04F5C) { psx_delay_BFC04F5C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04F64(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04F64u); int psx_delay_BFC04F8C = 0; int psx_delay_BFC04F9C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04F94u: goto label_BFC04F94; default: break; } } label_BFC04F64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04F64: 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(0xBFC04F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC04F68: 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, 0xBFC04F68u); return; } g_debug_last_store_pc = 0xBFC04F68u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x51u); #endif /* 0xBFC04F6C: 00803025 or $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(0x00803025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04F70: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC04F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04F74: 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, 0xBFC04F74u); return; } g_debug_last_store_pc = 0xBFC04F74u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC04F78: 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, 0xBFC04F78u); return; } g_debug_last_store_pc = 0xBFC04F78u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC04F7C: 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(0xBFC04F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC04F80: 27A70024 addiu $a3, $sp, 36 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[29] + (36)); PGXP_ALU(0x27A70024u, cpu->gpr[7], _pgx1, 0x00000024u); } #ifdef PSX_COSIM cosim_instr(0xBFC04F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC04F84: 24844668 addiu $a0, $a0, 18024 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (18024)); PGXP_ALU(0x24844668u, cpu->gpr[4], _pgx1, 0x00004668u); } #ifdef PSX_COSIM cosim_instr(0xBFC04F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04F88: 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, 0xBFC04F88u); return; } g_debug_last_store_pc = 0xBFC04F88u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04F8C: 0FF0223C jal 0xBFC088F0 */ cpu->gpr[31] = 0xBFC04F94u; /* jal link before delay slot */ psx_delay_BFC04F8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC04F90: AFA70010 sw $a3, 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, 0xBFC04F90u); return; } g_debug_last_store_pc = 0xBFC04F90u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70010u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F90u); #endif if (psx_delay_BFC04F8C) { psx_delay_BFC04F8C = 0; cpu->gpr[31] = 0xBFC04F94u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088F0u); cpu->pc = 0xBFC088F0u; return; } label_BFC04F94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04F94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F94u); #endif /* 0xBFC04F94: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04F94u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC04F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC04F98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC04F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04F9C: 03E00008 jr $ra */ psx_delay_BFC04F9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04FA0: 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(0xBFC04FA0u); #endif if (psx_delay_BFC04F9C) { psx_delay_BFC04F9C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC04FA4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC04FA4u); int psx_delay_BFC04FC0 = 0; int psx_delay_BFC04FC8 = 0; int psx_taken_BFC04FC8 = 0; int psx_delay_BFC04FF0 = 0; int psx_delay_BFC04FF8 = 0; int psx_delay_BFC05000 = 0; int psx_taken_BFC05000 = 0; int psx_delay_BFC05014 = 0; int psx_taken_BFC05014 = 0; int psx_delay_BFC05024 = 0; int psx_delay_BFC05030 = 0; int psx_taken_BFC05030 = 0; int psx_delay_BFC0503C = 0; int psx_taken_BFC0503C = 0; int psx_delay_BFC0504C = 0; int psx_delay_BFC05060 = 0; int psx_taken_BFC05060 = 0; int psx_delay_BFC05078 = 0; int psx_taken_BFC05078 = 0; int psx_delay_BFC05080 = 0; int psx_taken_BFC05080 = 0; int psx_delay_BFC050B0 = 0; int psx_delay_BFC050B8 = 0; int psx_taken_BFC050B8 = 0; int psx_delay_BFC050C4 = 0; int psx_taken_BFC050C4 = 0; int psx_delay_BFC050D4 = 0; int psx_taken_BFC050D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC04FC8u: goto label_BFC04FC8; case 0xBFC04FD0u: goto label_BFC04FD0; case 0xBFC04FD8u: goto label_BFC04FD8; case 0xBFC04FDCu: goto label_BFC04FDC; case 0xBFC04FF8u: goto label_BFC04FF8; case 0xBFC05000u: goto label_BFC05000; case 0xBFC05008u: goto label_BFC05008; case 0xBFC0501Cu: goto label_BFC0501C; case 0xBFC0502Cu: goto label_BFC0502C; case 0xBFC05038u: goto label_BFC05038; case 0xBFC05044u: goto label_BFC05044; case 0xBFC05054u: goto label_BFC05054; case 0xBFC05068u: goto label_BFC05068; case 0xBFC05070u: goto label_BFC05070; case 0xBFC05074u: goto label_BFC05074; case 0xBFC05080u: goto label_BFC05080; case 0xBFC05088u: goto label_BFC05088; case 0xBFC050B8u: goto label_BFC050B8; case 0xBFC050C0u: goto label_BFC050C0; case 0xBFC050CCu: goto label_BFC050CC; default: break; } } label_BFC04FA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04FA4: 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(0xBFC04FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC04FA8: 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, 0xBFC04FA8u); return; } g_debug_last_store_pc = 0xBFC04FA8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2002Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC04FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC04FAC: 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, 0xBFC04FACu); return; } g_debug_last_store_pc = 0xBFC04FACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _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, 0x20080000u); #endif /* 0xBFC04FB0: 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, 0xBFC04FB0u); return; } g_debug_last_store_pc = 0xBFC04FB0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30030u, _pgxa, cpu->gpr[19]); } #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, 0x20020000u); #endif /* 0xBFC04FB4: 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, 0xBFC04FB4u); return; } g_debug_last_store_pc = 0xBFC04FB4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10028u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC04FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC04FB8: 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, 0xBFC04FB8u); return; } g_debug_last_store_pc = 0xBFC04FB8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00024u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC04FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC04FBC: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04FC0: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC04FC8u; /* jal link before delay slot */ psx_delay_BFC04FC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC04FC4: 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, 0xBFC04FC4u); return; } g_debug_last_store_pc = 0xBFC04FC4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5003Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC04FC4u); #endif if (psx_delay_BFC04FC0) { psx_delay_BFC04FC0 = 0; cpu->gpr[31] = 0xBFC04FC8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC04FC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04FC8: 1440000B bne $v0, $zero, 0xBFC04FF8 */ uint32_t psx_brA_BFC04FC8 = cpu->gpr[2]; uint32_t psx_brB_BFC04FC8 = cpu->gpr[0]; psx_taken_BFC04FC8 = (psx_brA_BFC04FC8 != psx_brB_BFC04FC8); psx_delay_BFC04FC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC04FCC: 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(0xBFC04FCCu); #endif if (psx_delay_BFC04FC8) { psx_delay_BFC04FC8 = 0; if (psx_taken_BFC04FC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04FF8u); goto label_BFC04FF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04FD0u); } label_BFC04FD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC04FD0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC04FD4: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC04FD4u); return; } g_debug_last_store_pc = 0xBFC04FD4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC04FD4u); #endif label_BFC04FD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC04FD8: 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(0xBFC04FD8u); #endif label_BFC04FDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FDCu); #endif /* 0xBFC04FDC: 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, 0xBFC04FDCu); 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(0xBFC04FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FE0u); #endif /* 0xBFC04FE0: 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, 0xBFC04FE0u); 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(0xBFC04FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FE4u); #endif /* 0xBFC04FE4: 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, 0xBFC04FE4u); 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(0xBFC04FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FE8u); #endif /* 0xBFC04FE8: 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, 0xBFC04FE8u); 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(0xBFC04FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FECu); #endif /* 0xBFC04FEC: 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, 0xBFC04FECu); 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(0xBFC04FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC04FF0: 03E00008 jr $ra */ psx_delay_BFC04FF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC04FF4: 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(0xBFC04FF4u); #endif if (psx_delay_BFC04FF0) { psx_delay_BFC04FF0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC04FF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC04FF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC04FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC04FF8: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC05000u; /* jal link before delay slot */ psx_delay_BFC04FF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC04FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC04FFC: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC04FFCu); #endif if (psx_delay_BFC04FF8) { psx_delay_BFC04FF8 = 0; cpu->gpr[31] = 0xBFC05000u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC05000: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05000u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05000: 14400006 bne $v0, $zero, 0xBFC0501C */ uint32_t psx_brA_BFC05000 = cpu->gpr[2]; uint32_t psx_brB_BFC05000 = cpu->gpr[0]; psx_taken_BFC05000 = (psx_brA_BFC05000 != psx_brB_BFC05000); psx_delay_BFC05000 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20005u); #endif /* 0xBFC05004: 00408825 or $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(0x00408825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05004u); #endif if (psx_delay_BFC05000) { psx_delay_BFC05000 = 0; if (psx_taken_BFC05000) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0501Cu); goto label_BFC0501C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05008u); } label_BFC05008: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05008u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05008: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC0500C: 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(0xBFC0500Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05010: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05010u); return; } g_debug_last_store_pc = 0xBFC05010u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC05014: 1000FFF0 beq $zero, $zero, 0xBFC04FD8 */ uint32_t psx_brA_BFC05014 = cpu->gpr[0]; uint32_t psx_brB_BFC05014 = cpu->gpr[0]; psx_taken_BFC05014 = (psx_brA_BFC05014 == psx_brB_BFC05014); psx_delay_BFC05014 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05018: 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, 0xBFC05018u); return; } g_debug_last_store_pc = 0xBFC05018u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05018u); #endif if (psx_delay_BFC05014) { psx_delay_BFC05014 = 0; if (psx_taken_BFC05014) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04FD8u); goto label_BFC04FD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0501Cu); } label_BFC0501C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0501Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0501Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0501Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0501C: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x20000040u); #endif /* 0xBFC05020: 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(0xBFC05020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05024: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC0502Cu; /* jal link before delay slot */ psx_delay_BFC05024 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC05028: 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(0xBFC05028u); #endif if (psx_delay_BFC05024) { psx_delay_BFC05024 = 0; cpu->gpr[31] = 0xBFC0502Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } label_BFC0502C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0502Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0502Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0502Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC0502C: 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(0xBFC0502Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC05030: 14530004 bne $v0, $s3, 0xBFC05044 */ uint32_t psx_brA_BFC05030 = cpu->gpr[2]; uint32_t psx_brB_BFC05030 = cpu->gpr[19]; psx_taken_BFC05030 = (psx_brA_BFC05030 != psx_brB_BFC05030); psx_delay_BFC05030 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40005u); #endif /* 0xBFC05034: 00409025 or $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(0x00409025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05034u); #endif if (psx_delay_BFC05030) { psx_delay_BFC05030 = 0; if (psx_taken_BFC05030) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05044u); goto label_BFC05044; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05038u); } label_BFC05038: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05038u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05038: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0503Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0503C: 1000000C beq $zero, $zero, 0xBFC05070 */ uint32_t psx_brA_BFC0503C = cpu->gpr[0]; uint32_t psx_brB_BFC0503C = cpu->gpr[0]; psx_taken_BFC0503C = (psx_brA_BFC0503C == psx_brB_BFC0503C); psx_delay_BFC0503C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05040: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #ifdef PSX_COSIM cosim_instr(0xBFC05040u); #endif if (psx_delay_BFC0503C) { psx_delay_BFC0503C = 0; if (psx_taken_BFC0503C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05070u); goto label_BFC05070; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05044u); } label_BFC05044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05044u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05044u); #endif /* 0xBFC05044: 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, 0xBFC05044u); 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(0xBFC05044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC05048: 27A60010 addiu $a2, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A60010u, cpu->gpr[6], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC05048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0504Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0504C: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC05054u; /* jal link before delay slot */ psx_delay_BFC0504C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC05050: 27A50014 addiu $a1, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A50014u, cpu->gpr[5], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC05050u); #endif if (psx_delay_BFC0504C) { psx_delay_BFC0504C = 0; cpu->gpr[31] = 0xBFC05054u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } label_BFC05054: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05054u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05054u); #endif /* 0xBFC05054: 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, 0xBFC05054u); 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(0xBFC05054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05058u); #endif /* 0xBFC05058: 8FA40010 lw $a0, 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, 0xBFC05058u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0505Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0505C: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC05060: 10640007 beq $v1, $a0, 0xBFC05080 */ uint32_t psx_brA_BFC05060 = cpu->gpr[3]; uint32_t psx_brB_BFC05060 = cpu->gpr[4]; psx_taken_BFC05060 = (psx_brA_BFC05060 == psx_brB_BFC05060); psx_delay_BFC05060 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05064: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05064u); #endif if (psx_delay_BFC05060) { psx_delay_BFC05060 = 0; if (psx_taken_BFC05060) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05080u); goto label_BFC05080; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05068u); } label_BFC05068: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05068u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05068: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0506Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0506C: 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(0xBFC0506Cu); #endif label_BFC05070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05070u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05070: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05070u); return; } g_debug_last_store_pc = 0xBFC05070u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05070u); #endif label_BFC05074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05074u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05074: 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, 0xBFC05074u); return; } g_debug_last_store_pc = 0xBFC05074u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC05078: 1000FFD7 beq $zero, $zero, 0xBFC04FD8 */ uint32_t psx_brA_BFC05078 = cpu->gpr[0]; 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, 0x20001u); #endif /* 0xBFC0507C: 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, 0xBFC0507Cu); return; } g_debug_last_store_pc = 0xBFC0507Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE200000u, _pgxa, cpu->gpr[0]); } #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, 0xBFC04FD8u); goto label_BFC04FD8; } #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, 0x80004u); #endif /* 0xBFC05080: 1053FFED beq $v0, $s3, 0xBFC05038 */ uint32_t psx_brA_BFC05080 = cpu->gpr[2]; uint32_t psx_brB_BFC05080 = cpu->gpr[19]; psx_taken_BFC05080 = (psx_brA_BFC05080 == psx_brB_BFC05080); psx_delay_BFC05080 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x85u); #endif /* 0xBFC05084: 00403825 or $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(0x00403825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05084u); #endif if (psx_delay_BFC05080) { psx_delay_BFC05080 = 0; if (psx_taken_BFC05080) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05038u); goto label_BFC05038; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05088u); } label_BFC05088: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05088u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05088u); #endif /* 0xBFC05088: 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, 0xBFC05088u); 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(0xBFC05088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0508Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0508C: AE030004 sw $v1, 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, 0xBFC0508Cu); return; } g_debug_last_store_pc = 0xBFC0508Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0508Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC05090: AE04001C sw $a0, 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, 0xBFC05090u); return; } g_debug_last_store_pc = 0xBFC05090u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE04001Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC05094: AE230004 sw $v1, 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, 0xBFC05094u); return; } g_debug_last_store_pc = 0xBFC05094u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE230004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05098u); #endif /* 0xBFC05098: 8FA30014 lw $v1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05098u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30014u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0509C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0509Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC050A0: AE23001C sw $v1, 28($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 28; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC050A0u); return; } g_debug_last_store_pc = 0xBFC050A0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE23001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC050A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050A4u); #endif /* 0xBFC050A4: 8C830044 lw $v1, 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, 0xBFC050A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830044u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC050A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC050A8: 02203025 or $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(0x02203025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x40021u); #endif /* 0xBFC050AC: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000008u); #endif /* 0xBFC050B0: 0060F809 jalr $ra, $v1 */ cpu->gpr[31] = 0xBFC050B8u; /* jalr link before delay slot */ psx_delay_BFC050B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC050B4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC050B4u); #endif if (psx_delay_BFC050B0) { psx_delay_BFC050B0 = 0; { uint32_t _t = cpu->gpr[3]; cpu->gpr[31] = 0xBFC050B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x5u); #endif /* 0xBFC050B8: 10400004 beq $v0, $zero, 0xBFC050CC */ uint32_t psx_brA_BFC050B8 = cpu->gpr[2]; uint32_t psx_brB_BFC050B8 = cpu->gpr[0]; psx_taken_BFC050B8 = (psx_brA_BFC050B8 == psx_brB_BFC050B8); psx_delay_BFC050B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC050BC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC050BCu); #endif if (psx_delay_BFC050B8) { psx_delay_BFC050B8 = 0; if (psx_taken_BFC050B8) { #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, 0xBFC050C0u); } label_BFC050C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC050C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC050C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050C0u); #endif /* 0xBFC050C0: 8E030018 lw $v1, 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, 0xBFC050C0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E030018u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC050C4: 1000FFEB beq $zero, $zero, 0xBFC05074 */ uint32_t psx_brA_BFC050C4 = cpu->gpr[0]; uint32_t psx_brB_BFC050C4 = cpu->gpr[0]; psx_taken_BFC050C4 = (psx_brA_BFC050C4 == psx_brB_BFC050C4); psx_delay_BFC050C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC050C8: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); 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[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC050C8u); #endif if (psx_delay_BFC050C4) { psx_delay_BFC050C4 = 0; if (psx_taken_BFC050C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05074u); goto label_BFC05074; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC050CCu); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC050CC: 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, 0xBFC050CCu); return; } g_debug_last_store_pc = 0xBFC050CCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC050D0: 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(0xBFC050D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC050D4: 1000FFC1 beq $zero, $zero, 0xBFC04FDC */ uint32_t psx_brA_BFC050D4 = cpu->gpr[0]; uint32_t psx_brB_BFC050D4 = cpu->gpr[0]; psx_taken_BFC050D4 = (psx_brA_BFC050D4 == psx_brB_BFC050D4); psx_delay_BFC050D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC050D8: 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, 0xBFC050D8u); return; } g_debug_last_store_pc = 0xBFC050D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE200000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC050D8u); #endif if (psx_delay_BFC050D4) { psx_delay_BFC050D4 = 0; if (psx_taken_BFC050D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04FDCu); goto label_BFC04FDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC050DCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC050DCu); cpu->pc = 0xBFC050DCu; return; /* fallthrough */ } void OpenBIOS_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_BFC050E8 = 0; int psx_delay_BFC050F4 = 0; int psx_taken_BFC050F4 = 0; int psx_delay_BFC05114 = 0; int psx_delay_BFC05120 = 0; int psx_delay_BFC0512C = 0; int psx_taken_BFC0512C = 0; int psx_delay_BFC05140 = 0; int psx_taken_BFC05140 = 0; int psx_delay_BFC05168 = 0; int psx_delay_BFC05170 = 0; int psx_taken_BFC05170 = 0; int psx_delay_BFC0517C = 0; int psx_taken_BFC0517C = 0; int psx_delay_BFC05188 = 0; int psx_taken_BFC05188 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC050F0u: goto label_BFC050F0; case 0xBFC050FCu: goto label_BFC050FC; case 0xBFC05108u: goto label_BFC05108; case 0xBFC0510Cu: goto label_BFC0510C; case 0xBFC0511Cu: goto label_BFC0511C; case 0xBFC05128u: goto label_BFC05128; case 0xBFC05134u: goto label_BFC05134; case 0xBFC05140u: goto label_BFC05140; case 0xBFC05148u: goto label_BFC05148; case 0xBFC05170u: goto label_BFC05170; case 0xBFC05178u: goto label_BFC05178; case 0xBFC05184u: goto label_BFC05184; default: break; } } 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, 0x20000000u); #endif /* 0xBFC050DC: 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(0xBFC050DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC050E0: 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, 0xBFC050E0u); return; } g_debug_last_store_pc = 0xBFC050E0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #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, 0xA0000000u); #endif /* 0xBFC050E4: 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, 0xBFC050E4u); return; } g_debug_last_store_pc = 0xBFC050E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC050E8: 0FF010DD jal 0xBFC04374 */ cpu->gpr[31] = 0xBFC050F0u; /* jal link before delay slot */ psx_delay_BFC050E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC050EC: 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, 0xBFC050ECu); return; } g_debug_last_store_pc = 0xBFC050ECu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC050ECu); #endif if (psx_delay_BFC050E8) { psx_delay_BFC050E8 = 0; cpu->gpr[31] = 0xBFC050F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04374u); cpu->pc = 0xBFC04374u; return; } label_BFC050F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC050F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC050F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050F0u); #endif /* 0xBFC050F0: 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, 0xBFC050F0u); 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(0xBFC050F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC050F4: 14400009 bne $v0, $zero, 0xBFC0511C */ uint32_t psx_brA_BFC050F4 = cpu->gpr[2]; uint32_t psx_brB_BFC050F4 = cpu->gpr[0]; psx_taken_BFC050F4 = (psx_brA_BFC050F4 != psx_brB_BFC050F4); psx_delay_BFC050F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC050F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC050F8: 27A60010 addiu $a2, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A60010u, cpu->gpr[6], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC050F8u); #endif if (psx_delay_BFC050F4) { psx_delay_BFC050F4 = 0; if (psx_taken_BFC050F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0511Cu); goto label_BFC0511C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC050FCu); } 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, 0x4u); #endif /* 0xBFC050FC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC050FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05100: 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(0xBFC05100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05104: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05104u); return; } g_debug_last_store_pc = 0xBFC05104u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05104u); #endif label_BFC05108: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05108u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05108: 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(0xBFC05108u); #endif label_BFC0510C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0510Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0510Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0510Cu); #endif /* 0xBFC0510C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0510Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0510Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05110u); #endif /* 0xBFC05110: 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, 0xBFC05110u); 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(0xBFC05110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05114: 03E00008 jr $ra */ psx_delay_BFC05114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05118: 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(0xBFC05118u); #endif if (psx_delay_BFC05114) { psx_delay_BFC05114 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0511C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0511Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0511Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0511Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0511C: 27A50014 addiu $a1, $sp, 20 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (20)); PGXP_ALU(0x27A50014u, cpu->gpr[5], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0xBFC0511Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05120: 0FF010F4 jal 0xBFC043D0 */ cpu->gpr[31] = 0xBFC05128u; /* jal link before delay slot */ psx_delay_BFC05120 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC05124: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05124u); #endif if (psx_delay_BFC05120) { psx_delay_BFC05120 = 0; cpu->gpr[31] = 0xBFC05128u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC043D0u); cpu->pc = 0xBFC043D0u; return; } label_BFC05128: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05128u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05128: 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(0xBFC05128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0512Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0512C: 14430006 bne $v0, $v1, 0xBFC05148 */ uint32_t psx_brA_BFC0512C = cpu->gpr[2]; uint32_t psx_brB_BFC0512C = cpu->gpr[3]; psx_taken_BFC0512C = (psx_brA_BFC0512C != psx_brB_BFC0512C); psx_delay_BFC0512C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC05130: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05130u); #endif if (psx_delay_BFC0512C) { psx_delay_BFC0512C = 0; if (psx_taken_BFC0512C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05148u); goto label_BFC05148; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05134u); } label_BFC05134: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05134u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05134: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC05138: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #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, 0xCu); #endif /* 0xBFC0513C: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0513Cu); return; } g_debug_last_store_pc = 0xBFC0513Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0513Cu); #endif label_BFC05140: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05140u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05140: 1000FFF1 beq $zero, $zero, 0xBFC05108 */ uint32_t psx_brA_BFC05140 = cpu->gpr[0]; uint32_t psx_brB_BFC05140 = cpu->gpr[0]; psx_taken_BFC05140 = (psx_brA_BFC05140 == psx_brB_BFC05140); psx_delay_BFC05140 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05144: 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, 0xBFC05144u); return; } g_debug_last_store_pc = 0xBFC05144u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05144u); #endif if (psx_delay_BFC05140) { psx_delay_BFC05140 = 0; if (psx_taken_BFC05140) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05108u); goto label_BFC05108; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05148u); } label_BFC05148: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05148u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05148u); #endif /* 0xBFC05148: 8FA30010 lw $v1, 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, 0xBFC05148u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30010u, _pgxa, cpu->gpr[3]); } #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, 0x10008u); #endif /* 0xBFC05150: AE030004 sw $v1, 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, 0xBFC05150u); return; } g_debug_last_store_pc = 0xBFC05150u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05154u); #endif /* 0xBFC05154: 8FA30014 lw $v1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05154u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30014u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05154u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0515Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0515C: AE03001C sw $v1, 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, 0xBFC0515Cu); return; } g_debug_last_store_pc = 0xBFC0515Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE03001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0515Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05160u); #endif /* 0xBFC05160: 8C63002C lw $v1, 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, 0xBFC05160u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C63002Cu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC05164: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000008u); #endif /* 0xBFC05168: 0060F809 jalr $ra, $v1 */ cpu->gpr[31] = 0xBFC05170u; /* jalr link before delay slot */ psx_delay_BFC05168 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0516Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0516C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0516Cu); #endif if (psx_delay_BFC05168) { psx_delay_BFC05168 = 0; { uint32_t _t = cpu->gpr[3]; cpu->gpr[31] = 0xBFC05170u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC05170: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05170u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05170: 10400004 beq $v0, $zero, 0xBFC05184 */ uint32_t psx_brA_BFC05170 = cpu->gpr[2]; uint32_t psx_brB_BFC05170 = cpu->gpr[0]; psx_taken_BFC05170 = (psx_brA_BFC05170 == psx_brB_BFC05170); psx_delay_BFC05170 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05174: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05174u); #endif if (psx_delay_BFC05170) { psx_delay_BFC05170 = 0; if (psx_taken_BFC05170) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05184u); goto label_BFC05184; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05178u); } label_BFC05178: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05178u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05178u); #endif /* 0xBFC05178: 8E030018 lw $v1, 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, 0xBFC05178u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E030018u, _pgxa, cpu->gpr[3]); } #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: 1000FFF0 beq $zero, $zero, 0xBFC05140 */ uint32_t psx_brA_BFC0517C = cpu->gpr[0]; uint32_t psx_brB_BFC0517C = cpu->gpr[0]; psx_taken_BFC0517C = (psx_brA_BFC0517C == psx_brB_BFC0517C); psx_delay_BFC0517C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05180: AC434BF0 sw $v1, 19440($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19440; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19440)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05180u); return; } g_debug_last_store_pc = 0xBFC05180u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05180u); #endif if (psx_delay_BFC0517C) { psx_delay_BFC0517C = 0; if (psx_taken_BFC0517C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05140u); goto label_BFC05140; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05184u); } label_BFC05184: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05184u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05184: 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, 0xBFC05184u); return; } g_debug_last_store_pc = 0xBFC05184u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05188: 1000FFE0 beq $zero, $zero, 0xBFC0510C */ uint32_t psx_brA_BFC05188 = cpu->gpr[0]; uint32_t psx_brB_BFC05188 = cpu->gpr[0]; psx_taken_BFC05188 = (psx_brA_BFC05188 == psx_brB_BFC05188); psx_delay_BFC05188 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0518Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0518C: 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(0xBFC0518Cu); #endif if (psx_delay_BFC05188) { psx_delay_BFC05188 = 0; if (psx_taken_BFC05188) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0510Cu); goto label_BFC0510C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05190u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05190u); cpu->pc = 0xBFC05190u; return; /* fallthrough */ } void OpenBIOS_func_1FC05190(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05190u); int psx_delay_BFC05198 = 0; label_BFC05190: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05190u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05190: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05194: AC441814 sw $a0, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05194u); return; } g_debug_last_store_pc = 0xBFC05194u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441814u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05198: 03E00008 jr $ra */ psx_delay_BFC05198 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0519Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0519C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0519Cu); #endif if (psx_delay_BFC05198) { psx_delay_BFC05198 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC051A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC051A0u); int psx_delay_BFC051C4 = 0; label_BFC051A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC051A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC051A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC051A0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC051A4: 24030401 addiu $v1, $zero, 1025 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (1025)); PGXP_ALU(0x24030401u, cpu->gpr[3], _pgx1, 0x00000401u); } #ifdef PSX_COSIM cosim_instr(0xBFC051A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC051A8: AC4310A8 sw $v1, 4264($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4264)); 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[3]); } PGXP_STORE(0xAC4310A8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC051A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC051AC: 3C030400 lui $v1, 0x400 */ cpu->gpr[3] = 0x04000000u; PGXP_ALU(0x3C030400u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC051ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC051B0: AC431814 sw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051B0u); return; } g_debug_last_store_pc = 0xBFC051B0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC051B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC051B4: 3C030200 lui $v1, 0x200 */ cpu->gpr[3] = 0x02000000u; PGXP_ALU(0x3C030200u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC051B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC051B8: AC431814 sw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051B8u); return; } g_debug_last_store_pc = 0xBFC051B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC051B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC051BC: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #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, 0xCu); #endif /* 0xBFC051C0: AC431814 sw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051C0u); return; } g_debug_last_store_pc = 0xBFC051C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC051C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC051C4: 03E00008 jr $ra */ psx_delay_BFC051C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC051C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC051C8u); #endif if (psx_delay_BFC051C4) { psx_delay_BFC051C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC051CC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC051CCu); int psx_delay_BFC051E4 = 0; int psx_delay_BFC051F0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC051ECu: goto label_BFC051EC; default: break; } } label_BFC051CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC051CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC051CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC051CC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC051CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC051D0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC051D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC051D4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051D4u); return; } g_debug_last_store_pc = 0xBFC051D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC051D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC051D8: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC051D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051DCu); #endif /* 0xBFC051DC: 8C461814 lw $a2, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051DCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C461814u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC051E0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC051E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC051E4: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC051ECu; /* jal link before delay slot */ psx_delay_BFC051E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC051E8: 248497B4 addiu $a0, $a0, -26700 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26700)); PGXP_ALU(0x248497B4u, cpu->gpr[4], _pgx1, 0xFFFF97B4u); } #ifdef PSX_COSIM cosim_instr(0xBFC051E8u); #endif if (psx_delay_BFC051E4) { psx_delay_BFC051E4 = 0; cpu->gpr[31] = 0xBFC051ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC051EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC051ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC051ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051ECu); #endif /* 0xBFC051EC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC051ECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC051ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC051F0: 0BF01468 j 0xBFC051A0 */ psx_delay_BFC051F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC051F4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC051F4u); #endif if (psx_delay_BFC051F0) { psx_delay_BFC051F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC051A0u); cpu->pc = 0xBFC051A0u; return; } } void OpenBIOS_func_1FC051F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC051F8u); int psx_delay_BFC05238 = 0; int psx_taken_BFC05238 = 0; int psx_delay_BFC05274 = 0; int psx_taken_BFC05274 = 0; int psx_delay_BFC05290 = 0; int psx_delay_BFC05298 = 0; int psx_taken_BFC05298 = 0; int psx_delay_BFC052AC = 0; int psx_delay_BFC052C4 = 0; int psx_taken_BFC052C4 = 0; int psx_delay_BFC052DC = 0; int psx_taken_BFC052DC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0522Cu: goto label_BFC0522C; case 0xBFC05240u: goto label_BFC05240; case 0xBFC05274u: goto label_BFC05274; case 0xBFC0527Cu: goto label_BFC0527C; case 0xBFC05298u: goto label_BFC05298; case 0xBFC052A0u: goto label_BFC052A0; case 0xBFC052B4u: goto label_BFC052B4; case 0xBFC052CCu: goto label_BFC052CC; default: break; } } 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, 0x20000000u); #endif /* 0xBFC051F8: 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(0xBFC051F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC051FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC051FC: 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, 0xBFC051FCu); return; } g_debug_last_store_pc = 0xBFC051FCu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC051FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC05200: 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, 0xBFC05200u); return; } g_debug_last_store_pc = 0xBFC05200u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC05200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05204u); #endif /* 0xBFC05204: 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, 0xBFC05204u); 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(0xBFC05204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC05208: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0520Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0520C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0520Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC05210: 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, 0xBFC05210u); return; } g_debug_last_store_pc = 0xBFC05210u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC05210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC05214: 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, 0xBFC05214u); return; } g_debug_last_store_pc = 0xBFC05214u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0xA0000000u); #endif /* 0xBFC05218: 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, 0xBFC05218u); return; } g_debug_last_store_pc = 0xBFC05218u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0521Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0521C: 3C020010 lui $v0, 0x10 */ cpu->gpr[2] = 0x00100000u; PGXP_ALU(0x3C020010u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0521Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC05220: 3C111F80 lui $s1, 0x1F80 */ cpu->gpr[17] = 0x1F800000u; PGXP_ALU(0x3C111F80u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC05224: 3C130400 lui $s3, 0x400 */ cpu->gpr[19] = 0x04000000u; PGXP_ALU(0x3C130400u, cpu->gpr[19], 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: 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(0xBFC05228u); #endif label_BFC0522C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0522Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0522Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0522Cu); #endif /* 0xBFC0522C: 8E231814 lw $v1, 6164($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0522Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } PGXP_LOAD(0x8E231814u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC05230: 00000000 nop */ /* nop */ #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, 0x80008u); #endif /* 0xBFC05234: 00731824 and $v1, $v1, $s3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[19]; PGXP_ALU(0x00731824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05238: 10600017 beq $v1, $zero, 0xBFC05298 */ uint32_t psx_brA_BFC05238 = cpu->gpr[3]; uint32_t psx_brB_BFC05238 = cpu->gpr[0]; psx_taken_BFC05238 = (psx_brA_BFC05238 == psx_brB_BFC05238); psx_delay_BFC05238 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0523Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0523C: 00E60018 mult $a3, $a2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[6]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E60018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[6]); #ifdef PSX_COSIM cosim_instr(0xBFC0523Cu); #endif if (psx_delay_BFC05238) { psx_delay_BFC05238 = 0; if (psx_taken_BFC05238) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05298u); goto label_BFC05298; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05240u); } label_BFC05240: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05240u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05240: 3C02A000 lui $v0, 0xA000 */ cpu->gpr[2] = 0xA0000000u; PGXP_ALU(0x3C02A000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC05244: AE221810 sw $v0, 6160($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05244u); return; } g_debug_last_store_pc = 0xBFC05244u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE221810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC05248: 30C3FFFF andi $v1, $a2, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0xFFFFu; PGXP_ALU(0x30C3FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC05248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0524Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0524C: 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(0xBFC0524Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC05250: 3210FFFF andi $s0, $s0, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFFFFu; PGXP_ALU(0x3210FFFFu, cpu->gpr[16], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC05250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC05254: 00071400 sll $v0, $a3, 16 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[7] << 16u; PGXP_ALU(0x00071400u, cpu->gpr[2], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0xBFC05254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05258: 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(0xBFC05258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0525Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC0525C: 00B02825 or $a1, $a1, $s0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[5] = cpu->gpr[5] | cpu->gpr[16]; PGXP_ALU(0x00B02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0525Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020u); #endif /* 0xBFC05260: AE251810 sw $a1, 6160($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05260u); return; } g_debug_last_store_pc = 0xBFC05260u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE251810u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC05260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC05264: AE221810 sw $v0, 6160($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05264u); return; } g_debug_last_store_pc = 0xBFC05264u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE221810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05268: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0526Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0526C: 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(0xBFC0526Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05270: 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(0xBFC05270u); #endif 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, 0x5u); #endif /* 0xBFC05274: 14400015 bne $v0, $zero, 0xBFC052CC */ uint32_t psx_brA_BFC05274 = cpu->gpr[2]; uint32_t psx_brB_BFC05274 = cpu->gpr[0]; psx_taken_BFC05274 = (psx_brA_BFC05274 != psx_brB_BFC05274); 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; if (psx_taken_BFC05274) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052CCu); goto label_BFC052CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0527Cu); } 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 /* 0xBFC0527C: 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, 0xBFC0527Cu); 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(0xBFC0527Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05280u); #endif /* 0xBFC05280: 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, 0xBFC05280u); 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(0xBFC05280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05284u); #endif /* 0xBFC05284: 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, 0xBFC05284u); 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(0xBFC05284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05288u); #endif /* 0xBFC05288: 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, 0xBFC05288u); 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(0xBFC05288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0528Cu); #endif /* 0xBFC0528C: 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, 0xBFC0528Cu); 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(0xBFC0528Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05290: 03E00008 jr $ra */ psx_delay_BFC05290 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05294: 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(0xBFC05294u); #endif if (psx_delay_BFC05290) { psx_delay_BFC05290 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05298: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05298u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05298: 1440FFE4 bne $v0, $zero, 0xBFC0522C */ uint32_t psx_brA_BFC05298 = cpu->gpr[2]; uint32_t psx_brB_BFC05298 = cpu->gpr[0]; psx_taken_BFC05298 = (psx_brA_BFC05298 != psx_brB_BFC05298); psx_delay_BFC05298 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0529Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0529C: 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(0xBFC0529Cu); #endif if (psx_delay_BFC05298) { psx_delay_BFC05298 = 0; if (psx_taken_BFC05298) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0522Cu); goto label_BFC0522C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052A0u); } label_BFC052A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC052A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC052A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC052A0: 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, 0xBFC052A0u); return; } g_debug_last_store_pc = 0xBFC052A0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA7003Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC052A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC052A4: 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, 0xBFC052A4u); return; } g_debug_last_store_pc = 0xBFC052A4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60038u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC052A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC052A8: 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, 0xBFC052A8u); return; } g_debug_last_store_pc = 0xBFC052A8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50034u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC052A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC052AC: 0FF01473 jal 0xBFC051CC */ cpu->gpr[31] = 0xBFC052B4u; /* jal link before delay slot */ psx_delay_BFC052AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC052B0: AFA40010 sw $a0, 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, 0xBFC052B0u); return; } g_debug_last_store_pc = 0xBFC052B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC052B0u); #endif if (psx_delay_BFC052AC) { psx_delay_BFC052AC = 0; cpu->gpr[31] = 0xBFC052B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC051CCu); cpu->pc = 0xBFC051CCu; return; } 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 /* 0xBFC052B4: 8FA7003C lw $a3, 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, 0xBFC052B4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000000u); } PGXP_LOAD(0x8FA7003Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC052B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052B8u); #endif /* 0xBFC052B8: 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, 0xBFC052B8u); 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(0xBFC052B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052BCu); #endif /* 0xBFC052BC: 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, 0xBFC052BCu); 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(0xBFC052BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052C0u); #endif /* 0xBFC052C0: 8FA40010 lw $a0, 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, 0xBFC052C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC052C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC052C4: 1000FFD9 beq $zero, $zero, 0xBFC0522C */ uint32_t psx_brA_BFC052C4 = cpu->gpr[0]; uint32_t psx_brB_BFC052C4 = cpu->gpr[0]; psx_taken_BFC052C4 = (psx_brA_BFC052C4 == psx_brB_BFC052C4); psx_delay_BFC052C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC052C8: 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(0xBFC052C8u); #endif if (psx_delay_BFC052C4) { psx_delay_BFC052C4 = 0; if (psx_taken_BFC052C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0522Cu); goto label_BFC0522C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052CCu); } 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 /* 0xBFC052CC: 8E440000 lw $a0, 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, 0xBFC052CCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x40000u); } PGXP_LOAD(0x8E440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC052CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC052D0: 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(0xBFC052D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC052D4: 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(0xBFC052D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC052D8: AC641810 sw $a0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052D8u); return; } g_debug_last_store_pc = 0xBFC052D8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641810u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC052D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC052DC: 1000FFE5 beq $zero, $zero, 0xBFC05274 */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC052E0: 00000000 nop */ /* nop */ #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, 0xBFC05274u); goto label_BFC05274; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052E4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052E4u); cpu->pc = 0xBFC052E4u; return; /* fallthrough */ } void OpenBIOS_func_1FC052E4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC052E4u); int psx_delay_BFC052EC = 0; 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, 0x4u); #endif /* 0xBFC052E4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC052E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052E8u); #endif /* 0xBFC052E8: 8C421814 lw $v0, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C421814u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC052EC: 03E00008 jr $ra */ psx_delay_BFC052EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC052F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC052F0u); #endif if (psx_delay_BFC052EC) { psx_delay_BFC052EC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC052F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC052F4u); int psx_delay_BFC05318 = 0; int psx_taken_BFC05318 = 0; int psx_delay_BFC05330 = 0; int psx_taken_BFC05330 = 0; int psx_delay_BFC0533C = 0; int psx_taken_BFC0533C = 0; int psx_delay_BFC05344 = 0; int psx_taken_BFC05344 = 0; int psx_delay_BFC05354 = 0; int psx_delay_BFC05368 = 0; int psx_delay_BFC05370 = 0; int psx_taken_BFC05370 = 0; int psx_delay_BFC0537C = 0; int psx_taken_BFC0537C = 0; int psx_delay_BFC05390 = 0; int psx_taken_BFC05390 = 0; int psx_delay_BFC053B0 = 0; int psx_taken_BFC053B0 = 0; int psx_delay_BFC053BC = 0; int psx_taken_BFC053BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05320u: goto label_BFC05320; case 0xBFC05324u: goto label_BFC05324; case 0xBFC05338u: goto label_BFC05338; case 0xBFC05344u: goto label_BFC05344; case 0xBFC0534Cu: goto label_BFC0534C; case 0xBFC05354u: goto label_BFC05354; case 0xBFC0535Cu: goto label_BFC0535C; case 0xBFC05360u: goto label_BFC05360; case 0xBFC05370u: goto label_BFC05370; case 0xBFC05378u: goto label_BFC05378; case 0xBFC05384u: goto label_BFC05384; case 0xBFC05398u: goto label_BFC05398; case 0xBFC053A4u: goto label_BFC053A4; case 0xBFC053B8u: goto label_BFC053B8; default: break; } } 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, 0x20000000u); #endif /* 0xBFC052F4: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC052F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC052F8: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC052F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC052FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC052FC: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC052FCu); return; } g_debug_last_store_pc = 0xBFC052FCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC052FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05300u); #endif /* 0xBFC05300: 8C431814 lw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05300u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05304: 3C026000 lui $v0, 0x6000 */ cpu->gpr[2] = 0x60000000u; PGXP_ALU(0x3C026000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05308: 00621824 and $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(0x00621824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0530Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0530C: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0530Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05310: 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(0xBFC05310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC05314: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05318: 1460001A bne $v1, $zero, 0xBFC05384 */ uint32_t psx_brA_BFC05318 = cpu->gpr[3]; 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, 0x10u); #endif /* 0xBFC0531C: 3C040100 lui $a0, 0x100 */ cpu->gpr[4] = 0x01000000u; PGXP_ALU(0x3C040100u, cpu->gpr[4], 0u, 0u); #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, 0xBFC05384u); goto label_BFC05384; } #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, 0x10u); #endif /* 0xBFC05320: 3C041000 lui $a0, 0x1000 */ cpu->gpr[4] = 0x10000000u; PGXP_ALU(0x3C041000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05320u); #endif label_BFC05324: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05324u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05324u); #endif /* 0xBFC05324: 8CA31814 lw $v1, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05324u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x8CA31814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05328: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0532Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0532C: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0532Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05330: 10600004 beq $v1, $zero, 0xBFC05344 */ uint32_t psx_brA_BFC05330 = cpu->gpr[3]; uint32_t psx_brB_BFC05330 = cpu->gpr[0]; 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, 0x4u); #endif /* 0xBFC05334: 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(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, 0xBFC05344u); goto label_BFC05344; } #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, 0x4u); #endif /* 0xBFC05338: 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(0xBFC05338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0533Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0533C: 10000008 beq $zero, $zero, 0xBFC05360 */ uint32_t psx_brA_BFC0533C = cpu->gpr[0]; uint32_t psx_brB_BFC0533C = cpu->gpr[0]; psx_taken_BFC0533C = (psx_brA_BFC0533C == psx_brB_BFC0533C); psx_delay_BFC0533C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05340: 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(0xBFC05340u); #endif if (psx_delay_BFC0533C) { psx_delay_BFC0533C = 0; if (psx_taken_BFC0533C) { #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, 0xBFC05344u); } label_BFC05344: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05344u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05344: 1440FFF7 bne $v0, $zero, 0xBFC05324 */ uint32_t psx_brA_BFC05344 = cpu->gpr[2]; uint32_t psx_brB_BFC05344 = cpu->gpr[0]; psx_taken_BFC05344 = (psx_brA_BFC05344 != psx_brB_BFC05344); psx_delay_BFC05344 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05348: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05348u); #endif if (psx_delay_BFC05344) { psx_delay_BFC05344 = 0; if (psx_taken_BFC05344) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05324u); goto label_BFC05324; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0534Cu); } label_BFC0534C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0534Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0534Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0534Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0534C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0534Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05350: 248497D4 addiu $a0, $a0, -26668 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26668)); PGXP_ALU(0x248497D4u, cpu->gpr[4], _pgx1, 0xFFFF97D4u); } #ifdef PSX_COSIM cosim_instr(0xBFC05350u); #endif label_BFC05354: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05354u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05354: 0FF01473 jal 0xBFC051CC */ cpu->gpr[31] = 0xBFC0535Cu; /* jal link before delay slot */ psx_delay_BFC05354 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05358: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05358u); #endif if (psx_delay_BFC05354) { psx_delay_BFC05354 = 0; cpu->gpr[31] = 0xBFC0535Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC051CCu); cpu->pc = 0xBFC051CCu; return; } label_BFC0535C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0535Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0535Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0535Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0535C: 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(0xBFC0535Cu); #endif 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 /* 0xBFC05360: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05360u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC05364: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05368: 03E00008 jr $ra */ psx_delay_BFC05368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0536Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0536C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0536Cu); #endif if (psx_delay_BFC05368) { psx_delay_BFC05368 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05370: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05370u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05370: 14400004 bne $v0, $zero, 0xBFC05384 */ uint32_t psx_brA_BFC05370 = cpu->gpr[2]; uint32_t psx_brB_BFC05370 = cpu->gpr[0]; psx_taken_BFC05370 = (psx_brA_BFC05370 != psx_brB_BFC05370); psx_delay_BFC05370 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05374: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05374u); #endif if (psx_delay_BFC05370) { psx_delay_BFC05370 = 0; if (psx_taken_BFC05370) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05384u); goto label_BFC05384; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05378u); } label_BFC05378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05378: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0537Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0537C: 1000FFF5 beq $zero, $zero, 0xBFC05354 */ uint32_t psx_brA_BFC0537C = cpu->gpr[0]; uint32_t psx_brB_BFC0537C = cpu->gpr[0]; psx_taken_BFC0537C = (psx_brA_BFC0537C == psx_brB_BFC0537C); psx_delay_BFC0537C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05380: 248497E4 addiu $a0, $a0, -26652 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26652)); PGXP_ALU(0x248497E4u, cpu->gpr[4], _pgx1, 0xFFFF97E4u); } #ifdef PSX_COSIM cosim_instr(0xBFC05380u); #endif if (psx_delay_BFC0537C) { psx_delay_BFC0537C = 0; if (psx_taken_BFC0537C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05354u); goto label_BFC05354; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05384u); } label_BFC05384: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05384u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05384u); #endif /* 0xBFC05384: 8CA310A8 lw $v1, 4264($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05384u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x8CA310A8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05388: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC0538C: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0538Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05390: 1460FFF7 bne $v1, $zero, 0xBFC05370 */ uint32_t psx_brA_BFC05390 = cpu->gpr[3]; uint32_t psx_brB_BFC05390 = cpu->gpr[0]; psx_taken_BFC05390 = (psx_brA_BFC05390 != psx_brB_BFC05390); psx_delay_BFC05390 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05394: 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(0xBFC05394u); #endif if (psx_delay_BFC05390) { psx_delay_BFC05390 = 0; if (psx_taken_BFC05390) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05370u); goto label_BFC05370; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05398u); } label_BFC05398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05398: 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(0xBFC05398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0539Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0539C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0539Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC053A0: 3C040400 lui $a0, 0x400 */ cpu->gpr[4] = 0x04000000u; PGXP_ALU(0x3C040400u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC053A0u); #endif 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 /* 0xBFC053A4: 8C621814 lw $v0, 6164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C621814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC053A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC053A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC053A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC053AC: 00441024 and $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(0x00441024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC053B0: 1040FFFC beq $v0, $zero, 0xBFC053A4 */ uint32_t psx_brA_BFC053B0 = cpu->gpr[2]; uint32_t psx_brB_BFC053B0 = cpu->gpr[0]; 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, 0xBFC053A4u); goto label_BFC053A4; } #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, 0x18u); #endif /* 0xBFC053B8: AC641814 sw $a0, 6164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053B8u); return; } g_debug_last_store_pc = 0xBFC053B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641814u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC053B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC053BC: 1000FFE8 beq $zero, $zero, 0xBFC05360 */ uint32_t psx_brA_BFC053BC = cpu->gpr[0]; uint32_t psx_brB_BFC053BC = cpu->gpr[0]; psx_taken_BFC053BC = (psx_brA_BFC053BC == psx_brB_BFC053BC); psx_delay_BFC053BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC053C0: 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(0xBFC053C0u); #endif if (psx_delay_BFC053BC) { psx_delay_BFC053BC = 0; if (psx_taken_BFC053BC) { #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, 0xBFC053C4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC053C4u); cpu->pc = 0xBFC053C4u; return; /* fallthrough */ } void OpenBIOS_func_1FC053C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC053C4u); int psx_delay_BFC053D8 = 0; int psx_delay_BFC0546C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC053E0u: goto label_BFC053E0; default: break; } } label_BFC053C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC053C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC053C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC053C4: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC053C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC053C8: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053C8u); return; } g_debug_last_store_pc = 0xBFC053C8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC053C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC053CC: 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, 0xBFC053CCu); return; } g_debug_last_store_pc = 0xBFC053CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC053CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC053D0: 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, 0xBFC053D0u); return; } g_debug_last_store_pc = 0xBFC053D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC053D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC053D4: 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, 0xBFC053D4u); return; } g_debug_last_store_pc = 0xBFC053D4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC053D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC053D8: 0FF014BD jal 0xBFC052F4 */ cpu->gpr[31] = 0xBFC053E0u; /* jal link before delay slot */ psx_delay_BFC053D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC053DC: 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, 0xBFC053DCu); return; } g_debug_last_store_pc = 0xBFC053DCu; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70024u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC053DCu); #endif if (psx_delay_BFC053D8) { psx_delay_BFC053D8 = 0; cpu->gpr[31] = 0xBFC053E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052F4u); cpu->pc = 0xBFC052F4u; return; } label_BFC053E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC053E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC053E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC053E0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC053E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC053E4: 3C03A000 lui $v1, 0xA000 */ cpu->gpr[3] = 0xA0000000u; PGXP_ALU(0x3C03A000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC053E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC053E8: AC431810 sw $v1, 6160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053E8u); return; } g_debug_last_store_pc = 0xBFC053E8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431810u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC053E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053ECu); #endif /* 0xBFC053EC: 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, 0xBFC053ECu); 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(0xBFC053ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053F0u); #endif /* 0xBFC053F0: 97A40018 lhu $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053F0u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x97A40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC053F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC053F4: 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(0xBFC053F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC053F8: 00A42825 or $a1, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[5] | cpu->gpr[4]; PGXP_ALU(0x00A42825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC053F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC053FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC053FC: AC451810 sw $a1, 6160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC053FCu); return; } g_debug_last_store_pc = 0xBFC053FCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC451810u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC053FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05400u); #endif /* 0xBFC05400: 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, 0xBFC05400u); 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(0xBFC05400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05404u); #endif /* 0xBFC05404: 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, 0xBFC05404u); 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(0xBFC05404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC05408: 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(0xBFC05408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0540Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0540C: 00E60018 mult $a3, $a2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[6]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E60018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[6]); #ifdef PSX_COSIM cosim_instr(0xBFC0540Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC05410: 30C4FFFF andi $a0, $a2, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] & 0xFFFFu; PGXP_ALU(0x30C4FFFFu, cpu->gpr[4], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC05410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05414: 00641825 or $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(0x00641825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05418: AC431810 sw $v1, 6160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05418u); return; } g_debug_last_store_pc = 0xBFC05418u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431810u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0541Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0541C: 3C030400 lui $v1, 0x400 */ cpu->gpr[3] = 0x04000000u; PGXP_ALU(0x3C030400u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0541Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05420: 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(0xBFC05420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05424: AC431814 sw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05424u); return; } g_debug_last_store_pc = 0xBFC05424u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05428u); #endif /* 0xBFC05428: 8C4310F0 lw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05428u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0542Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0542C: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC05430: 34630800 ori $v1, $v1, 0x800 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x800u; PGXP_ALU(0x34630800u, cpu->gpr[3], _pgx1, 0x0800u); } #ifdef PSX_COSIM cosim_instr(0xBFC05430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05434: AC4310F0 sw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05434u); return; } g_debug_last_store_pc = 0xBFC05434u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05438u); #endif /* 0xBFC05438: 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, 0xBFC05438u); 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(0xBFC05438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0543Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0543C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0543Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05440: AC4310A0 sw $v1, 4256($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05440u); return; } g_debug_last_store_pc = 0xBFC05440u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310A0u, _pgxa, cpu->gpr[3]); } #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, 0x8u); #endif /* 0xBFC05444: 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(0xBFC05444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05448: 00031942 srl $v1, $v1, 5 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 5u; PGXP_ALU(0x00031942u, cpu->gpr[3], _pgx1, 5u); } #ifdef PSX_COSIM cosim_instr(0xBFC05448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0544Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0544C: 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(0xBFC0544Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05450: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC05450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05454: AC4310A4 sw $v1, 4260($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4260; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05454u); return; } g_debug_last_store_pc = 0xBFC05454u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05458: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0545Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0545C: 24630201 addiu $v1, $v1, 513 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (513)); PGXP_ALU(0x24630201u, cpu->gpr[3], _pgx1, 0x00000201u); } #ifdef PSX_COSIM cosim_instr(0xBFC0545Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05460: AC4310A8 sw $v1, 4264($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05460u); return; } g_debug_last_store_pc = 0xBFC05460u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310A8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05464u); #endif /* 0xBFC05464: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05464u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05468: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0546Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0546C: 03E00008 jr $ra */ psx_delay_BFC0546C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05470: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05470u); #endif if (psx_delay_BFC0546C) { psx_delay_BFC0546C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05474(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05474u); int psx_delay_BFC0547C = 0; int psx_delay_BFC05498 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05484u: goto label_BFC05484; default: break; } } 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, 0x20000000u); #endif /* 0xBFC05474: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC05474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05478: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05478u); return; } g_debug_last_store_pc = 0xBFC05478u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0547Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0547C: 0FF014BD jal 0xBFC052F4 */ cpu->gpr[31] = 0xBFC05484u; /* jal link before delay slot */ psx_delay_BFC0547C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC05480: 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, 0xBFC05480u); return; } g_debug_last_store_pc = 0xBFC05480u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05480u); #endif if (psx_delay_BFC0547C) { psx_delay_BFC0547C = 0; cpu->gpr[31] = 0xBFC05484u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052F4u); cpu->pc = 0xBFC052F4u; return; } 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 /* 0xBFC05484: 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, 0xBFC05484u); 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(0xBFC05484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05488: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0548Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0548C: AC641810 sw $a0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0548Cu); return; } g_debug_last_store_pc = 0xBFC0548Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641810u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0548Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05490u); #endif /* 0xBFC05490: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05490u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05494: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05498: 03E00008 jr $ra */ psx_delay_BFC05498 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0549Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0549C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0549Cu); #endif if (psx_delay_BFC05498) { psx_delay_BFC05498 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC054A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC054A0u); int psx_delay_BFC054B0 = 0; int psx_delay_BFC054C4 = 0; int psx_taken_BFC054C4 = 0; int psx_delay_BFC054D4 = 0; int psx_delay_BFC054EC = 0; int psx_taken_BFC054EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC054B8u: goto label_BFC054B8; case 0xBFC054C4u: goto label_BFC054C4; case 0xBFC054CCu: goto label_BFC054CC; case 0xBFC054DCu: goto label_BFC054DC; default: break; } } label_BFC054A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC054A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC054A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC054A0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC054A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC054A4: 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, 0xBFC054A4u); return; } g_debug_last_store_pc = 0xBFC054A4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC054A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC054A8: 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, 0xBFC054A8u); return; } g_debug_last_store_pc = 0xBFC054A8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC054A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC054AC: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC054ACu); return; } g_debug_last_store_pc = 0xBFC054ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC054ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC054B0: 0FF014BD jal 0xBFC052F4 */ cpu->gpr[31] = 0xBFC054B8u; /* jal link before delay slot */ psx_delay_BFC054B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC054B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC054B4u); #endif if (psx_delay_BFC054B0) { psx_delay_BFC054B0 = 0; cpu->gpr[31] = 0xBFC054B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052F4u); cpu->pc = 0xBFC052F4u; return; } label_BFC054B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC054B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC054B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054B8u); #endif /* 0xBFC054B8: 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, 0xBFC054B8u); 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(0xBFC054B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054BCu); #endif /* 0xBFC054BC: 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, 0xBFC054BCu); 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(0xBFC054BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC054C0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC054C0u); #endif label_BFC054C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC054C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC054C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC054C4: 14A00005 bne $a1, $zero, 0xBFC054DC */ uint32_t psx_brA_BFC054C4 = cpu->gpr[5]; uint32_t psx_brB_BFC054C4 = cpu->gpr[0]; psx_taken_BFC054C4 = (psx_brA_BFC054C4 != psx_brB_BFC054C4); psx_delay_BFC054C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC054C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC054C8u); #endif if (psx_delay_BFC054C4) { psx_delay_BFC054C4 = 0; if (psx_taken_BFC054C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC054DCu); goto label_BFC054DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC054CCu); } label_BFC054CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC054CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC054CCu); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC054D0: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC054D4: 03E00008 jr $ra */ psx_delay_BFC054D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC054D8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC054D8u); #endif if (psx_delay_BFC054D4) { psx_delay_BFC054D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 /* 0xBFC054DC: 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, 0xBFC054DCu); 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(0xBFC054DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC054E0: 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(0xBFC054E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC054E4: 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(0xBFC054E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC054E8: AC431810 sw $v1, 6160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC054E8u); return; } g_debug_last_store_pc = 0xBFC054E8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431810u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC054E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC054EC: 1000FFF5 beq $zero, $zero, 0xBFC054C4 */ uint32_t psx_brA_BFC054EC = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC054F0: 00000000 nop */ /* nop */ #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, 0xBFC054C4u); goto label_BFC054C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC054F4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC054F4u); cpu->pc = 0xBFC054F4u; return; /* fallthrough */ } void OpenBIOS_func_1FC054F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC054F4u); int psx_delay_BFC0550C = 0; int psx_delay_BFC05514 = 0; int psx_delay_BFC0554C = 0; int psx_delay_BFC05570 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05514u: goto label_BFC05514; case 0xBFC0551Cu: goto label_BFC0551C; case 0xBFC05554u: goto label_BFC05554; default: break; } } 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, 0x20000000u); #endif /* 0xBFC054F4: 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(0xBFC054F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC054F8: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC054F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC054FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC054FC: AFA40010 sw $a0, 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, 0xBFC054FCu); return; } g_debug_last_store_pc = 0xBFC054FCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC054FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05500: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05504: 248497F4 addiu $a0, $a0, -26636 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26636)); PGXP_ALU(0x248497F4u, cpu->gpr[4], _pgx1, 0xFFFF97F4u); } #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, 0xA0000000u); #endif /* 0xBFC05508: 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, 0xBFC05508u); return; } g_debug_last_store_pc = 0xBFC05508u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0550Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0550C: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC05514u; /* jal link before delay slot */ psx_delay_BFC0550C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC05510: 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, 0xBFC05510u); return; } g_debug_last_store_pc = 0xBFC05510u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC05510u); #endif if (psx_delay_BFC0550C) { psx_delay_BFC0550C = 0; cpu->gpr[31] = 0xBFC05514u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC05514: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05514u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05514: 0FF014BD jal 0xBFC052F4 */ cpu->gpr[31] = 0xBFC0551Cu; /* jal link before delay slot */ psx_delay_BFC05514 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC05518: 3C101F80 lui $s0, 0x1F80 */ cpu->gpr[16] = 0x1F800000u; PGXP_ALU(0x3C101F80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05518u); #endif if (psx_delay_BFC05514) { psx_delay_BFC05514 = 0; cpu->gpr[31] = 0xBFC0551Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC052F4u); cpu->pc = 0xBFC052F4u; return; } label_BFC0551C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0551Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0551Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0551Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0551C: 3C020400 lui $v0, 0x400 */ cpu->gpr[2] = 0x04000000u; PGXP_ALU(0x3C020400u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0551Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05520: 24420002 addiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2)); PGXP_ALU(0x24420002u, cpu->gpr[2], _pgx1, 0x00000002u); } #ifdef PSX_COSIM cosim_instr(0xBFC05520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC05524: AE021814 sw $v0, 6164($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05524u); return; } g_debug_last_store_pc = 0xBFC05524u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05528: AE0010F4 sw $zero, 4340($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05528u); return; } g_debug_last_store_pc = 0xBFC05528u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE0010F4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0552Cu); #endif /* 0xBFC0552C: 8E0210F0 lw $v0, 4336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0552Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E0210F0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0552Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05530: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05534: 34420800 ori $v0, $v0, 0x800 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x800u; PGXP_ALU(0x34420800u, cpu->gpr[2], _pgx1, 0x0800u); } #ifdef PSX_COSIM cosim_instr(0xBFC05534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC05538: AE0210F0 sw $v0, 4336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05538u); return; } g_debug_last_store_pc = 0xBFC05538u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE0210F0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0553Cu); #endif /* 0xBFC0553C: 8FA50010 lw $a1, 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, 0xBFC0553Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50010u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05540: 24849800 addiu $a0, $a0, -26624 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26624)); PGXP_ALU(0x24849800u, cpu->gpr[4], _pgx1, 0xFFFF9800u); } #ifdef PSX_COSIM cosim_instr(0xBFC05540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC05544: AE0510A0 sw $a1, 4256($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05544u); return; } g_debug_last_store_pc = 0xBFC05544u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE0510A0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC05544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC05548: AE0010A4 sw $zero, 4260($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4260; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4260)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05548u); return; } g_debug_last_store_pc = 0xBFC05548u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE0010A4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0554Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0554C: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC05554u; /* jal link before delay slot */ psx_delay_BFC0554C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05550: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05550u); #endif if (psx_delay_BFC0554C) { psx_delay_BFC0554C = 0; cpu->gpr[31] = 0xBFC05554u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC05554: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05554u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05554: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05558: 24420401 addiu $v0, $v0, 1025 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1025)); PGXP_ALU(0x24420401u, cpu->gpr[2], _pgx1, 0x00000401u); } #ifdef PSX_COSIM cosim_instr(0xBFC05558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0555Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0555C: AE0210A8 sw $v0, 4264($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4264; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0555Cu); return; } g_debug_last_store_pc = 0xBFC0555Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE0210A8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0555Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05560u); #endif /* 0xBFC05560: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05560u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05564u); #endif /* 0xBFC05564: 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, 0xBFC05564u); 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(0xBFC05564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05568: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x10u); #endif /* 0xBFC0556C: 24849808 addiu $a0, $a0, -26616 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26616)); PGXP_ALU(0x24849808u, cpu->gpr[4], _pgx1, 0xFFFF9808u); } #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, 0x0u); #endif /* 0xBFC05570: 0BF013D9 j 0xBFC04F64 */ psx_delay_BFC05570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05574: 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(0xBFC05574u); #endif if (psx_delay_BFC05570) { psx_delay_BFC05570 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } } void OpenBIOS_func_1FC05578(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05578u); int psx_delay_BFC0558C = 0; int psx_delay_BFC055AC = 0; int psx_delay_BFC055B8 = 0; int psx_taken_BFC055B8 = 0; int psx_delay_BFC055DC = 0; int psx_taken_BFC055DC = 0; int psx_delay_BFC055EC = 0; int psx_delay_BFC055F8 = 0; int psx_taken_BFC055F8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05594u: goto label_BFC05594; case 0xBFC055B4u: goto label_BFC055B4; case 0xBFC055C0u: goto label_BFC055C0; case 0xBFC055D8u: goto label_BFC055D8; case 0xBFC055E4u: goto label_BFC055E4; case 0xBFC055F4u: goto label_BFC055F4; default: break; } } label_BFC05578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05578u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05578: 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(0xBFC05578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0557Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0557C: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0557Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC05580: 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, 0xBFC05580u); return; } g_debug_last_store_pc = 0xBFC05580u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05584: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05588: 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, 0xBFC05588u); return; } g_debug_last_store_pc = 0xBFC05588u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0558Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0558C: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC05594u; /* jal link before delay slot */ psx_delay_BFC0558C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05590: 24849810 addiu $a0, $a0, -26608 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26608)); PGXP_ALU(0x24849810u, cpu->gpr[4], _pgx1, 0xFFFF9810u); } #ifdef PSX_COSIM cosim_instr(0xBFC05590u); #endif if (psx_delay_BFC0558C) { psx_delay_BFC0558C = 0; cpu->gpr[31] = 0xBFC05594u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC05594: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05594u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05594u); #endif /* 0xBFC05594: 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, 0xBFC05594u); 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(0xBFC05594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC05598: 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(0xBFC05598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0559Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0559C: 000510C0 sll $v0, $a1, 3 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] << 3u; PGXP_ALU(0x000510C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC0559Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC055A0: 00452023 subu $a0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[2] - cpu->gpr[5]; PGXP_ALU(0x00452023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC055A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC055A4: 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(0xBFC055A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC055A8: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC055A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC055AC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC055B4u; /* jalr link before delay slot */ psx_delay_BFC055AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC055B0: AFA40010 sw $a0, 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, 0xBFC055B0u); return; } g_debug_last_store_pc = 0xBFC055B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC055B0u); #endif if (psx_delay_BFC055AC) { psx_delay_BFC055AC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC055B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0xDu); #endif /* 0xBFC055B4: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC055B8: 1060000A beq $v1, $zero, 0xBFC055E4 */ uint32_t psx_brA_BFC055B8 = cpu->gpr[3]; uint32_t psx_brB_BFC055B8 = cpu->gpr[0]; 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, 0x5u); #endif /* 0xBFC055BC: 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(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, 0xBFC055E4u); goto label_BFC055E4; } #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 /* 0xBFC055C0: 8FA20010 lw $v0, 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, 0xBFC055C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC055C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC055C4: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC055C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC055C8: 24840100 addiu $a0, $a0, 256 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (256)); PGXP_ALU(0x24840100u, cpu->gpr[4], _pgx1, 0x00000100u); } #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, 0x14u); #endif /* 0xBFC055CC: AC820024 sw $v0, 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, 0xBFC055CCu); return; } g_debug_last_store_pc = 0xBFC055CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820024u, _pgxa, cpu->gpr[2]); } #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, 0x18u); #endif /* 0xBFC055D0: AC830020 sw $v1, 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, 0xBFC055D0u); return; } g_debug_last_store_pc = 0xBFC055D0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC830020u, _pgxa, cpu->gpr[3]); } #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, 0x2Cu); #endif /* 0xBFC055D4: 00622821 addu $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(0x00622821u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x38u); #endif /* 0xBFC055D8: 0065202B sltu $a0, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0065202Bu, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x11u); #endif /* 0xBFC055DC: 14800005 bne $a0, $zero, 0xBFC055F4 */ uint32_t psx_brA_BFC055DC = cpu->gpr[4]; uint32_t psx_brB_BFC055DC = cpu->gpr[0]; psx_taken_BFC055DC = (psx_brA_BFC055DC != psx_brB_BFC055DC); psx_delay_BFC055DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC055E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC055E0u); #endif if (psx_delay_BFC055DC) { psx_delay_BFC055DC = 0; if (psx_taken_BFC055DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC055F4u); goto label_BFC055F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC055E4u); } label_BFC055E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC055E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC055E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055E4u); #endif /* 0xBFC055E4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC055E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC055E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC055E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC055EC: 03E00008 jr $ra */ psx_delay_BFC055EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC055F0: 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(0xBFC055F0u); #endif if (psx_delay_BFC055EC) { psx_delay_BFC055EC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC055F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC055F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC055F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC055F4: 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(0xBFC055F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC055F8: 1000FFF7 beq $zero, $zero, 0xBFC055D8 */ uint32_t psx_brA_BFC055F8 = cpu->gpr[0]; uint32_t psx_brB_BFC055F8 = cpu->gpr[0]; psx_taken_BFC055F8 = (psx_brA_BFC055F8 == psx_brB_BFC055F8); psx_delay_BFC055F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC055FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC055FC: 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, 0xBFC055FCu); return; } g_debug_last_store_pc = 0xBFC055FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC60FFE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC055FCu); #endif if (psx_delay_BFC055F8) { psx_delay_BFC055F8 = 0; if (psx_taken_BFC055F8) { #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, 0xBFC05600u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05600u); cpu->pc = 0xBFC05600u; return; /* fallthrough */ } void OpenBIOS_func_1FC05600(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05600u); int psx_delay_BFC0561C = 0; int psx_taken_BFC0561C = 0; int psx_delay_BFC05628 = 0; int psx_delay_BFC05638 = 0; int psx_taken_BFC05638 = 0; int psx_delay_BFC05640 = 0; int psx_taken_BFC05640 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05618u: goto label_BFC05618; case 0xBFC05624u: goto label_BFC05624; case 0xBFC05628u: goto label_BFC05628; case 0xBFC05630u: goto label_BFC05630; case 0xBFC05640u: goto label_BFC05640; default: break; } } label_BFC05600: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05600u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05600: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 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, 0x4u); #endif /* 0xBFC05604: 24420100 addiu $v0, $v0, 256 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (256)); PGXP_ALU(0x24420100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0xBFC05604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05608u); #endif /* 0xBFC05608: 8C430020 lw $v1, 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, 0xBFC05608u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0560Cu); #endif /* 0xBFC0560C: 8C440024 lw $a0, 36($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0560Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C440024u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0560Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05610: 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(0xBFC05610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05614: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05614u); #endif label_BFC05618: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05618u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x38u); #endif /* 0xBFC05618: 0064282B sltu $a1, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0064282Bu, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0561Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0561C: 14A00004 bne $a1, $zero, 0xBFC05630 */ uint32_t psx_brA_BFC0561C = cpu->gpr[5]; uint32_t psx_brB_BFC0561C = cpu->gpr[0]; psx_taken_BFC0561C = (psx_brA_BFC0561C != psx_brB_BFC0561C); psx_delay_BFC0561C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05620: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05620u); #endif if (psx_delay_BFC0561C) { psx_delay_BFC0561C = 0; if (psx_taken_BFC0561C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05630u); goto label_BFC05630; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05624u); } label_BFC05624: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05624u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05624: 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(0xBFC05624u); #endif label_BFC05628: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05628u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05628: 03E00008 jr $ra */ psx_delay_BFC05628 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0562Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0562C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0562Cu); #endif if (psx_delay_BFC05628) { psx_delay_BFC05628 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05630: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05630u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05630u); #endif /* 0xBFC05630: 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, 0xBFC05630u); 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(0xBFC05630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05634: 00000000 nop */ /* nop */ #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, 0x21u); #endif /* 0xBFC05638: 10A0FFFB beq $a1, $zero, 0xBFC05628 */ uint32_t psx_brA_BFC05638 = cpu->gpr[5]; uint32_t psx_brB_BFC05638 = cpu->gpr[0]; psx_taken_BFC05638 = (psx_brA_BFC05638 == psx_brB_BFC05638); psx_delay_BFC05638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0563Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0563C: 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(0xBFC0563Cu); #endif if (psx_delay_BFC05638) { psx_delay_BFC05638 = 0; if (psx_taken_BFC05638) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05628u); goto label_BFC05628; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05640u); } 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: 1000FFF5 beq $zero, $zero, 0xBFC05618 */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05644: 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(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, 0xBFC05618u); goto label_BFC05618; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05648u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05648u); cpu->pc = 0xBFC05648u; return; /* fallthrough */ } void OpenBIOS_func_1FC05648(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05648u); int psx_delay_BFC05654 = 0; int psx_delay_BFC05664 = 0; int psx_taken_BFC05664 = 0; int psx_delay_BFC056AC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0565Cu: goto label_BFC0565C; case 0xBFC0566Cu: goto label_BFC0566C; case 0xBFC056A4u: goto label_BFC056A4; default: break; } } 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, 0x20000000u); #endif /* 0xBFC05648: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x811u); #endif /* 0xBFC0564C: 00805825 or $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(0x00805825u, cpu->gpr[11], _pgx1, _pgx2); } #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, 0xA0000000u); #endif /* 0xBFC05650: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC05654: 0FF01580 jal 0xBFC05600 */ cpu->gpr[31] = 0xBFC0565Cu; /* jal link before delay slot */ psx_delay_BFC05654 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x421u); #endif /* 0xBFC05658: 00A05025 or $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(0x00A05025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05658u); #endif if (psx_delay_BFC05654) { psx_delay_BFC05654 = 0; cpu->gpr[31] = 0xBFC0565Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05600u); cpu->pc = 0xBFC05600u; return; } label_BFC0565C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0565Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0565Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0565Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x205u); #endif /* 0xBFC0565C: 00404825 or $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(0x00404825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0565Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05660: 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(0xBFC05660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC05664: 1123000F beq $t1, $v1, 0xBFC056A4 */ uint32_t psx_brA_BFC05664 = cpu->gpr[9]; uint32_t psx_brB_BFC05664 = cpu->gpr[3]; psx_taken_BFC05664 = (psx_brA_BFC05664 == psx_brB_BFC05664); psx_delay_BFC05664 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05668: 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(0xBFC05668u); #endif if (psx_delay_BFC05664) { psx_delay_BFC05664 = 0; if (psx_taken_BFC05664) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC056A4u); goto label_BFC056A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0566Cu); } label_BFC0566C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0566Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0566Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0566Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0566C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x300u); #endif /* 0xBFC05670: 000940C0 sll $t0, $t1, 3 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[8] = cpu->gpr[9] << 3u; PGXP_ALU(0x000940C0u, cpu->gpr[8], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC05670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05674u); #endif /* 0xBFC05674: 8C430120 lw $v1, 288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05674u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430120u, _pgxa, cpu->gpr[3]); } #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, 0x300u); #endif /* 0xBFC05678: 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(0xBFC05678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0567Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0567C: 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(0xBFC0567Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC05680: 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(0xBFC05680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05684: 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(0xBFC05684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05688: 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, 0xBFC05688u); return; } g_debug_last_store_pc = 0xBFC05688u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0568Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0568C: 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, 0xBFC0568Cu); return; } g_debug_last_store_pc = 0xBFC0568Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAC6B0000u, _pgxa, cpu->gpr[11]); } #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, 0x408u); #endif /* 0xBFC05690: AC6A0008 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05690u); return; } g_debug_last_store_pc = 0xBFC05690u; cpu->write_word(psx_addr, cpu->gpr[10]); } PGXP_STORE(0xAC6A0008u, _pgxa, cpu->gpr[10]); } #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, 0x48u); #endif /* 0xBFC05694: AC66000C sw $a2, 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, 0xBFC05694u); return; } g_debug_last_store_pc = 0xBFC05694u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC66000Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC05698: AC670010 sw $a3, 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, 0xBFC05698u); return; } g_debug_last_store_pc = 0xBFC05698u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC670010u, _pgxa, cpu->gpr[7]); } #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, 0x8u); #endif /* 0xBFC0569C: 3C03F100 lui $v1, 0xF100 */ cpu->gpr[3] = 0xF1000000u; PGXP_ALU(0x3C03F100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0569Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20Cu); #endif /* 0xBFC056A0: 01231025 or $v0, $t1, $v1 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[9] | cpu->gpr[3]; PGXP_ALU(0x01231025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC056A0u); #endif 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 /* 0xBFC056A4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC056A4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC056A8: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC056AC: 03E00008 jr $ra */ psx_delay_BFC056AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC056B0: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC056B0u); #endif if (psx_delay_BFC056AC) { psx_delay_BFC056AC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC056B4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC056B4u); int psx_delay_BFC056D8 = 0; int psx_taken_BFC056D8 = 0; int psx_delay_BFC056E4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC056E0u: goto label_BFC056E0; case 0xBFC056E4u: goto label_BFC056E4; default: break; } } label_BFC056B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC056B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC056B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC056B4: 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(0xBFC056B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC056B8: 000410C0 sll $v0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 3u; PGXP_ALU(0x000410C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC056B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC056BC: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC056BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056C0u); #endif /* 0xBFC056C0: 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, 0xBFC056C0u); 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(0xBFC056C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC056C4: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC056C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC056C8: 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(0xBFC056C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC056CC: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC056CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056D0u); #endif /* 0xBFC056D0: 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, 0xBFC056D0u); 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(0xBFC056D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC056D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC056D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC056D8: 10600002 beq $v1, $zero, 0xBFC056E4 */ uint32_t psx_brA_BFC056D8 = cpu->gpr[3]; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC056DC: 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(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, 0xBFC056E4u); goto label_BFC056E4; } #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, 0xCu); #endif /* 0xBFC056E0: 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, 0xBFC056E0u); return; } g_debug_last_store_pc = 0xBFC056E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #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, 0x80000001u); #endif /* 0xBFC056E4: 03E00008 jr $ra */ psx_delay_BFC056E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC056E8: 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(0xBFC056E8u); #endif if (psx_delay_BFC056E4) { psx_delay_BFC056E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC056EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC056ECu); int psx_delay_BFC05710 = 0; int psx_taken_BFC05710 = 0; int psx_delay_BFC0571C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05718u: goto label_BFC05718; case 0xBFC0571Cu: goto label_BFC0571C; default: break; } } 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, 0x10u); #endif /* 0xBFC056EC: 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(0xBFC056ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC056F0: 000410C0 sll $v0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 3u; PGXP_ALU(0x000410C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC056F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC056F4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC056F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056F8u); #endif /* 0xBFC056F8: 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, 0xBFC056F8u); 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(0xBFC056F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC056FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC056FC: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC056FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05700: 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(0xBFC05700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05704: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05708u); #endif /* 0xBFC05708: 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, 0xBFC05708u); 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(0xBFC05708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0570Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0570C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0570Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05710: 10600002 beq $v1, $zero, 0xBFC0571C */ uint32_t psx_brA_BFC05710 = cpu->gpr[3]; uint32_t psx_brB_BFC05710 = cpu->gpr[0]; psx_taken_BFC05710 = (psx_brA_BFC05710 == psx_brB_BFC05710); psx_delay_BFC05710 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05714: 24031000 addiu $v1, $zero, 4096 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); PGXP_ALU(0x24031000u, cpu->gpr[3], _pgx1, 0x00001000u); } #ifdef PSX_COSIM cosim_instr(0xBFC05714u); #endif if (psx_delay_BFC05710) { psx_delay_BFC05710 = 0; if (psx_taken_BFC05710) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0571Cu); goto label_BFC0571C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05718u); } label_BFC05718: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05718u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05718: 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, 0xBFC05718u); return; } g_debug_last_store_pc = 0xBFC05718u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05718u); #endif 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, 0x80000001u); #endif /* 0xBFC0571C: 03E00008 jr $ra */ 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: 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(0xBFC05720u); #endif if (psx_delay_BFC0571C) { psx_delay_BFC0571C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05724(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05724u); int psx_delay_BFC05744 = 0; 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, 0x10u); #endif /* 0xBFC05724: 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(0xBFC05724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05728: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0572Cu); #endif /* 0xBFC0572C: 8C430120 lw $v1, 288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0572Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430120u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0572Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05730: 000410C0 sll $v0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 3u; PGXP_ALU(0x000410C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC05730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05734: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC05738: 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(0xBFC05738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0573Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0573C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC05740: 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, 0xBFC05740u); return; } g_debug_last_store_pc = 0xBFC05740u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } #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, 0x80000001u); #endif /* 0xBFC05744: 03E00008 jr $ra */ psx_delay_BFC05744 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05748: 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(0xBFC05748u); #endif if (psx_delay_BFC05744) { psx_delay_BFC05744 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0574C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0574Cu); int psx_delay_BFC05770 = 0; int psx_taken_BFC05770 = 0; int psx_delay_BFC05784 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05778u: goto label_BFC05778; case 0xBFC05784u: goto label_BFC05784; default: break; } } 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, 0x10u); #endif /* 0xBFC0574C: 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(0xBFC0574Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05750: 000410C0 sll $v0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 3u; PGXP_ALU(0x000410C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC05750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05754: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x14u); #endif /* 0xBFC05758: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0575Cu); #endif /* 0xBFC0575C: 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, 0xBFC0575Cu); 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(0xBFC0575Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05760: 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(0xBFC05760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05764: 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(0xBFC05764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05768u); #endif /* 0xBFC05768: 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, 0xBFC05768u); 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(0xBFC05768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0576Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0576C: 24044000 addiu $a0, $zero, 16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); PGXP_ALU(0x24044000u, cpu->gpr[4], _pgx1, 0x00004000u); } #ifdef PSX_COSIM cosim_instr(0xBFC0576Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC05770: 14A40004 bne $a1, $a0, 0xBFC05784 */ uint32_t psx_brA_BFC05770 = cpu->gpr[5]; uint32_t psx_brB_BFC05770 = cpu->gpr[4]; psx_taken_BFC05770 = (psx_brA_BFC05770 != psx_brB_BFC05770); psx_delay_BFC05770 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05774: 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(0xBFC05774u); #endif if (psx_delay_BFC05770) { psx_delay_BFC05770 = 0; if (psx_taken_BFC05770) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05784u); goto label_BFC05784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05778u); } label_BFC05778: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05778u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05778: 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(0xBFC05778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0577Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0577C: 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, 0xBFC0577Cu); return; } g_debug_last_store_pc = 0xBFC0577Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0577Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05780: 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(0xBFC05780u); #endif 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, 0x80000001u); #endif /* 0xBFC05784: 03E00008 jr $ra */ psx_delay_BFC05784 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05788: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05788u); #endif if (psx_delay_BFC05784) { psx_delay_BFC05784 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0578C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0578Cu); int psx_delay_BFC057B0 = 0; int psx_taken_BFC057B0 = 0; int psx_delay_BFC057B8 = 0; int psx_taken_BFC057B8 = 0; int psx_delay_BFC057C8 = 0; int psx_taken_BFC057C8 = 0; int psx_delay_BFC057D8 = 0; int psx_delay_BFC057E0 = 0; int psx_delay_BFC057E8 = 0; int psx_taken_BFC057E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC057B8u: goto label_BFC057B8; case 0xBFC057C0u: goto label_BFC057C0; case 0xBFC057D0u: goto label_BFC057D0; case 0xBFC057E0u: goto label_BFC057E0; case 0xBFC057E8u: goto label_BFC057E8; default: break; } } 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, 0x10u); #endif /* 0xBFC0578C: 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(0xBFC0578Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05790: 000418C0 sll $v1, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] << 3u; PGXP_ALU(0x000418C0u, cpu->gpr[3], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0xBFC05790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05794: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05798: 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(0xBFC05798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0579Cu); #endif /* 0xBFC0579C: 8C420120 lw $v0, 288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0579Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420120u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0579Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC057A0: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC057A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC057A4: 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(0xBFC057A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057A8u); #endif /* 0xBFC057A8: 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, 0xBFC057A8u); 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(0xBFC057A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC057AC: 24044000 addiu $a0, $zero, 16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); PGXP_ALU(0x24044000u, cpu->gpr[4], _pgx1, 0x00004000u); } #ifdef PSX_COSIM cosim_instr(0xBFC057ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC057B0: 10640007 beq $v1, $a0, 0xBFC057D0 */ uint32_t psx_brA_BFC057B0 = cpu->gpr[3]; uint32_t psx_brB_BFC057B0 = cpu->gpr[4]; psx_taken_BFC057B0 = (psx_brA_BFC057B0 == psx_brB_BFC057B0); psx_delay_BFC057B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC057B4: 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(0xBFC057B4u); #endif if (psx_delay_BFC057B0) { psx_delay_BFC057B0 = 0; if (psx_taken_BFC057B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057D0u); goto label_BFC057D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057B8u); } label_BFC057B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC057B8: 14640009 bne $v1, $a0, 0xBFC057E0 */ uint32_t psx_brA_BFC057B8 = cpu->gpr[3]; uint32_t psx_brB_BFC057B8 = cpu->gpr[4]; psx_taken_BFC057B8 = (psx_brA_BFC057B8 != psx_brB_BFC057B8); psx_delay_BFC057B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC057BC: 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(0xBFC057BCu); #endif if (psx_delay_BFC057B8) { psx_delay_BFC057B8 = 0; if (psx_taken_BFC057B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057E0u); goto label_BFC057E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057C0u); } label_BFC057C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057C0u); #endif /* 0xBFC057C0: 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, 0xBFC057C0u); 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(0xBFC057C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC057C4: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC057C8: 14830007 bne $a0, $v1, 0xBFC057E8 */ uint32_t psx_brA_BFC057C8 = cpu->gpr[4]; uint32_t psx_brB_BFC057C8 = cpu->gpr[3]; psx_taken_BFC057C8 = (psx_brA_BFC057C8 != psx_brB_BFC057C8); psx_delay_BFC057C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC057CC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC057CCu); #endif if (psx_delay_BFC057C8) { psx_delay_BFC057C8 = 0; if (psx_taken_BFC057C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057E8u); goto label_BFC057E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057D0u); } label_BFC057D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC057D0: 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(0xBFC057D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC057D4: 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, 0xBFC057D4u); return; } g_debug_last_store_pc = 0xBFC057D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC057D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC057D8: 03E00008 jr $ra */ psx_delay_BFC057D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC057DC: 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(0xBFC057DCu); #endif if (psx_delay_BFC057D8) { psx_delay_BFC057D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC057E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC057E0: 03E00008 jr $ra */ psx_delay_BFC057E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC057E4: 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(0xBFC057E4u); #endif if (psx_delay_BFC057E0) { psx_delay_BFC057E0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC057E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC057E8: 1000FFF5 beq $zero, $zero, 0xBFC057C0 */ uint32_t psx_brA_BFC057E8 = cpu->gpr[0]; uint32_t psx_brB_BFC057E8 = cpu->gpr[0]; psx_taken_BFC057E8 = (psx_brA_BFC057E8 == psx_brB_BFC057E8); psx_delay_BFC057E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC057EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC057ECu); #endif if (psx_delay_BFC057E8) { psx_delay_BFC057E8 = 0; if (psx_taken_BFC057E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057C0u); goto label_BFC057C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057F0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057F0u); cpu->pc = 0xBFC057F0u; return; /* fallthrough */ } void OpenBIOS_func_1FC057F0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC057F0u); int psx_delay_BFC05838 = 0; int psx_taken_BFC05838 = 0; int psx_delay_BFC05850 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05818u: goto label_BFC05818; case 0xBFC05840u: goto label_BFC05840; default: break; } } label_BFC057F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC057F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC057F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC057F0: 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(0xBFC057F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC057F4: 40806000 mtc0 $zero, cop0[12] */ cpu->cop0[12] = cpu->gpr[0]; #ifdef PSX_COSIM cosim_instr(0xBFC057F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC057F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC057F8: 3C0DFFFE lui $t5, 0xFFFE */ cpu->gpr[13] = 0xFFFE0000u; PGXP_ALU(0x3C0DFFFEu, cpu->gpr[13], 0u, 0u); #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, 0x400u); #endif /* 0xBFC057FC: 3C0A0001 lui $t2, 0x1 */ cpu->gpr[10] = 0x00010000u; PGXP_ALU(0x3C0A0001u, cpu->gpr[10], 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, 0x400u); #endif /* 0xBFC05800: 354AE90C ori $t2, $t2, 0xE90C */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] | 0xE90Cu; PGXP_ALU(0x354AE90Cu, cpu->gpr[10], _pgx1, 0xE90Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC05800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2400u); #endif /* 0xBFC05804: ADAA0130 sw $t2, 304($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05804u); return; } g_debug_last_store_pc = 0xBFC05804u; cpu->write_word(psx_addr, cpu->gpr[10]); } PGXP_STORE(0xADAA0130u, _pgxa, cpu->gpr[10]); } #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, 0x200u); #endif /* 0xBFC05808: 3C090001 lui $t1, 0x1 */ cpu->gpr[9] = 0x00010000u; PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); #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, 0x0u); #endif /* 0xBFC0580C: 40896000 mtc0 $t1, cop0[12] */ cpu->cop0[12] = cpu->gpr[9]; #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, 0x801u); #endif /* 0xBFC05810: 240B0000 addiu $t3, $zero, 0 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (0)); PGXP_ALU(0x240B0000u, cpu->gpr[11], _pgx1, 0x00000000u); } #ifdef PSX_COSIM cosim_instr(0xBFC05810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC05814: 240C0F80 addiu $t4, $zero, 3968 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (3968)); PGXP_ALU(0x240C0F80u, cpu->gpr[12], _pgx1, 0x00000F80u); } #ifdef PSX_COSIM cosim_instr(0xBFC05814u); #endif label_BFC05818: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05818u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC05818: 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, 0xBFC05818u); return; } g_debug_last_store_pc = 0xBFC05818u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600000u, _pgxa, cpu->gpr[0]); } #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, 0x801u); #endif /* 0xBFC0581C: AD600010 sw $zero, 16($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0581Cu); return; } g_debug_last_store_pc = 0xBFC0581Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600010u, _pgxa, cpu->gpr[0]); } #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, 0x801u); #endif /* 0xBFC05820: AD600020 sw $zero, 32($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05820u); return; } g_debug_last_store_pc = 0xBFC05820u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600020u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC05824: AD600030 sw $zero, 48($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 48; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05824u); return; } g_debug_last_store_pc = 0xBFC05824u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600030u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC05828: AD600040 sw $zero, 64($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05828u); return; } g_debug_last_store_pc = 0xBFC05828u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0582Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0582C: AD600050 sw $zero, 80($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0582Cu); return; } g_debug_last_store_pc = 0xBFC0582Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600050u, _pgxa, cpu->gpr[0]); } #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, 0x801u); #endif /* 0xBFC05830: AD600060 sw $zero, 96($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05830u); return; } g_debug_last_store_pc = 0xBFC05830u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600060u, _pgxa, cpu->gpr[0]); } #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, 0x801u); #endif /* 0xBFC05834: AD600070 sw $zero, 112($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05834u); return; } g_debug_last_store_pc = 0xBFC05834u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD600070u, _pgxa, cpu->gpr[0]); } #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, 0x1800u); #endif /* 0xBFC05838: 156CFFF7 bne $t3, $t4, 0xBFC05818 */ uint32_t psx_brA_BFC05838 = cpu->gpr[11]; uint32_t psx_brB_BFC05838 = cpu->gpr[12]; psx_taken_BFC05838 = (psx_brA_BFC05838 != psx_brB_BFC05838); psx_delay_BFC05838 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0583Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0583C: 256B0080 addiu $t3, $t3, 128 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (128)); PGXP_ALU(0x256B0080u, cpu->gpr[11], _pgx1, 0x00000080u); } #ifdef PSX_COSIM cosim_instr(0xBFC0583Cu); #endif if (psx_delay_BFC05838) { psx_delay_BFC05838 = 0; if (psx_taken_BFC05838) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05818u); goto label_BFC05818; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05840u); } label_BFC05840: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05840u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC05840: 40806000 mtc0 $zero, cop0[12] */ cpu->cop0[12] = cpu->gpr[0]; #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, 0x400u); #endif /* 0xBFC05844: 254A007C addiu $t2, $t2, 124 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (124)); PGXP_ALU(0x254A007Cu, cpu->gpr[10], _pgx1, 0x0000007Cu); } #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, 0x2400u); #endif /* 0xBFC05848: ADAA0130 sw $t2, 304($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[13] + (304)); 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[10]); } PGXP_STORE(0xADAA0130u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0xBFC05848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0584Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0584C: 40886000 mtc0 $t0, cop0[12] */ cpu->cop0[12] = cpu->gpr[8]; #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, 0x80000001u); #endif /* 0xBFC05850: 03E00008 jr $ra */ psx_delay_BFC05850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05854: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05854u); #endif if (psx_delay_BFC05850) { psx_delay_BFC05850 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05858(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05858u); int psx_delay_BFC05860 = 0; int psx_taken_BFC05860 = 0; int psx_delay_BFC05870 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05868u: goto label_BFC05868; case 0xBFC05870u: goto label_BFC05870; default: break; } } label_BFC05858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05858: 2483FF9F addiu $v1, $a0, -97 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] + (-97)); PGXP_ALU(0x2483FF9Fu, cpu->gpr[3], _pgx1, 0xFFFFFF9Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC05858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0585Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0585C: 2C63001A sltiu $v1, $v1, 26 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C63001Au, cpu->gpr[3], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0xBFC0585Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05860: 10600003 beq $v1, $zero, 0xBFC05870 */ uint32_t psx_brA_BFC05860 = cpu->gpr[3]; uint32_t psx_brB_BFC05860 = cpu->gpr[0]; psx_taken_BFC05860 = (psx_brA_BFC05860 == psx_brB_BFC05860); psx_delay_BFC05860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC05864: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05864u); #endif if (psx_delay_BFC05860) { psx_delay_BFC05860 = 0; if (psx_taken_BFC05860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05870u); goto label_BFC05870; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05868u); } label_BFC05868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05868u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05868: 2403FFDF addiu $v1, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2403FFDFu, cpu->gpr[3], _pgx1, 0xFFFFFFDFu); } #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, 0x1Cu); #endif /* 0xBFC0586C: 00831024 and $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(0x00831024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0586Cu); #endif label_BFC05870: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05870u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05870: 03E00008 jr $ra */ psx_delay_BFC05870 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05874: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05874u); #endif if (psx_delay_BFC05870) { psx_delay_BFC05870 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05878(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05878u); int psx_delay_BFC05880 = 0; int psx_taken_BFC05880 = 0; int psx_delay_BFC0588C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05888u: goto label_BFC05888; case 0xBFC0588Cu: goto label_BFC0588C; default: break; } } label_BFC05878: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05878u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05878: 2483FFBF addiu $v1, $a0, -65 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] + (-65)); PGXP_ALU(0x2483FFBFu, cpu->gpr[3], _pgx1, 0xFFFFFFBFu); } #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, 0x8u); #endif /* 0xBFC0587C: 2C63001A sltiu $v1, $v1, 26 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C63001Au, cpu->gpr[3], _pgx1, 0x001Au); } #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, 0x9u); #endif /* 0xBFC05880: 10600002 beq $v1, $zero, 0xBFC0588C */ uint32_t psx_brA_BFC05880 = cpu->gpr[3]; uint32_t psx_brB_BFC05880 = cpu->gpr[0]; psx_taken_BFC05880 = (psx_brA_BFC05880 == psx_brB_BFC05880); psx_delay_BFC05880 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC05884: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05884u); #endif if (psx_delay_BFC05880) { psx_delay_BFC05880 = 0; if (psx_taken_BFC05880) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0588Cu); goto label_BFC0588C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05888u); } 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, 0x14u); #endif /* 0xBFC05888: 34820020 ori $v0, $a0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] | 0x20u; PGXP_ALU(0x34820020u, cpu->gpr[2], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0xBFC05888u); #endif label_BFC0588C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0588Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0588Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0588Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0588C: 03E00008 jr $ra */ psx_delay_BFC0588C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05890: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05890u); #endif if (psx_delay_BFC0588C) { psx_delay_BFC0588C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05894(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05894u); int psx_delay_BFC0589C = 0; int psx_taken_BFC0589C = 0; int psx_delay_BFC058A8 = 0; int psx_delay_BFC058B8 = 0; int psx_taken_BFC058B8 = 0; int psx_delay_BFC058C0 = 0; int psx_taken_BFC058C0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0589Cu: goto label_BFC0589C; case 0xBFC058A4u: goto label_BFC058A4; case 0xBFC058A8u: goto label_BFC058A8; case 0xBFC058B0u: goto label_BFC058B0; case 0xBFC058C0u: goto label_BFC058C0; default: break; } } 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, 0x15u); #endif /* 0xBFC05894: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC05898: 00863021 addu $a2, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05898u); #endif 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, 0x44u); #endif /* 0xBFC0589C: 14460004 bne $v0, $a2, 0xBFC058B0 */ uint32_t psx_brA_BFC0589C = cpu->gpr[2]; uint32_t psx_brB_BFC0589C = cpu->gpr[6]; psx_taken_BFC0589C = (psx_brA_BFC0589C != psx_brB_BFC0589C); psx_delay_BFC0589C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC058A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC058A0u); #endif if (psx_delay_BFC0589C) { psx_delay_BFC0589C = 0; if (psx_taken_BFC0589C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058B0u); goto label_BFC058B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058A4u); } label_BFC058A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC058A4: 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(0xBFC058A4u); #endif label_BFC058A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC058A8: 03E00008 jr $ra */ psx_delay_BFC058A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC058AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC058ACu); #endif if (psx_delay_BFC058A8) { psx_delay_BFC058A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC058B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058B0u); #endif /* 0xBFC058B0: 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(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, 0x28u); #endif /* 0xBFC058B8: 1065FFFB beq $v1, $a1, 0xBFC058A8 */ uint32_t psx_brA_BFC058B8 = cpu->gpr[3]; uint32_t psx_brB_BFC058B8 = cpu->gpr[5]; 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, 0x1u); #endif /* 0xBFC058BC: 00000000 nop */ /* nop */ #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, 0xBFC058A8u); goto label_BFC058A8; } #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, 0x1u); #endif /* 0xBFC058C0: 1000FFF6 beq $zero, $zero, 0xBFC0589C */ uint32_t psx_brA_BFC058C0 = cpu->gpr[0]; uint32_t psx_brB_BFC058C0 = cpu->gpr[0]; psx_taken_BFC058C0 = (psx_brA_BFC058C0 == psx_brB_BFC058C0); psx_delay_BFC058C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC058C4: 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(0xBFC058C4u); #endif if (psx_delay_BFC058C0) { psx_delay_BFC058C0 = 0; if (psx_taken_BFC058C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0589Cu); goto label_BFC0589C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058C8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058C8u); cpu->pc = 0xBFC058C8u; return; /* fallthrough */ } void OpenBIOS_func_1FC058C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC058C8u); int psx_delay_BFC058D8 = 0; int psx_taken_BFC058D8 = 0; int psx_delay_BFC058E8 = 0; int psx_taken_BFC058E8 = 0; int psx_delay_BFC058F0 = 0; int psx_delay_BFC058F8 = 0; int psx_taken_BFC058F8 = 0; int psx_delay_BFC05904 = 0; int psx_taken_BFC05904 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC058D0u: goto label_BFC058D0; case 0xBFC058E0u: goto label_BFC058E0; case 0xBFC058F0u: goto label_BFC058F0; case 0xBFC058F8u: goto label_BFC058F8; case 0xBFC05900u: goto label_BFC05900; default: break; } } label_BFC058C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC058C8: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x19u); #endif /* 0xBFC058CC: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC058CCu); #endif label_BFC058D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058D0u); #endif /* 0xBFC058D0: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC058D4: 00000000 nop */ /* nop */ #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, 0x11u); #endif /* 0xBFC058D8: 14800007 bne $a0, $zero, 0xBFC058F8 */ uint32_t psx_brA_BFC058D8 = cpu->gpr[4]; uint32_t psx_brB_BFC058D8 = cpu->gpr[0]; psx_taken_BFC058D8 = (psx_brA_BFC058D8 != psx_brB_BFC058D8); psx_delay_BFC058D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC058DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC058DCu); #endif if (psx_delay_BFC058D8) { psx_delay_BFC058D8 = 0; if (psx_taken_BFC058D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058F8u); goto label_BFC058F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058E0u); } label_BFC058E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058E0u); #endif /* 0xBFC058E0: 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(0xBFC058E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC058E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC058E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC058E8: 14800005 bne $a0, $zero, 0xBFC05900 */ uint32_t psx_brA_BFC058E8 = cpu->gpr[4]; uint32_t psx_brB_BFC058E8 = cpu->gpr[0]; psx_taken_BFC058E8 = (psx_brA_BFC058E8 != psx_brB_BFC058E8); psx_delay_BFC058E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC058EC: 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(0xBFC058ECu); #endif if (psx_delay_BFC058E8) { psx_delay_BFC058E8 = 0; if (psx_taken_BFC058E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05900u); goto label_BFC05900; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058F0u); } label_BFC058F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC058F0: 03E00008 jr $ra */ psx_delay_BFC058F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC058F4: A0600000 sb $zero, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC058F4u; 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(0xBFC058F4u); #endif if (psx_delay_BFC058F0) { psx_delay_BFC058F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC058F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC058F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC058F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC058F8: 1000FFF5 beq $zero, $zero, 0xBFC058D0 */ uint32_t psx_brA_BFC058F8 = cpu->gpr[0]; uint32_t psx_brB_BFC058F8 = cpu->gpr[0]; psx_taken_BFC058F8 = (psx_brA_BFC058F8 == psx_brB_BFC058F8); psx_delay_BFC058F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC058FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC058FC: 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(0xBFC058FCu); #endif if (psx_delay_BFC058F8) { psx_delay_BFC058F8 = 0; if (psx_taken_BFC058F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058D0u); goto label_BFC058D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05900u); } label_BFC05900: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05900u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05900: 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(0xBFC05900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05904: 1000FFF6 beq $zero, $zero, 0xBFC058E0 */ uint32_t psx_brA_BFC05904 = cpu->gpr[0]; uint32_t psx_brB_BFC05904 = cpu->gpr[0]; psx_taken_BFC05904 = (psx_brA_BFC05904 == psx_brB_BFC05904); psx_delay_BFC05904 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05908: A064FFFF sb $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05908u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA064FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05908u); #endif if (psx_delay_BFC05904) { psx_delay_BFC05904 = 0; if (psx_taken_BFC05904) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC058E0u); goto label_BFC058E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0590Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0590Cu); cpu->pc = 0xBFC0590Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0590C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0590Cu); int psx_delay_BFC05920 = 0; int psx_taken_BFC05920 = 0; int psx_delay_BFC05928 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05914u: goto label_BFC05914; case 0xBFC05928u: goto label_BFC05928; default: break; } } label_BFC0590C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0590Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0590Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0590Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0590C: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x19u); #endif /* 0xBFC05910: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05910u); #endif label_BFC05914: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05914u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05914u); #endif /* 0xBFC05914: 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(0xBFC05914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC05918: 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(0xBFC05918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0591Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0591C: 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(0xBFC0591Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC05920: 1480FFFC bne $a0, $zero, 0xBFC05914 */ uint32_t psx_brA_BFC05920 = cpu->gpr[4]; uint32_t psx_brB_BFC05920 = cpu->gpr[0]; psx_taken_BFC05920 = (psx_brA_BFC05920 != psx_brB_BFC05920); psx_delay_BFC05920 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05924: A064FFFF sb $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05924u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA064FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05924u); #endif if (psx_delay_BFC05920) { psx_delay_BFC05920 = 0; if (psx_taken_BFC05920) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05914u); goto label_BFC05914; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05928u); } label_BFC05928: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05928u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05928: 03E00008 jr $ra */ psx_delay_BFC05928 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0592Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0592C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0592Cu); #endif if (psx_delay_BFC05928) { psx_delay_BFC05928 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05930(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05930u); int psx_delay_BFC05940 = 0; int psx_taken_BFC05940 = 0; int psx_delay_BFC05948 = 0; int psx_delay_BFC05950 = 0; int psx_taken_BFC05950 = 0; int psx_delay_BFC05964 = 0; int psx_taken_BFC05964 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05940u: goto label_BFC05940; case 0xBFC05948u: goto label_BFC05948; case 0xBFC05950u: goto label_BFC05950; case 0xBFC05958u: goto label_BFC05958; case 0xBFC05964u: goto label_BFC05964; default: break; } } 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, 0x15u); #endif /* 0xBFC05930: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x50u); #endif /* 0xBFC05934: 00863021 addu $a2, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC05938: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0593Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0593C: 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(0xBFC0593Cu); #endif label_BFC05940: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05940u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC05940: 14660003 bne $v1, $a2, 0xBFC05950 */ uint32_t psx_brA_BFC05940 = cpu->gpr[3]; uint32_t psx_brB_BFC05940 = cpu->gpr[6]; psx_taken_BFC05940 = (psx_brA_BFC05940 != psx_brB_BFC05940); psx_delay_BFC05940 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05944: 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(0xBFC05944u); #endif if (psx_delay_BFC05940) { psx_delay_BFC05940 = 0; if (psx_taken_BFC05940) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05950u); goto label_BFC05950; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05948u); } label_BFC05948: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05948u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05948: 03E00008 jr $ra */ psx_delay_BFC05948 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0594Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0594C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0594Cu); #endif if (psx_delay_BFC05948) { psx_delay_BFC05948 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05950: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05950u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC05950: 14E00004 bne $a3, $zero, 0xBFC05964 */ uint32_t psx_brA_BFC05950 = cpu->gpr[7]; uint32_t psx_brB_BFC05950 = cpu->gpr[0]; psx_taken_BFC05950 = (psx_brA_BFC05950 != psx_brB_BFC05950); psx_delay_BFC05950 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC05954: 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(0xBFC05954u); #endif if (psx_delay_BFC05950) { psx_delay_BFC05950 = 0; if (psx_taken_BFC05950) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05964u); goto label_BFC05964; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05958u); } label_BFC05958: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05958u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05958u); #endif /* 0xBFC05958: 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(0xBFC05958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0595Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0595C: 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(0xBFC0595Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC05960: 2C870001 sltiu $a3, $a0, 1 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2C870001u, cpu->gpr[7], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC05960u); #endif 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, 0x1u); #endif /* 0xBFC05964: 1000FFF6 beq $zero, $zero, 0xBFC05940 */ uint32_t psx_brA_BFC05964 = cpu->gpr[0]; uint32_t psx_brB_BFC05964 = cpu->gpr[0]; psx_taken_BFC05964 = (psx_brA_BFC05964 == psx_brB_BFC05964); psx_delay_BFC05964 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05968: A064FFFF sb $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05968u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA064FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05968u); #endif if (psx_delay_BFC05964) { psx_delay_BFC05964 = 0; if (psx_taken_BFC05964) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05940u); goto label_BFC05940; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0596Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0596Cu); cpu->pc = 0xBFC0596Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0596C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0596Cu); int psx_delay_BFC05978 = 0; int psx_taken_BFC05978 = 0; int psx_delay_BFC05984 = 0; int psx_delay_BFC0598C = 0; int psx_taken_BFC0598C = 0; int psx_delay_BFC05994 = 0; int psx_taken_BFC05994 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05970u: goto label_BFC05970; case 0xBFC05980u: goto label_BFC05980; case 0xBFC05984u: goto label_BFC05984; case 0xBFC0598Cu: goto label_BFC0598C; case 0xBFC05994u: goto label_BFC05994; default: break; } } label_BFC0596C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0596Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0596Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0596Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0596C: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0596Cu); #endif 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 /* 0xBFC05970: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05974: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC05978: 14600004 bne $v1, $zero, 0xBFC0598C */ uint32_t psx_brA_BFC05978 = cpu->gpr[3]; uint32_t psx_brB_BFC05978 = cpu->gpr[0]; psx_taken_BFC05978 = (psx_brA_BFC05978 != psx_brB_BFC05978); psx_delay_BFC05978 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0597Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0597C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0597Cu); #endif if (psx_delay_BFC05978) { psx_delay_BFC05978 = 0; if (psx_taken_BFC05978) { #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, 0xBFC05980u); } label_BFC05980: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05980u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05980: 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(0xBFC05980u); #endif 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, 0x80000001u); #endif /* 0xBFC05984: 03E00008 jr $ra */ 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; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x28u); #endif /* 0xBFC0598C: 1065FFFD beq $v1, $a1, 0xBFC05984 */ uint32_t psx_brA_BFC0598C = cpu->gpr[3]; uint32_t psx_brB_BFC0598C = cpu->gpr[5]; psx_taken_BFC0598C = (psx_brA_BFC0598C == psx_brB_BFC0598C); 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; if (psx_taken_BFC0598C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05984u); goto label_BFC05984; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05994u); } 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: 1000FFF6 beq $zero, $zero, 0xBFC05970 */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05998: 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(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, 0xBFC05970u); goto label_BFC05970; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0599Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0599Cu); cpu->pc = 0xBFC0599Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0599C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0599Cu); int psx_delay_BFC059A8 = 0; int psx_taken_BFC059A8 = 0; int psx_delay_BFC059B0 = 0; int psx_delay_BFC059B8 = 0; int psx_taken_BFC059B8 = 0; int psx_delay_BFC059C4 = 0; int psx_taken_BFC059C4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC059A0u: goto label_BFC059A0; case 0xBFC059B0u: goto label_BFC059B0; case 0xBFC059B8u: goto label_BFC059B8; case 0xBFC059C0u: goto label_BFC059C0; case 0xBFC059C4u: goto label_BFC059C4; default: break; } } 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, 0x5u); #endif /* 0xBFC0599C: 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(0xBFC0599Cu); #endif label_BFC059A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059A0u); #endif /* 0xBFC059A0: 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(0xBFC059A0u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC059A8: 14600003 bne $v1, $zero, 0xBFC059B8 */ uint32_t psx_brA_BFC059A8 = cpu->gpr[3]; uint32_t psx_brB_BFC059A8 = cpu->gpr[0]; psx_taken_BFC059A8 = (psx_brA_BFC059A8 != psx_brB_BFC059A8); psx_delay_BFC059A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059ACu); #endif if (psx_delay_BFC059A8) { psx_delay_BFC059A8 = 0; if (psx_taken_BFC059A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059B8u); goto label_BFC059B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059B0u); } label_BFC059B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC059B0: 03E00008 jr $ra */ psx_delay_BFC059B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059B4u); #endif if (psx_delay_BFC059B0) { psx_delay_BFC059B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC059B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC059B8: 14650002 bne $v1, $a1, 0xBFC059C4 */ uint32_t psx_brA_BFC059B8 = cpu->gpr[3]; uint32_t psx_brB_BFC059B8 = cpu->gpr[5]; psx_taken_BFC059B8 = (psx_brA_BFC059B8 != psx_brB_BFC059B8); psx_delay_BFC059B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059BCu); #endif if (psx_delay_BFC059B8) { psx_delay_BFC059B8 = 0; if (psx_taken_BFC059B8) { #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, 0xBFC059C0u); } label_BFC059C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC059C0: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC059C0u); #endif 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, 0x1u); #endif /* 0xBFC059C4: 1000FFF6 beq $zero, $zero, 0xBFC059A0 */ uint32_t psx_brA_BFC059C4 = cpu->gpr[0]; uint32_t psx_brB_BFC059C4 = cpu->gpr[0]; psx_taken_BFC059C4 = (psx_brA_BFC059C4 == psx_brB_BFC059C4); psx_delay_BFC059C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC059C8: 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(0xBFC059C8u); #endif if (psx_delay_BFC059C4) { psx_delay_BFC059C4 = 0; if (psx_taken_BFC059C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059A0u); goto label_BFC059A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059CCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059CCu); cpu->pc = 0xBFC059CCu; return; /* fallthrough */ } void OpenBIOS_func_1FC059CC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC059CCu); int psx_delay_BFC059DC = 0; int psx_taken_BFC059DC = 0; int psx_delay_BFC059E4 = 0; int psx_delay_BFC059EC = 0; int psx_taken_BFC059EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC059D0u: goto label_BFC059D0; case 0xBFC059E4u: goto label_BFC059E4; case 0xBFC059ECu: goto label_BFC059EC; default: break; } } 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, 0x5u); #endif /* 0xBFC059CC: 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(0xBFC059CCu); #endif label_BFC059D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC059D0: 00821821 addu $v1, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC059D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059D4u); #endif /* 0xBFC059D4: 80630000 lb $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x80630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC059D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC059DC: 14600003 bne $v1, $zero, 0xBFC059EC */ uint32_t psx_brA_BFC059DC = cpu->gpr[3]; uint32_t psx_brB_BFC059DC = cpu->gpr[0]; psx_taken_BFC059DC = (psx_brA_BFC059DC != psx_brB_BFC059DC); psx_delay_BFC059DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059E0u); #endif if (psx_delay_BFC059DC) { psx_delay_BFC059DC = 0; if (psx_taken_BFC059DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059ECu); goto label_BFC059EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059E4u); } label_BFC059E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC059E4: 03E00008 jr $ra */ psx_delay_BFC059E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC059E8u); #endif if (psx_delay_BFC059E4) { psx_delay_BFC059E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC059EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC059ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC059EC: 1000FFF8 beq $zero, $zero, 0xBFC059D0 */ uint32_t psx_brA_BFC059EC = cpu->gpr[0]; uint32_t psx_brB_BFC059EC = cpu->gpr[0]; psx_taken_BFC059EC = (psx_brA_BFC059EC == psx_brB_BFC059EC); psx_delay_BFC059EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC059F0: 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(0xBFC059F0u); #endif if (psx_delay_BFC059EC) { psx_delay_BFC059EC = 0; if (psx_taken_BFC059EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059D0u); goto label_BFC059D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059F4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059F4u); cpu->pc = 0xBFC059F4u; return; /* fallthrough */ } void OpenBIOS_func_1FC059F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC059F4u); int psx_delay_BFC05A04 = 0; int psx_taken_BFC05A04 = 0; int psx_delay_BFC05A10 = 0; int psx_taken_BFC05A10 = 0; int psx_delay_BFC05A20 = 0; int psx_taken_BFC05A20 = 0; int psx_delay_BFC05A28 = 0; int psx_delay_BFC05A30 = 0; int psx_taken_BFC05A30 = 0; int psx_delay_BFC05A3C = 0; int psx_taken_BFC05A3C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC059FCu: goto label_BFC059FC; case 0xBFC05A0Cu: goto label_BFC05A0C; case 0xBFC05A10u: goto label_BFC05A10; case 0xBFC05A18u: goto label_BFC05A18; case 0xBFC05A28u: goto label_BFC05A28; case 0xBFC05A30u: goto label_BFC05A30; case 0xBFC05A38u: goto label_BFC05A38; default: break; } } label_BFC059F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC059F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC059F4: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC059F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC059F8: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC059F8u); #endif label_BFC059FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC059FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC059FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC059FCu); #endif /* 0xBFC059FC: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC059FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC05A04: 1480000A bne $a0, $zero, 0xBFC05A30 */ uint32_t psx_brA_BFC05A04 = cpu->gpr[4]; uint32_t psx_brB_BFC05A04 = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC05A08: 00000000 nop */ /* nop */ #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, 0xBFC05A30u); goto label_BFC05A30; } #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, 0x48u); #endif /* 0xBFC05A0C: 00663021 addu $a2, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00663021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05A0Cu); #endif label_BFC05A10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC05A10: 10660005 beq $v1, $a2, 0xBFC05A28 */ uint32_t psx_brA_BFC05A10 = cpu->gpr[3]; uint32_t psx_brB_BFC05A10 = cpu->gpr[6]; psx_taken_BFC05A10 = (psx_brA_BFC05A10 == psx_brB_BFC05A10); psx_delay_BFC05A10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05A14u); #endif if (psx_delay_BFC05A10) { psx_delay_BFC05A10 = 0; if (psx_taken_BFC05A10) { #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, 0xBFC05A18u); } label_BFC05A18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A18u); #endif /* 0xBFC05A18: 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(0xBFC05A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC05A20: 14800005 bne $a0, $zero, 0xBFC05A38 */ uint32_t psx_brA_BFC05A20 = cpu->gpr[4]; uint32_t psx_brB_BFC05A20 = cpu->gpr[0]; psx_taken_BFC05A20 = (psx_brA_BFC05A20 != psx_brB_BFC05A20); psx_delay_BFC05A20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC05A24: 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(0xBFC05A24u); #endif if (psx_delay_BFC05A20) { psx_delay_BFC05A20 = 0; if (psx_taken_BFC05A20) { #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, 0xBFC05A28u); } 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, 0x80000001u); #endif /* 0xBFC05A28: 03E00008 jr $ra */ psx_delay_BFC05A28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05A2C: A0600000 sb $zero, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05A2Cu; 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(0xBFC05A2Cu); #endif if (psx_delay_BFC05A28) { psx_delay_BFC05A28 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05A30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A30: 1000FFF2 beq $zero, $zero, 0xBFC059FC */ uint32_t psx_brA_BFC05A30 = cpu->gpr[0]; uint32_t psx_brB_BFC05A30 = cpu->gpr[0]; psx_taken_BFC05A30 = (psx_brA_BFC05A30 == psx_brB_BFC05A30); psx_delay_BFC05A30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05A34: 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(0xBFC05A34u); #endif if (psx_delay_BFC05A30) { psx_delay_BFC05A30 = 0; if (psx_taken_BFC05A30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059FCu); goto label_BFC059FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A38u); } 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, 0x8u); #endif /* 0xBFC05A38: 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(0xBFC05A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A3C: 1000FFF4 beq $zero, $zero, 0xBFC05A10 */ uint32_t psx_brA_BFC05A3C = cpu->gpr[0]; uint32_t psx_brB_BFC05A3C = cpu->gpr[0]; psx_taken_BFC05A3C = (psx_brA_BFC05A3C == psx_brB_BFC05A3C); psx_delay_BFC05A3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC05A40: A064FFFF sb $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05A40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA064FFFFu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05A40u); #endif if (psx_delay_BFC05A3C) { psx_delay_BFC05A3C = 0; if (psx_taken_BFC05A3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A10u); goto label_BFC05A10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A44u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A44u); cpu->pc = 0xBFC05A44u; return; /* fallthrough */ } void OpenBIOS_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_BFC05A50 = 0; int psx_taken_BFC05A50 = 0; int psx_delay_BFC05A58 = 0; int psx_taken_BFC05A58 = 0; int psx_delay_BFC05A60 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05A58u: goto label_BFC05A58; case 0xBFC05A60u: goto label_BFC05A60; 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 /* 0xBFC05A44: 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(0xBFC05A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A48u); #endif /* 0xBFC05A48: 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(0xBFC05A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A4C: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC05A50: 14430003 bne $v0, $v1, 0xBFC05A60 */ uint32_t psx_brA_BFC05A50 = cpu->gpr[2]; uint32_t psx_brB_BFC05A50 = cpu->gpr[3]; psx_taken_BFC05A50 = (psx_brA_BFC05A50 != psx_brB_BFC05A50); psx_delay_BFC05A50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05A54: 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(0xBFC05A54u); #endif if (psx_delay_BFC05A50) { psx_delay_BFC05A50 = 0; if (psx_taken_BFC05A50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A60u); goto label_BFC05A60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A58u); } label_BFC05A58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05A58: 1440FFFA bne $v0, $zero, 0xBFC05A44 */ uint32_t psx_brA_BFC05A58 = cpu->gpr[2]; uint32_t psx_brB_BFC05A58 = cpu->gpr[0]; psx_taken_BFC05A58 = (psx_brA_BFC05A58 != psx_brB_BFC05A58); psx_delay_BFC05A58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC05A5C: 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(0xBFC05A5Cu); #endif if (psx_delay_BFC05A58) { psx_delay_BFC05A58 = 0; if (psx_taken_BFC05A58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A44u); goto label_BFC05A44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A60u); } label_BFC05A60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05A60: 03E00008 jr $ra */ psx_delay_BFC05A60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05A64: 00431023 subu $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(0x00431023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05A64u); #endif if (psx_delay_BFC05A60) { psx_delay_BFC05A60 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05A68(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05A68u); int psx_delay_BFC05A6C = 0; int psx_taken_BFC05A6C = 0; int psx_delay_BFC05A74 = 0; int psx_delay_BFC05A8C = 0; int psx_taken_BFC05A8C = 0; int psx_delay_BFC05A94 = 0; int psx_taken_BFC05A94 = 0; int psx_delay_BFC05A9C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05A6Cu: goto label_BFC05A6C; case 0xBFC05A74u: goto label_BFC05A74; case 0xBFC05A7Cu: goto label_BFC05A7C; case 0xBFC05A94u: goto label_BFC05A94; case 0xBFC05A9Cu: goto label_BFC05A9C; default: break; } } 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, 0x9u); #endif /* 0xBFC05A68: 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(0xBFC05A68u); #endif label_BFC05A6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC05A6C: 14C30003 bne $a2, $v1, 0xBFC05A7C */ uint32_t psx_brA_BFC05A6C = cpu->gpr[6]; uint32_t psx_brB_BFC05A6C = cpu->gpr[3]; psx_taken_BFC05A6C = (psx_brA_BFC05A6C != psx_brB_BFC05A6C); psx_delay_BFC05A6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA8u); #endif /* 0xBFC05A70: 00A33821 addu $a3, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A33821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05A70u); #endif if (psx_delay_BFC05A6C) { psx_delay_BFC05A6C = 0; if (psx_taken_BFC05A6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A7Cu); goto label_BFC05A7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A74u); } label_BFC05A74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05A74: 03E00008 jr $ra */ psx_delay_BFC05A74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05A78: 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(0xBFC05A78u); #endif if (psx_delay_BFC05A74) { psx_delay_BFC05A74 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x1Cu); #endif /* 0xBFC05A7C: 00831021 addu $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(0x00831021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A80u); #endif /* 0xBFC05A80: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A84u); #endif /* 0xBFC05A84: 80E70000 lb $a3, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 7, 0x80u); PGXP_LOAD(0x80E70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A88: 00000000 nop */ /* nop */ #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, 0x84u); #endif /* 0xBFC05A8C: 14470003 bne $v0, $a3, 0xBFC05A9C */ uint32_t psx_brA_BFC05A8C = cpu->gpr[2]; uint32_t psx_brB_BFC05A8C = cpu->gpr[7]; psx_taken_BFC05A8C = (psx_brA_BFC05A8C != psx_brB_BFC05A8C); psx_delay_BFC05A8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05A90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05A90u); #endif if (psx_delay_BFC05A8C) { psx_delay_BFC05A8C = 0; if (psx_taken_BFC05A8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A9Cu); goto label_BFC05A9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A94u); } label_BFC05A94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05A94: 1440FFF5 bne $v0, $zero, 0xBFC05A6C */ uint32_t psx_brA_BFC05A94 = cpu->gpr[2]; uint32_t psx_brB_BFC05A94 = cpu->gpr[0]; psx_taken_BFC05A94 = (psx_brA_BFC05A94 != psx_brB_BFC05A94); psx_delay_BFC05A94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05A98: 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(0xBFC05A98u); #endif if (psx_delay_BFC05A94) { psx_delay_BFC05A94 = 0; if (psx_taken_BFC05A94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A6Cu); goto label_BFC05A6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A9Cu); } label_BFC05A9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05A9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05A9C: 03E00008 jr $ra */ psx_delay_BFC05A9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC05AA0: 00471023 subu $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[7]; PGXP_ALU(0x00471023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05AA0u); #endif if (psx_delay_BFC05A9C) { psx_delay_BFC05A9C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05AA4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05AA4u); int psx_delay_BFC05AB0 = 0; int psx_delay_BFC05AC8 = 0; int psx_taken_BFC05AC8 = 0; int psx_delay_BFC05ADC = 0; int psx_delay_BFC05AE4 = 0; int psx_delay_BFC05AEC = 0; int psx_taken_BFC05AEC = 0; int psx_delay_BFC05AF4 = 0; int psx_taken_BFC05AF4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05AB8u: goto label_BFC05AB8; case 0xBFC05AC0u: goto label_BFC05AC0; case 0xBFC05AD0u: goto label_BFC05AD0; case 0xBFC05AD4u: goto label_BFC05AD4; case 0xBFC05AE4u: goto label_BFC05AE4; case 0xBFC05AECu: goto label_BFC05AEC; case 0xBFC05AF4u: goto label_BFC05AF4; default: break; } } label_BFC05AA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05AA4: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC05AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC05AA8: 00803825 or $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(0x00803825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05AAC: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AACu); return; } g_debug_last_store_pc = 0xBFC05AACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC05AB0: 0FF01673 jal 0xBFC059CC */ cpu->gpr[31] = 0xBFC05AB8u; /* jal link before delay slot */ psx_delay_BFC05AB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC05AB4: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05AB4u); #endif if (psx_delay_BFC05AB0) { psx_delay_BFC05AB0 = 0; cpu->gpr[31] = 0xBFC05AB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC059CCu); cpu->pc = 0xBFC059CCu; return; } label_BFC05AB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC05AB8: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC05ABC: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05ABCu); #endif label_BFC05AC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AC0u); #endif /* 0xBFC05AC0: 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(0xBFC05AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05AC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05AC8: 14400006 bne $v0, $zero, 0xBFC05AE4 */ uint32_t psx_brA_BFC05AC8 = cpu->gpr[2]; uint32_t psx_brB_BFC05AC8 = cpu->gpr[0]; psx_taken_BFC05AC8 = (psx_brA_BFC05AC8 != psx_brB_BFC05AC8); psx_delay_BFC05AC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05ACC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05ACCu); #endif if (psx_delay_BFC05AC8) { psx_delay_BFC05AC8 = 0; if (psx_taken_BFC05AC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AE4u); goto label_BFC05AE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AD0u); } 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, 0x11u); #endif /* 0xBFC05AD0: 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(0xBFC05AD0u); #endif label_BFC05AD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AD4u); #endif /* 0xBFC05AD4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05AD4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC05AD8: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC05ADC: 03E00008 jr $ra */ psx_delay_BFC05ADC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05AE0: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05AE0u); #endif if (psx_delay_BFC05ADC) { psx_delay_BFC05ADC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x80000000u); #endif /* 0xBFC05AE4: 0FF0169A jal 0xBFC05A68 */ cpu->gpr[31] = 0xBFC05AECu; /* jal link before delay slot */ psx_delay_BFC05AE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05AE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05AE8u); #endif if (psx_delay_BFC05AE4) { psx_delay_BFC05AE4 = 0; cpu->gpr[31] = 0xBFC05AECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05A68u); cpu->pc = 0xBFC05A68u; return; } 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, 0x5u); #endif /* 0xBFC05AEC: 1040FFF9 beq $v0, $zero, 0xBFC05AD4 */ uint32_t psx_brA_BFC05AEC = cpu->gpr[2]; uint32_t psx_brB_BFC05AEC = cpu->gpr[0]; psx_taken_BFC05AEC = (psx_brA_BFC05AEC == psx_brB_BFC05AEC); psx_delay_BFC05AEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05AF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05AF0u); #endif if (psx_delay_BFC05AEC) { psx_delay_BFC05AEC = 0; if (psx_taken_BFC05AEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AD4u); goto label_BFC05AD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AF4u); } label_BFC05AF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05AF4: 1000FFF2 beq $zero, $zero, 0xBFC05AC0 */ uint32_t psx_brA_BFC05AF4 = cpu->gpr[0]; uint32_t psx_brB_BFC05AF4 = cpu->gpr[0]; psx_taken_BFC05AF4 = (psx_brA_BFC05AF4 == psx_brB_BFC05AF4); psx_delay_BFC05AF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05AF8: 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(0xBFC05AF8u); #endif if (psx_delay_BFC05AF4) { psx_delay_BFC05AF4 = 0; if (psx_taken_BFC05AF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AC0u); goto label_BFC05AC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); cpu->pc = 0xBFC05AFCu; return; /* fallthrough */ } void OpenBIOS_func_1FC05AFC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05AFCu); int psx_delay_BFC05B14 = 0; int psx_taken_BFC05B14 = 0; int psx_delay_BFC05B1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05B04u: goto label_BFC05B04; case 0xBFC05B1Cu: goto label_BFC05B1C; default: break; } } label_BFC05AFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05AFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05AFC: 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(0xBFC05AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05B00: 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(0xBFC05B00u); #endif label_BFC05B04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05B04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x54u); #endif /* 0xBFC05B04: 00823021 addu $a2, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00823021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B08u); #endif /* 0xBFC05B08: 8CC70000 lw $a3, 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, 0xBFC05B08u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x40u); } PGXP_LOAD(0x8CC70000u, _pgxa, cpu->gpr[7]); } #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, 0x64u); #endif /* 0xBFC05B0C: 00A23021 addu $a2, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A23021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05B10: 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(0xBFC05B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05B14: 1443FFFB bne $v0, $v1, 0xBFC05B04 */ uint32_t psx_brA_BFC05B14 = cpu->gpr[2]; uint32_t psx_brB_BFC05B14 = cpu->gpr[3]; 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, 0xC0u); #endif /* 0xBFC05B18: 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, 0xBFC05B18u); return; } g_debug_last_store_pc = 0xBFC05B18u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACC70000u, _pgxa, cpu->gpr[7]); } #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, 0xBFC05B04u); goto label_BFC05B04; } #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, 0x80000001u); #endif /* 0xBFC05B1C: 03E00008 jr $ra */ psx_delay_BFC05B1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05B20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05B20u); #endif if (psx_delay_BFC05B1C) { psx_delay_BFC05B1C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05B24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B24u); int psx_delay_BFC05B34 = 0; int psx_delay_BFC05B44 = 0; int psx_delay_BFC05B5C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05B3Cu: goto label_BFC05B3C; case 0xBFC05B4Cu: goto label_BFC05B4C; default: break; } } label_BFC05B24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05B24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B24: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #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, 0x20000000u); #endif /* 0xBFC05B28: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05B2C: 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(0xBFC05B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05B30: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05B34: 0FF016BF jal 0xBFC05AFC */ cpu->gpr[31] = 0xBFC05B3Cu; /* jal link before delay slot */ psx_delay_BFC05B34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B38: 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(0xBFC05B38u); #endif if (psx_delay_BFC05B34) { psx_delay_BFC05B34 = 0; cpu->gpr[31] = 0xBFC05B3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); cpu->pc = 0xBFC05AFCu; return; } label_BFC05B3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05B3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B3C: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05B40: 240500B0 addiu $a1, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240500B0u, cpu->gpr[5], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05B44: 0FF016BF jal 0xBFC05AFC */ cpu->gpr[31] = 0xBFC05B4Cu; /* jal link before delay slot */ psx_delay_BFC05B44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B48: 24846970 addiu $a0, $a0, 26992 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26992)); PGXP_ALU(0x24846970u, cpu->gpr[4], _pgx1, 0x00006970u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B48u); #endif if (psx_delay_BFC05B44) { psx_delay_BFC05B44 = 0; cpu->gpr[31] = 0xBFC05B4Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); cpu->pc = 0xBFC05AFCu; return; } label_BFC05B4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05B4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B4Cu); #endif /* 0xBFC05B4C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B4Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x10u); #endif /* 0xBFC05B50: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05B54: 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(0xBFC05B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B58: 24846980 addiu $a0, $a0, 27008 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (27008)); PGXP_ALU(0x24846980u, cpu->gpr[4], _pgx1, 0x00006980u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC05B5C: 0BF016BF j 0xBFC05AFC */ psx_delay_BFC05B5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05B60: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B60u); #endif if (psx_delay_BFC05B5C) { psx_delay_BFC05B5C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); cpu->pc = 0xBFC05AFCu; return; } } void OpenBIOS_func_1FC05B64(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B64u); int psx_delay_BFC05B6C = 0; label_BFC05B64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05B64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B64: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05B68: 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(0xBFC05B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC05B6C: 0BF016BF j 0xBFC05AFC */ psx_delay_BFC05B6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05B70: 24846950 addiu $a0, $a0, 26960 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (26960)); PGXP_ALU(0x24846950u, cpu->gpr[4], _pgx1, 0x00006950u); } #ifdef PSX_COSIM cosim_instr(0xBFC05B70u); #endif if (psx_delay_BFC05B6C) { psx_delay_BFC05B6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05AFCu); cpu->pc = 0xBFC05AFCu; return; } } void OpenBIOS_func_1FC05B74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B74u); int psx_delay_BFC05B80 = 0; 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, 0x4u); #endif /* 0xBFC05B74: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x8u); #endif /* 0xBFC05B78: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05B7C: 24424B4C addiu $v0, $v0, 19276 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19276)); PGXP_ALU(0x24424B4Cu, cpu->gpr[2], _pgx1, 0x00004B4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC05B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05B80: 03E00008 jr $ra */ psx_delay_BFC05B80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05B84: AC624BF8 sw $v0, 19448($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19448)); 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[2]); } PGXP_STORE(0xAC624BF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05B84u); #endif if (psx_delay_BFC05B80) { psx_delay_BFC05B80 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05B88(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B88u); int psx_delay_BFC05B8C = 0; 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, 0x4u); #endif /* 0xBFC05B88: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x80000001u); #endif /* 0xBFC05B8C: 03E00008 jr $ra */ psx_delay_BFC05B8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05B90: AC444BF8 sw $a0, 19448($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19448; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19448)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05B90u); return; } g_debug_last_store_pc = 0xBFC05B90u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC444BF8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC05B90u); #endif if (psx_delay_BFC05B8C) { psx_delay_BFC05B8C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05B94(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B94u); int psx_delay_BFC05B94 = 0; 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, 0x80000001u); #endif /* 0xBFC05B94: 03E00008 jr $ra */ psx_delay_BFC05B94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC05B98: 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, 0xBFC05B98u); return; } g_debug_last_store_pc = 0xBFC05B98u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC800018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05B98u); #endif if (psx_delay_BFC05B94) { psx_delay_BFC05B94 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05B9C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05B9Cu); int psx_delay_BFC05B9C = 0; 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, 0x80000001u); #endif /* 0xBFC05B9C: 03E00008 jr $ra */ psx_delay_BFC05B9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05BA0: 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(0xBFC05BA0u); #endif if (psx_delay_BFC05B9C) { psx_delay_BFC05B9C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05BA4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05BA4u); int psx_delay_BFC05BA8 = 0; label_BFC05BA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05BA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BA4: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05BA8: 03E00008 jr $ra */ psx_delay_BFC05BA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BAC: 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(0xBFC05BACu); #endif if (psx_delay_BFC05BA8) { psx_delay_BFC05BA8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05BB0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05BB0u); int psx_delay_BFC05BBC = 0; int psx_delay_BFC05BD0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05BC4u: goto label_BFC05BC4; default: break; } } label_BFC05BB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05BB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05BB0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC05BB4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BB4u); return; } g_debug_last_store_pc = 0xBFC05BB4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000011u); #endif /* 0xBFC05BB8: 03E02025 or $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(0x03E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05BBC: 0FF01FA1 jal 0xBFC07E84 */ cpu->gpr[31] = 0xBFC05BC4u; /* jal link before delay slot */ psx_delay_BFC05BBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05BC0: 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(0xBFC05BC0u); #endif if (psx_delay_BFC05BBC) { psx_delay_BFC05BBC = 0; cpu->gpr[31] = 0xBFC05BC4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07E84u); cpu->pc = 0xBFC07E84u; return; } label_BFC05BC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05BC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BC4u); #endif /* 0xBFC05BC4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BC4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BC8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BCC: 244249CC addiu $v0, $v0, 18892 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (18892)); PGXP_ALU(0x244249CCu, cpu->gpr[2], _pgx1, 0x000049CCu); } #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, 0x80000001u); #endif /* 0xBFC05BD0: 03E00008 jr $ra */ psx_delay_BFC05BD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05BD4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05BD4u); #endif if (psx_delay_BFC05BD0) { psx_delay_BFC05BD0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05BD8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05BD8u); int psx_delay_BFC05BE4 = 0; int psx_delay_BFC05BF8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05BECu: goto label_BFC05BEC; default: break; } } label_BFC05BD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05BD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05BD8: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC05BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05BDC: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BDCu); return; } g_debug_last_store_pc = 0xBFC05BDCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000011u); #endif /* 0xBFC05BE0: 03E02025 or $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(0x03E02025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC05BE4: 0FF01FA1 jal 0xBFC07E84 */ cpu->gpr[31] = 0xBFC05BECu; /* jal link before delay slot */ psx_delay_BFC05BE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05BE8: 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(0xBFC05BE8u); #endif if (psx_delay_BFC05BE4) { psx_delay_BFC05BE4 = 0; cpu->gpr[31] = 0xBFC05BECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07E84u); cpu->pc = 0xBFC07E84u; return; } label_BFC05BEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05BECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BECu); #endif /* 0xBFC05BEC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05BECu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BF0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05BF4: 2442494C addiu $v0, $v0, 18764 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (18764)); PGXP_ALU(0x2442494Cu, cpu->gpr[2], _pgx1, 0x0000494Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC05BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05BF8: 03E00008 jr $ra */ psx_delay_BFC05BF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05BFC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05BFCu); #endif if (psx_delay_BFC05BF8) { psx_delay_BFC05BF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05C00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05C00u); int psx_delay_BFC05C04 = 0; label_BFC05C00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05C00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05C00: 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(0xBFC05C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC05C04: 0BF021BA j 0xBFC086E8 */ psx_delay_BFC05C04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05C08: 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(0xBFC05C08u); #endif if (psx_delay_BFC05C04) { psx_delay_BFC05C04 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086E8u); cpu->pc = 0xBFC086E8u; return; } } void OpenBIOS_func_1FC05C0C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05C0Cu); int psx_delay_BFC05C0C = 0; 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, 0x0u); #endif /* 0xBFC05C0C: 0BF01700 j 0xBFC05C00 */ psx_delay_BFC05C0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05C10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05C10u); #endif if (psx_delay_BFC05C0C) { psx_delay_BFC05C0C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05C00u); cpu->pc = 0xBFC05C00u; return; } } void OpenBIOS_func_1FC05C14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05C14u); int psx_delay_BFC05C40 = 0; int psx_taken_BFC05C40 = 0; int psx_delay_BFC05C84 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05C30u: goto label_BFC05C30; case 0xBFC05C48u: goto label_BFC05C48; default: break; } } label_BFC05C14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05C14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05C14: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05C18: 246349CC addiu $v1, $v1, 18892 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (18892)); PGXP_ALU(0x246349CCu, cpu->gpr[3], _pgx1, 0x000049CCu); } #ifdef PSX_COSIM cosim_instr(0xBFC05C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05C1C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05C20: 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(0xBFC05C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC05C24: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05C28: 24420200 addiu $v0, $v0, 512 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (512)); PGXP_ALU(0x24420200u, cpu->gpr[2], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0xBFC05C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05C2C: 24060028 addiu $a2, $zero, 40 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); PGXP_ALU(0x24060028u, cpu->gpr[6], _pgx1, 0x00000028u); } #ifdef PSX_COSIM cosim_instr(0xBFC05C2Cu); #endif label_BFC05C30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05C30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C30u); #endif /* 0xBFC05C30: 8C6800C8 lw $t0, 200($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 200; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C30u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } PGXP_LOAD(0x8C6800C8u, _pgxa, cpu->gpr[8]); } #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, 0xA4u); #endif /* 0xBFC05C34: 00453821 addu $a3, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00453821u, cpu->gpr[7], _pgx1, _pgx2); } #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, 0x20u); #endif /* 0xBFC05C38: 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(0xBFC05C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC05C3C: 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, 0xBFC05C3Cu); return; } g_debug_last_store_pc = 0xBFC05C3Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE80000u, _pgxa, cpu->gpr[8]); } #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, 0x60u); #endif /* 0xBFC05C40: 14A6FFFB bne $a1, $a2, 0xBFC05C30 */ uint32_t psx_brA_BFC05C40 = cpu->gpr[5]; uint32_t psx_brB_BFC05C40 = cpu->gpr[6]; psx_taken_BFC05C40 = (psx_brA_BFC05C40 != psx_brB_BFC05C40); psx_delay_BFC05C40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05C44: 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(0xBFC05C44u); #endif if (psx_delay_BFC05C40) { psx_delay_BFC05C40 = 0; if (psx_taken_BFC05C40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05C30u); goto label_BFC05C30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05C48u); } label_BFC05C48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05C48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C48u); #endif /* 0xBFC05C48: 8C8300F0 lw $v1, 240($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 240; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C8300F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05C4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05C50: AC4300EC sw $v1, 236($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C50u); return; } g_debug_last_store_pc = 0xBFC05C50u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4300ECu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C54u); #endif /* 0xBFC05C54: 8C8300F4 lw $v1, 244($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 244; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C54u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C8300F4u, _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, 0x1u); #endif /* 0xBFC05C58: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC05C5C: AC4300F0 sw $v1, 240($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 240; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (240)); 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[3]); } PGXP_STORE(0xAC4300F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C60u); #endif /* 0xBFC05C60: 8C8300F8 lw $v1, 248($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 248; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C60u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C8300F8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05C64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05C68: AC4300F4 sw $v1, 244($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C68u); return; } g_debug_last_store_pc = 0xBFC05C68u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4300F4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C6Cu); #endif /* 0xBFC05C6C: 8C8300FC lw $v1, 252($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 252; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C6Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C8300FCu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC05C70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05C74: AC4300F8 sw $v1, 248($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 248; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C74u); return; } g_debug_last_store_pc = 0xBFC05C74u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4300F8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C78u); #endif /* 0xBFC05C78: 8C43002C lw $v1, 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, 0xBFC05C78u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C43002Cu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC05C7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05C80: 34630001 ori $v1, $v1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1u; PGXP_ALU(0x34630001u, cpu->gpr[3], _pgx1, 0x0001u); } #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, 0x80000001u); #endif /* 0xBFC05C84: 03E00008 jr $ra */ psx_delay_BFC05C84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05C88: AC43002C sw $v1, 44($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 44; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05C88u); return; } g_debug_last_store_pc = 0xBFC05C88u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43002Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C88u); #endif if (psx_delay_BFC05C84) { psx_delay_BFC05C84 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05C8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05C8Cu); int psx_delay_BFC05CB4 = 0; int psx_delay_BFC05CD8 = 0; int psx_delay_BFC05CF8 = 0; int psx_delay_BFC05D18 = 0; int psx_delay_BFC05D38 = 0; int psx_delay_BFC05D58 = 0; int psx_delay_BFC05D78 = 0; int psx_delay_BFC05D98 = 0; int psx_delay_BFC05DB8 = 0; int psx_delay_BFC05DD8 = 0; int psx_delay_BFC05DEC = 0; int psx_delay_BFC05DF8 = 0; int psx_delay_BFC05E08 = 0; int psx_taken_BFC05E08 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05CBCu: goto label_BFC05CBC; case 0xBFC05CE0u: goto label_BFC05CE0; case 0xBFC05D00u: goto label_BFC05D00; case 0xBFC05D20u: goto label_BFC05D20; case 0xBFC05D40u: goto label_BFC05D40; case 0xBFC05D60u: goto label_BFC05D60; case 0xBFC05D80u: goto label_BFC05D80; case 0xBFC05DA0u: goto label_BFC05DA0; case 0xBFC05DC0u: goto label_BFC05DC0; case 0xBFC05DE0u: goto label_BFC05DE0; case 0xBFC05DF4u: goto label_BFC05DF4; case 0xBFC05E00u: goto label_BFC05E00; case 0xBFC05E08u: goto label_BFC05E08; default: break; } } label_BFC05C8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05C8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05C8C: 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(0xBFC05C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05C90: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC1u); #endif /* 0xBFC05C94: 00C03825 or $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(0x00C03825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC05C98: 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, 0xBFC05C98u); return; } g_debug_last_store_pc = 0xBFC05C98u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC05C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC05C9C: 00A03025 or $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(0x00A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CA0u); #endif /* 0xBFC05CA0: 8C500110 lw $s0, 272($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CA0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500110u, _pgxa, cpu->gpr[16]); } #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, 0x31u); #endif /* 0xBFC05CA4: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC05CA8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05CAC: 24849830 addiu $a0, $a0, -26576 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26576)); PGXP_ALU(0x24849830u, cpu->gpr[4], _pgx1, 0xFFFF9830u); } #ifdef PSX_COSIM cosim_instr(0xBFC05CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05CB0: 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, 0xBFC05CB0u); return; } g_debug_last_store_pc = 0xBFC05CB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05CB4: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05CBCu; /* jal link before delay slot */ psx_delay_BFC05CB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC05CB8: 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, 0xBFC05CB8u); return; } g_debug_last_store_pc = 0xBFC05CB8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CB8u); #endif if (psx_delay_BFC05CB4) { psx_delay_BFC05CB4 = 0; cpu->gpr[31] = 0xBFC05CBCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05CBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05CBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CBCu); #endif /* 0xBFC05CBC: 8E070098 lw $a3, 152($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 152; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CBCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070098u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CC0u); #endif /* 0xBFC05CC0: 8E060094 lw $a2, 148($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 148; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CC0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E060094u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CC4u); #endif /* 0xBFC05CC4: 8E050088 lw $a1, 136($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CC4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050088u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05CC8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x10u); #endif /* 0xBFC05CCC: 24849860 addiu $a0, $a0, -26528 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26528)); PGXP_ALU(0x24849860u, cpu->gpr[4], _pgx1, 0xFFFF9860u); } #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, 0x0u); #endif /* 0xBFC05CD0: 40114000 mfc0 $s1, cop0[8] */ cpu->gpr[17] = cpu->cop0[8]; #ifdef PSX_ENABLE_BLOCK_CYCLES cpu->ld_absorb = 0u; cpu->ld_which_t = 17u; #endif PGXP_ALU(0x40114000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05CD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05CD8: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05CE0u; /* jal link before delay slot */ psx_delay_BFC05CD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC05CDC: 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, 0xBFC05CDCu); return; } g_debug_last_store_pc = 0xBFC05CDCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10010u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CDCu); #endif if (psx_delay_BFC05CD8) { psx_delay_BFC05CD8 = 0; cpu->gpr[31] = 0xBFC05CE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05CE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05CE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CE0u); #endif /* 0xBFC05CE0: 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, 0xBFC05CE0u); 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(0xBFC05CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CE4u); #endif /* 0xBFC05CE4: 8E070010 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CE4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070010u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CE8u); #endif /* 0xBFC05CE8: 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, 0xBFC05CE8u); 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(0xBFC05CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CECu); #endif /* 0xBFC05CEC: 8E050008 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05CECu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050008u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC05CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05CF0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC05CF4: 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, 0xBFC05CF4u); return; } g_debug_last_store_pc = 0xBFC05CF4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05CF8: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05D00u; /* jal link before delay slot */ psx_delay_BFC05CF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05CFC: 24849894 addiu $a0, $a0, -26476 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26476)); PGXP_ALU(0x24849894u, cpu->gpr[4], _pgx1, 0xFFFF9894u); } #ifdef PSX_COSIM cosim_instr(0xBFC05CFCu); #endif if (psx_delay_BFC05CF8) { psx_delay_BFC05CF8 = 0; cpu->gpr[31] = 0xBFC05D00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05D00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05D00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D00u); #endif /* 0xBFC05D00: 8E020024 lw $v0, 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, 0xBFC05D00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020024u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D04u); #endif /* 0xBFC05D04: 8E070020 lw $a3, 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, 0xBFC05D04u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070020u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D08u); #endif /* 0xBFC05D08: 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, 0xBFC05D08u); 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(0xBFC05D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D0Cu); #endif /* 0xBFC05D0C: 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, 0xBFC05D0Cu); 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(0xBFC05D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D10: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC05D14: 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, 0xBFC05D14u); return; } g_debug_last_store_pc = 0xBFC05D14u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05D18: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05D20u; /* jal link before delay slot */ psx_delay_BFC05D18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D1C: 248498BC addiu $a0, $a0, -26436 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26436)); PGXP_ALU(0x248498BCu, cpu->gpr[4], _pgx1, 0xFFFF98BCu); } #ifdef PSX_COSIM cosim_instr(0xBFC05D1Cu); #endif if (psx_delay_BFC05D18) { psx_delay_BFC05D18 = 0; cpu->gpr[31] = 0xBFC05D20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } 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: 8E020034 lw $v0, 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, 0xBFC05D20u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020034u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D24u); #endif /* 0xBFC05D24: 8E070030 lw $a3, 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, 0xBFC05D24u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070030u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D28u); #endif /* 0xBFC05D28: 8E06002C lw $a2, 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, 0xBFC05D28u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06002Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D2Cu); #endif /* 0xBFC05D2C: 8E050028 lw $a1, 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, 0xBFC05D2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050028u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05D30: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20000004u); #endif /* 0xBFC05D34: 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, 0xBFC05D34u); return; } g_debug_last_store_pc = 0xBFC05D34u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05D38: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05D40u; /* jal link before delay slot */ psx_delay_BFC05D38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D3C: 248498E4 addiu $a0, $a0, -26396 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26396)); PGXP_ALU(0x248498E4u, cpu->gpr[4], _pgx1, 0xFFFF98E4u); } #ifdef PSX_COSIM cosim_instr(0xBFC05D3Cu); #endif if (psx_delay_BFC05D38) { psx_delay_BFC05D38 = 0; cpu->gpr[31] = 0xBFC05D40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05D40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05D40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D40u); #endif /* 0xBFC05D40: 8E020044 lw $v0, 68($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D44u); #endif /* 0xBFC05D44: 8E070040 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D44u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070040u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D48u); #endif /* 0xBFC05D48: 8E06003C lw $a2, 60($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D48u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06003Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D4Cu); #endif /* 0xBFC05D4C: 8E050038 lw $a1, 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, 0xBFC05D4Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050038u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05D50: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC05D54: 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, 0xBFC05D54u); return; } g_debug_last_store_pc = 0xBFC05D54u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05D58: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05D60u; /* jal link before delay slot */ psx_delay_BFC05D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D5C: 2484990C addiu $a0, $a0, -26356 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26356)); PGXP_ALU(0x2484990Cu, cpu->gpr[4], _pgx1, 0xFFFF990Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC05D5Cu); #endif if (psx_delay_BFC05D58) { psx_delay_BFC05D58 = 0; cpu->gpr[31] = 0xBFC05D60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D60u); #endif /* 0xBFC05D60: 8E020054 lw $v0, 84($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D60u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020054u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D64u); #endif /* 0xBFC05D64: 8E070050 lw $a3, 80($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D64u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070050u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D68u); #endif /* 0xBFC05D68: 8E06004C lw $a2, 76($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D68u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06004Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D6Cu); #endif /* 0xBFC05D6C: 8E050048 lw $a1, 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, 0xBFC05D6Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050048u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05D70: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20000004u); #endif /* 0xBFC05D74: 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, 0xBFC05D74u); return; } g_debug_last_store_pc = 0xBFC05D74u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05D78: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05D80u; /* jal link before delay slot */ psx_delay_BFC05D78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D7C: 24849934 addiu $a0, $a0, -26316 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26316)); PGXP_ALU(0x24849934u, cpu->gpr[4], _pgx1, 0xFFFF9934u); } #ifdef PSX_COSIM cosim_instr(0xBFC05D7Cu); #endif if (psx_delay_BFC05D78) { psx_delay_BFC05D78 = 0; cpu->gpr[31] = 0xBFC05D80u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05D80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05D80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D80u); #endif /* 0xBFC05D80: 8E020064 lw $v0, 100($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D80u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020064u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D84u); #endif /* 0xBFC05D84: 8E070060 lw $a3, 96($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D84u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070060u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D88u); #endif /* 0xBFC05D88: 8E06005C lw $a2, 92($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D88u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06005Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D8Cu); #endif /* 0xBFC05D8C: 8E050058 lw $a1, 88($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05D8Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050058u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC05D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05D90: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, 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, 0x20000004u); #endif /* 0xBFC05D94: 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, 0xBFC05D94u); return; } g_debug_last_store_pc = 0xBFC05D94u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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: 0FF0247B jal 0xBFC091EC */ 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, 0x10u); #endif /* 0xBFC05D9C: 2484995C addiu $a0, $a0, -26276 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26276)); PGXP_ALU(0x2484995Cu, cpu->gpr[4], _pgx1, 0xFFFF995Cu); } #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, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; 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: 8E020074 lw $v0, 116($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DA4u); #endif /* 0xBFC05DA4: 8E070070 lw $a3, 112($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070070u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DA8u); #endif /* 0xBFC05DA8: 8E06006C lw $a2, 108($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DA8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06006Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DACu); #endif /* 0xBFC05DAC: 8E050068 lw $a1, 104($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050068u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05DB0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC05DB4: 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, 0xBFC05DB4u); return; } g_debug_last_store_pc = 0xBFC05DB4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05DB8: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05DC0u; /* jal link before delay slot */ psx_delay_BFC05DB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05DBC: 24849984 addiu $a0, $a0, -26236 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26236)); PGXP_ALU(0x24849984u, cpu->gpr[4], _pgx1, 0xFFFF9984u); } #ifdef PSX_COSIM cosim_instr(0xBFC05DBCu); #endif if (psx_delay_BFC05DB8) { psx_delay_BFC05DB8 = 0; cpu->gpr[31] = 0xBFC05DC0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05DC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05DC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DC0u); #endif /* 0xBFC05DC0: 8E020084 lw $v0, 132($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DC0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020084u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DC4u); #endif /* 0xBFC05DC4: 8E070080 lw $a3, 128($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DC4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E070080u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DC8u); #endif /* 0xBFC05DC8: 8E06007C lw $a2, 124($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DC8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06007Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DCCu); #endif /* 0xBFC05DCC: 8E050078 lw $a1, 120($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DCCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050078u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05DD0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20000004u); #endif /* 0xBFC05DD4: 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, 0xBFC05DD4u); return; } g_debug_last_store_pc = 0xBFC05DD4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC05DD8: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05DE0u; /* jal link before delay slot */ psx_delay_BFC05DD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05DDC: 248499AC addiu $a0, $a0, -26196 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26196)); PGXP_ALU(0x248499ACu, cpu->gpr[4], _pgx1, 0xFFFF99ACu); } #ifdef PSX_COSIM cosim_instr(0xBFC05DDCu); #endif if (psx_delay_BFC05DD8) { psx_delay_BFC05DD8 = 0; cpu->gpr[31] = 0xBFC05DE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05DE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05DE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DE0u); #endif /* 0xBFC05DE0: 8E06008C lw $a2, 140($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DE0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10000u); } PGXP_LOAD(0x8E06008Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DE4u); #endif /* 0xBFC05DE4: 8E050088 lw $a1, 136($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05DE4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E050088u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC05DE8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC05DEC: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05DF4u; /* jal link before delay slot */ psx_delay_BFC05DEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05DF0: 248499D4 addiu $a0, $a0, -26156 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26156)); PGXP_ALU(0x248499D4u, cpu->gpr[4], _pgx1, 0xFFFF99D4u); } #ifdef PSX_COSIM cosim_instr(0xBFC05DF0u); #endif if (psx_delay_BFC05DEC) { psx_delay_BFC05DEC = 0; cpu->gpr[31] = 0xBFC05DF4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05DF8: 0FF0247B jal 0xBFC091EC */ cpu->gpr[31] = 0xBFC05E00u; /* jal link before delay slot */ psx_delay_BFC05DF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05DFC: 24849670 addiu $a0, $a0, -27024 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-27024)); PGXP_ALU(0x24849670u, cpu->gpr[4], _pgx1, 0xFFFF9670u); } #ifdef PSX_COSIM cosim_instr(0xBFC05DFCu); #endif if (psx_delay_BFC05DF8) { psx_delay_BFC05DF8 = 0; cpu->gpr[31] = 0xBFC05E00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091ECu); cpu->pc = 0xBFC091ECu; return; } label_BFC05E00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E00: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC05E04: A0402081 sb $zero, 8321($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8321; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC05E04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8321)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0402081u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC05E04u); #endif label_BFC05E08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05E08: 1000FFFF beq $zero, $zero, 0xBFC05E08 */ uint32_t psx_brA_BFC05E08 = cpu->gpr[0]; uint32_t psx_brB_BFC05E08 = cpu->gpr[0]; psx_taken_BFC05E08 = (psx_brA_BFC05E08 == psx_brB_BFC05E08); psx_delay_BFC05E08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05E0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05E0Cu); #endif if (psx_delay_BFC05E08) { psx_delay_BFC05E08 = 0; if (psx_taken_BFC05E08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05E08u); goto label_BFC05E08; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05E10u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05E10u); cpu->pc = 0xBFC05E10u; return; /* fallthrough */ } void OpenBIOS_func_1FC05E10(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05E10u); int psx_delay_BFC05E2C = 0; int psx_delay_BFC05E4C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05E34u: goto label_BFC05E34; default: break; } } label_BFC05E10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E10: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E14u); #endif /* 0xBFC05E14: 8C469604 lw $a2, -27132($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -27132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E14u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C469604u, _pgxa, cpu->gpr[6]); } #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, 0x20u); #endif /* 0xBFC05E18: 3C05BFC2 lui $a1, 0xBFC2 */ cpu->gpr[5] = 0xBFC20000u; PGXP_ALU(0x3C05BFC2u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05E1C: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #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, 0x20000000u); #endif /* 0xBFC05E20: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20u); #endif /* 0xBFC05E24: 24A5E4D4 addiu $a1, $a1, -6956 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-6956)); PGXP_ALU(0x24A5E4D4u, cpu->gpr[5], _pgx1, 0xFFFFE4D4u); } #ifdef PSX_COSIM cosim_instr(0xBFC05E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05E28: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E28u); return; } g_debug_last_store_pc = 0xBFC05E28u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05E2C: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC05E34u; /* jal link before delay slot */ psx_delay_BFC05E2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05E30: 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(0xBFC05E30u); #endif if (psx_delay_BFC05E2C) { psx_delay_BFC05E2C = 0; cpu->gpr[31] = 0xBFC05E34u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC05E34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E34: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E38u); #endif /* 0xBFC05E38: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E40u); #endif /* 0xBFC05E40: 8C469608 lw $a2, -27128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -27128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05E40u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C469608u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC05E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC05E44: 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(0xBFC05E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05E48: 24844BA0 addiu $a0, $a0, 19360 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19360)); PGXP_ALU(0x24844BA0u, cpu->gpr[4], _pgx1, 0x00004BA0u); } #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, 0x0u); #endif /* 0xBFC05E4C: 0BF021B1 j 0xBFC086C4 */ psx_delay_BFC05E4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC05E50: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC05E50u); #endif if (psx_delay_BFC05E4C) { psx_delay_BFC05E4C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086C4u); cpu->pc = 0xBFC086C4u; return; } } void OpenBIOS_func_1FC05E54(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05E54u); int psx_delay_BFC05E64 = 0; label_BFC05E54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC05E54: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05E58: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05E5C: 24060300 addiu $a2, $zero, 768 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (768)); PGXP_ALU(0x24060300u, cpu->gpr[6], _pgx1, 0x00000300u); } #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, 0x20u); #endif /* 0xBFC05E60: 24A5464C addiu $a1, $a1, 17996 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17996)); PGXP_ALU(0x24A5464Cu, cpu->gpr[5], _pgx1, 0x0000464Cu); } #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, 0x0u); #endif /* 0xBFC05E64: 0BF02176 j 0xBFC085D8 */ psx_delay_BFC05E64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05E68: 24840200 addiu $a0, $a0, 512 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (512)); PGXP_ALU(0x24840200u, cpu->gpr[4], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0xBFC05E68u); #endif if (psx_delay_BFC05E64) { psx_delay_BFC05E64 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } } void OpenBIOS_func_1FC05E6C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05E6Cu); int psx_delay_BFC05E6C = 0; label_BFC05E6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05E6C: 03E00008 jr $ra */ psx_delay_BFC05E6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05E70: 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(0xBFC05E70u); #endif if (psx_delay_BFC05E6C) { psx_delay_BFC05E6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05E74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05E74u); int psx_delay_BFC05E7C = 0; int psx_taken_BFC05E7C = 0; int psx_delay_BFC05E94 = 0; int psx_taken_BFC05E94 = 0; int psx_delay_BFC05E9C = 0; int psx_delay_BFC05EAC = 0; int psx_taken_BFC05EAC = 0; int psx_delay_BFC05EBC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05E84u: goto label_BFC05E84; case 0xBFC05E9Cu: goto label_BFC05E9C; case 0xBFC05EA4u: goto label_BFC05EA4; case 0xBFC05EB4u: goto label_BFC05EB4; case 0xBFC05EB8u: goto label_BFC05EB8; case 0xBFC05EBCu: goto label_BFC05EBC; default: break; } } label_BFC05E74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05E74: 2482FFD0 addiu $v0, $a0, -48 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-48)); PGXP_ALU(0x2482FFD0u, cpu->gpr[2], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC05E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC05E78: 2C43000A sltiu $v1, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C43000Au, cpu->gpr[3], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC05E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05E7C: 1460000F bne $v1, $zero, 0xBFC05EBC */ uint32_t psx_brA_BFC05E7C = cpu->gpr[3]; uint32_t psx_brB_BFC05E7C = cpu->gpr[0]; psx_taken_BFC05E7C = (psx_brA_BFC05E7C != psx_brB_BFC05E7C); psx_delay_BFC05E7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05E80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05E80u); #endif if (psx_delay_BFC05E7C) { psx_delay_BFC05E7C = 0; if (psx_taken_BFC05E7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05EBCu); goto label_BFC05EBC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05E84u); } label_BFC05E84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05E84: 2402FFDF addiu $v0, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2402FFDFu, cpu->gpr[2], _pgx1, 0xFFFFFFDFu); } #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, 0x14u); #endif /* 0xBFC05E88: 00821024 and $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] & cpu->gpr[2]; PGXP_ALU(0x00821024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E8C: 2442FFBF addiu $v0, $v0, -65 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-65)); PGXP_ALU(0x2442FFBFu, cpu->gpr[2], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0xBFC05E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E90: 2C420006 sltiu $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0); PGXP_ALU(0x2C420006u, cpu->gpr[2], _pgx1, 0x0006u); } #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, 0x5u); #endif /* 0xBFC05E94: 14400003 bne $v0, $zero, 0xBFC05EA4 */ uint32_t psx_brA_BFC05E94 = cpu->gpr[2]; uint32_t psx_brB_BFC05E94 = cpu->gpr[0]; psx_taken_BFC05E94 = (psx_brA_BFC05E94 != psx_brB_BFC05E94); psx_delay_BFC05E94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05E98: 3C020098 lui $v0, 0x98 */ cpu->gpr[2] = 0x00980000u; PGXP_ALU(0x3C020098u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC05E98u); #endif if (psx_delay_BFC05E94) { psx_delay_BFC05E94 = 0; if (psx_taken_BFC05E94) { #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, 0xBFC05E9Cu); } label_BFC05E9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05E9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05E9C: 03E00008 jr $ra */ psx_delay_BFC05E9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05EA0: 3442967F ori $v0, $v0, 0x967F */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x967Fu; PGXP_ALU(0x3442967Fu, cpu->gpr[2], _pgx1, 0x967Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC05EA0u); #endif if (psx_delay_BFC05E9C) { psx_delay_BFC05E9C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x14u); #endif /* 0xBFC05EA4: 2482FFBF addiu $v0, $a0, -65 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-65)); PGXP_ALU(0x2482FFBFu, cpu->gpr[2], _pgx1, 0xFFFFFFBFu); } #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, 0x4u); #endif /* 0xBFC05EA8: 2C42001A sltiu $v0, $v0, 26 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C42001Au, cpu->gpr[2], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0xBFC05EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05EAC: 10400002 beq $v0, $zero, 0xBFC05EB8 */ uint32_t psx_brA_BFC05EAC = cpu->gpr[2]; uint32_t psx_brB_BFC05EAC = cpu->gpr[0]; psx_taken_BFC05EAC = (psx_brA_BFC05EAC == psx_brB_BFC05EAC); psx_delay_BFC05EAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05EB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05EB0u); #endif if (psx_delay_BFC05EAC) { psx_delay_BFC05EAC = 0; if (psx_taken_BFC05EAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05EB8u); goto label_BFC05EB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05EB4u); } label_BFC05EB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05EB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05EB4: 34840020 ori $a0, $a0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x20u; PGXP_ALU(0x34840020u, cpu->gpr[4], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0xBFC05EB4u); #endif label_BFC05EB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05EB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05EB8: 2482FFA9 addiu $v0, $a0, -87 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-87)); PGXP_ALU(0x2482FFA9u, cpu->gpr[2], _pgx1, 0xFFFFFFA9u); } #ifdef PSX_COSIM cosim_instr(0xBFC05EB8u); #endif label_BFC05EBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05EBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05EBC: 03E00008 jr $ra */ psx_delay_BFC05EBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05EC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05EC0u); #endif if (psx_delay_BFC05EBC) { psx_delay_BFC05EBC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05EC4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05EC4u); int psx_delay_BFC05ECC = 0; label_BFC05EC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05EC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05EC4: 000417C3 sra $v0, $a0, 31 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] >> 31u); PGXP_ALU(0x000417C3u, cpu->gpr[2], _pgx1, 31u); } #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, 0x14u); #endif /* 0xBFC05EC8: 00442026 xor $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] ^ cpu->gpr[4]; PGXP_ALU(0x00442026u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC05ECC: 03E00008 jr $ra */ psx_delay_BFC05ECC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC05ED0: 00821023 subu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] - cpu->gpr[2]; PGXP_ALU(0x00821023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05ED0u); #endif if (psx_delay_BFC05ECC) { psx_delay_BFC05ECC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC05ED4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05ED4u); int psx_delay_BFC05EE8 = 0; int psx_delay_BFC05F00 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05EF0u: goto label_BFC05EF0; default: break; } } 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, 0x20000000u); #endif /* 0xBFC05ED4: 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(0xBFC05ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05ED8: 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(0xBFC05ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC05EDC: 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, 0xBFC05EDCu); return; } g_debug_last_store_pc = 0xBFC05EDCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC05EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC05EE0: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC05EE4: 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, 0xBFC05EE4u); return; } g_debug_last_store_pc = 0xBFC05EE4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC05EE8: 0FF021BA jal 0xBFC086E8 */ cpu->gpr[31] = 0xBFC05EF0u; /* jal link before delay slot */ psx_delay_BFC05EE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC05EEC: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC05EECu); #endif if (psx_delay_BFC05EE8) { psx_delay_BFC05EE8 = 0; cpu->gpr[31] = 0xBFC05EF0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086E8u); cpu->pc = 0xBFC086E8u; return; } 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, 0x10004u); #endif /* 0xBFC05EF0: AE020000 sw $v0, 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, 0xBFC05EF0u); return; } g_debug_last_store_pc = 0xBFC05EF0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EF4u); #endif /* 0xBFC05EF4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC05EF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC05EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EF8u); #endif /* 0xBFC05EF8: 8FA20010 lw $v0, 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, 0xBFC05EF8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC05EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05EFCu); #endif /* 0xBFC05EFC: 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, 0xBFC05EFCu); 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(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, 0x20000000u); #endif /* 0xBFC05F04: 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(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 OpenBIOS_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_BFC05F20 = 0; int psx_delay_BFC05F28 = 0; int psx_taken_BFC05F28 = 0; int psx_delay_BFC05F38 = 0; int psx_taken_BFC05F38 = 0; int psx_delay_BFC05F40 = 0; int psx_taken_BFC05F40 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05F0Cu: goto label_BFC05F0C; case 0xBFC05F1Cu: goto label_BFC05F1C; case 0xBFC05F20u: goto label_BFC05F20; case 0xBFC05F28u: goto label_BFC05F28; case 0xBFC05F30u: goto label_BFC05F30; case 0xBFC05F40u: goto label_BFC05F40; 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, 0x15u); #endif /* 0xBFC05F08: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05F08u); #endif label_BFC05F0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F0Cu); #endif /* 0xBFC05F0C: 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(0xBFC05F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F10: 00000000 nop */ /* nop */ #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, 0x11u); #endif /* 0xBFC05F14: 14800006 bne $a0, $zero, 0xBFC05F30 */ uint32_t psx_brA_BFC05F14 = cpu->gpr[4]; uint32_t psx_brB_BFC05F14 = cpu->gpr[0]; psx_taken_BFC05F14 = (psx_brA_BFC05F14 != psx_brB_BFC05F14); psx_delay_BFC05F14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC05F18: 00A01825 or $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(0x00A01825u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0xBFC05F30u); goto label_BFC05F30; } #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, 0x5u); #endif /* 0xBFC05F1C: 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(0xBFC05F1Cu); #endif label_BFC05F20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05F20: 03E00008 jr $ra */ psx_delay_BFC05F20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F24u); #endif if (psx_delay_BFC05F20) { psx_delay_BFC05F20 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05F28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC05F28: 1086FFFD beq $a0, $a2, 0xBFC05F20 */ uint32_t psx_brA_BFC05F28 = cpu->gpr[4]; uint32_t psx_brB_BFC05F28 = cpu->gpr[6]; psx_taken_BFC05F28 = (psx_brA_BFC05F28 == psx_brB_BFC05F28); psx_delay_BFC05F28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05F2C: 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(0xBFC05F2Cu); #endif if (psx_delay_BFC05F28) { psx_delay_BFC05F28 = 0; if (psx_taken_BFC05F28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F20u); goto label_BFC05F20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F30u); } label_BFC05F30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F30u); #endif /* 0xBFC05F30: 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(0xBFC05F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F34: 00000000 nop */ /* nop */ #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, 0x41u); #endif /* 0xBFC05F38: 14C0FFFB bne $a2, $zero, 0xBFC05F28 */ uint32_t psx_brA_BFC05F38 = cpu->gpr[6]; uint32_t psx_brB_BFC05F38 = cpu->gpr[0]; psx_taken_BFC05F38 = (psx_brA_BFC05F38 != psx_brB_BFC05F38); psx_delay_BFC05F38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F3Cu); #endif if (psx_delay_BFC05F38) { psx_delay_BFC05F38 = 0; if (psx_taken_BFC05F38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F28u); goto label_BFC05F28; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F40u); } label_BFC05F40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F40: 1000FFF2 beq $zero, $zero, 0xBFC05F0C */ uint32_t psx_brA_BFC05F40 = cpu->gpr[0]; uint32_t psx_brB_BFC05F40 = cpu->gpr[0]; psx_taken_BFC05F40 = (psx_brA_BFC05F40 == psx_brB_BFC05F40); psx_delay_BFC05F40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC05F44: 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(0xBFC05F44u); #endif if (psx_delay_BFC05F40) { psx_delay_BFC05F40 = 0; if (psx_taken_BFC05F40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F0Cu); goto label_BFC05F0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F48u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F48u); cpu->pc = 0xBFC05F48u; return; /* fallthrough */ } void OpenBIOS_func_1FC05F48(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05F48u); int psx_delay_BFC05F58 = 0; int psx_taken_BFC05F58 = 0; int psx_delay_BFC05F60 = 0; int psx_delay_BFC05F68 = 0; int psx_taken_BFC05F68 = 0; int psx_delay_BFC05F7C = 0; int psx_taken_BFC05F7C = 0; int psx_delay_BFC05F88 = 0; int psx_taken_BFC05F88 = 0; int psx_delay_BFC05F98 = 0; int psx_taken_BFC05F98 = 0; int psx_delay_BFC05FA0 = 0; int psx_taken_BFC05FA0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05F50u: goto label_BFC05F50; case 0xBFC05F60u: goto label_BFC05F60; case 0xBFC05F68u: goto label_BFC05F68; case 0xBFC05F70u: goto label_BFC05F70; case 0xBFC05F74u: goto label_BFC05F74; case 0xBFC05F84u: goto label_BFC05F84; case 0xBFC05F88u: goto label_BFC05F88; case 0xBFC05F90u: goto label_BFC05F90; case 0xBFC05FA0u: goto label_BFC05FA0; default: break; } } label_BFC05F48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05F48: 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(0xBFC05F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05F4C: 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(0xBFC05F4Cu); #endif label_BFC05F50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F50u); #endif /* 0xBFC05F50: 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(0xBFC05F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F54: 00000000 nop */ /* nop */ #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, 0x81u); #endif /* 0xBFC05F58: 14E00006 bne $a3, $zero, 0xBFC05F74 */ uint32_t psx_brA_BFC05F58 = cpu->gpr[7]; uint32_t psx_brB_BFC05F58 = cpu->gpr[0]; psx_taken_BFC05F58 = (psx_brA_BFC05F58 != psx_brB_BFC05F58); psx_delay_BFC05F58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC05F5C: 00A03025 or $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(0x00A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05F5Cu); #endif if (psx_delay_BFC05F58) { psx_delay_BFC05F58 = 0; if (psx_taken_BFC05F58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F74u); goto label_BFC05F74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F60u); } label_BFC05F60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05F60: 03E00008 jr $ra */ psx_delay_BFC05F60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F64u); #endif if (psx_delay_BFC05F60) { psx_delay_BFC05F60 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC05F68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC05F68: 10E80009 beq $a3, $t0, 0xBFC05F90 */ uint32_t psx_brA_BFC05F68 = cpu->gpr[7]; uint32_t psx_brB_BFC05F68 = cpu->gpr[8]; psx_taken_BFC05F68 = (psx_brA_BFC05F68 == psx_brB_BFC05F68); psx_delay_BFC05F68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F6C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F6Cu); #endif if (psx_delay_BFC05F68) { psx_delay_BFC05F68 = 0; if (psx_taken_BFC05F68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F90u); goto label_BFC05F90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F70u); } label_BFC05F70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC05F70: 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(0xBFC05F70u); #endif label_BFC05F74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F74u); #endif /* 0xBFC05F74: 80C80000 lb $t0, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 8, 0x40u); PGXP_LOAD(0x80C80000u, _pgxa, cpu->gpr[8]); } #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, 0x1u); #endif /* 0xBFC05F78: 00000000 nop */ /* nop */ #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, 0x101u); #endif /* 0xBFC05F7C: 1500FFFA bne $t0, $zero, 0xBFC05F68 */ uint32_t psx_brA_BFC05F7C = cpu->gpr[8]; uint32_t psx_brB_BFC05F7C = cpu->gpr[0]; psx_taken_BFC05F7C = (psx_brA_BFC05F7C != psx_brB_BFC05F7C); psx_delay_BFC05F7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F80u); #endif if (psx_delay_BFC05F7C) { psx_delay_BFC05F7C = 0; if (psx_taken_BFC05F7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F68u); goto label_BFC05F68; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F84u); } label_BFC05F84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05F84: 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(0xBFC05F84u); #endif label_BFC05F88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F88: 1000FFF1 beq $zero, $zero, 0xBFC05F50 */ uint32_t psx_brA_BFC05F88 = cpu->gpr[0]; uint32_t psx_brB_BFC05F88 = cpu->gpr[0]; psx_taken_BFC05F88 = (psx_brA_BFC05F88 == psx_brB_BFC05F88); psx_delay_BFC05F88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05F8C: 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(0xBFC05F8Cu); #endif if (psx_delay_BFC05F88) { psx_delay_BFC05F88 = 0; if (psx_taken_BFC05F88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F50u); goto label_BFC05F50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F90u); } label_BFC05F90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05F90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05F90: 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(0xBFC05F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC05F94: 0043302B sltu $a2, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05F98: 10C0FFFB beq $a2, $zero, 0xBFC05F88 */ uint32_t psx_brA_BFC05F98 = cpu->gpr[6]; uint32_t psx_brB_BFC05F98 = cpu->gpr[0]; psx_taken_BFC05F98 = (psx_brA_BFC05F98 == psx_brB_BFC05F98); psx_delay_BFC05F98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05F9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05F9Cu); #endif if (psx_delay_BFC05F98) { psx_delay_BFC05F98 = 0; if (psx_taken_BFC05F98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F88u); goto label_BFC05F88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FA0u); } label_BFC05FA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FA0: 1000FFF9 beq $zero, $zero, 0xBFC05F88 */ uint32_t psx_brA_BFC05FA0 = cpu->gpr[0]; uint32_t psx_brB_BFC05FA0 = cpu->gpr[0]; psx_taken_BFC05FA0 = (psx_brA_BFC05FA0 == psx_brB_BFC05FA0); psx_delay_BFC05FA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC05FA4: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05FA4u); #endif if (psx_delay_BFC05FA0) { psx_delay_BFC05FA0 = 0; if (psx_taken_BFC05FA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F88u); goto label_BFC05F88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FA8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FA8u); cpu->pc = 0xBFC05FA8u; return; /* fallthrough */ } void OpenBIOS_func_1FC05FA8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC05FA8u); int psx_delay_BFC05FB8 = 0; int psx_taken_BFC05FB8 = 0; int psx_delay_BFC05FC0 = 0; int psx_delay_BFC05FC8 = 0; int psx_taken_BFC05FC8 = 0; int psx_delay_BFC05FDC = 0; int psx_taken_BFC05FDC = 0; int psx_delay_BFC05FEC = 0; int psx_taken_BFC05FEC = 0; int psx_delay_BFC05FF8 = 0; int psx_taken_BFC05FF8 = 0; int psx_delay_BFC06000 = 0; int psx_taken_BFC06000 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC05FB0u: goto label_BFC05FB0; case 0xBFC05FC0u: goto label_BFC05FC0; case 0xBFC05FC8u: goto label_BFC05FC8; case 0xBFC05FD0u: goto label_BFC05FD0; case 0xBFC05FD4u: goto label_BFC05FD4; case 0xBFC05FE4u: goto label_BFC05FE4; case 0xBFC05FF4u: goto label_BFC05FF4; case 0xBFC05FF8u: goto label_BFC05FF8; case 0xBFC06000u: goto label_BFC06000; default: break; } } label_BFC05FA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC05FA8: 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(0xBFC05FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC05FAC: 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(0xBFC05FACu); #endif label_BFC05FB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FB0u); #endif /* 0xBFC05FB0: 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(0xBFC05FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FB4: 00000000 nop */ /* nop */ #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, 0x81u); #endif /* 0xBFC05FB8: 14E00006 bne $a3, $zero, 0xBFC05FD4 */ uint32_t psx_brA_BFC05FB8 = cpu->gpr[7]; uint32_t psx_brB_BFC05FB8 = cpu->gpr[0]; psx_taken_BFC05FB8 = (psx_brA_BFC05FB8 != psx_brB_BFC05FB8); psx_delay_BFC05FB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC05FBC: 00A03025 or $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(0x00A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05FBCu); #endif if (psx_delay_BFC05FB8) { psx_delay_BFC05FB8 = 0; if (psx_taken_BFC05FB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FD4u); goto label_BFC05FD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FC0u); } label_BFC05FC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC05FC0: 03E00008 jr $ra */ psx_delay_BFC05FC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05FC4u); #endif if (psx_delay_BFC05FC0) { psx_delay_BFC05FC0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x180u); #endif /* 0xBFC05FC8: 10E8000D beq $a3, $t0, 0xBFC06000 */ uint32_t psx_brA_BFC05FC8 = cpu->gpr[7]; uint32_t psx_brB_BFC05FC8 = cpu->gpr[8]; psx_taken_BFC05FC8 = (psx_brA_BFC05FC8 == psx_brB_BFC05FC8); psx_delay_BFC05FC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05FCCu); #endif if (psx_delay_BFC05FC8) { psx_delay_BFC05FC8 = 0; if (psx_taken_BFC05FC8) { #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, 0xBFC05FD0u); } label_BFC05FD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC05FD0: 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(0xBFC05FD0u); #endif label_BFC05FD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FD4u); #endif /* 0xBFC05FD4: 80C80000 lb $t0, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (0)), 8, 0x40u); PGXP_LOAD(0x80C80000u, _pgxa, cpu->gpr[8]); } #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, 0x1u); #endif /* 0xBFC05FD8: 00000000 nop */ /* nop */ #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, 0x101u); #endif /* 0xBFC05FDC: 1500FFFA bne $t0, $zero, 0xBFC05FC8 */ uint32_t psx_brA_BFC05FDC = cpu->gpr[8]; uint32_t psx_brB_BFC05FDC = cpu->gpr[0]; psx_taken_BFC05FDC = (psx_brA_BFC05FDC != psx_brB_BFC05FDC); psx_delay_BFC05FDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FE0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC05FE0u); #endif if (psx_delay_BFC05FDC) { psx_delay_BFC05FDC = 0; if (psx_taken_BFC05FDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FC8u); goto label_BFC05FC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FE4u); } label_BFC05FE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC05FE4: 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(0xBFC05FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC05FE8: 0043302B sltu $a2, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC05FEC: 10C00002 beq $a2, $zero, 0xBFC05FF8 */ 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FF0: 00000000 nop */ /* nop */ #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, 0xBFC05FF8u); goto label_BFC05FF8; } #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, 0xDu); #endif /* 0xBFC05FF4: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC05FF4u); #endif label_BFC05FF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC05FF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC05FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC05FF8: 1000FFED beq $zero, $zero, 0xBFC05FB0 */ uint32_t psx_brA_BFC05FF8 = cpu->gpr[0]; uint32_t psx_brB_BFC05FF8 = cpu->gpr[0]; psx_taken_BFC05FF8 = (psx_brA_BFC05FF8 == psx_brB_BFC05FF8); psx_delay_BFC05FF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC05FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC05FFC: 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(0xBFC05FFCu); #endif if (psx_delay_BFC05FF8) { psx_delay_BFC05FF8 = 0; if (psx_taken_BFC05FF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FB0u); goto label_BFC05FB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06000u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06000: 1000FFFD beq $zero, $zero, 0xBFC05FF8 */ uint32_t psx_brA_BFC06000 = cpu->gpr[0]; uint32_t psx_brB_BFC06000 = cpu->gpr[0]; psx_taken_BFC06000 = (psx_brA_BFC06000 == psx_brB_BFC06000); psx_delay_BFC06000 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06004: 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(0xBFC06004u); #endif if (psx_delay_BFC06000) { psx_delay_BFC06000 = 0; if (psx_taken_BFC06000) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05FF8u); goto label_BFC05FF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06008u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06008u); cpu->pc = 0xBFC06008u; return; /* fallthrough */ } void OpenBIOS_func_1FC06008(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06008u); int psx_delay_BFC06014 = 0; int psx_taken_BFC06014 = 0; int psx_delay_BFC06028 = 0; int psx_delay_BFC06030 = 0; int psx_taken_BFC06030 = 0; int psx_delay_BFC06044 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0601Cu: goto label_BFC0601C; case 0xBFC06028u: goto label_BFC06028; case 0xBFC06030u: goto label_BFC06030; case 0xBFC06038u: goto label_BFC06038; case 0xBFC0603Cu: goto label_BFC0603C; default: break; } } label_BFC06008: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06008u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06008: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0600Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0600C: 3C080001 lui $t0, 0x1 */ cpu->gpr[8] = 0x00010000u; PGXP_ALU(0x3C080001u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0600Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC06010: 00803825 or $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(0x00803825u, cpu->gpr[7], _pgx1, _pgx2); } #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, 0x11u); #endif /* 0xBFC06014: 14800004 bne $a0, $zero, 0xBFC06028 */ uint32_t psx_brA_BFC06014 = cpu->gpr[4]; uint32_t psx_brB_BFC06014 = cpu->gpr[0]; psx_taken_BFC06014 = (psx_brA_BFC06014 != psx_brB_BFC06014); psx_delay_BFC06014 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06018: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06018u); return; } g_debug_last_store_pc = 0xBFC06018u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06018u); #endif if (psx_delay_BFC06014) { psx_delay_BFC06014 = 0; if (psx_taken_BFC06014) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06028u); goto label_BFC06028; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0601Cu); } label_BFC0601C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0601Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0601Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0601Cu); #endif /* 0xBFC0601C: 8D07854C lw $a3, -31412($t0) */ { uint32_t _pgxa = cpu->gpr[8] + -31412; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0601Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x100u); } PGXP_LOAD(0x8D07854Cu, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC06020: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC06024: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06024u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06028: 0FF017C2 jal 0xBFC05F08 */ cpu->gpr[31] = 0xBFC06030u; /* jal link before delay slot */ psx_delay_BFC06028 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0602Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0602C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0602Cu); #endif if (psx_delay_BFC06028) { psx_delay_BFC06028 = 0; cpu->gpr[31] = 0xBFC06030u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05F08u); cpu->pc = 0xBFC05F08u; return; } label_BFC06030: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06030u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06030: 10400002 beq $v0, $zero, 0xBFC0603C */ uint32_t psx_brA_BFC06030 = cpu->gpr[2]; uint32_t psx_brB_BFC06030 = cpu->gpr[0]; psx_taken_BFC06030 = (psx_brA_BFC06030 == psx_brB_BFC06030); psx_delay_BFC06030 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC06034: AD02854C sw $v0, -31412($t0) */ { uint32_t _pgxa = cpu->gpr[8] + -31412; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (-31412)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06034u); return; } g_debug_last_store_pc = 0xBFC06034u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAD02854Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06034u); #endif if (psx_delay_BFC06030) { psx_delay_BFC06030 = 0; if (psx_taken_BFC06030) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0603Cu); goto label_BFC0603C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06038u); } 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, 0x5u); #endif /* 0xBFC06038: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06038u; 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(0xBFC06038u); #endif label_BFC0603C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0603Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0603Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0603Cu); #endif /* 0xBFC0603C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0603Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x85u); #endif /* 0xBFC06040: 00E01025 or $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(0x00E01025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC06044: 03E00008 jr $ra */ psx_delay_BFC06044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06048: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC06048u); #endif if (psx_delay_BFC06044) { psx_delay_BFC06044 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0604C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0604Cu); int psx_delay_BFC06058 = 0; int psx_taken_BFC06058 = 0; int psx_delay_BFC06060 = 0; int psx_taken_BFC06060 = 0; int psx_delay_BFC06068 = 0; int psx_delay_BFC0607C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06060u: goto label_BFC06060; case 0xBFC06068u: goto label_BFC06068; case 0xBFC06070u: goto label_BFC06070; default: break; } } label_BFC0604C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0604Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0604Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0604Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0604C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20010000u); #endif /* 0xBFC06050: 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, 0xBFC06050u); return; } g_debug_last_store_pc = 0xBFC06050u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC06050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06054: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06054u); return; } g_debug_last_store_pc = 0xBFC06054u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x11u); #endif /* 0xBFC06058: 10800005 beq $a0, $zero, 0xBFC06070 */ uint32_t psx_brA_BFC06058 = cpu->gpr[4]; uint32_t psx_brB_BFC06058 = cpu->gpr[0]; psx_taken_BFC06058 = (psx_brA_BFC06058 == psx_brB_BFC06058); psx_delay_BFC06058 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0605Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0605C: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0605Cu); #endif if (psx_delay_BFC06058) { psx_delay_BFC06058 = 0; if (psx_taken_BFC06058) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06070u); goto label_BFC06070; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06060u); } label_BFC06060: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06060u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06060: 04C00003 bltz $a2, 0xBFC06070 */ uint32_t psx_brA_BFC06060 = cpu->gpr[6]; psx_taken_BFC06060 = ((int32_t)psx_brA_BFC06060 < 0); psx_delay_BFC06060 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC06064: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06064u); #endif if (psx_delay_BFC06060) { psx_delay_BFC06060 = 0; if (psx_taken_BFC06060) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06070u); goto label_BFC06070; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06068u); } label_BFC06068: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06068u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06068: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC06070u; /* jal link before delay slot */ psx_delay_BFC06068 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0606Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0606C: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0606Cu); #endif if (psx_delay_BFC06068) { psx_delay_BFC06068 = 0; cpu->gpr[31] = 0xBFC06070u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC06070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06070u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06070u); #endif /* 0xBFC06070: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06070u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x10005u); #endif /* 0xBFC06074: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06078u); #endif /* 0xBFC06078: 8FB00010 lw $s0, 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, 0xBFC06078u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC0607C: 03E00008 jr $ra */ psx_delay_BFC0607C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06080: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC06080u); #endif if (psx_delay_BFC0607C) { psx_delay_BFC0607C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06084(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06084u); int psx_delay_BFC06090 = 0; int psx_taken_BFC06090 = 0; int psx_delay_BFC06098 = 0; int psx_taken_BFC06098 = 0; int psx_delay_BFC060A0 = 0; int psx_delay_BFC060B4 = 0; int psx_delay_BFC060BC = 0; int psx_taken_BFC060BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06098u: goto label_BFC06098; case 0xBFC060A0u: goto label_BFC060A0; case 0xBFC060A8u: goto label_BFC060A8; case 0xBFC060BCu: goto label_BFC060BC; default: break; } } label_BFC06084: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06084u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06084: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20010000u); #endif /* 0xBFC06088: 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, 0xBFC06088u); return; } g_debug_last_store_pc = 0xBFC06088u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC06088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0608Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0608C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0608Cu); return; } g_debug_last_store_pc = 0xBFC0608Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x11u); #endif /* 0xBFC06090: 10800005 beq $a0, $zero, 0xBFC060A8 */ uint32_t psx_brA_BFC06090 = cpu->gpr[4]; uint32_t psx_brB_BFC06090 = cpu->gpr[0]; psx_taken_BFC06090 = (psx_brA_BFC06090 == psx_brB_BFC06090); psx_delay_BFC06090 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC06094: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06094u); #endif if (psx_delay_BFC06090) { psx_delay_BFC06090 = 0; if (psx_taken_BFC06090) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060A8u); goto label_BFC060A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06098u); } label_BFC06098: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06098u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06098: 18A00008 blez $a1, 0xBFC060BC */ uint32_t psx_brA_BFC06098 = cpu->gpr[5]; psx_taken_BFC06098 = ((int32_t)psx_brA_BFC06098 <= 0); psx_delay_BFC06098 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0609Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0609C: 00A03025 or $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(0x00A03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0609Cu); #endif if (psx_delay_BFC06098) { psx_delay_BFC06098 = 0; if (psx_taken_BFC06098) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060BCu); goto label_BFC060BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060A0u); } label_BFC060A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC060A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC060A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC060A0: 0FF021B1 jal 0xBFC086C4 */ cpu->gpr[31] = 0xBFC060A8u; /* jal link before delay slot */ psx_delay_BFC060A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC060A4: 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(0xBFC060A4u); #endif if (psx_delay_BFC060A0) { psx_delay_BFC060A0 = 0; cpu->gpr[31] = 0xBFC060A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086C4u); cpu->pc = 0xBFC086C4u; return; } label_BFC060A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC060A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC060A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060A8u); #endif /* 0xBFC060A8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC060A8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x10005u); #endif /* 0xBFC060AC: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC060ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060B0u); #endif /* 0xBFC060B0: 8FB00010 lw $s0, 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, 0xBFC060B0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC060B4: 03E00008 jr $ra */ psx_delay_BFC060B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC060B8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC060B8u); #endif if (psx_delay_BFC060B4) { psx_delay_BFC060B4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x1u); #endif /* 0xBFC060BC: 1000FFFA beq $zero, $zero, 0xBFC060A8 */ uint32_t psx_brA_BFC060BC = cpu->gpr[0]; uint32_t psx_brB_BFC060BC = cpu->gpr[0]; psx_taken_BFC060BC = (psx_brA_BFC060BC == psx_brB_BFC060BC); psx_delay_BFC060BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC060C0: 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(0xBFC060C0u); #endif if (psx_delay_BFC060BC) { psx_delay_BFC060BC = 0; if (psx_taken_BFC060BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060A8u); goto label_BFC060A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060C4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060C4u); cpu->pc = 0xBFC060C4u; return; /* fallthrough */ } void OpenBIOS_func_1FC060C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC060C4u); int psx_delay_BFC060C4 = 0; int psx_taken_BFC060C4 = 0; int psx_delay_BFC060CC = 0; int psx_taken_BFC060CC = 0; int psx_delay_BFC060D4 = 0; int psx_delay_BFC060DC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC060CCu: goto label_BFC060CC; case 0xBFC060D4u: goto label_BFC060D4; case 0xBFC060DCu: goto label_BFC060DC; default: break; } } label_BFC060C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC060C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC060C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC060C4: 10800005 beq $a0, $zero, 0xBFC060DC */ uint32_t psx_brA_BFC060C4 = cpu->gpr[4]; uint32_t psx_brB_BFC060C4 = cpu->gpr[0]; psx_taken_BFC060C4 = (psx_brA_BFC060C4 == psx_brB_BFC060C4); psx_delay_BFC060C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC060C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC060C8u); #endif if (psx_delay_BFC060C4) { psx_delay_BFC060C4 = 0; if (psx_taken_BFC060C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060DCu); goto label_BFC060DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060CCu); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC060CC: 10A00003 beq $a1, $zero, 0xBFC060DC */ uint32_t psx_brA_BFC060CC = cpu->gpr[5]; uint32_t psx_brB_BFC060CC = cpu->gpr[0]; psx_taken_BFC060CC = (psx_brA_BFC060CC == psx_brB_BFC060CC); psx_delay_BFC060CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC060D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC060D0u); #endif if (psx_delay_BFC060CC) { psx_delay_BFC060CC = 0; if (psx_taken_BFC060CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060DCu); goto label_BFC060DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC060D4u); } label_BFC060D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC060D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC060D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC060D4: 0BF0219D j 0xBFC08674 */ 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, 0xBFC08674u); cpu->pc = 0xBFC08674u; return; } 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, 0x80000001u); #endif /* 0xBFC060DC: 03E00008 jr $ra */ psx_delay_BFC060DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC060E0: 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(0xBFC060E0u); #endif if (psx_delay_BFC060DC) { psx_delay_BFC060DC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC060E4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC060E4u); int psx_delay_BFC06108 = 0; label_BFC060E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC060E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC060E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC060E4: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC060E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060E8u); #endif /* 0xBFC060E8: 8C648548 lw $a0, -31416($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -31416; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC060E8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C648548u, _pgxa, cpu->gpr[4]); } #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, 0x4u); #endif /* 0xBFC060EC: 3C0241C6 lui $v0, 0x41C6 */ cpu->gpr[2] = 0x41C60000u; PGXP_ALU(0x3C0241C6u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC060ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC060F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC060F0: 24424E6D addiu $v0, $v0, 20077 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20077)); PGXP_ALU(0x24424E6Du, cpu->gpr[2], _pgx1, 0x00004E6Du); } #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, 0x14u); #endif /* 0xBFC060F4: 00820018 mult $a0, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[4] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[4])); #endif PGXP_MULDIV(0x00820018u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[2]); #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, 0x4u); #endif /* 0xBFC060F8: 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(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: 24423039 addiu $v0, $v0, 12345 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (12345)); PGXP_ALU(0x24423039u, cpu->gpr[2], _pgx1, 0x00003039u); } #ifdef PSX_COSIM cosim_instr(0xBFC060FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06100: AC628548 sw $v0, -31416($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -31416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-31416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06100u); return; } g_debug_last_store_pc = 0xBFC06100u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC628548u, _pgxa, cpu->gpr[2]); } #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: 00021402 srl $v0, $v0, 16 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 16u; PGXP_ALU(0x00021402u, cpu->gpr[2], _pgx1, 16u); } #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, 0x80000001u); #endif /* 0xBFC06108: 03E00008 jr $ra */ psx_delay_BFC06108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0610Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0610C: 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(0xBFC0610Cu); #endif if (psx_delay_BFC06108) { psx_delay_BFC06108 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06110(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06110u); int psx_delay_BFC06114 = 0; label_BFC06110: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06110u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06110: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06114: 03E00008 jr $ra */ psx_delay_BFC06114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06118: AC448548 sw $a0, -31416($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -31416; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-31416)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06118u); return; } g_debug_last_store_pc = 0xBFC06118u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC448548u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06118u); #endif if (psx_delay_BFC06114) { psx_delay_BFC06114 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0611C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0611Cu); int psx_delay_BFC0611C = 0; int psx_taken_BFC0611C = 0; int psx_delay_BFC06128 = 0; int psx_delay_BFC06148 = 0; int psx_delay_BFC0615C = 0; int psx_taken_BFC0615C = 0; int psx_delay_BFC06164 = 0; int psx_taken_BFC06164 = 0; int psx_delay_BFC06178 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06124u: goto label_BFC06124; case 0xBFC06130u: goto label_BFC06130; case 0xBFC06138u: goto label_BFC06138; case 0xBFC06150u: goto label_BFC06150; case 0xBFC06164u: goto label_BFC06164; case 0xBFC0616Cu: goto label_BFC0616C; case 0xBFC06170u: goto label_BFC06170; default: break; } } label_BFC0611C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0611Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0611Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0611Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0611C: 1CC00004 bgtz $a2, 0xBFC06130 */ uint32_t psx_brA_BFC0611C = cpu->gpr[6]; psx_taken_BFC0611C = ((int32_t)psx_brA_BFC0611C > 0); psx_delay_BFC0611C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06120: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06120u); #endif if (psx_delay_BFC0611C) { psx_delay_BFC0611C = 0; if (psx_taken_BFC0611C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06130u); goto label_BFC06130; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06124u); } label_BFC06124: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06124u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06124: 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(0xBFC06124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06128: 03E00008 jr $ra */ psx_delay_BFC06128 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0612Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC0612C: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0612Cu); #endif if (psx_delay_BFC06128) { psx_delay_BFC06128 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x20000000u); #endif /* 0xBFC06130: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06134: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06134u); return; } g_debug_last_store_pc = 0xBFC06134u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06134u); #endif label_BFC06138: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06138u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06138u); #endif /* 0xBFC06138: 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, 0xBFC06138u); 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(0xBFC06138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0613Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0613C: 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(0xBFC0613Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC06140: 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, 0xBFC06140u); return; } g_debug_last_store_pc = 0xBFC06140u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } #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, 0x20000020u); #endif /* 0xBFC06144: 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, 0xBFC06144u); return; } g_debug_last_store_pc = 0xBFC06144u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC06144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC06148: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06150u; /* jalr link before delay slot */ psx_delay_BFC06148 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0614Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0614C: 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, 0xBFC0614Cu); return; } g_debug_last_store_pc = 0xBFC0614Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0614Cu); #endif if (psx_delay_BFC06148) { psx_delay_BFC06148 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06150u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06150: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06150u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06150u); #endif /* 0xBFC06150: 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, 0xBFC06150u); 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(0xBFC06150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06154u); #endif /* 0xBFC06154: 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, 0xBFC06154u); 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(0xBFC06154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06158u); #endif /* 0xBFC06158: 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, 0xBFC06158u); 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(0xBFC06158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0615Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0615C: 10400004 beq $v0, $zero, 0xBFC06170 */ uint32_t psx_brA_BFC0615C = cpu->gpr[2]; uint32_t psx_brB_BFC0615C = cpu->gpr[0]; psx_taken_BFC0615C = (psx_brA_BFC0615C == psx_brB_BFC0615C); psx_delay_BFC0615C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06160: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06160u); #endif if (psx_delay_BFC0615C) { psx_delay_BFC0615C = 0; if (psx_taken_BFC0615C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06170u); goto label_BFC06170; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06164u); } label_BFC06164: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06164u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06164: 1CC0FFF4 bgtz $a2, 0xBFC06138 */ uint32_t psx_brA_BFC06164 = cpu->gpr[6]; psx_taken_BFC06164 = ((int32_t)psx_brA_BFC06164 > 0); psx_delay_BFC06164 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06168: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06168u); #endif if (psx_delay_BFC06164) { psx_delay_BFC06164 = 0; if (psx_taken_BFC06164) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06138u); goto label_BFC06138; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0616Cu); } label_BFC0616C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0616Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0616Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0616Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0616C: 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(0xBFC0616Cu); #endif label_BFC06170: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06170u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06170u); #endif /* 0xBFC06170: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06170u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _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, 0x25u); #endif /* 0xBFC06174: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC06178: 03E00008 jr $ra */ psx_delay_BFC06178 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0617Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0617C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0617Cu); #endif if (psx_delay_BFC06178) { psx_delay_BFC06178 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06180(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06180u); int psx_delay_BFC061A4 = 0; int psx_taken_BFC061A4 = 0; int psx_delay_BFC061C4 = 0; int psx_delay_BFC061EC = 0; int psx_delay_BFC061F8 = 0; int psx_taken_BFC061F8 = 0; int psx_delay_BFC06208 = 0; int psx_taken_BFC06208 = 0; int psx_delay_BFC06210 = 0; int psx_taken_BFC06210 = 0; int psx_delay_BFC06218 = 0; int psx_taken_BFC06218 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC061A0u: goto label_BFC061A0; case 0xBFC061ACu: goto label_BFC061AC; case 0xBFC061B0u: goto label_BFC061B0; case 0xBFC061CCu: goto label_BFC061CC; case 0xBFC061F4u: goto label_BFC061F4; case 0xBFC06200u: goto label_BFC06200; case 0xBFC06210u: goto label_BFC06210; case 0xBFC06218u: goto label_BFC06218; default: break; } } label_BFC06180: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06180u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06180: 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(0xBFC06180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC06184: 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, 0xBFC06184u); return; } g_debug_last_store_pc = 0xBFC06184u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC06188: 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, 0xBFC06188u); return; } g_debug_last_store_pc = 0xBFC06188u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC06188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0618Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0618C: 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, 0xBFC0618Cu); return; } g_debug_last_store_pc = 0xBFC0618Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0618Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC06190: 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, 0xBFC06190u); return; } g_debug_last_store_pc = 0xBFC06190u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0x20000010u); #endif /* 0xBFC06194: 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, 0xBFC06194u); return; } g_debug_last_store_pc = 0xBFC06194u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } #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, 0x40021u); #endif /* 0xBFC06198: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0619Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC0619C: 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(0xBFC0619Cu); #endif 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, 0x20044u); #endif /* 0xBFC061A0: 0226102A slt $v0, $s1, $a2 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (int32_t)cpu->gpr[6] ? 1 : 0); PGXP_ALU(0x0226102Au, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC061A4: 14400009 bne $v0, $zero, 0xBFC061CC */ uint32_t psx_brA_BFC061A4 = cpu->gpr[2]; uint32_t psx_brB_BFC061A4 = cpu->gpr[0]; psx_taken_BFC061A4 = (psx_brA_BFC061A4 != psx_brB_BFC061A4); psx_delay_BFC061A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30040u); #endif /* 0xBFC061A8: 00D18023 subu $s0, $a2, $s1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[16] = cpu->gpr[6] - cpu->gpr[17]; PGXP_ALU(0x00D18023u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC061A8u); #endif if (psx_delay_BFC061A4) { psx_delay_BFC061A4 = 0; if (psx_taken_BFC061A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC061CCu); goto label_BFC061CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC061ACu); } label_BFC061AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC061ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC061ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC061AC: 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(0xBFC061ACu); #endif label_BFC061B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC061B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC061B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061B0u); #endif /* 0xBFC061B0: 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, 0xBFC061B0u); 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(0xBFC061B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061B4u); #endif /* 0xBFC061B4: 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, 0xBFC061B4u); 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(0xBFC061B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061B8u); #endif /* 0xBFC061B8: 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, 0xBFC061B8u); 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(0xBFC061B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061BCu); #endif /* 0xBFC061BC: 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, 0xBFC061BCu); 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(0xBFC061BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC061C0: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC061C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC061C4: 03E00008 jr $ra */ psx_delay_BFC061C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC061C8: 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(0xBFC061C8u); #endif if (psx_delay_BFC061C4) { psx_delay_BFC061C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC061CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC061CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC061CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC061CC: 00108043 sra $s0, $s0, 1 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] >> 1u); PGXP_ALU(0x00108043u, cpu->gpr[16], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC061CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10080u); #endif /* 0xBFC061D0: 02070018 mult $s0, $a3 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[16] * (int64_t)(int32_t)cpu->gpr[7]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[16])); #endif PGXP_MULDIV(0x02070018u, cpu->hi, cpu->lo, cpu->gpr[16], cpu->gpr[7]); #ifdef PSX_COSIM cosim_instr(0xBFC061D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061D4u); #endif /* 0xBFC061D4: 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, 0xBFC061D4u); 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(0xBFC061D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061D8u); #endif /* 0xBFC061D8: 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, 0xBFC061D8u); 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(0xBFC061D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC061DC: 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, 0xBFC061DCu); return; } g_debug_last_store_pc = 0xBFC061DCu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60030u, _pgxa, cpu->gpr[6]); } #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, 0x20000080u); #endif /* 0xBFC061E0: 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, 0xBFC061E0u); return; } g_debug_last_store_pc = 0xBFC061E0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70034u, _pgxa, cpu->gpr[7]); } #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, 0x10u); #endif /* 0xBFC061E4: 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(0xBFC061E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010u); #endif /* 0xBFC061E8: 02442021 addu $a0, $s2, $a0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[4]; PGXP_ALU(0x02442021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000004u); #endif /* 0xBFC061EC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC061F4u; /* jalr link before delay slot */ psx_delay_BFC061EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC061F0: AFA40010 sw $a0, 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, 0xBFC061F0u); return; } g_debug_last_store_pc = 0xBFC061F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC061F0u); #endif if (psx_delay_BFC061EC) { psx_delay_BFC061EC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC061F4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC061F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC061F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC061F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061F4u); #endif /* 0xBFC061F4: 8FA40010 lw $a0, 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, 0xBFC061F4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x5u); #endif /* 0xBFC061F8: 1040FFED beq $v0, $zero, 0xBFC061B0 */ uint32_t psx_brA_BFC061F8 = cpu->gpr[2]; uint32_t psx_brB_BFC061F8 = cpu->gpr[0]; psx_taken_BFC061F8 = (psx_brA_BFC061F8 == psx_brB_BFC061F8); psx_delay_BFC061F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC061FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC061FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC061FCu); #endif if (psx_delay_BFC061F8) { psx_delay_BFC061F8 = 0; if (psx_taken_BFC061F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC061B0u); goto label_BFC061B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06200u); } label_BFC06200: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06200u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06200u); #endif /* 0xBFC06200: 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, 0xBFC06200u); 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(0xBFC06200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06204u); #endif /* 0xBFC06204: 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, 0xBFC06204u); 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(0xBFC06204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06208: 04410003 bgez $v0, 0xBFC06218 */ uint32_t psx_brA_BFC06208 = cpu->gpr[2]; psx_taken_BFC06208 = ((int32_t)psx_brA_BFC06208 >= 0); psx_delay_BFC06208 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0620Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0620C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0620Cu); #endif if (psx_delay_BFC06208) { psx_delay_BFC06208 = 0; if (psx_taken_BFC06208) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06218u); goto label_BFC06218; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06210u); } label_BFC06210: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06210u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06210: 1000FFE3 beq $zero, $zero, 0xBFC061A0 */ uint32_t psx_brA_BFC06210 = cpu->gpr[0]; uint32_t psx_brB_BFC06210 = cpu->gpr[0]; psx_taken_BFC06210 = (psx_brA_BFC06210 == psx_brB_BFC06210); psx_delay_BFC06210 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10040u); #endif /* 0xBFC06214: 2606FFFF addiu $a2, $s0, -1 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); PGXP_ALU(0x2606FFFFu, cpu->gpr[6], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC06214u); #endif if (psx_delay_BFC06210) { psx_delay_BFC06210 = 0; if (psx_taken_BFC06210) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC061A0u); goto label_BFC061A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06218u); } 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, 0x1u); #endif /* 0xBFC06218: 1000FFE1 beq $zero, $zero, 0xBFC061A0 */ uint32_t psx_brA_BFC06218 = cpu->gpr[0]; uint32_t psx_brB_BFC06218 = cpu->gpr[0]; psx_taken_BFC06218 = (psx_brA_BFC06218 == psx_brB_BFC06218); psx_delay_BFC06218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0621Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC0621C: 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(0xBFC0621Cu); #endif if (psx_delay_BFC06218) { psx_delay_BFC06218 = 0; if (psx_taken_BFC06218) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC061A0u); goto label_BFC061A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06220u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06220u); cpu->pc = 0xBFC06220u; return; /* fallthrough */ } void OpenBIOS_func_1FC06220(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06220u); int psx_delay_BFC06224 = 0; int psx_taken_BFC06224 = 0; int psx_delay_BFC06240 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0622Cu: goto label_BFC0622C; default: break; } } label_BFC06220: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06220u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06220: 2C82000F sltiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x0000000Fu ? 1 : 0); PGXP_ALU(0x2C82000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } #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, 0x5u); #endif /* 0xBFC06224: 10400012 beq $v0, $zero, 0xBFC06270 */ uint32_t psx_brA_BFC06224 = cpu->gpr[2]; uint32_t psx_brB_BFC06224 = cpu->gpr[0]; psx_taken_BFC06224 = (psx_brA_BFC06224 == psx_brB_BFC06224); psx_delay_BFC06224 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06228: 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(0xBFC06228u); #endif if (psx_delay_BFC06224) { psx_delay_BFC06224 = 0; if (psx_taken_BFC06224) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06270u); cpu->pc = 0xBFC06270u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0622Cu); } label_BFC0622C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0622Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0622Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0622Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0622C: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC06230: 2442A2DC addiu $v0, $v0, -23844 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-23844)); PGXP_ALU(0x2442A2DCu, cpu->gpr[2], _pgx1, 0xFFFFA2DCu); } #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, 0x14u); #endif /* 0xBFC06234: 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(0xBFC06234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06238u); #endif /* 0xBFC06238: 8C420000 lw $v0, 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, 0xBFC06238u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0623Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0623C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0623Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06240: 00400008 jr $v0 */ psx_delay_BFC06240 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06244: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06244u); #endif if (psx_delay_BFC06240) { psx_delay_BFC06240 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC06248(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06248u); int psx_delay_BFC0624C = 0; label_BFC06248: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06248u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06248: 3C022026 lui $v0, 0x2026 */ cpu->gpr[2] = 0x20260000u; PGXP_ALU(0x3C022026u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0624Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0624C: 03E00008 jr $ra */ psx_delay_BFC0624C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06250: 24420101 addiu $v0, $v0, 257 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (257)); PGXP_ALU(0x24420101u, cpu->gpr[2], _pgx1, 0x00000101u); } #ifdef PSX_COSIM cosim_instr(0xBFC06250u); #endif if (psx_delay_BFC0624C) { psx_delay_BFC0624C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06254(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06254u); int psx_delay_BFC06258 = 0; label_BFC06254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06254u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06254: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #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, 0x80000001u); #endif /* 0xBFC06258: 03E00008 jr $ra */ psx_delay_BFC06258 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0625Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0625C: 2442A318 addiu $v0, $v0, -23784 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-23784)); PGXP_ALU(0x2442A318u, cpu->gpr[2], _pgx1, 0xFFFFA318u); } #ifdef PSX_COSIM cosim_instr(0xBFC0625Cu); #endif if (psx_delay_BFC06258) { psx_delay_BFC06258 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06260(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06260u); int psx_delay_BFC06268 = 0; label_BFC06260: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06260u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC06260: 40027800 mfc0 $v0, cop0[15] */ cpu->gpr[2] = cpu->cop0[15]; #ifdef PSX_ENABLE_BLOCK_CYCLES cpu->ld_absorb = 0u; cpu->ld_which_t = 2u; #endif PGXP_ALU(0x40027800u, cpu->gpr[2], 0u, 0u); #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, 0x1u); #endif /* 0xBFC06264: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC06268: 03E00008 jr $ra */ psx_delay_BFC06268 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0626Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0626C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0626Cu); #endif if (psx_delay_BFC06268) { psx_delay_BFC06268 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06270(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06270u); int psx_delay_BFC06270 = 0; label_BFC06270: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06270u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06270: 03E00008 jr $ra */ psx_delay_BFC06270 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06274: 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(0xBFC06274u); #endif if (psx_delay_BFC06270) { psx_delay_BFC06270 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06278(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06278u); int psx_delay_BFC06280 = 0; label_BFC06278: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06278u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06278: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0627Cu); #endif /* 0xBFC0627C: 8C420060 lw $v0, 96($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0627Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420060u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC06284: 00021280 sll $v0, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 10u; PGXP_ALU(0x00021280u, cpu->gpr[2], _pgx1, 10u); } #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 OpenBIOS_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_BFC06288 = 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, 0x80000001u); #endif /* 0xBFC06288: 03E00008 jr $ra */ psx_delay_BFC06288 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0628Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0628C: 24020400 addiu $v0, $zero, 1024 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (1024)); PGXP_ALU(0x24020400u, cpu->gpr[2], _pgx1, 0x00000400u); } #ifdef PSX_COSIM cosim_instr(0xBFC0628Cu); #endif if (psx_delay_BFC06288) { psx_delay_BFC06288 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06290(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06290u); int psx_delay_BFC06290 = 0; label_BFC06290: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06290u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06290: 03E00008 jr $ra */ psx_delay_BFC06290 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06294: 24020200 addiu $v0, $zero, 512 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); PGXP_ALU(0x24020200u, cpu->gpr[2], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0xBFC06294u); #endif if (psx_delay_BFC06290) { psx_delay_BFC06290 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06298(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06298u); int psx_delay_BFC06298 = 0; label_BFC06298: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06298u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06298: 03E00008 jr $ra */ psx_delay_BFC06298 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0629Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0629C: 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(0xBFC0629Cu); #endif if (psx_delay_BFC06298) { psx_delay_BFC06298 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC062A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC062A0u); int psx_delay_BFC062A0 = 0; label_BFC062A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC062A0: 03E00008 jr $ra */ psx_delay_BFC062A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC062A4: 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(0xBFC062A4u); #endif if (psx_delay_BFC062A0) { psx_delay_BFC062A0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC062A8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC062A8u); int psx_delay_BFC062B8 = 0; int psx_taken_BFC062B8 = 0; int psx_delay_BFC062C4 = 0; int psx_taken_BFC062C4 = 0; int psx_delay_BFC062D0 = 0; int psx_taken_BFC062D0 = 0; int psx_delay_BFC062D8 = 0; int psx_taken_BFC062D8 = 0; int psx_delay_BFC062E4 = 0; int psx_delay_BFC062F0 = 0; int psx_taken_BFC062F0 = 0; int psx_delay_BFC062FC = 0; int psx_taken_BFC062FC = 0; int psx_delay_BFC0631C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC062C0u: goto label_BFC062C0; case 0xBFC062CCu: goto label_BFC062CC; case 0xBFC062D8u: goto label_BFC062D8; case 0xBFC062E0u: goto label_BFC062E0; case 0xBFC062ECu: goto label_BFC062EC; case 0xBFC062F8u: goto label_BFC062F8; case 0xBFC06304u: goto label_BFC06304; case 0xBFC06308u: goto label_BFC06308; case 0xBFC06310u: goto label_BFC06310; default: break; } } label_BFC062A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC062A8: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC062A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062ACu); #endif /* 0xBFC062AC: 8C651060 lw $a1, 4192($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062ACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C651060u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC062ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC062B0: 2402F8FF addiu $v0, $zero, -1793 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-1793)); PGXP_ALU(0x2402F8FFu, cpu->gpr[2], _pgx1, 0xFFFFF8FFu); } #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, 0x41u); #endif /* 0xBFC062B4: 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(0xBFC062B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC062B8: 10860012 beq $a0, $a2, 0xBFC06304 */ uint32_t psx_brA_BFC062B8 = cpu->gpr[4]; uint32_t psx_brB_BFC062B8 = cpu->gpr[6]; psx_taken_BFC062B8 = (psx_brA_BFC062B8 == psx_brB_BFC062B8); psx_delay_BFC062B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC062BC: 00A21024 and $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] & cpu->gpr[2]; PGXP_ALU(0x00A21024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC062BCu); #endif if (psx_delay_BFC062B8) { psx_delay_BFC062B8 = 0; if (psx_taken_BFC062B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06304u); goto label_BFC06304; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062C0u); } label_BFC062C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC062C0: 28860009 slti $a2, $a0, 9 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[4] < (9) ? 1 : 0); PGXP_ALU(0x28860009u, cpu->gpr[6], _pgx1, 0x0009u); } #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, 0x41u); #endif /* 0xBFC062C4: 10C00009 beq $a2, $zero, 0xBFC062EC */ uint32_t psx_brA_BFC062C4 = cpu->gpr[6]; uint32_t psx_brB_BFC062C4 = cpu->gpr[0]; psx_taken_BFC062C4 = (psx_brA_BFC062C4 == psx_brB_BFC062C4); psx_delay_BFC062C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC062C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC062C8u); #endif if (psx_delay_BFC062C4) { psx_delay_BFC062C4 = 0; if (psx_taken_BFC062C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062ECu); goto label_BFC062EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062CCu); } 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, 0x21u); #endif /* 0xBFC062CC: 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(0xBFC062CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC062D0: 1085000D beq $a0, $a1, 0xBFC06308 */ uint32_t psx_brA_BFC062D0 = cpu->gpr[4]; uint32_t psx_brB_BFC062D0 = cpu->gpr[5]; psx_taken_BFC062D0 = (psx_brA_BFC062D0 == psx_brB_BFC062D0); psx_delay_BFC062D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC062D4: 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(0xBFC062D4u); #endif if (psx_delay_BFC062D0) { psx_delay_BFC062D0 = 0; if (psx_taken_BFC062D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06308u); goto label_BFC06308; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062D8u); } label_BFC062D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC062D8: 1085000B beq $a0, $a1, 0xBFC06308 */ uint32_t psx_brA_BFC062D8 = cpu->gpr[4]; uint32_t psx_brB_BFC062D8 = cpu->gpr[5]; psx_taken_BFC062D8 = (psx_brA_BFC062D8 == psx_brB_BFC062D8); psx_delay_BFC062D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC062DC: 34420400 ori $v0, $v0, 0x400 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x400u; PGXP_ALU(0x34420400u, cpu->gpr[2], _pgx1, 0x0400u); } #ifdef PSX_COSIM cosim_instr(0xBFC062DCu); #endif if (psx_delay_BFC062D8) { psx_delay_BFC062D8 = 0; if (psx_taken_BFC062D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06308u); goto label_BFC06308; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062E0u); } label_BFC062E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC062E0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x0u); #endif /* 0xBFC062E4: 0BF013D9 j 0xBFC04F64 */ psx_delay_BFC062E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC062E8: 248499E8 addiu $a0, $a0, -26136 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26136)); PGXP_ALU(0x248499E8u, cpu->gpr[4], _pgx1, 0xFFFF99E8u); } #ifdef PSX_COSIM cosim_instr(0xBFC062E8u); #endif if (psx_delay_BFC062E4) { psx_delay_BFC062E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC062EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC062ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC062EC: 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(0xBFC062ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC062F0: 1482FFFB bne $a0, $v0, 0xBFC062E0 */ uint32_t psx_brA_BFC062F0 = cpu->gpr[4]; uint32_t psx_brB_BFC062F0 = cpu->gpr[2]; psx_taken_BFC062F0 = (psx_brA_BFC062F0 != psx_brB_BFC062F0); psx_delay_BFC062F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC062F4: 34A50700 ori $a1, $a1, 0x700 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] | 0x700u; PGXP_ALU(0x34A50700u, cpu->gpr[5], _pgx1, 0x0700u); } #ifdef PSX_COSIM cosim_instr(0xBFC062F4u); #endif if (psx_delay_BFC062F0) { psx_delay_BFC062F0 = 0; if (psx_taken_BFC062F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062E0u); goto label_BFC062E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC062F8u); } label_BFC062F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC062F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC062F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC062F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC062F8: AC651060 sw $a1, 4192($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC062F8u); return; } g_debug_last_store_pc = 0xBFC062F8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC651060u, _pgxa, cpu->gpr[5]); } #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, 0x1u); #endif /* 0xBFC062FC: 10000004 beq $zero, $zero, 0xBFC06310 */ uint32_t psx_brA_BFC062FC = cpu->gpr[0]; uint32_t psx_brB_BFC062FC = cpu->gpr[0]; psx_taken_BFC062FC = (psx_brA_BFC062FC == psx_brB_BFC062FC); psx_delay_BFC062FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06300: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06300u); #endif if (psx_delay_BFC062FC) { psx_delay_BFC062FC = 0; if (psx_taken_BFC062FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06310u); goto label_BFC06310; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06304u); } label_BFC06304: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06304u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06304: 34420300 ori $v0, $v0, 0x300 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x300u; PGXP_ALU(0x34420300u, cpu->gpr[2], _pgx1, 0x0300u); } #ifdef PSX_COSIM cosim_instr(0xBFC06304u); #endif label_BFC06308: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06308u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06308: AC621060 sw $v0, 4192($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06308u); return; } g_debug_last_store_pc = 0xBFC06308u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621060u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC0630C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0630Cu); #endif label_BFC06310: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06310u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06310: AC440060 sw $a0, 96($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06310u); return; } g_debug_last_store_pc = 0xBFC06310u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440060u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC06314: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC06318: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x0u); #endif /* 0xBFC0631C: 0BF013D9 j 0xBFC04F64 */ psx_delay_BFC0631C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06320: 24849A14 addiu $a0, $a0, -26092 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26092)); PGXP_ALU(0x24849A14u, cpu->gpr[4], _pgx1, 0xFFFF9A14u); } #ifdef PSX_COSIM cosim_instr(0xBFC06320u); #endif if (psx_delay_BFC0631C) { psx_delay_BFC0631C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } } void OpenBIOS_func_1FC06324(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06324u); int psx_delay_BFC06340 = 0; int psx_delay_BFC0634C = 0; int psx_taken_BFC0634C = 0; int psx_delay_BFC06360 = 0; int psx_delay_BFC06374 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06348u: goto label_BFC06348; case 0xBFC06354u: goto label_BFC06354; case 0xBFC06368u: goto label_BFC06368; case 0xBFC0636Cu: goto label_BFC0636C; default: break; } } label_BFC06324: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06324u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06324: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x201u); #endif /* 0xBFC06328: 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(0xBFC06328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0632Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0632C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0632Cu); return; } g_debug_last_store_pc = 0xBFC0632Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20000020u); #endif /* 0xBFC06330: 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, 0xBFC06330u); return; } g_debug_last_store_pc = 0xBFC06330u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC06330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06334: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #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, 0x41u); #endif /* 0xBFC06338: 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(0xBFC06338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0633Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0633C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #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, 0x80000004u); #endif /* 0xBFC06340: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06348u; /* jalr link before delay slot */ psx_delay_BFC06340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06344: 24A58598 addiu $a1, $a1, -31336 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-31336)); PGXP_ALU(0x24A58598u, cpu->gpr[5], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC06344u); #endif if (psx_delay_BFC06340) { psx_delay_BFC06340 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06348u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06348: 28430800 slti $v1, $v0, 2048 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (2048) ? 1 : 0); PGXP_ALU(0x28430800u, cpu->gpr[3], _pgx1, 0x0800u); } #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, 0x9u); #endif /* 0xBFC0634C: 14600007 bne $v1, $zero, 0xBFC0636C */ uint32_t psx_brA_BFC0634C = cpu->gpr[3]; uint32_t psx_brB_BFC0634C = cpu->gpr[0]; psx_taken_BFC0634C = (psx_brA_BFC0634C != psx_brB_BFC0634C); psx_delay_BFC0634C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06350: 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(0xBFC06350u); #endif if (psx_delay_BFC0634C) { psx_delay_BFC0634C = 0; if (psx_taken_BFC0634C) { #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, 0xBFC06354u); } label_BFC06354: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06354u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06354u); #endif /* 0xBFC06354: 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, 0xBFC06354u); 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(0xBFC06354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06358: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 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, 0x41u); #endif /* 0xBFC0635C: 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(0xBFC0635Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06360: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC06368u; /* jal link before delay slot */ psx_delay_BFC06360 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06364: 24A585A8 addiu $a1, $a1, -31320 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-31320)); PGXP_ALU(0x24A585A8u, cpu->gpr[5], _pgx1, 0xFFFF85A8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06364u); #endif if (psx_delay_BFC06360) { psx_delay_BFC06360 = 0; cpu->gpr[31] = 0xBFC06368u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC06368: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06368u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06368: 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(0xBFC06368u); #endif 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 /* 0xBFC0636C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0636Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC06370: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC06374: 03E00008 jr $ra */ psx_delay_BFC06374 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06378: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC06378u); #endif if (psx_delay_BFC06374) { psx_delay_BFC06374 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0637C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0637Cu); int psx_delay_BFC06398 = 0; int psx_delay_BFC063A0 = 0; int psx_taken_BFC063A0 = 0; int psx_delay_BFC063B0 = 0; int psx_delay_BFC063C4 = 0; int psx_delay_BFC063DC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC063A0u: goto label_BFC063A0; case 0xBFC063A8u: goto label_BFC063A8; case 0xBFC063B8u: goto label_BFC063B8; case 0xBFC063CCu: goto label_BFC063CC; default: break; } } label_BFC0637C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0637Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0637Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0637Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0637C: 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(0xBFC0637Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06380: 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(0xBFC06380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06384: 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, 0xBFC06384u); return; } g_debug_last_store_pc = 0xBFC06384u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #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, 0x20020000u); #endif /* 0xBFC06388: 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, 0xBFC06388u); return; } g_debug_last_store_pc = 0xBFC06388u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC0638C: 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, 0xBFC0638Cu); return; } g_debug_last_store_pc = 0xBFC0638Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #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, 0x20000020u); #endif /* 0xBFC06390: 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, 0xBFC06390u); return; } g_debug_last_store_pc = 0xBFC06390u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5002Cu, _pgxa, cpu->gpr[5]); } #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, 0x20001u); #endif /* 0xBFC06394: 241100B0 addiu $s1, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241100B0u, cpu->gpr[17], _pgx1, 0x000000B0u); } #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, 0x80020000u); #endif /* 0xBFC06398: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC063A0u; /* jalr link before delay slot */ psx_delay_BFC06398 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0639Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0639C: 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(0xBFC0639Cu); #endif if (psx_delay_BFC06398) { psx_delay_BFC06398 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC063A0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC063A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC063A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC063A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC063A0: 0440000A bltz $v0, 0xBFC063CC */ uint32_t psx_brA_BFC063A0 = cpu->gpr[2]; psx_taken_BFC063A0 = ((int32_t)psx_brA_BFC063A0 < 0); psx_delay_BFC063A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC063A4: 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(0xBFC063A4u); #endif if (psx_delay_BFC063A0) { psx_delay_BFC063A0 = 0; if (psx_taken_BFC063A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC063CCu); goto label_BFC063CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC063A8u); } label_BFC063A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC063A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC063A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063A8u); #endif /* 0xBFC063A8: 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, 0xBFC063A8u); 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(0xBFC063A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC063AC: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC063B0: 0FF018C9 jal 0xBFC06324 */ cpu->gpr[31] = 0xBFC063B8u; /* jal link before delay slot */ psx_delay_BFC063B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC063B4: 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, 0xBFC063B4u); return; } g_debug_last_store_pc = 0xBFC063B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC063B4u); #endif if (psx_delay_BFC063B0) { psx_delay_BFC063B0 = 0; cpu->gpr[31] = 0xBFC063B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06324u); cpu->pc = 0xBFC06324u; return; } label_BFC063B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC063B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC063B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC063B8: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC063B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC063BC: 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(0xBFC063BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063C0u); #endif /* 0xBFC063C0: 8FA40010 lw $a0, 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, 0xBFC063C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x80020000u); #endif /* 0xBFC063C4: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC063CCu; /* jalr link before delay slot */ 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; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC063CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 /* 0xBFC063CC: 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, 0xBFC063CCu); 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(0xBFC063CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063D0u); #endif /* 0xBFC063D0: 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, 0xBFC063D0u); 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(0xBFC063D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC063D4: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC063D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063D8u); #endif /* 0xBFC063D8: 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, 0xBFC063D8u); 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(0xBFC063D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC063DC: 03E00008 jr $ra */ psx_delay_BFC063DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC063E0: 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(0xBFC063E0u); #endif if (psx_delay_BFC063DC) { psx_delay_BFC063DC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC063E4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC063E4u); int psx_delay_BFC06404 = 0; int psx_delay_BFC0640C = 0; int psx_taken_BFC0640C = 0; int psx_delay_BFC0641C = 0; int psx_delay_BFC06428 = 0; int psx_taken_BFC06428 = 0; int psx_delay_BFC06434 = 0; int psx_delay_BFC06450 = 0; int psx_delay_BFC06464 = 0; int psx_delay_BFC06474 = 0; int psx_delay_BFC0647C = 0; int psx_delay_BFC06484 = 0; int psx_taken_BFC06484 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0640Cu: goto label_BFC0640C; case 0xBFC06414u: goto label_BFC06414; case 0xBFC06424u: goto label_BFC06424; case 0xBFC06430u: goto label_BFC06430; case 0xBFC0643Cu: goto label_BFC0643C; case 0xBFC06458u: goto label_BFC06458; case 0xBFC0646Cu: goto label_BFC0646C; case 0xBFC0647Cu: goto label_BFC0647C; case 0xBFC06484u: goto label_BFC06484; default: break; } } label_BFC063E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC063E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC063E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC063E4: 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(0xBFC063E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC063E8: 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(0xBFC063E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC063EC: 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, 0xBFC063ECu); return; } g_debug_last_store_pc = 0xBFC063ECu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC063ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC063F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC063F0: 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, 0xBFC063F0u); return; } g_debug_last_store_pc = 0xBFC063F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #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, 0x20040000u); #endif /* 0xBFC063F4: 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, 0xBFC063F4u); return; } g_debug_last_store_pc = 0xBFC063F4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x20010000u); #endif /* 0xBFC063F8: 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, 0xBFC063F8u); return; } g_debug_last_store_pc = 0xBFC063F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #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, 0x20021u); #endif /* 0xBFC063FC: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC063FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC06400: 241200B0 addiu $s2, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241200B0u, cpu->gpr[18], _pgx1, 0x000000B0u); } #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, 0x80040000u); #endif /* 0xBFC06404: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC0640Cu; /* jalr link before delay slot */ psx_delay_BFC06404 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06408: 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(0xBFC06408u); #endif if (psx_delay_BFC06404) { psx_delay_BFC06404 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC0640Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0640C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0640Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0640Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0640Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0640C: 0440000B bltz $v0, 0xBFC0643C */ uint32_t psx_brA_BFC0640C = cpu->gpr[2]; psx_taken_BFC0640C = ((int32_t)psx_brA_BFC0640C < 0); psx_delay_BFC0640C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06410: 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(0xBFC06410u); #endif if (psx_delay_BFC0640C) { psx_delay_BFC0640C = 0; if (psx_taken_BFC0640C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0643Cu); goto label_BFC0643C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06414u); } label_BFC06414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06414u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC06414: 00402025 or $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(0x00402025u, cpu->gpr[4], _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, 0x20021u); #endif /* 0xBFC06418: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0641Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0641C: 0FF018C9 jal 0xBFC06324 */ cpu->gpr[31] = 0xBFC06424u; /* jal link before delay slot */ psx_delay_BFC0641C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC06420: 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, 0xBFC06420u); return; } g_debug_last_store_pc = 0xBFC06420u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06420u); #endif if (psx_delay_BFC0641C) { psx_delay_BFC0641C = 0; cpu->gpr[31] = 0xBFC06424u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06324u); cpu->pc = 0xBFC06324u; return; } label_BFC06424: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06424u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06424u); #endif /* 0xBFC06424: 8FA40010 lw $a0, 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, 0xBFC06424u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #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, 0x5u); #endif /* 0xBFC06428: 1440000B bne $v0, $zero, 0xBFC06458 */ uint32_t psx_brA_BFC06428 = cpu->gpr[2]; uint32_t psx_brB_BFC06428 = cpu->gpr[0]; psx_taken_BFC06428 = (psx_brA_BFC06428 != psx_brB_BFC06428); psx_delay_BFC06428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0642Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC0642C: 00408025 or $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(0x00408025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0642Cu); #endif if (psx_delay_BFC06428) { psx_delay_BFC06428 = 0; if (psx_taken_BFC06428) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06458u); goto label_BFC06458; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06430u); } label_BFC06430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06430: 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(0xBFC06430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC06434: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC0643Cu; /* jalr 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, 0x1u); #endif /* 0xBFC06438: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06438u); #endif if (psx_delay_BFC06434) { psx_delay_BFC06434 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC0643Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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 /* 0xBFC0643C: 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, 0xBFC0643Cu); 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(0xBFC0643Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06440u); #endif /* 0xBFC06440: 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, 0xBFC06440u); 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(0xBFC06440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06444u); #endif /* 0xBFC06444: 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, 0xBFC06444u); 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(0xBFC06444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC06448: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0644Cu); #endif /* 0xBFC0644C: 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, 0xBFC0644Cu); 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(0xBFC0644Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06450: 03E00008 jr $ra */ psx_delay_BFC06450 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06454: 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(0xBFC06454u); #endif if (psx_delay_BFC06450) { psx_delay_BFC06450 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC06458: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06458u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06458u); #endif /* 0xBFC06458: 8E250008 lw $a1, 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, 0xBFC06458u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } PGXP_LOAD(0x8E250008u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC06458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0645Cu); #endif /* 0xBFC0645C: 8E26000C lw $a2, 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, 0xBFC0645Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000u); } PGXP_LOAD(0x8E26000Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC0645Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06460: 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(0xBFC06460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC06464: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC0646Cu; /* jalr 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, 0x20000010u); #endif /* 0xBFC06468: AFA40010 sw $a0, 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, 0xBFC06468u); return; } g_debug_last_store_pc = 0xBFC06468u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06468u); #endif if (psx_delay_BFC06464) { psx_delay_BFC06464 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC0646Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x201u); #endif /* 0xBFC0646C: 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(0xBFC0646Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06470u); #endif /* 0xBFC06470: 8FA40010 lw $a0, 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, 0xBFC06470u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC06474: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC0647Cu; /* jalr link before delay slot */ psx_delay_BFC06474 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06478: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06478u); #endif if (psx_delay_BFC06474) { psx_delay_BFC06474 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC0647Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0647C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0647Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0647Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0647Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0647C: 0FF015FC jal 0xBFC057F0 */ cpu->gpr[31] = 0xBFC06484u; /* jal link before delay slot */ psx_delay_BFC0647C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06480: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06480u); #endif if (psx_delay_BFC0647C) { psx_delay_BFC0647C = 0; cpu->gpr[31] = 0xBFC06484u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057F0u); cpu->pc = 0xBFC057F0u; return; } label_BFC06484: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06484u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06484: 1000FFED beq $zero, $zero, 0xBFC0643C */ uint32_t psx_brA_BFC06484 = cpu->gpr[0]; uint32_t psx_brB_BFC06484 = cpu->gpr[0]; psx_taken_BFC06484 = (psx_brA_BFC06484 == psx_brB_BFC06484); psx_delay_BFC06484 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06488: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06488u); #endif if (psx_delay_BFC06484) { psx_delay_BFC06484 = 0; if (psx_taken_BFC06484) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0643Cu); goto label_BFC0643C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0648Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0648Cu); cpu->pc = 0xBFC0648Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0648C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0648Cu); int psx_delay_BFC064C4 = 0; int psx_taken_BFC064C4 = 0; int psx_delay_BFC064CC = 0; int psx_taken_BFC064CC = 0; int psx_delay_BFC064EC = 0; int psx_taken_BFC064EC = 0; int psx_delay_BFC06504 = 0; int psx_taken_BFC06504 = 0; int psx_delay_BFC0651C = 0; int psx_taken_BFC0651C = 0; int psx_delay_BFC06524 = 0; int psx_taken_BFC06524 = 0; int psx_delay_BFC06558 = 0; int psx_delay_BFC06560 = 0; int psx_taken_BFC06560 = 0; int psx_delay_BFC06574 = 0; int psx_delay_BFC06584 = 0; int psx_delay_BFC06598 = 0; int psx_delay_BFC065A0 = 0; int psx_taken_BFC065A0 = 0; int psx_delay_BFC065C0 = 0; int psx_delay_BFC065CC = 0; int psx_delay_BFC065D4 = 0; int psx_taken_BFC065D4 = 0; int psx_delay_BFC065E0 = 0; int psx_taken_BFC065E0 = 0; int psx_delay_BFC065E8 = 0; int psx_taken_BFC065E8 = 0; int psx_delay_BFC065FC = 0; int psx_taken_BFC065FC = 0; int psx_delay_BFC06610 = 0; int psx_taken_BFC06610 = 0; int psx_delay_BFC06618 = 0; int psx_taken_BFC06618 = 0; int psx_delay_BFC06624 = 0; int psx_delay_BFC0662C = 0; int psx_taken_BFC0662C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC064BCu: goto label_BFC064BC; case 0xBFC064CCu: goto label_BFC064CC; case 0xBFC064D4u: goto label_BFC064D4; case 0xBFC064DCu: goto label_BFC064DC; case 0xBFC064E4u: goto label_BFC064E4; case 0xBFC064F4u: goto label_BFC064F4; case 0xBFC06500u: goto label_BFC06500; case 0xBFC0650Cu: goto label_BFC0650C; case 0xBFC06514u: goto label_BFC06514; case 0xBFC06524u: goto label_BFC06524; case 0xBFC0652Cu: goto label_BFC0652C; case 0xBFC06560u: goto label_BFC06560; case 0xBFC06568u: goto label_BFC06568; case 0xBFC0657Cu: goto label_BFC0657C; case 0xBFC06580u: goto label_BFC06580; case 0xBFC0658Cu: goto label_BFC0658C; case 0xBFC065A0u: goto label_BFC065A0; case 0xBFC065A8u: goto label_BFC065A8; case 0xBFC065C8u: goto label_BFC065C8; case 0xBFC065CCu: goto label_BFC065CC; case 0xBFC065D4u: goto label_BFC065D4; case 0xBFC065DCu: goto label_BFC065DC; case 0xBFC065E8u: goto label_BFC065E8; case 0xBFC065F0u: goto label_BFC065F0; case 0xBFC065F4u: goto label_BFC065F4; case 0xBFC06604u: goto label_BFC06604; case 0xBFC06618u: goto label_BFC06618; case 0xBFC06620u: goto label_BFC06620; case 0xBFC0662Cu: goto label_BFC0662C; default: break; } } label_BFC0648C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0648Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0648Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0648Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0648C: 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(0xBFC0648Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC06490: 27A30010 addiu $v1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A30010u, cpu->gpr[3], _pgx1, 0x00000010u); } #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, 0x20040000u); #endif /* 0xBFC06494: 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, 0xBFC06494u); return; } g_debug_last_store_pc = 0xBFC06494u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2003Cu, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC06498: 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, 0xBFC06498u); return; } g_debug_last_store_pc = 0xBFC06498u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10038u, _pgxa, cpu->gpr[17]); } #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, 0x40021u); #endif /* 0xBFC0649C: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0xA0000000u); #endif /* 0xBFC064A0: 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, 0xBFC064A0u); return; } g_debug_last_store_pc = 0xBFC064A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF004Cu, _pgxa, cpu->gpr[31]); } #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, 0x20200000u); #endif /* 0xBFC064A4: 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, 0xBFC064A4u); return; } g_debug_last_store_pc = 0xBFC064A4u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50048u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC064A8: 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, 0xBFC064A8u); return; } g_debug_last_store_pc = 0xBFC064A8u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40044u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC064AC: 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, 0xBFC064ACu); return; } g_debug_last_store_pc = 0xBFC064ACu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30040u, _pgxa, cpu->gpr[19]); } #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, 0x20010000u); #endif /* 0xBFC064B0: 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, 0xBFC064B0u); return; } g_debug_last_store_pc = 0xBFC064B0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00034u, _pgxa, cpu->gpr[16]); } #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, 0x20041u); #endif /* 0xBFC064B4: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC064B8: 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(0xBFC064B8u); #endif label_BFC064BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC064BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC064BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064BCu); #endif /* 0xBFC064BC: 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(0xBFC064BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC064C0: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC064C4: 10400007 beq $v0, $zero, 0xBFC064E4 */ uint32_t psx_brA_BFC064C4 = cpu->gpr[2]; uint32_t psx_brB_BFC064C4 = cpu->gpr[0]; psx_taken_BFC064C4 = (psx_brA_BFC064C4 == psx_brB_BFC064C4); psx_delay_BFC064C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC064C8: 2406FFDF addiu $a2, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2406FFDFu, cpu->gpr[6], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC064C8u); #endif if (psx_delay_BFC064C4) { psx_delay_BFC064C4 = 0; if (psx_taken_BFC064C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064E4u); goto label_BFC064E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064CCu); } 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, 0x24u); #endif /* 0xBFC064CC: 14450043 bne $v0, $a1, 0xBFC065DC */ uint32_t psx_brA_BFC064CC = cpu->gpr[2]; uint32_t psx_brB_BFC064CC = cpu->gpr[5]; psx_taken_BFC064CC = (psx_brA_BFC064CC != psx_brB_BFC064CC); psx_delay_BFC064CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC064D0: 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(0xBFC064D0u); #endif if (psx_delay_BFC064CC) { psx_delay_BFC064CC = 0; if (psx_taken_BFC064CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065DCu); goto label_BFC065DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064D4u); } label_BFC064D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC064D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC064D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC064D4: 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(0xBFC064D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC064D8: 2406FFDF addiu $a2, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2406FFDFu, cpu->gpr[6], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC064D8u); #endif label_BFC064DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC064DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC064DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064DCu); #endif /* 0xBFC064DC: 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(0xBFC064DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC064E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC064E0u); #endif label_BFC064E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC064E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC064E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC064E4: 2445FF9F addiu $a1, $v0, -97 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (-97)); PGXP_ALU(0x2445FF9Fu, cpu->gpr[5], _pgx1, 0xFFFFFF9Fu); } #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, 0x20u); #endif /* 0xBFC064E8: 2CA5001A sltiu $a1, $a1, 26 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2CA5001Au, cpu->gpr[5], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0xBFC064E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC064EC: 10A00004 beq $a1, $zero, 0xBFC06500 */ uint32_t psx_brA_BFC064EC = cpu->gpr[5]; uint32_t psx_brB_BFC064EC = cpu->gpr[0]; psx_taken_BFC064EC = (psx_brA_BFC064EC == psx_brB_BFC064EC); psx_delay_BFC064EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC064F0: 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(0xBFC064F0u); #endif if (psx_delay_BFC064EC) { psx_delay_BFC064EC = 0; if (psx_taken_BFC064EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06500u); goto label_BFC06500; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064F4u); } label_BFC064F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC064F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC064F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC064F4: 00461024 and $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(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC064F8: 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(0xBFC064F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC064FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC064FC: 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(0xBFC064FCu); #endif 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, 0x8u); #endif /* 0xBFC06500: 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(0xBFC06500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06504: 1440FFF5 bne $v0, $zero, 0xBFC064DC */ uint32_t psx_brA_BFC06504 = cpu->gpr[2]; uint32_t psx_brB_BFC06504 = cpu->gpr[0]; psx_taken_BFC06504 = (psx_brA_BFC06504 != psx_brB_BFC06504); psx_delay_BFC06504 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06508: A062FFFF sb $v0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06508u; 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(0xBFC06508u); #endif if (psx_delay_BFC06504) { psx_delay_BFC06504 = 0; if (psx_taken_BFC06504) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064DCu); goto label_BFC064DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0650Cu); } label_BFC0650C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0650Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0650Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0650Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0650C: 27A20010 addiu $v0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A20010u, cpu->gpr[2], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC0650Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06510: 2404003B addiu $a0, $zero, 59 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); PGXP_ALU(0x2404003Bu, cpu->gpr[4], _pgx1, 0x0000003Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC06510u); #endif label_BFC06514: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06514u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06514u); #endif /* 0xBFC06514: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC06518: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0651Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0651C: 1060003E beq $v1, $zero, 0xBFC06618 */ uint32_t psx_brA_BFC0651C = cpu->gpr[3]; uint32_t psx_brB_BFC0651C = cpu->gpr[0]; psx_taken_BFC0651C = (psx_brA_BFC0651C == psx_brB_BFC0651C); psx_delay_BFC0651C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06520: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06520u); #endif if (psx_delay_BFC0651C) { psx_delay_BFC0651C = 0; if (psx_taken_BFC0651C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06618u); goto label_BFC06618; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06524u); } label_BFC06524: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06524u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC06524: 14640030 bne $v1, $a0, 0xBFC065E8 */ uint32_t psx_brA_BFC06524 = cpu->gpr[3]; uint32_t psx_brB_BFC06524 = cpu->gpr[4]; psx_taken_BFC06524 = (psx_brA_BFC06524 != psx_brB_BFC06524); psx_delay_BFC06524 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06528: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06528u); #endif if (psx_delay_BFC06524) { psx_delay_BFC06524 = 0; if (psx_taken_BFC06524) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065E8u); goto label_BFC065E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0652Cu); } label_BFC0652C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0652Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0652Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0652Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0652C: 3C150001 lui $s5, 0x1 */ cpu->gpr[21] = 0x00010000u; PGXP_ALU(0x3C150001u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0652Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210000u); #endif /* 0xBFC06530: 26B08558 addiu $s0, $s5, -31400 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[21] + (-31400)); PGXP_ALU(0x26B08558u, cpu->gpr[16], _pgx1, 0xFFFF8558u); } #ifdef PSX_COSIM cosim_instr(0xBFC06530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06534u); #endif /* 0xBFC06534: 8E020020 lw $v0, 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, 0xBFC06534u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020020u, _pgxa, cpu->gpr[2]); } #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, 0x100000u); #endif /* 0xBFC06538: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0653Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0653C: AE828554 sw $v0, -31404($s4) */ { uint32_t _pgxa = cpu->gpr[20] + -31404; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-31404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0653Cu); return; } g_debug_last_store_pc = 0xBFC0653Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE828554u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0653Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06540u); #endif /* 0xBFC06540: 8E020024 lw $v0, 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, 0xBFC06540u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E020024u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC06544: 3C130001 lui $s3, 0x1 */ cpu->gpr[19] = 0x00010000u; PGXP_ALU(0x3C130001u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC06548: AE628550 sw $v0, -31408($s3) */ { uint32_t _pgxa = cpu->gpr[19] + -31408; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-31408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06548u); return; } g_debug_last_store_pc = 0xBFC06548u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE628550u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC0654C: 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(0xBFC0654Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC06550: 0000000C syscall */ cpu->pc = 0xBFC06550u; if (psx_syscall(cpu, cpu->gpr[2])) return; #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, 0x10021u); #endif /* 0xBFC06554: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80000000u); #endif /* 0xBFC06558: 0FF018F9 jal 0xBFC063E4 */ cpu->gpr[31] = 0xBFC06560u; /* jal link before delay slot */ psx_delay_BFC06558 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0655Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0655C: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC0655Cu); #endif if (psx_delay_BFC06558) { psx_delay_BFC06558 = 0; cpu->gpr[31] = 0xBFC06560u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC063E4u); cpu->pc = 0xBFC063E4u; return; } label_BFC06560: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06560u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06560: 1040002F beq $v0, $zero, 0xBFC06620 */ uint32_t psx_brA_BFC06560 = cpu->gpr[2]; uint32_t psx_brB_BFC06560 = cpu->gpr[0]; psx_taken_BFC06560 = (psx_brA_BFC06560 == psx_brB_BFC06560); psx_delay_BFC06560 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC06564: 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(0xBFC06564u); #endif if (psx_delay_BFC06560) { psx_delay_BFC06560 = 0; if (psx_taken_BFC06560) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06620u); goto label_BFC06620; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06568u); } 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, 0x21u); #endif /* 0xBFC06568: 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(0xBFC06568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0656Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0656C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0656Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC06570: AE120020 sw $s2, 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, 0xBFC06570u); return; } g_debug_last_store_pc = 0xBFC06570u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120020u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC06570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06574: 0FF0198D jal 0xBFC06634 */ cpu->gpr[31] = 0xBFC0657Cu; /* jal link before delay slot */ psx_delay_BFC06574 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC06578: AE110024 sw $s1, 36($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06578u); return; } g_debug_last_store_pc = 0xBFC06578u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAE110024u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC06578u); #endif if (psx_delay_BFC06574) { psx_delay_BFC06574 = 0; cpu->gpr[31] = 0xBFC0657Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06634u); cpu->pc = 0xBFC06634u; return; } label_BFC0657C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0657Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0657Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0657Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0657C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0657Cu); #endif 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, 0x21u); #endif /* 0xBFC06580: 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(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: 0FF013D9 jal 0xBFC04F64 */ 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, 0x10u); #endif /* 0xBFC06588: 24849A4C addiu $a0, $a0, -26036 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26036)); PGXP_ALU(0x24849A4Cu, cpu->gpr[4], _pgx1, 0xFFFF9A4Cu); } #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, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; 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, 0x11u); #endif /* 0xBFC0658C: 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(0xBFC0658Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC06590: 0000000C syscall */ cpu->pc = 0xBFC06590u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC06590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06594: 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(0xBFC06594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06598: 0FF018F9 jal 0xBFC063E4 */ cpu->gpr[31] = 0xBFC065A0u; /* jal link before delay slot */ psx_delay_BFC06598 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0659Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200020u); #endif /* 0xBFC0659C: 26A58558 addiu $a1, $s5, -31400 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[21] + (-31400)); PGXP_ALU(0x26A58558u, cpu->gpr[5], _pgx1, 0xFFFF8558u); } #ifdef PSX_COSIM cosim_instr(0xBFC0659Cu); #endif if (psx_delay_BFC06598) { psx_delay_BFC06598 = 0; cpu->gpr[31] = 0xBFC065A0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC063E4u); cpu->pc = 0xBFC063E4u; return; } label_BFC065A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC065A0: 1040000A beq $v0, $zero, 0xBFC065CC */ uint32_t psx_brA_BFC065A0 = cpu->gpr[2]; uint32_t psx_brB_BFC065A0 = cpu->gpr[0]; psx_taken_BFC065A0 = (psx_brA_BFC065A0 == psx_brB_BFC065A0); psx_delay_BFC065A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC065A4: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC065A4u); #endif if (psx_delay_BFC065A0) { psx_delay_BFC065A0 = 0; if (psx_taken_BFC065A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065CCu); goto label_BFC065CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065A8u); } label_BFC065A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065A8u); #endif /* 0xBFC065A8: 8E828554 lw $v0, -31404($s4) */ { uint32_t _pgxa = cpu->gpr[20] + -31404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-31404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065A8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } PGXP_LOAD(0x8E828554u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC065A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC065AC: 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(0xBFC065ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC065B0: AE020020 sw $v0, 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, 0xBFC065B0u); return; } g_debug_last_store_pc = 0xBFC065B0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC065B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065B4u); #endif /* 0xBFC065B4: 8E628550 lw $v0, -31408($s3) */ { uint32_t _pgxa = cpu->gpr[19] + -31408; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-31408)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } PGXP_LOAD(0x8E628550u, _pgxa, cpu->gpr[2]); } #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, 0x21u); #endif /* 0xBFC065B8: 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(0xBFC065B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC065BC: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC065BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC065C0: 0FF0198D jal 0xBFC06634 */ cpu->gpr[31] = 0xBFC065C8u; /* jal link before delay slot */ psx_delay_BFC065C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC065C4: AE020024 sw $v0, 36($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC065C4u); return; } g_debug_last_store_pc = 0xBFC065C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020024u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC065C4u); #endif if (psx_delay_BFC065C0) { psx_delay_BFC065C0 = 0; cpu->gpr[31] = 0xBFC065C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06634u); cpu->pc = 0xBFC06634u; return; } label_BFC065C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC065C8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC065C8u); #endif label_BFC065CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC065CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC065CC: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC065D4u; /* jal link before delay slot */ psx_delay_BFC065CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC065D0: 24849A68 addiu $a0, $a0, -26008 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26008)); PGXP_ALU(0x24849A68u, cpu->gpr[4], _pgx1, 0xFFFF9A68u); } #ifdef PSX_COSIM cosim_instr(0xBFC065D0u); #endif if (psx_delay_BFC065CC) { psx_delay_BFC065CC = 0; cpu->gpr[31] = 0xBFC065D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC065D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC065D4: 1000FFFF beq $zero, $zero, 0xBFC065D4 */ uint32_t psx_brA_BFC065D4 = cpu->gpr[0]; uint32_t psx_brB_BFC065D4 = cpu->gpr[0]; psx_taken_BFC065D4 = (psx_brA_BFC065D4 == psx_brB_BFC065D4); psx_delay_BFC065D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC065D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC065D8u); #endif if (psx_delay_BFC065D4) { psx_delay_BFC065D4 = 0; if (psx_taken_BFC065D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065D4u); goto label_BFC065D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065DCu); } label_BFC065DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC065DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC065DC: 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(0xBFC065DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC065E0: 1000FFB6 beq $zero, $zero, 0xBFC064BC */ uint32_t psx_brA_BFC065E0 = cpu->gpr[0]; uint32_t psx_brB_BFC065E0 = cpu->gpr[0]; psx_taken_BFC065E0 = (psx_brA_BFC065E0 == psx_brB_BFC065E0); psx_delay_BFC065E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC065E4: A062FFFF sb $v0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC065E4u; 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(0xBFC065E4u); #endif if (psx_delay_BFC065E0) { psx_delay_BFC065E0 = 0; if (psx_taken_BFC065E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC064BCu); goto label_BFC064BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065E8u); } label_BFC065E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC065E8: 1000FFCA beq $zero, $zero, 0xBFC06514 */ uint32_t psx_brA_BFC065E8 = cpu->gpr[0]; uint32_t psx_brB_BFC065E8 = cpu->gpr[0]; psx_taken_BFC065E8 = (psx_brA_BFC065E8 == psx_brB_BFC065E8); psx_delay_BFC065E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC065EC: 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(0xBFC065ECu); #endif if (psx_delay_BFC065E8) { psx_delay_BFC065E8 = 0; if (psx_taken_BFC065E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06514u); goto label_BFC06514; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065F0u); } label_BFC065F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC065F0: 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(0xBFC065F0u); #endif label_BFC065F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC065F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC065F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC065F4u); #endif /* 0xBFC065F4: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC065F8: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC065FC: 1460FFFC bne $v1, $zero, 0xBFC065F0 */ uint32_t psx_brA_BFC065FC = cpu->gpr[3]; uint32_t psx_brB_BFC065FC = cpu->gpr[0]; psx_taken_BFC065FC = (psx_brA_BFC065FC != psx_brB_BFC065FC); psx_delay_BFC065FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06600: 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(0xBFC06600u); #endif if (psx_delay_BFC065FC) { psx_delay_BFC065FC = 0; if (psx_taken_BFC065FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065F0u); goto label_BFC065F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06604u); } label_BFC06604: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06604u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06604: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06604u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #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, 0x9u); #endif /* 0xBFC06608: 24030031 addiu $v1, $zero, 49 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (49)); PGXP_ALU(0x24030031u, cpu->gpr[3], _pgx1, 0x00000031u); } #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, 0xCu); #endif /* 0xBFC0660C: A0430001 sb $v1, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0660Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430001u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC06610: 1000FFC6 beq $zero, $zero, 0xBFC0652C */ uint32_t psx_brA_BFC06610 = cpu->gpr[0]; uint32_t psx_brB_BFC06610 = cpu->gpr[0]; psx_taken_BFC06610 = (psx_brA_BFC06610 == psx_brB_BFC06610); psx_delay_BFC06610 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06614: A0400002 sb $zero, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06614u; 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(0xBFC06614u); #endif if (psx_delay_BFC06610) { psx_delay_BFC06610 = 0; if (psx_taken_BFC06610) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0652Cu); goto label_BFC0652C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06618u); } label_BFC06618: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06618u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06618: 1000FFF6 beq $zero, $zero, 0xBFC065F4 */ uint32_t psx_brA_BFC06618 = cpu->gpr[0]; uint32_t psx_brB_BFC06618 = cpu->gpr[0]; psx_taken_BFC06618 = (psx_brA_BFC06618 == psx_brB_BFC06618); psx_delay_BFC06618 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0661Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0661C: 27A20010 addiu $v0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A20010u, cpu->gpr[2], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC0661Cu); #endif if (psx_delay_BFC06618) { psx_delay_BFC06618 = 0; if (psx_taken_BFC06618) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC065F4u); goto label_BFC065F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06620u); } label_BFC06620: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06620u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06620: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x80000000u); #endif /* 0xBFC06624: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC0662Cu; /* jal link before delay slot */ psx_delay_BFC06624 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06628: 24849A3C addiu $a0, $a0, -26052 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-26052)); PGXP_ALU(0x24849A3Cu, cpu->gpr[4], _pgx1, 0xFFFF9A3Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC06628u); #endif if (psx_delay_BFC06624) { psx_delay_BFC06624 = 0; cpu->gpr[31] = 0xBFC0662Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC0662C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0662Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0662Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0662Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0662C: 1000FFD4 beq $zero, $zero, 0xBFC06580 */ uint32_t psx_brA_BFC0662C = cpu->gpr[0]; uint32_t psx_brB_BFC0662C = cpu->gpr[0]; psx_taken_BFC0662C = (psx_brA_BFC0662C == psx_brB_BFC0662C); psx_delay_BFC0662C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06630: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06630u); #endif if (psx_delay_BFC0662C) { psx_delay_BFC0662C = 0; if (psx_taken_BFC0662C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06580u); goto label_BFC06580; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06634u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06634u); cpu->pc = 0xBFC06634u; return; /* fallthrough */ } void OpenBIOS_func_1FC06634(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06634u); int psx_delay_BFC06650 = 0; int psx_taken_BFC06650 = 0; int psx_delay_BFC06664 = 0; int psx_taken_BFC06664 = 0; int psx_delay_BFC0666C = 0; int psx_taken_BFC0666C = 0; int psx_delay_BFC0668C = 0; int psx_delay_BFC066A8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06658u: goto label_BFC06658; case 0xBFC0665Cu: goto label_BFC0665C; case 0xBFC0666Cu: goto label_BFC0666C; case 0xBFC06674u: goto label_BFC06674; case 0xBFC06684u: goto label_BFC06684; case 0xBFC06694u: goto label_BFC06694; default: break; } } label_BFC06634: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06634u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC06634: 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, 0xBFC06634u); return; } g_debug_last_store_pc = 0xBFC06634u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC900038u, _pgxa, cpu->gpr[16]); } #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, 0x80000010u); #endif /* 0xBFC06638: 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, 0xBFC06638u); return; } g_debug_last_store_pc = 0xBFC06638u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAC9F0034u, _pgxa, cpu->gpr[31]); } #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, 0x20000010u); #endif /* 0xBFC0663C: 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, 0xBFC0663Cu); return; } g_debug_last_store_pc = 0xBFC0663Cu; cpu->write_word(psx_addr, cpu->gpr[29]); } PGXP_STORE(0xAC9D0028u, _pgxa, cpu->gpr[29]); } #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, 0x40000010u); #endif /* 0xBFC06640: 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, 0xBFC06640u); return; } g_debug_last_store_pc = 0xBFC06640u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC9E002Cu, _pgxa, cpu->gpr[30]); } #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, 0x10000010u); #endif /* 0xBFC06644: 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, 0xBFC06644u); return; } g_debug_last_store_pc = 0xBFC06644u; cpu->write_word(psx_addr, cpu->gpr[28]); } PGXP_STORE(0xAC9C0030u, _pgxa, cpu->gpr[28]); } #ifdef PSX_COSIM cosim_instr(0xBFC06644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06648u); #endif /* 0xBFC06648: 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, 0xBFC06648u); 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(0xBFC06648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0664Cu); #endif /* 0xBFC0664C: 8C8B0020 lw $t3, 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, 0xBFC0664Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } PGXP_LOAD(0x8C8B0020u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0xBFC0664Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06650: 11000006 beq $t0, $zero, 0xBFC0666C */ uint32_t psx_brA_BFC06650 = cpu->gpr[8]; uint32_t psx_brB_BFC06650 = cpu->gpr[0]; psx_taken_BFC06650 = (psx_brA_BFC06650 == psx_brB_BFC06650); psx_delay_BFC06650 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC06654: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06654u); #endif if (psx_delay_BFC06650) { psx_delay_BFC06650 = 0; if (psx_taken_BFC06650) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0666Cu); goto label_BFC0666C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06658u); } label_BFC06658: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06658u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06658u); #endif /* 0xBFC06658: 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, 0xBFC06658u); 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(0xBFC06658u); #endif label_BFC0665C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0665Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0665Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0665Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0665C: 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(0xBFC0665Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06660: 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, 0xBFC06660u); return; } g_debug_last_store_pc = 0xBFC06660u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD200000u, _pgxa, cpu->gpr[0]); } #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, 0x100u); #endif /* 0xBFC06664: 1D00FFFD bgtz $t0, 0xBFC0665C */ uint32_t psx_brA_BFC06664 = cpu->gpr[8]; psx_taken_BFC06664 = ((int32_t)psx_brA_BFC06664 > 0); psx_delay_BFC06664 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC06668: 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(0xBFC06668u); #endif if (psx_delay_BFC06664) { psx_delay_BFC06664 = 0; if (psx_taken_BFC06664) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0665Cu); goto label_BFC0665C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0666Cu); } label_BFC0666C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0666Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0666Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0666Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0666C: 11600005 beq $t3, $zero, 0xBFC06684 */ uint32_t psx_brA_BFC0666C = cpu->gpr[11]; uint32_t psx_brB_BFC0666C = cpu->gpr[0]; psx_taken_BFC0666C = (psx_brA_BFC0666C == psx_brB_BFC0666C); psx_delay_BFC0666C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06670u); #endif /* 0xBFC06670: 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, 0xBFC06670u); 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(0xBFC06670u); #endif if (psx_delay_BFC0666C) { psx_delay_BFC0666C = 0; if (psx_taken_BFC0666C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06684u); goto label_BFC06684; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06674u); } label_BFC06674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06674u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06674u); #endif /* 0xBFC06674: 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, 0xBFC06674u); 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(0xBFC06674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06678: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0667Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000A00u); #endif /* 0xBFC0667C: 0169E820 add $sp, $t3, $t1 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[11]; 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[29] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x0169E820u, cpu->gpr[29], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0667Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000001u); #endif /* 0xBFC06680: 03A0F025 or $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(0x03A0F025u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06680u); #endif label_BFC06684: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06684u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06684u); #endif /* 0xBFC06684: 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, 0xBFC06684u); 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(0xBFC06684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC06688: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x80000400u); #endif /* 0xBFC0668C: 0140F809 jalr $ra, $t2 */ cpu->gpr[31] = 0xBFC06694u; /* jalr link before delay slot */ psx_delay_BFC0668C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC06690: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06690u); #endif if (psx_delay_BFC0668C) { psx_delay_BFC0668C = 0; { uint32_t _t = cpu->gpr[10]; cpu->gpr[31] = 0xBFC06694u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06694: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06694u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06694u); #endif /* 0xBFC06694: 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, 0xBFC06694u); 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(0xBFC06694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06698u); #endif /* 0xBFC06698: 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, 0xBFC06698u); 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(0xBFC06698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0669Cu); #endif /* 0xBFC0669C: 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, 0xBFC0669Cu); 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(0xBFC0669Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066A0u); #endif /* 0xBFC066A0: 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, 0xBFC066A0u); 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(0xBFC066A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066A4u); #endif /* 0xBFC066A4: 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, 0xBFC066A4u); 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(0xBFC066A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC066A8: 03E00008 jr $ra */ psx_delay_BFC066A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC066AC: 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(0xBFC066ACu); #endif if (psx_delay_BFC066A8) { psx_delay_BFC066A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC066B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC066B0u); int psx_delay_BFC066E4 = 0; label_BFC066B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC066B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC066B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000010u); #endif /* 0xBFC066B0: 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, 0xBFC066B0u); return; } g_debug_last_store_pc = 0xBFC066B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAC9F0000u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC066B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC066B4: 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, 0xBFC066B4u); return; } g_debug_last_store_pc = 0xBFC066B4u; cpu->write_word(psx_addr, cpu->gpr[29]); } PGXP_STORE(0xAC9D0004u, _pgxa, cpu->gpr[29]); } #ifdef PSX_COSIM cosim_instr(0xBFC066B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000010u); #endif /* 0xBFC066B8: 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, 0xBFC066B8u); return; } g_debug_last_store_pc = 0xBFC066B8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC9E0008u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC066B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC066BC: 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, 0xBFC066BCu); return; } g_debug_last_store_pc = 0xBFC066BCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC90000Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC066BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC066C0: 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, 0xBFC066C0u); return; } g_debug_last_store_pc = 0xBFC066C0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAC910010u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC066C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010u); #endif /* 0xBFC066C4: 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, 0xBFC066C4u); return; } g_debug_last_store_pc = 0xBFC066C4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAC920014u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC066C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010u); #endif /* 0xBFC066C8: 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, 0xBFC066C8u); return; } g_debug_last_store_pc = 0xBFC066C8u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAC930018u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC066C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100010u); #endif /* 0xBFC066CC: 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, 0xBFC066CCu); return; } g_debug_last_store_pc = 0xBFC066CCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAC94001Cu, _pgxa, cpu->gpr[20]); } #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, 0x200010u); #endif /* 0xBFC066D0: 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, 0xBFC066D0u); return; } g_debug_last_store_pc = 0xBFC066D0u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAC950020u, _pgxa, cpu->gpr[21]); } #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, 0x400010u); #endif /* 0xBFC066D4: 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, 0xBFC066D4u); return; } g_debug_last_store_pc = 0xBFC066D4u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAC960024u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC066D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC066D8: 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, 0xBFC066D8u); return; } g_debug_last_store_pc = 0xBFC066D8u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAC970028u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC066D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000010u); #endif /* 0xBFC066DC: 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, 0xBFC066DCu); return; } g_debug_last_store_pc = 0xBFC066DCu; cpu->write_word(psx_addr, cpu->gpr[28]); } PGXP_STORE(0xAC9C002Cu, _pgxa, cpu->gpr[28]); } #ifdef PSX_COSIM cosim_instr(0xBFC066DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC066E0: 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(0xBFC066E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC066E4: 03E00008 jr $ra */ psx_delay_BFC066E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC066E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC066E8u); #endif if (psx_delay_BFC066E4) { psx_delay_BFC066E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC066EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC066ECu); int psx_delay_BFC06720 = 0; label_BFC066EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC066ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC066ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066ECu); #endif /* 0xBFC066EC: 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, 0xBFC066ECu); 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(0xBFC066ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066F0u); #endif /* 0xBFC066F0: 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, 0xBFC066F0u); 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(0xBFC066F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066F4u); #endif /* 0xBFC066F4: 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, 0xBFC066F4u); 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(0xBFC066F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066F8u); #endif /* 0xBFC066F8: 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, 0xBFC066F8u); 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(0xBFC066F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC066FCu); #endif /* 0xBFC066FC: 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, 0xBFC066FCu); 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(0xBFC066FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06700u); #endif /* 0xBFC06700: 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, 0xBFC06700u); 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(0xBFC06700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06704u); #endif /* 0xBFC06704: 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, 0xBFC06704u); 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(0xBFC06704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06708u); #endif /* 0xBFC06708: 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, 0xBFC06708u); 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(0xBFC06708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0670Cu); #endif /* 0xBFC0670C: 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, 0xBFC0670Cu); 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(0xBFC0670Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06710u); #endif /* 0xBFC06710: 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, 0xBFC06710u); 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(0xBFC06710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06714u); #endif /* 0xBFC06714: 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, 0xBFC06714u); 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(0xBFC06714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06718u); #endif /* 0xBFC06718: 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, 0xBFC06718u); 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(0xBFC06718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0671Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC0671C: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #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]; psx_restore_state_escape(); return; /* longjmp-return */ } } void OpenBIOS_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_BFC06760 = 0; int psx_delay_BFC06774 = 0; int psx_delay_BFC0677C = 0; int psx_taken_BFC0677C = 0; int psx_delay_BFC067A4 = 0; int psx_delay_BFC067C0 = 0; int psx_delay_BFC067C8 = 0; int psx_taken_BFC067C8 = 0; int psx_delay_BFC067D8 = 0; int psx_taken_BFC067D8 = 0; int psx_delay_BFC067EC = 0; int psx_taken_BFC067EC = 0; int psx_delay_BFC06808 = 0; int psx_taken_BFC06808 = 0; int psx_delay_BFC0681C = 0; int psx_taken_BFC0681C = 0; int psx_delay_BFC0682C = 0; int psx_taken_BFC0682C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06768u: goto label_BFC06768; case 0xBFC0677Cu: goto label_BFC0677C; case 0xBFC06784u: goto label_BFC06784; case 0xBFC06788u: goto label_BFC06788; case 0xBFC067ACu: goto label_BFC067AC; case 0xBFC067C8u: goto label_BFC067C8; case 0xBFC067D0u: goto label_BFC067D0; case 0xBFC067D4u: goto label_BFC067D4; case 0xBFC067E0u: goto label_BFC067E0; case 0xBFC067E8u: goto label_BFC067E8; case 0xBFC067F4u: goto label_BFC067F4; case 0xBFC06810u: goto label_BFC06810; case 0xBFC06824u: goto label_BFC06824; default: break; } } 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, 0x20000000u); #endif /* 0xBFC06728: 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(0xBFC06728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0672Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0672C: 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, 0xBFC0672Cu); return; } g_debug_last_store_pc = 0xBFC0672Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } #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, 0x20020000u); #endif /* 0xBFC06730: 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, 0xBFC06730u); return; } g_debug_last_store_pc = 0xBFC06730u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0x80011u); #endif /* 0xBFC06734: 00809825 or $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(0x00809825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC06738: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #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, 0x10u); #endif /* 0xBFC0673C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x20010000u); #endif /* 0xBFC06740: 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, 0xBFC06740u); return; } g_debug_last_store_pc = 0xBFC06740u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC06740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06744: 24849A78 addiu $a0, $a0, -25992 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25992)); PGXP_ALU(0x24849A78u, cpu->gpr[4], _pgx1, 0xFFFF9A78u); } #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, 0x90000u); #endif /* 0xBFC06748: 00138080 sll $s0, $s3, 2 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[16] = cpu->gpr[19] << 2u; PGXP_ALU(0x00138080u, cpu->gpr[16], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC06748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0674Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0674C: 26310100 addiu $s1, $s1, 256 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (256)); PGXP_ALU(0x26310100u, cpu->gpr[17], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0xBFC0674Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC06750: 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, 0xBFC06750u); return; } g_debug_last_store_pc = 0xBFC06750u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } #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, 0xA0000000u); #endif /* 0xBFC06754: 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, 0xBFC06754u); return; } g_debug_last_store_pc = 0xBFC06754u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #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, 0x20200000u); #endif /* 0xBFC06758: 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, 0xBFC06758u); return; } g_debug_last_store_pc = 0xBFC06758u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC0675C: 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, 0xBFC0675Cu); return; } g_debug_last_store_pc = 0xBFC0675Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } #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, 0x80000000u); #endif /* 0xBFC06760: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC06768u; /* jal link before delay slot */ psx_delay_BFC06760 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC06764: 00A09025 or $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(0x00A09025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06764u); #endif if (psx_delay_BFC06760) { psx_delay_BFC06760 = 0; cpu->gpr[31] = 0xBFC06768u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06768: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06768u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC06768: AE30000C sw $s0, 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, 0xBFC06768u); return; } g_debug_last_store_pc = 0xBFC06768u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAE30000Cu, _pgxa, cpu->gpr[16]); } #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, 0x201u); #endif /* 0xBFC0676C: 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(0xBFC0676Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC06770: 241500B0 addiu $s5, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241500B0u, cpu->gpr[21], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200000u); #endif /* 0xBFC06774: 02A0F809 jalr $ra, $s5 */ cpu->gpr[31] = 0xBFC0677Cu; /* jalr link before delay slot */ psx_delay_BFC06774 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC06778: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06778u); #endif if (psx_delay_BFC06774) { psx_delay_BFC06774 = 0; { uint32_t _t = cpu->gpr[21]; cpu->gpr[31] = 0xBFC0677Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0677C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0677Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0677Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0677Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0677C: 1440000B bne $v0, $zero, 0xBFC067AC */ uint32_t psx_brA_BFC0677C = cpu->gpr[2]; uint32_t psx_brB_BFC0677C = cpu->gpr[0]; psx_taken_BFC0677C = (psx_brA_BFC0677C != psx_brB_BFC0677C); psx_delay_BFC0677C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC06780: 00121840 sll $v1, $s2, 1 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[18] << 1u; PGXP_ALU(0x00121840u, cpu->gpr[3], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC06780u); #endif if (psx_delay_BFC0677C) { psx_delay_BFC0677C = 0; if (psx_taken_BFC0677C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067ACu); goto label_BFC067AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06784u); } 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, 0x5u); #endif /* 0xBFC06784: 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(0xBFC06784u); #endif label_BFC06788: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06788u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06788u); #endif /* 0xBFC06788: 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, 0xBFC06788u); 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(0xBFC06788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0678Cu); #endif /* 0xBFC0678C: 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, 0xBFC0678Cu); 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(0xBFC0678Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06790u); #endif /* 0xBFC06790: 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, 0xBFC06790u); 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(0xBFC06790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06794u); #endif /* 0xBFC06794: 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, 0xBFC06794u); 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(0xBFC06794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06798u); #endif /* 0xBFC06798: 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, 0xBFC06798u); 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(0xBFC06798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0679Cu); #endif /* 0xBFC0679C: 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, 0xBFC0679Cu); 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(0xBFC0679Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067A0u); #endif /* 0xBFC067A0: 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, 0xBFC067A0u); 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(0xBFC067A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC067A4: 03E00008 jr $ra */ psx_delay_BFC067A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC067A8: 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(0xBFC067A8u); #endif if (psx_delay_BFC067A4) { psx_delay_BFC067A4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x40008u); #endif /* 0xBFC067AC: 00721821 addu $v1, $v1, $s2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[18]; PGXP_ALU(0x00721821u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x18u); #endif /* 0xBFC067B0: 00032180 sll $a0, $v1, 6 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] << 6u; PGXP_ALU(0x00032180u, cpu->gpr[4], _pgx1, 6u); } #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, 0x100005u); #endif /* 0xBFC067B4: 0040A025 or $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(0x0040A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC067B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC067B8: AE240014 sw $a0, 20($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC067B8u); return; } g_debug_last_store_pc = 0xBFC067B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE240014u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC067B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC067BC: 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(0xBFC067BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200000u); #endif /* 0xBFC067C0: 02A0F809 jalr $ra, $s5 */ cpu->gpr[31] = 0xBFC067C8u; /* jalr link before delay slot */ psx_delay_BFC067C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC067C4: AFA40010 sw $a0, 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, 0xBFC067C4u); return; } g_debug_last_store_pc = 0xBFC067C4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC067C4u); #endif if (psx_delay_BFC067C0) { psx_delay_BFC067C0 = 0; { uint32_t _t = cpu->gpr[21]; cpu->gpr[31] = 0xBFC067C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC067C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC067C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC067C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC067C8: 1040FFEE beq $v0, $zero, 0xBFC06784 */ uint32_t psx_brA_BFC067C8 = cpu->gpr[2]; uint32_t psx_brB_BFC067C8 = cpu->gpr[0]; psx_taken_BFC067C8 = (psx_brA_BFC067C8 == psx_brB_BFC067C8); psx_delay_BFC067C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC067CC: 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(0xBFC067CCu); #endif if (psx_delay_BFC067C8) { psx_delay_BFC067C8 = 0; if (psx_taken_BFC067C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06784u); goto label_BFC06784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067D0u); } label_BFC067D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC067D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC067D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067D0u); #endif /* 0xBFC067D0: 8FA40010 lw $a0, 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, 0xBFC067D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC067D0u); #endif label_BFC067D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC067D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC067D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80028u); #endif /* 0xBFC067D4: 0073282A slt $a1, $v1, $s3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[19] ? 1 : 0); PGXP_ALU(0x0073282Au, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC067D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC067D8: 14A0000D bne $a1, $zero, 0xBFC06810 */ uint32_t psx_brA_BFC067D8 = cpu->gpr[5]; uint32_t psx_brB_BFC067D8 = cpu->gpr[0]; psx_taken_BFC067D8 = (psx_brA_BFC067D8 != psx_brB_BFC067D8); psx_delay_BFC067D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC067DC: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC067DCu); #endif if (psx_delay_BFC067D8) { psx_delay_BFC067D8 = 0; if (psx_taken_BFC067D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06810u); goto label_BFC06810; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067E0u); } label_BFC067E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC067E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC067E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC067E0: 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(0xBFC067E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC067E4: 24071000 addiu $a3, $zero, 4096 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); PGXP_ALU(0x24071000u, cpu->gpr[7], _pgx1, 0x00001000u); } #ifdef PSX_COSIM cosim_instr(0xBFC067E4u); #endif 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, 0x40048u); #endif /* 0xBFC067E8: 0072302A slt $a2, $v1, $s2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0072302Au, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x41u); #endif /* 0xBFC067EC: 14C0000D bne $a2, $zero, 0xBFC06824 */ uint32_t psx_brA_BFC067EC = cpu->gpr[6]; uint32_t psx_brB_BFC067EC = cpu->gpr[0]; psx_taken_BFC067EC = (psx_brA_BFC067EC != psx_brB_BFC067EC); psx_delay_BFC067EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC067F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC067F0u); #endif if (psx_delay_BFC067EC) { psx_delay_BFC067EC = 0; if (psx_taken_BFC067EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06824u); goto label_BFC06824; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067F4u); } label_BFC067F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC067F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC067F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC067F4: 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(0xBFC067F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC067F8: 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, 0xBFC067F8u); return; } g_debug_last_store_pc = 0xBFC067F8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC067F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC067FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC067FC: AE820000 sw $v0, 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, 0xBFC067FCu); return; } g_debug_last_store_pc = 0xBFC067FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC067FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC06800: AE220010 sw $v0, 16($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06800u); return; } g_debug_last_store_pc = 0xBFC06800u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120000u); #endif /* 0xBFC06804: AE340008 sw $s4, 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, 0xBFC06804u); return; } g_debug_last_store_pc = 0xBFC06804u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAE340008u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC06804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06808: 1000FFDF beq $zero, $zero, 0xBFC06788 */ uint32_t psx_brA_BFC06808 = cpu->gpr[0]; uint32_t psx_brB_BFC06808 = cpu->gpr[0]; psx_taken_BFC06808 = (psx_brA_BFC06808 == psx_brB_BFC06808); psx_delay_BFC06808 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0680Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10014u); #endif /* 0xBFC0680C: 02041021 addu $v0, $s0, $a0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[4]; PGXP_ALU(0x02041021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0680Cu); #endif if (psx_delay_BFC06808) { psx_delay_BFC06808 = 0; if (psx_taken_BFC06808) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06788u); goto label_BFC06788; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06810u); } label_BFC06810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06810u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC06810: 00032880 sll $a1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] << 2u; PGXP_ALU(0x00032880u, cpu->gpr[5], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC06810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100020u); #endif /* 0xBFC06814: 02852821 addu $a1, $s4, $a1 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[20] + cpu->gpr[5]; PGXP_ALU(0x02852821u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC06818: 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, 0xBFC06818u); return; } g_debug_last_store_pc = 0xBFC06818u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA00000u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC0681C: 1000FFED beq $zero, $zero, 0xBFC067D4 */ uint32_t psx_brA_BFC0681C = cpu->gpr[0]; uint32_t psx_brB_BFC0681C = cpu->gpr[0]; psx_taken_BFC0681C = (psx_brA_BFC0681C == psx_brB_BFC0681C); psx_delay_BFC0681C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06820: 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(0xBFC06820u); #endif if (psx_delay_BFC0681C) { psx_delay_BFC0681C = 0; if (psx_taken_BFC0681C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067D4u); goto label_BFC067D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06824u); } label_BFC06824: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06824u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC06824: ACA70000 sw $a3, 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, 0xBFC06824u); return; } g_debug_last_store_pc = 0xBFC06824u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACA70000u, _pgxa, cpu->gpr[7]); } #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, 0x8u); #endif /* 0xBFC06828: 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(0xBFC06828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0682Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0682C: 1000FFEE beq $zero, $zero, 0xBFC067E8 */ uint32_t psx_brA_BFC0682C = cpu->gpr[0]; uint32_t psx_brB_BFC0682C = cpu->gpr[0]; psx_taken_BFC0682C = (psx_brA_BFC0682C == psx_brB_BFC0682C); psx_delay_BFC0682C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06830: 24A500C0 addiu $a1, $a1, 192 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (192)); PGXP_ALU(0x24A500C0u, cpu->gpr[5], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06830u); #endif if (psx_delay_BFC0682C) { psx_delay_BFC0682C = 0; if (psx_taken_BFC0682C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC067E8u); goto label_BFC067E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06834u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06834u); cpu->pc = 0xBFC06834u; return; /* fallthrough */ } void OpenBIOS_func_1FC06834(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06834u); int psx_delay_BFC06844 = 0; int psx_taken_BFC06844 = 0; int psx_delay_BFC06860 = 0; int psx_taken_BFC06860 = 0; int psx_delay_BFC0686C = 0; int psx_delay_BFC0687C = 0; int psx_taken_BFC0687C = 0; int psx_delay_BFC06884 = 0; int psx_taken_BFC06884 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0684Cu: goto label_BFC0684C; case 0xBFC06850u: goto label_BFC06850; case 0xBFC0685Cu: goto label_BFC0685C; case 0xBFC06868u: goto label_BFC06868; case 0xBFC0686Cu: goto label_BFC0686C; case 0xBFC06874u: goto label_BFC06874; case 0xBFC06884u: goto label_BFC06884; default: break; } } 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, 0x4u); #endif /* 0xBFC06834: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06838: 24420100 addiu $v0, $v0, 256 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (256)); PGXP_ALU(0x24420100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0xBFC06838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0683Cu); #endif /* 0xBFC0683C: 8C430014 lw $v1, 20($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0683Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430014u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0683Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06840: 240400C0 addiu $a0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240400C0u, cpu->gpr[4], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06844: 14800002 bne $a0, $zero, 0xBFC06850 */ uint32_t psx_brA_BFC06844 = cpu->gpr[4]; uint32_t psx_brB_BFC06844 = cpu->gpr[0]; psx_taken_BFC06844 = (psx_brA_BFC06844 != psx_brB_BFC06844); psx_delay_BFC06844 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC06848: 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(0xBFC06848u); #endif if (psx_delay_BFC06844) { psx_delay_BFC06844 = 0; if (psx_taken_BFC06844) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06850u); goto label_BFC06850; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0684Cu); } 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, 0x0u); #endif /* 0xBFC0684C: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC0684Cu); return; #ifdef PSX_COSIM cosim_instr(0xBFC0684Cu); #endif label_BFC06850: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06850u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06850u); #endif /* 0xBFC06850: 8C430010 lw $v1, 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, 0xBFC06850u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06854: 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(0xBFC06854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06858: 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(0xBFC06858u); #endif 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, 0x20u); #endif /* 0xBFC0685C: 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(0xBFC0685Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC06860: 14450004 bne $v0, $a1, 0xBFC06874 */ uint32_t psx_brA_BFC06860 = cpu->gpr[2]; uint32_t psx_brB_BFC06860 = cpu->gpr[5]; psx_taken_BFC06860 = (psx_brA_BFC06860 != psx_brB_BFC06860); psx_delay_BFC06860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06864: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06864u); #endif if (psx_delay_BFC06860) { psx_delay_BFC06860 = 0; if (psx_taken_BFC06860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06874u); goto label_BFC06874; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06868u); } label_BFC06868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06868u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06868: 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(0xBFC06868u); #endif 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, 0x80000001u); #endif /* 0xBFC0686C: 03E00008 jr $ra */ psx_delay_BFC0686C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06870: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06870u); #endif if (psx_delay_BFC0686C) { psx_delay_BFC0686C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 /* 0xBFC06874: 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, 0xBFC06874u); 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(0xBFC06874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06878: 00000000 nop */ /* nop */ #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, 0x30u); #endif /* 0xBFC0687C: 10A4FFFB beq $a1, $a0, 0xBFC0686C */ uint32_t psx_brA_BFC0687C = cpu->gpr[5]; uint32_t psx_brB_BFC0687C = cpu->gpr[4]; psx_taken_BFC0687C = (psx_brA_BFC0687C == psx_brB_BFC0687C); psx_delay_BFC0687C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06880: 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(0xBFC06880u); #endif if (psx_delay_BFC0687C) { psx_delay_BFC0687C = 0; if (psx_taken_BFC0687C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0686Cu); goto label_BFC0686C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06884u); } label_BFC06884: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06884u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06884: 1000FFF5 beq $zero, $zero, 0xBFC0685C */ uint32_t psx_brA_BFC06884 = cpu->gpr[0]; uint32_t psx_brB_BFC06884 = cpu->gpr[0]; psx_taken_BFC06884 = (psx_brA_BFC06884 == psx_brB_BFC06884); psx_delay_BFC06884 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06888: 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(0xBFC06888u); #endif if (psx_delay_BFC06884) { psx_delay_BFC06884 = 0; if (psx_taken_BFC06884) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0685Cu); goto label_BFC0685C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0688Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0688Cu); cpu->pc = 0xBFC0688Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0688C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0688Cu); int psx_delay_BFC06898 = 0; int psx_delay_BFC068A4 = 0; int psx_taken_BFC068A4 = 0; int psx_delay_BFC068F0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC068A0u: goto label_BFC068A0; case 0xBFC068ACu: goto label_BFC068AC; case 0xBFC068E8u: goto label_BFC068E8; default: break; } } label_BFC0688C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0688Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0688Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0688Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0688C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x211u); #endif /* 0xBFC06890: 00804825 or $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(0x00804825u, cpu->gpr[9], _pgx1, _pgx2); } #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, 0xA0000000u); #endif /* 0xBFC06894: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC06898: 0FF01A0D jal 0xBFC06834 */ cpu->gpr[31] = 0xBFC068A0u; /* jal link before delay slot */ psx_delay_BFC06898 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0689Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x121u); #endif /* 0xBFC0689C: 00A04025 or $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(0x00A04025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0689Cu); #endif if (psx_delay_BFC06898) { psx_delay_BFC06898 = 0; cpu->gpr[31] = 0xBFC068A0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06834u); cpu->pc = 0xBFC06834u; return; } label_BFC068A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC068A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC068A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC068A0: 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(0xBFC068A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC068A4: 10430010 beq $v0, $v1, 0xBFC068E8 */ uint32_t psx_brA_BFC068A4 = cpu->gpr[2]; uint32_t psx_brB_BFC068A4 = cpu->gpr[3]; psx_taken_BFC068A4 = (psx_brA_BFC068A4 == psx_brB_BFC068A4); psx_delay_BFC068A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC068A8: 00023840 sll $a3, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 1u; PGXP_ALU(0x00023840u, cpu->gpr[7], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC068A8u); #endif if (psx_delay_BFC068A4) { psx_delay_BFC068A4 = 0; if (psx_taken_BFC068A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC068E8u); goto label_BFC068E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC068ACu); } 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, 0x8u); #endif /* 0xBFC068AC: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC068ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068B0u); #endif /* 0xBFC068B0: 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, 0xBFC068B0u); 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(0xBFC068B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC068B4: 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(0xBFC068B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC068B8: 00073980 sll $a3, $a3, 6 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 6u; PGXP_ALU(0x00073980u, cpu->gpr[7], _pgx1, 6u); } #ifdef PSX_COSIM cosim_instr(0xBFC068B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC068BC: 00671821 addu $v1, $v1, $a3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[7]; PGXP_ALU(0x00671821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC068BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC068C0: 24044000 addiu $a0, $zero, 16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); PGXP_ALU(0x24044000u, cpu->gpr[4], _pgx1, 0x00004000u); } #ifdef PSX_COSIM cosim_instr(0xBFC068C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC068C4: 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, 0xBFC068C4u); return; } g_debug_last_store_pc = 0xBFC068C4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC068C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC068C8: 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(0xBFC068C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC068CC: 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, 0xBFC068CCu); return; } g_debug_last_store_pc = 0xBFC068CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640004u, _pgxa, cpu->gpr[4]); } #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, 0x108u); #endif /* 0xBFC068D0: AC68007C sw $t0, 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, 0xBFC068D0u); return; } g_debug_last_store_pc = 0xBFC068D0u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC68007Cu, _pgxa, cpu->gpr[8]); } #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, 0x108u); #endif /* 0xBFC068D4: AC680080 sw $t0, 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, 0xBFC068D4u); return; } g_debug_last_store_pc = 0xBFC068D4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC680080u, _pgxa, cpu->gpr[8]); } #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, 0x208u); #endif /* 0xBFC068D8: AC690088 sw $t1, 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, 0xBFC068D8u); return; } g_debug_last_store_pc = 0xBFC068D8u; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAC690088u, _pgxa, cpu->gpr[9]); } #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, 0x48u); #endif /* 0xBFC068DC: AC660078 sw $a2, 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, 0xBFC068DCu); return; } g_debug_last_store_pc = 0xBFC068DCu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC660078u, _pgxa, cpu->gpr[6]); } #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, 0x8u); #endif /* 0xBFC068E0: 3C03FF00 lui $v1, 0xFF00 */ cpu->gpr[3] = 0xFF000000u; PGXP_ALU(0x3C03FF00u, cpu->gpr[3], 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, 0xCu); #endif /* 0xBFC068E4: 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(0xBFC068E4u); #endif label_BFC068E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC068E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC068E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068E8u); #endif /* 0xBFC068E8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC068E8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC068EC: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC068F0: 03E00008 jr $ra */ psx_delay_BFC068F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC068F4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC068F4u); #endif if (psx_delay_BFC068F0) { psx_delay_BFC068F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC068F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC068F8u); int psx_delay_BFC0691C = 0; 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: 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(0xBFC068F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC068FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC068FC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC068FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06900u); #endif /* 0xBFC06900: 8C430110 lw $v1, 272($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 272; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06900u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430110u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06904: 00041040 sll $v0, $a0, 1 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 1u; PGXP_ALU(0x00041040u, cpu->gpr[2], _pgx1, 1u); } #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, 0x14u); #endif /* 0xBFC06908: 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(0xBFC06908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0690Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0690C: 00021180 sll $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 6u; PGXP_ALU(0x00021180u, cpu->gpr[2], _pgx1, 6u); } #ifdef PSX_COSIM cosim_instr(0xBFC0690Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06910: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06914: 24031000 addiu $v1, $zero, 4096 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); PGXP_ALU(0x24031000u, cpu->gpr[3], _pgx1, 0x00001000u); } #ifdef PSX_COSIM cosim_instr(0xBFC06914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06918: 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, 0xBFC06918u); return; } g_debug_last_store_pc = 0xBFC06918u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0691Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0691C: 03E00008 jr $ra */ psx_delay_BFC0691C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06920: 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(0xBFC06920u); #endif if (psx_delay_BFC0691C) { psx_delay_BFC0691C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06924(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06924u); int psx_delay_BFC06948 = 0; 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, 0x10u); #endif /* 0xBFC06924: 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(0xBFC06924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06928: 00041040 sll $v0, $a0, 1 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 1u; PGXP_ALU(0x00041040u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC06928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0692Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0692C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0692Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06930u); #endif /* 0xBFC06930: 8C650110 lw $a1, 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, 0xBFC06930u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C650110u, _pgxa, cpu->gpr[5]); } #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, 0x14u); #endif /* 0xBFC06934: 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(0xBFC06934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06938: 00021180 sll $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 6u; PGXP_ALU(0x00021180u, cpu->gpr[2], _pgx1, 6u); } #ifdef PSX_COSIM cosim_instr(0xBFC06938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0693Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0693C: 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(0xBFC0693Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC06940: 00A22821 addu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A22821u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x0u); #endif /* 0xBFC06944: 0000000C syscall */ cpu->pc = 0xBFC06944u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC06944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06948: 03E00008 jr $ra */ psx_delay_BFC06948 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0694Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0694C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0694Cu); #endif if (psx_delay_BFC06948) { psx_delay_BFC06948 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06950(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06950u); int psx_delay_BFC06958 = 0; label_BFC06950: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06950u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC06950: 3C1A0000 lui $k0, 0x0 */ cpu->gpr[26] = 0x00000000u; PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC06954: 275A27AC addiu $k0, $k0, 10156 */ { uint32_t _pgx1 = cpu->gpr[26]; cpu->gpr[26] = (uint32_t)((int32_t)cpu->gpr[26] + (10156)); PGXP_ALU(0x275A27ACu, cpu->gpr[26], _pgx1, 0x000027ACu); } #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, 0x4000001u); #endif /* 0xBFC06958: 03400008 jr $k0 */ psx_delay_BFC06958 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0695Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0695C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0695Cu); #endif if (psx_delay_BFC06958) { psx_delay_BFC06958 = 0; #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 OpenBIOS_func_1FC06960(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06960u); int psx_delay_BFC06964 = 0; label_BFC06960: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06960u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06960: 24082A80 addiu $t0, $zero, 10880 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (10880)); PGXP_ALU(0x24082A80u, cpu->gpr[8], _pgx1, 0x00002A80u); } #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, 0x101u); #endif /* 0xBFC06964: 01000008 jr $t0 */ psx_delay_BFC06964 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06968: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06968u); #endif if (psx_delay_BFC06964) { psx_delay_BFC06964 = 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 OpenBIOS_func_1FC06970(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06970u); int psx_delay_BFC06974 = 0; label_BFC06970: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06970u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06970: 24082AA0 addiu $t0, $zero, 10912 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (10912)); PGXP_ALU(0x24082AA0u, cpu->gpr[8], _pgx1, 0x00002AA0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06974: 01000008 jr $t0 */ psx_delay_BFC06974 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06978: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06978u); #endif if (psx_delay_BFC06974) { psx_delay_BFC06974 = 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 OpenBIOS_func_1FC06980(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06980u); int psx_delay_BFC06984 = 0; 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, 0x101u); #endif /* 0xBFC06980: 24082AC0 addiu $t0, $zero, 10944 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (10944)); PGXP_ALU(0x24082AC0u, cpu->gpr[8], _pgx1, 0x00002AC0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06984: 01000008 jr $t0 */ psx_delay_BFC06984 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06988: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06988u); #endif if (psx_delay_BFC06984) { psx_delay_BFC06984 = 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 OpenBIOS_func_1FC06990(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06990u); int psx_delay_BFC06994 = 0; 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, 0x401u); #endif /* 0xBFC06990: 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(0xBFC06990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC06994: 01400008 jr $t2 */ psx_delay_BFC06994 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06998: 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(0xBFC06998u); #endif if (psx_delay_BFC06994) { psx_delay_BFC06994 = 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 OpenBIOS_func_1FC0699C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0699Cu); int psx_delay_BFC069A0 = 0; int psx_taken_BFC069A0 = 0; int psx_delay_BFC069B0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC069A8u: goto label_BFC069A8; case 0xBFC069B0u: goto label_BFC069B0; default: break; } } label_BFC0699C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0699Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0699Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0699Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0699C: 24030020 addiu $v1, $zero, 32 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); PGXP_ALU(0x24030020u, cpu->gpr[3], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC0699Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC069A0: 10830003 beq $a0, $v1, 0xBFC069B0 */ uint32_t psx_brA_BFC069A0 = cpu->gpr[4]; uint32_t psx_brB_BFC069A0 = cpu->gpr[3]; psx_taken_BFC069A0 = (psx_brA_BFC069A0 == psx_brB_BFC069A0); psx_delay_BFC069A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC069A4: 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(0xBFC069A4u); #endif if (psx_delay_BFC069A0) { psx_delay_BFC069A0 = 0; if (psx_taken_BFC069A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069B0u); goto label_BFC069B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069A8u); } label_BFC069A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC069A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC069A8: 2484FFF7 addiu $a0, $a0, -9 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-9)); PGXP_ALU(0x2484FFF7u, cpu->gpr[4], _pgx1, 0xFFFFFFF7u); } #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, 0x14u); #endif /* 0xBFC069AC: 2C820005 sltiu $v0, $a0, 5 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[4] < 0x00000005u ? 1 : 0); PGXP_ALU(0x2C820005u, cpu->gpr[2], _pgx1, 0x0005u); } #ifdef PSX_COSIM cosim_instr(0xBFC069ACu); #endif label_BFC069B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC069B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC069B0: 03E00008 jr $ra */ psx_delay_BFC069B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC069B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC069B4u); #endif if (psx_delay_BFC069B0) { psx_delay_BFC069B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC069B8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC069B8u); int psx_delay_BFC069BC = 0; int psx_taken_BFC069BC = 0; int psx_delay_BFC069C4 = 0; int psx_delay_BFC069DC = 0; int psx_taken_BFC069DC = 0; int psx_delay_BFC069E4 = 0; int psx_taken_BFC069E4 = 0; int psx_delay_BFC069EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC069BCu: goto label_BFC069BC; case 0xBFC069C4u: goto label_BFC069C4; case 0xBFC069CCu: goto label_BFC069CC; case 0xBFC069E4u: goto label_BFC069E4; case 0xBFC069ECu: goto label_BFC069EC; default: break; } } label_BFC069B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC069B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC069B8: 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(0xBFC069B8u); #endif label_BFC069BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC069BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC069BC: 14C30003 bne $a2, $v1, 0xBFC069CC */ uint32_t psx_brA_BFC069BC = cpu->gpr[6]; uint32_t psx_brB_BFC069BC = cpu->gpr[3]; psx_taken_BFC069BC = (psx_brA_BFC069BC != psx_brB_BFC069BC); psx_delay_BFC069BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA8u); #endif /* 0xBFC069C0: 00A33821 addu $a3, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A33821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC069C0u); #endif if (psx_delay_BFC069BC) { psx_delay_BFC069BC = 0; if (psx_taken_BFC069BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069CCu); goto label_BFC069CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069C4u); } label_BFC069C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC069C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC069C4: 03E00008 jr $ra */ psx_delay_BFC069C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC069C8: 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(0xBFC069C8u); #endif if (psx_delay_BFC069C4) { psx_delay_BFC069C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC069CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC069CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC069CC: 00831021 addu $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(0x00831021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC069CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069D0u); #endif /* 0xBFC069D0: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC069D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069D4u); #endif /* 0xBFC069D4: 80E70000 lb $a3, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 7, 0x80u); PGXP_LOAD(0x80E70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC069D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC069D8: 00000000 nop */ /* nop */ #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, 0x84u); #endif /* 0xBFC069DC: 14470003 bne $v0, $a3, 0xBFC069EC */ uint32_t psx_brA_BFC069DC = cpu->gpr[2]; uint32_t psx_brB_BFC069DC = cpu->gpr[7]; 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, 0x5u); #endif /* 0xBFC069E4: 1440FFF5 bne $v0, $zero, 0xBFC069BC */ uint32_t psx_brA_BFC069E4 = cpu->gpr[2]; uint32_t psx_brB_BFC069E4 = cpu->gpr[0]; psx_taken_BFC069E4 = (psx_brA_BFC069E4 != psx_brB_BFC069E4); psx_delay_BFC069E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC069E8: 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(0xBFC069E8u); #endif if (psx_delay_BFC069E4) { psx_delay_BFC069E4 = 0; if (psx_taken_BFC069E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069BCu); goto label_BFC069BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069ECu); } 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, 0x80000001u); #endif /* 0xBFC069EC: 03E00008 jr $ra */ psx_delay_BFC069EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC069F0: 00471023 subu $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[7]; PGXP_ALU(0x00471023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC069F0u); #endif if (psx_delay_BFC069EC) { psx_delay_BFC069EC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC069F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC069F4u); int psx_delay_BFC06A08 = 0; label_BFC069F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC069F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC069F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC069F4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC069F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC069F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC069F8: A4401D86 sh $zero, 7558($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7558; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7558)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC069F8u); return; } g_debug_last_store_pc = 0xBFC069F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D86u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC069FC: A4401D84 sh $zero, 7556($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7556; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7556)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC069FCu); return; } g_debug_last_store_pc = 0xBFC069FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D84u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC069FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A00: A4401D82 sh $zero, 7554($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7554; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7554)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A00u); return; } g_debug_last_store_pc = 0xBFC06A00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D82u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A04: A4401D80 sh $zero, 7552($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7552)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A04u); return; } g_debug_last_store_pc = 0xBFC06A04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D80u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06A08: 03E00008 jr $ra */ psx_delay_BFC06A08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06A0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06A0Cu); #endif if (psx_delay_BFC06A08) { psx_delay_BFC06A08 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06A10(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06A10u); int psx_delay_BFC06A30 = 0; label_BFC06A10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06A10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06A10: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06A14: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06A18: 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(0xBFC06A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC06A1C: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0xA0000000u); #endif /* 0xBFC06A20: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A20u); return; } g_debug_last_store_pc = 0xBFC06A20u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06A24: 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(0xBFC06A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06A28: A0432041 sb $v1, 8257($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06A28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8257)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0432041u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A2C: 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(0xBFC06A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC06A30: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06A38u; /* jalr 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: 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(0xBFC06A34u); #endif if (psx_delay_BFC06A30) { psx_delay_BFC06A30 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06A38u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } } void OpenBIOS_func_1FC06A38(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06A38u); int psx_delay_BFC06A48 = 0; int psx_delay_BFC06A50 = 0; int psx_taken_BFC06A50 = 0; int psx_delay_BFC06A5C = 0; int psx_delay_BFC06A84 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06A50u: goto label_BFC06A50; case 0xBFC06A58u: goto label_BFC06A58; case 0xBFC06A64u: goto label_BFC06A64; case 0xBFC06A7Cu: goto label_BFC06A7C; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06A38: 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(0xBFC06A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06A3C: 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(0xBFC06A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06A40: 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, 0xBFC06A40u); return; } g_debug_last_store_pc = 0xBFC06A40u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A44: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC06A48: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06A50u; /* jalr link before delay slot */ psx_delay_BFC06A48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06A4C: 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(0xBFC06A4Cu); #endif if (psx_delay_BFC06A48) { psx_delay_BFC06A48 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06A50u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06A50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06A50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A50: 1040000A beq $v0, $zero, 0xBFC06A7C */ uint32_t psx_brA_BFC06A50 = cpu->gpr[2]; uint32_t psx_brB_BFC06A50 = cpu->gpr[0]; psx_taken_BFC06A50 = (psx_brA_BFC06A50 == psx_brB_BFC06A50); psx_delay_BFC06A50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC06A54: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06A54u); #endif if (psx_delay_BFC06A50) { psx_delay_BFC06A50 = 0; if (psx_taken_BFC06A50) { #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, 0xBFC06A58u); } label_BFC06A58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06A58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06A58: 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(0xBFC06A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06A5C: 0FF01821 jal 0xBFC06084 */ cpu->gpr[31] = 0xBFC06A64u; /* jal link before delay slot */ psx_delay_BFC06A5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC06A60: 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, 0xBFC06A60u); return; } g_debug_last_store_pc = 0xBFC06A60u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A60u); #endif if (psx_delay_BFC06A5C) { psx_delay_BFC06A5C = 0; cpu->gpr[31] = 0xBFC06A64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06084u); cpu->pc = 0xBFC06084u; return; } label_BFC06A64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06A64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A64u); #endif /* 0xBFC06A64: 8FA40010 lw $a0, 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, 0xBFC06A64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06A68: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06A6C: AC440100 sw $a0, 256($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 256; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A6Cu); return; } g_debug_last_store_pc = 0xBFC06A6Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440100u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06A70: 24030020 addiu $v1, $zero, 32 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (32)); PGXP_ALU(0x24030020u, cpu->gpr[3], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0xBFC06A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06A74: 24420100 addiu $v0, $v0, 256 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (256)); PGXP_ALU(0x24420100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0xBFC06A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06A78: 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, 0xBFC06A78u); return; } g_debug_last_store_pc = 0xBFC06A78u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #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 /* 0xBFC06A7C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06A7Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC06A80: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC06A84: 03E00008 jr $ra */ psx_delay_BFC06A84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06A88: 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(0xBFC06A88u); #endif if (psx_delay_BFC06A84) { psx_delay_BFC06A84 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06A8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06A8Cu); int psx_delay_BFC06A98 = 0; int psx_taken_BFC06A98 = 0; int psx_delay_BFC06AA0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06AA0u: goto label_BFC06AA0; default: break; } } 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 /* 0xBFC06A8C: 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(0xBFC06A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06A90: 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(0xBFC06A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06A94: 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(0xBFC06A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06A98: 1440FFFC bne $v0, $zero, 0xBFC06A8C */ uint32_t psx_brA_BFC06A98 = cpu->gpr[2]; uint32_t psx_brB_BFC06A98 = cpu->gpr[0]; psx_taken_BFC06A98 = (psx_brA_BFC06A98 != psx_brB_BFC06A98); psx_delay_BFC06A98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06A9C: A082FFFF sb $v0, -1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06A9Cu; 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(0xBFC06A9Cu); #endif if (psx_delay_BFC06A98) { psx_delay_BFC06A98 = 0; if (psx_taken_BFC06A98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A8Cu); goto label_BFC06A8C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AA0u); } label_BFC06AA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06AA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06AA0: 03E00008 jr $ra */ psx_delay_BFC06AA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06AA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06AA4u); #endif if (psx_delay_BFC06AA0) { psx_delay_BFC06AA0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC06AA8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06AA8u); int psx_delay_BFC06AB0 = 0; int psx_taken_BFC06AB0 = 0; int psx_delay_BFC06AC0 = 0; int psx_taken_BFC06AC0 = 0; int psx_delay_BFC06AC8 = 0; int psx_delay_BFC06AD0 = 0; int psx_taken_BFC06AD0 = 0; int psx_delay_BFC06ADC = 0; int psx_taken_BFC06ADC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06AB8u: goto label_BFC06AB8; case 0xBFC06AC8u: goto label_BFC06AC8; case 0xBFC06AD0u: goto label_BFC06AD0; case 0xBFC06AD8u: goto label_BFC06AD8; default: break; } } label_BFC06AA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06AA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AA8u); #endif /* 0xBFC06AA8: 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(0xBFC06AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06AAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06AB0: 14400007 bne $v0, $zero, 0xBFC06AD0 */ uint32_t psx_brA_BFC06AB0 = cpu->gpr[2]; uint32_t psx_brB_BFC06AB0 = cpu->gpr[0]; psx_taken_BFC06AB0 = (psx_brA_BFC06AB0 != psx_brB_BFC06AB0); psx_delay_BFC06AB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06AB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06AB4u); #endif if (psx_delay_BFC06AB0) { psx_delay_BFC06AB0 = 0; if (psx_taken_BFC06AB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AD0u); goto label_BFC06AD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AB8u); } label_BFC06AB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06AB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AB8u); #endif /* 0xBFC06AB8: 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(0xBFC06AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06ABC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06AC0: 14400005 bne $v0, $zero, 0xBFC06AD8 */ uint32_t psx_brA_BFC06AC0 = cpu->gpr[2]; uint32_t psx_brB_BFC06AC0 = cpu->gpr[0]; psx_taken_BFC06AC0 = (psx_brA_BFC06AC0 != psx_brB_BFC06AC0); psx_delay_BFC06AC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06AC4: 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(0xBFC06AC4u); #endif if (psx_delay_BFC06AC0) { psx_delay_BFC06AC0 = 0; if (psx_taken_BFC06AC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AD8u); goto label_BFC06AD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AC8u); } label_BFC06AC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06AC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06AC8: 03E00008 jr $ra */ psx_delay_BFC06AC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06ACC: A0800000 sb $zero, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06ACCu; 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(0xBFC06ACCu); #endif if (psx_delay_BFC06AC8) { psx_delay_BFC06AC8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC06AD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06AD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06AD0: 1000FFF5 beq $zero, $zero, 0xBFC06AA8 */ uint32_t psx_brA_BFC06AD0 = cpu->gpr[0]; uint32_t psx_brB_BFC06AD0 = cpu->gpr[0]; psx_taken_BFC06AD0 = (psx_brA_BFC06AD0 == psx_brB_BFC06AD0); psx_delay_BFC06AD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06AD4: 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(0xBFC06AD4u); #endif if (psx_delay_BFC06AD0) { psx_delay_BFC06AD0 = 0; if (psx_taken_BFC06AD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AA8u); goto label_BFC06AA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AD8u); } 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: 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(0xBFC06AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06ADC: 1000FFF6 beq $zero, $zero, 0xBFC06AB8 */ uint32_t psx_brA_BFC06ADC = cpu->gpr[0]; uint32_t psx_brB_BFC06ADC = cpu->gpr[0]; psx_taken_BFC06ADC = (psx_brA_BFC06ADC == psx_brB_BFC06ADC); psx_delay_BFC06ADC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC06AE0: A082FFFF sb $v0, -1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06AE0u; 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(0xBFC06AE0u); #endif if (psx_delay_BFC06ADC) { psx_delay_BFC06ADC = 0; if (psx_taken_BFC06ADC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AB8u); goto label_BFC06AB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AE4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AE4u); cpu->pc = 0xBFC06AE4u; return; /* fallthrough */ } void OpenBIOS_func_1FC06AE4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06AE4u); int psx_delay_BFC06B00 = 0; int psx_taken_BFC06B00 = 0; int psx_delay_BFC06B14 = 0; int psx_delay_BFC06B1C = 0; int psx_taken_BFC06B1C = 0; int psx_delay_BFC06B34 = 0; int psx_taken_BFC06B34 = 0; int psx_delay_BFC06B40 = 0; int psx_taken_BFC06B40 = 0; int psx_delay_BFC06B48 = 0; int psx_taken_BFC06B48 = 0; int psx_delay_BFC06B50 = 0; int psx_taken_BFC06B50 = 0; int psx_delay_BFC06B58 = 0; int psx_taken_BFC06B58 = 0; int psx_delay_BFC06B68 = 0; int psx_taken_BFC06B68 = 0; int psx_delay_BFC06B78 = 0; int psx_delay_BFC06B80 = 0; int psx_taken_BFC06B80 = 0; int psx_delay_BFC06B88 = 0; int psx_delay_BFC06B90 = 0; int psx_taken_BFC06B90 = 0; int psx_delay_BFC06B98 = 0; int psx_taken_BFC06B98 = 0; int psx_delay_BFC06BB0 = 0; int psx_delay_BFC06BB8 = 0; int psx_taken_BFC06BB8 = 0; int psx_delay_BFC06BC0 = 0; int psx_taken_BFC06BC0 = 0; int psx_delay_BFC06BCC = 0; int psx_taken_BFC06BCC = 0; int psx_delay_BFC06BDC = 0; int psx_taken_BFC06BDC = 0; int psx_delay_BFC06BF4 = 0; int psx_taken_BFC06BF4 = 0; int psx_delay_BFC06C04 = 0; int psx_taken_BFC06C04 = 0; int psx_delay_BFC06C10 = 0; int psx_taken_BFC06C10 = 0; int psx_delay_BFC06C18 = 0; int psx_taken_BFC06C18 = 0; int psx_delay_BFC06C30 = 0; int psx_delay_BFC06C3C = 0; int psx_taken_BFC06C3C = 0; int psx_delay_BFC06C44 = 0; int psx_taken_BFC06C44 = 0; int psx_delay_BFC06C4C = 0; int psx_taken_BFC06C4C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06AF4u: goto label_BFC06AF4; case 0xBFC06B08u: goto label_BFC06B08; case 0xBFC06B14u: goto label_BFC06B14; case 0xBFC06B1Cu: goto label_BFC06B1C; case 0xBFC06B24u: goto label_BFC06B24; case 0xBFC06B2Cu: goto label_BFC06B2C; case 0xBFC06B3Cu: goto label_BFC06B3C; case 0xBFC06B48u: goto label_BFC06B48; case 0xBFC06B50u: goto label_BFC06B50; case 0xBFC06B58u: goto label_BFC06B58; case 0xBFC06B60u: goto label_BFC06B60; case 0xBFC06B70u: goto label_BFC06B70; case 0xBFC06B80u: goto label_BFC06B80; case 0xBFC06B88u: goto label_BFC06B88; case 0xBFC06B90u: goto label_BFC06B90; case 0xBFC06B98u: goto label_BFC06B98; case 0xBFC06BA0u: goto label_BFC06BA0; case 0xBFC06BA4u: goto label_BFC06BA4; case 0xBFC06BB8u: goto label_BFC06BB8; case 0xBFC06BC0u: goto label_BFC06BC0; case 0xBFC06BC8u: goto label_BFC06BC8; case 0xBFC06BD4u: goto label_BFC06BD4; case 0xBFC06BDCu: goto label_BFC06BDC; case 0xBFC06BE4u: goto label_BFC06BE4; case 0xBFC06BFCu: goto label_BFC06BFC; case 0xBFC06C0Cu: goto label_BFC06C0C; case 0xBFC06C18u: goto label_BFC06C18; case 0xBFC06C20u: goto label_BFC06C20; case 0xBFC06C38u: goto label_BFC06C38; case 0xBFC06C44u: goto label_BFC06C44; case 0xBFC06C4Cu: goto label_BFC06C4C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC06AE4: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x811u); #endif /* 0xBFC06AE8: 00805825 or $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(0x00805825u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC06AEC: 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(0xBFC06AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06AF0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06AF0u); return; } g_debug_last_store_pc = 0xBFC06AF0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06AF0u); #endif 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, 0x64u); #endif /* 0xBFC06AF4: 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(0xBFC06AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06AF8u); #endif /* 0xBFC06AF8: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC06AFC: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC06B00: 14400011 bne $v0, $zero, 0xBFC06B48 */ uint32_t psx_brA_BFC06B00 = cpu->gpr[2]; uint32_t psx_brB_BFC06B00 = cpu->gpr[0]; psx_taken_BFC06B00 = (psx_brA_BFC06B00 != psx_brB_BFC06B00); psx_delay_BFC06B00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06B04: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06B04u); #endif if (psx_delay_BFC06B00) { psx_delay_BFC06B00 = 0; if (psx_taken_BFC06B00) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B48u); goto label_BFC06B48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B08u); } label_BFC06B08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06B08: 24848598 addiu $a0, $a0, -31336 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-31336)); PGXP_ALU(0x24848598u, cpu->gpr[4], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC06B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06B0C: 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(0xBFC06B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC06B10: 240A000D addiu $t2, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x240A000Du, cpu->gpr[10], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0xBFC06B10u); #endif label_BFC06B14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06B14: 0FF01A6E jal 0xBFC069B8 */ cpu->gpr[31] = 0xBFC06B1Cu; /* jal link before delay slot */ psx_delay_BFC06B14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B18u); #endif if (psx_delay_BFC06B14) { psx_delay_BFC06B14 = 0; cpu->gpr[31] = 0xBFC06B1Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069B8u); cpu->pc = 0xBFC069B8u; return; } label_BFC06B1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06B1C: 14400010 bne $v0, $zero, 0xBFC06B60 */ uint32_t psx_brA_BFC06B1C = cpu->gpr[2]; uint32_t psx_brB_BFC06B1C = cpu->gpr[0]; psx_taken_BFC06B1C = (psx_brA_BFC06B1C != psx_brB_BFC06B1C); psx_delay_BFC06B1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x205u); #endif /* 0xBFC06B20: 00404825 or $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(0x00404825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06B20u); #endif if (psx_delay_BFC06B1C) { psx_delay_BFC06B1C = 0; if (psx_taken_BFC06B1C) { #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, 0xBFC06B24u); } 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, 0xD0u); #endif /* 0xBFC06B24: 00863821 addu $a3, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC06B28: 2406003D addiu $a2, $zero, 61 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); PGXP_ALU(0x2406003Du, cpu->gpr[6], _pgx1, 0x0000003Du); } #ifdef PSX_COSIM cosim_instr(0xBFC06B28u); #endif 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 /* 0xBFC06B2C: 80E40000 lb $a0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 4, 0x80u); PGXP_LOAD(0x80E40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06B34: 14800012 bne $a0, $zero, 0xBFC06B80 */ uint32_t psx_brA_BFC06B34 = cpu->gpr[4]; uint32_t psx_brB_BFC06B34 = cpu->gpr[0]; psx_taken_BFC06B34 = (psx_brA_BFC06B34 != psx_brB_BFC06B34); psx_delay_BFC06B34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC06B38: 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(0xBFC06B38u); #endif if (psx_delay_BFC06B34) { psx_delay_BFC06B34 = 0; if (psx_taken_BFC06B34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B80u); goto label_BFC06B80; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B3Cu); } label_BFC06B3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC06B3C: 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(0xBFC06B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B40: 10000018 beq $zero, $zero, 0xBFC06BA4 */ uint32_t psx_brA_BFC06B40 = cpu->gpr[0]; uint32_t psx_brB_BFC06B40 = cpu->gpr[0]; psx_taken_BFC06B40 = (psx_brA_BFC06B40 == psx_brB_BFC06B40); psx_delay_BFC06B40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC06B44: 240CFFDF addiu $t4, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x240CFFDFu, cpu->gpr[12], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0xBFC06B44u); #endif if (psx_delay_BFC06B40) { psx_delay_BFC06B40 = 0; if (psx_taken_BFC06B40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BA4u); goto label_BFC06BA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B48u); } label_BFC06B48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B48: 1000FFEA beq $zero, $zero, 0xBFC06AF4 */ uint32_t psx_brA_BFC06B48 = cpu->gpr[0]; uint32_t psx_brB_BFC06B48 = cpu->gpr[0]; psx_taken_BFC06B48 = (psx_brA_BFC06B48 == psx_brB_BFC06B48); psx_delay_BFC06B48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06B4C: 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(0xBFC06B4Cu); #endif if (psx_delay_BFC06B48) { psx_delay_BFC06B48 = 0; if (psx_taken_BFC06B48) { #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, 0xBFC06B50u); } 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, 0x104u); #endif /* 0xBFC06B50: 1048FFF0 beq $v0, $t0, 0xBFC06B14 */ uint32_t psx_brA_BFC06B50 = cpu->gpr[2]; uint32_t psx_brB_BFC06B50 = cpu->gpr[8]; psx_taken_BFC06B50 = (psx_brA_BFC06B50 == psx_brB_BFC06B50); psx_delay_BFC06B50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06B54: 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(0xBFC06B54u); #endif if (psx_delay_BFC06B50) { psx_delay_BFC06B50 = 0; if (psx_taken_BFC06B50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B14u); goto label_BFC06B14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B58u); } label_BFC06B58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC06B58: 104AFFEE beq $v0, $t2, 0xBFC06B14 */ uint32_t psx_brA_BFC06B58 = cpu->gpr[2]; uint32_t psx_brB_BFC06B58 = cpu->gpr[10]; psx_taken_BFC06B58 = (psx_brA_BFC06B58 == psx_brB_BFC06B58); psx_delay_BFC06B58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B5Cu); #endif if (psx_delay_BFC06B58) { psx_delay_BFC06B58 = 0; if (psx_taken_BFC06B58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B14u); goto label_BFC06B14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B60u); } 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 /* 0xBFC06B60: 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(0xBFC06B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06B68: 1440FFF9 bne $v0, $zero, 0xBFC06B50 */ uint32_t psx_brA_BFC06B68 = cpu->gpr[2]; uint32_t psx_brB_BFC06B68 = cpu->gpr[0]; psx_taken_BFC06B68 = (psx_brA_BFC06B68 != psx_brB_BFC06B68); psx_delay_BFC06B68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B6C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B6Cu); #endif if (psx_delay_BFC06B68) { psx_delay_BFC06B68 = 0; if (psx_taken_BFC06B68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B50u); goto label_BFC06B50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B70u); } label_BFC06B70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B70u); #endif /* 0xBFC06B70: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06B70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC06B78: 03E00008 jr $ra */ psx_delay_BFC06B78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06B7C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC06B7Cu); #endif if (psx_delay_BFC06B78) { psx_delay_BFC06B78 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC06B80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC06B80: 1086FFEE beq $a0, $a2, 0xBFC06B3C */ uint32_t psx_brA_BFC06B80 = cpu->gpr[4]; uint32_t psx_brB_BFC06B80 = cpu->gpr[6]; psx_taken_BFC06B80 = (psx_brA_BFC06B80 == psx_brB_BFC06B80); psx_delay_BFC06B80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B84u); #endif if (psx_delay_BFC06B80) { psx_delay_BFC06B80 = 0; if (psx_taken_BFC06B80) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B3Cu); goto label_BFC06B3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B88u); } label_BFC06B88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06B88: 0FF01A67 jal 0xBFC0699C */ cpu->gpr[31] = 0xBFC06B90u; /* jal link before delay slot */ psx_delay_BFC06B88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B8Cu); #endif if (psx_delay_BFC06B88) { psx_delay_BFC06B88 = 0; cpu->gpr[31] = 0xBFC06B90u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0699Cu); cpu->pc = 0xBFC0699Cu; return; } label_BFC06B90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06B90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06B90: 1440FFE6 bne $v0, $zero, 0xBFC06B2C */ uint32_t psx_brA_BFC06B90 = cpu->gpr[2]; uint32_t psx_brB_BFC06B90 = cpu->gpr[0]; psx_taken_BFC06B90 = (psx_brA_BFC06B90 != psx_brB_BFC06B90); psx_delay_BFC06B90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B94u); #endif if (psx_delay_BFC06B90) { psx_delay_BFC06B90 = 0; if (psx_taken_BFC06B90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B2Cu); goto label_BFC06B2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B98u); } 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, 0x1u); #endif /* 0xBFC06B98: 1000FFF5 beq $zero, $zero, 0xBFC06B70 */ uint32_t psx_brA_BFC06B98 = cpu->gpr[0]; uint32_t psx_brB_BFC06B98 = cpu->gpr[0]; psx_taken_BFC06B98 = (psx_brA_BFC06B98 == psx_brB_BFC06B98); psx_delay_BFC06B98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06B9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06B9Cu); #endif if (psx_delay_BFC06B98) { psx_delay_BFC06B98 = 0; if (psx_taken_BFC06B98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B70u); goto label_BFC06B70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BA0u); } label_BFC06BA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC06BA0: 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(0xBFC06BA0u); #endif 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 /* 0xBFC06BA4: 80E80000 lb $t0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[8] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 8, 0x80u); PGXP_LOAD(0x80E80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC06BA4u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC06BAC: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06BB0: 0FF01A67 jal 0xBFC0699C */ cpu->gpr[31] = 0xBFC06BB8u; /* jal link before delay slot */ psx_delay_BFC06BB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x501u); #endif /* 0xBFC06BB4: 01005025 or $t2, $t0, $zero */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[8] | cpu->gpr[0]; PGXP_ALU(0x01005025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06BB4u); #endif if (psx_delay_BFC06BB0) { psx_delay_BFC06BB0 = 0; cpu->gpr[31] = 0xBFC06BB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0699Cu); cpu->pc = 0xBFC0699Cu; return; } label_BFC06BB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06BB8: 10400003 beq $v0, $zero, 0xBFC06BC8 */ uint32_t psx_brA_BFC06BB8 = cpu->gpr[2]; uint32_t psx_brB_BFC06BB8 = cpu->gpr[0]; psx_taken_BFC06BB8 = (psx_brA_BFC06BB8 == psx_brB_BFC06BB8); psx_delay_BFC06BB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC06BBC: 2503FFD0 addiu $v1, $t0, -48 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] + (-48)); PGXP_ALU(0x2503FFD0u, cpu->gpr[3], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06BBCu); #endif if (psx_delay_BFC06BB8) { psx_delay_BFC06BB8 = 0; if (psx_taken_BFC06BB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BC8u); goto label_BFC06BC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BC0u); } label_BFC06BC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06BC0: 1120FFF7 beq $t1, $zero, 0xBFC06BA0 */ uint32_t psx_brA_BFC06BC0 = cpu->gpr[9]; uint32_t psx_brB_BFC06BC0 = cpu->gpr[0]; psx_taken_BFC06BC0 = (psx_brA_BFC06BC0 == psx_brB_BFC06BC0); psx_delay_BFC06BC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06BC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06BC4u); #endif if (psx_delay_BFC06BC0) { psx_delay_BFC06BC0 = 0; if (psx_taken_BFC06BC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BA0u); goto label_BFC06BA0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BC8u); } label_BFC06BC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC06BC8: 2C64000A sltiu $a0, $v1, 10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C64000Au, cpu->gpr[4], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC06BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06BCC: 10800005 beq $a0, $zero, 0xBFC06BE4 */ uint32_t psx_brA_BFC06BCC = cpu->gpr[4]; uint32_t psx_brB_BFC06BCC = cpu->gpr[0]; psx_taken_BFC06BCC = (psx_brA_BFC06BCC == psx_brB_BFC06BCC); psx_delay_BFC06BCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06BD0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06BD0u); #endif if (psx_delay_BFC06BCC) { psx_delay_BFC06BCC = 0; if (psx_taken_BFC06BCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BE4u); goto label_BFC06BE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BD4u); } label_BFC06BD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06BD4: 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(0xBFC06BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC06BD8: 00663025 or $a2, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[3] | cpu->gpr[6]; PGXP_ALU(0x00663025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06BD8u); #endif label_BFC06BDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06BDC: 1000FFF0 beq $zero, $zero, 0xBFC06BA0 */ uint32_t psx_brA_BFC06BDC = cpu->gpr[0]; uint32_t psx_brB_BFC06BDC = cpu->gpr[0]; psx_taken_BFC06BDC = (psx_brA_BFC06BDC == psx_brB_BFC06BDC); psx_delay_BFC06BDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06BE0: 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(0xBFC06BE0u); #endif if (psx_delay_BFC06BDC) { psx_delay_BFC06BDC = 0; if (psx_taken_BFC06BDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BA0u); goto label_BFC06BA0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BE4u); } label_BFC06BE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1108u); #endif /* 0xBFC06BE4: 010C1824 and $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(0x010C1824u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x8u); #endif /* 0xBFC06BE8: 2463FFBF addiu $v1, $v1, -65 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-65)); PGXP_ALU(0x2463FFBFu, cpu->gpr[3], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0xBFC06BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06BEC: 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(0xBFC06BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06BF0: 2C630006 sltiu $v1, $v1, 6 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000006u ? 1 : 0); PGXP_ALU(0x2C630006u, cpu->gpr[3], _pgx1, 0x0006u); } #ifdef PSX_COSIM cosim_instr(0xBFC06BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06BF4: 10600008 beq $v1, $zero, 0xBFC06C18 */ uint32_t psx_brA_BFC06BF4 = cpu->gpr[3]; uint32_t psx_brB_BFC06BF4 = cpu->gpr[0]; psx_taken_BFC06BF4 = (psx_brA_BFC06BF4 == psx_brB_BFC06BF4); psx_delay_BFC06BF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06BF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06BF8u); #endif if (psx_delay_BFC06BF4) { psx_delay_BFC06BF4 = 0; if (psx_taken_BFC06BF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C18u); goto label_BFC06C18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BFCu); } label_BFC06BFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06BFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC06BFC: 2502FFBF addiu $v0, $t0, -65 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] + (-65)); PGXP_ALU(0x2502FFBFu, cpu->gpr[2], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0xBFC06BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06C00: 2C42001A sltiu $v0, $v0, 26 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C42001Au, cpu->gpr[2], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0xBFC06C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06C04: 1440000C bne $v0, $zero, 0xBFC06C38 */ uint32_t psx_brA_BFC06C04 = cpu->gpr[2]; uint32_t psx_brB_BFC06C04 = cpu->gpr[0]; psx_taken_BFC06C04 = (psx_brA_BFC06C04 != psx_brB_BFC06C04); psx_delay_BFC06C04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06C08: 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(0xBFC06C08u); #endif if (psx_delay_BFC06C04) { psx_delay_BFC06C04 = 0; if (psx_taken_BFC06C04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C38u); goto label_BFC06C38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C0Cu); } label_BFC06C0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC06C0C: 254AFFA9 addiu $t2, $t2, -87 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-87)); PGXP_ALU(0x254AFFA9u, cpu->gpr[10], _pgx1, 0xFFFFFFA9u); } #ifdef PSX_COSIM cosim_instr(0xBFC06C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06C10: 1000FFF2 beq $zero, $zero, 0xBFC06BDC */ uint32_t psx_brA_BFC06C10 = cpu->gpr[0]; uint32_t psx_brB_BFC06C10 = cpu->gpr[0]; psx_taken_BFC06C10 = (psx_brA_BFC06C10 == psx_brB_BFC06C10); psx_delay_BFC06C10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x440u); #endif /* 0xBFC06C14: 01463025 or $a2, $t2, $a2 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[10] | cpu->gpr[6]; PGXP_ALU(0x01463025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06C14u); #endif if (psx_delay_BFC06C10) { psx_delay_BFC06C10 = 0; if (psx_taken_BFC06C10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06BDCu); goto label_BFC06BDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C18u); } label_BFC06C18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC06C18: 1500000A bne $t0, $zero, 0xBFC06C44 */ uint32_t psx_brA_BFC06C18 = cpu->gpr[8]; uint32_t psx_brB_BFC06C18 = cpu->gpr[0]; psx_taken_BFC06C18 = (psx_brA_BFC06C18 != psx_brB_BFC06C18); psx_delay_BFC06C18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06C1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06C1Cu); #endif if (psx_delay_BFC06C18) { psx_delay_BFC06C18 = 0; if (psx_taken_BFC06C18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C44u); goto label_BFC06C44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C20u); } 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 /* 0xBFC06C20: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C20u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06C24: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x840u); #endif /* 0xBFC06C28: AD660000 sw $a2, 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, 0xBFC06C28u); return; } g_debug_last_store_pc = 0xBFC06C28u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAD660000u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC06C2C: 24849A84 addiu $a0, $a0, -25980 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25980)); PGXP_ALU(0x24849A84u, cpu->gpr[4], _pgx1, 0xFFFF9A84u); } #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, 0x0u); #endif /* 0xBFC06C30: 0BF013D9 j 0xBFC04F64 */ psx_delay_BFC06C30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06C34: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC06C34u); #endif if (psx_delay_BFC06C30) { psx_delay_BFC06C30 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06C38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC06C38: 35080020 ori $t0, $t0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] | 0x20u; PGXP_ALU(0x35080020u, cpu->gpr[8], _pgx1, 0x0020u); } #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, 0x1u); #endif /* 0xBFC06C3C: 1000FFF3 beq $zero, $zero, 0xBFC06C0C */ uint32_t psx_brA_BFC06C3C = cpu->gpr[0]; uint32_t psx_brB_BFC06C3C = cpu->gpr[0]; psx_taken_BFC06C3C = (psx_brA_BFC06C3C == psx_brB_BFC06C3C); psx_delay_BFC06C3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC06C40: 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(0xBFC06C40u); #endif if (psx_delay_BFC06C3C) { psx_delay_BFC06C3C = 0; if (psx_taken_BFC06C3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C0Cu); goto label_BFC06C0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C44u); } label_BFC06C44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06C44: 1040FFCA beq $v0, $zero, 0xBFC06B70 */ uint32_t psx_brA_BFC06C44 = cpu->gpr[2]; uint32_t psx_brB_BFC06C44 = cpu->gpr[0]; psx_taken_BFC06C44 = (psx_brA_BFC06C44 == psx_brB_BFC06C44); psx_delay_BFC06C44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06C48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06C48u); #endif if (psx_delay_BFC06C44) { psx_delay_BFC06C44 = 0; if (psx_taken_BFC06C44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06B70u); goto label_BFC06B70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C4Cu); } label_BFC06C4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06C4C: 1000FFF4 beq $zero, $zero, 0xBFC06C20 */ uint32_t psx_brA_BFC06C4C = cpu->gpr[0]; uint32_t psx_brB_BFC06C4C = cpu->gpr[0]; psx_taken_BFC06C4C = (psx_brA_BFC06C4C == psx_brB_BFC06C4C); psx_delay_BFC06C4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06C50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06C50u); #endif if (psx_delay_BFC06C4C) { psx_delay_BFC06C4C = 0; if (psx_taken_BFC06C4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C20u); goto label_BFC06C20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C54u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C54u); cpu->pc = 0xBFC06C54u; return; /* fallthrough */ } void OpenBIOS_func_1FC06C54(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06C54u); int psx_delay_BFC06C74 = 0; label_BFC06C54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC06C54: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06C58: 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(0xBFC06C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC06C5C: 0000000C syscall */ cpu->pc = 0xBFC06C5Cu; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC06C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06C60: 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(0xBFC06C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC06C64: 0000000C syscall */ cpu->pc = 0xBFC06C64u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC06C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06C68: 3C040300 lui $a0, 0x300 */ cpu->gpr[4] = 0x03000000u; PGXP_ALU(0x3C040300u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06C6C: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 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, 0x14u); #endif /* 0xBFC06C70: AC441814 sw $a0, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06C70u); return; } g_debug_last_store_pc = 0xBFC06C70u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441814u, _pgxa, cpu->gpr[4]); } #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, 0x0u); #endif /* 0xBFC06C74: 0BF0198D j 0xBFC06634 */ psx_delay_BFC06C74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC06C78: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06C78u); #endif if (psx_delay_BFC06C74) { psx_delay_BFC06C74 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06634u); cpu->pc = 0xBFC06634u; return; } } void OpenBIOS_func_1FC06C7C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC06C7Cu); int psx_delay_BFC06CBC = 0; int psx_delay_BFC06CC8 = 0; int psx_delay_BFC06CD4 = 0; int psx_delay_BFC06CDC = 0; int psx_delay_BFC06CEC = 0; int psx_delay_BFC06CF4 = 0; int psx_delay_BFC06D04 = 0; int psx_delay_BFC06D10 = 0; int psx_delay_BFC06D28 = 0; int psx_delay_BFC06D48 = 0; int psx_delay_BFC06D58 = 0; int psx_delay_BFC06D70 = 0; int psx_taken_BFC06D70 = 0; int psx_delay_BFC06D84 = 0; int psx_taken_BFC06D84 = 0; int psx_delay_BFC06DB4 = 0; int psx_taken_BFC06DB4 = 0; int psx_delay_BFC06DD0 = 0; int psx_delay_BFC06DE4 = 0; int psx_delay_BFC06E14 = 0; int psx_delay_BFC06E2C = 0; int psx_delay_BFC06E34 = 0; int psx_delay_BFC06E40 = 0; int psx_delay_BFC06E4C = 0; int psx_delay_BFC06E58 = 0; int psx_delay_BFC06E64 = 0; int psx_delay_BFC06E70 = 0; int psx_delay_BFC06E7C = 0; int psx_delay_BFC06E84 = 0; int psx_delay_BFC06E8C = 0; int psx_taken_BFC06E8C = 0; int psx_delay_BFC06EA0 = 0; int psx_delay_BFC06EB4 = 0; int psx_delay_BFC06EC0 = 0; int psx_delay_BFC06EC8 = 0; int psx_taken_BFC06EC8 = 0; int psx_delay_BFC06ED0 = 0; int psx_delay_BFC06F04 = 0; int psx_taken_BFC06F04 = 0; int psx_delay_BFC06F0C = 0; int psx_delay_BFC06F18 = 0; int psx_delay_BFC06F24 = 0; int psx_delay_BFC06F2C = 0; int psx_taken_BFC06F2C = 0; int psx_delay_BFC06F44 = 0; int psx_delay_BFC06F4C = 0; int psx_taken_BFC06F4C = 0; int psx_delay_BFC06F60 = 0; int psx_delay_BFC06F68 = 0; int psx_taken_BFC06F68 = 0; int psx_delay_BFC06F74 = 0; int psx_delay_BFC06F7C = 0; int psx_taken_BFC06F7C = 0; int psx_delay_BFC06FB8 = 0; int psx_delay_BFC06FC4 = 0; int psx_delay_BFC06FCC = 0; int psx_taken_BFC06FCC = 0; int psx_delay_BFC06FD8 = 0; int psx_delay_BFC06FF0 = 0; int psx_delay_BFC06FF8 = 0; int psx_delay_BFC07004 = 0; int psx_delay_BFC07014 = 0; int psx_delay_BFC07024 = 0; int psx_delay_BFC07030 = 0; int psx_delay_BFC0703C = 0; int psx_delay_BFC07044 = 0; int psx_delay_BFC07058 = 0; int psx_delay_BFC07064 = 0; int psx_delay_BFC0706C = 0; int psx_taken_BFC0706C = 0; int psx_delay_BFC07098 = 0; int psx_delay_BFC070AC = 0; int psx_delay_BFC070B4 = 0; int psx_taken_BFC070B4 = 0; int psx_delay_BFC070D8 = 0; int psx_delay_BFC070EC = 0; int psx_delay_BFC07108 = 0; int psx_delay_BFC0711C = 0; int psx_delay_BFC07124 = 0; int psx_taken_BFC07124 = 0; int psx_delay_BFC07138 = 0; int psx_delay_BFC07144 = 0; int psx_delay_BFC0714C = 0; int psx_taken_BFC0714C = 0; int psx_delay_BFC0715C = 0; int psx_delay_BFC07168 = 0; int psx_delay_BFC07170 = 0; int psx_taken_BFC07170 = 0; int psx_delay_BFC0718C = 0; int psx_delay_BFC07194 = 0; int psx_taken_BFC07194 = 0; int psx_delay_BFC071AC = 0; int psx_delay_BFC071B8 = 0; int psx_delay_BFC071C0 = 0; int psx_taken_BFC071C0 = 0; int psx_delay_BFC071D4 = 0; int psx_delay_BFC071F0 = 0; int psx_delay_BFC07204 = 0; int psx_delay_BFC07218 = 0; int psx_delay_BFC07238 = 0; int psx_delay_BFC07240 = 0; int psx_taken_BFC07240 = 0; int psx_delay_BFC07258 = 0; int psx_taken_BFC07258 = 0; int psx_delay_BFC07274 = 0; int psx_delay_BFC0727C = 0; int psx_taken_BFC0727C = 0; int psx_delay_BFC07284 = 0; int psx_taken_BFC07284 = 0; int psx_delay_BFC0728C = 0; int psx_taken_BFC0728C = 0; int psx_delay_BFC07294 = 0; int psx_taken_BFC07294 = 0; int psx_delay_BFC0729C = 0; int psx_taken_BFC0729C = 0; int psx_delay_BFC072A4 = 0; int psx_taken_BFC072A4 = 0; int psx_delay_BFC072B0 = 0; int psx_taken_BFC072B0 = 0; int psx_delay_BFC072B8 = 0; int psx_taken_BFC072B8 = 0; int psx_delay_BFC072C0 = 0; int psx_taken_BFC072C0 = 0; int psx_delay_BFC072D0 = 0; int psx_taken_BFC072D0 = 0; int psx_delay_BFC072D8 = 0; int psx_taken_BFC072D8 = 0; int psx_delay_BFC072E0 = 0; int psx_taken_BFC072E0 = 0; int psx_delay_BFC072E8 = 0; int psx_delay_BFC072F0 = 0; int psx_taken_BFC072F0 = 0; int psx_delay_BFC072F8 = 0; int psx_taken_BFC072F8 = 0; int psx_delay_BFC07304 = 0; int psx_taken_BFC07304 = 0; int psx_delay_BFC07324 = 0; int psx_delay_BFC07334 = 0; int psx_delay_BFC0733C = 0; int psx_taken_BFC0733C = 0; int psx_delay_BFC07368 = 0; int psx_taken_BFC07368 = 0; int psx_delay_BFC07374 = 0; int psx_taken_BFC07374 = 0; int psx_delay_BFC0737C = 0; int psx_taken_BFC0737C = 0; int psx_delay_BFC07388 = 0; int psx_taken_BFC07388 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC06CC4u: goto label_BFC06CC4; case 0xBFC06CD0u: goto label_BFC06CD0; case 0xBFC06CDCu: goto label_BFC06CDC; case 0xBFC06CE4u: goto label_BFC06CE4; case 0xBFC06CF4u: goto label_BFC06CF4; case 0xBFC06CFCu: goto label_BFC06CFC; case 0xBFC06D0Cu: goto label_BFC06D0C; case 0xBFC06D18u: goto label_BFC06D18; case 0xBFC06D30u: goto label_BFC06D30; case 0xBFC06D50u: goto label_BFC06D50; case 0xBFC06D60u: goto label_BFC06D60; case 0xBFC06D78u: goto label_BFC06D78; case 0xBFC06D8Cu: goto label_BFC06D8C; case 0xBFC06D90u: goto label_BFC06D90; case 0xBFC06DB4u: goto label_BFC06DB4; case 0xBFC06DBCu: goto label_BFC06DBC; case 0xBFC06DC8u: goto label_BFC06DC8; case 0xBFC06DD8u: goto label_BFC06DD8; case 0xBFC06DECu: goto label_BFC06DEC; case 0xBFC06E1Cu: goto label_BFC06E1C; case 0xBFC06E34u: goto label_BFC06E34; case 0xBFC06E3Cu: goto label_BFC06E3C; case 0xBFC06E48u: goto label_BFC06E48; case 0xBFC06E54u: goto label_BFC06E54; case 0xBFC06E60u: goto label_BFC06E60; case 0xBFC06E6Cu: goto label_BFC06E6C; case 0xBFC06E78u: goto label_BFC06E78; case 0xBFC06E84u: goto label_BFC06E84; case 0xBFC06E8Cu: goto label_BFC06E8C; case 0xBFC06E94u: goto label_BFC06E94; case 0xBFC06EA8u: goto label_BFC06EA8; case 0xBFC06EBCu: goto label_BFC06EBC; case 0xBFC06EC8u: goto label_BFC06EC8; case 0xBFC06ED0u: goto label_BFC06ED0; case 0xBFC06ED8u: goto label_BFC06ED8; case 0xBFC06F0Cu: goto label_BFC06F0C; case 0xBFC06F14u: goto label_BFC06F14; case 0xBFC06F20u: goto label_BFC06F20; case 0xBFC06F2Cu: goto label_BFC06F2C; case 0xBFC06F34u: goto label_BFC06F34; case 0xBFC06F4Cu: goto label_BFC06F4C; case 0xBFC06F54u: goto label_BFC06F54; case 0xBFC06F68u: goto label_BFC06F68; case 0xBFC06F70u: goto label_BFC06F70; case 0xBFC06F7Cu: goto label_BFC06F7C; case 0xBFC06F84u: goto label_BFC06F84; case 0xBFC06F88u: goto label_BFC06F88; case 0xBFC06FC0u: goto label_BFC06FC0; case 0xBFC06FC4u: goto label_BFC06FC4; case 0xBFC06FCCu: goto label_BFC06FCC; case 0xBFC06FD4u: goto label_BFC06FD4; case 0xBFC06FE0u: goto label_BFC06FE0; case 0xBFC06FF8u: goto label_BFC06FF8; case 0xBFC07000u: goto label_BFC07000; case 0xBFC0700Cu: goto label_BFC0700C; case 0xBFC0701Cu: goto label_BFC0701C; case 0xBFC0702Cu: goto label_BFC0702C; case 0xBFC07038u: goto label_BFC07038; case 0xBFC07044u: goto label_BFC07044; case 0xBFC0704Cu: goto label_BFC0704C; case 0xBFC07060u: goto label_BFC07060; case 0xBFC0706Cu: goto label_BFC0706C; case 0xBFC07074u: goto label_BFC07074; case 0xBFC070A0u: goto label_BFC070A0; case 0xBFC070B4u: goto label_BFC070B4; case 0xBFC070BCu: goto label_BFC070BC; case 0xBFC070E0u: goto label_BFC070E0; case 0xBFC070F4u: goto label_BFC070F4; case 0xBFC07110u: goto label_BFC07110; case 0xBFC07124u: goto label_BFC07124; case 0xBFC0712Cu: goto label_BFC0712C; case 0xBFC07140u: goto label_BFC07140; case 0xBFC0714Cu: goto label_BFC0714C; case 0xBFC07154u: goto label_BFC07154; case 0xBFC07164u: goto label_BFC07164; case 0xBFC07170u: goto label_BFC07170; case 0xBFC07178u: goto label_BFC07178; case 0xBFC07194u: goto label_BFC07194; case 0xBFC0719Cu: goto label_BFC0719C; case 0xBFC071B4u: goto label_BFC071B4; case 0xBFC071C0u: goto label_BFC071C0; case 0xBFC071C8u: goto label_BFC071C8; case 0xBFC071DCu: goto label_BFC071DC; case 0xBFC071F8u: goto label_BFC071F8; case 0xBFC0720Cu: goto label_BFC0720C; case 0xBFC07220u: goto label_BFC07220; case 0xBFC07238u: goto label_BFC07238; case 0xBFC07240u: goto label_BFC07240; case 0xBFC07248u: goto label_BFC07248; case 0xBFC07250u: goto label_BFC07250; case 0xBFC07260u: goto label_BFC07260; case 0xBFC0726Cu: goto label_BFC0726C; case 0xBFC0727Cu: goto label_BFC0727C; case 0xBFC07284u: goto label_BFC07284; case 0xBFC0728Cu: goto label_BFC0728C; case 0xBFC07294u: goto label_BFC07294; case 0xBFC0729Cu: goto label_BFC0729C; case 0xBFC072A4u: goto label_BFC072A4; case 0xBFC072ACu: goto label_BFC072AC; case 0xBFC072B8u: goto label_BFC072B8; case 0xBFC072C0u: goto label_BFC072C0; case 0xBFC072C8u: goto label_BFC072C8; case 0xBFC072D8u: goto label_BFC072D8; case 0xBFC072E0u: goto label_BFC072E0; case 0xBFC072E8u: goto label_BFC072E8; case 0xBFC072F0u: goto label_BFC072F0; case 0xBFC072F8u: goto label_BFC072F8; case 0xBFC07300u: goto label_BFC07300; case 0xBFC0730Cu: goto label_BFC0730C; case 0xBFC07314u: goto label_BFC07314; case 0xBFC0732Cu: goto label_BFC0732C; case 0xBFC0733Cu: goto label_BFC0733C; case 0xBFC07344u: goto label_BFC07344; case 0xBFC07354u: goto label_BFC07354; case 0xBFC07370u: goto label_BFC07370; case 0xBFC0737Cu: goto label_BFC0737C; case 0xBFC07384u: goto label_BFC07384; default: break; } } label_BFC06C7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06C7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC06C7C: 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(0xBFC06C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06C80: 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(0xBFC06C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06C84: 2403FBFE addiu $v1, $zero, -1026 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1026)); PGXP_ALU(0x2403FBFEu, cpu->gpr[3], _pgx1, 0xFFFFFBFEu); } #ifdef PSX_COSIM cosim_instr(0xBFC06C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC06C88: 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, 0xBFC06C88u); return; } g_debug_last_store_pc = 0xBFC06C88u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00060u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC06C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC06C8C: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC06C90: AFBF006C sw $ra, 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, 0xBFC06C90u); return; } g_debug_last_store_pc = 0xBFC06C90u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF006Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC06C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC06C94: AFB20068 sw $s2, 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, 0xBFC06C94u); return; } g_debug_last_store_pc = 0xBFC06C94u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20068u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC06C98: AFB10064 sw $s1, 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, 0xBFC06C98u); return; } g_debug_last_store_pc = 0xBFC06C98u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10064u, _pgxa, cpu->gpr[17]); } #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, 0x20000010u); #endif /* 0xBFC06C9C: 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, 0xBFC06C9Cu); return; } g_debug_last_store_pc = 0xBFC06C9Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC06CA0: 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, 0xBFC06CA0u); return; } g_debug_last_store_pc = 0xBFC06CA0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50074u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC06CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06CA4: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06CA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #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, 0x0u); #endif /* 0xBFC06CA8: 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(0xBFC06CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06CAC: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC06CB0: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x0u); #endif /* 0xBFC06CB4: 40826000 mtc0 $v0, cop0[12] */ cpu->cop0[12] = cpu->gpr[2]; #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, 0x1u); #endif /* 0xBFC06CB8: 00000000 nop */ /* nop */ #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, 0x80000000u); #endif /* 0xBFC06CBC: 0FF01A7D jal 0xBFC069F4 */ cpu->gpr[31] = 0xBFC06CC4u; /* jal link before delay slot */ psx_delay_BFC06CBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06CC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06CC0u); #endif if (psx_delay_BFC06CBC) { psx_delay_BFC06CBC = 0; cpu->gpr[31] = 0xBFC06CC4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069F4u); cpu->pc = 0xBFC069F4u; return; } label_BFC06CC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06CC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06CC4: 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(0xBFC06CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06CC8: 0FF01784 jal 0xBFC05E10 */ cpu->gpr[31] = 0xBFC06CD0u; /* jal link before delay slot */ psx_delay_BFC06CC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06CCC: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06CCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06CCCu); #endif if (psx_delay_BFC06CC8) { psx_delay_BFC06CC8 = 0; cpu->gpr[31] = 0xBFC06CD0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05E10u); cpu->pc = 0xBFC05E10u; return; } label_BFC06CD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06CD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06CD0: 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(0xBFC06CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06CD4: 0FF01795 jal 0xBFC05E54 */ 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, 0x10004u); #endif /* 0xBFC06CD8: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06CD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #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, 0xBFC05E54u); cpu->pc = 0xBFC05E54u; 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: 0FF016C9 jal 0xBFC05B24 */ 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, 0xBFC05B24u); cpu->pc = 0xBFC05B24u; 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, 0x201u); #endif /* 0xBFC06CE4: 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(0xBFC06CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC06CE8: 241100C0 addiu $s1, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241100C0u, cpu->gpr[17], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC06CEC: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC06CF4u; /* jalr 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; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC06CF4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x80020000u); #endif /* 0xBFC06CF4: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC06CFCu; /* jalr 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, 0x201u); #endif /* 0xBFC06CF8: 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(0xBFC06CF8u); #endif if (psx_delay_BFC06CF4) { psx_delay_BFC06CF4 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC06CFCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x201u); #endif /* 0xBFC06CFC: 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(0xBFC06CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06D00: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #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, 0x80000004u); #endif /* 0xBFC06D04: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06D0Cu; /* jalr link before delay slot */ psx_delay_BFC06D04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06D08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06D08u); #endif if (psx_delay_BFC06D04) { psx_delay_BFC06D04 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06D0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06D0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06D0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06D0C: 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(0xBFC06D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06D10: 0FF01A7D jal 0xBFC069F4 */ cpu->gpr[31] = 0xBFC06D18u; /* jal link before delay slot */ psx_delay_BFC06D10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06D14: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06D14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D14u); #endif if (psx_delay_BFC06D10) { psx_delay_BFC06D10 = 0; cpu->gpr[31] = 0xBFC06D18u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069F4u); cpu->pc = 0xBFC069F4u; return; } label_BFC06D18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06D18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06D18: AE001074 sw $zero, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D18u); return; } g_debug_last_store_pc = 0xBFC06D18u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE001074u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06D1C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 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, 0x10001u); #endif /* 0xBFC06D20: AE001070 sw $zero, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D20u); return; } g_debug_last_store_pc = 0xBFC06D20u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE001070u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D24u); #endif /* 0xBFC06D24: 8C444C68 lw $a0, 19560($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19560; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19560)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D24u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444C68u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC06D28: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC06D30u; /* jalr 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, 0x201u); #endif /* 0xBFC06D2C: 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(0xBFC06D2Cu); #endif if (psx_delay_BFC06D28) { psx_delay_BFC06D28 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC06D30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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, 0x5u); #endif /* 0xBFC06D30: 24020005 addiu $v0, $zero, 5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); PGXP_ALU(0x24020005u, cpu->gpr[2], _pgx1, 0x00000005u); } #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, 0x20u); #endif /* 0xBFC06D34: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x41u); #endif /* 0xBFC06D38: 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(0xBFC06D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06D3C: 24A59C14 addiu $a1, $a1, -25580 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25580)); PGXP_ALU(0x24A59C14u, cpu->gpr[5], _pgx1, 0xFFFF9C14u); } #ifdef PSX_COSIM cosim_instr(0xBFC06D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC06D40: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC06D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06D44: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06D44u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06D48: 0FF02176 jal 0xBFC085D8 */ 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, 0x1u); #endif /* 0xBFC06D4C: 00000000 nop */ /* nop */ #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, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; 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, 0x41u); #endif /* 0xBFC06D50: 24060039 addiu $a2, $zero, 57 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (57)); PGXP_ALU(0x24060039u, cpu->gpr[6], _pgx1, 0x00000039u); } #ifdef PSX_COSIM cosim_instr(0xBFC06D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06D54: 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(0xBFC06D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06D58: 0FF021B1 jal 0xBFC086C4 */ cpu->gpr[31] = 0xBFC06D60u; /* jal link before delay slot */ psx_delay_BFC06D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC06D5C: 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(0xBFC06D5Cu); #endif if (psx_delay_BFC06D58) { psx_delay_BFC06D58 = 0; cpu->gpr[31] = 0xBFC06D60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086C4u); cpu->pc = 0xBFC086C4u; return; } label_BFC06D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06D60: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06D64: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06D68: 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(0xBFC06D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06D6C: 24630080 addiu $v1, $v1, 128 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (128)); PGXP_ALU(0x24630080u, cpu->gpr[3], _pgx1, 0x00000080u); } #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, 0xCu); #endif /* 0xBFC06D70: 10430015 beq $v0, $v1, 0xBFC06DC8 */ uint32_t psx_brA_BFC06D70 = cpu->gpr[2]; uint32_t psx_brB_BFC06D70 = cpu->gpr[3]; psx_taken_BFC06D70 = (psx_brA_BFC06D70 == psx_brB_BFC06D70); psx_delay_BFC06D70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06D74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06D74u); #endif if (psx_delay_BFC06D70) { psx_delay_BFC06D70 = 0; if (psx_taken_BFC06D70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06DC8u); goto label_BFC06DC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06D78u); } 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 /* 0xBFC06D78: 8C420004 lw $v0, 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, 0xBFC06D78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06D7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06D80: 2C430021 sltiu $v1, $v0, 33 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000021u ? 1 : 0); PGXP_ALU(0x2C430021u, cpu->gpr[3], _pgx1, 0x0021u); } #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, 0x9u); #endif /* 0xBFC06D84: 14600002 bne $v1, $zero, 0xBFC06D90 */ uint32_t psx_brA_BFC06D84 = cpu->gpr[3]; uint32_t psx_brB_BFC06D84 = cpu->gpr[0]; psx_taken_BFC06D84 = (psx_brA_BFC06D84 != psx_brB_BFC06D84); psx_delay_BFC06D84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06D88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06D88u); #endif if (psx_delay_BFC06D84) { psx_delay_BFC06D84 = 0; if (psx_taken_BFC06D84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06D90u); goto label_BFC06D90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06D8Cu); } label_BFC06D8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06D8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06D8C: 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(0xBFC06D8Cu); #endif label_BFC06D90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06D90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06D90: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC06D94: 24640080 addiu $a0, $v1, 128 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (128)); PGXP_ALU(0x24640080u, cpu->gpr[4], _pgx1, 0x00000080u); } #ifdef PSX_COSIM cosim_instr(0xBFC06D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D98u); #endif /* 0xBFC06D98: 8C630080 lw $v1, 128($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06D98u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630080u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06D9C: 3C06BFC1 lui $a2, 0xBFC1 */ cpu->gpr[6] = 0xBFC10000u; PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC06DA0: 00832021 addu $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00832021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC06DA4: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC06DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x205u); #endif /* 0xBFC06DA8: 00404825 or $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(0x00404825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC06DAC: 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(0xBFC06DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC06DB0: 24C69A90 addiu $a2, $a2, -25968 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-25968)); PGXP_ALU(0x24C69A90u, cpu->gpr[6], _pgx1, 0xFFFF9A90u); } #ifdef PSX_COSIM cosim_instr(0xBFC06DB0u); #endif label_BFC06DB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06DB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280u); #endif /* 0xBFC06DB4: 14E90048 bne $a3, $t1, 0xBFC06ED8 */ uint32_t psx_brA_BFC06DB4 = cpu->gpr[7]; uint32_t psx_brB_BFC06DB4 = cpu->gpr[9]; psx_taken_BFC06DB4 = (psx_brA_BFC06DB4 != psx_brB_BFC06DB4); psx_delay_BFC06DB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06DB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06DB8u); #endif if (psx_delay_BFC06DB4) { psx_delay_BFC06DB4 = 0; if (psx_taken_BFC06DB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED8u); goto label_BFC06ED8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06DBCu); } label_BFC06DBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06DBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06DBC: 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(0xBFC06DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC06DC0: 03A21021 addu $v0, $sp, $v0 */ { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[29] + cpu->gpr[2]; PGXP_ALU(0x03A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06DC4: A0400010 sb $zero, 16($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06DC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (16)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0400010u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06DC4u); #endif label_BFC06DC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06DC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06DC8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC06DCC: 27A50010 addiu $a1, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A50010u, cpu->gpr[5], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC06DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06DD0: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC06DD8u; /* jal link before delay slot */ psx_delay_BFC06DD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06DD4: 24849AA4 addiu $a0, $a0, -25948 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25948)); PGXP_ALU(0x24849AA4u, cpu->gpr[4], _pgx1, 0xFFFF9AA4u); } #ifdef PSX_COSIM cosim_instr(0xBFC06DD4u); #endif if (psx_delay_BFC06DD0) { psx_delay_BFC06DD0 = 0; cpu->gpr[31] = 0xBFC06DD8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06DD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06DD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06DD8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06DDC: 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(0xBFC06DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06DE0: A0432041 sb $v1, 8257($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06DE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8257)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0432041u, _pgxa, cpu->gpr[3]); } #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, 0x80000000u); #endif /* 0xBFC06DE4: 0FF01A7D jal 0xBFC069F4 */ cpu->gpr[31] = 0xBFC06DECu; /* jal link before delay slot */ psx_delay_BFC06DE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC06DE8: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06DE8u); #endif if (psx_delay_BFC06DE4) { psx_delay_BFC06DE4 = 0; cpu->gpr[31] = 0xBFC06DECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069F4u); cpu->pc = 0xBFC069F4u; return; } label_BFC06DEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06DECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06DEC: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DF0u); #endif /* 0xBFC06DF0: 8C4395F8 lw $v1, -27144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -27144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-27144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06DF0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4395F8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06DF4: 244295F8 addiu $v0, $v0, -27144 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-27144)); PGXP_ALU(0x244295F8u, cpu->gpr[2], _pgx1, 0xFFFF95F8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC06DF8: AE23AE88 sw $v1, -20856($s1) */ { uint32_t _pgxa = cpu->gpr[17] + -20856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06DF8u); return; } g_debug_last_store_pc = 0xBFC06DF8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE23AE88u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06DFC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E00u); #endif /* 0xBFC06E00: 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, 0xBFC06E00u); 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(0xBFC06E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E04u); #endif /* 0xBFC06E04: 8C420008 lw $v0, 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, 0xBFC06E04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420008u, _pgxa, cpu->gpr[2]); } #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, 0x60000u); #endif /* 0xBFC06E08: 2632AE88 addiu $s2, $s1, -20856 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); PGXP_ALU(0x2632AE88u, cpu->gpr[18], _pgx1, 0xFFFFAE88u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06E0C: 24849B00 addiu $a0, $a0, -25856 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25856)); PGXP_ALU(0x24849B00u, cpu->gpr[4], _pgx1, 0xFFFF9B00u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC06E10: 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, 0xBFC06E10u); return; } g_debug_last_store_pc = 0xBFC06E10u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06E14: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC06E1Cu; /* jal link before delay slot */ psx_delay_BFC06E14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC06E18: 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, 0xBFC06E18u); return; } g_debug_last_store_pc = 0xBFC06E18u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06E18u); #endif if (psx_delay_BFC06E14) { psx_delay_BFC06E14 = 0; cpu->gpr[31] = 0xBFC06E1Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06E1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06E1C: 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(0xBFC06E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06E20: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06E24: 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(0xBFC06E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06E28: 241000C0 addiu $s0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241000C0u, cpu->gpr[16], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC06E2C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC06E34u; /* jalr link before delay slot */ psx_delay_BFC06E2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06E30: 24848DD8 addiu $a0, $a0, -29224 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-29224)); PGXP_ALU(0x24848DD8u, cpu->gpr[4], _pgx1, 0xFFFF8DD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E30u); #endif if (psx_delay_BFC06E2C) { psx_delay_BFC06E2C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC06E34u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06E34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06E34: 0FF01A8E jal 0xBFC06A38 */ cpu->gpr[31] = 0xBFC06E3Cu; /* jal link before delay slot */ psx_delay_BFC06E34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06E38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06E38u); #endif if (psx_delay_BFC06E34) { psx_delay_BFC06E34 = 0; cpu->gpr[31] = 0xBFC06E3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A38u); cpu->pc = 0xBFC06A38u; return; } label_BFC06E3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06E3C: 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(0xBFC06E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC06E40: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC06E48u; /* jalr link before delay slot */ psx_delay_BFC06E40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E44: 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(0xBFC06E44u); #endif if (psx_delay_BFC06E40) { psx_delay_BFC06E40 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC06E48u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06E48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06E48: 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(0xBFC06E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC06E4C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC06E54u; /* jalr link before delay slot */ psx_delay_BFC06E4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E50: 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(0xBFC06E50u); #endif if (psx_delay_BFC06E4C) { psx_delay_BFC06E4C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC06E54u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06E54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E54u); #endif /* 0xBFC06E54: 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, 0xBFC06E54u); 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(0xBFC06E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06E58: 0FF0155E jal 0xBFC05578 */ cpu->gpr[31] = 0xBFC06E60u; /* jal link before delay slot */ psx_delay_BFC06E58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06E5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06E5Cu); #endif if (psx_delay_BFC06E58) { psx_delay_BFC06E58 = 0; cpu->gpr[31] = 0xBFC06E60u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05578u); cpu->pc = 0xBFC05578u; return; } label_BFC06E60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E60u); #endif /* 0xBFC06E60: 8E25AE88 lw $a1, -20856($s1) */ { uint32_t _pgxa = cpu->gpr[17] + -20856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06E60u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } PGXP_LOAD(0x8E25AE88u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC06E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06E64: 0FF019CA jal 0xBFC06728 */ cpu->gpr[31] = 0xBFC06E6Cu; /* jal link before delay slot */ psx_delay_BFC06E64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E68: 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(0xBFC06E68u); #endif if (psx_delay_BFC06E64) { psx_delay_BFC06E64 = 0; cpu->gpr[31] = 0xBFC06E6Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06728u); cpu->pc = 0xBFC06728u; return; } label_BFC06E6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06E6C: 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(0xBFC06E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC06E70: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC06E78u; /* jalr link before delay slot */ psx_delay_BFC06E70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E74: 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(0xBFC06E74u); #endif if (psx_delay_BFC06E70) { psx_delay_BFC06E70 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC06E78u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06E78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06E78: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06E7C: 0FF01A7D jal 0xBFC069F4 */ cpu->gpr[31] = 0xBFC06E84u; /* jal link before delay slot */ psx_delay_BFC06E7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06E80: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E80u); #endif if (psx_delay_BFC06E7C) { psx_delay_BFC06E7C = 0; cpu->gpr[31] = 0xBFC06E84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069F4u); cpu->pc = 0xBFC069F4u; return; } 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: 0FF019AC jal 0xBFC066B0 */ 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, 0x1u); #endif /* 0xBFC06E88: 00000000 nop */ /* nop */ #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, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; 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, 0x5u); #endif /* 0xBFC06E8C: 14400010 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC06E8C = cpu->gpr[2]; uint32_t psx_brB_BFC06E8C = cpu->gpr[0]; psx_taken_BFC06E8C = (psx_brA_BFC06E8C != psx_brB_BFC06E8C); psx_delay_BFC06E8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E90: 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(0xBFC06E90u); #endif if (psx_delay_BFC06E8C) { psx_delay_BFC06E8C = 0; if (psx_taken_BFC06E8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06E94u); } label_BFC06E94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06E94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC06E94: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #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, 0x5u); #endif /* 0xBFC06E98: 24020007 addiu $v0, $zero, 7 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); PGXP_ALU(0x24020007u, cpu->gpr[2], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0xBFC06E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06E9C: 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(0xBFC06E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06EA0: 0FF01D37 jal 0xBFC074DC */ cpu->gpr[31] = 0xBFC06EA8u; /* jal link before delay slot */ psx_delay_BFC06EA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06EA4: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06EA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EA4u); #endif if (psx_delay_BFC06EA0) { psx_delay_BFC06EA0 = 0; cpu->gpr[31] = 0xBFC06EA8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074DCu); cpu->pc = 0xBFC074DCu; return; } label_BFC06EA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06EA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06EA8: 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(0xBFC06EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC06EAC: A2022041 sb $v0, 8257($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06EACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (8257)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2022041u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06EB0: AE001074 sw $zero, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EB0u); return; } g_debug_last_store_pc = 0xBFC06EB0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE001074u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06EB4: 0FF00BEE jal 0xBFC02FB8 */ cpu->gpr[31] = 0xBFC06EBCu; /* jal link before delay slot */ psx_delay_BFC06EB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06EB8: AE001070 sw $zero, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06EB8u); return; } g_debug_last_store_pc = 0xBFC06EB8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE001070u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EB8u); #endif if (psx_delay_BFC06EB4) { psx_delay_BFC06EB4 = 0; cpu->gpr[31] = 0xBFC06EBCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02FB8u); cpu->pc = 0xBFC02FB8u; return; } label_BFC06EBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06EBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06EBC: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06EC0: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC06EC8u; /* jal link before delay slot */ psx_delay_BFC06EC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06EC4: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC06EC4u); #endif if (psx_delay_BFC06EC0) { psx_delay_BFC06EC0 = 0; cpu->gpr[31] = 0xBFC06EC8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC06EC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06EC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06EC8: 10400010 beq $v0, $zero, 0xBFC06F0C */ uint32_t psx_brA_BFC06EC8 = cpu->gpr[2]; uint32_t psx_brB_BFC06EC8 = cpu->gpr[0]; psx_taken_BFC06EC8 = (psx_brA_BFC06EC8 == psx_brB_BFC06EC8); psx_delay_BFC06EC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06ECC: 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(0xBFC06ECCu); #endif if (psx_delay_BFC06EC8) { psx_delay_BFC06EC8 = 0; if (psx_taken_BFC06EC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F0Cu); goto label_BFC06F0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); } label_BFC06ED0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06ED0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06ED0: 0FF01A84 jal 0xBFC06A10 */ cpu->gpr[31] = 0xBFC06ED8u; /* jal link before delay slot */ psx_delay_BFC06ED0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06ED4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06ED4u); #endif if (psx_delay_BFC06ED0) { psx_delay_BFC06ED0 = 0; cpu->gpr[31] = 0xBFC06ED8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A10u); cpu->pc = 0xBFC06A10u; return; } label_BFC06ED8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06ED8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06ED8u); #endif /* 0xBFC06ED8: 9083000C lbu $v1, 12($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 12; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (12)), 3, 0x10u); PGXP_LOAD(0x9083000Cu, _pgxa, cpu->gpr[3]); } #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, 0x10u); #endif /* 0xBFC06EDC: 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(0xBFC06EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC06EE0: 3068000F andi $t0, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3068000Fu, cpu->gpr[8], _pgx1, 0x000Fu); } #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, 0x8u); #endif /* 0xBFC06EE4: 00031902 srl $v1, $v1, 4 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 4u; PGXP_ALU(0x00031902u, cpu->gpr[3], _pgx1, 4u); } #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, 0x140u); #endif /* 0xBFC06EE8: 00C84021 addu $t0, $a2, $t0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[6] + cpu->gpr[8]; PGXP_ALU(0x00C84021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC06EEC: 00C31821 addu $v1, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[3]; PGXP_ALU(0x00C31821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC06EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EF0u); #endif /* 0xBFC06EF0: 91080000 lbu $t0, 0($t0) */ { uint32_t _pgxa = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (0)), 8, 0x100u); PGXP_LOAD(0x91080000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EF4u); #endif /* 0xBFC06EF4: 90630000 lbu $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x90630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC06EF8: A0A80000 sb $t0, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06EF8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (0)), (uint8_t)(cpu->gpr[8] & 0xFFu)); PGXP_STORE(0xA0A80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC06EFC: A0A30001 sb $v1, 1($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06EFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0A30001u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC06F00: 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(0xBFC06F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06F04: 1000FFAB beq $zero, $zero, 0xBFC06DB4 */ uint32_t psx_brA_BFC06F04 = cpu->gpr[0]; uint32_t psx_brB_BFC06F04 = cpu->gpr[0]; psx_taken_BFC06F04 = (psx_brA_BFC06F04 == psx_brB_BFC06F04); psx_delay_BFC06F04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC06F08: 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(0xBFC06F08u); #endif if (psx_delay_BFC06F04) { psx_delay_BFC06F04 = 0; if (psx_taken_BFC06F04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06DB4u); goto label_BFC06DB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F0Cu); } 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, 0x80000000u); #endif /* 0xBFC06F0C: 0FF01D21 jal 0xBFC07484 */ cpu->gpr[31] = 0xBFC06F14u; /* jal link before delay slot */ psx_delay_BFC06F0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06F10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06F10u); #endif if (psx_delay_BFC06F0C) { psx_delay_BFC06F0C = 0; cpu->gpr[31] = 0xBFC06F14u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07484u); cpu->pc = 0xBFC07484u; return; } label_BFC06F14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F14: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06F18: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC06F20u; /* jal link before delay slot */ psx_delay_BFC06F18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F1C: 24849B10 addiu $a0, $a0, -25840 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25840)); PGXP_ALU(0x24849B10u, cpu->gpr[4], _pgx1, 0xFFFF9B10u); } #ifdef PSX_COSIM cosim_instr(0xBFC06F1Cu); #endif if (psx_delay_BFC06F18) { psx_delay_BFC06F18 = 0; cpu->gpr[31] = 0xBFC06F20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06F20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F20: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06F24: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC06F2Cu; /* jal link before delay slot */ psx_delay_BFC06F24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F28: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC06F28u); #endif if (psx_delay_BFC06F24) { psx_delay_BFC06F24 = 0; cpu->gpr[31] = 0xBFC06F2Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC06F2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06F2C: 1440FFE8 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC06F2C = cpu->gpr[2]; uint32_t psx_brB_BFC06F2C = cpu->gpr[0]; psx_taken_BFC06F2C = (psx_brA_BFC06F2C != psx_brB_BFC06F2C); psx_delay_BFC06F2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06F30: 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(0xBFC06F30u); #endif if (psx_delay_BFC06F2C) { psx_delay_BFC06F2C = 0; if (psx_taken_BFC06F2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F34u); } label_BFC06F34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06F34: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC06F38: 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(0xBFC06F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F3C: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, 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, 0xCu); #endif /* 0xBFC06F40: A0432041 sb $v1, 8257($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC06F40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8257)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0432041u, _pgxa, cpu->gpr[3]); } #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: 0FF019AC jal 0xBFC066B0 */ 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, 0x10u); #endif /* 0xBFC06F48: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #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, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; 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, 0x5u); #endif /* 0xBFC06F4C: 1440FFE0 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC06F4C = cpu->gpr[2]; uint32_t psx_brB_BFC06F4C = cpu->gpr[0]; psx_taken_BFC06F4C = (psx_brA_BFC06F4C != psx_brB_BFC06F4C); 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: 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(0xBFC06F50u); #endif if (psx_delay_BFC06F4C) { psx_delay_BFC06F4C = 0; if (psx_taken_BFC06F4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F54u); } 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, 0x201u); #endif /* 0xBFC06F54: 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(0xBFC06F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F58u); #endif /* 0xBFC06F58: 8FA40070 lw $a0, 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, 0xBFC06F58u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06F5C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC06F60: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC06F68u; /* jalr link before delay slot */ psx_delay_BFC06F60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06F64: 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(0xBFC06F64u); #endif if (psx_delay_BFC06F60) { psx_delay_BFC06F60 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC06F68u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06F68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06F68: 0441007A bgez $v0, 0xBFC07154 */ uint32_t psx_brA_BFC06F68 = cpu->gpr[2]; psx_taken_BFC06F68 = ((int32_t)psx_brA_BFC06F68 >= 0); psx_delay_BFC06F68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC06F6C: AFA20058 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F6Cu); return; } g_debug_last_store_pc = 0xBFC06F6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20058u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC06F6Cu); #endif if (psx_delay_BFC06F68) { psx_delay_BFC06F68 = 0; if (psx_taken_BFC06F68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07154u); goto label_BFC07154; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F70u); } label_BFC06F70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F70: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06F74: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC06F7Cu; /* jal link before delay slot */ psx_delay_BFC06F74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06F78: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC06F78u); #endif if (psx_delay_BFC06F74) { psx_delay_BFC06F74 = 0; cpu->gpr[31] = 0xBFC06F7Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC06F7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06F7C: 1440FFD4 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC06F7C = cpu->gpr[2]; uint32_t psx_brB_BFC06F7C = cpu->gpr[0]; psx_taken_BFC06F7C = (psx_brA_BFC06F7C != psx_brB_BFC06F7C); 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: 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(0xBFC06F80u); #endif if (psx_delay_BFC06F7C) { psx_delay_BFC06F7C = 0; if (psx_taken_BFC06F7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F84u); } 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, 0x1u); #endif /* 0xBFC06F84: AC000180 sw $zero, 384($zero) */ { uint32_t _pgxa = cpu->gpr[0] + 384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[0] + (384)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F84u); return; } g_debug_last_store_pc = 0xBFC06F84u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC000180u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC06F84u); #endif label_BFC06F88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06F88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06F88: 3C03BFC1 lui $v1, 0xBFC1 */ cpu->gpr[3] = 0xBFC10000u; PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F8Cu); #endif /* 0xBFC06F8C: 8C6495F8 lw $a0, -27144($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -27144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-27144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F8Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C6495F8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06F90: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC06F94: 246395F8 addiu $v1, $v1, -27144 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-27144)); PGXP_ALU(0x246395F8u, cpu->gpr[3], _pgx1, 0xFFFF95F8u); } #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, 0x14u); #endif /* 0xBFC06F98: AC44AE88 sw $a0, -20856($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC06F98u); return; } g_debug_last_store_pc = 0xBFC06F98u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC44AE88u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06F9Cu); #endif /* 0xBFC06F9C: 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, 0xBFC06F9Cu); 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(0xBFC06F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC06FA0: 2442AE88 addiu $v0, $v0, -20856 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); PGXP_ALU(0x2442AE88u, cpu->gpr[2], _pgx1, 0xFFFFAE88u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FA4u); #endif /* 0xBFC06FA4: 8C630008 lw $v1, 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, 0xBFC06FA4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630008u, _pgxa, cpu->gpr[3]); } #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, 0x14u); #endif /* 0xBFC06FA8: 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, 0xBFC06FA8u); return; } g_debug_last_store_pc = 0xBFC06FA8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC06FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FACu); #endif /* 0xBFC06FAC: 8FA50074 lw $a1, 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, 0xBFC06FACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50074u, _pgxa, cpu->gpr[5]); } #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, 0x10u); #endif /* 0xBFC06FB0: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FB4: 2484ADD8 addiu $a0, $a0, -21032 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-21032)); PGXP_ALU(0x2484ADD8u, cpu->gpr[4], _pgx1, 0xFFFFADD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06FB8: 0FF01AA3 jal 0xBFC06A8C */ cpu->gpr[31] = 0xBFC06FC0u; /* jal link before delay slot */ psx_delay_BFC06FB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC06FBC: 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, 0xBFC06FBCu); return; } g_debug_last_store_pc = 0xBFC06FBCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC06FBCu); #endif if (psx_delay_BFC06FB8) { psx_delay_BFC06FB8 = 0; cpu->gpr[31] = 0xBFC06FC0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A8Cu); cpu->pc = 0xBFC06A8Cu; return; } label_BFC06FC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06FC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FC0: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06FC0u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06FC4: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC06FCCu; /* jal link before delay slot */ psx_delay_BFC06FC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FC8: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FC8u); #endif if (psx_delay_BFC06FC4) { psx_delay_BFC06FC4 = 0; cpu->gpr[31] = 0xBFC06FCCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC06FCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06FCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC06FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC06FCC: 1440FFC0 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC06FCC = cpu->gpr[2]; uint32_t psx_brB_BFC06FCC = cpu->gpr[0]; psx_taken_BFC06FCC = (psx_brA_BFC06FCC != psx_brB_BFC06FCC); psx_delay_BFC06FCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC06FD0: 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(0xBFC06FD0u); #endif if (psx_delay_BFC06FCC) { psx_delay_BFC06FCC = 0; if (psx_taken_BFC06FCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06FD4u); } label_BFC06FD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06FD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FD4: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06FD8: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC06FE0u; /* jal link before delay slot */ psx_delay_BFC06FD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FDC: 24849B00 addiu $a0, $a0, -25856 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25856)); PGXP_ALU(0x24849B00u, cpu->gpr[4], _pgx1, 0xFFFF9B00u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FDCu); #endif if (psx_delay_BFC06FD8) { psx_delay_BFC06FD8 = 0; cpu->gpr[31] = 0xBFC06FE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC06FE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06FE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC06FE0: 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(0xBFC06FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FE4: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC06FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC06FE8: 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(0xBFC06FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC06FEC: 241000C0 addiu $s0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241000C0u, cpu->gpr[16], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC06FF0: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC06FF8u; /* jalr link before delay slot */ psx_delay_BFC06FF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC06FF4: 24848DD8 addiu $a0, $a0, -29224 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-29224)); PGXP_ALU(0x24848DD8u, cpu->gpr[4], _pgx1, 0xFFFF8DD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC06FF4u); #endif if (psx_delay_BFC06FF0) { psx_delay_BFC06FF0 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC06FF8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC06FF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC06FF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC06FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC06FF8: 0FF01A8E jal 0xBFC06A38 */ cpu->gpr[31] = 0xBFC07000u; /* jal link before delay slot */ psx_delay_BFC06FF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC06FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC06FFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC06FFCu); #endif if (psx_delay_BFC06FF8) { psx_delay_BFC06FF8 = 0; cpu->gpr[31] = 0xBFC07000u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A38u); cpu->pc = 0xBFC06A38u; return; } label_BFC07000: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07000u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07000: 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(0xBFC07000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC07004: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC0700Cu; /* jalr link before delay slot */ psx_delay_BFC07004 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07008: 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(0xBFC07008u); #endif if (psx_delay_BFC07004) { psx_delay_BFC07004 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC0700Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0700C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0700Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0700Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0700Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0700C: 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(0xBFC0700Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC07010: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC07014: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC0701Cu; /* jalr 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, 0x11u); #endif /* 0xBFC07018: 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(0xBFC07018u); #endif if (psx_delay_BFC07014) { psx_delay_BFC07014 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC0701Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0701C: 2622AE88 addiu $v0, $s1, -20856 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); PGXP_ALU(0x2622AE88u, cpu->gpr[2], _pgx1, 0xFFFFAE88u); } #ifdef PSX_COSIM cosim_instr(0xBFC0701Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07020u); #endif /* 0xBFC07020: 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, 0xBFC07020u); 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(0xBFC07020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07024: 0FF0155E jal 0xBFC05578 */ cpu->gpr[31] = 0xBFC0702Cu; /* jal 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; cpu->gpr[31] = 0xBFC0702Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC05578u); cpu->pc = 0xBFC05578u; 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: 8E25AE88 lw $a1, -20856($s1) */ { uint32_t _pgxa = cpu->gpr[17] + -20856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0702Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } PGXP_LOAD(0x8E25AE88u, _pgxa, cpu->gpr[5]); } #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, 0x80000000u); #endif /* 0xBFC07030: 0FF019CA jal 0xBFC06728 */ cpu->gpr[31] = 0xBFC07038u; /* jal link before delay slot */ psx_delay_BFC07030 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07034: 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(0xBFC07034u); #endif if (psx_delay_BFC07030) { psx_delay_BFC07030 = 0; cpu->gpr[31] = 0xBFC07038u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06728u); cpu->pc = 0xBFC06728u; return; } label_BFC07038: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07038u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07038: 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(0xBFC07038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0703Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC0703C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC07044u; /* jalr link before delay slot */ psx_delay_BFC0703C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07040: 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(0xBFC07040u); #endif if (psx_delay_BFC0703C) { psx_delay_BFC0703C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC07044u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07044u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07044: 0FF00B9C jal 0xBFC02E70 */ cpu->gpr[31] = 0xBFC0704Cu; /* jal link before delay slot */ psx_delay_BFC07044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07048: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07048u); #endif if (psx_delay_BFC07044) { psx_delay_BFC07044 = 0; cpu->gpr[31] = 0xBFC0704Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC02E70u); cpu->pc = 0xBFC02E70u; return; } label_BFC0704C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0704Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0704Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0704Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0704C: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #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, 0x10u); #endif /* 0xBFC07050: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20u); #endif /* 0xBFC07054: 24A5ADD8 addiu $a1, $a1, -21032 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-21032)); PGXP_ALU(0x24A5ADD8u, cpu->gpr[5], _pgx1, 0xFFFFADD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC07054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07058: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC07060u; /* jal link before delay slot */ psx_delay_BFC07058 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0705Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0705C: 24849B70 addiu $a0, $a0, -25744 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25744)); PGXP_ALU(0x24849B70u, cpu->gpr[4], _pgx1, 0xFFFF9B70u); } #ifdef PSX_COSIM cosim_instr(0xBFC0705Cu); #endif if (psx_delay_BFC07058) { psx_delay_BFC07058 = 0; cpu->gpr[31] = 0xBFC07060u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC07060: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07060u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07060: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07064: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC0706Cu; /* jal link before delay slot */ psx_delay_BFC07064 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07068: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC07068u); #endif if (psx_delay_BFC07064) { psx_delay_BFC07064 = 0; cpu->gpr[31] = 0xBFC0706Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC0706C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0706Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0706Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0706Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0706C: 1440FF98 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC0706C = cpu->gpr[2]; uint32_t psx_brB_BFC0706C = cpu->gpr[0]; psx_taken_BFC0706C = (psx_brA_BFC0706C != psx_brB_BFC0706C); psx_delay_BFC0706C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07070: 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(0xBFC07070u); #endif if (psx_delay_BFC0706C) { psx_delay_BFC0706C = 0; if (psx_taken_BFC0706C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07074u); } label_BFC07074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07074u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000005u); #endif /* 0xBFC07074: 03A01025 or $v0, $sp, $zero */ { uint32_t _pgx1 = cpu->gpr[29]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[29] | cpu->gpr[0]; PGXP_ALU(0x03A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07078: 3C033FFF lui $v1, 0x3FFF */ cpu->gpr[3] = 0x3FFF0000u; PGXP_ALU(0x3C033FFFu, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC0707C: 3463FFFF ori $v1, $v1, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0xFFFFu; PGXP_ALU(0x3463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } #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, 0xCu); #endif /* 0xBFC07080: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC07084: 3C06FFFF lui $a2, 0xFFFF */ cpu->gpr[6] = 0xFFFF0000u; PGXP_ALU(0x3C06FFFFu, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC07088: 00463021 addu $a2, $v0, $a2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[2] + cpu->gpr[6]; PGXP_ALU(0x00463021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC0708C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x21u); #endif /* 0xBFC07090: 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(0xBFC07090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07094: 24420540 addiu $v0, $v0, 1344 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (1344)); PGXP_ALU(0x24420540u, cpu->gpr[2], _pgx1, 0x00000540u); } #ifdef PSX_COSIM cosim_instr(0xBFC07094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC07098: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC070A0u; /* jalr link before delay slot */ psx_delay_BFC07098 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0709Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0709C: 3C04A001 lui $a0, 0xA001 */ cpu->gpr[4] = 0xA0010000u; PGXP_ALU(0x3C04A001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0709Cu); #endif if (psx_delay_BFC07098) { psx_delay_BFC07098 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC070A0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC070A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC070A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC070A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC070A0: 3C120001 lui $s2, 0x1 */ cpu->gpr[18] = 0x00010000u; PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC070A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070A4: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC070A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070A8: 2484ADD8 addiu $a0, $a0, -21032 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-21032)); PGXP_ALU(0x2484ADD8u, cpu->gpr[4], _pgx1, 0xFFFFADD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC070A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC070AC: 0FF018F9 jal 0xBFC063E4 */ cpu->gpr[31] = 0xBFC070B4u; /* jal link before delay slot */ psx_delay_BFC070AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40020u); #endif /* 0xBFC070B0: 26458D98 addiu $a1, $s2, -29288 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[18] + (-29288)); PGXP_ALU(0x26458D98u, cpu->gpr[5], _pgx1, 0xFFFF8D98u); } #ifdef PSX_COSIM cosim_instr(0xBFC070B0u); #endif if (psx_delay_BFC070AC) { psx_delay_BFC070AC = 0; cpu->gpr[31] = 0xBFC070B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC063E4u); cpu->pc = 0xBFC063E4u; return; } label_BFC070B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC070B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC070B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC070B4: 1040FF86 beq $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC070B4 = cpu->gpr[2]; uint32_t psx_brB_BFC070B4 = cpu->gpr[0]; psx_taken_BFC070B4 = (psx_brA_BFC070B4 == psx_brB_BFC070B4); psx_delay_BFC070B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC070B8: 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(0xBFC070B8u); #endif if (psx_delay_BFC070B4) { psx_delay_BFC070B4 = 0; if (psx_taken_BFC070B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC070BCu); } label_BFC070BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC070BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC070BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC070BC: 26508D98 addiu $s0, $s2, -29288 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[18] + (-29288)); PGXP_ALU(0x26508D98u, cpu->gpr[16], _pgx1, 0xFFFF8D98u); } #ifdef PSX_COSIM cosim_instr(0xBFC070BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070C0u); #endif /* 0xBFC070C0: 8E07000C lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC070C0u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10000u); } PGXP_LOAD(0x8E07000Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC070C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070C4u); #endif /* 0xBFC070C4: 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, 0xBFC070C4u); 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(0xBFC070C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070C8u); #endif /* 0xBFC070C8: 8E458D98 lw $a1, -29288($s2) */ { uint32_t _pgxa = cpu->gpr[18] + -29288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (-29288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC070C8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } PGXP_LOAD(0x8E458D98u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC070C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070CC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20000u); #endif /* 0xBFC070D0: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC070D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC070D4: 2631AE88 addiu $s1, $s1, -20856 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-20856)); PGXP_ALU(0x2631AE88u, cpu->gpr[17], _pgx1, 0xFFFFAE88u); } #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, 0x80000000u); #endif /* 0xBFC070D8: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC070E0u; /* jal link before delay slot */ psx_delay_BFC070D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070DC: 24849B84 addiu $a0, $a0, -25724 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25724)); PGXP_ALU(0x24849B84u, cpu->gpr[4], _pgx1, 0xFFFF9B84u); } #ifdef PSX_COSIM cosim_instr(0xBFC070DCu); #endif if (psx_delay_BFC070D8) { psx_delay_BFC070D8 = 0; cpu->gpr[31] = 0xBFC070E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC070E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC070E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC070E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070E0u); #endif /* 0xBFC070E0: 8E260008 lw $a2, 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, 0xBFC070E0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000u); } PGXP_LOAD(0x8E260008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC070E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070E4u); #endif /* 0xBFC070E4: 8E458D98 lw $a1, -29288($s2) */ { uint32_t _pgxa = cpu->gpr[18] + -29288; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (-29288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC070E4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } PGXP_LOAD(0x8E458D98u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC070E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070E8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC070EC: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC070F4u; /* jal link before delay slot */ psx_delay_BFC070EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070F0: 24849BB0 addiu $a0, $a0, -25680 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25680)); PGXP_ALU(0x24849BB0u, cpu->gpr[4], _pgx1, 0xFFFF9BB0u); } #ifdef PSX_COSIM cosim_instr(0xBFC070F0u); #endif if (psx_delay_BFC070EC) { psx_delay_BFC070EC = 0; cpu->gpr[31] = 0xBFC070F4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC070F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC070F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC070F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070F4u); #endif /* 0xBFC070F4: 8E250008 lw $a1, 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, 0xBFC070F4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000u); } PGXP_LOAD(0x8E250008u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC070F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC070F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC070F8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x41u); #endif /* 0xBFC070FC: 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(0xBFC070FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07100: 24849BD8 addiu $a0, $a0, -25640 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25640)); PGXP_ALU(0x24849BD8u, cpu->gpr[4], _pgx1, 0xFFFF9BD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC07100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC07104: AE050020 sw $a1, 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, 0xBFC07104u); return; } g_debug_last_store_pc = 0xBFC07104u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050020u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC07104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07108: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC07110u; /* jal link before delay slot */ psx_delay_BFC07108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0710Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC0710C: AE000024 sw $zero, 36($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0710Cu); return; } g_debug_last_store_pc = 0xBFC0710Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000024u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0710Cu); #endif if (psx_delay_BFC07108) { psx_delay_BFC07108 = 0; cpu->gpr[31] = 0xBFC07110u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC07110: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07110u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07110: 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(0xBFC07110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC07114: 0000000C syscall */ cpu->pc = 0xBFC07114u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0xBFC07114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07118: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0711Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0711C: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC07124u; /* jal link before delay slot */ psx_delay_BFC0711C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07120: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC07120u); #endif if (psx_delay_BFC0711C) { psx_delay_BFC0711C = 0; cpu->gpr[31] = 0xBFC07124u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC07124: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07124u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07124: 1440FF6A bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC07124 = cpu->gpr[2]; uint32_t psx_brB_BFC07124 = cpu->gpr[0]; psx_taken_BFC07124 = (psx_brA_BFC07124 != psx_brB_BFC07124); psx_delay_BFC07124 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07128: 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(0xBFC07128u); #endif if (psx_delay_BFC07124) { psx_delay_BFC07124 = 0; if (psx_taken_BFC07124) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0712Cu); } label_BFC0712C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0712Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0712Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0712Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0712C: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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, 0x41u); #endif /* 0xBFC07130: 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(0xBFC07130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07134: 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(0xBFC07134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07138: 0FF01B15 jal 0xBFC06C54 */ cpu->gpr[31] = 0xBFC07140u; /* jal link before delay slot */ psx_delay_BFC07138 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0713Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0713C: 24848D98 addiu $a0, $a0, -29288 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-29288)); PGXP_ALU(0x24848D98u, cpu->gpr[4], _pgx1, 0xFFFF8D98u); } #ifdef PSX_COSIM cosim_instr(0xBFC0713Cu); #endif if (psx_delay_BFC07138) { psx_delay_BFC07138 = 0; cpu->gpr[31] = 0xBFC07140u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C54u); cpu->pc = 0xBFC06C54u; return; } label_BFC07140: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07140u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07140: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07144: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC0714Cu; /* jal link before delay slot */ psx_delay_BFC07144 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07148: 24849C04 addiu $a0, $a0, -25596 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25596)); PGXP_ALU(0x24849C04u, cpu->gpr[4], _pgx1, 0xFFFF9C04u); } #ifdef PSX_COSIM cosim_instr(0xBFC07148u); #endif if (psx_delay_BFC07144) { psx_delay_BFC07144 = 0; cpu->gpr[31] = 0xBFC0714Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC0714C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0714Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0714Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0714Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0714C: 1000FF60 beq $zero, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC0714C = cpu->gpr[0]; uint32_t psx_brB_BFC0714C = cpu->gpr[0]; psx_taken_BFC0714C = (psx_brA_BFC0714C == psx_brB_BFC0714C); psx_delay_BFC0714C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07150: 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(0xBFC07150u); #endif if (psx_delay_BFC0714C) { psx_delay_BFC0714C = 0; if (psx_taken_BFC0714C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07154u); } label_BFC07154: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07154u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07154u); #endif /* 0xBFC07154: 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, 0xBFC07154u); 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(0xBFC07154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07158: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0715Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0715C: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC07164u; /* jal link before delay slot */ psx_delay_BFC0715C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07160: 24849B24 addiu $a0, $a0, -25820 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25820)); PGXP_ALU(0x24849B24u, cpu->gpr[4], _pgx1, 0xFFFF9B24u); } #ifdef PSX_COSIM cosim_instr(0xBFC07160u); #endif if (psx_delay_BFC0715C) { psx_delay_BFC0715C = 0; cpu->gpr[31] = 0xBFC07164u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC07164: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07164u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07164: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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: 0FF019AC jal 0xBFC066B0 */ 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: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #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, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; 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, 0x5u); #endif /* 0xBFC07170: 1440FF57 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC07170 = cpu->gpr[2]; uint32_t psx_brB_BFC07170 = cpu->gpr[0]; psx_taken_BFC07170 = (psx_brA_BFC07170 != psx_brB_BFC07170); psx_delay_BFC07170 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07174: 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(0xBFC07174u); #endif if (psx_delay_BFC07170) { psx_delay_BFC07170 = 0; if (psx_taken_BFC07170) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07178u); } label_BFC07178: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07178u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07178: 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(0xBFC07178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0717Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0717C: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0717Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07180u); #endif /* 0xBFC07180: 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, 0xBFC07180u); 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(0xBFC07180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC07184: 241100B0 addiu $s1, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241100B0u, cpu->gpr[17], _pgx1, 0x000000B0u); } #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, 0x41u); #endif /* 0xBFC07188: 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(0xBFC07188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0718Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC0718C: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC07194u; /* jalr link before delay slot */ psx_delay_BFC0718C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC07190: 26058598 addiu $a1, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26058598u, cpu->gpr[5], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC07190u); #endif if (psx_delay_BFC0718C) { psx_delay_BFC0718C = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC07194u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07194: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07194u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07194: 1040FF7C beq $v0, $zero, 0xBFC06F88 */ uint32_t psx_brA_BFC07194 = cpu->gpr[2]; uint32_t psx_brB_BFC07194 = cpu->gpr[0]; psx_taken_BFC07194 = (psx_brA_BFC07194 == psx_brB_BFC07194); psx_delay_BFC07194 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC07198: 26108598 addiu $s0, $s0, -31336 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-31336)); PGXP_ALU(0x26108598u, cpu->gpr[16], _pgx1, 0xFFFF8598u); } #ifdef PSX_COSIM cosim_instr(0xBFC07198u); #endif if (psx_delay_BFC07194) { psx_delay_BFC07194 = 0; if (psx_taken_BFC07194) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06F88u); goto label_BFC06F88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0719Cu); } label_BFC0719C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0719Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0719Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0719Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0719C: 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(0xBFC0719Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC071A0: A2000000 sb $zero, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC071A0u; 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(0xBFC071A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC071A4: 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(0xBFC071A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071A8u); #endif /* 0xBFC071A8: 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, 0xBFC071A8u); 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(0xBFC071A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC071AC: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0xBFC071B4u; /* jalr link before delay slot */ psx_delay_BFC071AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC071B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC071B0u); #endif if (psx_delay_BFC071AC) { psx_delay_BFC071AC = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0xBFC071B4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC071B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC071B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC071B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC071B4: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC071B8: 0FF019AC jal 0xBFC066B0 */ cpu->gpr[31] = 0xBFC071C0u; /* jal link before delay slot */ psx_delay_BFC071B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC071BC: 2484AE58 addiu $a0, $a0, -20904 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20904)); PGXP_ALU(0x2484AE58u, cpu->gpr[4], _pgx1, 0xFFFFAE58u); } #ifdef PSX_COSIM cosim_instr(0xBFC071BCu); #endif if (psx_delay_BFC071B8) { psx_delay_BFC071B8 = 0; cpu->gpr[31] = 0xBFC071C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC066B0u); cpu->pc = 0xBFC066B0u; return; } label_BFC071C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC071C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC071C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC071C0: 1440FF43 bne $v0, $zero, 0xBFC06ED0 */ uint32_t psx_brA_BFC071C0 = cpu->gpr[2]; uint32_t psx_brB_BFC071C0 = cpu->gpr[0]; psx_taken_BFC071C0 = (psx_brA_BFC071C0 != psx_brB_BFC071C0); psx_delay_BFC071C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC071C4: 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(0xBFC071C4u); #endif if (psx_delay_BFC071C0) { psx_delay_BFC071C0 = 0; if (psx_taken_BFC071C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06ED0u); goto label_BFC06ED0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC071C8u); } 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, 0x10000u); #endif /* 0xBFC071C8: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 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, 0x41u); #endif /* 0xBFC071CC: 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(0xBFC071CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC071D0: 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(0xBFC071D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC071D4: 0FF021B1 jal 0xBFC086C4 */ cpu->gpr[31] = 0xBFC071DCu; /* jal link before delay slot */ psx_delay_BFC071D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC071D8: 2604AE88 addiu $a0, $s0, -20856 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (-20856)); PGXP_ALU(0x2604AE88u, cpu->gpr[4], _pgx1, 0xFFFFAE88u); } #ifdef PSX_COSIM cosim_instr(0xBFC071D8u); #endif if (psx_delay_BFC071D4) { psx_delay_BFC071D4 = 0; cpu->gpr[31] = 0xBFC071DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086C4u); cpu->pc = 0xBFC086C4u; return; } label_BFC071DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC071DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC071DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC071DC: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x20u); #endif /* 0xBFC071E0: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC071E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC071E4: A040ADD8 sb $zero, -21032($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -21032; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC071E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (-21032)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA040ADD8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC071E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC071E8: 24A59B38 addiu $a1, $a1, -25800 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25800)); PGXP_ALU(0x24A59B38u, cpu->gpr[5], _pgx1, 0xFFFF9B38u); } #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, 0x10010u); #endif /* 0xBFC071EC: 2604AE88 addiu $a0, $s0, -20856 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (-20856)); PGXP_ALU(0x2604AE88u, cpu->gpr[4], _pgx1, 0xFFFFAE88u); } #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, 0x80000000u); #endif /* 0xBFC071F0: 0FF01AB9 jal 0xBFC06AE4 */ cpu->gpr[31] = 0xBFC071F8u; /* jal link before delay slot */ psx_delay_BFC071F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC071F4: A0000180 sb $zero, 384($zero) */ { uint32_t _pgxa = cpu->gpr[0] + 384; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC071F4u; 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(0xBFC071F4u); #endif if (psx_delay_BFC071F0) { psx_delay_BFC071F0 = 0; cpu->gpr[31] = 0xBFC071F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AE4u); cpu->pc = 0xBFC06AE4u; return; } label_BFC071F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC071F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC071F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC071F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC071F8: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x10u); #endif /* 0xBFC071FC: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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, 0x20u); #endif /* 0xBFC07200: 24A59B3C addiu $a1, $a1, -25796 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25796)); PGXP_ALU(0x24A59B3Cu, cpu->gpr[5], _pgx1, 0xFFFF9B3Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07204: 0FF01AB9 jal 0xBFC06AE4 */ cpu->gpr[31] = 0xBFC0720Cu; /* jal link before delay slot */ psx_delay_BFC07204 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07208: 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(0xBFC07208u); #endif if (psx_delay_BFC07204) { psx_delay_BFC07204 = 0; cpu->gpr[31] = 0xBFC0720Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AE4u); cpu->pc = 0xBFC06AE4u; return; } label_BFC0720C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0720Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0720Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0720Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0720C: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 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, 0x10u); #endif /* 0xBFC07210: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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, 0x20u); #endif /* 0xBFC07214: 24A59B44 addiu $a1, $a1, -25788 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25788)); PGXP_ALU(0x24A59B44u, cpu->gpr[5], _pgx1, 0xFFFF9B44u); } #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, 0x80000000u); #endif /* 0xBFC07218: 0FF01AB9 jal 0xBFC06AE4 */ cpu->gpr[31] = 0xBFC07220u; /* jal link before delay slot */ psx_delay_BFC07218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0721Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0721C: 2484AE90 addiu $a0, $a0, -20848 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-20848)); PGXP_ALU(0x2484AE90u, cpu->gpr[4], _pgx1, 0xFFFFAE90u); } #ifdef PSX_COSIM cosim_instr(0xBFC0721Cu); #endif if (psx_delay_BFC07218) { psx_delay_BFC07218 = 0; cpu->gpr[31] = 0xBFC07220u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AE4u); cpu->pc = 0xBFC06AE4u; return; } label_BFC07220: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07220u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07220: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07224: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07228: 24848598 addiu $a0, $a0, -31336 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-31336)); PGXP_ALU(0x24848598u, cpu->gpr[4], _pgx1, 0xFFFF8598u); } #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, 0x20u); #endif /* 0xBFC0722C: 24A59B4C addiu $a1, $a1, -25780 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25780)); PGXP_ALU(0x24A59B4Cu, cpu->gpr[5], _pgx1, 0xFFFF9B4Cu); } #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, 0x201u); #endif /* 0xBFC07230: 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(0xBFC07230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC07234: 240A000D addiu $t2, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x240A000Du, cpu->gpr[10], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0xBFC07234u); #endif label_BFC07238: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07238u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07238: 0FF01A6E jal 0xBFC069B8 */ cpu->gpr[31] = 0xBFC07240u; /* jal link before delay slot */ psx_delay_BFC07238 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0723Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0723C: 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(0xBFC0723Cu); #endif if (psx_delay_BFC07238) { psx_delay_BFC07238 = 0; cpu->gpr[31] = 0xBFC07240u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC069B8u); cpu->pc = 0xBFC069B8u; return; } label_BFC07240: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07240u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07240: 14400021 bne $v0, $zero, 0xBFC072C8 */ uint32_t psx_brA_BFC07240 = cpu->gpr[2]; uint32_t psx_brB_BFC07240 = cpu->gpr[0]; psx_taken_BFC07240 = (psx_brA_BFC07240 != psx_brB_BFC07240); psx_delay_BFC07240 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC07244: 00404025 or $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(0x00404025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07244u); #endif if (psx_delay_BFC07240) { psx_delay_BFC07240 = 0; if (psx_taken_BFC07240) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072C8u); goto label_BFC072C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07248u); } 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, 0x30u); #endif /* 0xBFC07248: 24850004 addiu $a1, $a0, 4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (4)); PGXP_ALU(0x24850004u, cpu->gpr[5], _pgx1, 0x00000004u); } #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, 0x41u); #endif /* 0xBFC0724C: 2406003D addiu $a2, $zero, 61 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); PGXP_ALU(0x2406003Du, cpu->gpr[6], _pgx1, 0x0000003Du); } #ifdef PSX_COSIM cosim_instr(0xBFC0724Cu); #endif label_BFC07250: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07250u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07250u); #endif /* 0xBFC07250: 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(0xBFC07250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07254: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07258: 14800021 bne $a0, $zero, 0xBFC072E0 */ uint32_t psx_brA_BFC07258 = cpu->gpr[4]; uint32_t psx_brB_BFC07258 = cpu->gpr[0]; psx_taken_BFC07258 = (psx_brA_BFC07258 != psx_brB_BFC07258); psx_delay_BFC07258 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0725Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0725C: 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(0xBFC0725Cu); #endif if (psx_delay_BFC07258) { psx_delay_BFC07258 = 0; if (psx_taken_BFC07258) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072E0u); goto label_BFC072E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07260u); } label_BFC07260: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07260u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC07260: 3C060001 lui $a2, 0x1 */ cpu->gpr[6] = 0x00010000u; PGXP_ALU(0x3C060001u, cpu->gpr[6], 0u, 0u); #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, 0x40u); #endif /* 0xBFC07264: 24C6ADD8 addiu $a2, $a2, -21032 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-21032)); PGXP_ALU(0x24C6ADD8u, cpu->gpr[6], _pgx1, 0xFFFFADD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC07264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07268: 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(0xBFC07268u); #endif 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 /* 0xBFC0726C: 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(0xBFC0726Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07270: 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(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: 0FF01A67 jal 0xBFC0699C */ 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, 0x91u); #endif /* 0xBFC07278: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0xBFC0699Cu); cpu->pc = 0xBFC0699Cu; 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, 0x5u); #endif /* 0xBFC0727C: 10400003 beq $v0, $zero, 0xBFC0728C */ uint32_t psx_brA_BFC0727C = cpu->gpr[2]; uint32_t psx_brB_BFC0727C = cpu->gpr[0]; psx_taken_BFC0727C = (psx_brA_BFC0727C == psx_brB_BFC0727C); psx_delay_BFC0727C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07280: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07280u); #endif if (psx_delay_BFC0727C) { psx_delay_BFC0727C = 0; if (psx_taken_BFC0727C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0728Cu); goto label_BFC0728C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07284u); } label_BFC07284: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07284u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC07284: 1100FFF9 beq $t0, $zero, 0xBFC0726C */ uint32_t psx_brA_BFC07284 = cpu->gpr[8]; uint32_t psx_brB_BFC07284 = cpu->gpr[0]; psx_taken_BFC07284 = (psx_brA_BFC07284 == psx_brB_BFC07284); 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; if (psx_taken_BFC07284) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0726Cu); goto label_BFC0726C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0728Cu); } 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, 0x280u); #endif /* 0xBFC0728C: 10E9001F beq $a3, $t1, 0xBFC0730C */ uint32_t psx_brA_BFC0728C = cpu->gpr[7]; uint32_t psx_brB_BFC0728C = cpu->gpr[9]; psx_taken_BFC0728C = (psx_brA_BFC0728C == psx_brB_BFC0728C); psx_delay_BFC0728C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC07290: 28E2000B slti $v0, $a3, 11 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[7] < (11) ? 1 : 0); PGXP_ALU(0x28E2000Bu, cpu->gpr[2], _pgx1, 0x000Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC07290u); #endif if (psx_delay_BFC0728C) { psx_delay_BFC0728C = 0; if (psx_taken_BFC0728C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0730Cu); goto label_BFC0730C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07294u); } label_BFC07294: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07294u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07294: 1040001A beq $v0, $zero, 0xBFC07300 */ uint32_t psx_brA_BFC07294 = cpu->gpr[2]; uint32_t psx_brB_BFC07294 = cpu->gpr[0]; psx_taken_BFC07294 = (psx_brA_BFC07294 == psx_brB_BFC07294); 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; if (psx_taken_BFC07294) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07300u); goto label_BFC07300; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0729Cu); } 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, 0x81u); #endif /* 0xBFC0729C: 10E0001B beq $a3, $zero, 0xBFC0730C */ uint32_t psx_brA_BFC0729C = cpu->gpr[7]; uint32_t psx_brB_BFC0729C = cpu->gpr[0]; psx_taken_BFC0729C = (psx_brA_BFC0729C == psx_brB_BFC0729C); psx_delay_BFC0729C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC072A0: 24020009 addiu $v0, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24020009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0xBFC072A0u); #endif if (psx_delay_BFC0729C) { psx_delay_BFC0729C = 0; if (psx_taken_BFC0729C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0730Cu); goto label_BFC0730C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072A4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC072A4: 10E20027 beq $a3, $v0, 0xBFC07344 */ uint32_t psx_brA_BFC072A4 = cpu->gpr[7]; uint32_t psx_brB_BFC072A4 = cpu->gpr[2]; psx_taken_BFC072A4 = (psx_brA_BFC072A4 == psx_brB_BFC072A4); psx_delay_BFC072A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC072A8: 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(0xBFC072A8u); #endif if (psx_delay_BFC072A4) { psx_delay_BFC072A4 = 0; if (psx_taken_BFC072A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07344u); goto label_BFC07344; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072ACu); } label_BFC072AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC072ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC072ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC072AC: A0C70000 sb $a3, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC072ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0C70000u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC072B0: 1000FFEE beq $zero, $zero, 0xBFC0726C */ uint32_t psx_brA_BFC072B0 = cpu->gpr[0]; uint32_t psx_brB_BFC072B0 = cpu->gpr[0]; psx_taken_BFC072B0 = (psx_brA_BFC072B0 == psx_brB_BFC072B0); psx_delay_BFC072B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC072B4: 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(0xBFC072B4u); #endif if (psx_delay_BFC072B0) { psx_delay_BFC072B0 = 0; if (psx_taken_BFC072B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0726Cu); goto label_BFC0726C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072B8u); } 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, 0x204u); #endif /* 0xBFC072B8: 1049FFDF beq $v0, $t1, 0xBFC07238 */ uint32_t psx_brA_BFC072B8 = cpu->gpr[2]; uint32_t psx_brB_BFC072B8 = cpu->gpr[9]; psx_taken_BFC072B8 = (psx_brA_BFC072B8 == psx_brB_BFC072B8); psx_delay_BFC072B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC072BC: 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(0xBFC072BCu); #endif if (psx_delay_BFC072B8) { psx_delay_BFC072B8 = 0; if (psx_taken_BFC072B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07238u); goto label_BFC07238; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072C0u); } label_BFC072C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC072C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC072C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC072C0: 104AFFDD beq $v0, $t2, 0xBFC07238 */ uint32_t psx_brA_BFC072C0 = cpu->gpr[2]; uint32_t psx_brB_BFC072C0 = cpu->gpr[10]; psx_taken_BFC072C0 = (psx_brA_BFC072C0 == psx_brB_BFC072C0); 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; if (psx_taken_BFC072C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07238u); goto label_BFC07238; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072C8u); } 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 /* 0xBFC072C8: 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(0xBFC072C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC072CC: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC072D0: 1440FFF9 bne $v0, $zero, 0xBFC072B8 */ uint32_t psx_brA_BFC072D0 = cpu->gpr[2]; uint32_t psx_brB_BFC072D0 = cpu->gpr[0]; psx_taken_BFC072D0 = (psx_brA_BFC072D0 != psx_brB_BFC072D0); 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; if (psx_taken_BFC072D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072B8u); goto label_BFC072B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072D8u); } 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, 0x1u); #endif /* 0xBFC072D8: 1000FF3A beq $zero, $zero, 0xBFC06FC4 */ uint32_t psx_brA_BFC072D8 = cpu->gpr[0]; uint32_t psx_brB_BFC072D8 = cpu->gpr[0]; psx_taken_BFC072D8 = (psx_brA_BFC072D8 == psx_brB_BFC072D8); psx_delay_BFC072D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC072DC: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC072DCu); #endif if (psx_delay_BFC072D8) { psx_delay_BFC072D8 = 0; if (psx_taken_BFC072D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06FC4u); goto label_BFC06FC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072E0u); } label_BFC072E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC072E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC072E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC072E0: 1086FFDF beq $a0, $a2, 0xBFC07260 */ uint32_t psx_brA_BFC072E0 = cpu->gpr[4]; uint32_t psx_brB_BFC072E0 = cpu->gpr[6]; psx_taken_BFC072E0 = (psx_brA_BFC072E0 == psx_brB_BFC072E0); 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; if (psx_taken_BFC072E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07260u); goto label_BFC07260; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072E8u); } 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, 0x80000000u); #endif /* 0xBFC072E8: 0FF01A67 jal 0xBFC0699C */ cpu->gpr[31] = 0xBFC072F0u; /* jal link before delay slot */ psx_delay_BFC072E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC072EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC072ECu); #endif if (psx_delay_BFC072E8) { psx_delay_BFC072E8 = 0; cpu->gpr[31] = 0xBFC072F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0699Cu); cpu->pc = 0xBFC0699Cu; return; } label_BFC072F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC072F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC072F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC072F0: 1440FFD7 bne $v0, $zero, 0xBFC07250 */ uint32_t psx_brA_BFC072F0 = cpu->gpr[2]; uint32_t psx_brB_BFC072F0 = cpu->gpr[0]; psx_taken_BFC072F0 = (psx_brA_BFC072F0 != psx_brB_BFC072F0); psx_delay_BFC072F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC072F4: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC072F4u); #endif if (psx_delay_BFC072F0) { psx_delay_BFC072F0 = 0; if (psx_taken_BFC072F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07250u); goto label_BFC07250; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072F8u); } 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, 0x1u); #endif /* 0xBFC072F8: 1000FF32 beq $zero, $zero, 0xBFC06FC4 */ uint32_t psx_brA_BFC072F8 = cpu->gpr[0]; uint32_t psx_brB_BFC072F8 = cpu->gpr[0]; psx_taken_BFC072F8 = (psx_brA_BFC072F8 == psx_brB_BFC072F8); psx_delay_BFC072F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC072FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC072FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC072FCu); #endif if (psx_delay_BFC072F8) { psx_delay_BFC072F8 = 0; if (psx_taken_BFC072F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06FC4u); goto label_BFC06FC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07300u); } label_BFC07300: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07300u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07300: 2402000D addiu $v0, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x2402000Du, cpu->gpr[2], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0xBFC07300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC07304: 14E2FFE7 bne $a3, $v0, 0xBFC072A4 */ uint32_t psx_brA_BFC07304 = cpu->gpr[7]; uint32_t psx_brB_BFC07304 = cpu->gpr[2]; psx_taken_BFC07304 = (psx_brA_BFC07304 != psx_brB_BFC07304); psx_delay_BFC07304 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07308: 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(0xBFC07308u); #endif if (psx_delay_BFC07304) { psx_delay_BFC07304 = 0; if (psx_taken_BFC07304) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC072A4u); goto label_BFC072A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0730Cu); } label_BFC0730C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0730Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0730Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0730Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0730C: A0C00000 sb $zero, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0730Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0C00000u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC07310: 24020180 addiu $v0, $zero, 384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (384)); PGXP_ALU(0x24020180u, cpu->gpr[2], _pgx1, 0x00000180u); } #ifdef PSX_COSIM cosim_instr(0xBFC07310u); #endif label_BFC07314: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07314u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07314: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07318: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0731Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0731C: 24A5ADD8 addiu $a1, $a1, -21032 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-21032)); PGXP_ALU(0x24A5ADD8u, cpu->gpr[5], _pgx1, 0xFFFFADD8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0731Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07320: 24849B54 addiu $a0, $a0, -25772 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25772)); PGXP_ALU(0x24849B54u, cpu->gpr[4], _pgx1, 0xFFFF9B54u); } #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, 0x80000000u); #endif /* 0xBFC07324: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC0732Cu; /* jal link before delay slot */ psx_delay_BFC07324 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07328: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07328u; 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(0xBFC07328u); #endif if (psx_delay_BFC07324) { psx_delay_BFC07324 = 0; cpu->gpr[31] = 0xBFC0732Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC0732C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0732Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0732Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0732Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0732C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0732Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07330: 24050180 addiu $a1, $zero, 384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (384)); PGXP_ALU(0x24050180u, cpu->gpr[5], _pgx1, 0x00000180u); } #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, 0x80000000u); #endif /* 0xBFC07334: 0FF013D9 jal 0xBFC04F64 */ cpu->gpr[31] = 0xBFC0733Cu; /* jal link before delay slot */ psx_delay_BFC07334 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07338: 24849B60 addiu $a0, $a0, -25760 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25760)); PGXP_ALU(0x24849B60u, cpu->gpr[4], _pgx1, 0xFFFF9B60u); } #ifdef PSX_COSIM cosim_instr(0xBFC07338u); #endif if (psx_delay_BFC07334) { psx_delay_BFC07334 = 0; cpu->gpr[31] = 0xBFC0733Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC04F64u); cpu->pc = 0xBFC04F64u; return; } label_BFC0733C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0733Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0733Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0733Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0733C: 1000FF21 beq $zero, $zero, 0xBFC06FC4 */ uint32_t psx_brA_BFC0733C = cpu->gpr[0]; uint32_t psx_brB_BFC0733C = cpu->gpr[0]; psx_taken_BFC0733C = (psx_brA_BFC0733C == psx_brB_BFC0733C); psx_delay_BFC0733C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07340: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07340u); #endif if (psx_delay_BFC0733C) { psx_delay_BFC0733C = 0; if (psx_taken_BFC0733C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06FC4u); goto label_BFC06FC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07344u); } label_BFC07344: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07344u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC07344: A0C00000 sb $zero, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07344u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0C00000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07348: 24020180 addiu $v0, $zero, 384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (384)); PGXP_ALU(0x24020180u, cpu->gpr[2], _pgx1, 0x00000180u); } #ifdef PSX_COSIM cosim_instr(0xBFC07348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0734Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0734C: 24062401 addiu $a2, $zero, 9217 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (9217)); PGXP_ALU(0x24062401u, cpu->gpr[6], _pgx1, 0x00002401u); } #ifdef PSX_COSIM cosim_instr(0xBFC0734Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC07350: 240701FF addiu $a3, $zero, 511 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (511)); PGXP_ALU(0x240701FFu, cpu->gpr[7], _pgx1, 0x000001FFu); } #ifdef PSX_COSIM cosim_instr(0xBFC07350u); #endif label_BFC07354: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07354u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2Cu); #endif /* 0xBFC07354: 00A21821 addu $v1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07358u); #endif /* 0xBFC07358: 8063FE80 lb $v1, -384($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -384; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-384)), 3, 0x8u); PGXP_LOAD(0x8063FE80u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07358u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07360: 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(0xBFC07360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07364: 2C84000E sltiu $a0, $a0, 14 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Eu ? 1 : 0); PGXP_ALU(0x2C84000Eu, cpu->gpr[4], _pgx1, 0x000Eu); } #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, 0x11u); #endif /* 0xBFC07368: 10800004 beq $a0, $zero, 0xBFC0737C */ uint32_t psx_brA_BFC07368 = cpu->gpr[4]; uint32_t psx_brB_BFC07368 = cpu->gpr[0]; psx_taken_BFC07368 = (psx_brA_BFC07368 == psx_brB_BFC07368); psx_delay_BFC07368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0736Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC0736C: 00662006 srlv $a0, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[6] >> (cpu->gpr[3] & 0x1Fu); PGXP_ALU(0x00662006u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0736Cu); #endif if (psx_delay_BFC07368) { psx_delay_BFC07368 = 0; if (psx_taken_BFC07368) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0737Cu); goto label_BFC0737C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07370u); } 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, 0x10u); #endif /* 0xBFC07370: 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(0xBFC07370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07374: 1480FFE7 bne $a0, $zero, 0xBFC07314 */ uint32_t psx_brA_BFC07374 = cpu->gpr[4]; uint32_t psx_brB_BFC07374 = cpu->gpr[0]; psx_taken_BFC07374 = (psx_brA_BFC07374 != psx_brB_BFC07374); psx_delay_BFC07374 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07378: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07378u); #endif if (psx_delay_BFC07374) { psx_delay_BFC07374 = 0; if (psx_taken_BFC07374) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07314u); goto label_BFC07314; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0737Cu); } label_BFC0737C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0737Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0737Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0737Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0737C: 1047FFE5 beq $v0, $a3, 0xBFC07314 */ uint32_t psx_brA_BFC0737C = cpu->gpr[2]; uint32_t psx_brB_BFC0737C = cpu->gpr[7]; psx_taken_BFC0737C = (psx_brA_BFC0737C == psx_brB_BFC0737C); psx_delay_BFC0737C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07380: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07380u); #endif if (psx_delay_BFC0737C) { psx_delay_BFC0737C = 0; if (psx_taken_BFC0737C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07314u); goto label_BFC07314; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07384u); } label_BFC07384: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07384u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07384: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07384u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC07388: 1000FFF2 beq $zero, $zero, 0xBFC07354 */ uint32_t psx_brA_BFC07388 = cpu->gpr[0]; uint32_t psx_brB_BFC07388 = cpu->gpr[0]; psx_taken_BFC07388 = (psx_brA_BFC07388 == psx_brB_BFC07388); psx_delay_BFC07388 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0738Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0738C: 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(0xBFC0738Cu); #endif if (psx_delay_BFC07388) { psx_delay_BFC07388 = 0; if (psx_taken_BFC07388) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07354u); goto label_BFC07354; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07390u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07390u); cpu->pc = 0xBFC07390u; return; /* fallthrough */ } void OpenBIOS_func_1FC07390(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07390u); int psx_delay_BFC073A0 = 0; int psx_delay_BFC073B0 = 0; int psx_delay_BFC073BC = 0; int psx_delay_BFC073CC = 0; int psx_delay_BFC073D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC073A8u: goto label_BFC073A8; case 0xBFC073B8u: goto label_BFC073B8; case 0xBFC073C4u: goto label_BFC073C4; case 0xBFC073D4u: goto label_BFC073D4; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07390: 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(0xBFC07390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07394: 3C03BFC1 lui $v1, 0xBFC1 */ cpu->gpr[3] = 0xBFC10000u; PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); #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, 0x28u); #endif /* 0xBFC07398: 24659C1C addiu $a1, $v1, -25572 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (-25572)); PGXP_ALU(0x24659C1Cu, cpu->gpr[5], _pgx1, 0xFFFF9C1Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0739Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0739C: AFBF00B4 sw $ra, 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, 0xBFC0739Cu); return; } g_debug_last_store_pc = 0xBFC0739Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF00B4u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0739Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC073A0: 0FF01AA3 jal 0xBFC06A8C */ cpu->gpr[31] = 0xBFC073A8u; /* jal link before delay slot */ psx_delay_BFC073A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC073A4: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC073A4u); #endif if (psx_delay_BFC073A0) { psx_delay_BFC073A0 = 0; cpu->gpr[31] = 0xBFC073A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A8Cu); cpu->pc = 0xBFC06A8Cu; return; } label_BFC073A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC073A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC073A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC073A8: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC073A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC073AC: 24A59C24 addiu $a1, $a1, -25564 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25564)); PGXP_ALU(0x24A59C24u, cpu->gpr[5], _pgx1, 0xFFFF9C24u); } #ifdef PSX_COSIM cosim_instr(0xBFC073ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC073B0: 0FF01AAA jal 0xBFC06AA8 */ cpu->gpr[31] = 0xBFC073B8u; /* jal link before delay slot */ psx_delay_BFC073B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC073B4: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC073B4u); #endif if (psx_delay_BFC073B0) { psx_delay_BFC073B0 = 0; cpu->gpr[31] = 0xBFC073B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AA8u); cpu->pc = 0xBFC06AA8u; return; } label_BFC073B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC073B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC073B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC073B8: 24659C1C addiu $a1, $v1, -25572 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (-25572)); PGXP_ALU(0x24659C1Cu, cpu->gpr[5], _pgx1, 0xFFFF9C1Cu); } #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, 0x80000000u); #endif /* 0xBFC073BC: 0FF01AA3 jal 0xBFC06A8C */ cpu->gpr[31] = 0xBFC073C4u; /* jal link before delay slot */ psx_delay_BFC073BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC073C0: 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(0xBFC073C0u); #endif if (psx_delay_BFC073BC) { psx_delay_BFC073BC = 0; cpu->gpr[31] = 0xBFC073C4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06A8Cu); cpu->pc = 0xBFC06A8Cu; return; } label_BFC073C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC073C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC073C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC073C4: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC073C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC073C8: 24A59C34 addiu $a1, $a1, -25548 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25548)); PGXP_ALU(0x24A59C34u, cpu->gpr[5], _pgx1, 0xFFFF9C34u); } #ifdef PSX_COSIM cosim_instr(0xBFC073C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC073CC: 0FF01AAA jal 0xBFC06AA8 */ cpu->gpr[31] = 0xBFC073D4u; /* jal link before delay slot */ psx_delay_BFC073CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC073D0: 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(0xBFC073D0u); #endif if (psx_delay_BFC073CC) { psx_delay_BFC073CC = 0; cpu->gpr[31] = 0xBFC073D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06AA8u); cpu->pc = 0xBFC06AA8u; return; } label_BFC073D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC073D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC073D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC073D4: 27A50060 addiu $a1, $sp, 96 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); PGXP_ALU(0x27A50060u, cpu->gpr[5], _pgx1, 0x00000060u); } #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, 0x80000000u); #endif /* 0xBFC073D8: 0FF01B1F jal 0xBFC06C7C */ cpu->gpr[31] = 0xBFC073E0u; /* jal link before delay slot */ psx_delay_BFC073D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC073DC: 27A40010 addiu $a0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27A40010u, cpu->gpr[4], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC073DCu); #endif if (psx_delay_BFC073D8) { psx_delay_BFC073D8 = 0; cpu->gpr[31] = 0xBFC073E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06C7Cu); cpu->pc = 0xBFC06C7Cu; return; } } void OpenBIOS_func_1FC073E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC073E0u); int psx_delay_BFC073F0 = 0; label_BFC073E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC073E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC073E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC073E0: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC073E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC073E4: AC45AE88 sw $a1, -20856($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20856; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC073E4u); return; } g_debug_last_store_pc = 0xBFC073E4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC45AE88u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC073E8: 2442AE88 addiu $v0, $v0, -20856 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); PGXP_ALU(0x2442AE88u, cpu->gpr[2], _pgx1, 0xFFFFAE88u); } #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, 0x14u); #endif /* 0xBFC073EC: 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, 0xBFC073ECu); return; } g_debug_last_store_pc = 0xBFC073ECu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440004u, _pgxa, cpu->gpr[4]); } #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, 0x80000001u); #endif /* 0xBFC073F0: 03E00008 jr $ra */ psx_delay_BFC073F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC073F4: AC460008 sw $a2, 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, 0xBFC073F4u); return; } g_debug_last_store_pc = 0xBFC073F4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC073F4u); #endif if (psx_delay_BFC073F0) { psx_delay_BFC073F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC073F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC073F8u); int psx_delay_BFC0741C = 0; 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, 0x4u); #endif /* 0xBFC073F8: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC073F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC073FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC073FC: 2443AE88 addiu $v1, $v0, -20856 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); PGXP_ALU(0x2443AE88u, cpu->gpr[3], _pgx1, 0xFFFFAE88u); } #ifdef PSX_COSIM cosim_instr(0xBFC073FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07400u); #endif /* 0xBFC07400: 8C670008 lw $a3, 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, 0xBFC07400u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } PGXP_LOAD(0x8C670008u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC07404: 00000000 nop */ /* nop */ #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, 0xC0u); #endif /* 0xBFC07408: 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, 0xBFC07408u); return; } g_debug_last_store_pc = 0xBFC07408u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACC70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC07408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0740Cu); #endif /* 0xBFC0740C: 8C630004 lw $v1, 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, 0xBFC0740Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0740Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07410: 00000000 nop */ /* nop */ #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, 0x18u); #endif /* 0xBFC07414: AC830000 sw $v1, 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, 0xBFC07414u); return; } g_debug_last_store_pc = 0xBFC07414u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07418u); #endif /* 0xBFC07418: 8C42AE88 lw $v0, -20856($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07418u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AE88u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC0741C: 03E00008 jr $ra */ psx_delay_BFC0741C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC07420: 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, 0xBFC07420u); return; } g_debug_last_store_pc = 0xBFC07420u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07420u); #endif if (psx_delay_BFC0741C) { psx_delay_BFC0741C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07424(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07424u); int psx_delay_BFC07424 = 0; label_BFC07424: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07424u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07424: 03E00008 jr $ra */ psx_delay_BFC07424 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07428: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07428u); #endif if (psx_delay_BFC07424) { psx_delay_BFC07424 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0742C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0742Cu); int psx_delay_BFC07438 = 0; int psx_taken_BFC07438 = 0; int psx_delay_BFC07458 = 0; int psx_taken_BFC07458 = 0; int psx_delay_BFC07460 = 0; int psx_taken_BFC07460 = 0; int psx_delay_BFC07474 = 0; int psx_delay_BFC0747C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07440u: goto label_BFC07440; case 0xBFC0744Cu: goto label_BFC0744C; case 0xBFC07460u: goto label_BFC07460; case 0xBFC07468u: goto label_BFC07468; case 0xBFC0747Cu: goto label_BFC0747C; default: break; } } label_BFC0742C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0742Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0742Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0742Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0742C: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0742Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07430u); #endif /* 0xBFC07430: 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, 0xBFC07430u); 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(0xBFC07430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07434: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07438: 14620010 bne $v1, $v0, 0xBFC0747C */ uint32_t psx_brA_BFC07438 = cpu->gpr[3]; uint32_t psx_brB_BFC07438 = cpu->gpr[2]; psx_taken_BFC07438 = (psx_brA_BFC07438 != psx_brB_BFC07438); psx_delay_BFC07438 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0743Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0743C: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0743Cu); #endif if (psx_delay_BFC07438) { psx_delay_BFC07438 = 0; if (psx_taken_BFC07438) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0747Cu); goto label_BFC0747C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07440u); } label_BFC07440: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07440u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07440: 3C031F00 lui $v1, 0x1F00 */ cpu->gpr[3] = 0x1F000000u; PGXP_ALU(0x3C031F00u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07444: 24429C40 addiu $v0, $v0, -25536 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-25536)); PGXP_ALU(0x24429C40u, cpu->gpr[2], _pgx1, 0xFFFF9C40u); } #ifdef PSX_COSIM cosim_instr(0xBFC07444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07448: 24630084 addiu $v1, $v1, 132 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (132)); PGXP_ALU(0x24630084u, cpu->gpr[3], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0xBFC07448u); #endif 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 /* 0xBFC0744C: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0744Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07450u); #endif /* 0xBFC07450: 80450000 lb $a1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 5, 0x4u); PGXP_LOAD(0x80450000u, _pgxa, cpu->gpr[5]); } #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, 0x1u); #endif /* 0xBFC07454: 00000000 nop */ /* nop */ #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, 0x30u); #endif /* 0xBFC07458: 14850008 bne $a0, $a1, 0xBFC0747C */ uint32_t psx_brA_BFC07458 = cpu->gpr[4]; uint32_t psx_brB_BFC07458 = cpu->gpr[5]; psx_taken_BFC07458 = (psx_brA_BFC07458 != psx_brB_BFC07458); psx_delay_BFC07458 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0745Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0745C: 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(0xBFC0745Cu); #endif if (psx_delay_BFC07458) { psx_delay_BFC07458 = 0; if (psx_taken_BFC07458) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0747Cu); goto label_BFC0747C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07460u); } label_BFC07460: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07460u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07460: 1480FFFA bne $a0, $zero, 0xBFC0744C */ uint32_t psx_brA_BFC07460 = cpu->gpr[4]; uint32_t psx_brB_BFC07460 = cpu->gpr[0]; psx_taken_BFC07460 = (psx_brA_BFC07460 != psx_brB_BFC07460); psx_delay_BFC07460 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07464: 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(0xBFC07464u); #endif if (psx_delay_BFC07460) { psx_delay_BFC07460 = 0; if (psx_taken_BFC07460) { #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, 0xBFC07468u); } label_BFC07468: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07468u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07468: 3C021F00 lui $v0, 0x1F00 */ cpu->gpr[2] = 0x1F000000u; PGXP_ALU(0x3C021F00u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0746Cu); #endif /* 0xBFC0746C: 8C590080 lw $t9, 128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0746Cu); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x4u); } PGXP_LOAD(0x8C590080u, _pgxa, cpu->gpr[25]); } #ifdef PSX_COSIM cosim_instr(0xBFC0746Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07470: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07474: 03200008 jr $t9 */ psx_delay_BFC07474 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07478: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07478u); #endif if (psx_delay_BFC07474) { psx_delay_BFC07474 = 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; } label_BFC0747C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0747Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0747Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0747Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0747C: 03E00008 jr $ra */ psx_delay_BFC0747C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07480: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07480u); #endif if (psx_delay_BFC0747C) { psx_delay_BFC0747C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07484(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07484u); int psx_delay_BFC07490 = 0; int psx_taken_BFC07490 = 0; int psx_delay_BFC074B0 = 0; int psx_taken_BFC074B0 = 0; int psx_delay_BFC074B8 = 0; int psx_taken_BFC074B8 = 0; int psx_delay_BFC074CC = 0; int psx_delay_BFC074D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07498u: goto label_BFC07498; case 0xBFC074A4u: goto label_BFC074A4; case 0xBFC074B8u: goto label_BFC074B8; case 0xBFC074C0u: goto label_BFC074C0; case 0xBFC074D4u: goto label_BFC074D4; default: break; } } label_BFC07484: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07484u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07484: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07488u); #endif /* 0xBFC07488: 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, 0xBFC07488u); 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(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: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0748Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07490: 14620010 bne $v1, $v0, 0xBFC074D4 */ uint32_t psx_brA_BFC07490 = cpu->gpr[3]; uint32_t psx_brB_BFC07490 = cpu->gpr[2]; psx_taken_BFC07490 = (psx_brA_BFC07490 != psx_brB_BFC07490); psx_delay_BFC07490 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07494: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07494u); #endif if (psx_delay_BFC07490) { psx_delay_BFC07490 = 0; if (psx_taken_BFC07490) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074D4u); goto label_BFC074D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07498u); } label_BFC07498: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07498u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07498: 3C031F00 lui $v1, 0x1F00 */ cpu->gpr[3] = 0x1F000000u; PGXP_ALU(0x3C031F00u, cpu->gpr[3], 0u, 0u); #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, 0x4u); #endif /* 0xBFC0749C: 24429C40 addiu $v0, $v0, -25536 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-25536)); PGXP_ALU(0x24429C40u, cpu->gpr[2], _pgx1, 0xFFFF9C40u); } #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, 0x8u); #endif /* 0xBFC074A0: 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(0xBFC074A0u); #endif label_BFC074A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC074A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC074A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074A4u); #endif /* 0xBFC074A4: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC074A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074A8u); #endif /* 0xBFC074A8: 80450000 lb $a1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 5, 0x4u); PGXP_LOAD(0x80450000u, _pgxa, cpu->gpr[5]); } #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, 0x1u); #endif /* 0xBFC074AC: 00000000 nop */ /* nop */ #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, 0x30u); #endif /* 0xBFC074B0: 14850008 bne $a0, $a1, 0xBFC074D4 */ uint32_t psx_brA_BFC074B0 = cpu->gpr[4]; uint32_t psx_brB_BFC074B0 = cpu->gpr[5]; psx_taken_BFC074B0 = (psx_brA_BFC074B0 != psx_brB_BFC074B0); psx_delay_BFC074B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC074B4: 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(0xBFC074B4u); #endif if (psx_delay_BFC074B0) { psx_delay_BFC074B0 = 0; if (psx_taken_BFC074B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074D4u); goto label_BFC074D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074B8u); } label_BFC074B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC074B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC074B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC074B8: 1480FFFA bne $a0, $zero, 0xBFC074A4 */ uint32_t psx_brA_BFC074B8 = cpu->gpr[4]; uint32_t psx_brB_BFC074B8 = cpu->gpr[0]; psx_taken_BFC074B8 = (psx_brA_BFC074B8 != psx_brB_BFC074B8); psx_delay_BFC074B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC074BC: 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(0xBFC074BCu); #endif if (psx_delay_BFC074B8) { psx_delay_BFC074B8 = 0; if (psx_taken_BFC074B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074A4u); goto label_BFC074A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC074C0u); } label_BFC074C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC074C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC074C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC074C0: 3C021F00 lui $v0, 0x1F00 */ cpu->gpr[2] = 0x1F000000u; PGXP_ALU(0x3C021F00u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC074C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074C4u); #endif /* 0xBFC074C4: 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, 0xBFC074C4u); 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(0xBFC074C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC074C8: 00000000 nop */ /* nop */ #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, 0x2000001u); #endif /* 0xBFC074CC: 03200008 jr $t9 */ psx_delay_BFC074CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC074D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC074D0u); #endif if (psx_delay_BFC074CC) { psx_delay_BFC074CC = 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; } label_BFC074D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC074D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC074D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC074D4: 03E00008 jr $ra */ psx_delay_BFC074D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC074D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC074D8u); #endif if (psx_delay_BFC074D4) { psx_delay_BFC074D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC074DC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC074DCu); int psx_delay_BFC07510 = 0; int psx_taken_BFC07510 = 0; int psx_delay_BFC07518 = 0; int psx_delay_BFC07538 = 0; int psx_delay_BFC07540 = 0; int psx_taken_BFC07540 = 0; int psx_delay_BFC07554 = 0; int psx_delay_BFC07570 = 0; int psx_taken_BFC07570 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07510u: goto label_BFC07510; case 0xBFC07518u: goto label_BFC07518; case 0xBFC07520u: goto label_BFC07520; case 0xBFC07540u: goto label_BFC07540; case 0xBFC07548u: goto label_BFC07548; case 0xBFC0754Cu: goto label_BFC0754C; case 0xBFC0755Cu: goto label_BFC0755C; default: break; } } label_BFC074DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC074DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC074DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC074DC: 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(0xBFC074DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC074E0: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #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, 0x20010000u); #endif /* 0xBFC074E4: 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, 0xBFC074E4u); return; } g_debug_last_store_pc = 0xBFC074E4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } #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, 0x10000u); #endif /* 0xBFC074E8: 3C10BFC2 lui $s0, 0xBFC2 */ cpu->gpr[16] = 0xBFC20000u; PGXP_ALU(0x3C10BFC2u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC074E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC074EC: 24A5A500 addiu $a1, $a1, -23296 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23296)); PGXP_ALU(0x24A5A500u, cpu->gpr[5], _pgx1, 0xFFFFA500u); } #ifdef PSX_COSIM cosim_instr(0xBFC074ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC074F0: 2610E244 addiu $s0, $s0, -7612 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-7612)); PGXP_ALU(0x2610E244u, cpu->gpr[16], _pgx1, 0xFFFFE244u); } #ifdef PSX_COSIM cosim_instr(0xBFC074F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC074F4: 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, 0xBFC074F4u); return; } g_debug_last_store_pc = 0xBFC074F4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC074F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC074F8: 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, 0xBFC074F8u); return; } g_debug_last_store_pc = 0xBFC074F8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC074F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC074FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC074FC: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC074FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC07500: 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, 0xBFC07500u); return; } g_debug_last_store_pc = 0xBFC07500u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #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, 0x10020u); #endif /* 0xBFC07504: 02058023 subu $s0, $s0, $a1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[5]; PGXP_ALU(0x02058023u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC07508: 3C048003 lui $a0, 0x8003 */ cpu->gpr[4] = 0x80030000u; PGXP_ALU(0x3C048003u, cpu->gpr[4], 0u, 0u); #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, 0x20001u); #endif /* 0xBFC0750C: 34118001 ori $s1, $zero, 0x8001 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[17] = cpu->gpr[0] | 0x8001u; PGXP_ALU(0x34118001u, cpu->gpr[17], _pgx1, 0x8001u); } #ifdef PSX_COSIM cosim_instr(0xBFC0750Cu); #endif label_BFC07510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07510u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC07510: 1600000B bne $s0, $zero, 0xBFC07540 */ uint32_t psx_brA_BFC07510 = cpu->gpr[16]; uint32_t psx_brB_BFC07510 = cpu->gpr[0]; psx_taken_BFC07510 = (psx_brA_BFC07510 != psx_brB_BFC07510); psx_delay_BFC07510 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30004u); #endif /* 0xBFC07514: 0211102B sltu $v0, $s0, $s1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07514u); #endif if (psx_delay_BFC07510) { psx_delay_BFC07510 = 0; if (psx_taken_BFC07510) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07540u); goto label_BFC07540; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07518u); } 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, 0x80000000u); #endif /* 0xBFC07518: 0FF015FC jal 0xBFC057F0 */ cpu->gpr[31] = 0xBFC07520u; /* jal link before delay slot */ psx_delay_BFC07518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0751Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0751C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0751Cu); #endif if (psx_delay_BFC07518) { psx_delay_BFC07518 = 0; cpu->gpr[31] = 0xBFC07520u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC057F0u); cpu->pc = 0xBFC057F0u; return; } label_BFC07520: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07520u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07520u); #endif /* 0xBFC07520: 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, 0xBFC07520u); 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(0xBFC07520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07524u); #endif /* 0xBFC07524: 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, 0xBFC07524u); 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(0xBFC07524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07528u); #endif /* 0xBFC07528: 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, 0xBFC07528u); 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(0xBFC07528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0752Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0752C: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0752Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07530u); #endif /* 0xBFC07530: 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, 0xBFC07530u); 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(0xBFC07530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000000u); #endif /* 0xBFC07534: 3C198003 lui $t9, 0x8003 */ cpu->gpr[25] = 0x80030000u; PGXP_ALU(0x3C198003u, cpu->gpr[25], 0u, 0u); #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, 0x2000001u); #endif /* 0xBFC07538: 03200008 jr $t9 */ psx_delay_BFC07538 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0753Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0753C: 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(0xBFC0753Cu); #endif if (psx_delay_BFC07538) { psx_delay_BFC07538 = 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; } 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, 0x5u); #endif /* 0xBFC07540: 14400002 bne $v0, $zero, 0xBFC0754C */ uint32_t psx_brA_BFC07540 = cpu->gpr[2]; uint32_t psx_brB_BFC07540 = cpu->gpr[0]; psx_taken_BFC07540 = (psx_brA_BFC07540 != psx_brB_BFC07540); psx_delay_BFC07540 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC07544: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07544u); #endif if (psx_delay_BFC07540) { psx_delay_BFC07540 = 0; if (psx_taken_BFC07540) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0754Cu); goto label_BFC0754C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07548u); } label_BFC07548: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07548u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC07548: 34068000 ori $a2, $zero, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[0] | 0x8000u; PGXP_ALU(0x34068000u, cpu->gpr[6], _pgx1, 0x8000u); } #ifdef PSX_COSIM cosim_instr(0xBFC07548u); #endif label_BFC0754C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0754Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0754Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0754Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC0754C: 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, 0xBFC0754Cu); return; } g_debug_last_store_pc = 0xBFC0754Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } #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, 0x20000020u); #endif /* 0xBFC07550: AFA50014 sw $a1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07550u); return; } g_debug_last_store_pc = 0xBFC07550u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50014u, _pgxa, cpu->gpr[5]); } #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, 0x80000000u); #endif /* 0xBFC07554: 0FF02176 jal 0xBFC085D8 */ cpu->gpr[31] = 0xBFC0755Cu; /* jal link before delay slot */ psx_delay_BFC07554 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC07558: AFA40010 sw $a0, 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, 0xBFC07558u); return; } g_debug_last_store_pc = 0xBFC07558u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07558u); #endif if (psx_delay_BFC07554) { psx_delay_BFC07554 = 0; cpu->gpr[31] = 0xBFC0755Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D8u); cpu->pc = 0xBFC085D8u; return; } label_BFC0755C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0755Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0755Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0755Cu); #endif /* 0xBFC0755C: 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, 0xBFC0755Cu); 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(0xBFC0755Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07560u); #endif /* 0xBFC07560: 8FA40010 lw $a0, 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, 0xBFC07560u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07564u); #endif /* 0xBFC07564: 8FA50014 lw $a1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07564u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50014u, _pgxa, cpu->gpr[5]); } #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, 0x50u); #endif /* 0xBFC07568: 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(0xBFC07568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0756Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0756C: 00A62821 addu $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A62821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0756Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07570: 1000FFE7 beq $zero, $zero, 0xBFC07510 */ uint32_t psx_brA_BFC07570 = cpu->gpr[0]; uint32_t psx_brB_BFC07570 = cpu->gpr[0]; psx_taken_BFC07570 = (psx_brA_BFC07570 == psx_brB_BFC07570); psx_delay_BFC07570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10040u); #endif /* 0xBFC07574: 02068023 subu $s0, $s0, $a2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[16] = cpu->gpr[16] - cpu->gpr[6]; PGXP_ALU(0x02068023u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07574u); #endif if (psx_delay_BFC07570) { psx_delay_BFC07570 = 0; if (psx_taken_BFC07570) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07510u); goto label_BFC07510; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; /* fallthrough */ } void OpenBIOS_func_1FC07578(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07578u); int psx_delay_BFC075B8 = 0; int psx_delay_BFC075C8 = 0; int psx_delay_BFC075D8 = 0; int psx_delay_BFC075FC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC075C0u: goto label_BFC075C0; case 0xBFC075D0u: goto label_BFC075D0; case 0xBFC075E0u: goto label_BFC075E0; default: break; } } label_BFC07578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07578u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07578: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0757Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0757C: 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(0xBFC0757Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07580: AC404C00 sw $zero, 19456($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19456; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07580u); return; } g_debug_last_store_pc = 0xBFC07580u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C00u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07584: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC07588: AC40AE9C sw $zero, -20836($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20836; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20836)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07588u); return; } g_debug_last_store_pc = 0xBFC07588u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40AE9Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0758Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0758C: 2442AE9C addiu $v0, $v0, -20836 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20836)); PGXP_ALU(0x2442AE9Cu, cpu->gpr[2], _pgx1, 0xFFFFAE9Cu); } #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, 0x201u); #endif /* 0xBFC07590: 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(0xBFC07590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC07594: 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, 0xBFC07594u); return; } g_debug_last_store_pc = 0xBFC07594u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC07594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC07598: 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, 0xBFC07598u); return; } g_debug_last_store_pc = 0xBFC07598u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC0759C: 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, 0xBFC0759Cu); return; } g_debug_last_store_pc = 0xBFC0759Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #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, 0x5u); #endif /* 0xBFC075A0: 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, 0xBFC075A0u); return; } g_debug_last_store_pc = 0xBFC075A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC075A4: 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, 0xBFC075A4u); return; } g_debug_last_store_pc = 0xBFC075A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400008u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC075A8: 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, 0xBFC075A8u); return; } g_debug_last_store_pc = 0xBFC075A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC075A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC075AC: 3C11F400 lui $s1, 0xF400 */ cpu->gpr[17] = 0xF4000000u; PGXP_ALU(0x3C11F400u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC075ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC075B0: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #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, 0x21u); #endif /* 0xBFC075B4: 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(0xBFC075B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC075B8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC075C0u; /* jalr link before delay slot */ psx_delay_BFC075B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC075BC: 26240001 addiu $a0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); PGXP_ALU(0x26240001u, cpu->gpr[4], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC075BCu); #endif if (psx_delay_BFC075B8) { psx_delay_BFC075B8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC075C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC075C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC075C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC075C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC075C0: 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(0xBFC075C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC075C4: 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(0xBFC075C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC075C8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC075D0u; /* jalr link before delay slot */ psx_delay_BFC075C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC075CC: 36240001 ori $a0, $s1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x1u; PGXP_ALU(0x36240001u, cpu->gpr[4], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC075CCu); #endif if (psx_delay_BFC075C8) { psx_delay_BFC075C8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC075D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC075D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC075D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC075D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC075D0: 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(0xBFC075D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC075D4: 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(0xBFC075D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC075D8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC075E0u; /* jalr link before delay slot */ psx_delay_BFC075D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC075DC: 36240001 ori $a0, $s1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x1u; PGXP_ALU(0x36240001u, cpu->gpr[4], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC075DCu); #endif if (psx_delay_BFC075D8) { psx_delay_BFC075D8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC075E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC075E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC075E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC075E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC075E0: 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(0xBFC075E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075E4u); #endif /* 0xBFC075E4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC075E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x20010u); #endif /* 0xBFC075E8: 36240001 ori $a0, $s1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x1u; PGXP_ALU(0x36240001u, cpu->gpr[4], _pgx1, 0x0001u); } #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, 0x2010001u); #endif /* 0xBFC075EC: 0200C825 or $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(0x0200C825u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC075ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075F0u); #endif /* 0xBFC075F0: 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, 0xBFC075F0u); 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(0xBFC075F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075F4u); #endif /* 0xBFC075F4: 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, 0xBFC075F4u); 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(0xBFC075F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC075F8: 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(0xBFC075F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC075FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC075FC: 03200008 jr $t9 */ psx_delay_BFC075FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07600: 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(0xBFC07600u); #endif if (psx_delay_BFC075FC) { psx_delay_BFC075FC = 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 OpenBIOS_func_1FC07604(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07604u); int psx_delay_BFC0761C = 0; int psx_taken_BFC0761C = 0; int psx_delay_BFC07624 = 0; int psx_delay_BFC07638 = 0; int psx_delay_BFC0764C = 0; int psx_taken_BFC0764C = 0; int psx_delay_BFC07658 = 0; int psx_delay_BFC07664 = 0; int psx_taken_BFC07664 = 0; int psx_delay_BFC0766C = 0; int psx_taken_BFC0766C = 0; int psx_delay_BFC07674 = 0; int psx_taken_BFC07674 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07614u: goto label_BFC07614; case 0xBFC07624u: goto label_BFC07624; case 0xBFC0762Cu: goto label_BFC0762C; case 0xBFC07630u: goto label_BFC07630; case 0xBFC07640u: goto label_BFC07640; case 0xBFC07644u: goto label_BFC07644; case 0xBFC07654u: goto label_BFC07654; case 0xBFC07660u: goto label_BFC07660; case 0xBFC0766Cu: goto label_BFC0766C; case 0xBFC07674u: goto label_BFC07674; default: break; } } 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, 0x20000000u); #endif /* 0xBFC07604: 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(0xBFC07604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07608: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0760Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0760C: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #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, 0xA0000000u); #endif /* 0xBFC07610: 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, 0xBFC07610u); return; } g_debug_last_store_pc = 0xBFC07610u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC07610u); #endif label_BFC07614: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07614u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07614u); #endif /* 0xBFC07614: 8C824C00 lw $v0, 19456($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19456; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07614u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C824C00u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07618: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0761Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0761C: 10400008 beq $v0, $zero, 0xBFC07640 */ uint32_t psx_brA_BFC0761C = cpu->gpr[2]; uint32_t psx_brB_BFC0761C = cpu->gpr[0]; psx_taken_BFC0761C = (psx_brA_BFC0761C == psx_brB_BFC0761C); psx_delay_BFC0761C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC07620: 24A3AE9C addiu $v1, $a1, -20836 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[5] + (-20836)); PGXP_ALU(0x24A3AE9Cu, cpu->gpr[3], _pgx1, 0xFFFFAE9Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07620u); #endif if (psx_delay_BFC0761C) { psx_delay_BFC0761C = 0; if (psx_taken_BFC0761C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07640u); goto label_BFC07640; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07624u); } label_BFC07624: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07624u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07624: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC0762Cu; /* jal link before delay slot */ psx_delay_BFC07624 = 1; #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 if (psx_delay_BFC07624) { psx_delay_BFC07624 = 0; cpu->gpr[31] = 0xBFC0762Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC0762C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0762Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0762Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0762Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0762C: 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(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 /* 0xBFC07630: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07630u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x1u); #endif /* 0xBFC07634: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC07638: 03E00008 jr $ra */ psx_delay_BFC07638 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0763Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0763C: 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(0xBFC0763Cu); #endif if (psx_delay_BFC07638) { psx_delay_BFC07638 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07640: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07640u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC07640: 24660010 addiu $a2, $v1, 16 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] + (16)); PGXP_ALU(0x24660010u, cpu->gpr[6], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC07640u); #endif label_BFC07644: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07644u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07644u); #endif /* 0xBFC07644: 8C670000 lw $a3, 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, 0xBFC07644u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } PGXP_LOAD(0x8C670000u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC07648: 00000000 nop */ /* nop */ #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, 0x81u); #endif /* 0xBFC0764C: 10E00007 beq $a3, $zero, 0xBFC0766C */ uint32_t psx_brA_BFC0764C = cpu->gpr[7]; uint32_t psx_brB_BFC0764C = cpu->gpr[0]; psx_taken_BFC0764C = (psx_brA_BFC0764C == psx_brB_BFC0764C); psx_delay_BFC0764C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07650: 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(0xBFC07650u); #endif if (psx_delay_BFC0764C) { psx_delay_BFC0764C = 0; if (psx_taken_BFC0764C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0766Cu); goto label_BFC0766C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07654u); } label_BFC07654: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07654u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07654: 2463FFFC addiu $v1, $v1, -4 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-4)); PGXP_ALU(0x2463FFFCu, cpu->gpr[3], _pgx1, 0xFFFFFFFCu); } #ifdef PSX_COSIM cosim_instr(0xBFC07654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07658: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC07660u; /* jal link before delay slot */ psx_delay_BFC07658 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0765Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0765C: 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, 0xBFC0765Cu); return; } g_debug_last_store_pc = 0xBFC0765Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0765Cu); #endif if (psx_delay_BFC07658) { psx_delay_BFC07658 = 0; cpu->gpr[31] = 0xBFC07660u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC07660: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07660u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07660u); #endif /* 0xBFC07660: 8FA20010 lw $v0, 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, 0xBFC07660u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07664: 1000FFF2 beq $zero, $zero, 0xBFC07630 */ uint32_t psx_brA_BFC07664 = cpu->gpr[0]; uint32_t psx_brB_BFC07664 = cpu->gpr[0]; psx_taken_BFC07664 = (psx_brA_BFC07664 == psx_brB_BFC07664); psx_delay_BFC07664 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07668: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07668u); #endif if (psx_delay_BFC07664) { psx_delay_BFC07664 = 0; if (psx_taken_BFC07664) { #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, 0xBFC0766Cu); } label_BFC0766C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0766Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0766Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0766Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0766C: 1466FFF5 bne $v1, $a2, 0xBFC07644 */ uint32_t psx_brA_BFC0766C = cpu->gpr[3]; uint32_t psx_brB_BFC0766C = cpu->gpr[6]; psx_taken_BFC0766C = (psx_brA_BFC0766C != psx_brB_BFC0766C); psx_delay_BFC0766C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07670: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07670u); #endif if (psx_delay_BFC0766C) { psx_delay_BFC0766C = 0; if (psx_taken_BFC0766C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07644u); goto label_BFC07644; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07674u); } label_BFC07674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07674u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07674: 1000FFE7 beq $zero, $zero, 0xBFC07614 */ uint32_t psx_brA_BFC07674 = cpu->gpr[0]; uint32_t psx_brB_BFC07674 = cpu->gpr[0]; psx_taken_BFC07674 = (psx_brA_BFC07674 == psx_brB_BFC07674); psx_delay_BFC07674 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07678: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07678u); #endif if (psx_delay_BFC07674) { psx_delay_BFC07674 = 0; if (psx_taken_BFC07674) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07614u); goto label_BFC07614; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0767Cu); cpu->pc = 0xBFC0767Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0767C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0767Cu); int psx_delay_BFC0769C = 0; int psx_taken_BFC0769C = 0; int psx_delay_BFC076A4 = 0; int psx_delay_BFC076B8 = 0; int psx_delay_BFC076CC = 0; int psx_taken_BFC076CC = 0; int psx_delay_BFC076D4 = 0; int psx_delay_BFC076DC = 0; int psx_taken_BFC076DC = 0; int psx_delay_BFC076E4 = 0; int psx_taken_BFC076E4 = 0; int psx_delay_BFC076EC = 0; int psx_taken_BFC076EC = 0; int psx_delay_BFC076FC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07694u: goto label_BFC07694; case 0xBFC076A4u: goto label_BFC076A4; case 0xBFC076ACu: goto label_BFC076AC; case 0xBFC076B0u: goto label_BFC076B0; case 0xBFC076C0u: goto label_BFC076C0; case 0xBFC076C4u: goto label_BFC076C4; case 0xBFC076D4u: goto label_BFC076D4; case 0xBFC076DCu: goto label_BFC076DC; case 0xBFC076E4u: goto label_BFC076E4; case 0xBFC076ECu: goto label_BFC076EC; case 0xBFC076F4u: goto label_BFC076F4; default: break; } } label_BFC0767C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0767Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0767Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0767Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0767C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x8u); #endif /* 0xBFC07680: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 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, 0x10u); #endif /* 0xBFC07684: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #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, 0xA0000000u); #endif /* 0xBFC07688: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07688u); return; } g_debug_last_store_pc = 0xBFC07688u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x20010000u); #endif /* 0xBFC0768C: 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, 0xBFC0768Cu); return; } g_debug_last_store_pc = 0xBFC0768Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x21u); #endif /* 0xBFC07690: 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(0xBFC07690u); #endif label_BFC07694: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07694u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07694u); #endif /* 0xBFC07694: 8C624C00 lw $v0, 19456($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19456; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19456)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07694u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C624C00u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07698: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0769Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0769C: 10400008 beq $v0, $zero, 0xBFC076C0 */ uint32_t psx_brA_BFC0769C = cpu->gpr[2]; uint32_t psx_brB_BFC0769C = cpu->gpr[0]; psx_taken_BFC0769C = (psx_brA_BFC0769C == psx_brB_BFC0769C); psx_delay_BFC0769C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC076A0: 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(0xBFC076A0u); #endif if (psx_delay_BFC0769C) { psx_delay_BFC0769C = 0; if (psx_taken_BFC0769C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076C0u); goto label_BFC076C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076A4u); } label_BFC076A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC076A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC076A4: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC076ACu; /* jal link before delay slot */ 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; cpu->gpr[31] = 0xBFC076ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } 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, 0x5u); #endif /* 0xBFC076AC: 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(0xBFC076ACu); #endif label_BFC076B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC076B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076B0u); #endif /* 0xBFC076B0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC076B0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC076B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076B4u); #endif /* 0xBFC076B4: 8FB00010 lw $s0, 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, 0xBFC076B4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC076B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC076B8: 03E00008 jr $ra */ psx_delay_BFC076B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC076BC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC076BCu); #endif if (psx_delay_BFC076B8) { psx_delay_BFC076B8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x14u); #endif /* 0xBFC076C0: 2482AE9C addiu $v0, $a0, -20836 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-20836)); PGXP_ALU(0x2482AE9Cu, cpu->gpr[2], _pgx1, 0xFFFFAE9Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC076C0u); #endif label_BFC076C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC076C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076C4u); #endif /* 0xBFC076C4: 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, 0xBFC076C4u); 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(0xBFC076C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC076C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC076C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC076CC: 10C00005 beq $a2, $zero, 0xBFC076E4 */ uint32_t psx_brA_BFC076CC = cpu->gpr[6]; uint32_t psx_brB_BFC076CC = cpu->gpr[0]; psx_taken_BFC076CC = (psx_brA_BFC076CC == psx_brB_BFC076CC); psx_delay_BFC076CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC076D0: 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(0xBFC076D0u); #endif if (psx_delay_BFC076CC) { psx_delay_BFC076CC = 0; if (psx_taken_BFC076CC) { #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, 0xBFC076D4u); } label_BFC076D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC076D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC076D4: 0FF01D5E jal 0xBFC07578 */ cpu->gpr[31] = 0xBFC076DCu; /* jal link before delay slot */ psx_delay_BFC076D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC076D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC076D8u); #endif if (psx_delay_BFC076D4) { psx_delay_BFC076D4 = 0; cpu->gpr[31] = 0xBFC076DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07578u); cpu->pc = 0xBFC07578u; return; } label_BFC076DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC076DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC076DC: 1000FFF4 beq $zero, $zero, 0xBFC076B0 */ uint32_t psx_brA_BFC076DC = cpu->gpr[0]; uint32_t psx_brB_BFC076DC = cpu->gpr[0]; psx_taken_BFC076DC = (psx_brA_BFC076DC == psx_brB_BFC076DC); psx_delay_BFC076DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC076E0: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC076E0u); #endif if (psx_delay_BFC076DC) { psx_delay_BFC076DC = 0; if (psx_taken_BFC076DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076B0u); goto label_BFC076B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076E4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC076E4: 1605FFF7 bne $s0, $a1, 0xBFC076C4 */ uint32_t psx_brA_BFC076E4 = cpu->gpr[16]; uint32_t psx_brB_BFC076E4 = cpu->gpr[5]; psx_taken_BFC076E4 = (psx_brA_BFC076E4 != psx_brB_BFC076E4); psx_delay_BFC076E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC076E8: 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(0xBFC076E8u); #endif if (psx_delay_BFC076E4) { psx_delay_BFC076E4 = 0; if (psx_taken_BFC076E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076C4u); goto label_BFC076C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076ECu); } label_BFC076EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC076ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC076EC: 1000FFE9 beq $zero, $zero, 0xBFC07694 */ uint32_t psx_brA_BFC076EC = cpu->gpr[0]; uint32_t psx_brB_BFC076EC = cpu->gpr[0]; psx_taken_BFC076EC = (psx_brA_BFC076EC == psx_brB_BFC076EC); psx_delay_BFC076EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC076F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC076F0u); #endif if (psx_delay_BFC076EC) { psx_delay_BFC076EC = 0; if (psx_taken_BFC076EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07694u); goto label_BFC07694; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC076F4u); } label_BFC076F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC076F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC076F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC076F4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC076F8: 24423554 addiu $v0, $v0, 13652 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (13652)); PGXP_ALU(0x24423554u, cpu->gpr[2], _pgx1, 0x00003554u); } #ifdef PSX_COSIM cosim_instr(0xBFC076F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC076FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC076FC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC07704u; /* jalr link before delay slot */ psx_delay_BFC076FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07700: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07700u); #endif if (psx_delay_BFC076FC) { psx_delay_BFC076FC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC07704u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } } void OpenBIOS_func_1FC07704(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07704u); int psx_delay_BFC0770C = 0; label_BFC07704: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07704u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07704: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC07708: 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(0xBFC07708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0770Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0770C: 03E00008 jr $ra */ psx_delay_BFC0770C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07710: AC43AEF4 sw $v1, -20748($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20748; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07710u); return; } g_debug_last_store_pc = 0xBFC07710u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEF4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07710u); #endif if (psx_delay_BFC0770C) { psx_delay_BFC0770C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07714(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07714u); int psx_delay_BFC0771C = 0; label_BFC07714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07714u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07714: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC07718: 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(0xBFC07718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0771Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0771C: 03E00008 jr $ra */ psx_delay_BFC0771C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07720: AC43AEF0 sw $v1, -20752($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07720u); return; } g_debug_last_store_pc = 0xBFC07720u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEF0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07720u); #endif if (psx_delay_BFC0771C) { psx_delay_BFC0771C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07724(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07724u); int psx_delay_BFC0772C = 0; label_BFC07724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07724u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07724: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC07728: 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(0xBFC07728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0772Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0772C: 03E00008 jr $ra */ psx_delay_BFC0772C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07730: AC43AEEC sw $v1, -20756($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20756)); 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[3]); } PGXP_STORE(0xAC43AEECu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07730u); #endif if (psx_delay_BFC0772C) { psx_delay_BFC0772C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07734(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07734u); int psx_delay_BFC0773C = 0; label_BFC07734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07734u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07734: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC07738: 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(0xBFC07738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0773Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0773C: 03E00008 jr $ra */ psx_delay_BFC0773C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07740: AC43AEE8 sw $v1, -20760($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20760; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07740u); return; } g_debug_last_store_pc = 0xBFC07740u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEE8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07740u); #endif if (psx_delay_BFC0773C) { psx_delay_BFC0773C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07744(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07744u); int psx_delay_BFC07748 = 0; label_BFC07744: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07744u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07744: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07748: 03E00008 jr $ra */ psx_delay_BFC07748 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0774Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0774C: AC40AEE8 sw $zero, -20760($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20760; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0774Cu); return; } g_debug_last_store_pc = 0xBFC0774Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40AEE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0774Cu); #endif if (psx_delay_BFC07748) { psx_delay_BFC07748 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07750(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07750u); int psx_delay_BFC07758 = 0; label_BFC07750: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07750u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07750: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC07754: 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(0xBFC07754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07758: 03E00008 jr $ra */ psx_delay_BFC07758 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0775Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0775C: AC434C44 sw $v1, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0775Cu); return; } g_debug_last_store_pc = 0xBFC0775Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C44u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0775Cu); #endif if (psx_delay_BFC07758) { psx_delay_BFC07758 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07760(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07760u); int psx_delay_BFC07760 = 0; int psx_taken_BFC07760 = 0; int psx_delay_BFC07788 = 0; int psx_taken_BFC07788 = 0; int psx_delay_BFC07790 = 0; int psx_delay_BFC0779C = 0; int psx_taken_BFC0779C = 0; int psx_delay_BFC07800 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07768u: goto label_BFC07768; case 0xBFC0776Cu: goto label_BFC0776C; case 0xBFC07790u: goto label_BFC07790; case 0xBFC07798u: goto label_BFC07798; case 0xBFC077A4u: goto label_BFC077A4; default: break; } } label_BFC07760: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07760u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07760: 04810002 bgez $a0, 0xBFC0776C */ uint32_t psx_brA_BFC07760 = cpu->gpr[4]; psx_taken_BFC07760 = ((int32_t)psx_brA_BFC07760 >= 0); psx_delay_BFC07760 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC07764: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0xBFC0776Cu); goto label_BFC0776C; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC07768: 2482000F addiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2482000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC07768u); #endif label_BFC0776C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0776Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0776Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0776Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0776C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0776Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07770: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC07770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07774: 24634C4C addiu $v1, $v1, 19532 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19532)); PGXP_ALU(0x24634C4Cu, cpu->gpr[3], _pgx1, 0x00004C4Cu); } #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, 0xCu); #endif /* 0xBFC07778: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0777Cu); #endif /* 0xBFC0777C: 90670000 lbu $a3, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 7, 0x8u); PGXP_LOAD(0x90670000u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC07780: 00000000 nop */ /* nop */ #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, 0x80u); #endif /* 0xBFC07784: 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(0xBFC07784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC07788: 14E00003 bne $a3, $zero, 0xBFC07798 */ uint32_t psx_brA_BFC07788 = cpu->gpr[7]; uint32_t psx_brB_BFC07788 = cpu->gpr[0]; psx_taken_BFC07788 = (psx_brA_BFC07788 != psx_brB_BFC07788); psx_delay_BFC07788 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0778Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0778C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0778Cu); #endif if (psx_delay_BFC07788) { psx_delay_BFC07788 = 0; if (psx_taken_BFC07788) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07798u); goto label_BFC07798; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07790u); } label_BFC07790: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07790u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07790: 03E00008 jr $ra */ psx_delay_BFC07790 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07794: 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(0xBFC07794u); #endif if (psx_delay_BFC07790) { psx_delay_BFC07790 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07798: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07798u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC07798: 2CA70401 sltiu $a3, $a1, 1025 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0); PGXP_ALU(0x2CA70401u, cpu->gpr[7], _pgx1, 0x0401u); } #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, 0x81u); #endif /* 0xBFC0779C: 10E0FFFC beq $a3, $zero, 0xBFC07790 */ uint32_t psx_brA_BFC0779C = cpu->gpr[7]; uint32_t psx_brB_BFC0779C = cpu->gpr[0]; psx_taken_BFC0779C = (psx_brA_BFC0779C == psx_brB_BFC0779C); psx_delay_BFC0779C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC077A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC077A0u); #endif if (psx_delay_BFC0779C) { psx_delay_BFC0779C = 0; if (psx_taken_BFC0779C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07790u); goto label_BFC07790; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC077A4u); } label_BFC077A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC077A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC077A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC077A4: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC077A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC077A8: ACE04C48 sw $zero, 19528($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC077A8u); return; } g_debug_last_store_pc = 0xBFC077A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE04C48u, _pgxa, cpu->gpr[0]); } #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, 0x80u); #endif /* 0xBFC077AC: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #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, 0x4u); #endif /* 0xBFC077B0: 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(0xBFC077B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC077B4: 24E74C10 addiu $a3, $a3, 19472 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (19472)); PGXP_ALU(0x24E74C10u, cpu->gpr[7], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0xBFC077B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC077B8: 00473821 addu $a3, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[7]; PGXP_ALU(0x00473821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC077B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC077BC: 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, 0xBFC077BCu); return; } g_debug_last_store_pc = 0xBFC077BCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACE40000u, _pgxa, cpu->gpr[4]); } #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, 0x10u); #endif /* 0xBFC077C0: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC077C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC077C4: 24844C28 addiu $a0, $a0, 19496 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19496)); PGXP_ALU(0x24844C28u, cpu->gpr[4], _pgx1, 0x00004C28u); } #ifdef PSX_COSIM cosim_instr(0xBFC077C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC077C8: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC077C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC077CC: AC860000 sw $a2, 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, 0xBFC077CCu); return; } g_debug_last_store_pc = 0xBFC077CCu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC077D0: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC077D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC077D4: 24844C18 addiu $a0, $a0, 19480 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19480)); PGXP_ALU(0x24844C18u, cpu->gpr[4], _pgx1, 0x00004C18u); } #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, 0x40u); #endif /* 0xBFC077D8: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #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, 0x14u); #endif /* 0xBFC077DC: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC077DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC077E0: 24C62B5C addiu $a2, $a2, 11100 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (11100)); PGXP_ALU(0x24C62B5Cu, cpu->gpr[6], _pgx1, 0x00002B5Cu); } #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, 0x50u); #endif /* 0xBFC077E4: AC860000 sw $a2, 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, 0xBFC077E4u); return; } g_debug_last_store_pc = 0xBFC077E4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC077E8: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #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, 0x10u); #endif /* 0xBFC077EC: 24844C08 addiu $a0, $a0, 19464 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19464)); PGXP_ALU(0x24844C08u, cpu->gpr[4], _pgx1, 0x00004C08u); } #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, 0x14u); #endif /* 0xBFC077F0: 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(0xBFC077F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC077F4: 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, 0xBFC077F4u); return; } g_debug_last_store_pc = 0xBFC077F4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC077F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC077F8: 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(0xBFC077F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC077FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC077FC: A0620000 sb $v0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC077FCu; 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(0xBFC077FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07800: 03E00008 jr $ra */ psx_delay_BFC07800 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07804: 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(0xBFC07804u); #endif if (psx_delay_BFC07800) { psx_delay_BFC07800 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07808(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07808u); int psx_delay_BFC07808 = 0; int psx_taken_BFC07808 = 0; int psx_delay_BFC07830 = 0; int psx_taken_BFC07830 = 0; int psx_delay_BFC07838 = 0; int psx_delay_BFC07844 = 0; int psx_taken_BFC07844 = 0; int psx_delay_BFC078A8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07810u: goto label_BFC07810; case 0xBFC07814u: goto label_BFC07814; case 0xBFC07838u: goto label_BFC07838; case 0xBFC07840u: goto label_BFC07840; case 0xBFC0784Cu: goto label_BFC0784C; default: break; } } label_BFC07808: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07808u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07808: 04810002 bgez $a0, 0xBFC07814 */ uint32_t psx_brA_BFC07808 = cpu->gpr[4]; psx_taken_BFC07808 = ((int32_t)psx_brA_BFC07808 >= 0); psx_delay_BFC07808 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0780Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0780C: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0780Cu); #endif if (psx_delay_BFC07808) { psx_delay_BFC07808 = 0; if (psx_taken_BFC07808) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07814u); goto label_BFC07814; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07810u); } label_BFC07810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07810u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC07810: 2482000F addiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2482000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC07810u); #endif label_BFC07814: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07814u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07814: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x4u); #endif /* 0xBFC07818: 00021103 sra $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021103u, cpu->gpr[2], _pgx1, 4u); } #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, 0x8u); #endif /* 0xBFC0781C: 24634C4C addiu $v1, $v1, 19532 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19532)); PGXP_ALU(0x24634C4Cu, cpu->gpr[3], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC0781Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07820: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07824u); #endif /* 0xBFC07824: 90670000 lbu $a3, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 7, 0x8u); PGXP_LOAD(0x90670000u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC07828: 00000000 nop */ /* nop */ #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, 0x80u); #endif /* 0xBFC0782C: 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(0xBFC0782Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC07830: 14E00003 bne $a3, $zero, 0xBFC07840 */ uint32_t psx_brA_BFC07830 = cpu->gpr[7]; uint32_t psx_brB_BFC07830 = cpu->gpr[0]; psx_taken_BFC07830 = (psx_brA_BFC07830 != psx_brB_BFC07830); psx_delay_BFC07830 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07834: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07834u); #endif if (psx_delay_BFC07830) { psx_delay_BFC07830 = 0; if (psx_taken_BFC07830) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07840u); goto label_BFC07840; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07838u); } label_BFC07838: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07838u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07838: 03E00008 jr $ra */ psx_delay_BFC07838 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0783Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0783C: 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(0xBFC0783Cu); #endif if (psx_delay_BFC07838) { psx_delay_BFC07838 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07840: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07840u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC07840: 2CA70401 sltiu $a3, $a1, 1025 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < 0x00000401u ? 1 : 0); PGXP_ALU(0x2CA70401u, cpu->gpr[7], _pgx1, 0x0401u); } #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, 0x81u); #endif /* 0xBFC07844: 10E0FFFC beq $a3, $zero, 0xBFC07838 */ uint32_t psx_brA_BFC07844 = cpu->gpr[7]; uint32_t psx_brB_BFC07844 = cpu->gpr[0]; psx_taken_BFC07844 = (psx_brA_BFC07844 == psx_brB_BFC07844); psx_delay_BFC07844 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07848: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07848u); #endif if (psx_delay_BFC07844) { psx_delay_BFC07844 = 0; if (psx_taken_BFC07844) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07838u); goto label_BFC07838; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0784Cu); } label_BFC0784C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0784Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0784Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0784Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0784C: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0784Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC07850: ACE04C48 sw $zero, 19528($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07850u); return; } g_debug_last_store_pc = 0xBFC07850u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE04C48u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC07854: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #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, 0x4u); #endif /* 0xBFC07858: 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(0xBFC07858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0785Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0785C: 24E74C10 addiu $a3, $a3, 19472 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (19472)); PGXP_ALU(0x24E74C10u, cpu->gpr[7], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0xBFC0785Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC07860: 00473821 addu $a3, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[2] + cpu->gpr[7]; PGXP_ALU(0x00473821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC07864: 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, 0xBFC07864u); return; } g_debug_last_store_pc = 0xBFC07864u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACE40000u, _pgxa, cpu->gpr[4]); } #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, 0x10u); #endif /* 0xBFC07868: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0786Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0786C: 24844C28 addiu $a0, $a0, 19496 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19496)); PGXP_ALU(0x24844C28u, cpu->gpr[4], _pgx1, 0x00004C28u); } #ifdef PSX_COSIM cosim_instr(0xBFC0786Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC07870: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x50u); #endif /* 0xBFC07874: AC860000 sw $a2, 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, 0xBFC07874u); return; } g_debug_last_store_pc = 0xBFC07874u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC07878: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 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, 0x10u); #endif /* 0xBFC0787C: 24844C18 addiu $a0, $a0, 19480 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19480)); PGXP_ALU(0x24844C18u, cpu->gpr[4], _pgx1, 0x00004C18u); } #ifdef PSX_COSIM cosim_instr(0xBFC0787Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC07880: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC07884: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC07888: 24C62F44 addiu $a2, $a2, 12100 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (12100)); PGXP_ALU(0x24C62F44u, cpu->gpr[6], _pgx1, 0x00002F44u); } #ifdef PSX_COSIM cosim_instr(0xBFC07888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0788Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0788C: AC860000 sw $a2, 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, 0xBFC0788Cu); return; } g_debug_last_store_pc = 0xBFC0788Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC07890: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07894: 24844C08 addiu $a0, $a0, 19464 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19464)); PGXP_ALU(0x24844C08u, cpu->gpr[4], _pgx1, 0x00004C08u); } #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, 0x14u); #endif /* 0xBFC07898: 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(0xBFC07898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0789Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0789C: 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, 0xBFC0789Cu); return; } g_debug_last_store_pc = 0xBFC0789Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0789Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC078A0: 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(0xBFC078A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC078A4: A0620000 sb $v0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC078A4u; 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(0xBFC078A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC078A8: 03E00008 jr $ra */ psx_delay_BFC078A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC078AC: 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(0xBFC078ACu); #endif if (psx_delay_BFC078A8) { psx_delay_BFC078A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC078B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC078B0u); int psx_delay_BFC078B0 = 0; int psx_taken_BFC078B0 = 0; int psx_delay_BFC078D8 = 0; int psx_taken_BFC078D8 = 0; int psx_delay_BFC0793C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC078B8u: goto label_BFC078B8; case 0xBFC078BCu: goto label_BFC078BC; case 0xBFC078E0u: goto label_BFC078E0; case 0xBFC0793Cu: goto label_BFC0793C; default: break; } } label_BFC078B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC078B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC078B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC078B0: 04810002 bgez $a0, 0xBFC078BC */ uint32_t psx_brA_BFC078B0 = cpu->gpr[4]; psx_taken_BFC078B0 = ((int32_t)psx_brA_BFC078B0 >= 0); psx_delay_BFC078B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC078B4: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC078B4u); #endif if (psx_delay_BFC078B0) { psx_delay_BFC078B0 = 0; if (psx_taken_BFC078B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC078BCu); goto label_BFC078BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC078B8u); } label_BFC078B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC078B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC078B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC078B8: 2482000F addiu $v0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2482000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC078B8u); #endif label_BFC078BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC078BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC078BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC078BC: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0xCu); #endif /* 0xBFC078C0: 00021903 sra $v1, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] >> 4u); PGXP_ALU(0x00021903u, cpu->gpr[3], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC078C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC078C4: 24A54C4C addiu $a1, $a1, 19532 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (19532)); PGXP_ALU(0x24A54C4Cu, cpu->gpr[5], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC078C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC078C8: 00652821 addu $a1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00652821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC078C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078CCu); #endif /* 0xBFC078CC: 90A60000 lbu $a2, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 6, 0x20u); PGXP_LOAD(0x90A60000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC078CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC078D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC078D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC078D4: 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(0xBFC078D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC078D8: 10C00018 beq $a2, $zero, 0xBFC0793C */ uint32_t psx_brA_BFC078D8 = cpu->gpr[6]; uint32_t psx_brB_BFC078D8 = cpu->gpr[0]; psx_taken_BFC078D8 = (psx_brA_BFC078D8 == psx_brB_BFC078D8); psx_delay_BFC078D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC078DC: 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(0xBFC078DCu); #endif if (psx_delay_BFC078D8) { psx_delay_BFC078D8 = 0; if (psx_taken_BFC078D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0793Cu); goto label_BFC0793C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC078E0u); } label_BFC078E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC078E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC078E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC078E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC078E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC078E4: AC404C48 sw $zero, 19528($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC078E4u); return; } g_debug_last_store_pc = 0xBFC078E4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C48u, _pgxa, cpu->gpr[0]); } #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, 0xCu); #endif /* 0xBFC078E8: 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(0xBFC078E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC078EC: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC078ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC078F0: 24634C10 addiu $v1, $v1, 19472 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19472)); PGXP_ALU(0x24634C10u, cpu->gpr[3], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0xBFC078F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC078F4: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC078F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC078F8: 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, 0xBFC078F8u); return; } g_debug_last_store_pc = 0xBFC078F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC078F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC078FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC078FC: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC07900: 24634C28 addiu $v1, $v1, 19496 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19496)); PGXP_ALU(0x24634C28u, cpu->gpr[3], _pgx1, 0x00004C28u); } #ifdef PSX_COSIM cosim_instr(0xBFC07900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07904: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC07908: 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, 0xBFC07908u); return; } g_debug_last_store_pc = 0xBFC07908u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0790Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0790C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0790Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07910: 24634C18 addiu $v1, $v1, 19480 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19480)); PGXP_ALU(0x24634C18u, cpu->gpr[3], _pgx1, 0x00004C18u); } #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, 0x10u); #endif /* 0xBFC07914: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #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, 0xCu); #endif /* 0xBFC07918: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0791Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0791C: 2484330C addiu $a0, $a0, 13068 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (13068)); PGXP_ALU(0x2484330Cu, cpu->gpr[4], _pgx1, 0x0000330Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC0791Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07920: 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, 0xBFC07920u); return; } g_debug_last_store_pc = 0xBFC07920u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07924: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07928: 24634C08 addiu $v1, $v1, 19464 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19464)); PGXP_ALU(0x24634C08u, cpu->gpr[3], _pgx1, 0x00004C08u); } #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, 0xCu); #endif /* 0xBFC0792C: 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(0xBFC0792Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07930: 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, 0xBFC07930u); return; } g_debug_last_store_pc = 0xBFC07930u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07934: A0A00000 sb $zero, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07934u; 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(0xBFC07934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07938: 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(0xBFC07938u); #endif label_BFC0793C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0793Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0793Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0793Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0793C: 03E00008 jr $ra */ psx_delay_BFC0793C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07940: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07940u); #endif if (psx_delay_BFC0793C) { psx_delay_BFC0793C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07944(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07944u); int psx_delay_BFC07960 = 0; label_BFC07944: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07944u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07944: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07948u); #endif /* 0xBFC07948: 8C424C54 lw $v0, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07948u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C54u, _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, 0x8u); #endif /* 0xBFC0794C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC07950: 24634C10 addiu $v1, $v1, 19472 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19472)); PGXP_ALU(0x24634C10u, cpu->gpr[3], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0xBFC07950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07954: 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(0xBFC07954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07958: 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(0xBFC07958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0795Cu); #endif /* 0xBFC0795C: 8C420000 lw $v0, 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, 0xBFC0795Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC07960: 03E00008 jr $ra */ psx_delay_BFC07960 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07964: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07964u); #endif if (psx_delay_BFC07960) { psx_delay_BFC07960 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07968(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07968u); int psx_delay_BFC079C0 = 0; 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, 0x4u); #endif /* 0xBFC07968: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 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, 0x14u); #endif /* 0xBFC0796C: 24442000 addiu $a0, $v0, 8192 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (8192)); PGXP_ALU(0x24442000u, cpu->gpr[4], _pgx1, 0x00002000u); } #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, 0x8u); #endif /* 0xBFC07970: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07974: AC64B050 sw $a0, -20400($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20400; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07974u); return; } g_debug_last_store_pc = 0xBFC07974u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC64B050u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07978u); #endif /* 0xBFC07978: 90432032 lbu $v1, 8242($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8242; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (8242)), 3, 0x4u); PGXP_LOAD(0x90432032u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0797Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0797C: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0797Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07980: 306300FE andi $v1, $v1, 0xFE */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFEu; PGXP_ALU(0x306300FEu, cpu->gpr[3], _pgx1, 0x00FEu); } #ifdef PSX_COSIM cosim_instr(0xBFC07980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07984: A0432032 sb $v1, 8242($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8242; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07984u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8242)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0432032u, _pgxa, cpu->gpr[3]); } #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, 0xCu); #endif /* 0xBFC07988: 24432030 addiu $v1, $v0, 8240 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (8240)); PGXP_ALU(0x24432030u, cpu->gpr[3], _pgx1, 0x00002030u); } #ifdef PSX_COSIM cosim_instr(0xBFC07988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0798Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0798C: AC83B04C sw $v1, -20404($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -20404; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0798Cu); return; } g_debug_last_store_pc = 0xBFC0798Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC83B04Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0798Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07990: 3C04BFC0 lui $a0, 0xBFC0 */ cpu->gpr[4] = 0xBFC00000u; PGXP_ALU(0x3C04BFC0u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07994u); #endif /* 0xBFC07994: 90850000 lbu $a1, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 5, 0x10u); PGXP_LOAD(0x90850000u, _pgxa, cpu->gpr[5]); } #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, 0x21u); #endif /* 0xBFC07998: 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(0xBFC07998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0799Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0799C: A0452030 sb $a1, 8240($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8240; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0799Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8240)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0452030u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0799Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079A0u); #endif /* 0xBFC079A0: 90422032 lbu $v0, 8242($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8242; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (8242)), 2, 0x4u); PGXP_LOAD(0x90422032u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC079A4: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC079A8: 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(0xBFC079A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC079AC: A0620002 sb $v0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC079ACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0620002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC079ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079B0u); #endif /* 0xBFC079B0: 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(0xBFC079B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC079B4: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC079B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC079B8: 2442AF40 addiu $v0, $v0, -20672 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20672)); PGXP_ALU(0x2442AF40u, cpu->gpr[2], _pgx1, 0xFFFFAF40u); } #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, 0x5u); #endif /* 0xBFC079BC: 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, 0xBFC079BCu); return; } g_debug_last_store_pc = 0xBFC079BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400008u, _pgxa, cpu->gpr[0]); } #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, 0x80000001u); #endif /* 0xBFC079C0: 03E00008 jr $ra */ psx_delay_BFC079C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC079C4: 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, 0xBFC079C4u); return; } g_debug_last_store_pc = 0xBFC079C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC079C4u); #endif if (psx_delay_BFC079C0) { psx_delay_BFC079C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC079C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC079C8u); int psx_delay_BFC079E0 = 0; int psx_taken_BFC079E0 = 0; int psx_delay_BFC07A0C = 0; int psx_delay_BFC07A1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC079E8u: goto label_BFC079E8; case 0xBFC07A14u: goto label_BFC07A14; default: break; } } label_BFC079C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC079C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC079C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC079C8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC079CC: 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(0xBFC079CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC079D0: A0432041 sb $v1, 8257($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8257; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC079D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8257)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0432041u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC079D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079D4u); #endif /* 0xBFC079D4: 8C820004 lw $v0, 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, 0xBFC079D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC079D8: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC079DC: 2C420002 sltiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0xBFC079DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC079E0: 1040000C beq $v0, $zero, 0xBFC07A14 */ uint32_t psx_brA_BFC079E0 = cpu->gpr[2]; uint32_t psx_brB_BFC079E0 = cpu->gpr[0]; psx_taken_BFC079E0 = (psx_brA_BFC079E0 == psx_brB_BFC079E0); psx_delay_BFC079E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC079E4: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC079E4u); #endif if (psx_delay_BFC079E0) { psx_delay_BFC079E0 = 0; if (psx_taken_BFC079E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07A14u); goto label_BFC07A14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC079E8u); } label_BFC079E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC079E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC079E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079E8u); #endif /* 0xBFC079E8: 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, 0xBFC079E8u); 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(0xBFC079E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC079EC: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC079F0: 34421000 ori $v0, $v0, 0x1000 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x1000u; PGXP_ALU(0x34421000u, cpu->gpr[2], _pgx1, 0x1000u); } #ifdef PSX_COSIM cosim_instr(0xBFC079F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC079F4: 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, 0xBFC079F4u); return; } g_debug_last_store_pc = 0xBFC079F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC079F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC079F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC079F8: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC079FC: 2442AF40 addiu $v0, $v0, -20672 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20672)); PGXP_ALU(0x2442AF40u, cpu->gpr[2], _pgx1, 0xFFFFAF40u); } #ifdef PSX_COSIM cosim_instr(0xBFC079FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07A00: 2463AF4C addiu $v1, $v1, -20660 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-20660)); PGXP_ALU(0x2463AF4Cu, cpu->gpr[3], _pgx1, 0xFFFFAF4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07A04: 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, 0xBFC07A04u); return; } g_debug_last_store_pc = 0xBFC07A04u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #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, 0xCu); #endif /* 0xBFC07A08: 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, 0xBFC07A08u); return; } g_debug_last_store_pc = 0xBFC07A08u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07A0C: 03E00008 jr $ra */ psx_delay_BFC07A0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07A10: 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(0xBFC07A10u); #endif if (psx_delay_BFC07A0C) { psx_delay_BFC07A0C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07A14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07A14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07A14: 24020006 addiu $v0, $zero, 6 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); PGXP_ALU(0x24020006u, cpu->gpr[2], _pgx1, 0x00000006u); } #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, 0x14u); #endif /* 0xBFC07A18: AC820018 sw $v0, 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, 0xBFC07A18u); return; } g_debug_last_store_pc = 0xBFC07A18u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC07A1C: 03E00008 jr $ra */ psx_delay_BFC07A1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07A20: 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(0xBFC07A20u); #endif if (psx_delay_BFC07A1C) { psx_delay_BFC07A1C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07A24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07A24u); int psx_delay_BFC07A3C = 0; int psx_taken_BFC07A3C = 0; int psx_delay_BFC07A6C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07A44u: goto label_BFC07A44; case 0xBFC07A6Cu: goto label_BFC07A6C; default: break; } } label_BFC07A24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07A24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07A24: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A28u); #endif /* 0xBFC07A28: 8C44B050 lw $a0, -20400($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20400; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A28u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C44B050u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07A2C: 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(0xBFC07A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A30u); #endif /* 0xBFC07A30: 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(0xBFC07A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07A34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07A38: 30630010 andi $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u; PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0xBFC07A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC07A3C: 1060000B beq $v1, $zero, 0xBFC07A6C */ uint32_t psx_brA_BFC07A3C = cpu->gpr[3]; uint32_t psx_brB_BFC07A3C = cpu->gpr[0]; psx_taken_BFC07A3C = (psx_brA_BFC07A3C == psx_brB_BFC07A3C); psx_delay_BFC07A3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07A40: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07A40u); #endif if (psx_delay_BFC07A3C) { psx_delay_BFC07A3C = 0; if (psx_taken_BFC07A3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07A6Cu); goto label_BFC07A6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07A44u); } label_BFC07A44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07A44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A44u); #endif /* 0xBFC07A44: 8C63B04C lw $v1, -20404($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07A44u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C63B04Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A48u); #endif /* 0xBFC07A48: 90820002 lbu $v0, 2($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 2, 0x10u); PGXP_LOAD(0x90820002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07A4C: 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(0xBFC07A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07A50: A0640000 sb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07A50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A54u); #endif /* 0xBFC07A54: 90640002 lbu $a0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (2)), 4, 0x8u); PGXP_LOAD(0x90640002u, _pgxa, cpu->gpr[4]); } #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, 0x4u); #endif /* 0xBFC07A58: 34420100 ori $v0, $v0, 0x100 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x100u; PGXP_ALU(0x34420100u, cpu->gpr[2], _pgx1, 0x0100u); } #ifdef PSX_COSIM cosim_instr(0xBFC07A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07A5C: 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(0xBFC07A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07A60: A0640002 sb $a0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07A60u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0640002u, _pgxa, cpu->gpr[4]); } #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, 0x8u); #endif /* 0xBFC07A64: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A68u); #endif /* 0xBFC07A68: 90630000 lbu $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x90630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A68u); #endif label_BFC07A6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07A6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07A6C: 03E00008 jr $ra */ 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; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC07A74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07A74u); int psx_delay_BFC07A9C = 0; int psx_taken_BFC07A9C = 0; int psx_delay_BFC07AB0 = 0; int psx_taken_BFC07AB0 = 0; int psx_delay_BFC07AB8 = 0; int psx_taken_BFC07AB8 = 0; int psx_delay_BFC07AC4 = 0; int psx_taken_BFC07AC4 = 0; int psx_delay_BFC07AF4 = 0; int psx_delay_BFC07B00 = 0; int psx_delay_BFC07B08 = 0; int psx_delay_BFC07B10 = 0; int psx_taken_BFC07B10 = 0; int psx_delay_BFC07B24 = 0; int psx_taken_BFC07B24 = 0; int psx_delay_BFC07B38 = 0; int psx_taken_BFC07B38 = 0; int psx_delay_BFC07B48 = 0; int psx_delay_BFC07B5C = 0; int psx_taken_BFC07B5C = 0; int psx_delay_BFC07B68 = 0; int psx_delay_BFC07B90 = 0; int psx_taken_BFC07B90 = 0; int psx_delay_BFC07BA4 = 0; int psx_taken_BFC07BA4 = 0; int psx_delay_BFC07BD8 = 0; int psx_delay_BFC07BEC = 0; int psx_taken_BFC07BEC = 0; int psx_delay_BFC07C04 = 0; int psx_taken_BFC07C04 = 0; int psx_delay_BFC07C2C = 0; int psx_taken_BFC07C2C = 0; int psx_delay_BFC07C48 = 0; int psx_taken_BFC07C48 = 0; int psx_delay_BFC07C7C = 0; int psx_taken_BFC07C7C = 0; int psx_delay_BFC07C84 = 0; int psx_delay_BFC07C8C = 0; int psx_taken_BFC07C8C = 0; int psx_delay_BFC07C94 = 0; int psx_delay_BFC07C9C = 0; int psx_taken_BFC07C9C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07AA4u: goto label_BFC07AA4; case 0xBFC07AB0u: goto label_BFC07AB0; case 0xBFC07AB8u: goto label_BFC07AB8; case 0xBFC07AC0u: goto label_BFC07AC0; case 0xBFC07ACCu: goto label_BFC07ACC; case 0xBFC07AFCu: goto label_BFC07AFC; case 0xBFC07B08u: goto label_BFC07B08; case 0xBFC07B10u: goto label_BFC07B10; case 0xBFC07B18u: goto label_BFC07B18; case 0xBFC07B2Cu: goto label_BFC07B2C; case 0xBFC07B40u: goto label_BFC07B40; case 0xBFC07B48u: goto label_BFC07B48; case 0xBFC07B50u: goto label_BFC07B50; case 0xBFC07B64u: goto label_BFC07B64; case 0xBFC07B68u: goto label_BFC07B68; case 0xBFC07B70u: goto label_BFC07B70; case 0xBFC07B98u: goto label_BFC07B98; case 0xBFC07BACu: goto label_BFC07BAC; case 0xBFC07BB8u: goto label_BFC07BB8; case 0xBFC07BE0u: goto label_BFC07BE0; case 0xBFC07BF4u: goto label_BFC07BF4; case 0xBFC07C04u: goto label_BFC07C04; case 0xBFC07C0Cu: goto label_BFC07C0C; case 0xBFC07C20u: goto label_BFC07C20; case 0xBFC07C34u: goto label_BFC07C34; case 0xBFC07C50u: goto label_BFC07C50; case 0xBFC07C84u: goto label_BFC07C84; case 0xBFC07C8Cu: goto label_BFC07C8C; case 0xBFC07C94u: goto label_BFC07C94; case 0xBFC07C9Cu: goto label_BFC07C9C; default: break; } } 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, 0x20000000u); #endif /* 0xBFC07A74: 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(0xBFC07A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07A78: 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(0xBFC07A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC07A7C: 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, 0xBFC07A7Cu); return; } g_debug_last_store_pc = 0xBFC07A7Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC07A80: 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, 0xBFC07A80u); return; } g_debug_last_store_pc = 0xBFC07A80u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC07A84: 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, 0xBFC07A84u); return; } g_debug_last_store_pc = 0xBFC07A84u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC07A88: 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, 0xBFC07A88u); return; } g_debug_last_store_pc = 0xBFC07A88u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC07A8C: 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, 0xBFC07A8Cu); return; } g_debug_last_store_pc = 0xBFC07A8Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #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, 0x20040000u); #endif /* 0xBFC07A90: 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, 0xBFC07A90u); return; } g_debug_last_store_pc = 0xBFC07A90u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #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, 0x20010000u); #endif /* 0xBFC07A94: 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, 0xBFC07A94u); return; } g_debug_last_store_pc = 0xBFC07A94u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A98u); #endif /* 0xBFC07A98: 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, 0xBFC07A98u); 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(0xBFC07A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC07A9C: 14A20008 bne $a1, $v0, 0xBFC07AC0 */ uint32_t psx_brA_BFC07A9C = cpu->gpr[5]; uint32_t psx_brB_BFC07A9C = cpu->gpr[2]; psx_taken_BFC07A9C = (psx_brA_BFC07A9C != psx_brB_BFC07A9C); psx_delay_BFC07A9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC07AA0: 00808825 or $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(0x00808825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07AA0u); #endif if (psx_delay_BFC07A9C) { psx_delay_BFC07A9C = 0; if (psx_taken_BFC07A9C) { #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, 0xBFC07AA4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC07AA4: 3C120001 lui $s2, 0x1 */ cpu->gpr[18] = 0x00010000u; PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); #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, 0x80001u); #endif /* 0xBFC07AA8: 241300C0 addiu $s3, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241300C0u, cpu->gpr[19], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC07AAC: 2652AF40 addiu $s2, $s2, -20672 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-20672)); PGXP_ALU(0x2652AF40u, cpu->gpr[18], _pgx1, 0xFFFFAF40u); } #ifdef PSX_COSIM cosim_instr(0xBFC07AACu); #endif 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, 0x10000u); #endif /* 0xBFC07AB0: 1E000015 bgtz $s0, 0xBFC07B08 */ uint32_t psx_brA_BFC07AB0 = cpu->gpr[16]; psx_taken_BFC07AB0 = ((int32_t)psx_brA_BFC07AB0 > 0); psx_delay_BFC07AB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07AB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07AB4u); #endif if (psx_delay_BFC07AB0) { psx_delay_BFC07AB0 = 0; if (psx_taken_BFC07AB0) { #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, 0xBFC07AB8u); } label_BFC07AB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07AB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07AB8: 1000003F beq $zero, $zero, 0xBFC07BB8 */ 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, 0x1u); #endif /* 0xBFC07ABC: 00000000 nop */ /* nop */ #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, 0xBFC07BB8u); goto label_BFC07BB8; } #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, 0x5u); #endif /* 0xBFC07AC0: 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(0xBFC07AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC07AC4: 10A20046 beq $a1, $v0, 0xBFC07BE0 */ uint32_t psx_brA_BFC07AC4 = cpu->gpr[5]; uint32_t psx_brB_BFC07AC4 = cpu->gpr[2]; psx_taken_BFC07AC4 = (psx_brA_BFC07AC4 == psx_brB_BFC07AC4); psx_delay_BFC07AC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07AC8: 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(0xBFC07AC8u); #endif if (psx_delay_BFC07AC4) { psx_delay_BFC07AC4 = 0; if (psx_taken_BFC07AC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07BE0u); goto label_BFC07BE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07ACCu); } label_BFC07ACC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07ACCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07ACC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AD0u); #endif /* 0xBFC07AD0: 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, 0xBFC07AD0u); 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(0xBFC07AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AD4u); #endif /* 0xBFC07AD4: 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, 0xBFC07AD4u); 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(0xBFC07AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AD8u); #endif /* 0xBFC07AD8: 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, 0xBFC07AD8u); 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(0xBFC07AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ADCu); #endif /* 0xBFC07ADC: 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, 0xBFC07ADCu); 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(0xBFC07ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AE0u); #endif /* 0xBFC07AE0: 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, 0xBFC07AE0u); 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(0xBFC07AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AE4u); #endif /* 0xBFC07AE4: 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, 0xBFC07AE4u); 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(0xBFC07AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AE8u); #endif /* 0xBFC07AE8: 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, 0xBFC07AE8u); 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(0xBFC07AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07AEC: 24849D08 addiu $a0, $a0, -25336 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25336)); PGXP_ALU(0x24849D08u, cpu->gpr[4], _pgx1, 0xFFFF9D08u); } #ifdef PSX_COSIM cosim_instr(0xBFC07AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07AF0: 241900C0 addiu $t9, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241900C0u, cpu->gpr[25], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07AF4: 03200008 jr $t9 */ psx_delay_BFC07AF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07AF8: 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(0xBFC07AF8u); #endif if (psx_delay_BFC07AF4) { psx_delay_BFC07AF4 = 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; } label_BFC07AFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07AFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC07AFC: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80080000u); #endif /* 0xBFC07B00: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC07B08u; /* jalr link before delay slot */ psx_delay_BFC07B00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC07B04: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07B04u); #endif if (psx_delay_BFC07B00) { psx_delay_BFC07B00 = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC07B08u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x80000000u); #endif /* 0xBFC07B08: 0FF01E89 jal 0xBFC07A24 */ cpu->gpr[31] = 0xBFC07B10u; /* jal link before delay slot */ psx_delay_BFC07B08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B0Cu); #endif if (psx_delay_BFC07B08) { psx_delay_BFC07B08 = 0; cpu->gpr[31] = 0xBFC07B10u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07A24u); cpu->pc = 0xBFC07A24u; return; } label_BFC07B10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07B10: 1440FFFA bne $v0, $zero, 0xBFC07AFC */ uint32_t psx_brA_BFC07B10 = cpu->gpr[2]; uint32_t psx_brB_BFC07B10 = cpu->gpr[0]; psx_taken_BFC07B10 = (psx_brA_BFC07B10 != psx_brB_BFC07B10); psx_delay_BFC07B10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07B14: 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(0xBFC07B14u); #endif if (psx_delay_BFC07B10) { psx_delay_BFC07B10 = 0; if (psx_taken_BFC07B10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07AFCu); goto label_BFC07AFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07B18u); } label_BFC07B18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B18u); #endif /* 0xBFC07B18: 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, 0xBFC07B18u); 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(0xBFC07B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07B20: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0xBFC07B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07B24: 1440001C bne $v0, $zero, 0xBFC07B98 */ uint32_t psx_brA_BFC07B24 = cpu->gpr[2]; uint32_t psx_brB_BFC07B24 = cpu->gpr[0]; psx_taken_BFC07B24 = (psx_brA_BFC07B24 != psx_brB_BFC07B24); psx_delay_BFC07B24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B28u); #endif if (psx_delay_BFC07B24) { psx_delay_BFC07B24 = 0; if (psx_taken_BFC07B24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07B98u); goto label_BFC07B98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07B2Cu); } label_BFC07B2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B2Cu); #endif /* 0xBFC07B2C: 8E430008 lw $v1, 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, 0xBFC07B2Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E430008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B30u); #endif /* 0xBFC07B30: 8E420004 lw $v0, 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, 0xBFC07B30u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420004u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC07B34: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC07B38: 1462000B bne $v1, $v0, 0xBFC07B68 */ uint32_t psx_brA_BFC07B38 = cpu->gpr[3]; uint32_t psx_brB_BFC07B38 = cpu->gpr[2]; 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, 0x201u); #endif /* 0xBFC07B3C: 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(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, 0xBFC07B68u); goto label_BFC07B68; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC07B40: 241000C0 addiu $s0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241000C0u, cpu->gpr[16], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07B44: 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(0xBFC07B44u); #endif label_BFC07B48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC07B48: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC07B50u; /* jalr link before delay slot */ psx_delay_BFC07B48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B4Cu); #endif if (psx_delay_BFC07B48) { psx_delay_BFC07B48 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC07B50u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07B50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B50u); #endif /* 0xBFC07B50: 8E430004 lw $v1, 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, 0xBFC07B50u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B54u); #endif /* 0xBFC07B54: 8E420008 lw $v0, 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, 0xBFC07B54u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07B5C: 1062FFFA beq $v1, $v0, 0xBFC07B48 */ uint32_t psx_brA_BFC07B5C = cpu->gpr[3]; uint32_t psx_brB_BFC07B5C = cpu->gpr[2]; 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, 0x201u); #endif /* 0xBFC07B60: 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(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, 0xBFC07B48u); goto label_BFC07B48; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07B64: 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(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, 0x80080000u); #endif /* 0xBFC07B68: 0260F809 jalr $ra, $s3 */ cpu->gpr[31] = 0xBFC07B70u; /* jalr link before delay slot */ psx_delay_BFC07B68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC07B6C: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07B6Cu); #endif if (psx_delay_BFC07B68) { psx_delay_BFC07B68 = 0; { uint32_t _t = cpu->gpr[19]; cpu->gpr[31] = 0xBFC07B70u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07B70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07B70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B70u); #endif /* 0xBFC07B70: 8E230008 lw $v1, 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, 0xBFC07B70u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } PGXP_LOAD(0x8E230008u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC07B74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07B78: 24640001 addiu $a0, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (1)); PGXP_ALU(0x24640001u, cpu->gpr[4], _pgx1, 0x00000001u); } #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, 0x20010u); #endif /* 0xBFC07B7C: AE240008 sw $a0, 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, 0xBFC07B7Cu); return; } g_debug_last_store_pc = 0xBFC07B7Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAE240008u, _pgxa, cpu->gpr[4]); } #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, 0xCu); #endif /* 0xBFC07B80: A0620000 sb $v0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07B80u; 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(0xBFC07B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B84u); #endif /* 0xBFC07B84: 8E30000C lw $s0, 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, 0xBFC07B84u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000u); } PGXP_LOAD(0x8E30000Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B88: 00000000 nop */ /* nop */ #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, 0x10000u); #endif /* 0xBFC07B8C: 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(0xBFC07B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07B90: 1000FFC7 beq $zero, $zero, 0xBFC07AB0 */ uint32_t psx_brA_BFC07B90 = cpu->gpr[0]; uint32_t psx_brB_BFC07B90 = cpu->gpr[0]; psx_taken_BFC07B90 = (psx_brA_BFC07B90 == psx_brB_BFC07B90); psx_delay_BFC07B90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC07B94: AE30000C sw $s0, 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, 0xBFC07B94u); return; } g_debug_last_store_pc = 0xBFC07B94u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAE30000Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B94u); #endif if (psx_delay_BFC07B90) { psx_delay_BFC07B90 = 0; if (psx_taken_BFC07B90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07AB0u); goto label_BFC07AB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07B98u); } 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 /* 0xBFC07B98: 8E430004 lw $v1, 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, 0xBFC07B98u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07B9Cu); #endif /* 0xBFC07B9C: 8E420008 lw $v0, 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, 0xBFC07B9Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07B9Cu); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07BA4: 1462FFF0 bne $v1, $v0, 0xBFC07B68 */ uint32_t psx_brA_BFC07BA4 = cpu->gpr[3]; uint32_t psx_brB_BFC07BA4 = cpu->gpr[2]; psx_taken_BFC07BA4 = (psx_brA_BFC07BA4 != psx_brB_BFC07BA4); psx_delay_BFC07BA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07BA8: 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(0xBFC07BA8u); #endif if (psx_delay_BFC07BA4) { psx_delay_BFC07BA4 = 0; if (psx_taken_BFC07BA4) { #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, 0xBFC07BACu); } 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 /* 0xBFC07BAC: 8E22000C lw $v0, 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, 0xBFC07BACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E22000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07BB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC07BB4: 02028023 subu $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(0x02028023u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07BB4u); #endif label_BFC07BB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07BB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BB8u); #endif /* 0xBFC07BB8: 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, 0xBFC07BB8u); 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(0xBFC07BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BBCu); #endif /* 0xBFC07BBC: 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, 0xBFC07BBCu); 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(0xBFC07BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BC0u); #endif /* 0xBFC07BC0: 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, 0xBFC07BC0u); 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(0xBFC07BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BC4u); #endif /* 0xBFC07BC4: 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, 0xBFC07BC4u); 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(0xBFC07BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BC8u); #endif /* 0xBFC07BC8: 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, 0xBFC07BC8u); 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(0xBFC07BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BCCu); #endif /* 0xBFC07BCC: 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, 0xBFC07BCCu); 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(0xBFC07BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC07BD0: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BD4u); #endif /* 0xBFC07BD4: 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, 0xBFC07BD4u); 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(0xBFC07BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07BD8: 03E00008 jr $ra */ psx_delay_BFC07BD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07BDC: 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(0xBFC07BDCu); #endif if (psx_delay_BFC07BD8) { psx_delay_BFC07BD8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07BE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07BE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BE0u); #endif /* 0xBFC07BE0: 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, 0xBFC07BE0u); 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(0xBFC07BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07BE4: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC07BE8: 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(0xBFC07BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07BEC: 1040FFB7 beq $v0, $zero, 0xBFC07ACC */ uint32_t psx_brA_BFC07BEC = cpu->gpr[2]; uint32_t psx_brB_BFC07BEC = cpu->gpr[0]; psx_taken_BFC07BEC = (psx_brA_BFC07BEC == psx_brB_BFC07BEC); psx_delay_BFC07BEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07BF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07BF0u); #endif if (psx_delay_BFC07BEC) { psx_delay_BFC07BEC = 0; if (psx_taken_BFC07BEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07ACCu); goto label_BFC07ACC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07BF4u); } label_BFC07BF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07BF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC07BF4: 3C130001 lui $s3, 0x1 */ cpu->gpr[19] = 0x00010000u; PGXP_ALU(0x3C130001u, cpu->gpr[19], 0u, 0u); #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, 0x40001u); #endif /* 0xBFC07BF8: 241200C0 addiu $s2, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241200C0u, cpu->gpr[18], _pgx1, 0x000000C0u); } #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, 0x100000u); #endif /* 0xBFC07BFC: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 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, 0x200000u); #endif /* 0xBFC07C00: 3C150001 lui $s5, 0x1 */ cpu->gpr[21] = 0x00010000u; PGXP_ALU(0x3C150001u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07C00u); #endif label_BFC07C04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC07C04: 1A00FFEC blez $s0, 0xBFC07BB8 */ uint32_t psx_brA_BFC07C04 = cpu->gpr[16]; psx_taken_BFC07C04 = ((int32_t)psx_brA_BFC07C04 <= 0); psx_delay_BFC07C04 = 1; #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 if (psx_delay_BFC07C04) { psx_delay_BFC07C04 = 0; if (psx_taken_BFC07C04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07BB8u); goto label_BFC07BB8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C0Cu); } 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: 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, 0xBFC07C0Cu); 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(0xBFC07C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C10: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC07C14: 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(0xBFC07C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC07C18: AE230008 sw $v1, 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, 0xBFC07C18u); return; } g_debug_last_store_pc = 0xBFC07C18u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE230008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C1Cu); #endif /* 0xBFC07C1C: 80500000 lb $s0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[16] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 16, 0x4u); PGXP_LOAD(0x80500000u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C1Cu); #endif label_BFC07C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C20u); #endif /* 0xBFC07C20: 8E62AF40 lw $v0, -20672($s3) */ { uint32_t _pgxa = cpu->gpr[19] + -20672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (-20672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C20u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } PGXP_LOAD(0x8E62AF40u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC07C24: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC07C28: 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(0xBFC07C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07C2C: 14400015 bne $v0, $zero, 0xBFC07C84 */ uint32_t psx_brA_BFC07C2C = cpu->gpr[2]; uint32_t psx_brB_BFC07C2C = cpu->gpr[0]; psx_taken_BFC07C2C = (psx_brA_BFC07C2C != psx_brB_BFC07C2C); psx_delay_BFC07C2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07C30: 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(0xBFC07C30u); #endif if (psx_delay_BFC07C2C) { psx_delay_BFC07C2C = 0; if (psx_taken_BFC07C2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C84u); goto label_BFC07C84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C34u); } label_BFC07C34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C34u); #endif /* 0xBFC07C34: 8E83B050 lw $v1, -20400($s4) */ { uint32_t _pgxa = cpu->gpr[20] + -20400; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (-20400)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C34u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100000u); } PGXP_LOAD(0x8E83B050u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC07C38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C3Cu); #endif /* 0xBFC07C3C: 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(0xBFC07C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C40: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC07C44: 30420008 andi $v0, $v0, 0x8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u; PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); } #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, 0x5u); #endif /* 0xBFC07C48: 10400012 beq $v0, $zero, 0xBFC07C94 */ uint32_t psx_brA_BFC07C48 = cpu->gpr[2]; uint32_t psx_brB_BFC07C48 = cpu->gpr[0]; psx_taken_BFC07C48 = (psx_brA_BFC07C48 == psx_brB_BFC07C48); psx_delay_BFC07C48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07C4C: 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(0xBFC07C4Cu); #endif if (psx_delay_BFC07C48) { psx_delay_BFC07C48 = 0; if (psx_taken_BFC07C48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C94u); goto label_BFC07C94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C50u); } label_BFC07C50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC07C50: A0700002 sb $s0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07C50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[16] & 0xFFu)); PGXP_STORE(0xA0700002u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C54u); #endif /* 0xBFC07C54: 8EA3B04C lw $v1, -20404($s5) */ { uint32_t _pgxa = cpu->gpr[21] + -20404; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (-20404)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07C54u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x200000u); } PGXP_LOAD(0x8EA3B04Cu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC07C58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C5Cu); #endif /* 0xBFC07C5C: 90620002 lbu $v0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (2)), 2, 0x8u); PGXP_LOAD(0x90620002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C60: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07C64: 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(0xBFC07C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07C68: A0620002 sb $v0, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC07C68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (2)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0620002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C6Cu); #endif /* 0xBFC07C6C: 8E30000C lw $s0, 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, 0xBFC07C6Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000u); } PGXP_LOAD(0x8E30000Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07C70: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C74u); #endif /* 0xBFC07C74: 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(0xBFC07C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC07C78: 2602FFFF addiu $v0, $s0, -1 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[16] + (-1)); PGXP_ALU(0x2602FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } #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, 0x1u); #endif /* 0xBFC07C7C: 1000FFE1 beq $zero, $zero, 0xBFC07C04 */ uint32_t psx_brA_BFC07C7C = cpu->gpr[0]; uint32_t psx_brB_BFC07C7C = cpu->gpr[0]; psx_taken_BFC07C7C = (psx_brA_BFC07C7C == psx_brB_BFC07C7C); psx_delay_BFC07C7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC07C80: AE22000C sw $v0, 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, 0xBFC07C80u); return; } g_debug_last_store_pc = 0xBFC07C80u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE22000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07C80u); #endif if (psx_delay_BFC07C7C) { psx_delay_BFC07C7C = 0; if (psx_taken_BFC07C7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C04u); goto label_BFC07C04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C84u); } label_BFC07C84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC07C84: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC07C8Cu; /* jalr link before delay slot */ psx_delay_BFC07C84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C88u); #endif if (psx_delay_BFC07C84) { psx_delay_BFC07C84 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC07C8Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07C8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C8C: 1000FFE4 beq $zero, $zero, 0xBFC07C20 */ uint32_t psx_brA_BFC07C8C = cpu->gpr[0]; uint32_t psx_brB_BFC07C8C = cpu->gpr[0]; psx_taken_BFC07C8C = (psx_brA_BFC07C8C == psx_brB_BFC07C8C); psx_delay_BFC07C8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C90u); #endif if (psx_delay_BFC07C8C) { psx_delay_BFC07C8C = 0; if (psx_taken_BFC07C8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C20u); goto label_BFC07C20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C94u); } label_BFC07C94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80040000u); #endif /* 0xBFC07C94: 0240F809 jalr $ra, $s2 */ cpu->gpr[31] = 0xBFC07C9Cu; /* jalr link before delay slot */ psx_delay_BFC07C94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07C98u); #endif if (psx_delay_BFC07C94) { psx_delay_BFC07C94 = 0; { uint32_t _t = cpu->gpr[18]; cpu->gpr[31] = 0xBFC07C9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07C9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07C9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07C9C: 1000FFE5 beq $zero, $zero, 0xBFC07C34 */ uint32_t psx_brA_BFC07C9C = cpu->gpr[0]; uint32_t psx_brB_BFC07C9C = cpu->gpr[0]; psx_taken_BFC07C9C = (psx_brA_BFC07C9C == psx_brB_BFC07C9C); psx_delay_BFC07C9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07CA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07CA0u); #endif if (psx_delay_BFC07C9C) { psx_delay_BFC07C9C = 0; if (psx_taken_BFC07C9C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07C34u); goto label_BFC07C34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CA4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CA4u); cpu->pc = 0xBFC07CA4u; return; /* fallthrough */ } void OpenBIOS_func_1FC07CA4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07CA4u); int psx_delay_BFC07CA8 = 0; int psx_taken_BFC07CA8 = 0; int psx_delay_BFC07CB0 = 0; int psx_taken_BFC07CB0 = 0; int psx_delay_BFC07CBC = 0; int psx_taken_BFC07CBC = 0; int psx_delay_BFC07CDC = 0; int psx_delay_BFC07CEC = 0; int psx_taken_BFC07CEC = 0; int psx_delay_BFC07D04 = 0; int psx_delay_BFC07D10 = 0; int psx_taken_BFC07D10 = 0; int psx_delay_BFC07D20 = 0; int psx_delay_BFC07D2C = 0; int psx_taken_BFC07D2C = 0; int psx_delay_BFC07D34 = 0; int psx_delay_BFC07D3C = 0; int psx_delay_BFC07D44 = 0; int psx_taken_BFC07D44 = 0; int psx_delay_BFC07D50 = 0; int psx_taken_BFC07D50 = 0; int psx_delay_BFC07D60 = 0; int psx_delay_BFC07D70 = 0; int psx_delay_BFC07D8C = 0; int psx_taken_BFC07D8C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07CB0u: goto label_BFC07CB0; case 0xBFC07CB8u: goto label_BFC07CB8; case 0xBFC07CC4u: goto label_BFC07CC4; case 0xBFC07CDCu: goto label_BFC07CDC; case 0xBFC07CE4u: goto label_BFC07CE4; case 0xBFC07CF4u: goto label_BFC07CF4; case 0xBFC07D0Cu: goto label_BFC07D0C; case 0xBFC07D18u: goto label_BFC07D18; case 0xBFC07D28u: goto label_BFC07D28; case 0xBFC07D34u: goto label_BFC07D34; case 0xBFC07D3Cu: goto label_BFC07D3C; case 0xBFC07D44u: goto label_BFC07D44; case 0xBFC07D4Cu: goto label_BFC07D4C; case 0xBFC07D58u: goto label_BFC07D58; case 0xBFC07D60u: goto label_BFC07D60; case 0xBFC07D68u: goto label_BFC07D68; case 0xBFC07D78u: goto label_BFC07D78; default: break; } } label_BFC07CA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC07CA4: 24087402 addiu $t0, $zero, 29698 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (29698)); PGXP_ALU(0x24087402u, cpu->gpr[8], _pgx1, 0x00007402u); } #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, 0x120u); #endif /* 0xBFC07CA8: 10A80033 beq $a1, $t0, 0xBFC07D78 */ uint32_t psx_brA_BFC07CA8 = cpu->gpr[5]; uint32_t psx_brB_BFC07CA8 = cpu->gpr[8]; psx_taken_BFC07CA8 = (psx_brA_BFC07CA8 == psx_brB_BFC07CA8); psx_delay_BFC07CA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC07CAC: 28A87403 slti $t0, $a1, 29699 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[5] < (29699) ? 1 : 0); PGXP_ALU(0x28A87403u, cpu->gpr[8], _pgx1, 0x7403u); } #ifdef PSX_COSIM cosim_instr(0xBFC07CACu); #endif if (psx_delay_BFC07CA8) { psx_delay_BFC07CA8 = 0; if (psx_taken_BFC07CA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D78u); goto label_BFC07D78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CB0u); } label_BFC07CB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC07CB0: 1100001D beq $t0, $zero, 0xBFC07D28 */ uint32_t psx_brA_BFC07CB0 = cpu->gpr[8]; uint32_t psx_brB_BFC07CB0 = cpu->gpr[0]; psx_taken_BFC07CB0 = (psx_brA_BFC07CB0 == psx_brB_BFC07CB0); psx_delay_BFC07CB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC07CB4: 00803825 or $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(0x00803825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07CB4u); #endif if (psx_delay_BFC07CB0) { psx_delay_BFC07CB0 = 0; if (psx_taken_BFC07CB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D28u); goto label_BFC07D28; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CB8u); } label_BFC07CB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07CB8: 24046602 addiu $a0, $zero, 26114 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (26114)); PGXP_ALU(0x24046602u, cpu->gpr[4], _pgx1, 0x00006602u); } #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, 0x30u); #endif /* 0xBFC07CBC: 14A40013 bne $a1, $a0, 0xBFC07D0C */ uint32_t psx_brA_BFC07CBC = cpu->gpr[5]; uint32_t psx_brB_BFC07CBC = cpu->gpr[4]; psx_taken_BFC07CBC = (psx_brA_BFC07CBC != psx_brB_BFC07CBC); psx_delay_BFC07CBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07CC0: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07CC0u); #endif if (psx_delay_BFC07CBC) { psx_delay_BFC07CBC = 0; if (psx_taken_BFC07CBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D0Cu); goto label_BFC07D0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CC4u); } label_BFC07CC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07CC4: 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(0xBFC07CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC07CC8: 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, 0xBFC07CC8u); return; } g_debug_last_store_pc = 0xBFC07CC8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC07CCC: 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, 0xBFC07CCCu); return; } g_debug_last_store_pc = 0xBFC07CCCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #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, 0xA0000000u); #endif /* 0xBFC07CD0: 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, 0xBFC07CD0u); return; } g_debug_last_store_pc = 0xBFC07CD0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x10001u); #endif /* 0xBFC07CD4: 241000C0 addiu $s0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x241000C0u, cpu->gpr[16], _pgx1, 0x000000C0u); } #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, 0x20004u); #endif /* 0xBFC07CD8: 2451AF40 addiu $s1, $v0, -20672 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[2] + (-20672)); PGXP_ALU(0x2451AF40u, cpu->gpr[17], _pgx1, 0xFFFFAF40u); } #ifdef PSX_COSIM cosim_instr(0xBFC07CD8u); #endif label_BFC07CDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07CDC: 0FF01E89 jal 0xBFC07A24 */ cpu->gpr[31] = 0xBFC07CE4u; /* jal link before delay slot */ psx_delay_BFC07CDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07CE0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07CE0u); #endif if (psx_delay_BFC07CDC) { psx_delay_BFC07CDC = 0; cpu->gpr[31] = 0xBFC07CE4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07A24u); cpu->pc = 0xBFC07A24u; return; } label_BFC07CE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC07CE4: 00022E00 sll $a1, $v0, 24 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[2] << 24u; PGXP_ALU(0x00022E00u, cpu->gpr[5], _pgx1, 24u); } #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, 0x20u); #endif /* 0xBFC07CE8: 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(0xBFC07CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07CEC: 14A00013 bne $a1, $zero, 0xBFC07D3C */ uint32_t psx_brA_BFC07CEC = cpu->gpr[5]; uint32_t psx_brB_BFC07CEC = cpu->gpr[0]; psx_taken_BFC07CEC = (psx_brA_BFC07CEC != psx_brB_BFC07CEC); psx_delay_BFC07CEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07CF0: 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(0xBFC07CF0u); #endif if (psx_delay_BFC07CEC) { psx_delay_BFC07CEC = 0; if (psx_taken_BFC07CEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D3Cu); goto label_BFC07D3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CF4u); } label_BFC07CF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07CF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CF4u); #endif /* 0xBFC07CF4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07CF4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC07CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CF8u); #endif /* 0xBFC07CF8: 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, 0xBFC07CF8u); 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(0xBFC07CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07CFCu); #endif /* 0xBFC07CFC: 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, 0xBFC07CFCu); 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(0xBFC07CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07D00: 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(0xBFC07D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07D04: 03E00008 jr $ra */ psx_delay_BFC07D04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07D08: 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(0xBFC07D08u); #endif if (psx_delay_BFC07D04) { psx_delay_BFC07D04 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07D0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC07D0C: 24047401 addiu $a0, $zero, 29697 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (29697)); PGXP_ALU(0x24047401u, cpu->gpr[4], _pgx1, 0x00007401u); } #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, 0x30u); #endif /* 0xBFC07D10: 10A4000E beq $a1, $a0, 0xBFC07D4C */ uint32_t psx_brA_BFC07D10 = cpu->gpr[5]; uint32_t psx_brB_BFC07D10 = cpu->gpr[4]; psx_taken_BFC07D10 = (psx_brA_BFC07D10 == psx_brB_BFC07D10); psx_delay_BFC07D10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07D14: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07D14u); #endif if (psx_delay_BFC07D10) { psx_delay_BFC07D10 = 0; if (psx_taken_BFC07D10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D4Cu); goto label_BFC07D4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D18u); } label_BFC07D18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07D18: 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(0xBFC07D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC07D1C: ACE20018 sw $v0, 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, 0xBFC07D1Cu); return; } g_debug_last_store_pc = 0xBFC07D1Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20018u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC07D20: 03E00008 jr $ra */ psx_delay_BFC07D20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07D24: 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(0xBFC07D24u); #endif if (psx_delay_BFC07D20) { psx_delay_BFC07D20 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07D28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07D28: 24027403 addiu $v0, $zero, 29699 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (29699)); PGXP_ALU(0x24027403u, cpu->gpr[2], _pgx1, 0x00007403u); } #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, 0x24u); #endif /* 0xBFC07D2C: 14A2FFFA bne $a1, $v0, 0xBFC07D18 */ uint32_t psx_brA_BFC07D2C = cpu->gpr[5]; uint32_t psx_brB_BFC07D2C = cpu->gpr[2]; psx_taken_BFC07D2C = (psx_brA_BFC07D2C != psx_brB_BFC07D2C); psx_delay_BFC07D2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07D30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07D30u); #endif if (psx_delay_BFC07D2C) { psx_delay_BFC07D2C = 0; if (psx_taken_BFC07D2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D18u); goto label_BFC07D18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D34u); } label_BFC07D34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC07D34: 0BF01E72 j 0xBFC079C8 */ psx_delay_BFC07D34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07D38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07D38u); #endif if (psx_delay_BFC07D34) { psx_delay_BFC07D34 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC079C8u); cpu->pc = 0xBFC079C8u; return; } label_BFC07D3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC07D3C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0xBFC07D44u; /* jalr link before delay slot */ psx_delay_BFC07D3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC07D40: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07D40u); #endif if (psx_delay_BFC07D3C) { psx_delay_BFC07D3C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0xBFC07D44u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07D44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07D44: 1000FFE5 beq $zero, $zero, 0xBFC07CDC */ uint32_t psx_brA_BFC07D44 = cpu->gpr[0]; uint32_t psx_brB_BFC07D44 = cpu->gpr[0]; psx_taken_BFC07D44 = (psx_brA_BFC07D44 == psx_brB_BFC07D44); psx_delay_BFC07D44 = 1; #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 if (psx_delay_BFC07D44) { psx_delay_BFC07D44 = 0; if (psx_taken_BFC07D44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07CDCu); goto label_BFC07CDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D4Cu); } label_BFC07D4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D4Cu); #endif /* 0xBFC07D4C: 8C83AF40 lw $v1, -20672($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -20672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D4Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C83AF40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC07D50: 10C00005 beq $a2, $zero, 0xBFC07D68 */ uint32_t psx_brA_BFC07D50 = cpu->gpr[6]; uint32_t psx_brB_BFC07D50 = cpu->gpr[0]; psx_taken_BFC07D50 = (psx_brA_BFC07D50 == psx_brB_BFC07D50); psx_delay_BFC07D50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC07D54: 00C01025 or $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(0x00C01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07D54u); #endif if (psx_delay_BFC07D50) { psx_delay_BFC07D50 = 0; if (psx_taken_BFC07D50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D68u); goto label_BFC07D68; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D58u); } label_BFC07D58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07D58: 34630001 ori $v1, $v1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1u; PGXP_ALU(0x34630001u, cpu->gpr[3], _pgx1, 0x0001u); } #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, 0x18u); #endif /* 0xBFC07D5C: AC83AF40 sw $v1, -20672($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -20672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D5Cu); return; } g_debug_last_store_pc = 0xBFC07D5Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC83AF40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07D5Cu); #endif label_BFC07D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07D60: 03E00008 jr $ra */ psx_delay_BFC07D60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07D64: 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(0xBFC07D64u); #endif if (psx_delay_BFC07D60) { psx_delay_BFC07D60 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07D68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07D68: 2405FFFE addiu $a1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2405FFFEu, cpu->gpr[5], _pgx1, 0xFFFFFFFEu); } #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, 0x28u); #endif /* 0xBFC07D6C: 00651824 and $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5]; PGXP_ALU(0x00651824u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x80000001u); #endif /* 0xBFC07D70: 03E00008 jr $ra */ psx_delay_BFC07D70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC07D74: AC83AF40 sw $v1, -20672($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -20672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07D74u); return; } g_debug_last_store_pc = 0xBFC07D74u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC83AF40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07D74u); #endif if (psx_delay_BFC07D70) { psx_delay_BFC07D70 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07D78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07D78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07D78: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 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, 0x8u); #endif /* 0xBFC07D7C: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #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, 0x4u); #endif /* 0xBFC07D80: 2442AF40 addiu $v0, $v0, -20672 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20672)); PGXP_ALU(0x2442AF40u, cpu->gpr[2], _pgx1, 0xFFFFAF40u); } #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, 0x8u); #endif /* 0xBFC07D84: 2463AF4C addiu $v1, $v1, -20660 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-20660)); PGXP_ALU(0x2463AF4Cu, cpu->gpr[3], _pgx1, 0xFFFFAF4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC07D88: 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, 0xBFC07D88u); return; } g_debug_last_store_pc = 0xBFC07D88u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC07D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07D8C: 1000FFF4 beq $zero, $zero, 0xBFC07D60 */ uint32_t psx_brA_BFC07D8C = cpu->gpr[0]; 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, 0xCu); #endif /* 0xBFC07D90: 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, 0xBFC07D90u); return; } g_debug_last_store_pc = 0xBFC07D90u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #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, 0xBFC07D60u); goto label_BFC07D60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D94u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07D94u); cpu->pc = 0xBFC07D94u; return; /* fallthrough */ } void OpenBIOS_func_1FC07D94(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07D94u); int psx_delay_BFC07DA0 = 0; 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, 0x201u); #endif /* 0xBFC07D94: 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(0xBFC07D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07D98: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07D9C: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07DA0: 03200008 jr $t9 */ psx_delay_BFC07DA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07DA4: 2484A3D0 addiu $a0, $a0, -23600 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23600)); PGXP_ALU(0x2484A3D0u, cpu->gpr[4], _pgx1, 0xFFFFA3D0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07DA4u); #endif if (psx_delay_BFC07DA0) { psx_delay_BFC07DA0 = 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 OpenBIOS_func_1FC07DA8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07DA8u); int psx_delay_BFC07DB4 = 0; 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, 0x201u); #endif /* 0xBFC07DA8: 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(0xBFC07DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07DAC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07DB0: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07DB4: 03200008 jr $t9 */ psx_delay_BFC07DB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07DB8: 2484A380 addiu $a0, $a0, -23680 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-23680)); PGXP_ALU(0x2484A380u, cpu->gpr[4], _pgx1, 0xFFFFA380u); } #ifdef PSX_COSIM cosim_instr(0xBFC07DB8u); #endif if (psx_delay_BFC07DB4) { psx_delay_BFC07DB4 = 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 OpenBIOS_func_1FC07DBC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07DBCu); int psx_delay_BFC07DEC = 0; int psx_taken_BFC07DEC = 0; int psx_delay_BFC07DF4 = 0; int psx_delay_BFC07E00 = 0; int psx_taken_BFC07E00 = 0; int psx_delay_BFC07E18 = 0; int psx_taken_BFC07E18 = 0; int psx_delay_BFC07E20 = 0; int psx_taken_BFC07E20 = 0; int psx_delay_BFC07E28 = 0; int psx_taken_BFC07E28 = 0; int psx_delay_BFC07E6C = 0; int psx_taken_BFC07E6C = 0; int psx_delay_BFC07E74 = 0; int psx_taken_BFC07E74 = 0; int psx_delay_BFC07E7C = 0; int psx_taken_BFC07E7C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07DECu: goto label_BFC07DEC; case 0xBFC07DF4u: goto label_BFC07DF4; case 0xBFC07DFCu: goto label_BFC07DFC; case 0xBFC07E08u: goto label_BFC07E08; case 0xBFC07E14u: goto label_BFC07E14; case 0xBFC07E20u: goto label_BFC07E20; case 0xBFC07E28u: goto label_BFC07E28; case 0xBFC07E30u: goto label_BFC07E30; case 0xBFC07E34u: goto label_BFC07E34; case 0xBFC07E74u: goto label_BFC07E74; case 0xBFC07E7Cu: goto label_BFC07E7C; default: break; } } label_BFC07DBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07DBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07DBC: 3C025810 lui $v0, 0x5810 */ cpu->gpr[2] = 0x58100000u; PGXP_ALU(0x3C025810u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC07DC0: 3C0927D4 lui $t1, 0x27D4 */ cpu->gpr[9] = 0x27D40000u; PGXP_ALU(0x3C0927D4u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC07DC4: 3C0AB503 lui $t2, 0xB503 */ cpu->gpr[10] = 0xB5030000u; PGXP_ALU(0x3C0AB503u, cpu->gpr[10], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC07DC8: 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(0xBFC07DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07DCC: 3442D659 ori $v0, $v0, 0xD659 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0xD659u; PGXP_ALU(0x3442D659u, cpu->gpr[2], _pgx1, 0xD659u); } #ifdef PSX_COSIM cosim_instr(0xBFC07DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC07DD0: 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(0xBFC07DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC07DD4: 240C0002 addiu $t4, $zero, 2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); PGXP_ALU(0x240C0002u, cpu->gpr[12], _pgx1, 0x00000002u); } #ifdef PSX_COSIM cosim_instr(0xBFC07DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC07DD8: 3C0DFC00 lui $t5, 0xFC00 */ cpu->gpr[13] = 0xFC000000u; PGXP_ALU(0x3C0DFC00u, cpu->gpr[13], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC07DDC: 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(0xBFC07DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000u); #endif /* 0xBFC07DE0: 3C0FFFFF lui $t7, 0xFFFF */ cpu->gpr[15] = 0xFFFF0000u; PGXP_ALU(0x3C0FFFFFu, cpu->gpr[15], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC07DE4: 3529EB2F ori $t1, $t1, 0xEB2F */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] | 0xEB2Fu; PGXP_ALU(0x3529EB2Fu, cpu->gpr[9], _pgx1, 0xEB2Fu); } #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, 0x400u); #endif /* 0xBFC07DE8: 254A198F addiu $t2, $t2, 6543 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (6543)); PGXP_ALU(0x254A198Fu, cpu->gpr[10], _pgx1, 0x0000198Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC07DE8u); #endif label_BFC07DEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07DECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC07DEC: 14C00003 bne $a2, $zero, 0xBFC07DFC */ uint32_t psx_brA_BFC07DEC = cpu->gpr[6]; uint32_t psx_brB_BFC07DEC = cpu->gpr[0]; psx_taken_BFC07DEC = (psx_brA_BFC07DEC != psx_brB_BFC07DEC); psx_delay_BFC07DEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07DF0: 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(0xBFC07DF0u); #endif if (psx_delay_BFC07DEC) { psx_delay_BFC07DEC = 0; if (psx_taken_BFC07DEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07DFCu); goto label_BFC07DFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07DF4u); } label_BFC07DF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07DF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC07DF4: 03E00008 jr $ra */ psx_delay_BFC07DF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07DF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07DF8u); #endif if (psx_delay_BFC07DF4) { psx_delay_BFC07DF4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC07DFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07DFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07DFCu); #endif /* 0xBFC07DFC: 8C87FFFC 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, 0xBFC07DFCu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } PGXP_LOAD(0x8C87FFFCu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC07DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC07E00: 146B0004 bne $v1, $t3, 0xBFC07E14 */ uint32_t psx_brA_BFC07E00 = cpu->gpr[3]; uint32_t psx_brB_BFC07E00 = cpu->gpr[11]; 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, 0x40u); #endif /* 0xBFC07E04: 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(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, 0xBFC07E14u); goto label_BFC07E14; } #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 /* 0xBFC07E08: 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(0xBFC07E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07E0C: 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(0xBFC07E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC07E10: 34630100 ori $v1, $v1, 0x100 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x100u; PGXP_ALU(0x34630100u, cpu->gpr[3], _pgx1, 0x0100u); } #ifdef PSX_COSIM cosim_instr(0xBFC07E10u); #endif 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, 0x108u); #endif /* 0xBFC07E14: 30680003 andi $t0, $v1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[3] & 0x3u; PGXP_ALU(0x30680003u, cpu->gpr[8], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0xBFC07E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1100u); #endif /* 0xBFC07E18: 110C0016 beq $t0, $t4, 0xBFC07E74 */ uint32_t psx_brA_BFC07E18 = cpu->gpr[8]; uint32_t psx_brB_BFC07E18 = cpu->gpr[12]; psx_taken_BFC07E18 = (psx_brA_BFC07E18 == psx_brB_BFC07E18); psx_delay_BFC07E18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07E1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07E1Cu); #endif if (psx_delay_BFC07E18) { psx_delay_BFC07E18 = 0; if (psx_taken_BFC07E18) { #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, 0xBFC07E20u); } label_BFC07E20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07E20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4100u); #endif /* 0xBFC07E20: 110E0016 beq $t0, $t6, 0xBFC07E7C */ uint32_t psx_brA_BFC07E20 = cpu->gpr[8]; uint32_t psx_brB_BFC07E20 = cpu->gpr[14]; psx_taken_BFC07E20 = (psx_brA_BFC07E20 == psx_brB_BFC07E20); psx_delay_BFC07E20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07E24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07E24u); #endif if (psx_delay_BFC07E20) { psx_delay_BFC07E20 = 0; if (psx_taken_BFC07E20) { #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, 0xBFC07E28u); } label_BFC07E28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07E28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x900u); #endif /* 0xBFC07E28: 150B0002 bne $t0, $t3, 0xBFC07E34 */ uint32_t psx_brA_BFC07E28 = cpu->gpr[8]; uint32_t psx_brB_BFC07E28 = cpu->gpr[11]; psx_taken_BFC07E28 = (psx_brA_BFC07E28 != psx_brB_BFC07E28); psx_delay_BFC07E28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07E2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07E2Cu); #endif if (psx_delay_BFC07E28) { psx_delay_BFC07E28 = 0; if (psx_taken_BFC07E28) { #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, 0xBFC07E30u); } label_BFC07E30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07E30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8080u); #endif /* 0xBFC07E30: 00EF3824 and $a3, $a3, $t7 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[15]; PGXP_ALU(0x00EF3824u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07E30u); #endif 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, 0x180u); #endif /* 0xBFC07E34: 00074402 srl $t0, $a3, 16 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] >> 16u; PGXP_ALU(0x00074402u, cpu->gpr[8], _pgx1, 16u); } #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, 0x180u); #endif /* 0xBFC07E38: 01074026 xor $t0, $t0, $a3 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[8] ^ cpu->gpr[7]; PGXP_ALU(0x01074026u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC07E3C: 3908003D xori $t0, $t0, 0x3D */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] ^ 0x3Du; PGXP_ALU(0x3908003Du, cpu->gpr[8], _pgx1, 0x003Du); } #ifdef PSX_COSIM cosim_instr(0xBFC07E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC07E40: 000838C0 sll $a3, $t0, 3 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[8] << 3u; PGXP_ALU(0x000838C0u, cpu->gpr[7], _pgx1, 3u); } #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, 0x180u); #endif /* 0xBFC07E44: 00E83821 addu $a3, $a3, $t0 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[8]; PGXP_ALU(0x00E83821u, cpu->gpr[7], _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, 0x180u); #endif /* 0xBFC07E48: 00074102 srl $t0, $a3, 4 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] >> 4u; PGXP_ALU(0x00074102u, cpu->gpr[8], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0xBFC07E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC07E4C: 00E83826 xor $a3, $a3, $t0 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8]; PGXP_ALU(0x00E83826u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x280u); #endif /* 0xBFC07E50: 00E90018 mult $a3, $t1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[9]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E90018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[9]); #ifdef PSX_COSIM cosim_instr(0xBFC07E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC07E54: 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(0xBFC07E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC07E58: 000743C2 srl $t0, $a3, 15 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[7] >> 15u; PGXP_ALU(0x000743C2u, cpu->gpr[8], _pgx1, 15u); } #ifdef PSX_COSIM cosim_instr(0xBFC07E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC07E5C: 00E83826 xor $a3, $a3, $t0 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = cpu->gpr[7] ^ cpu->gpr[8]; PGXP_ALU(0x00E83826u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC07E60: 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(0xBFC07E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480u); #endif /* 0xBFC07E64: 00EA0018 mult $a3, $t2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[10]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00EA0018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[10]); #ifdef PSX_COSIM cosim_instr(0xBFC07E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07E68: 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(0xBFC07E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07E6C: 1000FFDF beq $zero, $zero, 0xBFC07DEC */ 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, 0x8u); #endif /* 0xBFC07E70: 00031882 srl $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 2u; PGXP_ALU(0x00031882u, cpu->gpr[3], _pgx1, 2u); } #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, 0xBFC07DECu); goto label_BFC07DEC; } #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, 0x1u); #endif /* 0xBFC07E74: 1000FFEF beq $zero, $zero, 0xBFC07E34 */ uint32_t psx_brA_BFC07E74 = cpu->gpr[0]; uint32_t psx_brB_BFC07E74 = cpu->gpr[0]; psx_taken_BFC07E74 = (psx_brA_BFC07E74 == psx_brB_BFC07E74); psx_delay_BFC07E74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2080u); #endif /* 0xBFC07E78: 00ED3824 and $a3, $a3, $t5 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[7] = cpu->gpr[7] & cpu->gpr[13]; PGXP_ALU(0x00ED3824u, cpu->gpr[7], _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, 0xBFC07E34u); goto label_BFC07E34; } #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, 0x1u); #endif /* 0xBFC07E7C: 1000FFED beq $zero, $zero, 0xBFC07E34 */ uint32_t psx_brA_BFC07E7C = cpu->gpr[0]; uint32_t psx_brB_BFC07E7C = cpu->gpr[0]; psx_taken_BFC07E7C = (psx_brA_BFC07E7C == psx_brB_BFC07E7C); psx_delay_BFC07E7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC07E80: 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(0xBFC07E80u); #endif if (psx_delay_BFC07E7C) { psx_delay_BFC07E7C = 0; if (psx_taken_BFC07E7C) { #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, 0xBFC07E84u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07E84u); cpu->pc = 0xBFC07E84u; return; /* fallthrough */ } void OpenBIOS_func_1FC07E84(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC07E84u); int psx_delay_BFC07E8C = 0; int psx_taken_BFC07E8C = 0; int psx_delay_BFC07E9C = 0; int psx_taken_BFC07E9C = 0; int psx_delay_BFC07EAC = 0; int psx_taken_BFC07EAC = 0; int psx_delay_BFC07ECC = 0; int psx_taken_BFC07ECC = 0; int psx_delay_BFC07ED8 = 0; int psx_taken_BFC07ED8 = 0; int psx_delay_BFC07EF0 = 0; int psx_delay_BFC07F04 = 0; int psx_taken_BFC07F04 = 0; int psx_delay_BFC07F18 = 0; int psx_delay_BFC07F2C = 0; int psx_taken_BFC07F2C = 0; int psx_delay_BFC07F54 = 0; int psx_delay_BFC07F70 = 0; int psx_taken_BFC07F70 = 0; int psx_delay_BFC07F8C = 0; int psx_taken_BFC07F8C = 0; int psx_delay_BFC07F9C = 0; int psx_taken_BFC07F9C = 0; int psx_delay_BFC07FB0 = 0; int psx_delay_BFC07FC0 = 0; int psx_delay_BFC07FCC = 0; int psx_taken_BFC07FCC = 0; int psx_delay_BFC07FD4 = 0; int psx_taken_BFC07FD4 = 0; int psx_delay_BFC08000 = 0; int psx_delay_BFC0800C = 0; int psx_taken_BFC0800C = 0; int psx_delay_BFC08018 = 0; int psx_delay_BFC08030 = 0; int psx_taken_BFC08030 = 0; int psx_delay_BFC08050 = 0; int psx_delay_BFC08058 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC07E94u: goto label_BFC07E94; case 0xBFC07EA4u: goto label_BFC07EA4; case 0xBFC07EB4u: goto label_BFC07EB4; case 0xBFC07ED4u: goto label_BFC07ED4; case 0xBFC07EE0u: goto label_BFC07EE0; case 0xBFC07EECu: goto label_BFC07EEC; case 0xBFC07EF8u: goto label_BFC07EF8; case 0xBFC07F04u: goto label_BFC07F04; case 0xBFC07F0Cu: goto label_BFC07F0C; case 0xBFC07F20u: goto label_BFC07F20; case 0xBFC07F34u: goto label_BFC07F34; case 0xBFC07F5Cu: goto label_BFC07F5C; case 0xBFC07F78u: goto label_BFC07F78; case 0xBFC07F94u: goto label_BFC07F94; case 0xBFC07FA4u: goto label_BFC07FA4; case 0xBFC07FB8u: goto label_BFC07FB8; case 0xBFC07FC8u: goto label_BFC07FC8; case 0xBFC07FD4u: goto label_BFC07FD4; case 0xBFC07FDCu: goto label_BFC07FDC; case 0xBFC08008u: goto label_BFC08008; case 0xBFC0800Cu: goto label_BFC0800C; case 0xBFC08014u: goto label_BFC08014; case 0xBFC08020u: goto label_BFC08020; case 0xBFC08030u: goto label_BFC08030; case 0xBFC08038u: goto label_BFC08038; case 0xBFC08058u: goto label_BFC08058; default: break; } } label_BFC07E84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07E84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E84u); #endif /* 0xBFC07E84: 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, 0xBFC07E84u); 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(0xBFC07E84u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07E8C: 14400009 bne $v0, $zero, 0xBFC07EB4 */ uint32_t psx_brA_BFC07E8C = cpu->gpr[2]; uint32_t psx_brB_BFC07E8C = cpu->gpr[0]; 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, 0xBFC07EB4u); goto label_BFC07EB4; } #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 /* 0xBFC07E94: 8C820004 lw $v0, 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, 0xBFC07E94u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07E98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07E9C: 14400005 bne $v0, $zero, 0xBFC07EB4 */ uint32_t psx_brA_BFC07E9C = cpu->gpr[2]; uint32_t psx_brB_BFC07E9C = cpu->gpr[0]; psx_taken_BFC07E9C = (psx_brA_BFC07E9C != psx_brB_BFC07E9C); psx_delay_BFC07E9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07EA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07EA0u); #endif if (psx_delay_BFC07E9C) { psx_delay_BFC07E9C = 0; if (psx_taken_BFC07E9C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07EB4u); goto label_BFC07EB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07EA4u); } label_BFC07EA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07EA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EA4u); #endif /* 0xBFC07EA4: 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, 0xBFC07EA4u); 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(0xBFC07EA4u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07EAC: 1040006A beq $v0, $zero, 0xBFC08058 */ uint32_t psx_brA_BFC07EAC = cpu->gpr[2]; uint32_t psx_brB_BFC07EAC = cpu->gpr[0]; 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, 0xBFC08058u); goto label_BFC08058; } #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, 0x20000000u); #endif /* 0xBFC07EB4: 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(0xBFC07EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC07EB8: 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, 0xBFC07EB8u); return; } g_debug_last_store_pc = 0xBFC07EB8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC07EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC07EBC: 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, 0xBFC07EBCu); return; } g_debug_last_store_pc = 0xBFC07EBCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40030u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC07EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC07EC0: 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, 0xBFC07EC0u); return; } g_debug_last_store_pc = 0xBFC07EC0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3002Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC07EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC07EC4: 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, 0xBFC07EC4u); return; } g_debug_last_store_pc = 0xBFC07EC4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20028u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC07EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC07EC8: 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, 0xBFC07EC8u); return; } g_debug_last_store_pc = 0xBFC07EC8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10024u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC07EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07ECC: 10A00023 beq $a1, $zero, 0xBFC07F5C */ uint32_t psx_brA_BFC07ECC = cpu->gpr[5]; uint32_t psx_brB_BFC07ECC = cpu->gpr[0]; psx_taken_BFC07ECC = (psx_brA_BFC07ECC == psx_brB_BFC07ECC); psx_delay_BFC07ECC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC07ED0: 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, 0xBFC07ED0u); return; } g_debug_last_store_pc = 0xBFC07ED0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00020u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC07ED0u); #endif if (psx_delay_BFC07ECC) { psx_delay_BFC07ECC = 0; if (psx_taken_BFC07ECC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07F5Cu); goto label_BFC07F5C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07ED4u); } label_BFC07ED4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07ED4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07ED4: 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(0xBFC07ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC07ED8: 10A20027 beq $a1, $v0, 0xBFC07F78 */ uint32_t psx_brA_BFC07ED8 = cpu->gpr[5]; uint32_t psx_brB_BFC07ED8 = cpu->gpr[2]; 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, 0x40001u); #endif /* 0xBFC07EDC: 24120078 addiu $s2, $zero, 120 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); PGXP_ALU(0x24120078u, cpu->gpr[18], _pgx1, 0x00000078u); } #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, 0xBFC07F78u); goto label_BFC07F78; } #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, 0x80001u); #endif /* 0xBFC07EE0: 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(0xBFC07EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC07EE4: 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(0xBFC07EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC07EE8: 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(0xBFC07EE8u); #endif 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, 0x41u); #endif /* 0xBFC07EEC: 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(0xBFC07EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07EF0: 0FF01F6F jal 0xBFC07DBC */ cpu->gpr[31] = 0xBFC07EF8u; /* jal link before delay slot */ psx_delay_BFC07EF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC07EF4: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07EF4u); #endif if (psx_delay_BFC07EF0) { psx_delay_BFC07EF0 = 0; cpu->gpr[31] = 0xBFC07EF8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07DBCu); cpu->pc = 0xBFC07DBCu; return; } label_BFC07EF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07EF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC07EF8: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07EFC: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC07F00: 24549D2C addiu $s4, $v0, -25300 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[2] + (-25300)); PGXP_ALU(0x24549D2Cu, cpu->gpr[20], _pgx1, 0xFFFF9D2Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07F00u); #endif label_BFC07F04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07F04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC07F04: 16600023 bne $s3, $zero, 0xBFC07F94 */ uint32_t psx_brA_BFC07F04 = cpu->gpr[19]; uint32_t psx_brB_BFC07F04 = cpu->gpr[0]; psx_taken_BFC07F04 = (psx_brA_BFC07F04 != psx_brB_BFC07F04); psx_delay_BFC07F04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07F08: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F08u); #endif if (psx_delay_BFC07F04) { psx_delay_BFC07F04 = 0; if (psx_taken_BFC07F04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07F94u); goto label_BFC07F94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07F0Cu); } label_BFC07F0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07F0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC07F0C: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10081u); #endif /* 0xBFC07F10: 02003825 or $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(0x02003825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07F14: 24849D6C addiu $a0, $a0, -25236 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25236)); PGXP_ALU(0x24849D6Cu, cpu->gpr[4], _pgx1, 0xFFFF9D6Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC07F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC07F18: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC07F20u; /* jal link before delay slot */ psx_delay_BFC07F18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC07F1C: 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, 0xBFC07F1Cu); return; } g_debug_last_store_pc = 0xBFC07F1Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC07F1Cu); #endif if (psx_delay_BFC07F18) { psx_delay_BFC07F18 = 0; cpu->gpr[31] = 0xBFC07F20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } label_BFC07F20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07F20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC07F20: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F24u); #endif /* 0xBFC07F24: 8C424C70 lw $v0, 19568($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19568; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19568)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC07F24u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C70u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC07F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F28u); #endif /* 0xBFC07F28: 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, 0xBFC07F28u); 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(0xBFC07F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07F2C: 10400039 beq $v0, $zero, 0xBFC08014 */ uint32_t psx_brA_BFC07F2C = cpu->gpr[2]; uint32_t psx_brB_BFC07F2C = cpu->gpr[0]; psx_taken_BFC07F2C = (psx_brA_BFC07F2C == psx_brB_BFC07F2C); psx_delay_BFC07F2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC07F30: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07F30u); #endif if (psx_delay_BFC07F2C) { psx_delay_BFC07F2C = 0; if (psx_taken_BFC07F2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08014u); goto label_BFC08014; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07F34u); } label_BFC07F34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07F34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F34u); #endif /* 0xBFC07F34: 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, 0xBFC07F34u); 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(0xBFC07F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F38u); #endif /* 0xBFC07F38: 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, 0xBFC07F38u); 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(0xBFC07F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F3Cu); #endif /* 0xBFC07F3C: 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, 0xBFC07F3Cu); 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(0xBFC07F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F40u); #endif /* 0xBFC07F40: 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, 0xBFC07F40u); 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(0xBFC07F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F44u); #endif /* 0xBFC07F44: 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, 0xBFC07F44u); 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(0xBFC07F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F48u); #endif /* 0xBFC07F48: 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, 0xBFC07F48u); 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(0xBFC07F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07F4C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC07F50: 24849DA0 addiu $a0, $a0, -25184 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25184)); PGXP_ALU(0x24849DA0u, cpu->gpr[4], _pgx1, 0xFFFF9DA0u); } #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, 0x0u); #endif /* 0xBFC07F54: 0BF01A64 j 0xBFC06990 */ psx_delay_BFC07F54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC07F58: 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(0xBFC07F58u); #endif if (psx_delay_BFC07F54) { psx_delay_BFC07F54 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } 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, 0x20000u); #endif /* 0xBFC07F5C: 3C11BFC1 lui $s1, 0xBFC1 */ cpu->gpr[17] = 0xBFC10000u; PGXP_ALU(0x3C11BFC1u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07F60: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC07F64: 24120042 addiu $s2, $zero, 66 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); PGXP_ALU(0x24120042u, cpu->gpr[18], _pgx1, 0x00000042u); } #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, 0x80001u); #endif /* 0xBFC07F68: 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(0xBFC07F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC07F6C: 2631A480 addiu $s1, $s1, -23424 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-23424)); PGXP_ALU(0x2631A480u, cpu->gpr[17], _pgx1, 0xFFFFA480u); } #ifdef PSX_COSIM cosim_instr(0xBFC07F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07F70: 1000FFDE beq $zero, $zero, 0xBFC07EEC */ uint32_t psx_brA_BFC07F70 = cpu->gpr[0]; uint32_t psx_brB_BFC07F70 = cpu->gpr[0]; psx_taken_BFC07F70 = (psx_brA_BFC07F70 == psx_brB_BFC07F70); psx_delay_BFC07F70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07F74: 24A5A4FC addiu $a1, $a1, -23300 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23300)); PGXP_ALU(0x24A5A4FCu, cpu->gpr[5], _pgx1, 0xFFFFA4FCu); } #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, 0xBFC07EECu); goto label_BFC07EEC; } #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, 0x20000u); #endif /* 0xBFC07F78: 3C11BFC1 lui $s1, 0xBFC1 */ cpu->gpr[17] = 0xBFC10000u; PGXP_ALU(0x3C11BFC1u, cpu->gpr[17], 0u, 0u); #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, 0x20u); #endif /* 0xBFC07F7C: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC07F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC07F80: 24120043 addiu $s2, $zero, 67 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); PGXP_ALU(0x24120043u, cpu->gpr[18], _pgx1, 0x00000043u); } #ifdef PSX_COSIM cosim_instr(0xBFC07F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC07F84: 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(0xBFC07F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC07F88: 2631A420 addiu $s1, $s1, -23520 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (-23520)); PGXP_ALU(0x2631A420u, cpu->gpr[17], _pgx1, 0xFFFFA420u); } #ifdef PSX_COSIM cosim_instr(0xBFC07F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07F8C: 1000FFD7 beq $zero, $zero, 0xBFC07EEC */ uint32_t psx_brA_BFC07F8C = cpu->gpr[0]; uint32_t psx_brB_BFC07F8C = cpu->gpr[0]; psx_taken_BFC07F8C = (psx_brA_BFC07F8C == psx_brB_BFC07F8C); psx_delay_BFC07F8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC07F90: 24A5A4F8 addiu $a1, $a1, -23304 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23304)); PGXP_ALU(0x24A5A4F8u, cpu->gpr[5], _pgx1, 0xFFFFA4F8u); } #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, 0xBFC07EECu); goto label_BFC07EEC; } #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 /* 0xBFC07F94: 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, 0xBFC07F94u); 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(0xBFC07F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC07F98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC07F9C: 1446001A bne $v0, $a2, 0xBFC08008 */ uint32_t psx_brA_BFC07F9C = cpu->gpr[2]; uint32_t psx_brB_BFC07F9C = cpu->gpr[6]; psx_taken_BFC07F9C = (psx_brA_BFC07F9C != psx_brB_BFC07F9C); psx_delay_BFC07F9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC07FA0: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07FA0u); #endif if (psx_delay_BFC07F9C) { psx_delay_BFC07F9C = 0; if (psx_taken_BFC07F9C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08008u); goto label_BFC08008; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07FA4u); } label_BFC07FA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07FA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FA4u); #endif /* 0xBFC07FA4: 8E270008 lw $a3, 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, 0xBFC07FA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20000u); } PGXP_LOAD(0x8E270008u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC07FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC07FA8: 02802025 or $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(0x02802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC07FAC: 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, 0xBFC07FACu); return; } g_debug_last_store_pc = 0xBFC07FACu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000000u); #endif /* 0xBFC07FB0: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC07FB8u; /* jal link before delay slot */ psx_delay_BFC07FB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC07FB4: 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, 0xBFC07FB4u); return; } g_debug_last_store_pc = 0xBFC07FB4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60018u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC07FB4u); #endif if (psx_delay_BFC07FB0) { psx_delay_BFC07FB0 = 0; cpu->gpr[31] = 0xBFC07FB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } 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: 8E220004 lw $v0, 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, 0xBFC07FB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E220004u, _pgxa, cpu->gpr[2]); } #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: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC07FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC07FC0: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC07FC8u; /* jalr link before delay slot */ psx_delay_BFC07FC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC07FC4: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC07FC4u); #endif if (psx_delay_BFC07FC0) { psx_delay_BFC07FC0 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC07FC8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC07FC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07FC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC07FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FC8u); #endif /* 0xBFC07FC8: 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, 0xBFC07FC8u); 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(0xBFC07FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC07FCC: 1040000F beq $v0, $zero, 0xBFC0800C */ uint32_t psx_brA_BFC07FCC = cpu->gpr[2]; uint32_t psx_brB_BFC07FCC = cpu->gpr[0]; psx_taken_BFC07FCC = (psx_brA_BFC07FCC == psx_brB_BFC07FCC); psx_delay_BFC07FCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC07FD0: 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(0xBFC07FD0u); #endif if (psx_delay_BFC07FCC) { psx_delay_BFC07FCC = 0; if (psx_taken_BFC07FCC) { #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, 0xBFC07FD4u); } 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, 0xCu); #endif /* 0xBFC07FD4: 10430018 beq $v0, $v1, 0xBFC08038 */ uint32_t psx_brA_BFC07FD4 = cpu->gpr[2]; uint32_t psx_brB_BFC07FD4 = cpu->gpr[3]; psx_taken_BFC07FD4 = (psx_brA_BFC07FD4 == psx_brB_BFC07FD4); psx_delay_BFC07FD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC07FD8: 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(0xBFC07FD8u); #endif if (psx_delay_BFC07FD4) { psx_delay_BFC07FD4 = 0; if (psx_taken_BFC07FD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08038u); goto label_BFC08038; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07FDCu); } label_BFC07FDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC07FDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC07FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC07FDC: 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, 0xBFC07FDCu); return; } g_debug_last_store_pc = 0xBFC07FDCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC07FE0: 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, 0xBFC07FE0u); return; } g_debug_last_store_pc = 0xBFC07FE0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE000004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC07FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FE4u); #endif /* 0xBFC07FE4: 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, 0xBFC07FE4u); 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(0xBFC07FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FE8u); #endif /* 0xBFC07FE8: 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, 0xBFC07FE8u); 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(0xBFC07FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FECu); #endif /* 0xBFC07FEC: 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, 0xBFC07FECu); 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(0xBFC07FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FF0u); #endif /* 0xBFC07FF0: 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, 0xBFC07FF0u); 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(0xBFC07FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FF4u); #endif /* 0xBFC07FF4: 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, 0xBFC07FF4u); 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(0xBFC07FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FF8u); #endif /* 0xBFC07FF8: 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, 0xBFC07FF8u); 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(0xBFC07FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC07FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC07FFC: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0xBFC07FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC08000: 03200008 jr $t9 */ psx_delay_BFC08000 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08004: 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(0xBFC08004u); #endif if (psx_delay_BFC08000) { psx_delay_BFC08000 = 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; } label_BFC08008: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08008u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08008: 2631000C addiu $s1, $s1, 12 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (12)); PGXP_ALU(0x2631000Cu, cpu->gpr[17], _pgx1, 0x0000000Cu); } #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: 1000FFBD beq $zero, $zero, 0xBFC07F04 */ uint32_t psx_brA_BFC0800C = cpu->gpr[0]; uint32_t psx_brB_BFC0800C = cpu->gpr[0]; psx_taken_BFC0800C = (psx_brA_BFC0800C == psx_brB_BFC0800C); psx_delay_BFC0800C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC08010: 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(0xBFC08010u); #endif if (psx_delay_BFC0800C) { psx_delay_BFC0800C = 0; if (psx_taken_BFC0800C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07F04u); goto label_BFC07F04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08014u); } label_BFC08014: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08014u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08014: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC08018: 0FF01A64 jal 0xBFC06990 */ cpu->gpr[31] = 0xBFC08020u; /* jal link before delay slot */ psx_delay_BFC08018 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0801Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0801C: 24849DC8 addiu $a0, $a0, -25144 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25144)); PGXP_ALU(0x24849DC8u, cpu->gpr[4], _pgx1, 0xFFFF9DC8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0801Cu); #endif if (psx_delay_BFC08018) { psx_delay_BFC08018 = 0; cpu->gpr[31] = 0xBFC08020u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC06990u); cpu->pc = 0xBFC06990u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08020: 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(0xBFC08020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC08024: 0000000C syscall */ cpu->pc = 0xBFC08024u; if (psx_syscall(cpu, cpu->gpr[2])) return; #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, 0x4u); #endif /* 0xBFC08028: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0802Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0802C: A0402081 sb $zero, 8321($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8321; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0802Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8321)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0402081u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0802Cu); #endif 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: 1000FFFF beq $zero, $zero, 0xBFC08030 */ 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, 0x1u); #endif /* 0xBFC08034: 00000000 nop */ /* nop */ #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, 0xBFC08030u); goto label_BFC08030; } #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 /* 0xBFC08038: 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, 0xBFC08038u); 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(0xBFC08038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0803Cu); #endif /* 0xBFC0803C: 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, 0xBFC0803Cu); 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(0xBFC0803Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08040u); #endif /* 0xBFC08040: 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, 0xBFC08040u); 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(0xBFC08040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08044u); #endif /* 0xBFC08044: 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, 0xBFC08044u); 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(0xBFC08044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08048u); #endif /* 0xBFC08048: 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, 0xBFC08048u); 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(0xBFC08048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0804Cu); #endif /* 0xBFC0804C: 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, 0xBFC0804Cu); 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(0xBFC0804Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08050: 03E00008 jr $ra */ psx_delay_BFC08050 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08054: 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(0xBFC08054u); #endif if (psx_delay_BFC08050) { psx_delay_BFC08050 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC08058: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08058u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08058: 03E00008 jr $ra */ psx_delay_BFC08058 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0805Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0805C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0805Cu); #endif if (psx_delay_BFC08058) { psx_delay_BFC08058 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08060(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08060u); int psx_delay_BFC08060 = 0; label_BFC08060: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08060u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08060: 03E00008 jr $ra */ psx_delay_BFC08060 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08064: 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(0xBFC08064u); #endif if (psx_delay_BFC08060) { psx_delay_BFC08060 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08068(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08068u); int psx_delay_BFC08068 = 0; label_BFC08068: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08068u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08068: 03E00008 jr $ra */ psx_delay_BFC08068 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0806Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0806C: 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(0xBFC0806Cu); #endif if (psx_delay_BFC08068) { psx_delay_BFC08068 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08070(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08070u); int psx_delay_BFC08070 = 0; label_BFC08070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08070u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08070: 03E00008 jr $ra */ psx_delay_BFC08070 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08074: 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(0xBFC08074u); #endif if (psx_delay_BFC08070) { psx_delay_BFC08070 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08078(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08078u); int psx_delay_BFC08094 = 0; label_BFC08078: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08078u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08078: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0807Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0807C: AC820008 sw $v0, 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, 0xBFC0807Cu); return; } g_debug_last_store_pc = 0xBFC0807Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC0807Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08080: 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(0xBFC08080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08084: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08088: AC434BFC sw $v1, 19452($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19452; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08088u); return; } g_debug_last_store_pc = 0xBFC08088u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434BFCu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0808Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0808C: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0808Cu); return; } g_debug_last_store_pc = 0xBFC0808Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0808Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08090: 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, 0xBFC08090u); return; } g_debug_last_store_pc = 0xBFC08090u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC800014u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC08090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08094: 03E00008 jr $ra */ psx_delay_BFC08094 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08098: 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(0xBFC08098u); #endif if (psx_delay_BFC08094) { psx_delay_BFC08094 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0809C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0809Cu); int psx_delay_BFC0809C = 0; label_BFC0809C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0809Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0809Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0809Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0809C: 03E00008 jr $ra */ psx_delay_BFC0809C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC080A0: 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(0xBFC080A0u); #endif if (psx_delay_BFC0809C) { psx_delay_BFC0809C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC080A4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC080A4u); int psx_delay_BFC080A4 = 0; label_BFC080A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC080A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC080A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC080A4: 03E00008 jr $ra */ psx_delay_BFC080A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC080A8: 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(0xBFC080A8u); #endif if (psx_delay_BFC080A4) { psx_delay_BFC080A4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC080AC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC080ACu); int psx_delay_BFC080C8 = 0; label_BFC080AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC080ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC080ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC080AC: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC080ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC080B0: 24420009 addiu $v0, $v0, 9 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (9)); PGXP_ALU(0x24420009u, cpu->gpr[2], _pgx1, 0x00000009u); } #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, 0x14u); #endif /* 0xBFC080B4: AC820008 sw $v0, 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, 0xBFC080B4u); return; } g_debug_last_store_pc = 0xBFC080B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC080B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC080B8: 240300C8 addiu $v1, $zero, 200 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (200)); PGXP_ALU(0x240300C8u, cpu->gpr[3], _pgx1, 0x000000C8u); } #ifdef PSX_COSIM cosim_instr(0xBFC080B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC080BC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC080BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC080C0: AC434C04 sw $v1, 19460($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19460; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080C0u); return; } g_debug_last_store_pc = 0xBFC080C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C04u, _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, 0x11u); #endif /* 0xBFC080C4: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080C4u); return; } g_debug_last_store_pc = 0xBFC080C4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC080C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC080C8: 03E00008 jr $ra */ psx_delay_BFC080C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC080CC: 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(0xBFC080CCu); #endif if (psx_delay_BFC080C8) { psx_delay_BFC080C8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC080D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC080D0u); int psx_delay_BFC080EC = 0; label_BFC080D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC080D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC080D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC080D0: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC080D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC080D4: 24420009 addiu $v0, $v0, 9 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (9)); PGXP_ALU(0x24420009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0xBFC080D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC080D8: AC820008 sw $v0, 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, 0xBFC080D8u); return; } g_debug_last_store_pc = 0xBFC080D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC080DC: 24030028 addiu $v1, $zero, 40 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (40)); PGXP_ALU(0x24030028u, cpu->gpr[3], _pgx1, 0x00000028u); } #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, 0x4u); #endif /* 0xBFC080E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC080E4: AC434C04 sw $v1, 19460($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19460; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080E4u); return; } g_debug_last_store_pc = 0xBFC080E4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C04u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC080E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC080E8: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC080E8u); return; } g_debug_last_store_pc = 0xBFC080E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC080E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC080EC: 03E00008 jr $ra */ psx_delay_BFC080EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC080F0: 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(0xBFC080F0u); #endif if (psx_delay_BFC080EC) { psx_delay_BFC080EC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC080F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC080F4u); int psx_delay_BFC080F4 = 0; label_BFC080F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC080F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC080F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC080F4: 03E00008 jr $ra */ psx_delay_BFC080F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC080F8: 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(0xBFC080F8u); #endif if (psx_delay_BFC080F4) { psx_delay_BFC080F4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC080FC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC080FCu); int psx_delay_BFC080FC = 0; label_BFC080FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC080FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC080FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC080FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC080FC: 03E00008 jr $ra */ psx_delay_BFC080FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08100: 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(0xBFC08100u); #endif if (psx_delay_BFC080FC) { psx_delay_BFC080FC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08104(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08104u); int psx_delay_BFC08104 = 0; label_BFC08104: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08104u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08104: 03E00008 jr $ra */ psx_delay_BFC08104 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08108: 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(0xBFC08108u); #endif if (psx_delay_BFC08104) { psx_delay_BFC08104 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0810C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0810Cu); int psx_delay_BFC08114 = 0; int psx_delay_BFC08174 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0811Cu: goto label_BFC0811C; default: break; } } label_BFC0810C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0810Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0810Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0810Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0810C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC08110: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC08114: 0FF01DC5 jal 0xBFC07714 */ cpu->gpr[31] = 0xBFC0811Cu; /* jal link before delay slot */ psx_delay_BFC08114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC08118: 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, 0xBFC08118u); return; } g_debug_last_store_pc = 0xBFC08118u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08118u); #endif if (psx_delay_BFC08114) { psx_delay_BFC08114 = 0; cpu->gpr[31] = 0xBFC0811Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07714u); cpu->pc = 0xBFC07714u; return; } 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 /* 0xBFC0811C: 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, 0xBFC0811Cu); 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(0xBFC0811Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08120: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08124u); #endif /* 0xBFC08124: 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, 0xBFC08124u); 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(0xBFC08124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08128u); #endif /* 0xBFC08128: 84830010 lh $v1, 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, 0xBFC08128u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x84830010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0812Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0812C: 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(0xBFC0812Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08130: 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(0xBFC08130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08134: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08138: 24637734 addiu $v1, $v1, 30516 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30516)); PGXP_ALU(0x24637734u, cpu->gpr[3], _pgx1, 0x00007734u); } #ifdef PSX_COSIM cosim_instr(0xBFC08138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0813Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0813C: 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, 0xBFC0813Cu); return; } g_debug_last_store_pc = 0xBFC0813Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0813Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08140u); #endif /* 0xBFC08140: 8C820018 lw $v0, 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, 0xBFC08140u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08144u); #endif /* 0xBFC08144: 8483001C lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08144u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8483001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08148: 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(0xBFC08148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0814Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0814C: 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(0xBFC0814Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08150: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08154: 24637744 addiu $v1, $v1, 30532 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30532)); PGXP_ALU(0x24637744u, cpu->gpr[3], _pgx1, 0x00007744u); } #ifdef PSX_COSIM cosim_instr(0xBFC08154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08158: 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, 0xBFC08158u); return; } g_debug_last_store_pc = 0xBFC08158u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC0815C: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 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, 0x4u); #endif /* 0xBFC08160: 2442000B addiu $v0, $v0, 11 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (11)); PGXP_ALU(0x2442000Bu, cpu->gpr[2], _pgx1, 0x0000000Bu); } #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, 0x14u); #endif /* 0xBFC08164: AC820008 sw $v0, 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, 0xBFC08164u); return; } g_debug_last_store_pc = 0xBFC08164u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC08168: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08168u); return; } g_debug_last_store_pc = 0xBFC08168u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC08168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0816Cu); #endif /* 0xBFC0816C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0816Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0816Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08170: 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(0xBFC08170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08174: 03E00008 jr $ra */ psx_delay_BFC08174 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08178: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC08178u); #endif if (psx_delay_BFC08174) { psx_delay_BFC08174 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0817C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0817Cu); int psx_delay_BFC08184 = 0; int psx_delay_BFC081E4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0818Cu: goto label_BFC0818C; default: break; } } label_BFC0817C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0817Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0817Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0817Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0817C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0817Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC08180: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08180u); return; } g_debug_last_store_pc = 0xBFC08180u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC08184: 0FF01DC5 jal 0xBFC07714 */ cpu->gpr[31] = 0xBFC0818Cu; /* jal link before delay slot */ psx_delay_BFC08184 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC08188: 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, 0xBFC08188u); return; } g_debug_last_store_pc = 0xBFC08188u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08188u); #endif if (psx_delay_BFC08184) { psx_delay_BFC08184 = 0; cpu->gpr[31] = 0xBFC0818Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07714u); cpu->pc = 0xBFC07714u; return; } label_BFC0818C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0818Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0818Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0818Cu); #endif /* 0xBFC0818C: 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, 0xBFC0818Cu); 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(0xBFC0818Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08190: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08194u); #endif /* 0xBFC08194: 8C820004 lw $v0, 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, 0xBFC08194u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08198u); #endif /* 0xBFC08198: 8483000C lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08198u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8483000Cu, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC0819C: 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(0xBFC0819Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC081A0: 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(0xBFC081A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC081A4: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC081A8: 24637734 addiu $v1, $v1, 30516 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30516)); PGXP_ALU(0x24637734u, cpu->gpr[3], _pgx1, 0x00007734u); } #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, 0xCu); #endif /* 0xBFC081AC: 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, 0xBFC081ACu); return; } g_debug_last_store_pc = 0xBFC081ACu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC081ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081B0u); #endif /* 0xBFC081B0: 8C820010 lw $v0, 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, 0xBFC081B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC081B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081B4u); #endif /* 0xBFC081B4: 8483001C lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081B4u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8483001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC081B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC081B8: 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(0xBFC081B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC081BC: 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(0xBFC081BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC081C0: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC081C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC081C4: 24637744 addiu $v1, $v1, 30532 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30532)); PGXP_ALU(0x24637744u, cpu->gpr[3], _pgx1, 0x00007744u); } #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, 0xCu); #endif /* 0xBFC081C8: 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, 0xBFC081C8u); return; } g_debug_last_store_pc = 0xBFC081C8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC081CC: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 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, 0x4u); #endif /* 0xBFC081D0: 2442000A addiu $v0, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (10)); PGXP_ALU(0x2442000Au, cpu->gpr[2], _pgx1, 0x0000000Au); } #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, 0x14u); #endif /* 0xBFC081D4: AC820008 sw $v0, 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, 0xBFC081D4u); return; } g_debug_last_store_pc = 0xBFC081D4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC081D8: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081D8u); return; } g_debug_last_store_pc = 0xBFC081D8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC081D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081DCu); #endif /* 0xBFC081DC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x5u); #endif /* 0xBFC081E0: 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(0xBFC081E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC081E4: 03E00008 jr $ra */ psx_delay_BFC081E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC081E8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC081E8u); #endif if (psx_delay_BFC081E4) { psx_delay_BFC081E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC081EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC081ECu); int psx_delay_BFC081F4 = 0; int psx_delay_BFC08218 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC081FCu: goto label_BFC081FC; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC081EC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC081ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC081F0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC081F0u); return; } g_debug_last_store_pc = 0xBFC081F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC081F4: 0FF01DC5 jal 0xBFC07714 */ cpu->gpr[31] = 0xBFC081FCu; /* jal link before delay slot */ psx_delay_BFC081F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC081F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC081F8: 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, 0xBFC081F8u); return; } g_debug_last_store_pc = 0xBFC081F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC081F8u); #endif if (psx_delay_BFC081F4) { psx_delay_BFC081F4 = 0; cpu->gpr[31] = 0xBFC081FCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07714u); cpu->pc = 0xBFC07714u; return; } 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 /* 0xBFC081FC: 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, 0xBFC081FCu); 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(0xBFC081FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08200: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC08204: 24420002 addiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2)); PGXP_ALU(0x24420002u, cpu->gpr[2], _pgx1, 0x00000002u); } #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, 0x14u); #endif /* 0xBFC08208: AC820008 sw $v0, 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, 0xBFC08208u); return; } g_debug_last_store_pc = 0xBFC08208u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC0820C: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0820Cu); return; } g_debug_last_store_pc = 0xBFC0820Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0820Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08210u); #endif /* 0xBFC08210: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08210u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC08210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08214: 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(0xBFC08214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08218: 03E00008 jr $ra */ psx_delay_BFC08218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0821Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0821C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0821Cu); #endif if (psx_delay_BFC08218) { psx_delay_BFC08218 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08220(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08220u); int psx_delay_BFC08228 = 0; int psx_delay_BFC0824C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08230u: goto label_BFC08230; default: break; } } 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, 0x20000000u); #endif /* 0xBFC08220: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC08224: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08224u); return; } g_debug_last_store_pc = 0xBFC08224u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC08228: 0FF01DC1 jal 0xBFC07704 */ cpu->gpr[31] = 0xBFC08230u; /* jal link before delay slot */ psx_delay_BFC08228 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0822Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0822C: 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, 0xBFC0822Cu); return; } g_debug_last_store_pc = 0xBFC0822Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0822Cu); #endif if (psx_delay_BFC08228) { psx_delay_BFC08228 = 0; cpu->gpr[31] = 0xBFC08230u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07704u); cpu->pc = 0xBFC07704u; return; } label_BFC08230: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08230u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08230u); #endif /* 0xBFC08230: 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, 0xBFC08230u); 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(0xBFC08230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08234: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC08238: 24420007 addiu $v0, $v0, 7 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (7)); PGXP_ALU(0x24420007u, cpu->gpr[2], _pgx1, 0x00000007u); } #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, 0x14u); #endif /* 0xBFC0823C: AC820008 sw $v0, 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, 0xBFC0823Cu); return; } g_debug_last_store_pc = 0xBFC0823Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC08240: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08240u); return; } g_debug_last_store_pc = 0xBFC08240u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC08240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08244u); #endif /* 0xBFC08244: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08244u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x5u); #endif /* 0xBFC08248: 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(0xBFC08248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0824Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0824C: 03E00008 jr $ra */ psx_delay_BFC0824C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08250: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC08250u); #endif if (psx_delay_BFC0824C) { psx_delay_BFC0824C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08254(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08254u); int psx_delay_BFC0825C = 0; int psx_delay_BFC08280 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08264u: goto label_BFC08264; default: break; } } label_BFC08254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08254u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08254: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC08254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC08258: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08258u); return; } g_debug_last_store_pc = 0xBFC08258u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC0825C: 0FF01DC1 jal 0xBFC07704 */ cpu->gpr[31] = 0xBFC08264u; /* jal link before delay slot */ psx_delay_BFC0825C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC08260: 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, 0xBFC08260u); return; } g_debug_last_store_pc = 0xBFC08260u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08260u); #endif if (psx_delay_BFC0825C) { psx_delay_BFC0825C = 0; cpu->gpr[31] = 0xBFC08264u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07704u); cpu->pc = 0xBFC07704u; return; } 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 /* 0xBFC08264: 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, 0xBFC08264u); 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(0xBFC08264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08268: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC0826C: 24420005 addiu $v0, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (5)); PGXP_ALU(0x24420005u, cpu->gpr[2], _pgx1, 0x00000005u); } #ifdef PSX_COSIM cosim_instr(0xBFC0826Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC08270: AC820008 sw $v0, 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, 0xBFC08270u); return; } g_debug_last_store_pc = 0xBFC08270u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08274: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08274u); return; } g_debug_last_store_pc = 0xBFC08274u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC08274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08278u); #endif /* 0xBFC08278: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08278u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC08278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0827Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0827C: 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(0xBFC0827Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08280: 03E00008 jr $ra */ psx_delay_BFC08280 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08284: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC08284u); #endif if (psx_delay_BFC08280) { psx_delay_BFC08280 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08288(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08288u); int psx_delay_BFC08290 = 0; int psx_delay_BFC082D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08298u: goto label_BFC08298; default: break; } } label_BFC08288: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08288u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08288: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC08288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0828Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0828C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0828Cu); return; } g_debug_last_store_pc = 0xBFC0828Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC0828Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC08290: 0FF01DC9 jal 0xBFC07724 */ cpu->gpr[31] = 0xBFC08298u; /* jal link before delay slot */ psx_delay_BFC08290 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC08294: 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, 0xBFC08294u); return; } g_debug_last_store_pc = 0xBFC08294u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08294u); #endif if (psx_delay_BFC08290) { psx_delay_BFC08290 = 0; cpu->gpr[31] = 0xBFC08298u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07724u); cpu->pc = 0xBFC07724u; return; } 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: 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, 0xBFC08298u); 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(0xBFC08298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0829Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0829C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0829Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082A0u); #endif /* 0xBFC082A0: 8C82001C lw $v0, 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, 0xBFC082A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC082A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082A4u); #endif /* 0xBFC082A4: 84830020 lh $v1, 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, 0xBFC082A4u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x84830020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC082A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC082A8: 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(0xBFC082A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC082AC: 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(0xBFC082ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC082B0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC082B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC082B4: 246340B0 addiu $v1, $v1, 16560 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16560)); PGXP_ALU(0x246340B0u, cpu->gpr[3], _pgx1, 0x000040B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC082B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC082B8: 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, 0xBFC082B8u); return; } g_debug_last_store_pc = 0xBFC082B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC082BC: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC082C0: 2442000F addiu $v0, $v0, 15 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15)); PGXP_ALU(0x2442000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC082C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC082C4: AC820008 sw $v0, 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, 0xBFC082C4u); return; } g_debug_last_store_pc = 0xBFC082C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC082C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC082C8: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082C8u); return; } g_debug_last_store_pc = 0xBFC082C8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC082C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082CCu); #endif /* 0xBFC082CC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082CCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x5u); #endif /* 0xBFC082D0: 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(0xBFC082D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC082D4: 03E00008 jr $ra */ psx_delay_BFC082D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC082D8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC082D8u); #endif if (psx_delay_BFC082D4) { psx_delay_BFC082D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC082DC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC082DCu); int psx_delay_BFC082E4 = 0; int psx_delay_BFC08328 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC082ECu: goto label_BFC082EC; default: break; } } label_BFC082DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC082DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC082DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC082DC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC082E0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082E0u); return; } g_debug_last_store_pc = 0xBFC082E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC082E4: 0FF01DC9 jal 0xBFC07724 */ cpu->gpr[31] = 0xBFC082ECu; /* jal link before delay slot */ psx_delay_BFC082E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC082E8: 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, 0xBFC082E8u); return; } g_debug_last_store_pc = 0xBFC082E8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC082E8u); #endif if (psx_delay_BFC082E4) { psx_delay_BFC082E4 = 0; cpu->gpr[31] = 0xBFC082ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC07724u); cpu->pc = 0xBFC07724u; return; } 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 /* 0xBFC082EC: 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, 0xBFC082ECu); 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(0xBFC082ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC082F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC082F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082F4u); #endif /* 0xBFC082F4: 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, 0xBFC082F4u); 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(0xBFC082F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082F8u); #endif /* 0xBFC082F8: 8483001C lh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0xBFC082F8u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8483001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC082F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC082FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC082FC: 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(0xBFC082FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08300: 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(0xBFC08300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08304: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC08308: 246340B0 addiu $v1, $v1, 16560 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (16560)); PGXP_ALU(0x246340B0u, cpu->gpr[3], _pgx1, 0x000040B0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0830Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0830C: 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, 0xBFC0830Cu); return; } g_debug_last_store_pc = 0xBFC0830Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC08310: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC08314: 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(0xBFC08314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC08318: AC820008 sw $v0, 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, 0xBFC08318u); return; } g_debug_last_store_pc = 0xBFC08318u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0831Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0831C: AC80000C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0831Cu); return; } g_debug_last_store_pc = 0xBFC0831Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0831Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08320u); #endif /* 0xBFC08320: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08320u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x5u); #endif /* 0xBFC08324: 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(0xBFC08324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08328: 03E00008 jr $ra */ psx_delay_BFC08328 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0832Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0832C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC0832Cu); #endif if (psx_delay_BFC08328) { psx_delay_BFC08328 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08330(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08330u); int psx_delay_BFC08330 = 0; label_BFC08330: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08330u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08330: 03E00008 jr $ra */ psx_delay_BFC08330 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08334: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08334u); #endif if (psx_delay_BFC08330) { psx_delay_BFC08330 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08338(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08338u); int psx_delay_BFC08344 = 0; int psx_taken_BFC08344 = 0; int psx_delay_BFC0834C = 0; int psx_delay_BFC08358 = 0; int psx_taken_BFC08358 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0833Cu: goto label_BFC0833C; case 0xBFC0834Cu: goto label_BFC0834C; case 0xBFC08354u: goto label_BFC08354; default: break; } } label_BFC08338: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08338u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08338: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08338u); #endif label_BFC0833C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0833Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0833Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0833Cu); #endif /* 0xBFC0833C: 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(0xBFC0833Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08340: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08344: 14400003 bne $v0, $zero, 0xBFC08354 */ uint32_t psx_brA_BFC08344 = cpu->gpr[2]; uint32_t psx_brB_BFC08344 = cpu->gpr[0]; psx_taken_BFC08344 = (psx_brA_BFC08344 != psx_brB_BFC08344); psx_delay_BFC08344 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08348: 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(0xBFC08348u); #endif if (psx_delay_BFC08344) { psx_delay_BFC08344 = 0; if (psx_taken_BFC08344) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08354u); goto label_BFC08354; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0834Cu); } label_BFC0834C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0834Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0834Cu); #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, 0x1u); #endif /* 0xBFC08350: 00000000 nop */ /* nop */ #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 */ } 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, 0xCu); #endif /* 0xBFC08354: A0622080 sb $v0, 8320($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 8320; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08354u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (8320)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0622080u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC08358: 1000FFF8 beq $zero, $zero, 0xBFC0833C */ uint32_t psx_brA_BFC08358 = cpu->gpr[0]; uint32_t psx_brB_BFC08358 = cpu->gpr[0]; psx_taken_BFC08358 = (psx_brA_BFC08358 == psx_brB_BFC08358); psx_delay_BFC08358 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0835Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0835C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0835Cu); #endif if (psx_delay_BFC08358) { psx_delay_BFC08358 = 0; if (psx_taken_BFC08358) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0833Cu); goto label_BFC0833C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08360u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08360u); cpu->pc = 0xBFC08360u; return; /* fallthrough */ } void OpenBIOS_func_1FC08360(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08360u); int psx_delay_BFC08368 = 0; label_BFC08360: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08360u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08360: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x14u); #endif /* 0xBFC08364: A0442080 sb $a0, 8320($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8320; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08364u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (8320)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0442080u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08368: 03E00008 jr $ra */ psx_delay_BFC08368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0836Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0836C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0836Cu); #endif if (psx_delay_BFC08368) { psx_delay_BFC08368 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08370(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08370u); int psx_delay_BFC08370 = 0; label_BFC08370: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08370u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08370: 03E00008 jr $ra */ psx_delay_BFC08370 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08374: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08374u); #endif if (psx_delay_BFC08370) { psx_delay_BFC08370 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08378(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08378u); int psx_delay_BFC08378 = 0; label_BFC08378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08378: 03E00008 jr $ra */ psx_delay_BFC08378 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0837Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0837C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0837Cu); #endif if (psx_delay_BFC08378) { psx_delay_BFC08378 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08380(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08380u); int psx_delay_BFC08380 = 0; label_BFC08380: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08380u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08380: 03E00008 jr $ra */ psx_delay_BFC08380 = 1; #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 if (psx_delay_BFC08380) { psx_delay_BFC08380 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08388(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08388u); int psx_delay_BFC08388 = 0; 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, 0x80000001u); #endif /* 0xBFC08388: 03E00008 jr $ra */ psx_delay_BFC08388 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0838Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0838C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0838Cu); #endif if (psx_delay_BFC08388) { psx_delay_BFC08388 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC08390(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08390u); int psx_delay_BFC08390 = 0; int psx_taken_BFC08390 = 0; label_BFC08390: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08390u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08390: 1000FFFF beq $zero, $zero, 0xBFC08390 */ uint32_t psx_brA_BFC08390 = cpu->gpr[0]; uint32_t psx_brB_BFC08390 = cpu->gpr[0]; psx_taken_BFC08390 = (psx_brA_BFC08390 == psx_brB_BFC08390); psx_delay_BFC08390 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08394: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08394u); #endif if (psx_delay_BFC08390) { psx_delay_BFC08390 = 0; if (psx_taken_BFC08390) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08390u); goto label_BFC08390; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08398u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08398u); cpu->pc = 0xBFC08398u; return; /* fallthrough */ } void OpenBIOS_func_1FC08398(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08398u); int psx_delay_BFC08398 = 0; label_BFC08398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08398: 03E00008 jr $ra */ psx_delay_BFC08398 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0839Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0839C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0839Cu); #endif if (psx_delay_BFC08398) { psx_delay_BFC08398 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC083A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC083A0u); int psx_delay_BFC083A0 = 0; label_BFC083A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC083A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC083A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC083A0: 03E00008 jr $ra */ 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; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC083A8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC083A8u); int psx_delay_BFC083A8 = 0; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC083A8: 03E00008 jr $ra */ psx_delay_BFC083A8 = 1; #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 if (psx_delay_BFC083A8) { psx_delay_BFC083A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC083B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC083B0u); int psx_delay_BFC083B0 = 0; 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, 0x80000001u); #endif /* 0xBFC083B0: 03E00008 jr $ra */ psx_delay_BFC083B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC083B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC083B4u); #endif if (psx_delay_BFC083B0) { psx_delay_BFC083B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC083B8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC083B8u); int psx_delay_BFC083E8 = 0; int psx_taken_BFC083E8 = 0; int psx_delay_BFC0840C = 0; int psx_taken_BFC0840C = 0; int psx_delay_BFC08428 = 0; int psx_delay_BFC08438 = 0; int psx_taken_BFC08438 = 0; int psx_delay_BFC08440 = 0; int psx_delay_BFC0844C = 0; int psx_taken_BFC0844C = 0; int psx_delay_BFC0845C = 0; int psx_taken_BFC0845C = 0; int psx_delay_BFC08464 = 0; int psx_delay_BFC08470 = 0; int psx_taken_BFC08470 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC083E8u: goto label_BFC083E8; case 0xBFC083F0u: goto label_BFC083F0; case 0xBFC0840Cu: goto label_BFC0840C; case 0xBFC08414u: goto label_BFC08414; case 0xBFC08430u: goto label_BFC08430; case 0xBFC08440u: goto label_BFC08440; case 0xBFC08448u: goto label_BFC08448; case 0xBFC08454u: goto label_BFC08454; case 0xBFC08464u: goto label_BFC08464; case 0xBFC0846Cu: goto label_BFC0846C; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC083B8: 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(0xBFC083B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC083BC: 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, 0xBFC083BCu); return; } g_debug_last_store_pc = 0xBFC083BCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC083BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC083C0: 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, 0xBFC083C0u); return; } g_debug_last_store_pc = 0xBFC083C0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #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, 0x20000u); #endif /* 0xBFC083C4: 3C11BFC0 lui $s1, 0xBFC0 */ cpu->gpr[17] = 0xBFC00000u; PGXP_ALU(0x3C11BFC0u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC083C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC083C8: 3C10BFC0 lui $s0, 0xBFC0 */ cpu->gpr[16] = 0xBFC00000u; PGXP_ALU(0x3C10BFC0u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC083C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC083CC: 26100080 addiu $s0, $s0, 128 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (128)); PGXP_ALU(0x26100080u, cpu->gpr[16], _pgx1, 0x00000080u); } #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, 0x20000u); #endif /* 0xBFC083D0: 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(0xBFC083D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC083D4: 02308823 subu $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(0x02308823u, cpu->gpr[17], _pgx1, _pgx2); } #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, 0x20040000u); #endif /* 0xBFC083D8: 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, 0xBFC083D8u); return; } g_debug_last_store_pc = 0xBFC083D8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #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, 0xA0000000u); #endif /* 0xBFC083DC: 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, 0xBFC083DCu); return; } g_debug_last_store_pc = 0xBFC083DCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x20000u); #endif /* 0xBFC083E0: 00118883 sra $s1, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 2u); PGXP_ALU(0x00118883u, cpu->gpr[17], _pgx1, 2u); } #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, 0x40001u); #endif /* 0xBFC083E4: 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(0xBFC083E4u); #endif label_BFC083E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC083E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC083E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000u); #endif /* 0xBFC083E8: 16320011 bne $s1, $s2, 0xBFC08430 */ uint32_t psx_brA_BFC083E8 = cpu->gpr[17]; uint32_t psx_brB_BFC083E8 = cpu->gpr[18]; psx_taken_BFC083E8 = (psx_brA_BFC083E8 != psx_brB_BFC083E8); psx_delay_BFC083E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC083EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC083ECu); #endif if (psx_delay_BFC083E8) { psx_delay_BFC083E8 = 0; if (psx_taken_BFC083E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08430u); goto label_BFC08430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083F0u); } label_BFC083F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC083F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC083F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC083F0: 3C10BFC0 lui $s0, 0xBFC0 */ cpu->gpr[16] = 0xBFC00000u; PGXP_ALU(0x3C10BFC0u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC083F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC083F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC083F4: 3C11BFC0 lui $s1, 0xBFC0 */ cpu->gpr[17] = 0xBFC00000u; PGXP_ALU(0x3C11BFC0u, cpu->gpr[17], 0u, 0u); #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, 0x10000u); #endif /* 0xBFC083F8: 26100080 addiu $s0, $s0, 128 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (128)); PGXP_ALU(0x26100080u, cpu->gpr[16], _pgx1, 0x00000080u); } #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, 0x20000u); #endif /* 0xBFC083FC: 26310084 addiu $s1, $s1, 132 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (132)); PGXP_ALU(0x26310084u, cpu->gpr[17], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0xBFC083FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC08400: 02308823 subu $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(0x02308823u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08404: 00118883 sra $s1, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] >> 2u); PGXP_ALU(0x00118883u, cpu->gpr[17], _pgx1, 2u); } #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, 0x40001u); #endif /* 0xBFC08408: 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(0xBFC08408u); #endif label_BFC0840C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0840Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0840Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0840Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000u); #endif /* 0xBFC0840C: 16320011 bne $s1, $s2, 0xBFC08454 */ uint32_t psx_brA_BFC0840C = cpu->gpr[17]; uint32_t psx_brB_BFC0840C = cpu->gpr[18]; psx_taken_BFC0840C = (psx_brA_BFC0840C != psx_brB_BFC0840C); psx_delay_BFC0840C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08410: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08410u); #endif if (psx_delay_BFC0840C) { psx_delay_BFC0840C = 0; if (psx_taken_BFC0840C) { #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, 0xBFC08414u); } label_BFC08414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08414u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08414u); #endif /* 0xBFC08414: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08414u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC08414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08418u); #endif /* 0xBFC08418: 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, 0xBFC08418u); 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(0xBFC08418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0841Cu); #endif /* 0xBFC0841C: 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, 0xBFC0841Cu); 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(0xBFC0841Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08420u); #endif /* 0xBFC08420: 8FB00010 lw $s0, 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, 0xBFC08420u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC08420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08424u); #endif /* 0xBFC08424: 8C444B88 lw $a0, 19336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08424u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C444B88u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC08428: 0BF020EC j 0xBFC083B0 */ psx_delay_BFC08428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0842Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0842C: 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(0xBFC0842Cu); #endif if (psx_delay_BFC08428) { psx_delay_BFC08428 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083B0u); cpu->pc = 0xBFC083B0u; return; } label_BFC08430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08430u); #endif /* 0xBFC08430: 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, 0xBFC08430u); 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(0xBFC08430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08434: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08438: 10400003 beq $v0, $zero, 0xBFC08448 */ uint32_t psx_brA_BFC08438 = cpu->gpr[2]; 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, 0xBFC08448u); goto label_BFC08448; } #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, 0x80000004u); #endif /* 0xBFC08440: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC08448u; /* jalr link before delay slot */ psx_delay_BFC08440 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08444: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08444u); #endif if (psx_delay_BFC08440) { psx_delay_BFC08440 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC08448u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC08448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08448u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC08448: 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(0xBFC08448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0844Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0844C: 1000FFE6 beq $zero, $zero, 0xBFC083E8 */ uint32_t psx_brA_BFC0844C = cpu->gpr[0]; uint32_t psx_brB_BFC0844C = cpu->gpr[0]; psx_taken_BFC0844C = (psx_brA_BFC0844C == psx_brB_BFC0844C); psx_delay_BFC0844C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08450: 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(0xBFC08450u); #endif if (psx_delay_BFC0844C) { psx_delay_BFC0844C = 0; if (psx_taken_BFC0844C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083E8u); goto label_BFC083E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08454u); } 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 /* 0xBFC08454: 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, 0xBFC08454u); 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(0xBFC08454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08458: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC0845C: 10400003 beq $v0, $zero, 0xBFC0846C */ uint32_t psx_brA_BFC0845C = cpu->gpr[2]; uint32_t psx_brB_BFC0845C = cpu->gpr[0]; psx_taken_BFC0845C = (psx_brA_BFC0845C == psx_brB_BFC0845C); psx_delay_BFC0845C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08460: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08460u); #endif if (psx_delay_BFC0845C) { psx_delay_BFC0845C = 0; if (psx_taken_BFC0845C) { #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, 0xBFC08464u); } label_BFC08464: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08464u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC08464: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0xBFC0846Cu; /* jalr link before delay slot */ psx_delay_BFC08464 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08468: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08468u); #endif if (psx_delay_BFC08464) { psx_delay_BFC08464 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0xBFC0846Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0846C: 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(0xBFC0846Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08470: 1000FFE6 beq $zero, $zero, 0xBFC0840C */ uint32_t psx_brA_BFC08470 = cpu->gpr[0]; uint32_t psx_brB_BFC08470 = cpu->gpr[0]; psx_taken_BFC08470 = (psx_brA_BFC08470 == psx_brB_BFC08470); psx_delay_BFC08470 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08474: 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(0xBFC08474u); #endif if (psx_delay_BFC08470) { psx_delay_BFC08470 = 0; if (psx_taken_BFC08470) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0840Cu); goto label_BFC0840C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08478u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08478u); cpu->pc = 0xBFC08478u; return; /* fallthrough */ } void OpenBIOS_func_1FC08478(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08478u); int psx_delay_BFC0847C = 0; int psx_taken_BFC0847C = 0; int psx_delay_BFC084AC = 0; int psx_taken_BFC084AC = 0; int psx_delay_BFC084BC = 0; int psx_taken_BFC084BC = 0; int psx_delay_BFC084DC = 0; int psx_taken_BFC084DC = 0; int psx_delay_BFC084FC = 0; int psx_taken_BFC084FC = 0; int psx_delay_BFC08528 = 0; int psx_delay_BFC08538 = 0; int psx_taken_BFC08538 = 0; int psx_delay_BFC08548 = 0; int psx_delay_BFC08550 = 0; int psx_taken_BFC08550 = 0; int psx_delay_BFC08564 = 0; int psx_taken_BFC08564 = 0; int psx_delay_BFC08578 = 0; int psx_taken_BFC08578 = 0; int psx_delay_BFC08588 = 0; int psx_taken_BFC08588 = 0; int psx_delay_BFC08590 = 0; int psx_taken_BFC08590 = 0; int psx_delay_BFC085AC = 0; int psx_taken_BFC085AC = 0; int psx_delay_BFC085B8 = 0; int psx_taken_BFC085B8 = 0; int psx_delay_BFC085C8 = 0; int psx_taken_BFC085C8 = 0; int psx_delay_BFC085D0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08484u: goto label_BFC08484; case 0xBFC084B4u: goto label_BFC084B4; case 0xBFC084C4u: goto label_BFC084C4; case 0xBFC084C8u: goto label_BFC084C8; case 0xBFC084D4u: goto label_BFC084D4; case 0xBFC084E4u: goto label_BFC084E4; case 0xBFC084FCu: goto label_BFC084FC; case 0xBFC08504u: goto label_BFC08504; case 0xBFC08530u: goto label_BFC08530; case 0xBFC08540u: goto label_BFC08540; case 0xBFC08550u: goto label_BFC08550; case 0xBFC08558u: goto label_BFC08558; case 0xBFC08564u: goto label_BFC08564; case 0xBFC0856Cu: goto label_BFC0856C; case 0xBFC08570u: goto label_BFC08570; case 0xBFC08580u: goto label_BFC08580; case 0xBFC08584u: goto label_BFC08584; case 0xBFC08590u: goto label_BFC08590; case 0xBFC08598u: goto label_BFC08598; case 0xBFC085B4u: goto label_BFC085B4; case 0xBFC085C0u: goto label_BFC085C0; case 0xBFC085C4u: goto label_BFC085C4; case 0xBFC085D0u: goto label_BFC085D0; default: break; } } label_BFC08478: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08478u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC08478: 2CA20002 sltiu $v0, $a1, 2 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)(cpu->gpr[5] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2CA20002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0xBFC08478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0847Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0847C: 14400054 bne $v0, $zero, 0xBFC085D0 */ 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, 0xBFC085D0u); goto label_BFC085D0; } #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, 0x20000000u); #endif /* 0xBFC08484: 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(0xBFC08484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC08488: 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, 0xBFC08488u); return; } g_debug_last_store_pc = 0xBFC08488u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #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, 0xA0000000u); #endif /* 0xBFC0848C: 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, 0xBFC0848Cu); return; } g_debug_last_store_pc = 0xBFC0848Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #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, 0x20800000u); #endif /* 0xBFC08490: 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, 0xBFC08490u); return; } g_debug_last_store_pc = 0xBFC08490u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70038u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC08490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC08494: 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, 0xBFC08494u); return; } g_debug_last_store_pc = 0xBFC08494u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60034u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC08494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC08498: 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, 0xBFC08498u); return; } g_debug_last_store_pc = 0xBFC08498u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC08498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0849Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0849C: 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, 0xBFC0849Cu); return; } g_debug_last_store_pc = 0xBFC0849Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC0849Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC084A0: 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, 0xBFC084A0u); return; } g_debug_last_store_pc = 0xBFC084A0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC084A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC084A4: 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, 0xBFC084A4u); return; } g_debug_last_store_pc = 0xBFC084A4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC084A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC084A8: 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, 0xBFC084A8u); return; } g_debug_last_store_pc = 0xBFC084A8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #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, 0x41u); #endif /* 0xBFC084AC: 10C00015 beq $a2, $zero, 0xBFC08504 */ uint32_t psx_brA_BFC084AC = cpu->gpr[6]; uint32_t psx_brB_BFC084AC = cpu->gpr[0]; psx_taken_BFC084AC = (psx_brA_BFC084AC == psx_brB_BFC084AC); psx_delay_BFC084AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC084B0: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC084B0u); #endif if (psx_delay_BFC084AC) { psx_delay_BFC084AC = 0; if (psx_taken_BFC084AC) { #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, 0xBFC084B4u); } label_BFC084B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC084B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC084B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC084B4: 24A2FFFF addiu $v0, $a1, -1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[5] + (-1)); PGXP_ALU(0x24A2FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0xBFC084B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC084B8: 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(0xBFC084B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC084BC: 14600002 bne $v1, $zero, 0xBFC084C8 */ uint32_t psx_brA_BFC084BC = cpu->gpr[3]; uint32_t psx_brB_BFC084BC = cpu->gpr[0]; 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, 0xCu); #endif /* 0xBFC084C0: 0043001B divu $v0, $v1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0043001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #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, 0xBFC084C8u); goto label_BFC084C8; } #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, 0x0u); #endif /* 0xBFC084C4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC084C4u); return; #ifdef PSX_COSIM cosim_instr(0xBFC084C4u); #endif label_BFC084C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC084C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC084C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC084C8: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC084C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400081u); #endif /* 0xBFC084CC: 00E0B025 or $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(0x00E0B025u, cpu->gpr[22], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC084D0: 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(0xBFC084D0u); #endif label_BFC084D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC084D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC084D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC084D4: 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(0xBFC084D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC084D8: 0043182B sltu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC084D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC084DC: 14600014 bne $v1, $zero, 0xBFC08530 */ uint32_t psx_brA_BFC084DC = cpu->gpr[3]; 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC084E0: 24170003 addiu $s7, $zero, 3 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (3)); PGXP_ALU(0x24170003u, cpu->gpr[23], _pgx1, 0x00000003u); } #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, 0xBFC08530u); goto label_BFC08530; } #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, 0x20004u); #endif /* 0xBFC084E4: 00510018 mult $v0, $s1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[17]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00510018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[17]); #ifdef PSX_COSIM cosim_instr(0xBFC084E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC084E8: 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(0xBFC084E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC084EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC084ECu); #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, 0x20020u); #endif /* 0xBFC084F4: 00B10018 mult $a1, $s1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[17]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00B10018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[17]); #ifdef PSX_COSIM cosim_instr(0xBFC084F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC084F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC084F8: 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(0xBFC084F8u); #endif 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, 0x10001u); #endif /* 0xBFC084FC: 16000021 bne $s0, $zero, 0xBFC08584 */ uint32_t psx_brA_BFC084FC = cpu->gpr[16]; 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, 0x90001u); #endif /* 0xBFC08500: 02009825 or $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(0x02009825u, cpu->gpr[19], _pgx1, _pgx2); } #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, 0xBFC08584u); goto label_BFC08584; } #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 /* 0xBFC08504: 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, 0xBFC08504u); 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(0xBFC08504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08508u); #endif /* 0xBFC08508: 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, 0xBFC08508u); 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(0xBFC08508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0850Cu); #endif /* 0xBFC0850C: 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, 0xBFC0850Cu); 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(0xBFC0850Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08510u); #endif /* 0xBFC08510: 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, 0xBFC08510u); 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(0xBFC08510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08514u); #endif /* 0xBFC08514: 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, 0xBFC08514u); 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(0xBFC08514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08518u); #endif /* 0xBFC08518: 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, 0xBFC08518u); 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(0xBFC08518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0851Cu); #endif /* 0xBFC0851C: 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, 0xBFC0851Cu); 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(0xBFC0851Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08520u); #endif /* 0xBFC08520: 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, 0xBFC08520u); 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(0xBFC08520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08524u); #endif /* 0xBFC08524: 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, 0xBFC08524u); 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(0xBFC08524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08528: 03E00008 jr $ra */ psx_delay_BFC08528 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0852Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0852C: 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(0xBFC0852Cu); #endif if (psx_delay_BFC08528) { psx_delay_BFC08528 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC08530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08530u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08530: 00021840 sll $v1, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 1u; PGXP_ALU(0x00021840u, cpu->gpr[3], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC08530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08534: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08538: 1000FFE6 beq $zero, $zero, 0xBFC084D4 */ uint32_t psx_brA_BFC08538 = cpu->gpr[0]; uint32_t psx_brB_BFC08538 = cpu->gpr[0]; psx_taken_BFC08538 = (psx_brA_BFC08538 == psx_brB_BFC08538); psx_delay_BFC08538 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0853Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0853C: 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(0xBFC0853Cu); #endif if (psx_delay_BFC08538) { psx_delay_BFC08538 = 0; if (psx_taken_BFC08538) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC084D4u); goto label_BFC084D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08540u); } label_BFC08540: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08540u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC08540: 0080A025 or $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(0x0080A025u, cpu->gpr[20], _pgx1, _pgx2); } #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, 0x20000020u); #endif /* 0xBFC08544: AFA50014 sw $a1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08544u); return; } g_debug_last_store_pc = 0xBFC08544u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50014u, _pgxa, cpu->gpr[5]); } #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, 0x80400000u); #endif /* 0xBFC08548: 02C0F809 jalr $ra, $s6 */ cpu->gpr[31] = 0xBFC08550u; /* jalr link before delay slot */ psx_delay_BFC08548 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0854Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0854C: AFA40010 sw $a0, 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, 0xBFC0854Cu); return; } g_debug_last_store_pc = 0xBFC0854Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0854Cu); #endif if (psx_delay_BFC08548) { psx_delay_BFC08548 = 0; { uint32_t _t = cpu->gpr[22]; cpu->gpr[31] = 0xBFC08550u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC08550: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08550u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC08550: 1840000B blez $v0, 0xBFC08580 */ uint32_t psx_brA_BFC08550 = cpu->gpr[2]; psx_taken_BFC08550 = ((int32_t)psx_brA_BFC08550 <= 0); psx_delay_BFC08550 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08554: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08554u); #endif if (psx_delay_BFC08550) { psx_delay_BFC08550 = 0; if (psx_taken_BFC08550) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08580u); goto label_BFC08580; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08558u); } label_BFC08558: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08558u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08558u); #endif /* 0xBFC08558: 8FA50014 lw $a1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08558u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0855Cu); #endif /* 0xBFC0855C: 8FA40010 lw $a0, 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, 0xBFC0855Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0855Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20024u); #endif /* 0xBFC08560: 02251021 addu $v0, $s1, $a1 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[17] + cpu->gpr[5]; PGXP_ALU(0x02251021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08560u); #endif label_BFC08564: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08564u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC08564: 14A2000C bne $a1, $v0, 0xBFC08598 */ uint32_t psx_brA_BFC08564 = cpu->gpr[5]; uint32_t psx_brB_BFC08564 = cpu->gpr[2]; psx_taken_BFC08564 = (psx_brA_BFC08564 != psx_brB_BFC08564); psx_delay_BFC08564 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08568: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08568u); #endif if (psx_delay_BFC08564) { psx_delay_BFC08564 = 0; if (psx_taken_BFC08564) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08598u); goto label_BFC08598; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0856Cu); } label_BFC0856C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0856Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0856Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0856Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0856C: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0856Cu); #endif label_BFC08570: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08570u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40024u); #endif /* 0xBFC08570: 00B21023 subu $v0, $a1, $s2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[5] - cpu->gpr[18]; PGXP_ALU(0x00B21023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC08574: 0050102B sltu $v0, $v0, $s0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[16] ? 1 : 0); PGXP_ALU(0x0050102Bu, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC08578: 1040FFF1 beq $v0, $zero, 0xBFC08540 */ uint32_t psx_brA_BFC08578 = cpu->gpr[2]; uint32_t psx_brB_BFC08578 = cpu->gpr[0]; psx_taken_BFC08578 = (psx_brA_BFC08578 == psx_brB_BFC08578); psx_delay_BFC08578 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0857Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10030u); #endif /* 0xBFC0857C: 00B02023 subu $a0, $a1, $s0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[5] - cpu->gpr[16]; PGXP_ALU(0x00B02023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0857Cu); #endif if (psx_delay_BFC08578) { psx_delay_BFC08578 = 0; if (psx_taken_BFC08578) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08540u); goto label_BFC08540; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08580u); } label_BFC08580: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08580u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000u); #endif /* 0xBFC08580: 02719821 addu $s3, $s3, $s1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[19] = cpu->gpr[19] + cpu->gpr[17]; PGXP_ALU(0x02719821u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08580u); #endif 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, 0x280004u); #endif /* 0xBFC08584: 0275102B sltu $v0, $s3, $s5 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)(cpu->gpr[19] < cpu->gpr[21] ? 1 : 0); PGXP_ALU(0x0275102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08588: 1040000A beq $v0, $zero, 0xBFC085B4 */ uint32_t psx_brA_BFC08588 = cpu->gpr[2]; uint32_t psx_brB_BFC08588 = cpu->gpr[0]; psx_taken_BFC08588 = (psx_brA_BFC08588 == psx_brB_BFC08588); psx_delay_BFC08588 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0858Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0858C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0858Cu); #endif if (psx_delay_BFC08588) { psx_delay_BFC08588 = 0; if (psx_taken_BFC08588) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085B4u); goto label_BFC085B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08590u); } label_BFC08590: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08590u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08590: 1000FFF7 beq $zero, $zero, 0xBFC08570 */ uint32_t psx_brA_BFC08590 = cpu->gpr[0]; uint32_t psx_brB_BFC08590 = cpu->gpr[0]; psx_taken_BFC08590 = (psx_brA_BFC08590 == psx_brB_BFC08590); psx_delay_BFC08590 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0020u); #endif /* 0xBFC08594: 02722821 addu $a1, $s3, $s2 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[19] + cpu->gpr[18]; PGXP_ALU(0x02722821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08594u); #endif if (psx_delay_BFC08590) { psx_delay_BFC08590 = 0; if (psx_taken_BFC08590) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08570u); goto label_BFC08570; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08598u); } label_BFC08598: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08598u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08598u); #endif /* 0xBFC08598: 82830000 lb $v1, 0($s4) */ { uint32_t _pgxa = cpu->gpr[20]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (0)), 3, 0x100000u); PGXP_LOAD(0x82830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0859Cu); #endif /* 0xBFC0859C: 80A60000 lb $a2, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 6, 0x20u); PGXP_LOAD(0x80A60000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC0859Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC085A0: 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(0xBFC085A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC085A4: 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(0xBFC085A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100040u); #endif /* 0xBFC085A8: A286FFFF sb $a2, -1($s4) */ { uint32_t _pgxa = cpu->gpr[20] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC085A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[20] + (-1)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA286FFFFu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC085A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085AC: 1000FFED beq $zero, $zero, 0xBFC08564 */ uint32_t psx_brA_BFC085AC = cpu->gpr[0]; uint32_t psx_brB_BFC085AC = cpu->gpr[0]; psx_taken_BFC085AC = (psx_brA_BFC085AC == psx_brB_BFC085AC); psx_delay_BFC085AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC085B0: A0A3FFFF sb $v1, -1($a1) */ { uint32_t _pgxa = cpu->gpr[5] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC085B0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-1)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0A3FFFFu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC085B0u); #endif if (psx_delay_BFC085AC) { psx_delay_BFC085AC = 0; if (psx_taken_BFC085AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08564u); goto label_BFC08564; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085B4u); } label_BFC085B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC085B4: 02118023 subu $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(0x02118023u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x800001u); #endif /* 0xBFC085B8: 16E00002 bne $s7, $zero, 0xBFC085C4 */ uint32_t psx_brA_BFC085B8 = cpu->gpr[23]; uint32_t psx_brB_BFC085B8 = cpu->gpr[0]; psx_taken_BFC085B8 = (psx_brA_BFC085B8 != psx_brB_BFC085B8); psx_delay_BFC085B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x810000u); #endif /* 0xBFC085BC: 0217001B divu $s0, $s7 */ { uint32_t psx_n = cpu->gpr[16]; uint32_t psx_d = cpu->gpr[23]; 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(0x0217001Bu, cpu->hi, cpu->lo, cpu->gpr[16], cpu->gpr[23]); #ifdef PSX_COSIM cosim_instr(0xBFC085BCu); #endif if (psx_delay_BFC085B8) { psx_delay_BFC085B8 = 0; if (psx_taken_BFC085B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085C4u); goto label_BFC085C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085C0u); } label_BFC085C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC085C0: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC085C0u); return; #ifdef PSX_COSIM cosim_instr(0xBFC085C0u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC085C4: 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(0xBFC085C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085C8: 1000FFCC beq $zero, $zero, 0xBFC084FC */ uint32_t psx_brA_BFC085C8 = cpu->gpr[0]; uint32_t psx_brB_BFC085C8 = cpu->gpr[0]; psx_taken_BFC085C8 = (psx_brA_BFC085C8 == psx_brB_BFC085C8); psx_delay_BFC085C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085CC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC085CCu); #endif if (psx_delay_BFC085C8) { psx_delay_BFC085C8 = 0; if (psx_taken_BFC085C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC084FCu); goto label_BFC084FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085D0u); } label_BFC085D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC085D0: 03E00008 jr $ra */ psx_delay_BFC085D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC085D4u); #endif if (psx_delay_BFC085D0) { psx_delay_BFC085D0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC085D8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC085D8u); int psx_delay_BFC085E0 = 0; int psx_taken_BFC085E0 = 0; int psx_delay_BFC085E8 = 0; int psx_delay_BFC085FC = 0; int psx_taken_BFC085FC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC085E0u: goto label_BFC085E0; case 0xBFC085E8u: goto label_BFC085E8; case 0xBFC085F0u: goto label_BFC085F0; default: break; } } label_BFC085D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC085D8: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC085DC: 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(0xBFC085DCu); #endif label_BFC085E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC085E0: 14660003 bne $v1, $a2, 0xBFC085F0 */ uint32_t psx_brA_BFC085E0 = cpu->gpr[3]; uint32_t psx_brB_BFC085E0 = cpu->gpr[6]; psx_taken_BFC085E0 = (psx_brA_BFC085E0 != psx_brB_BFC085E0); psx_delay_BFC085E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x38u); #endif /* 0xBFC085E4: 00A32021 addu $a0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A32021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC085E4u); #endif if (psx_delay_BFC085E0) { psx_delay_BFC085E0 = 0; if (psx_taken_BFC085E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085F0u); goto label_BFC085F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085E8u); } label_BFC085E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC085E8: 03E00008 jr $ra */ psx_delay_BFC085E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC085ECu); #endif if (psx_delay_BFC085E8) { psx_delay_BFC085E8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC085F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC085F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC085F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085F0u); #endif /* 0xBFC085F0: 90870000 lbu $a3, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 7, 0x10u); PGXP_LOAD(0x90870000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC085F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC085F4: 00432021 addu $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00432021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x90u); #endif /* 0xBFC085F8: A0870000 sb $a3, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC085F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0870000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC085F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC085FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC085FC: 1000FFF8 beq $zero, $zero, 0xBFC085E0 */ uint32_t psx_brA_BFC085FC = cpu->gpr[0]; uint32_t psx_brB_BFC085FC = cpu->gpr[0]; psx_taken_BFC085FC = (psx_brA_BFC085FC == psx_brB_BFC085FC); psx_delay_BFC085FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08600: 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(0xBFC08600u); #endif if (psx_delay_BFC085FC) { psx_delay_BFC085FC = 0; if (psx_taken_BFC085FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC085E0u); goto label_BFC085E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08604u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08604u); cpu->pc = 0xBFC08604u; return; /* fallthrough */ } void OpenBIOS_func_1FC08604(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08604u); int psx_delay_BFC08608 = 0; int psx_taken_BFC08608 = 0; int psx_delay_BFC08614 = 0; int psx_taken_BFC08614 = 0; int psx_delay_BFC0862C = 0; int psx_taken_BFC0862C = 0; int psx_delay_BFC08634 = 0; int psx_delay_BFC0864C = 0; int psx_taken_BFC0864C = 0; int psx_delay_BFC08654 = 0; int psx_delay_BFC0865C = 0; int psx_taken_BFC0865C = 0; int psx_delay_BFC0866C = 0; int psx_taken_BFC0866C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08610u: goto label_BFC08610; case 0xBFC0861Cu: goto label_BFC0861C; case 0xBFC08624u: goto label_BFC08624; case 0xBFC08634u: goto label_BFC08634; case 0xBFC0863Cu: goto label_BFC0863C; case 0xBFC0864Cu: goto label_BFC0864C; case 0xBFC08654u: goto label_BFC08654; case 0xBFC0865Cu: goto label_BFC0865C; case 0xBFC08664u: goto label_BFC08664; default: break; } } label_BFC08604: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08604u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x38u); #endif /* 0xBFC08604: 0085182B sltu $v1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0085182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08608: 14600014 bne $v1, $zero, 0xBFC0865C */ uint32_t psx_brA_BFC08608 = cpu->gpr[3]; 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, 0x15u); #endif /* 0xBFC0860C: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0xBFC0865Cu); goto label_BFC0865C; } #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, 0x38u); #endif /* 0xBFC08610: 00A4182B sltu $v1, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x00A4182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08614: 10600007 beq $v1, $zero, 0xBFC08634 */ uint32_t psx_brA_BFC08614 = cpu->gpr[3]; uint32_t psx_brB_BFC08614 = cpu->gpr[0]; psx_taken_BFC08614 = (psx_brA_BFC08614 == psx_brB_BFC08614); psx_delay_BFC08614 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC08618: 00A62821 addu $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A62821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08618u); #endif if (psx_delay_BFC08614) { psx_delay_BFC08614 = 0; if (psx_taken_BFC08614) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08634u); goto label_BFC08634; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0861Cu); } label_BFC0861C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0861Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0861Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0861Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xD0u); #endif /* 0xBFC0861C: 00863821 addu $a3, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0861Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC08620: 00A01825 or $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(0x00A01825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08620u); #endif 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, 0x38u); #endif /* 0xBFC08624: 00A32023 subu $a0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[5] - cpu->gpr[3]; PGXP_ALU(0x00A32023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC08628: 0086202B sltu $a0, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < cpu->gpr[6] ? 1 : 0); PGXP_ALU(0x0086202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0862Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0862C: 1480000D bne $a0, $zero, 0xBFC08664 */ uint32_t psx_brA_BFC0862C = cpu->gpr[4]; uint32_t psx_brB_BFC0862C = cpu->gpr[0]; psx_taken_BFC0862C = (psx_brA_BFC0862C != psx_brB_BFC0862C); psx_delay_BFC0862C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC08630: 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(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, 0xBFC08664u); goto label_BFC08664; } #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, 0x80000001u); #endif /* 0xBFC08634: 03E00008 jr $ra */ psx_delay_BFC08634 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08638: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08638u); #endif if (psx_delay_BFC08634) { psx_delay_BFC08634 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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 /* 0xBFC0863C: 90870000 lbu $a3, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 7, 0x10u); PGXP_LOAD(0x90870000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC0863Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC08640: 00432021 addu $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00432021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x90u); #endif /* 0xBFC08644: A0870000 sb $a3, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08644u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (0)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0870000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC08644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08648: 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(0xBFC08648u); #endif 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, 0x48u); #endif /* 0xBFC0864C: 1466FFFB bne $v1, $a2, 0xBFC0863C */ uint32_t psx_brA_BFC0864C = cpu->gpr[3]; uint32_t psx_brB_BFC0864C = cpu->gpr[6]; 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, 0x38u); #endif /* 0xBFC08650: 00A32021 addu $a0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A32021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0xBFC0863Cu); goto label_BFC0863C; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08654: 03E00008 jr $ra */ psx_delay_BFC08654 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08658: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08658u); #endif if (psx_delay_BFC08654) { psx_delay_BFC08654 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0865C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0865Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0865Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0865Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0865C: 1000FFFB beq $zero, $zero, 0xBFC0864C */ uint32_t psx_brA_BFC0865C = cpu->gpr[0]; uint32_t psx_brB_BFC0865C = cpu->gpr[0]; psx_taken_BFC0865C = (psx_brA_BFC0865C == psx_brB_BFC0865C); psx_delay_BFC0865C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08660: 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(0xBFC08660u); #endif if (psx_delay_BFC0865C) { psx_delay_BFC0865C = 0; if (psx_taken_BFC0865C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0864Cu); goto label_BFC0864C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08664u); } label_BFC08664: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08664u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08664u); #endif /* 0xBFC08664: 9064FFFF lbu $a0, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-1)), 4, 0x8u); PGXP_LOAD(0x9064FFFFu, _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, 0x8u); #endif /* 0xBFC08668: 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(0xBFC08668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0866Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0866C: 1000FFED beq $zero, $zero, 0xBFC08624 */ uint32_t psx_brA_BFC0866C = cpu->gpr[0]; uint32_t psx_brB_BFC0866C = cpu->gpr[0]; psx_taken_BFC0866C = (psx_brA_BFC0866C == psx_brB_BFC0866C); psx_delay_BFC0866C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC08670: A0E40000 sb $a0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08670u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0E40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08670u); #endif if (psx_delay_BFC0866C) { psx_delay_BFC0866C = 0; if (psx_taken_BFC0866C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08624u); goto label_BFC08624; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08674u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08674u); cpu->pc = 0xBFC08674u; return; /* fallthrough */ } void OpenBIOS_func_1FC08674(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08674u); int psx_delay_BFC08678 = 0; int psx_taken_BFC08678 = 0; int psx_delay_BFC08680 = 0; int psx_delay_BFC0869C = 0; int psx_taken_BFC0869C = 0; int psx_delay_BFC086A4 = 0; int psx_taken_BFC086A4 = 0; int psx_delay_BFC086AC = 0; int psx_taken_BFC086AC = 0; int psx_delay_BFC086B4 = 0; int psx_delay_BFC086BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08678u: goto label_BFC08678; case 0xBFC08680u: goto label_BFC08680; case 0xBFC08688u: goto label_BFC08688; case 0xBFC086A4u: goto label_BFC086A4; case 0xBFC086ACu: goto label_BFC086AC; case 0xBFC086B4u: goto label_BFC086B4; case 0xBFC086BCu: goto label_BFC086BC; default: break; } } label_BFC08674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08674u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08674: 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(0xBFC08674u); #endif 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, 0x44u); #endif /* 0xBFC08678: 14460003 bne $v0, $a2, 0xBFC08688 */ uint32_t psx_brA_BFC08678 = cpu->gpr[2]; uint32_t psx_brB_BFC08678 = cpu->gpr[6]; psx_taken_BFC08678 = (psx_brA_BFC08678 != psx_brB_BFC08678); psx_delay_BFC08678 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0867Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0867C: 00821821 addu $v1, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0867Cu); #endif if (psx_delay_BFC08678) { psx_delay_BFC08678 = 0; if (psx_taken_BFC08678) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08688u); goto label_BFC08688; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08680u); } label_BFC08680: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08680u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08680: 03E00008 jr $ra */ psx_delay_BFC08680 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08684: 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(0xBFC08684u); #endif if (psx_delay_BFC08680) { psx_delay_BFC08680 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC08688: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08688u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA4u); #endif /* 0xBFC08688: 00A23821 addu $a3, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A23821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0868Cu); #endif /* 0xBFC0868C: 90630000 lbu $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x90630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC0868Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08690u); #endif /* 0xBFC08690: 90E70000 lbu $a3, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (0)), 7, 0x80u); PGXP_LOAD(0x90E70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC08690u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x188u); #endif /* 0xBFC08698: 0067402B sltu $t0, $v1, $a3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[7] ? 1 : 0); PGXP_ALU(0x0067402Bu, cpu->gpr[8], _pgx1, _pgx2); } #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, 0x101u); #endif /* 0xBFC0869C: 15000005 bne $t0, $zero, 0xBFC086B4 */ uint32_t psx_brA_BFC0869C = cpu->gpr[8]; uint32_t psx_brB_BFC0869C = cpu->gpr[0]; psx_taken_BFC0869C = (psx_brA_BFC0869C != psx_brB_BFC0869C); psx_delay_BFC0869C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC086A0: 00E3182B sltu $v1, $a3, $v1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[7] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x00E3182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC086A0u); #endif if (psx_delay_BFC0869C) { psx_delay_BFC0869C = 0; if (psx_taken_BFC0869C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086B4u); goto label_BFC086B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086A4u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC086A4: 14600005 bne $v1, $zero, 0xBFC086BC */ uint32_t psx_brA_BFC086A4 = cpu->gpr[3]; uint32_t psx_brB_BFC086A4 = cpu->gpr[0]; psx_taken_BFC086A4 = (psx_brA_BFC086A4 != psx_brB_BFC086A4); psx_delay_BFC086A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC086A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC086A8u); #endif if (psx_delay_BFC086A4) { psx_delay_BFC086A4 = 0; if (psx_taken_BFC086A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086BCu); goto label_BFC086BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086ACu); } label_BFC086AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC086ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC086AC: 1000FFF2 beq $zero, $zero, 0xBFC08678 */ uint32_t psx_brA_BFC086AC = cpu->gpr[0]; uint32_t psx_brB_BFC086AC = cpu->gpr[0]; psx_taken_BFC086AC = (psx_brA_BFC086AC == psx_brB_BFC086AC); psx_delay_BFC086AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC086B0: 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(0xBFC086B0u); #endif if (psx_delay_BFC086AC) { psx_delay_BFC086AC = 0; if (psx_taken_BFC086AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08678u); goto label_BFC08678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086B4u); } label_BFC086B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC086B4: 03E00008 jr $ra */ psx_delay_BFC086B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC086B8: 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(0xBFC086B8u); #endif if (psx_delay_BFC086B4) { psx_delay_BFC086B4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC086BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC086BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC086BC: 03E00008 jr $ra */ psx_delay_BFC086BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC086C0: 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(0xBFC086C0u); #endif if (psx_delay_BFC086BC) { psx_delay_BFC086BC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC086C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC086C4u); int psx_delay_BFC086D0 = 0; int psx_taken_BFC086D0 = 0; int psx_delay_BFC086D8 = 0; int psx_delay_BFC086E0 = 0; int psx_taken_BFC086E0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC086D0u: goto label_BFC086D0; case 0xBFC086D8u: goto label_BFC086D8; case 0xBFC086E0u: goto label_BFC086E0; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC086C4: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x50u); #endif /* 0xBFC086C8: 00863021 addu $a2, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x19u); #endif /* 0xBFC086CC: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC086CCu); #endif label_BFC086D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC086D0: 14660003 bne $v1, $a2, 0xBFC086E0 */ uint32_t psx_brA_BFC086D0 = cpu->gpr[3]; uint32_t psx_brB_BFC086D0 = cpu->gpr[6]; psx_taken_BFC086D0 = (psx_brA_BFC086D0 != psx_brB_BFC086D0); psx_delay_BFC086D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC086D4: 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(0xBFC086D4u); #endif if (psx_delay_BFC086D0) { psx_delay_BFC086D0 = 0; if (psx_taken_BFC086D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086E0u); goto label_BFC086E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086D8u); } label_BFC086D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC086D8: 03E00008 jr $ra */ psx_delay_BFC086D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC086DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC086DCu); #endif if (psx_delay_BFC086D8) { psx_delay_BFC086D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC086E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC086E0: 1000FFFB beq $zero, $zero, 0xBFC086D0 */ uint32_t psx_brA_BFC086E0 = cpu->gpr[0]; uint32_t psx_brB_BFC086E0 = cpu->gpr[0]; psx_taken_BFC086E0 = (psx_brA_BFC086E0 == psx_brB_BFC086E0); psx_delay_BFC086E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC086E4: A065FFFF sb $a1, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC086E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA065FFFFu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC086E4u); #endif if (psx_delay_BFC086E0) { psx_delay_BFC086E0 = 0; if (psx_taken_BFC086E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086D0u); goto label_BFC086D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086E8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086E8u); cpu->pc = 0xBFC086E8u; return; /* fallthrough */ } void OpenBIOS_func_1FC086E8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC086E8u); int psx_delay_BFC086EC = 0; int psx_taken_BFC086EC = 0; int psx_delay_BFC086F4 = 0; int psx_taken_BFC086F4 = 0; int psx_delay_BFC08718 = 0; int psx_delay_BFC08720 = 0; int psx_taken_BFC08720 = 0; int psx_delay_BFC08750 = 0; int psx_taken_BFC08750 = 0; int psx_delay_BFC08758 = 0; int psx_taken_BFC08758 = 0; int psx_delay_BFC08768 = 0; int psx_taken_BFC08768 = 0; int psx_delay_BFC08770 = 0; int psx_taken_BFC08770 = 0; int psx_delay_BFC08780 = 0; int psx_taken_BFC08780 = 0; int psx_delay_BFC08788 = 0; int psx_taken_BFC08788 = 0; int psx_delay_BFC08794 = 0; int psx_taken_BFC08794 = 0; int psx_delay_BFC087A0 = 0; int psx_delay_BFC087B0 = 0; int psx_taken_BFC087B0 = 0; int psx_delay_BFC087B8 = 0; int psx_taken_BFC087B8 = 0; int psx_delay_BFC087CC = 0; int psx_taken_BFC087CC = 0; int psx_delay_BFC087D4 = 0; int psx_taken_BFC087D4 = 0; int psx_delay_BFC087E0 = 0; int psx_taken_BFC087E0 = 0; int psx_delay_BFC087E8 = 0; int psx_taken_BFC087E8 = 0; int psx_delay_BFC087FC = 0; int psx_taken_BFC087FC = 0; int psx_delay_BFC08810 = 0; int psx_taken_BFC08810 = 0; int psx_delay_BFC08818 = 0; int psx_taken_BFC08818 = 0; int psx_delay_BFC08840 = 0; int psx_taken_BFC08840 = 0; int psx_delay_BFC08848 = 0; int psx_delay_BFC08850 = 0; int psx_taken_BFC08850 = 0; int psx_delay_BFC08858 = 0; int psx_taken_BFC08858 = 0; int psx_delay_BFC08860 = 0; int psx_taken_BFC08860 = 0; int psx_delay_BFC08870 = 0; int psx_taken_BFC08870 = 0; int psx_delay_BFC08878 = 0; int psx_taken_BFC08878 = 0; int psx_delay_BFC0888C = 0; int psx_taken_BFC0888C = 0; int psx_delay_BFC088A0 = 0; int psx_taken_BFC088A0 = 0; int psx_delay_BFC088B4 = 0; int psx_taken_BFC088B4 = 0; int psx_delay_BFC088C4 = 0; int psx_taken_BFC088C4 = 0; int psx_delay_BFC088CC = 0; int psx_taken_BFC088CC = 0; int psx_delay_BFC088D4 = 0; int psx_taken_BFC088D4 = 0; int psx_delay_BFC088E8 = 0; int psx_taken_BFC088E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC086F4u: goto label_BFC086F4; case 0xBFC086FCu: goto label_BFC086FC; case 0xBFC08720u: goto label_BFC08720; case 0xBFC08728u: goto label_BFC08728; case 0xBFC0872Cu: goto label_BFC0872C; case 0xBFC08758u: goto label_BFC08758; case 0xBFC08760u: goto label_BFC08760; case 0xBFC08770u: goto label_BFC08770; case 0xBFC08778u: goto label_BFC08778; case 0xBFC08788u: goto label_BFC08788; case 0xBFC08790u: goto label_BFC08790; case 0xBFC08794u: goto label_BFC08794; case 0xBFC0879Cu: goto label_BFC0879C; case 0xBFC087A0u: goto label_BFC087A0; case 0xBFC087A8u: goto label_BFC087A8; case 0xBFC087B8u: goto label_BFC087B8; case 0xBFC087C0u: goto label_BFC087C0; case 0xBFC087CCu: goto label_BFC087CC; case 0xBFC087D4u: goto label_BFC087D4; case 0xBFC087DCu: goto label_BFC087DC; case 0xBFC087E8u: goto label_BFC087E8; case 0xBFC087F0u: goto label_BFC087F0; case 0xBFC087F4u: goto label_BFC087F4; case 0xBFC08804u: goto label_BFC08804; case 0xBFC08818u: goto label_BFC08818; case 0xBFC08820u: goto label_BFC08820; case 0xBFC08848u: goto label_BFC08848; case 0xBFC08850u: goto label_BFC08850; case 0xBFC08858u: goto label_BFC08858; case 0xBFC08860u: goto label_BFC08860; case 0xBFC08868u: goto label_BFC08868; case 0xBFC0886Cu: goto label_BFC0886C; case 0xBFC08870u: goto label_BFC08870; case 0xBFC08878u: goto label_BFC08878; case 0xBFC08880u: goto label_BFC08880; case 0xBFC08894u: goto label_BFC08894; case 0xBFC08898u: goto label_BFC08898; case 0xBFC088A8u: goto label_BFC088A8; case 0xBFC088BCu: goto label_BFC088BC; case 0xBFC088CCu: goto label_BFC088CC; case 0xBFC088D4u: goto label_BFC088D4; case 0xBFC088DCu: goto label_BFC088DC; default: break; } } label_BFC086E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC086E8: 2CC20025 sltiu $v0, $a2, 37 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = (uint32_t)(cpu->gpr[6] < 0x00000025u ? 1 : 0); PGXP_ALU(0x2CC20025u, cpu->gpr[2], _pgx1, 0x0025u); } #ifdef PSX_COSIM cosim_instr(0xBFC086E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC086EC: 10400003 beq $v0, $zero, 0xBFC086FC */ uint32_t psx_brA_BFC086EC = cpu->gpr[2]; uint32_t psx_brB_BFC086EC = cpu->gpr[0]; psx_taken_BFC086EC = (psx_brA_BFC086EC == psx_brB_BFC086EC); psx_delay_BFC086EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC086F0: 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(0xBFC086F0u); #endif if (psx_delay_BFC086EC) { psx_delay_BFC086EC = 0; if (psx_taken_BFC086EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086FCu); goto label_BFC086FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086F4u); } label_BFC086F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC086F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC086F4: 14C2000A bne $a2, $v0, 0xBFC08720 */ uint32_t psx_brA_BFC086F4 = cpu->gpr[6]; uint32_t psx_brB_BFC086F4 = cpu->gpr[2]; psx_taken_BFC086F4 = (psx_brA_BFC086F4 != psx_brB_BFC086F4); psx_delay_BFC086F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC086F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC086F8u); #endif if (psx_delay_BFC086F4) { psx_delay_BFC086F4 = 0; if (psx_taken_BFC086F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08720u); goto label_BFC08720; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC086FCu); } label_BFC086FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC086FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC086FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC086FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC086FC: 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(0xBFC086FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08700: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08704: AC624C74 sw $v0, 19572($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19572)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08704u); return; } g_debug_last_store_pc = 0xBFC08704u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624C74u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08708: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0870Cu); #endif /* 0xBFC0870C: 8C634B88 lw $v1, 19336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC0870Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C634B88u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC08710: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC08714: 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, 0xBFC08714u); return; } g_debug_last_store_pc = 0xBFC08714u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08718: 03E00008 jr $ra */ psx_delay_BFC08718 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0871Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0871C: 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(0xBFC0871Cu); #endif if (psx_delay_BFC08718) { psx_delay_BFC08718 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x41u); #endif /* 0xBFC08720: 10C0006C beq $a2, $zero, 0xBFC088D4 */ uint32_t psx_brA_BFC08720 = cpu->gpr[6]; uint32_t psx_brB_BFC08720 = cpu->gpr[0]; psx_taken_BFC08720 = (psx_brA_BFC08720 == psx_brB_BFC08720); psx_delay_BFC08720 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC08724: 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(0xBFC08724u); #endif if (psx_delay_BFC08720) { psx_delay_BFC08720 = 0; if (psx_taken_BFC08720) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088D4u); goto label_BFC088D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08728u); } label_BFC08728: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08728u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC08728: 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(0xBFC08728u); #endif label_BFC0872C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0872Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0872Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0872Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0872C: 3C0B7FFF lui $t3, 0x7FFF */ cpu->gpr[11] = 0x7FFF0000u; PGXP_ALU(0x3C0B7FFFu, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0872Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08730: 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(0xBFC08730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC08734: 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(0xBFC08734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC08738: 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(0xBFC08738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0873Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0873C: 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(0xBFC0873Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08740: 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(0xBFC08740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC08744: 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(0xBFC08744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08748: 240DFFFD addiu $t5, $zero, -3 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[0] + (-3)); PGXP_ALU(0x240DFFFDu, cpu->gpr[13], _pgx1, 0xFFFFFFFDu); } #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, 0x4001u); #endif /* 0xBFC0874C: 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(0xBFC0874Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08750: 10000009 beq $zero, $zero, 0xBFC08778 */ uint32_t psx_brA_BFC08750 = cpu->gpr[0]; uint32_t psx_brB_BFC08750 = cpu->gpr[0]; psx_taken_BFC08750 = (psx_brA_BFC08750 == psx_brB_BFC08750); psx_delay_BFC08750 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC08754: 240F0078 addiu $t7, $zero, 120 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); PGXP_ALU(0x240F0078u, cpu->gpr[15], _pgx1, 0x00000078u); } #ifdef PSX_COSIM cosim_instr(0xBFC08754u); #endif if (psx_delay_BFC08750) { psx_delay_BFC08750 = 0; if (psx_taken_BFC08750) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08778u); goto label_BFC08778; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08758u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1008u); #endif /* 0xBFC08758: 106C0005 beq $v1, $t4, 0xBFC08770 */ uint32_t psx_brA_BFC08758 = cpu->gpr[3]; uint32_t psx_brB_BFC08758 = cpu->gpr[12]; psx_taken_BFC08758 = (psx_brA_BFC08758 == psx_brB_BFC08758); psx_delay_BFC08758 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0875Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC0875C: 2478FFF7 addiu $t8, $v1, -9 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] + (-9)); PGXP_ALU(0x2478FFF7u, cpu->gpr[24], _pgx1, 0xFFFFFFF7u); } #ifdef PSX_COSIM cosim_instr(0xBFC0875Cu); #endif if (psx_delay_BFC08758) { psx_delay_BFC08758 = 0; if (psx_taken_BFC08758) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08770u); goto label_BFC08770; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08760u); } label_BFC08760: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08760u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000000u); #endif /* 0xBFC08760: 331800FF andi $t8, $t8, 0xFF */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] & 0xFFu; PGXP_ALU(0x331800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } #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, 0x1000000u); #endif /* 0xBFC08764: 2F180005 sltiu $t8, $t8, 5 */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = (uint32_t)(cpu->gpr[24] < 0x00000005u ? 1 : 0); PGXP_ALU(0x2F180005u, cpu->gpr[24], _pgx1, 0x0005u); } #ifdef PSX_COSIM cosim_instr(0xBFC08764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC08768: 1300000F beq $t8, $zero, 0xBFC087A8 */ uint32_t psx_brA_BFC08768 = cpu->gpr[24]; uint32_t psx_brB_BFC08768 = cpu->gpr[0]; psx_taken_BFC08768 = (psx_brA_BFC08768 == psx_brB_BFC08768); psx_delay_BFC08768 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0876Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC0876C: 2478FFD5 addiu $t8, $v1, -43 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] + (-43)); PGXP_ALU(0x2478FFD5u, cpu->gpr[24], _pgx1, 0xFFFFFFD5u); } #ifdef PSX_COSIM cosim_instr(0xBFC0876Cu); #endif if (psx_delay_BFC08768) { psx_delay_BFC08768 = 0; if (psx_taken_BFC08768) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087A8u); goto label_BFC087A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08770u); } label_BFC08770: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08770u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC08770: 14E0004D bne $a3, $zero, 0xBFC088A8 */ uint32_t psx_brA_BFC08770 = cpu->gpr[7]; uint32_t psx_brB_BFC08770 = cpu->gpr[0]; psx_taken_BFC08770 = (psx_brA_BFC08770 != psx_brB_BFC08770); psx_delay_BFC08770 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08774: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08774u); #endif if (psx_delay_BFC08770) { psx_delay_BFC08770 = 0; if (psx_taken_BFC08770) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088A8u); goto label_BFC088A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08778u); } label_BFC08778: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08778u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08778u); #endif /* 0xBFC08778: 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(0xBFC08778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0877Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0877C: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC08780: 1460FFF5 bne $v1, $zero, 0xBFC08758 */ uint32_t psx_brA_BFC08780 = cpu->gpr[3]; uint32_t psx_brB_BFC08780 = cpu->gpr[0]; psx_taken_BFC08780 = (psx_brA_BFC08780 != psx_brB_BFC08780); psx_delay_BFC08780 = 1; #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 if (psx_delay_BFC08780) { psx_delay_BFC08780 = 0; if (psx_taken_BFC08780) { #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, 0xBFC08788u); } label_BFC08788: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08788u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08788: 10A00002 beq $a1, $zero, 0xBFC08794 */ uint32_t psx_brA_BFC08788 = cpu->gpr[5]; uint32_t psx_brB_BFC08788 = cpu->gpr[0]; psx_taken_BFC08788 = (psx_brA_BFC08788 == psx_brB_BFC08788); psx_delay_BFC08788 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0878Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0878C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0878Cu); #endif if (psx_delay_BFC08788) { psx_delay_BFC08788 = 0; if (psx_taken_BFC08788) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08794u); goto label_BFC08794; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08790u); } label_BFC08790: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08790u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC08790: 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, 0xBFC08790u); return; } g_debug_last_store_pc = 0xBFC08790u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08790u); #endif label_BFC08794: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08794u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC08794: 11200002 beq $t1, $zero, 0xBFC087A0 */ uint32_t psx_brA_BFC08794 = cpu->gpr[9]; uint32_t psx_brB_BFC08794 = cpu->gpr[0]; psx_taken_BFC08794 = (psx_brA_BFC08794 == psx_brB_BFC08794); psx_delay_BFC08794 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08798: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08798u); #endif if (psx_delay_BFC08794) { psx_delay_BFC08794 = 0; if (psx_taken_BFC08794) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087A0u); goto label_BFC087A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0879Cu); } label_BFC0879C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0879Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0879Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0879Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0879C: 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(0xBFC0879Cu); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC087A0: 03E00008 jr $ra */ psx_delay_BFC087A0 = 1; #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 if (psx_delay_BFC087A0) { psx_delay_BFC087A0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC087A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1002000u); #endif /* 0xBFC087A8: 030DC024 and $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(0x030DC024u, cpu->gpr[24], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC087A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000000u); #endif /* 0xBFC087AC: 331800FF andi $t8, $t8, 0xFF */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[24] = cpu->gpr[24] & 0xFFu; PGXP_ALU(0x331800FFu, cpu->gpr[24], _pgx1, 0x00FFu); } #ifdef PSX_COSIM cosim_instr(0xBFC087ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC087B0: 17000008 bne $t8, $zero, 0xBFC087D4 */ uint32_t psx_brA_BFC087B0 = cpu->gpr[24]; uint32_t psx_brB_BFC087B0 = cpu->gpr[0]; psx_taken_BFC087B0 = (psx_brA_BFC087B0 != psx_brB_BFC087B0); psx_delay_BFC087B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC087B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC087B4u); #endif if (psx_delay_BFC087B0) { psx_delay_BFC087B0 = 0; if (psx_taken_BFC087B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087D4u); goto label_BFC087D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087B8u); } label_BFC087B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC087B8: 14E00036 bne $a3, $zero, 0xBFC08894 */ uint32_t psx_brA_BFC087B8 = cpu->gpr[7]; uint32_t psx_brB_BFC087B8 = cpu->gpr[0]; psx_taken_BFC087B8 = (psx_brA_BFC087B8 != psx_brB_BFC087B8); psx_delay_BFC087B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC087BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC087BCu); #endif if (psx_delay_BFC087B8) { psx_delay_BFC087B8 = 0; if (psx_taken_BFC087B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08894u); goto label_BFC08894; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087C0u); } label_BFC087C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC087C0: 3863002D xori $v1, $v1, 0x2D */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] ^ 0x2Du; PGXP_ALU(0x3863002Du, cpu->gpr[3], _pgx1, 0x002Du); } #ifdef PSX_COSIM cosim_instr(0xBFC087C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC087C4: 2C630001 sltiu $v1, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC087C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC087C8: 01234825 or $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(0x01234825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC087C8u); #endif label_BFC087CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC087CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC087CC: 1000FFEA beq $zero, $zero, 0xBFC08778 */ uint32_t psx_brA_BFC087CC = cpu->gpr[0]; uint32_t psx_brB_BFC087CC = cpu->gpr[0]; psx_taken_BFC087CC = (psx_brA_BFC087CC == psx_brB_BFC087CC); psx_delay_BFC087CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC087D0: 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(0xBFC087D0u); #endif if (psx_delay_BFC087CC) { psx_delay_BFC087CC = 0; if (psx_taken_BFC087CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08778u); goto label_BFC08778; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087D4u); } label_BFC087D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4008u); #endif /* 0xBFC087D4: 146E001E bne $v1, $t6, 0xBFC08850 */ uint32_t psx_brA_BFC087D4 = cpu->gpr[3]; uint32_t psx_brB_BFC087D4 = cpu->gpr[14]; psx_taken_BFC087D4 = (psx_brA_BFC087D4 != psx_brB_BFC087D4); psx_delay_BFC087D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC087D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC087D8u); #endif if (psx_delay_BFC087D4) { psx_delay_BFC087D4 = 0; if (psx_taken_BFC087D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08850u); goto label_BFC08850; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087DCu); } label_BFC087DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC087DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40Cu); #endif /* 0xBFC087DC: 004A1825 or $v1, $v0, $t2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[3] = cpu->gpr[2] | cpu->gpr[10]; PGXP_ALU(0x004A1825u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC087E0: 14600003 bne $v1, $zero, 0xBFC087F0 */ uint32_t psx_brA_BFC087E0 = cpu->gpr[3]; uint32_t psx_brB_BFC087E0 = cpu->gpr[0]; psx_taken_BFC087E0 = (psx_brA_BFC087E0 != psx_brB_BFC087E0); psx_delay_BFC087E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC087E4: 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(0xBFC087E4u); #endif if (psx_delay_BFC087E0) { psx_delay_BFC087E0 = 0; if (psx_taken_BFC087E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087F0u); goto label_BFC087F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087E8u); } label_BFC087E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC087E8: 1500003C bne $t0, $zero, 0xBFC088DC */ uint32_t psx_brA_BFC087E8 = cpu->gpr[8]; uint32_t psx_brB_BFC087E8 = cpu->gpr[0]; psx_taken_BFC087E8 = (psx_brA_BFC087E8 != psx_brB_BFC087E8); psx_delay_BFC087E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC087EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC087ECu); #endif if (psx_delay_BFC087E8) { psx_delay_BFC087E8 = 0; if (psx_taken_BFC087E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088DCu); goto label_BFC088DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087F0u); } label_BFC087F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC087F0: 00071E00 sll $v1, $a3, 24 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 24u; PGXP_ALU(0x00071E00u, cpu->gpr[3], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0xBFC087F0u); #endif label_BFC087F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC087F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC087F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC087F4: 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(0xBFC087F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC8u); #endif /* 0xBFC087F8: 0066382A slt $a3, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[6] ? 1 : 0); PGXP_ALU(0x0066382Au, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC087F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC087FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC087FC: 10E0FFE2 beq $a3, $zero, 0xBFC08788 */ uint32_t psx_brA_BFC087FC = cpu->gpr[7]; uint32_t psx_brB_BFC087FC = cpu->gpr[0]; psx_taken_BFC087FC = (psx_brA_BFC087FC == psx_brB_BFC087FC); psx_delay_BFC087FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC08800: 00C20018 mult $a2, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[6] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[6])); #endif PGXP_MULDIV(0x00C20018u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0xBFC08800u); #endif if (psx_delay_BFC087FC) { psx_delay_BFC087FC = 0; if (psx_taken_BFC087FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08788u); goto label_BFC08788; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08804u); } label_BFC08804: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08804u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC08804: 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(0xBFC08804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC08808: 00671821 addu $v1, $v1, $a3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[7]; PGXP_ALU(0x00671821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0880Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0880C: 0062102B sltu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0062102Bu, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC08810: 14400003 bne $v0, $zero, 0xBFC08820 */ uint32_t psx_brA_BFC08810 = cpu->gpr[2]; uint32_t psx_brB_BFC08810 = cpu->gpr[0]; psx_taken_BFC08810 = (psx_brA_BFC08810 != psx_brB_BFC08810); psx_delay_BFC08810 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80Cu); #endif /* 0xBFC08814: 006B102B sltu $v0, $v1, $t3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)(cpu->gpr[3] < cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x006B102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08814u); #endif if (psx_delay_BFC08810) { psx_delay_BFC08810 = 0; if (psx_taken_BFC08810) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08820u); goto label_BFC08820; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08818u); } label_BFC08818: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08818u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08818: 1440FFEC bne $v0, $zero, 0xBFC087CC */ uint32_t psx_brA_BFC08818 = cpu->gpr[2]; uint32_t psx_brB_BFC08818 = cpu->gpr[0]; psx_taken_BFC08818 = (psx_brA_BFC08818 != psx_brB_BFC08818); psx_delay_BFC08818 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0881Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0881C: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0881Cu); #endif if (psx_delay_BFC08818) { psx_delay_BFC08818 = 0; if (psx_taken_BFC08818) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087CCu); goto label_BFC087CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08820u); } label_BFC08820: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08820u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08820: 24030022 addiu $v1, $zero, 34 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); PGXP_ALU(0x24030022u, cpu->gpr[3], _pgx1, 0x00000022u); } #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, 0x40u); #endif /* 0xBFC08824: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #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, 0x48u); #endif /* 0xBFC08828: ACC34C74 sw $v1, 19572($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19572)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08828u); return; } g_debug_last_store_pc = 0xBFC08828u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC34C74u, _pgxa, cpu->gpr[3]); } #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, 0x40u); #endif /* 0xBFC0882C: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0882Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08830u); #endif /* 0xBFC08830: 8CC64B88 lw $a2, 19336($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08830u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } PGXP_LOAD(0x8CC64B88u, _pgxa, cpu->gpr[6]); } #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, 0x4u); #endif /* 0xBFC08834: 3C027FFF lui $v0, 0x7FFF */ cpu->gpr[2] = 0x7FFF0000u; PGXP_ALU(0x3C027FFFu, cpu->gpr[2], 0u, 0u); #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: 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(0xBFC08838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0883Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0883C: 01221021 addu $v0, $t1, $v0 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[9] + cpu->gpr[2]; PGXP_ALU(0x01221021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0883Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08840: 10A0FFD7 beq $a1, $zero, 0xBFC087A0 */ uint32_t psx_brA_BFC08840 = cpu->gpr[5]; uint32_t psx_brB_BFC08840 = cpu->gpr[0]; psx_taken_BFC08840 = (psx_brA_BFC08840 == psx_brB_BFC08840); psx_delay_BFC08840 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC08844: 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, 0xBFC08844u); return; } g_debug_last_store_pc = 0xBFC08844u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08844u); #endif if (psx_delay_BFC08840) { psx_delay_BFC08840 = 0; if (psx_taken_BFC08840) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087A0u); goto label_BFC087A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08848u); } label_BFC08848: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08848u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08848: 03E00008 jr $ra */ psx_delay_BFC08848 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0884Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0884C: 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, 0xBFC0884Cu); return; } g_debug_last_store_pc = 0xBFC0884Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC0884Cu); #endif if (psx_delay_BFC08848) { psx_delay_BFC08848 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC08850: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08850u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8008u); #endif /* 0xBFC08850: 146F0011 bne $v1, $t7, 0xBFC08898 */ uint32_t psx_brA_BFC08850 = cpu->gpr[3]; uint32_t psx_brB_BFC08850 = cpu->gpr[15]; psx_taken_BFC08850 = (psx_brA_BFC08850 != psx_brB_BFC08850); psx_delay_BFC08850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC08854: 2467FFD0 addiu $a3, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2467FFD0u, cpu->gpr[7], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08854u); #endif if (psx_delay_BFC08850) { psx_delay_BFC08850 = 0; if (psx_taken_BFC08850) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08898u); goto label_BFC08898; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08858u); } label_BFC08858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC08858: 14400003 bne $v0, $zero, 0xBFC08868 */ uint32_t psx_brA_BFC08858 = cpu->gpr[2]; uint32_t psx_brB_BFC08858 = cpu->gpr[0]; psx_taken_BFC08858 = (psx_brA_BFC08858 != psx_brB_BFC08858); psx_delay_BFC08858 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0885Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0885C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0885Cu); #endif if (psx_delay_BFC08858) { psx_delay_BFC08858 = 0; if (psx_taken_BFC08858) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08868u); goto label_BFC08868; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08860u); } label_BFC08860: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08860u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC08860: 15400005 bne $t2, $zero, 0xBFC08878 */ uint32_t psx_brA_BFC08860 = cpu->gpr[10]; uint32_t psx_brB_BFC08860 = cpu->gpr[0]; psx_taken_BFC08860 = (psx_brA_BFC08860 != psx_brB_BFC08860); psx_delay_BFC08860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08864: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08864u); #endif if (psx_delay_BFC08860) { psx_delay_BFC08860 = 0; if (psx_taken_BFC08860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08878u); goto label_BFC08878; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08868u); } label_BFC08868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08868u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08868: 24030078 addiu $v1, $zero, 120 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); PGXP_ALU(0x24030078u, cpu->gpr[3], _pgx1, 0x00000078u); } #ifdef PSX_COSIM cosim_instr(0xBFC08868u); #endif label_BFC0886C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0886Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0886Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0886Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0886C: 2463FF95 addiu $v1, $v1, -107 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-107)); PGXP_ALU(0x2463FF95u, cpu->gpr[3], _pgx1, 0xFFFFFF95u); } #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, 0x1u); #endif /* 0xBFC08870: 1000FFE0 beq $zero, $zero, 0xBFC087F4 */ uint32_t psx_brA_BFC08870 = cpu->gpr[0]; uint32_t psx_brB_BFC08870 = cpu->gpr[0]; psx_taken_BFC08870 = (psx_brA_BFC08870 == psx_brB_BFC08870); psx_delay_BFC08870 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08874: 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(0xBFC08874u); #endif if (psx_delay_BFC08870) { psx_delay_BFC08870 = 0; if (psx_taken_BFC08870) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087F4u); goto label_BFC087F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08878u); } label_BFC08878: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08878u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC08878: 1100FFFC beq $t0, $zero, 0xBFC0886C */ uint32_t psx_brA_BFC08878 = cpu->gpr[8]; uint32_t psx_brB_BFC08878 = cpu->gpr[0]; psx_taken_BFC08878 = (psx_brA_BFC08878 == psx_brB_BFC08878); psx_delay_BFC08878 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0887Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0887C: 24030078 addiu $v1, $zero, 120 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); PGXP_ALU(0x24030078u, cpu->gpr[3], _pgx1, 0x00000078u); } #ifdef PSX_COSIM cosim_instr(0xBFC0887Cu); #endif if (psx_delay_BFC08878) { psx_delay_BFC08878 = 0; if (psx_taken_BFC08878) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0886Cu); goto label_BFC0886C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08880u); } label_BFC08880: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08880u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x181u); #endif /* 0xBFC08880: 01003825 or $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(0x01003825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x501u); #endif /* 0xBFC08884: 01005025 or $t2, $t0, $zero */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[8] | cpu->gpr[0]; PGXP_ALU(0x01005025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC08888: 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(0xBFC08888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0888Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0888C: 1000FFBA beq $zero, $zero, 0xBFC08778 */ uint32_t psx_brA_BFC0888C = cpu->gpr[0]; uint32_t psx_brB_BFC0888C = cpu->gpr[0]; psx_taken_BFC0888C = (psx_brA_BFC0888C == psx_brB_BFC0888C); psx_delay_BFC0888C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC08890: 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(0xBFC08890u); #endif if (psx_delay_BFC0888C) { psx_delay_BFC0888C = 0; if (psx_taken_BFC0888C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08778u); goto label_BFC08778; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08894u); } label_BFC08894: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08894u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC08894: 2467FFD0 addiu $a3, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2467FFD0u, cpu->gpr[7], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08894u); #endif label_BFC08898: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08898u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC08898: 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(0xBFC08898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0889Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000080u); #endif /* 0xBFC0889C: 2CF8000A sltiu $t8, $a3, 10 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[24] = (uint32_t)(cpu->gpr[7] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2CF8000Au, cpu->gpr[24], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC0889Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC088A0: 1700FFD3 bne $t8, $zero, 0xBFC087F0 */ uint32_t psx_brA_BFC088A0 = cpu->gpr[24]; uint32_t psx_brB_BFC088A0 = cpu->gpr[0]; psx_taken_BFC088A0 = (psx_brA_BFC088A0 != psx_brB_BFC088A0); psx_delay_BFC088A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC088A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC088A4u); #endif if (psx_delay_BFC088A0) { psx_delay_BFC088A0 = 0; if (psx_taken_BFC088A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC087F0u); goto label_BFC087F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088A8u); } label_BFC088A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC088A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC088A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC088A8: 2467FF9F addiu $a3, $v1, -97 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (-97)); PGXP_ALU(0x2467FF9Fu, cpu->gpr[7], _pgx1, 0xFFFFFF9Fu); } #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, 0x80u); #endif /* 0xBFC088AC: 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(0xBFC088ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC088B0: 2CE7001A sltiu $a3, $a3, 26 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2CE7001Au, cpu->gpr[7], _pgx1, 0x001Au); } #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, 0x81u); #endif /* 0xBFC088B4: 14E0FFED bne $a3, $zero, 0xBFC0886C */ uint32_t psx_brA_BFC088B4 = cpu->gpr[7]; uint32_t psx_brB_BFC088B4 = cpu->gpr[0]; psx_taken_BFC088B4 = (psx_brA_BFC088B4 != psx_brB_BFC088B4); psx_delay_BFC088B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC088B8: 2467FFBF addiu $a3, $v1, -65 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (-65)); PGXP_ALU(0x2467FFBFu, cpu->gpr[7], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0xBFC088B8u); #endif if (psx_delay_BFC088B4) { psx_delay_BFC088B4 = 0; if (psx_taken_BFC088B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0886Cu); goto label_BFC0886C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088BCu); } label_BFC088BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC088BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC088BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC088BC: 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(0xBFC088BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC088C0: 2CE7001A sltiu $a3, $a3, 26 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)(cpu->gpr[7] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2CE7001Au, cpu->gpr[7], _pgx1, 0x001Au); } #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, 0x81u); #endif /* 0xBFC088C4: 10E0FFB0 beq $a3, $zero, 0xBFC08788 */ uint32_t psx_brA_BFC088C4 = cpu->gpr[7]; uint32_t psx_brB_BFC088C4 = cpu->gpr[0]; psx_taken_BFC088C4 = (psx_brA_BFC088C4 == psx_brB_BFC088C4); psx_delay_BFC088C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC088C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC088C8u); #endif if (psx_delay_BFC088C4) { psx_delay_BFC088C4 = 0; if (psx_taken_BFC088C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08788u); goto label_BFC08788; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088CCu); } label_BFC088CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC088CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC088CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC088CC: 1000FFE8 beq $zero, $zero, 0xBFC08870 */ uint32_t psx_brA_BFC088CC = cpu->gpr[0]; uint32_t psx_brB_BFC088CC = cpu->gpr[0]; psx_taken_BFC088CC = (psx_brA_BFC088CC == psx_brB_BFC088CC); psx_delay_BFC088CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC088D0: 2463FFB5 addiu $v1, $v1, -75 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-75)); PGXP_ALU(0x2463FFB5u, cpu->gpr[3], _pgx1, 0xFFFFFFB5u); } #ifdef PSX_COSIM cosim_instr(0xBFC088D0u); #endif if (psx_delay_BFC088CC) { psx_delay_BFC088CC = 0; if (psx_taken_BFC088CC) { #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, 0xBFC088D4u); } 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, 0x1u); #endif /* 0xBFC088D4: 1000FF95 beq $zero, $zero, 0xBFC0872C */ uint32_t psx_brA_BFC088D4 = cpu->gpr[0]; uint32_t psx_brB_BFC088D4 = cpu->gpr[0]; psx_taken_BFC088D4 = (psx_brA_BFC088D4 == psx_brB_BFC088D4); psx_delay_BFC088D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC088D8: 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(0xBFC088D8u); #endif if (psx_delay_BFC088D4) { psx_delay_BFC088D4 = 0; if (psx_taken_BFC088D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0872Cu); goto label_BFC0872C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088DCu); } label_BFC088DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC088DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC088DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x181u); #endif /* 0xBFC088DC: 01003825 or $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(0x01003825u, cpu->gpr[7], _pgx1, _pgx2); } #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, 0x501u); #endif /* 0xBFC088E0: 01005025 or $t2, $t0, $zero */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[8] | cpu->gpr[0]; PGXP_ALU(0x01005025u, cpu->gpr[10], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC088E4: 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(0xBFC088E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC088E8: 1000FFA3 beq $zero, $zero, 0xBFC08778 */ uint32_t psx_brA_BFC088E8 = cpu->gpr[0]; uint32_t psx_brB_BFC088E8 = cpu->gpr[0]; psx_taken_BFC088E8 = (psx_brA_BFC088E8 == psx_brB_BFC088E8); psx_delay_BFC088E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC088EC: 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(0xBFC088ECu); #endif if (psx_delay_BFC088E8) { psx_delay_BFC088E8 = 0; if (psx_taken_BFC088E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08778u); goto label_BFC08778; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088F0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC088F0u); cpu->pc = 0xBFC088F0u; return; /* fallthrough */ } void OpenBIOS_func_1FC088F0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC088F0u); int psx_delay_BFC08960 = 0; int psx_taken_BFC08960 = 0; int psx_delay_BFC0896C = 0; int psx_taken_BFC0896C = 0; int psx_delay_BFC08984 = 0; int psx_taken_BFC08984 = 0; int psx_delay_BFC0898C = 0; int psx_taken_BFC0898C = 0; int psx_delay_BFC089A0 = 0; int psx_delay_BFC089A8 = 0; int psx_taken_BFC089A8 = 0; int psx_delay_BFC089C0 = 0; int psx_taken_BFC089C0 = 0; int psx_delay_BFC089D4 = 0; int psx_delay_BFC08A0C = 0; int psx_delay_BFC08A44 = 0; int psx_taken_BFC08A44 = 0; int psx_delay_BFC08A4C = 0; int psx_taken_BFC08A4C = 0; int psx_delay_BFC08A54 = 0; int psx_taken_BFC08A54 = 0; int psx_delay_BFC08A5C = 0; int psx_taken_BFC08A5C = 0; int psx_delay_BFC08A64 = 0; int psx_taken_BFC08A64 = 0; int psx_delay_BFC08A78 = 0; int psx_taken_BFC08A78 = 0; int psx_delay_BFC08A88 = 0; int psx_taken_BFC08A88 = 0; int psx_delay_BFC08AA8 = 0; int psx_taken_BFC08AA8 = 0; int psx_delay_BFC08AB8 = 0; int psx_taken_BFC08AB8 = 0; int psx_delay_BFC08AC8 = 0; int psx_taken_BFC08AC8 = 0; int psx_delay_BFC08ADC = 0; int psx_taken_BFC08ADC = 0; int psx_delay_BFC08AFC = 0; int psx_taken_BFC08AFC = 0; int psx_delay_BFC08B04 = 0; int psx_taken_BFC08B04 = 0; int psx_delay_BFC08B0C = 0; int psx_taken_BFC08B0C = 0; int psx_delay_BFC08B20 = 0; int psx_taken_BFC08B20 = 0; int psx_delay_BFC08B28 = 0; int psx_taken_BFC08B28 = 0; int psx_delay_BFC08B30 = 0; int psx_taken_BFC08B30 = 0; int psx_delay_BFC08B38 = 0; int psx_taken_BFC08B38 = 0; int psx_delay_BFC08B40 = 0; int psx_taken_BFC08B40 = 0; int psx_delay_BFC08B48 = 0; int psx_taken_BFC08B48 = 0; int psx_delay_BFC08B50 = 0; int psx_taken_BFC08B50 = 0; int psx_delay_BFC08B80 = 0; int psx_taken_BFC08B80 = 0; int psx_delay_BFC08B88 = 0; int psx_taken_BFC08B88 = 0; int psx_delay_BFC08B90 = 0; int psx_taken_BFC08B90 = 0; int psx_delay_BFC08BB8 = 0; int psx_taken_BFC08BB8 = 0; int psx_delay_BFC08BC8 = 0; int psx_taken_BFC08BC8 = 0; int psx_delay_BFC08BF4 = 0; int psx_taken_BFC08BF4 = 0; int psx_delay_BFC08C18 = 0; int psx_taken_BFC08C18 = 0; int psx_delay_BFC08C2C = 0; int psx_taken_BFC08C2C = 0; int psx_delay_BFC08C48 = 0; int psx_delay_BFC08C50 = 0; int psx_taken_BFC08C50 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08958u: goto label_BFC08958; case 0xBFC08968u: goto label_BFC08968; case 0xBFC08974u: goto label_BFC08974; case 0xBFC08978u: goto label_BFC08978; case 0xBFC0898Cu: goto label_BFC0898C; case 0xBFC08994u: goto label_BFC08994; case 0xBFC08998u: goto label_BFC08998; case 0xBFC089A8u: goto label_BFC089A8; case 0xBFC089B0u: goto label_BFC089B0; case 0xBFC089B8u: goto label_BFC089B8; case 0xBFC089C8u: goto label_BFC089C8; case 0xBFC089DCu: goto label_BFC089DC; case 0xBFC089E0u: goto label_BFC089E0; case 0xBFC08A14u: goto label_BFC08A14; case 0xBFC08A44u: goto label_BFC08A44; case 0xBFC08A4Cu: goto label_BFC08A4C; case 0xBFC08A54u: goto label_BFC08A54; case 0xBFC08A5Cu: goto label_BFC08A5C; case 0xBFC08A64u: goto label_BFC08A64; case 0xBFC08A6Cu: goto label_BFC08A6C; case 0xBFC08A70u: goto label_BFC08A70; case 0xBFC08A80u: goto label_BFC08A80; case 0xBFC08A90u: goto label_BFC08A90; case 0xBFC08A98u: goto label_BFC08A98; case 0xBFC08AA8u: goto label_BFC08AA8; case 0xBFC08AB0u: goto label_BFC08AB0; case 0xBFC08AB4u: goto label_BFC08AB4; case 0xBFC08AC0u: goto label_BFC08AC0; case 0xBFC08AD0u: goto label_BFC08AD0; case 0xBFC08AD8u: goto label_BFC08AD8; case 0xBFC08AE4u: goto label_BFC08AE4; case 0xBFC08B04u: goto label_BFC08B04; case 0xBFC08B0Cu: goto label_BFC08B0C; case 0xBFC08B14u: goto label_BFC08B14; case 0xBFC08B18u: goto label_BFC08B18; case 0xBFC08B28u: goto label_BFC08B28; case 0xBFC08B30u: goto label_BFC08B30; case 0xBFC08B38u: goto label_BFC08B38; case 0xBFC08B40u: goto label_BFC08B40; case 0xBFC08B48u: goto label_BFC08B48; case 0xBFC08B50u: goto label_BFC08B50; case 0xBFC08B58u: goto label_BFC08B58; case 0xBFC08B78u: goto label_BFC08B78; case 0xBFC08B88u: goto label_BFC08B88; case 0xBFC08B90u: goto label_BFC08B90; case 0xBFC08B98u: goto label_BFC08B98; case 0xBFC08BB4u: goto label_BFC08BB4; case 0xBFC08BC0u: goto label_BFC08BC0; case 0xBFC08BC4u: goto label_BFC08BC4; case 0xBFC08BD0u: goto label_BFC08BD0; case 0xBFC08BD8u: goto label_BFC08BD8; case 0xBFC08BECu: goto label_BFC08BEC; case 0xBFC08BFCu: goto label_BFC08BFC; case 0xBFC08C20u: goto label_BFC08C20; case 0xBFC08C28u: goto label_BFC08C28; case 0xBFC08C34u: goto label_BFC08C34; case 0xBFC08C50u: goto label_BFC08C50; default: break; } } label_BFC088F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC088F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC088F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC088F0: 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(0xBFC088F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC088F4: 3C02BFC2 lui $v0, 0xBFC2 */ cpu->gpr[2] = 0xBFC20000u; PGXP_ALU(0x3C02BFC2u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC088F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC088F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC088F8: AFB600A8 sw $s6, 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, 0xBFC088F8u); return; } g_debug_last_store_pc = 0xBFC088F8u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB600A8u, _pgxa, cpu->gpr[22]); } #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, 0x400000u); #endif /* 0xBFC088FC: 3C16BFC2 lui $s6, 0xBFC2 */ cpu->gpr[22] = 0xBFC20000u; PGXP_ALU(0x3C16BFC2u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC088FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC08900: AFB700AC sw $s7, 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, 0xBFC08900u); return; } g_debug_last_store_pc = 0xBFC08900u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB700ACu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC08900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC08904: AFA2007C sw $v0, 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, 0xBFC08904u); return; } g_debug_last_store_pc = 0xBFC08904u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2007Cu, _pgxa, cpu->gpr[2]); } #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, 0x800000u); #endif /* 0xBFC08908: 3C17BFC2 lui $s7, 0xBFC2 */ cpu->gpr[23] = 0xBFC20000u; PGXP_ALU(0x3C17BFC2u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0890Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC0890C: 26C2E278 addiu $v0, $s6, -7560 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] + (-7560)); PGXP_ALU(0x26C2E278u, cpu->gpr[2], _pgx1, 0xFFFFE278u); } #ifdef PSX_COSIM cosim_instr(0xBFC0890Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC08910: AFA20078 sw $v0, 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, 0xBFC08910u); return; } g_debug_last_store_pc = 0xBFC08910u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20078u, _pgxa, cpu->gpr[2]); } #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, 0x800004u); #endif /* 0xBFC08914: 26E2E244 addiu $v0, $s7, -7612 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[23] + (-7612)); PGXP_ALU(0x26E2E244u, cpu->gpr[2], _pgx1, 0xFFFFE244u); } #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, 0x60000000u); #endif /* 0xBFC08918: AFBE00B0 sw $fp, 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, 0xBFC08918u); return; } g_debug_last_store_pc = 0xBFC08918u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE00B0u, _pgxa, cpu->gpr[30]); } #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, 0x20100000u); #endif /* 0xBFC0891C: AFB400A0 sw $s4, 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, 0xBFC0891Cu); return; } g_debug_last_store_pc = 0xBFC0891Cu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB400A0u, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC08920: AFB3009C sw $s3, 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, 0xBFC08920u); return; } g_debug_last_store_pc = 0xBFC08920u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3009Cu, _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, 0x20040000u); #endif /* 0xBFC08924: AFB20098 sw $s2, 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, 0xBFC08924u); return; } g_debug_last_store_pc = 0xBFC08924u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20098u, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC08928: AFB10094 sw $s1, 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, 0xBFC08928u); return; } g_debug_last_store_pc = 0xBFC08928u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10094u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC0892C: AFB00090 sw $s0, 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, 0xBFC0892Cu); return; } g_debug_last_store_pc = 0xBFC0892Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00090u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC0892Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC08930: AFBF00B4 sw $ra, 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, 0xBFC08930u); return; } g_debug_last_store_pc = 0xBFC08930u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF00B4u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC08930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC08934: AFB500A4 sw $s5, 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, 0xBFC08934u); return; } g_debug_last_store_pc = 0xBFC08934u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB500A4u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC08934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100011u); #endif /* 0xBFC08938: 0080A025 or $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(0x0080A025u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0893Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0893C: AFA500BC sw $a1, 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, 0xBFC0893Cu); return; } g_debug_last_store_pc = 0xBFC0893Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA500BCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC0893Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20041u); #endif /* 0xBFC08940: 00C08825 or $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(0x00C08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80081u); #endif /* 0xBFC08944: 00E09825 or $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(0x00E09825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC08948: 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(0xBFC08948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0894Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC0894C: 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(0xBFC0894Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC08950: 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(0xBFC08950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC08954: AFA20080 sw $v0, 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, 0xBFC08954u); return; } g_debug_last_store_pc = 0xBFC08954u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20080u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08954u); #endif label_BFC08958: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08958u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08958u); #endif /* 0xBFC08958: 82230000 lb $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x82230000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0895Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0895C: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC08960: 1060001F beq $v1, $zero, 0xBFC089E0 */ uint32_t psx_brA_BFC08960 = cpu->gpr[3]; uint32_t psx_brB_BFC08960 = cpu->gpr[0]; psx_taken_BFC08960 = (psx_brA_BFC08960 == psx_brB_BFC08960); psx_delay_BFC08960 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08964: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08964u); #endif if (psx_delay_BFC08960) { psx_delay_BFC08960 = 0; if (psx_taken_BFC08960) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC089E0u); goto label_BFC089E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08968u); } label_BFC08968: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08968u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08968: 24040025 addiu $a0, $zero, 37 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); PGXP_ALU(0x24040025u, cpu->gpr[4], _pgx1, 0x00000025u); } #ifdef PSX_COSIM cosim_instr(0xBFC08968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0896Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0896C: 10640012 beq $v1, $a0, 0xBFC089B8 */ uint32_t psx_brA_BFC0896C = cpu->gpr[3]; uint32_t psx_brB_BFC0896C = cpu->gpr[4]; psx_taken_BFC0896C = (psx_brA_BFC0896C == psx_brB_BFC0896C); psx_delay_BFC0896C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08970: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08970u); #endif if (psx_delay_BFC0896C) { psx_delay_BFC0896C = 0; if (psx_taken_BFC0896C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC089B8u); goto label_BFC089B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08974u); } label_BFC08974: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08974u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC08974: 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(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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x230000u); #endif /* 0xBFC08978: 0230A821 addu $s5, $s1, $s0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[21] = cpu->gpr[17] + cpu->gpr[16]; PGXP_ALU(0x0230A821u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0897Cu); #endif /* 0xBFC0897C: 82B60000 lb $s6, 0($s5) */ { uint32_t _pgxa = cpu->gpr[21]; cpu->gpr[22] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[21] + (0)), 22, 0x200000u); PGXP_LOAD(0x82B60000u, _pgxa, cpu->gpr[22]); } #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, 0x1u); #endif /* 0xBFC08980: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400010u); #endif /* 0xBFC08984: 12C40004 beq $s6, $a0, 0xBFC08998 */ uint32_t psx_brA_BFC08984 = cpu->gpr[22]; uint32_t psx_brB_BFC08984 = cpu->gpr[4]; psx_taken_BFC08984 = (psx_brA_BFC08984 == psx_brB_BFC08984); psx_delay_BFC08984 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08988: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08988u); #endif if (psx_delay_BFC08984) { psx_delay_BFC08984 = 0; if (psx_taken_BFC08984) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08998u); goto label_BFC08998; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0898Cu); } label_BFC0898C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0898Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0898Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0898Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC0898C: 16C0FFFA bne $s6, $zero, 0xBFC08978 */ uint32_t psx_brA_BFC0898C = cpu->gpr[22]; uint32_t psx_brB_BFC0898C = cpu->gpr[0]; psx_taken_BFC0898C = (psx_brA_BFC0898C != psx_brB_BFC0898C); psx_delay_BFC0898C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08990: 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(0xBFC08990u); #endif if (psx_delay_BFC0898C) { psx_delay_BFC0898C = 0; if (psx_taken_BFC0898C) { #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, 0xBFC08994u); } label_BFC08994: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08994u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08994: 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(0xBFC08994u); #endif label_BFC08998: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08998u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08998u); #endif /* 0xBFC08998: 8FA600BC lw $a2, 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, 0xBFC08998u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC08998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0899Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0899C: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80100000u); #endif /* 0xBFC089A0: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC089A8u; /* jalr link before delay slot */ psx_delay_BFC089A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC089A4: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC089A4u); #endif if (psx_delay_BFC089A0) { psx_delay_BFC089A0 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC089A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x400001u); #endif /* 0xBFC089A8: 12C0000D beq $s6, $zero, 0xBFC089E0 */ uint32_t psx_brA_BFC089A8 = cpu->gpr[22]; 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, 0x40010000u); #endif /* 0xBFC089AC: 03D0F021 addu $fp, $fp, $s0 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[16]; PGXP_ALU(0x03D0F021u, cpu->gpr[30], _pgx1, _pgx2); } #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, 0xBFC089E0u); goto label_BFC089E0; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30001u); #endif /* 0xBFC089B0: 02208025 or $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(0x02208025u, cpu->gpr[16], _pgx1, _pgx2); } #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, 0x220001u); #endif /* 0xBFC089B4: 02A08825 or $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(0x02A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC089B4u); #endif label_BFC089B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC089B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC089B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089B8u); #endif /* 0xBFC089B8: 82230001 lb $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x82230001u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC089B8u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC089C0: 14600014 bne $v1, $zero, 0xBFC08A14 */ uint32_t psx_brA_BFC089C0 = cpu->gpr[3]; uint32_t psx_brB_BFC089C0 = cpu->gpr[0]; psx_taken_BFC089C0 = (psx_brA_BFC089C0 != psx_brB_BFC089C0); psx_delay_BFC089C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC089C4: 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(0xBFC089C4u); #endif if (psx_delay_BFC089C0) { psx_delay_BFC089C0 = 0; if (psx_taken_BFC089C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A14u); goto label_BFC08A14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC089C8u); } label_BFC089C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC089C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC089C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089C8u); #endif /* 0xBFC089C8: 8FA600BC lw $a2, 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, 0xBFC089C8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC089CC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 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, 0x21u); #endif /* 0xBFC089D0: 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(0xBFC089D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80100000u); #endif /* 0xBFC089D4: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC089DCu; /* jalr link before delay slot */ psx_delay_BFC089D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC089D8: 24849F00 addiu $a0, $a0, -24832 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24832)); PGXP_ALU(0x24849F00u, cpu->gpr[4], _pgx1, 0xFFFF9F00u); } #ifdef PSX_COSIM cosim_instr(0xBFC089D8u); #endif if (psx_delay_BFC089D4) { psx_delay_BFC089D4 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC089DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC089DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC089DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC089DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC089DC: 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(0xBFC089DCu); #endif label_BFC089E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC089E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC089E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089E0u); #endif /* 0xBFC089E0: 8FBF00B4 lw $ra, 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, 0xBFC089E0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF00B4u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC089E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089E4u); #endif /* 0xBFC089E4: 8FB700AC lw $s7, 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, 0xBFC089E4u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB700ACu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC089E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089E8u); #endif /* 0xBFC089E8: 8FB600A8 lw $s6, 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, 0xBFC089E8u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB600A8u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC089E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089ECu); #endif /* 0xBFC089EC: 8FB500A4 lw $s5, 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, 0xBFC089ECu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB500A4u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC089ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089F0u); #endif /* 0xBFC089F0: 8FB400A0 lw $s4, 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, 0xBFC089F0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB400A0u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC089F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089F4u); #endif /* 0xBFC089F4: 8FB3009C lw $s3, 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, 0xBFC089F4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB3009Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC089F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089F8u); #endif /* 0xBFC089F8: 8FB20098 lw $s2, 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, 0xBFC089F8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB20098u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC089F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC089FCu); #endif /* 0xBFC089FC: 8FB10094 lw $s1, 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, 0xBFC089FCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10094u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC089FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A00u); #endif /* 0xBFC08A00: 8FB00090 lw $s0, 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, 0xBFC08A00u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00090u, _pgxa, cpu->gpr[16]); } #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, 0x40000005u); #endif /* 0xBFC08A04: 03C01025 or $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(0x03C01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A08u); #endif /* 0xBFC08A08: 8FBE00B0 lw $fp, 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, 0xBFC08A08u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE00B0u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC08A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC08A0C: 03E00008 jr $ra */ psx_delay_BFC08A0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC08A10: 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(0xBFC08A10u); #endif if (psx_delay_BFC08A0C) { psx_delay_BFC08A0C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC08A14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08A14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08A14: 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(0xBFC08A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08A18: 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(0xBFC08A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC08A1C: 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(0xBFC08A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08A20: 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(0xBFC08A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC08A24: 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(0xBFC08A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08A28: 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(0xBFC08A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08A2C: 2405002D addiu $a1, $zero, 45 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); PGXP_ALU(0x2405002Du, cpu->gpr[5], _pgx1, 0x0000002Du); } #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, 0x41u); #endif /* 0xBFC08A30: 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(0xBFC08A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC08A34: 2407003D addiu $a3, $zero, 61 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (61)); PGXP_ALU(0x2407003Du, cpu->gpr[7], _pgx1, 0x0000003Du); } #ifdef PSX_COSIM cosim_instr(0xBFC08A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC08A38: 24080023 addiu $t0, $zero, 35 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); PGXP_ALU(0x24080023u, cpu->gpr[8], _pgx1, 0x00000023u); } #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, 0x401u); #endif /* 0xBFC08A3C: 240A002B addiu $t2, $zero, 43 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); PGXP_ALU(0x240A002Bu, cpu->gpr[10], _pgx1, 0x0000002Bu); } #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, 0x8001u); #endif /* 0xBFC08A40: 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(0xBFC08A40u); #endif label_BFC08A44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08A44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC08A44: 1065003A beq $v1, $a1, 0xBFC08B30 */ uint32_t psx_brA_BFC08A44 = cpu->gpr[3]; uint32_t psx_brB_BFC08A44 = cpu->gpr[5]; psx_taken_BFC08A44 = (psx_brA_BFC08A44 == psx_brB_BFC08A44); psx_delay_BFC08A44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC08A48: 2878002E slti $t8, $v1, 46 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] < (46) ? 1 : 0); PGXP_ALU(0x2878002Eu, cpu->gpr[24], _pgx1, 0x002Eu); } #ifdef PSX_COSIM cosim_instr(0xBFC08A48u); #endif if (psx_delay_BFC08A44) { psx_delay_BFC08A44 = 0; if (psx_taken_BFC08A44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B30u); goto label_BFC08B30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A4Cu); } label_BFC08A4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08A4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC08A4C: 1300002D beq $t8, $zero, 0xBFC08B04 */ uint32_t psx_brA_BFC08A4C = cpu->gpr[24]; uint32_t psx_brB_BFC08A4C = cpu->gpr[0]; psx_taken_BFC08A4C = (psx_brA_BFC08A4C == psx_brB_BFC08A4C); psx_delay_BFC08A4C = 1; #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 if (psx_delay_BFC08A4C) { psx_delay_BFC08A4C = 0; if (psx_taken_BFC08A4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B04u); goto label_BFC08B04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A54u); } label_BFC08A54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08A54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC08A54: 10680038 beq $v1, $t0, 0xBFC08B38 */ uint32_t psx_brA_BFC08A54 = cpu->gpr[3]; uint32_t psx_brB_BFC08A54 = cpu->gpr[8]; psx_taken_BFC08A54 = (psx_brA_BFC08A54 == psx_brB_BFC08A54); psx_delay_BFC08A54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08A58: 00000000 nop */ /* nop */ #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, 0xBFC08B38u); goto label_BFC08B38; } #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, 0x408u); #endif /* 0xBFC08A5C: 106A0038 beq $v1, $t2, 0xBFC08B40 */ uint32_t psx_brA_BFC08A5C = cpu->gpr[3]; uint32_t psx_brB_BFC08A5C = cpu->gpr[10]; psx_taken_BFC08A5C = (psx_brA_BFC08A5C == psx_brB_BFC08A5C); psx_delay_BFC08A5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08A60: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08A60u); #endif if (psx_delay_BFC08A5C) { psx_delay_BFC08A5C = 0; if (psx_taken_BFC08A5C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B40u); goto label_BFC08B40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A64u); } 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, 0x8008u); #endif /* 0xBFC08A64: 106F0038 beq $v1, $t7, 0xBFC08B48 */ uint32_t psx_brA_BFC08A64 = cpu->gpr[3]; uint32_t psx_brB_BFC08A64 = cpu->gpr[15]; psx_taken_BFC08A64 = (psx_brA_BFC08A64 == psx_brB_BFC08A64); psx_delay_BFC08A64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08A68: 00000000 nop */ /* nop */ #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, 0xBFC08B48u); goto label_BFC08B48; } #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, 0x200100u); #endif /* 0xBFC08A6C: 3AA80001 xori $t0, $s5, 0x1 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[21] ^ 0x1u; PGXP_ALU(0x3AA80001u, cpu->gpr[8], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC08A6Cu); #endif label_BFC08A70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08A70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400110u); #endif /* 0xBFC08A70: 0104B024 and $s6, $t0, $a0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[22] = cpu->gpr[8] & cpu->gpr[4]; PGXP_ALU(0x0104B024u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08A74: 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(0xBFC08A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08A78: 14640045 bne $v1, $a0, 0xBFC08B90 */ uint32_t psx_brA_BFC08A78 = cpu->gpr[3]; uint32_t psx_brB_BFC08A78 = cpu->gpr[4]; 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, 0xBFC08B90u); goto label_BFC08B90; } #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 /* 0xBFC08A80: 8E670000 lw $a3, 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, 0xBFC08A80u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80000u); } PGXP_LOAD(0x8E670000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0xBFC08A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08A84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC08A88: 04E10003 bgez $a3, 0xBFC08A98 */ uint32_t psx_brA_BFC08A88 = cpu->gpr[7]; psx_taken_BFC08A88 = ((int32_t)psx_brA_BFC08A88 >= 0); psx_delay_BFC08A88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010u); #endif /* 0xBFC08A8C: 26640004 addiu $a0, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); PGXP_ALU(0x26640004u, cpu->gpr[4], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC08A8Cu); #endif if (psx_delay_BFC08A88) { psx_delay_BFC08A88 = 0; if (psx_taken_BFC08A88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A98u); goto label_BFC08A98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A90u); } 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, 0x81u); #endif /* 0xBFC08A90: 00073823 subu $a3, $zero, $a3 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[0] - cpu->gpr[7]; PGXP_ALU(0x00073823u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC08A94: 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(0xBFC08A94u); #endif 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: 82230001 lb $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x82230001u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80011u); #endif /* 0xBFC08A9C: 00809825 or $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(0x00809825u, cpu->gpr[19], _pgx1, _pgx2); } #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, 0x20000u); #endif /* 0xBFC08AA0: 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(0xBFC08AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC08AA4: 28E4005B slti $a0, $a3, 91 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0); PGXP_ALU(0x28E4005Bu, cpu->gpr[4], _pgx1, 0x005Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC08AA4u); #endif label_BFC08AA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08AA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08AA8: 14800002 bne $a0, $zero, 0xBFC08AB4 */ uint32_t psx_brA_BFC08AA8 = cpu->gpr[4]; uint32_t psx_brB_BFC08AA8 = cpu->gpr[0]; psx_taken_BFC08AA8 = (psx_brA_BFC08AA8 != psx_brB_BFC08AA8); psx_delay_BFC08AA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800081u); #endif /* 0xBFC08AAC: 00E0B825 or $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(0x00E0B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08AACu); #endif if (psx_delay_BFC08AA8) { psx_delay_BFC08AA8 = 0; if (psx_taken_BFC08AA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AB4u); goto label_BFC08AB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AB0u); } label_BFC08AB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08AB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC08AB0: 2417005A addiu $s7, $zero, 90 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); PGXP_ALU(0x2417005Au, cpu->gpr[23], _pgx1, 0x0000005Au); } #ifdef PSX_COSIM cosim_instr(0xBFC08AB0u); #endif label_BFC08AB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08AB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08AB4: 2405002E addiu $a1, $zero, 46 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (46)); PGXP_ALU(0x2405002Eu, cpu->gpr[5], _pgx1, 0x0000002Eu); } #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, 0x28u); #endif /* 0xBFC08AB8: 14650042 bne $v1, $a1, 0xBFC08BC4 */ uint32_t psx_brA_BFC08AB8 = cpu->gpr[3]; uint32_t psx_brB_BFC08AB8 = cpu->gpr[5]; psx_taken_BFC08AB8 = (psx_brA_BFC08AB8 != psx_brB_BFC08AB8); psx_delay_BFC08AB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08ABC: 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(0xBFC08ABCu); #endif if (psx_delay_BFC08AB8) { psx_delay_BFC08AB8 = 0; if (psx_taken_BFC08AB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BC4u); goto label_BFC08BC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AC0u); } 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 /* 0xBFC08AC0: 82230001 lb $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x82230001u, _pgxa, cpu->gpr[3]); } #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, 0x11u); #endif /* 0xBFC08AC4: 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(0xBFC08AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08AC8: 10640033 beq $v1, $a0, 0xBFC08B98 */ uint32_t psx_brA_BFC08AC8 = cpu->gpr[3]; uint32_t psx_brB_BFC08AC8 = cpu->gpr[4]; psx_taken_BFC08AC8 = (psx_brA_BFC08AC8 == psx_brB_BFC08AC8); psx_delay_BFC08AC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08ACC: 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(0xBFC08ACCu); #endif if (psx_delay_BFC08AC8) { psx_delay_BFC08AC8 = 0; if (psx_taken_BFC08AC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B98u); goto label_BFC08B98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AD0u); } label_BFC08AD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08AD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08AD0: 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(0xBFC08AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC08AD4: 2465FFD0 addiu $a1, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2465FFD0u, cpu->gpr[5], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08AD4u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC08AD8: 2CA5000A sltiu $a1, $a1, 10 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2CA5000Au, cpu->gpr[5], _pgx1, 0x000Au); } #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, 0x21u); #endif /* 0xBFC08ADC: 10A00035 beq $a1, $zero, 0xBFC08BB4 */ uint32_t psx_brA_BFC08ADC = cpu->gpr[5]; uint32_t psx_brB_BFC08ADC = cpu->gpr[0]; psx_taken_BFC08ADC = (psx_brA_BFC08ADC == psx_brB_BFC08ADC); psx_delay_BFC08ADC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC08AE0: 00042880 sll $a1, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] << 2u; PGXP_ALU(0x00042880u, cpu->gpr[5], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC08AE0u); #endif if (psx_delay_BFC08ADC) { psx_delay_BFC08ADC = 0; if (psx_taken_BFC08ADC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BB4u); goto label_BFC08BB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AE4u); } label_BFC08AE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08AE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC08AE4: 00A42021 addu $a0, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[4]; PGXP_ALU(0x00A42021u, cpu->gpr[4], _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, 0x10u); #endif /* 0xBFC08AE8: 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(0xBFC08AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08AEC: 00831821 addu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00831821u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x20000u); #endif /* 0xBFC08AF0: 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(0xBFC08AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08AF4: 2464FFD0 addiu $a0, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2464FFD0u, cpu->gpr[4], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08AF8u); #endif /* 0xBFC08AF8: 82230000 lb $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x82230000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC08AFC: 1000FFF6 beq $zero, $zero, 0xBFC08AD8 */ uint32_t psx_brA_BFC08AFC = cpu->gpr[0]; uint32_t psx_brB_BFC08AFC = cpu->gpr[0]; psx_taken_BFC08AFC = (psx_brA_BFC08AFC == psx_brB_BFC08AFC); psx_delay_BFC08AFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC08B00: 2465FFD0 addiu $a1, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2465FFD0u, cpu->gpr[5], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08B00u); #endif if (psx_delay_BFC08AFC) { psx_delay_BFC08AFC = 0; if (psx_taken_BFC08AFC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AD8u); goto label_BFC08AD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B04u); } label_BFC08B04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B04u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC08B04: 10660012 beq $v1, $a2, 0xBFC08B50 */ uint32_t psx_brA_BFC08B04 = cpu->gpr[3]; uint32_t psx_brB_BFC08B04 = cpu->gpr[6]; psx_taken_BFC08B04 = (psx_brA_BFC08B04 == psx_brB_BFC08B04); psx_delay_BFC08B04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08B08u); #endif if (psx_delay_BFC08B04) { psx_delay_BFC08B04 = 0; if (psx_taken_BFC08B04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B50u); goto label_BFC08B50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B0Cu); } label_BFC08B0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC08B0C: 1467FFD7 bne $v1, $a3, 0xBFC08A6C */ uint32_t psx_brA_BFC08B0C = cpu->gpr[3]; uint32_t psx_brB_BFC08B0C = cpu->gpr[7]; psx_taken_BFC08B0C = (psx_brA_BFC08B0C != psx_brB_BFC08B0C); psx_delay_BFC08B0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08B10u); #endif if (psx_delay_BFC08B0C) { psx_delay_BFC08B0C = 0; if (psx_taken_BFC08B0C) { #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, 0xBFC08B14u); } label_BFC08B14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC08B14: 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(0xBFC08B14u); #endif label_BFC08B18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B18u); #endif /* 0xBFC08B18: 82230001 lb $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x82230001u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08B20: 1460FFC8 bne $v1, $zero, 0xBFC08A44 */ uint32_t psx_brA_BFC08B20 = cpu->gpr[3]; uint32_t psx_brB_BFC08B20 = cpu->gpr[0]; psx_taken_BFC08B20 = (psx_brA_BFC08B20 != psx_brB_BFC08B20); psx_delay_BFC08B20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08B24: 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(0xBFC08B24u); #endif if (psx_delay_BFC08B20) { psx_delay_BFC08B20 = 0; if (psx_taken_BFC08B20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A44u); goto label_BFC08A44; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B28u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B28: 1000FFD1 beq $zero, $zero, 0xBFC08A70 */ uint32_t psx_brA_BFC08B28 = cpu->gpr[0]; uint32_t psx_brB_BFC08B28 = cpu->gpr[0]; psx_taken_BFC08B28 = (psx_brA_BFC08B28 == psx_brB_BFC08B28); psx_delay_BFC08B28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200100u); #endif /* 0xBFC08B2C: 3AA80001 xori $t0, $s5, 0x1 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[8] = cpu->gpr[21] ^ 0x1u; PGXP_ALU(0x3AA80001u, cpu->gpr[8], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC08B2Cu); #endif if (psx_delay_BFC08B28) { psx_delay_BFC08B28 = 0; if (psx_taken_BFC08B28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08A70u); goto label_BFC08A70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B30u); } label_BFC08B30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B30: 1000FFF9 beq $zero, $zero, 0xBFC08B18 */ uint32_t psx_brA_BFC08B30 = cpu->gpr[0]; uint32_t psx_brB_BFC08B30 = cpu->gpr[0]; psx_taken_BFC08B30 = (psx_brA_BFC08B30 == psx_brB_BFC08B30); psx_delay_BFC08B30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08B34: 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(0xBFC08B34u); #endif if (psx_delay_BFC08B30) { psx_delay_BFC08B30 = 0; if (psx_taken_BFC08B30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B18u); goto label_BFC08B18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B38u); } label_BFC08B38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B38: 1000FFF7 beq $zero, $zero, 0xBFC08B18 */ uint32_t psx_brA_BFC08B38 = cpu->gpr[0]; uint32_t psx_brB_BFC08B38 = cpu->gpr[0]; psx_taken_BFC08B38 = (psx_brA_BFC08B38 == psx_brB_BFC08B38); psx_delay_BFC08B38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC08B3C: 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(0xBFC08B3Cu); #endif if (psx_delay_BFC08B38) { psx_delay_BFC08B38 = 0; if (psx_taken_BFC08B38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B18u); goto label_BFC08B18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B40u); } label_BFC08B40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B40: 1000FFF5 beq $zero, $zero, 0xBFC08B18 */ uint32_t psx_brA_BFC08B40 = cpu->gpr[0]; uint32_t psx_brB_BFC08B40 = cpu->gpr[0]; psx_taken_BFC08B40 = (psx_brA_BFC08B40 == psx_brB_BFC08B40); psx_delay_BFC08B40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC08B44: 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(0xBFC08B44u); #endif if (psx_delay_BFC08B40) { psx_delay_BFC08B40 = 0; if (psx_taken_BFC08B40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B18u); goto label_BFC08B18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B48u); } label_BFC08B48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B48: 1000FFF3 beq $zero, $zero, 0xBFC08B18 */ uint32_t psx_brA_BFC08B48 = cpu->gpr[0]; uint32_t psx_brB_BFC08B48 = cpu->gpr[0]; psx_taken_BFC08B48 = (psx_brA_BFC08B48 == psx_brB_BFC08B48); psx_delay_BFC08B48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08B4C: 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(0xBFC08B4Cu); #endif if (psx_delay_BFC08B48) { psx_delay_BFC08B48 = 0; if (psx_taken_BFC08B48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B18u); goto label_BFC08B18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B50u); } label_BFC08B50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B50: 1000FFF1 beq $zero, $zero, 0xBFC08B18 */ uint32_t psx_brA_BFC08B50 = cpu->gpr[0]; uint32_t psx_brB_BFC08B50 = cpu->gpr[0]; psx_taken_BFC08B50 = (psx_brA_BFC08B50 == psx_brB_BFC08B50); psx_delay_BFC08B50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08B54: 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(0xBFC08B54u); #endif if (psx_delay_BFC08B50) { psx_delay_BFC08B50 = 0; if (psx_taken_BFC08B50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B18u); goto label_BFC08B18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B58u); } label_BFC08B58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC08B58: 00072080 sll $a0, $a3, 2 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[7] << 2u; PGXP_ALU(0x00072080u, cpu->gpr[4], _pgx1, 2u); } #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, 0x90u); #endif /* 0xBFC08B5C: 00872021 addu $a0, $a0, $a3 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[7]; PGXP_ALU(0x00872021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08B60: 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(0xBFC08B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08B64: 00831821 addu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00831821u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x20000u); #endif /* 0xBFC08B68: 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(0xBFC08B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC08B6C: 2467FFD0 addiu $a3, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2467FFD0u, cpu->gpr[7], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B70u); #endif /* 0xBFC08B70: 82230000 lb $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x82230000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC08B74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08B74u); #endif label_BFC08B78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08B78: 2464FFD0 addiu $a0, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2464FFD0u, cpu->gpr[4], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0xBFC08B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08B7C: 2C84000A sltiu $a0, $a0, 10 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[4] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C84000Au, cpu->gpr[4], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC08B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08B80: 1480FFF5 bne $a0, $zero, 0xBFC08B58 */ uint32_t psx_brA_BFC08B80 = cpu->gpr[4]; uint32_t psx_brB_BFC08B80 = cpu->gpr[0]; psx_taken_BFC08B80 = (psx_brA_BFC08B80 != psx_brB_BFC08B80); psx_delay_BFC08B80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC08B84: 28E4005B slti $a0, $a3, 91 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] < (91) ? 1 : 0); PGXP_ALU(0x28E4005Bu, cpu->gpr[4], _pgx1, 0x005Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC08B84u); #endif if (psx_delay_BFC08B80) { psx_delay_BFC08B80 = 0; if (psx_taken_BFC08B80) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B58u); goto label_BFC08B58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B88u); } label_BFC08B88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B88: 1000FFC7 beq $zero, $zero, 0xBFC08AA8 */ uint32_t psx_brA_BFC08B88 = cpu->gpr[0]; uint32_t psx_brB_BFC08B88 = cpu->gpr[0]; psx_taken_BFC08B88 = (psx_brA_BFC08B88 == psx_brB_BFC08B88); psx_delay_BFC08B88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08B8Cu); #endif if (psx_delay_BFC08B88) { psx_delay_BFC08B88 = 0; if (psx_taken_BFC08B88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08AA8u); goto label_BFC08AA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B90u); } label_BFC08B90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08B90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08B90: 1000FFF9 beq $zero, $zero, 0xBFC08B78 */ uint32_t psx_brA_BFC08B90 = cpu->gpr[0]; uint32_t psx_brB_BFC08B90 = cpu->gpr[0]; psx_taken_BFC08B90 = (psx_brA_BFC08B90 == psx_brB_BFC08B90); psx_delay_BFC08B90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC08B94: 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(0xBFC08B94u); #endif if (psx_delay_BFC08B90) { psx_delay_BFC08B90 = 0; if (psx_taken_BFC08B90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B78u); goto label_BFC08B78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08B98u); } 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 /* 0xBFC08B98: 8E640000 lw $a0, 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, 0xBFC08B98u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80000u); } PGXP_LOAD(0x8E640000u, _pgxa, cpu->gpr[4]); } #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, 0x20000u); #endif /* 0xBFC08B9C: 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(0xBFC08B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08BA0: 00041FC3 sra $v1, $a0, 31 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] >> 31u); PGXP_ALU(0x00041FC3u, cpu->gpr[3], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0xBFC08BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08BA4: 00642026 xor $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] ^ cpu->gpr[4]; PGXP_ALU(0x00642026u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08BA8: 00832023 subu $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] - cpu->gpr[3]; PGXP_ALU(0x00832023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BACu); #endif /* 0xBFC08BAC: 82230000 lb $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x82230000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC08BB0: 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(0xBFC08BB0u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC08BB4: 2885003D slti $a1, $a0, 61 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (61) ? 1 : 0); PGXP_ALU(0x2885003Du, cpu->gpr[5], _pgx1, 0x003Du); } #ifdef PSX_COSIM cosim_instr(0xBFC08BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08BB8: 14A00002 bne $a1, $zero, 0xBFC08BC4 */ uint32_t psx_brA_BFC08BB8 = cpu->gpr[5]; uint32_t psx_brB_BFC08BB8 = cpu->gpr[0]; psx_taken_BFC08BB8 = (psx_brA_BFC08BB8 != psx_brB_BFC08BB8); psx_delay_BFC08BB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08BBC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08BBCu); #endif if (psx_delay_BFC08BB8) { psx_delay_BFC08BB8 = 0; if (psx_taken_BFC08BB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BC4u); goto label_BFC08BC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BC0u); } label_BFC08BC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08BC0: 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(0xBFC08BC0u); #endif label_BFC08BC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08BC4: 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(0xBFC08BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC08BC8: 14650003 bne $v1, $a1, 0xBFC08BD8 */ uint32_t psx_brA_BFC08BC8 = cpu->gpr[3]; uint32_t psx_brB_BFC08BC8 = cpu->gpr[5]; psx_taken_BFC08BC8 = (psx_brA_BFC08BC8 != psx_brB_BFC08BC8); psx_delay_BFC08BC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08BCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08BCCu); #endif if (psx_delay_BFC08BC8) { psx_delay_BFC08BC8 = 0; if (psx_taken_BFC08BC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BD8u); goto label_BFC08BD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BD0u); } label_BFC08BD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BD0u); #endif /* 0xBFC08BD0: 82230001 lb $v1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 3, 0x20000u); PGXP_LOAD(0x82230001u, _pgxa, cpu->gpr[3]); } #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, 0x20000u); #endif /* 0xBFC08BD4: 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(0xBFC08BD4u); #endif label_BFC08BD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BD8u); #endif /* 0xBFC08BD8: 8FA2007C lw $v0, 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, 0xBFC08BD8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA2007Cu, _pgxa, cpu->gpr[2]); } #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, 0x41u); #endif /* 0xBFC08BDC: 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(0xBFC08BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC08BE0: 2445E2B0 addiu $a1, $v0, -7504 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (-7504)); PGXP_ALU(0x2445E2B0u, cpu->gpr[5], _pgx1, 0xFFFFE2B0u); } #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, 0x421u); #endif /* 0xBFC08BE4: 00A05025 or $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(0x00A05025u, cpu->gpr[10], _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, 0x8001u); #endif /* 0xBFC08BE8: 240F0016 addiu $t7, $zero, 22 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (22)); PGXP_ALU(0x240F0016u, cpu->gpr[15], _pgx1, 0x00000016u); } #ifdef PSX_COSIM cosim_instr(0xBFC08BE8u); #endif label_BFC08BEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BECu); #endif /* 0xBFC08BEC: 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, 0xBFC08BECu); 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(0xBFC08BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08BF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC08BF4: 17030016 bne $t8, $v1, 0xBFC08C50 */ uint32_t psx_brA_BFC08BF4 = cpu->gpr[24]; uint32_t psx_brB_BFC08BF4 = cpu->gpr[3]; psx_taken_BFC08BF4 = (psx_brA_BFC08BF4 != psx_brB_BFC08BF4); psx_delay_BFC08BF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC08BF8: 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(0xBFC08BF8u); #endif if (psx_delay_BFC08BF4) { psx_delay_BFC08BF4 = 0; if (psx_taken_BFC08BF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C50u); goto label_BFC08C50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BFCu); } label_BFC08BFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08BFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC08BFC: 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(0xBFC08BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC08C00: 00062840 sll $a1, $a2, 1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[6] << 1u; PGXP_ALU(0x00062840u, cpu->gpr[5], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8060u); #endif /* 0xBFC08C04: 00A67821 addu $t7, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[15] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A67821u, cpu->gpr[15], _pgx1, _pgx2); } #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, 0x8000u); #endif /* 0xBFC08C08: 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(0xBFC08C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8400u); #endif /* 0xBFC08C0C: 014F7821 addu $t7, $t2, $t7 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[10] + cpu->gpr[15]; PGXP_ALU(0x014F7821u, cpu->gpr[15], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C10u); #endif /* 0xBFC08C10: 8DF80014 lw $t8, 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, 0xBFC08C10u); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000u); } PGXP_LOAD(0x8DF80014u, _pgxa, cpu->gpr[24]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC08C14: 240F0070 addiu $t7, $zero, 112 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); PGXP_ALU(0x240F0070u, cpu->gpr[15], _pgx1, 0x00000070u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8008u); #endif /* 0xBFC08C18: 146F0003 bne $v1, $t7, 0xBFC08C28 */ uint32_t psx_brA_BFC08C18 = cpu->gpr[3]; uint32_t psx_brB_BFC08C18 = cpu->gpr[15]; psx_taken_BFC08C18 = (psx_brA_BFC08C18 != psx_brB_BFC08C18); psx_delay_BFC08C18 = 1; #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 if (psx_delay_BFC08C18) { psx_delay_BFC08C18 = 0; if (psx_taken_BFC08C18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C28u); goto label_BFC08C28; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C20u); } label_BFC08C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08C20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC08C20: 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(0xBFC08C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC08C24: 24170008 addiu $s7, $zero, 8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (8)); PGXP_ALU(0x24170008u, cpu->gpr[23], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C24u); #endif 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1008000u); #endif /* 0xBFC08C28: 2F0F000D sltiu $t7, $t8, 13 */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = (uint32_t)(cpu->gpr[24] < 0x0000000Du ? 1 : 0); PGXP_ALU(0x2F0F000Du, cpu->gpr[15], _pgx1, 0x000Du); } #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, 0x8001u); #endif /* 0xBFC08C2C: 11E00083 beq $t7, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC08C2C = cpu->gpr[15]; uint32_t psx_brB_BFC08C2C = cpu->gpr[0]; psx_taken_BFC08C2C = (psx_brA_BFC08C2C == psx_brB_BFC08C2C); psx_delay_BFC08C2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1008000u); #endif /* 0xBFC08C30: 00187880 sll $t7, $t8, 2 */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[15] = cpu->gpr[24] << 2u; PGXP_ALU(0x00187880u, cpu->gpr[15], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C30u); #endif if (psx_delay_BFC08C2C) { psx_delay_BFC08C2C = 0; if (psx_taken_BFC08C2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C34u); } 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 /* 0xBFC08C34: 8FA20080 lw $v0, 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, 0xBFC08C34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20080u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08C38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8004u); #endif /* 0xBFC08C3C: 004F7821 addu $t7, $v0, $t7 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[15]; cpu->gpr[15] = cpu->gpr[2] + cpu->gpr[15]; PGXP_ALU(0x004F7821u, cpu->gpr[15], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C40u); #endif /* 0xBFC08C40: 8DEF0000 lw $t7, 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, 0xBFC08C40u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000u); } PGXP_LOAD(0x8DEF0000u, _pgxa, cpu->gpr[15]); } #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, 0x1u); #endif /* 0xBFC08C44: 00000000 nop */ /* nop */ #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, 0x8001u); #endif /* 0xBFC08C48: 01E00008 jr $t7 */ psx_delay_BFC08C48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08C4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08C4Cu); #endif if (psx_delay_BFC08C48) { psx_delay_BFC08C48 = 0; #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_BFC08C50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08C50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8040u); #endif /* 0xBFC08C50: 14CFFFE6 bne $a2, $t7, 0xBFC08BEC */ uint32_t psx_brA_BFC08C50 = cpu->gpr[6]; uint32_t psx_brB_BFC08C50 = cpu->gpr[15]; psx_taken_BFC08C50 = (psx_brA_BFC08C50 != psx_brB_BFC08C50); psx_delay_BFC08C50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC08C54: 24A50018 addiu $a1, $a1, 24 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (24)); PGXP_ALU(0x24A50018u, cpu->gpr[5], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C54u); #endif if (psx_delay_BFC08C50) { psx_delay_BFC08C50 = 0; if (psx_taken_BFC08C50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08BECu); goto label_BFC08BEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C58u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C58u); cpu->pc = 0xBFC08C58u; return; /* fallthrough */ } void OpenBIOS_func_1FC08C58(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08C58u); int psx_delay_BFC08C7C = 0; int psx_delay_BFC08C94 = 0; int psx_taken_BFC08C94 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08C84u: goto label_BFC08C84; default: break; } } label_BFC08C58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08C58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08C58: 24040025 addiu $a0, $zero, 37 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); PGXP_ALU(0x24040025u, cpu->gpr[4], _pgx1, 0x00000025u); } #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, 0x29u); #endif /* 0xBFC08C5C: 0003282B sltu $a1, $zero, $v1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0003282Bu, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x20000010u); #endif /* 0xBFC08C60: A3A40010 sb $a0, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08C60u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA3A40010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C64u); #endif /* 0xBFC08C64: 8FA600BC lw $a2, 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, 0xBFC08C64u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #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, 0x10u); #endif /* 0xBFC08C68: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x20u); #endif /* 0xBFC08C6C: 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(0xBFC08C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08C70: 24849F00 addiu $a0, $a0, -24832 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24832)); PGXP_ALU(0x24849F00u, cpu->gpr[4], _pgx1, 0xFFFF9F00u); } #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, 0x20000008u); #endif /* 0xBFC08C74: A3A30011 sb $v1, 17($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 17; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08C74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (17)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA3A30011u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC08C78: AFA30088 sw $v1, 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, 0xBFC08C78u); return; } g_debug_last_store_pc = 0xBFC08C78u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30088u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80100000u); #endif /* 0xBFC08C7C: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC08C84u; /* jalr 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, 0x20000020u); #endif /* 0xBFC08C80: AFA50084 sw $a1, 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, 0xBFC08C80u); return; } g_debug_last_store_pc = 0xBFC08C80u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50084u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C80u); #endif if (psx_delay_BFC08C7C) { psx_delay_BFC08C7C = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC08C84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; 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: 8FA30088 lw $v1, 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, 0xBFC08C84u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30088u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C88u); #endif /* 0xBFC08C88: 8FA50084 lw $a1, 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, 0xBFC08C88u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50084u, _pgxa, cpu->gpr[5]); } #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, 0x8u); #endif /* 0xBFC08C8C: 2C630001 sltiu $v1, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0xBFC08C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000020u); #endif /* 0xBFC08C90: 03C5F021 addu $fp, $fp, $a1 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[5]; PGXP_ALU(0x03C5F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08C94: 10000069 beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC08C94 = cpu->gpr[0]; uint32_t psx_brB_BFC08C94 = cpu->gpr[0]; psx_taken_BFC08C94 = (psx_brA_BFC08C94 == psx_brB_BFC08C94); psx_delay_BFC08C94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC08C98: 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(0xBFC08C98u); #endif if (psx_delay_BFC08C94) { psx_delay_BFC08C94 = 0; if (psx_taken_BFC08C94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C9Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08C9Cu); cpu->pc = 0xBFC08C9Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC08C9C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08C9Cu); int psx_delay_BFC08CB4 = 0; int psx_taken_BFC08CB4 = 0; int psx_delay_BFC08CDC = 0; int psx_taken_BFC08CDC = 0; int psx_delay_BFC08CE4 = 0; int psx_taken_BFC08CE4 = 0; int psx_delay_BFC08CF4 = 0; int psx_taken_BFC08CF4 = 0; int psx_delay_BFC08D04 = 0; int psx_taken_BFC08D04 = 0; int psx_delay_BFC08D14 = 0; int psx_taken_BFC08D14 = 0; int psx_delay_BFC08D20 = 0; int psx_taken_BFC08D20 = 0; int psx_delay_BFC08D38 = 0; int psx_taken_BFC08D38 = 0; int psx_delay_BFC08D40 = 0; int psx_taken_BFC08D40 = 0; int psx_delay_BFC08D58 = 0; int psx_taken_BFC08D58 = 0; int psx_delay_BFC08D7C = 0; int psx_taken_BFC08D7C = 0; int psx_delay_BFC08DA8 = 0; int psx_taken_BFC08DA8 = 0; int psx_delay_BFC08DCC = 0; int psx_taken_BFC08DCC = 0; int psx_delay_BFC08DE0 = 0; int psx_taken_BFC08DE0 = 0; int psx_delay_BFC08DF0 = 0; int psx_taken_BFC08DF0 = 0; int psx_delay_BFC08E08 = 0; int psx_taken_BFC08E08 = 0; int psx_delay_BFC08E1C = 0; int psx_taken_BFC08E1C = 0; int psx_delay_BFC08E2C = 0; int psx_taken_BFC08E2C = 0; int psx_delay_BFC08E3C = 0; int psx_taken_BFC08E3C = 0; int psx_delay_BFC08E48 = 0; int psx_taken_BFC08E48 = 0; int psx_delay_BFC08E50 = 0; int psx_taken_BFC08E50 = 0; int psx_delay_BFC08E68 = 0; int psx_taken_BFC08E68 = 0; int psx_delay_BFC08E70 = 0; int psx_taken_BFC08E70 = 0; int psx_delay_BFC08E80 = 0; int psx_delay_BFC08E88 = 0; int psx_taken_BFC08E88 = 0; int psx_delay_BFC08E98 = 0; int psx_delay_BFC08EA8 = 0; int psx_taken_BFC08EA8 = 0; int psx_delay_BFC08EB0 = 0; int psx_taken_BFC08EB0 = 0; int psx_delay_BFC08EC0 = 0; int psx_taken_BFC08EC0 = 0; int psx_delay_BFC08EC8 = 0; int psx_taken_BFC08EC8 = 0; int psx_delay_BFC08ED8 = 0; int psx_delay_BFC08EE0 = 0; int psx_taken_BFC08EE0 = 0; int psx_delay_BFC08EE8 = 0; int psx_taken_BFC08EE8 = 0; int psx_delay_BFC08EF0 = 0; int psx_taken_BFC08EF0 = 0; int psx_delay_BFC08EF8 = 0; int psx_taken_BFC08EF8 = 0; int psx_delay_BFC08F04 = 0; int psx_taken_BFC08F04 = 0; int psx_delay_BFC08F0C = 0; int psx_taken_BFC08F0C = 0; int psx_delay_BFC08F14 = 0; int psx_taken_BFC08F14 = 0; int psx_delay_BFC08F20 = 0; int psx_taken_BFC08F20 = 0; int psx_delay_BFC08F30 = 0; int psx_taken_BFC08F30 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08E3Cu: goto label_BFC08E3C; case 0xBFC08E44u: goto label_BFC08E44; case 0xBFC08E64u: goto label_BFC08E64; case 0xBFC08E90u: goto label_BFC08E90; case 0xBFC08EB0u: goto label_BFC08EB0; case 0xBFC08EBCu: goto label_BFC08EBC; case 0xBFC08CBCu: goto label_BFC08CBC; case 0xBFC08CC8u: goto label_BFC08CC8; case 0xBFC08CE4u: goto label_BFC08CE4; case 0xBFC08CECu: goto label_BFC08CEC; case 0xBFC08CF4u: goto label_BFC08CF4; case 0xBFC08CFCu: goto label_BFC08CFC; case 0xBFC08D0Cu: goto label_BFC08D0C; case 0xBFC08D10u: goto label_BFC08D10; case 0xBFC08D1Cu: goto label_BFC08D1C; case 0xBFC08D28u: goto label_BFC08D28; case 0xBFC08D2Cu: goto label_BFC08D2C; case 0xBFC08D40u: goto label_BFC08D40; case 0xBFC08D48u: goto label_BFC08D48; case 0xBFC08D4Cu: goto label_BFC08D4C; case 0xBFC08D60u: goto label_BFC08D60; case 0xBFC08D64u: goto label_BFC08D64; case 0xBFC08D6Cu: goto label_BFC08D6C; case 0xBFC08D7Cu: goto label_BFC08D7C; case 0xBFC08D84u: goto label_BFC08D84; case 0xBFC08D88u: goto label_BFC08D88; case 0xBFC08DB0u: goto label_BFC08DB0; case 0xBFC08DC8u: goto label_BFC08DC8; case 0xBFC08DD4u: goto label_BFC08DD4; case 0xBFC08DE8u: goto label_BFC08DE8; case 0xBFC08DF0u: goto label_BFC08DF0; case 0xBFC08DF8u: goto label_BFC08DF8; case 0xBFC08E10u: goto label_BFC08E10; case 0xBFC08E24u: goto label_BFC08E24; case 0xBFC08E34u: goto label_BFC08E34; case 0xBFC08E50u: goto label_BFC08E50; case 0xBFC08E58u: goto label_BFC08E58; case 0xBFC08E60u: goto label_BFC08E60; case 0xBFC08E70u: goto label_BFC08E70; case 0xBFC08E78u: goto label_BFC08E78; case 0xBFC08E88u: goto label_BFC08E88; case 0xBFC08EA0u: goto label_BFC08EA0; case 0xBFC08EA8u: goto label_BFC08EA8; case 0xBFC08EB8u: goto label_BFC08EB8; case 0xBFC08EC8u: goto label_BFC08EC8; case 0xBFC08ED0u: goto label_BFC08ED0; case 0xBFC08EE0u: goto label_BFC08EE0; case 0xBFC08EE8u: goto label_BFC08EE8; case 0xBFC08EF0u: goto label_BFC08EF0; case 0xBFC08EF8u: goto label_BFC08EF8; case 0xBFC08F00u: goto label_BFC08F00; case 0xBFC08F0Cu: goto label_BFC08F0C; case 0xBFC08F14u: goto label_BFC08F14; case 0xBFC08F1Cu: goto label_BFC08F1C; case 0xBFC08F28u: goto label_BFC08F28; default: break; } } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000060u); #endif /* 0xBFC08C9C: 00A6C821 addu $t9, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A6C821u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CA0u); #endif /* 0xBFC08CA0: 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, 0xBFC08CA0u); 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(0xBFC08CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000000u); #endif /* 0xBFC08CA4: 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(0xBFC08CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000400u); #endif /* 0xBFC08CA8: 0159C821 addu $t9, $t2, $t9 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[10] + cpu->gpr[25]; PGXP_ALU(0x0159C821u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CACu); #endif /* 0xBFC08CAC: 8F320004 lw $s2, 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, 0xBFC08CACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x2000000u); } PGXP_LOAD(0x8F320004u, _pgxa, cpu->gpr[18]); } #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, 0x88000u); #endif /* 0xBFC08CB0: 266F0004 addiu $t7, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); PGXP_ALU(0x266F0004u, cpu->gpr[15], _pgx1, 0x00000004u); } #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, 0x10001u); #endif /* 0xBFC08CB4: 16000004 bne $s0, $zero, 0xBFC08CC8 */ uint32_t psx_brA_BFC08CB4 = cpu->gpr[16]; uint32_t psx_brB_BFC08CB4 = cpu->gpr[0]; psx_taken_BFC08CB4 = (psx_brA_BFC08CB4 != psx_brB_BFC08CB4); psx_delay_BFC08CB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10009u); #endif /* 0xBFC08CB8: 02001825 or $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(0x02001825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CB8u); #endif if (psx_delay_BFC08CB4) { psx_delay_BFC08CB4 = 0; if (psx_taken_BFC08CB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CC8u); goto label_BFC08CC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CBCu); } label_BFC08CBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2040000u); #endif /* 0xBFC08CBC: 3A590008 xori $t9, $s2, 0x8 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[25] = cpu->gpr[18] ^ 0x8u; PGXP_ALU(0x3A590008u, cpu->gpr[25], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0xBFC08CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC08CC0: 0019C82B sltu $t9, $zero, $t9 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0); PGXP_ALU(0x0019C82Bu, cpu->gpr[25], _pgx1, _pgx2); } #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, 0x2000800u); #endif /* 0xBFC08CC4: 01795824 and $t3, $t3, $t9 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[11] = cpu->gpr[11] & cpu->gpr[25]; PGXP_ALU(0x01795824u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CC4u); #endif label_BFC08CC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000060u); #endif /* 0xBFC08CC8: 00A6C821 addu $t9, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[25] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A6C821u, cpu->gpr[25], _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, 0x2000000u); #endif /* 0xBFC08CCC: 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(0xBFC08CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000400u); #endif /* 0xBFC08CD0: 0159C821 addu $t9, $t2, $t9 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[25] = cpu->gpr[10] + cpu->gpr[25]; PGXP_ALU(0x0159C821u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CD4u); #endif /* 0xBFC08CD4: 8F33000C lw $s3, 12($t9) */ { uint32_t _pgxa = cpu->gpr[25] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[25] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08CD4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x2000000u); } PGXP_LOAD(0x8F33000Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC08CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08CD8: 00000000 nop */ /* nop */ #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, 0x80001u); #endif /* 0xBFC08CDC: 12600005 beq $s3, $zero, 0xBFC08CF4 */ uint32_t psx_brA_BFC08CDC = cpu->gpr[19]; uint32_t psx_brB_BFC08CDC = cpu->gpr[0]; psx_taken_BFC08CDC = (psx_brA_BFC08CDC == psx_brB_BFC08CDC); psx_delay_BFC08CDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC08CE0: 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(0xBFC08CE0u); #endif if (psx_delay_BFC08CDC) { psx_delay_BFC08CDC = 0; if (psx_taken_BFC08CDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CF4u); goto label_BFC08CF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CE4u); } label_BFC08CE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08CE4: 06010080 bgez $s0, 0xBFC08EE8 */ uint32_t psx_brA_BFC08CE4 = cpu->gpr[16]; psx_taken_BFC08CE4 = ((int32_t)psx_brA_BFC08CE4 >= 0); psx_delay_BFC08CE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08CE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08CE8u); #endif if (psx_delay_BFC08CE4) { psx_delay_BFC08CE4 = 0; if (psx_taken_BFC08CE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EE8u); goto label_BFC08EE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CECu); } label_BFC08CEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10009u); #endif /* 0xBFC08CEC: 00101823 subu $v1, $zero, $s0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[16]; PGXP_ALU(0x00101823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC08CF0: 2419002D addiu $t9, $zero, 45 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (45)); PGXP_ALU(0x2419002Du, cpu->gpr[25], _pgx1, 0x0000002Du); } #ifdef PSX_COSIM cosim_instr(0xBFC08CF0u); #endif label_BFC08CF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08CF4: 11800006 beq $t4, $zero, 0xBFC08D10 */ uint32_t psx_brA_BFC08CF4 = cpu->gpr[12]; uint32_t psx_brB_BFC08CF4 = cpu->gpr[0]; psx_taken_BFC08CF4 = (psx_brA_BFC08CF4 == psx_brB_BFC08CF4); psx_delay_BFC08CF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001001u); #endif /* 0xBFC08CF8: 0019602B sltu $t4, $zero, $t9 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[25]; cpu->gpr[12] = (uint32_t)(cpu->gpr[0] < cpu->gpr[25] ? 1 : 0); PGXP_ALU(0x0019602Bu, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08CF8u); #endif if (psx_delay_BFC08CF4) { psx_delay_BFC08CF4 = 0; if (psx_taken_BFC08CF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D10u); goto label_BFC08D10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CFCu); } label_BFC08CFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08CFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801000u); #endif /* 0xBFC08CFC: 02EC6023 subu $t4, $s7, $t4 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[23] - cpu->gpr[12]; PGXP_ALU(0x02EC6023u, cpu->gpr[12], _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, 0x3010u); #endif /* 0xBFC08D00: 008C682A slt $t5, $a0, $t4 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[12] ? 1 : 0); PGXP_ALU(0x008C682Au, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08D04: 11A00002 beq $t5, $zero, 0xBFC08D10 */ uint32_t psx_brA_BFC08D04 = cpu->gpr[13]; uint32_t psx_brB_BFC08D04 = cpu->gpr[0]; psx_taken_BFC08D04 = (psx_brA_BFC08D04 == psx_brB_BFC08D04); psx_delay_BFC08D04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08D08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08D08u); #endif if (psx_delay_BFC08D04) { psx_delay_BFC08D04 = 0; if (psx_taken_BFC08D04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D10u); goto label_BFC08D10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D0Cu); } label_BFC08D0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1011u); #endif /* 0xBFC08D0C: 01802025 or $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(0x01802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08D0Cu); #endif 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, 0x1001u); #endif /* 0xBFC08D10: 240C000C addiu $t4, $zero, 12 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); PGXP_ALU(0x240C000Cu, cpu->gpr[12], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC08D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001000u); #endif /* 0xBFC08D14: 170C0015 bne $t8, $t4, 0xBFC08D6C */ uint32_t psx_brA_BFC08D14 = cpu->gpr[24]; uint32_t psx_brB_BFC08D14 = cpu->gpr[12]; psx_taken_BFC08D14 = (psx_brA_BFC08D14 != psx_brB_BFC08D14); psx_delay_BFC08D14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC08D18: 27B00074 addiu $s0, $sp, 116 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (116)); PGXP_ALU(0x27B00074u, cpu->gpr[16], _pgx1, 0x00000074u); } #ifdef PSX_COSIM cosim_instr(0xBFC08D18u); #endif if (psx_delay_BFC08D14) { psx_delay_BFC08D14 = 0; if (psx_taken_BFC08D14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D6Cu); goto label_BFC08D6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D1Cu); } label_BFC08D1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08D1C: 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(0xBFC08D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC08D20: 15A00002 bne $t5, $zero, 0xBFC08D2C */ uint32_t psx_brA_BFC08D20 = cpu->gpr[13]; uint32_t psx_brB_BFC08D20 = cpu->gpr[0]; psx_taken_BFC08D20 = (psx_brA_BFC08D20 != psx_brB_BFC08D20); psx_delay_BFC08D20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2008u); #endif /* 0xBFC08D24: 006D001B divu $v1, $t5 */ { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[13]; 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(0x006D001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[13]); #ifdef PSX_COSIM cosim_instr(0xBFC08D24u); #endif if (psx_delay_BFC08D20) { psx_delay_BFC08D20 = 0; if (psx_taken_BFC08D20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D2Cu); goto label_BFC08D2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D28u); } label_BFC08D28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC08D28: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC08D28u); return; #ifdef PSX_COSIM cosim_instr(0xBFC08D28u); #endif label_BFC08D2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC08D2C: 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(0xBFC08D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3000u); #endif /* 0xBFC08D30: 25ACFFFF addiu $t4, $t5, -1 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); PGXP_ALU(0x25ACFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } #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, 0x1000u); #endif /* 0xBFC08D34: 2D8C0003 sltiu $t4, $t4, 3 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2D8C0003u, cpu->gpr[12], _pgx1, 0x0003u); } #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, 0x1001u); #endif /* 0xBFC08D38: 11800009 beq $t4, $zero, 0xBFC08D60 */ uint32_t psx_brA_BFC08D38 = cpu->gpr[12]; uint32_t psx_brB_BFC08D38 = cpu->gpr[0]; psx_taken_BFC08D38 = (psx_brA_BFC08D38 == psx_brB_BFC08D38); psx_delay_BFC08D38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08D3C: 240C0064 addiu $t4, $zero, 100 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); PGXP_ALU(0x240C0064u, cpu->gpr[12], _pgx1, 0x00000064u); } #ifdef PSX_COSIM cosim_instr(0xBFC08D3Cu); #endif if (psx_delay_BFC08D38) { psx_delay_BFC08D38 = 0; if (psx_taken_BFC08D38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D60u); goto label_BFC08D60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D40u); } label_BFC08D40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08D40: 15800002 bne $t4, $zero, 0xBFC08D4C */ uint32_t psx_brA_BFC08D40 = cpu->gpr[12]; uint32_t psx_brB_BFC08D40 = cpu->gpr[0]; psx_taken_BFC08D40 = (psx_brA_BFC08D40 != psx_brB_BFC08D40); psx_delay_BFC08D40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1008u); #endif /* 0xBFC08D44: 006C001B divu $v1, $t4 */ { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[12]; 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(0x006C001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[12]); #ifdef PSX_COSIM cosim_instr(0xBFC08D44u); #endif if (psx_delay_BFC08D40) { psx_delay_BFC08D40 = 0; if (psx_taken_BFC08D40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D4Cu); goto label_BFC08D4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D48u); } label_BFC08D48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC08D48: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC08D48u); return; #ifdef PSX_COSIM cosim_instr(0xBFC08D48u); #endif 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, 0x1000u); #endif /* 0xBFC08D4C: 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(0xBFC08D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC08D50: 258CFFF5 addiu $t4, $t4, -11 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-11)); PGXP_ALU(0x258CFFF5u, cpu->gpr[12], _pgx1, 0xFFFFFFF5u); } #ifdef PSX_COSIM cosim_instr(0xBFC08D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC08D54: 2D8C0003 sltiu $t4, $t4, 3 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)(cpu->gpr[12] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2D8C0003u, cpu->gpr[12], _pgx1, 0x0003u); } #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, 0x1001u); #endif /* 0xBFC08D58: 11800067 beq $t4, $zero, 0xBFC08EF8 */ uint32_t psx_brA_BFC08D58 = cpu->gpr[12]; uint32_t psx_brB_BFC08D58 = cpu->gpr[0]; psx_taken_BFC08D58 = (psx_brA_BFC08D58 == psx_brB_BFC08D58); psx_delay_BFC08D58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08D5C: 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(0xBFC08D5Cu); #endif if (psx_delay_BFC08D58) { psx_delay_BFC08D58 = 0; if (psx_taken_BFC08D58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EF8u); goto label_BFC08EF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D60u); } label_BFC08D60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08D60: 240C6874 addiu $t4, $zero, 26740 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (26740)); PGXP_ALU(0x240C6874u, cpu->gpr[12], _pgx1, 0x00006874u); } #ifdef PSX_COSIM cosim_instr(0xBFC08D60u); #endif label_BFC08D64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001000u); #endif /* 0xBFC08D64: A7AC0072 sh $t4, 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, 0xBFC08D64u); return; } g_debug_last_store_pc = 0xBFC08D64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[12] & 0xFFFFu)); } PGXP_STORE(0xA7AC0072u, _pgxa, cpu->gpr[12]); } #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, 0x20010000u); #endif /* 0xBFC08D68: 27B00072 addiu $s0, $sp, 114 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (114)); PGXP_ALU(0x27B00072u, cpu->gpr[16], _pgx1, 0x00000072u); } #ifdef PSX_COSIM cosim_instr(0xBFC08D68u); #endif label_BFC08D6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1060u); #endif /* 0xBFC08D6C: 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(0xBFC08D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC08D70: 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(0xBFC08D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1400u); #endif /* 0xBFC08D74: 014C6021 addu $t4, $t2, $t4 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[10] + cpu->gpr[12]; PGXP_ALU(0x014C6021u, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D78u); #endif /* 0xBFC08D78: 8D8D0008 lw $t5, 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, 0xBFC08D78u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x1000u); } PGXP_LOAD(0x8D8D0008u, _pgxa, cpu->gpr[13]); } #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, 0x40001u); #endif /* 0xBFC08D7C: 16400002 bne $s2, $zero, 0xBFC08D88 */ uint32_t psx_brA_BFC08D7C = cpu->gpr[18]; uint32_t psx_brB_BFC08D7C = cpu->gpr[0]; psx_taken_BFC08D7C = (psx_brA_BFC08D7C != psx_brB_BFC08D7C); psx_delay_BFC08D7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC08D80: 0072001B divu $v1, $s2 */ { uint32_t psx_n = cpu->gpr[3]; uint32_t psx_d = cpu->gpr[18]; 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(0x0072001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[18]); #ifdef PSX_COSIM cosim_instr(0xBFC08D80u); #endif if (psx_delay_BFC08D7C) { psx_delay_BFC08D7C = 0; if (psx_taken_BFC08D7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D88u); goto label_BFC08D88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D84u); } label_BFC08D84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC08D84: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC08D84u); return; #ifdef PSX_COSIM cosim_instr(0xBFC08D84u); #endif label_BFC08D88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08D88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08D88: 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(0xBFC08D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC08D8C: 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(0xBFC08D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3000u); #endif /* 0xBFC08D90: 01AC6021 addu $t4, $t5, $t4 */ { uint32_t _pgx1 = cpu->gpr[13]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[13] + cpu->gpr[12]; PGXP_ALU(0x01AC6021u, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D94u); #endif /* 0xBFC08D94: 818C0000 lb $t4, 0($t4) */ { uint32_t _pgxa = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[12] + (0)), 12, 0x1000u); PGXP_LOAD(0x818C0000u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0xBFC08D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08D98: 00000000 nop */ /* nop */ #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, 0x11000u); #endif /* 0xBFC08D9C: A20C0000 sb $t4, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08D9Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[12] & 0xFFu)); PGXP_STORE(0xA20C0000u, _pgxa, cpu->gpr[12]); } #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, 0x41008u); #endif /* 0xBFC08DA0: 0072602B sltu $t4, $v1, $s2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[12] = (uint32_t)(cpu->gpr[3] < cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0072602Bu, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08DA4: 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(0xBFC08DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08DA8: 1180FFF4 beq $t4, $zero, 0xBFC08D7C */ uint32_t psx_brA_BFC08DA8 = cpu->gpr[12]; uint32_t psx_brB_BFC08DA8 = cpu->gpr[0]; psx_taken_BFC08DA8 = (psx_brA_BFC08DA8 == psx_brB_BFC08DA8); psx_delay_BFC08DA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08DAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08DACu); #endif if (psx_delay_BFC08DA8) { psx_delay_BFC08DA8 = 0; if (psx_taken_BFC08DA8) { #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, 0xBFC08DB0u); } label_BFC08DB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08DB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC08DB0: 27B20074 addiu $s2, $sp, 116 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[29] + (116)); PGXP_ALU(0x27B20074u, cpu->gpr[18], _pgx1, 0x00000074u); } #ifdef PSX_COSIM cosim_instr(0xBFC08DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50008u); #endif /* 0xBFC08DB4: 02501823 subu $v1, $s2, $s0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[3] = cpu->gpr[18] - cpu->gpr[16]; PGXP_ALU(0x02501823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC08DB8: 00831823 subu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] - cpu->gpr[3]; PGXP_ALU(0x00831823u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x12008u); #endif /* 0xBFC08DBC: 00706823 subu $t5, $v1, $s0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[13] = cpu->gpr[3] - cpu->gpr[16]; PGXP_ALU(0x00706823u, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC08DC0: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC08DC4: 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(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, 0x3010u); #endif /* 0xBFC08DC8: 008D6021 addu $t4, $a0, $t5 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[12] = cpu->gpr[4] + cpu->gpr[13]; PGXP_ALU(0x008D6021u, cpu->gpr[12], _pgx1, _pgx2); } #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, 0x1000u); #endif /* 0xBFC08DCC: 1D800053 bgtz $t4, 0xBFC08F1C */ uint32_t psx_brA_BFC08DCC = cpu->gpr[12]; psx_taken_BFC08DCC = ((int32_t)psx_brA_BFC08DCC > 0); psx_delay_BFC08DCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08DD0: 00000000 nop */ /* nop */ #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, 0xBFC08F1Cu); goto label_BFC08F1C; } #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, 0x19u); #endif /* 0xBFC08DD4: 00032027 nor $a0, $zero, $v1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = ~(cpu->gpr[0] | cpu->gpr[3]); PGXP_ALU(0x00032027u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x10u); #endif /* 0xBFC08DD8: 000427C3 sra $a0, $a0, 31 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 31u); PGXP_ALU(0x000427C3u, cpu->gpr[4], _pgx1, 31u); } #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, 0x18u); #endif /* 0xBFC08DDC: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x2000001u); #endif /* 0xBFC08DE0: 13200003 beq $t9, $zero, 0xBFC08DF0 */ uint32_t psx_brA_BFC08DE0 = cpu->gpr[25]; uint32_t psx_brB_BFC08DE0 = cpu->gpr[0]; psx_taken_BFC08DE0 = (psx_brA_BFC08DE0 == psx_brB_BFC08DE0); psx_delay_BFC08DE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC08DE4: 02038023 subu $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(0x02038023u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DE4u); #endif if (psx_delay_BFC08DE0) { psx_delay_BFC08DE0 = 0; if (psx_taken_BFC08DE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08DF0u); goto label_BFC08DF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08DE8u); } label_BFC08DE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08DE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2010000u); #endif /* 0xBFC08DE8: A219FFFF sb $t9, -1($s0) */ { uint32_t _pgxa = cpu->gpr[16] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08DE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (-1)), (uint8_t)(cpu->gpr[25] & 0xFFu)); PGXP_STORE(0xA219FFFFu, _pgxa, cpu->gpr[25]); } #ifdef PSX_COSIM cosim_instr(0xBFC08DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08DEC: 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(0xBFC08DECu); #endif label_BFC08DF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08DF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC08DF0: 11600010 beq $t3, $zero, 0xBFC08E34 */ uint32_t psx_brA_BFC08DF0 = cpu->gpr[11]; uint32_t psx_brB_BFC08DF0 = cpu->gpr[0]; psx_taken_BFC08DF0 = (psx_brA_BFC08DF0 == psx_brB_BFC08DF0); psx_delay_BFC08DF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC08DF4: 00A62821 addu $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A62821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DF4u); #endif if (psx_delay_BFC08DF0) { psx_delay_BFC08DF0 = 0; if (psx_taken_BFC08DF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E34u); goto label_BFC08E34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08DF8u); } label_BFC08DF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08DF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC08DF8: 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(0xBFC08DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420u); #endif /* 0xBFC08DFC: 01455021 addu $t2, $t2, $a1 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[5]; PGXP_ALU(0x01455021u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E00u); #endif /* 0xBFC08E00: 8D430010 lw $v1, 16($t2) */ { uint32_t _pgxa = cpu->gpr[10] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC08E00u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x400u); } PGXP_LOAD(0x8D430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E04: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC08E08: 1060000A beq $v1, $zero, 0xBFC08E34 */ uint32_t psx_brA_BFC08E08 = cpu->gpr[3]; uint32_t psx_brB_BFC08E08 = cpu->gpr[0]; psx_taken_BFC08E08 = (psx_brA_BFC08E08 == psx_brB_BFC08E08); psx_delay_BFC08E08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E0Cu); #endif if (psx_delay_BFC08E08) { psx_delay_BFC08E08 = 0; if (psx_taken_BFC08E08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E34u); goto label_BFC08E34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E10u); } label_BFC08E10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E10u); #endif /* 0xBFC08E10: 82050000 lb $a1, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (0)), 5, 0x10000u); PGXP_LOAD(0x82050000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E14u); #endif /* 0xBFC08E14: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC08E1C: 10A40005 beq $a1, $a0, 0xBFC08E34 */ uint32_t psx_brA_BFC08E1C = cpu->gpr[5]; uint32_t psx_brB_BFC08E1C = cpu->gpr[4]; psx_taken_BFC08E1C = (psx_brA_BFC08E1C == psx_brB_BFC08E1C); psx_delay_BFC08E1C = 1; #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 if (psx_delay_BFC08E1C) { psx_delay_BFC08E1C = 0; if (psx_taken_BFC08E1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E34u); goto label_BFC08E34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E24u); } label_BFC08E24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E24u); #endif /* 0xBFC08E24: 80640000 lb $a0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 4, 0x8u); PGXP_LOAD(0x80640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08E2C: 1480003E bne $a0, $zero, 0xBFC08F28 */ uint32_t psx_brA_BFC08E2C = cpu->gpr[4]; uint32_t psx_brB_BFC08E2C = cpu->gpr[0]; 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, 0xBFC08F28u); goto label_BFC08F28; } #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, 0x50000u); #endif /* 0xBFC08E34: 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(0xBFC08E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88001u); #endif /* 0xBFC08E38: 01E09825 or $s3, $t7, $zero */ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[15] | cpu->gpr[0]; PGXP_ALU(0x01E09825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E38u); #endif label_BFC08E3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC08E3C: 16C000AA bne $s6, $zero, 0xBFC090E8 */ uint32_t psx_brA_BFC08E3C = cpu->gpr[22]; uint32_t psx_brB_BFC08E3C = cpu->gpr[0]; psx_taken_BFC08E3C = (psx_brA_BFC08E3C != psx_brB_BFC08E3C); psx_delay_BFC08E3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E40: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E40u); #endif if (psx_delay_BFC08E3C) { psx_delay_BFC08E3C = 0; if (psx_taken_BFC08E3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090E8u); cpu->pc = 0xBFC090E8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E44u); } label_BFC08E44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC40000u); #endif /* 0xBFC08E44: 02F2B023 subu $s6, $s7, $s2 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[22] = cpu->gpr[23] - cpu->gpr[18]; PGXP_ALU(0x02F2B023u, cpu->gpr[22], _pgx1, _pgx2); } #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, 0x400000u); #endif /* 0xBFC08E48: 1AC000AB blez $s6, 0xBFC090F8 */ uint32_t psx_brA_BFC08E48 = cpu->gpr[22]; psx_taken_BFC08E48 = ((int32_t)psx_brA_BFC08E48 <= 0); psx_delay_BFC08E48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E4Cu); #endif if (psx_delay_BFC08E48) { psx_delay_BFC08E48 = 0; if (psx_taken_BFC08E48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090F8u); cpu->pc = 0xBFC090F8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E50u); } label_BFC08E50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC08E50: 12A00003 beq $s5, $zero, 0xBFC08E60 */ uint32_t psx_brA_BFC08E50 = cpu->gpr[21]; uint32_t psx_brB_BFC08E50 = cpu->gpr[0]; psx_taken_BFC08E50 = (psx_brA_BFC08E50 == psx_brB_BFC08E50); psx_delay_BFC08E50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08E54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08E54u); #endif if (psx_delay_BFC08E50) { psx_delay_BFC08E50 = 0; if (psx_taken_BFC08E50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E60u); goto label_BFC08E60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E58u); } 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, 0x400000u); #endif /* 0xBFC08E58: 0016B043 sra $s6, $s6, 1 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] >> 1u); PGXP_ALU(0x0016B043u, cpu->gpr[22], _pgx1, 1u); } #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, 0xC00000u); #endif /* 0xBFC08E5C: 02F6B823 subu $s7, $s7, $s6 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[23] = cpu->gpr[23] - cpu->gpr[22]; PGXP_ALU(0x02F6B823u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E5Cu); #endif label_BFC08E60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40400000u); #endif /* 0xBFC08E60: 03D6F021 addu $fp, $fp, $s6 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[22]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[22]; PGXP_ALU(0x03D6F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E60u); #endif label_BFC08E64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400010u); #endif /* 0xBFC08E64: 2EC40034 sltiu $a0, $s6, 52 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[4] = (uint32_t)(cpu->gpr[22] < 0x00000034u ? 1 : 0); PGXP_ALU(0x2EC40034u, cpu->gpr[4], _pgx1, 0x0034u); } #ifdef PSX_COSIM cosim_instr(0xBFC08E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC08E68: 10800093 beq $a0, $zero, 0xBFC090B8 */ uint32_t psx_brA_BFC08E68 = cpu->gpr[4]; uint32_t psx_brB_BFC08E68 = cpu->gpr[0]; 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, 0xBFC090B8u); cpu->pc = 0xBFC090B8u; return; } #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, 0x400001u); #endif /* 0xBFC08E70: 12C00005 beq $s6, $zero, 0xBFC08E88 */ uint32_t psx_brA_BFC08E70 = cpu->gpr[22]; uint32_t psx_brB_BFC08E70 = cpu->gpr[0]; psx_taken_BFC08E70 = (psx_brA_BFC08E70 == psx_brB_BFC08E70); psx_delay_BFC08E70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400021u); #endif /* 0xBFC08E74: 02C02825 or $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(0x02C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E74u); #endif if (psx_delay_BFC08E70) { psx_delay_BFC08E70 = 0; if (psx_taken_BFC08E70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E88u); goto label_BFC08E88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E78u); } label_BFC08E78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08E78: 3C04BFC2 lui $a0, 0xBFC2 */ cpu->gpr[4] = 0xBFC20000u; PGXP_ALU(0x3C04BFC2u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E7Cu); #endif /* 0xBFC08E7C: 8FA600BC lw $a2, 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, 0xBFC08E7Cu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #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, 0x80100000u); #endif /* 0xBFC08E80: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC08E88u; /* jalr link before delay slot */ psx_delay_BFC08E80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08E84: 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(0xBFC08E84u); #endif if (psx_delay_BFC08E80) { psx_delay_BFC08E80 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC08E88u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC08E88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC08E88: 1A400007 blez $s2, 0xBFC08EA8 */ uint32_t psx_brA_BFC08E88 = cpu->gpr[18]; psx_taken_BFC08E88 = ((int32_t)psx_brA_BFC08E88 <= 0); psx_delay_BFC08E88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600001u); #endif /* 0xBFC08E8C: 02A0B025 or $s6, $s5, $zero */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[22] = cpu->gpr[21] | cpu->gpr[0]; PGXP_ALU(0x02A0B025u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E8Cu); #endif if (psx_delay_BFC08E88) { psx_delay_BFC08E88 = 0; if (psx_taken_BFC08E88) { #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, 0xBFC08E90u); } label_BFC08E90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08E90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E90u); #endif /* 0xBFC08E90: 8FA600BC lw $a2, 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, 0xBFC08E90u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #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, 0x40021u); #endif /* 0xBFC08E94: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x80100000u); #endif /* 0xBFC08E98: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC08EA0u; /* jalr link before delay slot */ psx_delay_BFC08E98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC08E9C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08E9Cu); #endif if (psx_delay_BFC08E98) { psx_delay_BFC08E98 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC08EA0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x40040000u); #endif /* 0xBFC08EA0: 03D2F021 addu $fp, $fp, $s2 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[18]; PGXP_ALU(0x03D2F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600001u); #endif /* 0xBFC08EA4: 02C0A825 or $s5, $s6, $zero */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[21] = cpu->gpr[22] | cpu->gpr[0]; PGXP_ALU(0x02C0A825u, cpu->gpr[21], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08EA4u); #endif 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, 0x200001u); #endif /* 0xBFC08EA8: 12A0000D beq $s5, $zero, 0xBFC08EE0 */ uint32_t psx_brA_BFC08EA8 = cpu->gpr[21]; uint32_t psx_brB_BFC08EA8 = cpu->gpr[0]; psx_taken_BFC08EA8 = (psx_brA_BFC08EA8 == psx_brB_BFC08EA8); psx_delay_BFC08EA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840000u); #endif /* 0xBFC08EAC: 02F2B823 subu $s7, $s7, $s2 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[23] = cpu->gpr[23] - cpu->gpr[18]; PGXP_ALU(0x02F2B823u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08EACu); #endif if (psx_delay_BFC08EA8) { psx_delay_BFC08EA8 = 0; if (psx_taken_BFC08EA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EE0u); goto label_BFC08EE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EB0u); } label_BFC08EB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC08EB0: 1AE0000B blez $s7, 0xBFC08EE0 */ uint32_t psx_brA_BFC08EB0 = cpu->gpr[23]; psx_taken_BFC08EB0 = ((int32_t)psx_brA_BFC08EB0 <= 0); psx_delay_BFC08EB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08EB4: 00000000 nop */ /* nop */ #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, 0xBFC08EE0u); goto label_BFC08EE0; } #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, 0x40800000u); #endif /* 0xBFC08EB8: 03D7F021 addu $fp, $fp, $s7 */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[30] = cpu->gpr[30] + cpu->gpr[23]; PGXP_ALU(0x03D7F021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08EB8u); #endif label_BFC08EBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800008u); #endif /* 0xBFC08EBC: 2EE30034 sltiu $v1, $s7, 52 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[3] = (uint32_t)(cpu->gpr[23] < 0x00000034u ? 1 : 0); PGXP_ALU(0x2EE30034u, cpu->gpr[3], _pgx1, 0x0034u); } #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, 0x9u); #endif /* 0xBFC08EC0: 10600083 beq $v1, $zero, 0xBFC090D0 */ uint32_t psx_brA_BFC08EC0 = cpu->gpr[3]; uint32_t psx_brB_BFC08EC0 = cpu->gpr[0]; psx_taken_BFC08EC0 = (psx_brA_BFC08EC0 == psx_brB_BFC08EC0); psx_delay_BFC08EC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08EC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08EC4u); #endif if (psx_delay_BFC08EC0) { psx_delay_BFC08EC0 = 0; if (psx_taken_BFC08EC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090D0u); cpu->pc = 0xBFC090D0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EC8u); } label_BFC08EC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC08EC8: 12E00005 beq $s7, $zero, 0xBFC08EE0 */ uint32_t psx_brA_BFC08EC8 = cpu->gpr[23]; uint32_t psx_brB_BFC08EC8 = cpu->gpr[0]; psx_taken_BFC08EC8 = (psx_brA_BFC08EC8 == psx_brB_BFC08EC8); psx_delay_BFC08EC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800021u); #endif /* 0xBFC08ECC: 02E02825 or $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(0x02E02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08ECCu); #endif if (psx_delay_BFC08EC8) { psx_delay_BFC08EC8 = 0; if (psx_taken_BFC08EC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EE0u); goto label_BFC08EE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08ED0u); } label_BFC08ED0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08ED0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08ED0: 3C04BFC2 lui $a0, 0xBFC2 */ cpu->gpr[4] = 0xBFC20000u; PGXP_ALU(0x3C04BFC2u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08ED4u); #endif /* 0xBFC08ED4: 8FA600BC lw $a2, 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, 0xBFC08ED4u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #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, 0x80100000u); #endif /* 0xBFC08ED8: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC08EE0u; /* jalr link before delay slot */ psx_delay_BFC08ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08EDC: 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(0xBFC08EDCu); #endif if (psx_delay_BFC08ED8) { psx_delay_BFC08ED8 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC08EE0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC08EE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08EE0: 1000FE9D beq $zero, $zero, 0xBFC08958 */ uint32_t psx_brA_BFC08EE0 = cpu->gpr[0]; uint32_t psx_brB_BFC08EE0 = cpu->gpr[0]; psx_taken_BFC08EE0 = (psx_brA_BFC08EE0 == psx_brB_BFC08EE0); psx_delay_BFC08EE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08EE4: 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(0xBFC08EE4u); #endif if (psx_delay_BFC08EE0) { psx_delay_BFC08EE0 = 0; if (psx_taken_BFC08EE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08958u); cpu->pc = 0xBFC08958u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EE8u); } label_BFC08EE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC08EE8: 15C0FF82 bne $t6, $zero, 0xBFC08CF4 */ uint32_t psx_brA_BFC08EE8 = cpu->gpr[14]; uint32_t psx_brB_BFC08EE8 = cpu->gpr[0]; psx_taken_BFC08EE8 = (psx_brA_BFC08EE8 != psx_brB_BFC08EE8); psx_delay_BFC08EE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC08EEC: 2419002B addiu $t9, $zero, 43 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (43)); PGXP_ALU(0x2419002Bu, cpu->gpr[25], _pgx1, 0x0000002Bu); } #ifdef PSX_COSIM cosim_instr(0xBFC08EECu); #endif if (psx_delay_BFC08EE8) { psx_delay_BFC08EE8 = 0; if (psx_taken_BFC08EE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08CF4u); goto label_BFC08CF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EF0u); } label_BFC08EF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08EF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08EF0: 1000FF80 beq $zero, $zero, 0xBFC08CF4 */ uint32_t psx_brA_BFC08EF0 = cpu->gpr[0]; uint32_t psx_brB_BFC08EF0 = cpu->gpr[0]; 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, 0x2002000u); #endif /* 0xBFC08EF4: 000DC940 sll $t9, $t5, 5 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[13] << 5u; PGXP_ALU(0x000DC940u, cpu->gpr[25], _pgx1, 5u); } #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, 0xBFC08CF4u); goto label_BFC08CF4; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3000u); #endif /* 0xBFC08EF8: 11ACFF9A beq $t5, $t4, 0xBFC08D64 */ uint32_t psx_brA_BFC08EF8 = cpu->gpr[13]; uint32_t psx_brB_BFC08EF8 = cpu->gpr[12]; psx_taken_BFC08EF8 = (psx_brA_BFC08EF8 == psx_brB_BFC08EF8); psx_delay_BFC08EF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08EFC: 240C7473 addiu $t4, $zero, 29811 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (29811)); PGXP_ALU(0x240C7473u, cpu->gpr[12], _pgx1, 0x00007473u); } #ifdef PSX_COSIM cosim_instr(0xBFC08EFCu); #endif if (psx_delay_BFC08EF8) { psx_delay_BFC08EF8 = 0; if (psx_taken_BFC08EF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D64u); goto label_BFC08D64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F00u); } label_BFC08F00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08F00: 240C0002 addiu $t4, $zero, 2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (2)); PGXP_ALU(0x240C0002u, cpu->gpr[12], _pgx1, 0x00000002u); } #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, 0x3000u); #endif /* 0xBFC08F04: 15AC0003 bne $t5, $t4, 0xBFC08F14 */ uint32_t psx_brA_BFC08F04 = cpu->gpr[13]; uint32_t psx_brB_BFC08F04 = cpu->gpr[12]; psx_taken_BFC08F04 = (psx_brA_BFC08F04 != psx_brB_BFC08F04); psx_delay_BFC08F04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08F08u); #endif if (psx_delay_BFC08F04) { psx_delay_BFC08F04 = 0; if (psx_taken_BFC08F04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F14u); goto label_BFC08F14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F0Cu); } label_BFC08F0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F0C: 1000FF95 beq $zero, $zero, 0xBFC08D64 */ uint32_t psx_brA_BFC08F0C = cpu->gpr[0]; uint32_t psx_brB_BFC08F0C = cpu->gpr[0]; psx_taken_BFC08F0C = (psx_brA_BFC08F0C == psx_brB_BFC08F0C); psx_delay_BFC08F0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08F10: 240C646E addiu $t4, $zero, 25710 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (25710)); PGXP_ALU(0x240C646Eu, cpu->gpr[12], _pgx1, 0x0000646Eu); } #ifdef PSX_COSIM cosim_instr(0xBFC08F10u); #endif if (psx_delay_BFC08F0C) { psx_delay_BFC08F0C = 0; if (psx_taken_BFC08F0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D64u); goto label_BFC08D64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F14u); } label_BFC08F14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F14: 1000FF93 beq $zero, $zero, 0xBFC08D64 */ uint32_t psx_brA_BFC08F14 = cpu->gpr[0]; uint32_t psx_brB_BFC08F14 = cpu->gpr[0]; psx_taken_BFC08F14 = (psx_brA_BFC08F14 == psx_brB_BFC08F14); psx_delay_BFC08F14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC08F18: 240C6472 addiu $t4, $zero, 25714 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[0] + (25714)); PGXP_ALU(0x240C6472u, cpu->gpr[12], _pgx1, 0x00006472u); } #ifdef PSX_COSIM cosim_instr(0xBFC08F18u); #endif if (psx_delay_BFC08F14) { psx_delay_BFC08F14 = 0; if (psx_taken_BFC08F14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08D64u); goto label_BFC08D64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F1Cu); } 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, 0x10u); #endif /* 0xBFC08F1C: 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(0xBFC08F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F20: 1000FFA9 beq $zero, $zero, 0xBFC08DC8 */ uint32_t psx_brA_BFC08F20 = cpu->gpr[0]; uint32_t psx_brB_BFC08F20 = cpu->gpr[0]; psx_taken_BFC08F20 = (psx_brA_BFC08F20 == psx_brB_BFC08F20); psx_delay_BFC08F20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4010u); #endif /* 0xBFC08F24: A08E0000 sb $t6, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08F24u; 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(0xBFC08F24u); #endif if (psx_delay_BFC08F20) { psx_delay_BFC08F20 = 0; if (psx_taken_BFC08F20) { #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, 0xBFC08F28u); } 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, 0x10000u); #endif /* 0xBFC08F28: 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(0xBFC08F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC08F2C: 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(0xBFC08F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F30: 1000FFBC beq $zero, $zero, 0xBFC08E24 */ uint32_t psx_brA_BFC08F30 = cpu->gpr[0]; uint32_t psx_brB_BFC08F30 = cpu->gpr[0]; psx_taken_BFC08F30 = (psx_brA_BFC08F30 == psx_brB_BFC08F30); psx_delay_BFC08F30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC08F34: A2040000 sb $a0, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08F34u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA2040000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC08F34u); #endif if (psx_delay_BFC08F30) { psx_delay_BFC08F30 = 0; if (psx_taken_BFC08F30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E24u); goto label_BFC08E24; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F38u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F38u); cpu->pc = 0xBFC08F38u; return; /* fallthrough */ } void OpenBIOS_func_1FC08F38(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08F38u); int psx_delay_BFC08F44 = 0; int psx_taken_BFC08F44 = 0; 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, 0x80000u); #endif /* 0xBFC08F38: 26730007 addiu $s3, $s3, 7 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (7)); PGXP_ALU(0x26730007u, cpu->gpr[19], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0xBFC08F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08F3C: 2403FFF8 addiu $v1, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2403FFF8u, cpu->gpr[3], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0xBFC08F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80008u); #endif /* 0xBFC08F40: 02639824 and $s3, $s3, $v1 */ { uint32_t _pgx1 = cpu->gpr[19]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[19] = cpu->gpr[19] & cpu->gpr[3]; PGXP_ALU(0x02639824u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F44: 1000FFBD beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC08F44 = cpu->gpr[0]; uint32_t psx_brB_BFC08F44 = cpu->gpr[0]; psx_taken_BFC08F44 = (psx_brA_BFC08F44 == psx_brB_BFC08F44); psx_delay_BFC08F44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC08F48: 26730008 addiu $s3, $s3, 8 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (8)); PGXP_ALU(0x26730008u, cpu->gpr[19], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0xBFC08F48u); #endif if (psx_delay_BFC08F44) { psx_delay_BFC08F44 = 0; if (psx_taken_BFC08F44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F4Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F4Cu); cpu->pc = 0xBFC08F4Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC08F4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08F4Cu); int psx_delay_BFC08F5C = 0; int psx_taken_BFC08F5C = 0; label_BFC08F4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F4Cu); #endif /* 0xBFC08F4C: 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, 0xBFC08F4Cu); 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(0xBFC08F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC08F50: 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(0xBFC08F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000008u); #endif /* 0xBFC08F54: AC7E0000 sw $fp, 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, 0xBFC08F54u); return; } g_debug_last_store_pc = 0xBFC08F54u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC7E0000u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0xBFC08F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC08F58: 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(0xBFC08F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08F5C: 1000FFB7 beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC08F5C = cpu->gpr[0]; uint32_t psx_brB_BFC08F5C = cpu->gpr[0]; psx_taken_BFC08F5C = (psx_brA_BFC08F5C == psx_brB_BFC08F5C); psx_delay_BFC08F5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC08F60: 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(0xBFC08F60u); #endif if (psx_delay_BFC08F5C) { psx_delay_BFC08F5C = 0; if (psx_taken_BFC08F5C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F64u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F64u); cpu->pc = 0xBFC08F64u; return; /* fallthrough */ } void OpenBIOS_func_1FC08F64(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08F64u); int psx_delay_BFC08F6C = 0; int psx_taken_BFC08F6C = 0; int psx_delay_BFC08F78 = 0; int psx_taken_BFC08F78 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08F6Cu: goto label_BFC08F6C; case 0xBFC08F74u: goto label_BFC08F74; default: break; } } 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, 0x9u); #endif /* 0xBFC08F64: 24030025 addiu $v1, $zero, 37 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); PGXP_ALU(0x24030025u, cpu->gpr[3], _pgx1, 0x00000025u); } #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, 0x20000008u); #endif /* 0xBFC08F68: A3A30010 sb $v1, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08F68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA3A30010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC08F68u); #endif label_BFC08F6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC08F6C: 12C00050 beq $s6, $zero, 0xBFC090B0 */ uint32_t psx_brA_BFC08F6C = cpu->gpr[22]; uint32_t psx_brB_BFC08F6C = cpu->gpr[0]; psx_taken_BFC08F6C = (psx_brA_BFC08F6C == psx_brB_BFC08F6C); psx_delay_BFC08F6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC08F70: 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(0xBFC08F70u); #endif if (psx_delay_BFC08F6C) { psx_delay_BFC08F6C = 0; if (psx_taken_BFC08F6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090B0u); cpu->pc = 0xBFC090B0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F74u); } 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, 0x440001u); #endif /* 0xBFC08F74: 02C09025 or $s2, $s6, $zero */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[18] = cpu->gpr[22] | cpu->gpr[0]; PGXP_ALU(0x02C09025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC08F78: 1000FFC5 beq $zero, $zero, 0xBFC08E90 */ uint32_t psx_brA_BFC08F78 = cpu->gpr[0]; uint32_t psx_brB_BFC08F78 = cpu->gpr[0]; psx_taken_BFC08F78 = (psx_brA_BFC08F78 == psx_brB_BFC08F78); psx_delay_BFC08F78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC08F7C: 27B00010 addiu $s0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27B00010u, cpu->gpr[16], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC08F7Cu); #endif if (psx_delay_BFC08F78) { psx_delay_BFC08F78 = 0; if (psx_taken_BFC08F78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E90u); cpu->pc = 0xBFC08E90u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F80u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F80u); cpu->pc = 0xBFC08F80u; return; /* fallthrough */ } void OpenBIOS_func_1FC08F80(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08F80u); int psx_delay_BFC08F84 = 0; int psx_taken_BFC08F84 = 0; int psx_delay_BFC08F94 = 0; int psx_taken_BFC08F94 = 0; int psx_delay_BFC08FA0 = 0; int psx_taken_BFC08FA0 = 0; int psx_delay_BFC08FAC = 0; int psx_taken_BFC08FAC = 0; int psx_delay_BFC08FC4 = 0; int psx_taken_BFC08FC4 = 0; int psx_delay_BFC08FCC = 0; int psx_taken_BFC08FCC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08F8Cu: goto label_BFC08F8C; case 0xBFC08F94u: goto label_BFC08F94; case 0xBFC08F9Cu: goto label_BFC08F9C; case 0xBFC08FA8u: goto label_BFC08FA8; case 0xBFC08FB4u: goto label_BFC08FB4; case 0xBFC08FC0u: goto label_BFC08FC0; case 0xBFC08FCCu: goto label_BFC08FCC; default: break; } } label_BFC08F80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC08F80: 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(0xBFC08F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC08F84: 17030008 bne $t8, $v1, 0xBFC08FA8 */ uint32_t psx_brA_BFC08F84 = cpu->gpr[24]; uint32_t psx_brB_BFC08F84 = cpu->gpr[3]; 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, 0x1u); #endif /* 0xBFC08F88: 00000000 nop */ /* nop */ #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, 0xBFC08FA8u); goto label_BFC08FA8; } #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 /* 0xBFC08F8C: 82650000 lb $a1, 0($s3) */ { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 5, 0x80000u); PGXP_LOAD(0x82650000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC08F90: 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(0xBFC08F90u); #endif label_BFC08F94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08F94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC08F94: 0480FFF5 bltz $a0, 0xBFC08F6C */ uint32_t psx_brA_BFC08F94 = cpu->gpr[4]; psx_taken_BFC08F94 = ((int32_t)psx_brA_BFC08F94 < 0); psx_delay_BFC08F94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC08F98: A3A50010 sb $a1, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08F98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (16)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA3A50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08F98u); #endif if (psx_delay_BFC08F94) { psx_delay_BFC08F94 = 0; if (psx_taken_BFC08F94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F6Cu); cpu->pc = 0xBFC08F6Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F9Cu); } 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, 0x9u); #endif /* 0xBFC08F9C: 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(0xBFC08F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08FA0: 10000007 beq $zero, $zero, 0xBFC08FC0 */ uint32_t psx_brA_BFC08FA0 = cpu->gpr[0]; uint32_t psx_brB_BFC08FA0 = cpu->gpr[0]; 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, 0x20010000u); #endif /* 0xBFC08FA4: 27B00010 addiu $s0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27B00010u, cpu->gpr[16], _pgx1, 0x00000010u); } #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, 0xBFC08FC0u); goto label_BFC08FC0; } #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 /* 0xBFC08FA8: 82250001 lb $a1, 1($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 1; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (1)), 5, 0x20000u); PGXP_LOAD(0x82250001u, _pgxa, cpu->gpr[5]); } #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, 0x1u); #endif /* 0xBFC08FAC: 1000FFF9 beq $zero, $zero, 0xBFC08F94 */ uint32_t psx_brA_BFC08FAC = cpu->gpr[0]; uint32_t psx_brB_BFC08FAC = cpu->gpr[0]; psx_taken_BFC08FAC = (psx_brA_BFC08FAC == psx_brB_BFC08FAC); psx_delay_BFC08FAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC08FB0: 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(0xBFC08FB0u); #endif if (psx_delay_BFC08FAC) { psx_delay_BFC08FAC = 0; if (psx_taken_BFC08FAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08F94u); goto label_BFC08F94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FB4u); } 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, 0x10048u); #endif /* 0xBFC08FB4: 02033021 addu $a2, $s0, $v1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[3]; PGXP_ALU(0x02033021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x60u); #endif /* 0xBFC08FB8: A0C50000 sb $a1, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC08FB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0C50000u, _pgxa, cpu->gpr[5]); } #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, 0x8u); #endif /* 0xBFC08FBC: 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(0xBFC08FBCu); #endif label_BFC08FC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08FC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x58u); #endif /* 0xBFC08FC0: 0064302A slt $a2, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0064302Au, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x41u); #endif /* 0xBFC08FC4: 14C0FFFB bne $a2, $zero, 0xBFC08FB4 */ uint32_t psx_brA_BFC08FC4 = cpu->gpr[6]; uint32_t psx_brB_BFC08FC4 = cpu->gpr[0]; psx_taken_BFC08FC4 = (psx_brA_BFC08FC4 != psx_brB_BFC08FC4); psx_delay_BFC08FC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC08FC8: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08FC8u); #endif if (psx_delay_BFC08FC4) { psx_delay_BFC08FC4 = 0; if (psx_taken_BFC08FC4) { #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, 0xBFC08FCCu); } label_BFC08FCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08FCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08FCC: 1000FF9B beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC08FCC = cpu->gpr[0]; uint32_t psx_brB_BFC08FCC = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC08FD0: 00000000 nop */ /* nop */ #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, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FD4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FD4u); cpu->pc = 0xBFC08FD4u; return; /* fallthrough */ } void OpenBIOS_func_1FC08FD4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC08FD4u); int psx_delay_BFC08FDC = 0; int psx_taken_BFC08FDC = 0; int psx_delay_BFC08FFC = 0; int psx_taken_BFC08FFC = 0; int psx_delay_BFC09004 = 0; int psx_taken_BFC09004 = 0; int psx_delay_BFC09010 = 0; int psx_taken_BFC09010 = 0; int psx_delay_BFC09018 = 0; int psx_taken_BFC09018 = 0; int psx_delay_BFC09020 = 0; int psx_taken_BFC09020 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC08FE4u: goto label_BFC08FE4; case 0xBFC08FECu: goto label_BFC08FEC; case 0xBFC08FF0u: goto label_BFC08FF0; case 0xBFC09004u: goto label_BFC09004; case 0xBFC0900Cu: goto label_BFC0900C; case 0xBFC09018u: goto label_BFC09018; case 0xBFC09020u: goto label_BFC09020; default: break; } } 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 /* 0xBFC08FD4: 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, 0xBFC08FD4u); 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(0xBFC08FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08FD8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC08FDC: 16000003 bne $s0, $zero, 0xBFC08FEC */ uint32_t psx_brA_BFC08FDC = cpu->gpr[16]; uint32_t psx_brB_BFC08FDC = cpu->gpr[0]; psx_taken_BFC08FDC = (psx_brA_BFC08FDC != psx_brB_BFC08FDC); psx_delay_BFC08FDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80008u); #endif /* 0xBFC08FE0: 26630004 addiu $v1, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); PGXP_ALU(0x26630004u, cpu->gpr[3], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC08FE0u); #endif if (psx_delay_BFC08FDC) { psx_delay_BFC08FDC = 0; if (psx_taken_BFC08FDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FECu); goto label_BFC08FEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FE4u); } label_BFC08FE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08FE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08FE4: 3C10BFC1 lui $s0, 0xBFC1 */ cpu->gpr[16] = 0xBFC10000u; PGXP_ALU(0x3C10BFC1u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC08FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC08FE8: 26109EF8 addiu $s0, $s0, -24840 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (-24840)); PGXP_ALU(0x26109EF8u, cpu->gpr[16], _pgx1, 0xFFFF9EF8u); } #ifdef PSX_COSIM cosim_instr(0xBFC08FE8u); #endif label_BFC08FEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08FECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC08FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC08FEC: 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(0xBFC08FECu); #endif label_BFC08FF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC08FF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC08FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50020u); #endif /* 0xBFC08FF0: 02122821 addu $a1, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[5] = cpu->gpr[16] + cpu->gpr[18]; PGXP_ALU(0x02122821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC08FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FF4u); #endif /* 0xBFC08FF4: 80A50000 lb $a1, 0($a1) */ { uint32_t _pgxa = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (0)), 5, 0x20u); PGXP_LOAD(0x80A50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC08FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC08FF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC08FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC08FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC08FFC: 14A00008 bne $a1, $zero, 0xBFC09020 */ uint32_t psx_brA_BFC08FFC = cpu->gpr[5]; uint32_t psx_brB_BFC08FFC = cpu->gpr[0]; psx_taken_BFC08FFC = (psx_brA_BFC08FFC != psx_brB_BFC08FFC); psx_delay_BFC08FFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09000: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09000u); #endif if (psx_delay_BFC08FFC) { psx_delay_BFC08FFC = 0; if (psx_taken_BFC08FFC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09020u); goto label_BFC09020; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09004u); } label_BFC09004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09004u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09004: 0480FF8D bltz $a0, 0xBFC08E3C */ uint32_t psx_brA_BFC09004 = cpu->gpr[4]; psx_taken_BFC09004 = ((int32_t)psx_brA_BFC09004 < 0); psx_delay_BFC09004 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80009u); #endif /* 0xBFC09008: 00609825 or $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(0x00609825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09008u); #endif if (psx_delay_BFC09004) { psx_delay_BFC09004 = 0; if (psx_taken_BFC09004) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0900Cu); } label_BFC0900C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0900Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0900Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0900Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40030u); #endif /* 0xBFC0900C: 0092282A slt $a1, $a0, $s2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0092282Au, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x21u); #endif /* 0xBFC09010: 10A0FF8A beq $a1, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC09010 = cpu->gpr[5]; uint32_t psx_brB_BFC09010 = cpu->gpr[0]; psx_taken_BFC09010 = (psx_brA_BFC09010 == psx_brB_BFC09010); psx_delay_BFC09010 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09014: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09014u); #endif if (psx_delay_BFC09010) { psx_delay_BFC09010 = 0; if (psx_taken_BFC09010) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09018u); } label_BFC09018: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09018u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09018: 1000FF88 beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC09018 = cpu->gpr[0]; uint32_t psx_brB_BFC09018 = cpu->gpr[0]; psx_taken_BFC09018 = (psx_brA_BFC09018 == psx_brB_BFC09018); psx_delay_BFC09018 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0901Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0901C: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0901Cu); #endif if (psx_delay_BFC09018) { psx_delay_BFC09018 = 0; if (psx_taken_BFC09018) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09020u); } label_BFC09020: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09020u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09020: 1000FFF3 beq $zero, $zero, 0xBFC08FF0 */ uint32_t psx_brA_BFC09020 = cpu->gpr[0]; uint32_t psx_brB_BFC09020 = cpu->gpr[0]; psx_taken_BFC09020 = (psx_brA_BFC09020 == psx_brB_BFC09020); psx_delay_BFC09020 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC09024: 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(0xBFC09024u); #endif if (psx_delay_BFC09020) { psx_delay_BFC09020 = 0; if (psx_taken_BFC09020) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08FF0u); goto label_BFC08FF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09028u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09028u); cpu->pc = 0xBFC09028u; return; /* fallthrough */ } void OpenBIOS_func_1FC09028(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC09028u); int psx_delay_BFC09044 = 0; int psx_taken_BFC09044 = 0; int psx_delay_BFC09050 = 0; int psx_taken_BFC09050 = 0; int psx_delay_BFC0907C = 0; int psx_taken_BFC0907C = 0; int psx_delay_BFC09084 = 0; int psx_taken_BFC09084 = 0; int psx_delay_BFC0908C = 0; int psx_taken_BFC0908C = 0; int psx_delay_BFC09098 = 0; int psx_taken_BFC09098 = 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_delay_BFC090C8 = 0; int psx_taken_BFC090C8 = 0; int psx_delay_BFC090D8 = 0; int psx_delay_BFC090E0 = 0; int psx_taken_BFC090E0 = 0; int psx_delay_BFC090E8 = 0; int psx_taken_BFC090E8 = 0; int psx_delay_BFC090F0 = 0; int psx_taken_BFC090F0 = 0; int psx_delay_BFC090F8 = 0; int psx_taken_BFC090F8 = 0; int psx_delay_BFC09100 = 0; int psx_taken_BFC09100 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC090B0u: goto label_BFC090B0; case 0xBFC090B8u: goto label_BFC090B8; case 0xBFC090D0u: goto label_BFC090D0; case 0xBFC090E8u: goto label_BFC090E8; case 0xBFC090F8u: goto label_BFC090F8; case 0xBFC0903Cu: goto label_BFC0903C; case 0xBFC0904Cu: goto label_BFC0904C; case 0xBFC09058u: goto label_BFC09058; case 0xBFC09074u: goto label_BFC09074; case 0xBFC09084u: goto label_BFC09084; case 0xBFC0908Cu: goto label_BFC0908C; case 0xBFC09094u: goto label_BFC09094; case 0xBFC09098u: goto label_BFC09098; case 0xBFC090A0u: goto label_BFC090A0; case 0xBFC090C8u: goto label_BFC090C8; case 0xBFC090E0u: goto label_BFC090E0; case 0xBFC090F0u: goto label_BFC090F0; case 0xBFC09100u: goto label_BFC09100; default: break; } } label_BFC09028: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09028u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09028u); #endif /* 0xBFC09028: 8E650000 lw $a1, 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, 0xBFC09028u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x80000u); } PGXP_LOAD(0x8E650000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0xBFC09028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0902Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80400u); #endif /* 0xBFC0902C: 266A0004 addiu $t2, $s3, 4 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[19] + (4)); PGXP_ALU(0x266A0004u, cpu->gpr[10], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0xBFC0902Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC09030: 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(0xBFC09030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC09034: 27B00010 addiu $s0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27B00010u, cpu->gpr[16], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0xBFC09034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC09038: 240B005E addiu $t3, $zero, 94 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[0] + (94)); PGXP_ALU(0x240B005Eu, cpu->gpr[11], _pgx1, 0x0000005Eu); } #ifdef PSX_COSIM cosim_instr(0xBFC09038u); #endif label_BFC0903C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0903Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0903Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0903Cu); #endif /* 0xBFC0903C: 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(0xBFC0903Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09040: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC09044: 1060000F beq $v1, $zero, 0xBFC09084 */ uint32_t psx_brA_BFC09044 = cpu->gpr[3]; uint32_t psx_brB_BFC09044 = cpu->gpr[0]; psx_taken_BFC09044 = (psx_brA_BFC09044 == psx_brB_BFC09044); psx_delay_BFC09044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC09048: 2466FFE0 addiu $a2, $v1, -32 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[3] + (-32)); PGXP_ALU(0x2466FFE0u, cpu->gpr[6], _pgx1, 0xFFFFFFE0u); } #ifdef PSX_COSIM cosim_instr(0xBFC09048u); #endif if (psx_delay_BFC09044) { psx_delay_BFC09044 = 0; if (psx_taken_BFC09044) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09084u); goto label_BFC09084; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0904Cu); } label_BFC0904C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0904Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0904Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0904Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0904C: 2CC6005F sltiu $a2, $a2, 95 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x0000005Fu ? 1 : 0); PGXP_ALU(0x2CC6005Fu, cpu->gpr[6], _pgx1, 0x005Fu); } #ifdef PSX_COSIM cosim_instr(0xBFC0904Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC09050: 14C00013 bne $a2, $zero, 0xBFC090A0 */ uint32_t psx_brA_BFC09050 = cpu->gpr[6]; uint32_t psx_brB_BFC09050 = cpu->gpr[0]; psx_taken_BFC09050 = (psx_brA_BFC09050 != psx_brB_BFC09050); psx_delay_BFC09050 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC09054: 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(0xBFC09054u); #endif if (psx_delay_BFC09050) { psx_delay_BFC09050 = 0; if (psx_taken_BFC09050) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090A0u); goto label_BFC090A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09058u); } label_BFC09058: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09058u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40040u); #endif /* 0xBFC09058: 26460001 addiu $a2, $s2, 1 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[18] + (1)); PGXP_ALU(0x26460001u, cpu->gpr[6], _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, 0x8u); #endif /* 0xBFC0905C: 3063001F andi $v1, $v1, 0x1F */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x1Fu; PGXP_ALU(0x3063001Fu, cpu->gpr[3], _pgx1, 0x001Fu); } #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, 0x50000u); #endif /* 0xBFC09060: 02129021 addu $s2, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[16] + cpu->gpr[18]; PGXP_ALU(0x02129021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11040u); #endif /* 0xBFC09064: 02066021 addu $t4, $s0, $a2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[12] = cpu->gpr[16] + cpu->gpr[6]; PGXP_ALU(0x02066021u, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC09068: 24630040 addiu $v1, $v1, 64 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (64)); PGXP_ALU(0x24630040u, cpu->gpr[3], _pgx1, 0x00000040u); } #ifdef PSX_COSIM cosim_instr(0xBFC09068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0906Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40800u); #endif /* 0xBFC0906C: A24B0000 sb $t3, 0($s2) */ { uint32_t _pgxa = cpu->gpr[18]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0906Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (0)), (uint8_t)(cpu->gpr[11] & 0xFFu)); PGXP_STORE(0xA24B0000u, _pgxa, cpu->gpr[11]); } #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, 0x1008u); #endif /* 0xBFC09070: A1830000 sb $v1, 0($t4) */ { uint32_t _pgxa = cpu->gpr[12]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC09070u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[12] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA1830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC09070u); #endif label_BFC09074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09074u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40040u); #endif /* 0xBFC09074: 24D20001 addiu $s2, $a2, 1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[6] + (1)); PGXP_ALU(0x24D20001u, cpu->gpr[18], _pgx1, 0x00000001u); } #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, 0x40008u); #endif /* 0xBFC09078: 2A430063 slti $v1, $s2, 99 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[18] < (99) ? 1 : 0); PGXP_ALU(0x2A430063u, cpu->gpr[3], _pgx1, 0x0063u); } #ifdef PSX_COSIM cosim_instr(0xBFC09078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0907Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0907C: 1460FFEF bne $v1, $zero, 0xBFC0903C */ uint32_t psx_brA_BFC0907C = cpu->gpr[3]; uint32_t psx_brB_BFC0907C = cpu->gpr[0]; psx_taken_BFC0907C = (psx_brA_BFC0907C != psx_brB_BFC0907C); psx_delay_BFC0907C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09080: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09080u); #endif if (psx_delay_BFC0907C) { psx_delay_BFC0907C = 0; if (psx_taken_BFC0907C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0903Cu); goto label_BFC0903C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09084u); } label_BFC09084: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09084u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09084: 04800004 bltz $a0, 0xBFC09098 */ uint32_t psx_brA_BFC09084 = cpu->gpr[4]; psx_taken_BFC09084 = ((int32_t)psx_brA_BFC09084 < 0); psx_delay_BFC09084 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40018u); #endif /* 0xBFC09088: 0092182A slt $v1, $a0, $s2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[18] ? 1 : 0); PGXP_ALU(0x0092182Au, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09088u); #endif if (psx_delay_BFC09084) { psx_delay_BFC09084 = 0; if (psx_taken_BFC09084) { #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, 0xBFC0908Cu); } label_BFC0908C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0908Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0908Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0908Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0908C: 1060FF6B beq $v1, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC0908C = cpu->gpr[3]; uint32_t psx_brB_BFC0908C = cpu->gpr[0]; 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, 0x80401u); #endif /* 0xBFC09090: 01409825 or $s3, $t2, $zero */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[10] | cpu->gpr[0]; PGXP_ALU(0x01409825u, cpu->gpr[19], _pgx1, _pgx2); } #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, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #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, 0x40011u); #endif /* 0xBFC09094: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC09098: 1000FF68 beq $zero, $zero, 0xBFC08E3C */ uint32_t psx_brA_BFC09098 = cpu->gpr[0]; uint32_t psx_brB_BFC09098 = cpu->gpr[0]; psx_taken_BFC09098 = (psx_brA_BFC09098 == psx_brB_BFC09098); psx_delay_BFC09098 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0909Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80401u); #endif /* 0xBFC0909C: 01409825 or $s3, $t2, $zero */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[19] = cpu->gpr[10] | cpu->gpr[0]; PGXP_ALU(0x01409825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0909Cu); #endif if (psx_delay_BFC09098) { psx_delay_BFC09098 = 0; if (psx_taken_BFC09098) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E3Cu); cpu->pc = 0xBFC08E3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090A0u); } label_BFC090A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC090A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC090A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50040u); #endif /* 0xBFC090A0: 02123021 addu $a2, $s0, $s2 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[6] = cpu->gpr[16] + cpu->gpr[18]; PGXP_ALU(0x02123021u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0x48u); #endif /* 0xBFC090A4: A0C30000 sb $v1, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC090A4u; 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(0xBFC090A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC090A8: 1000FFF2 beq $zero, $zero, 0xBFC09074 */ uint32_t psx_brA_BFC090A8 = cpu->gpr[0]; uint32_t psx_brB_BFC090A8 = cpu->gpr[0]; 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, 0x40041u); #endif /* 0xBFC090AC: 02403025 or $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(0x02403025u, cpu->gpr[6], _pgx1, _pgx2); } #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, 0xBFC09074u); goto label_BFC09074; } #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: 1000FF64 beq $zero, $zero, 0xBFC08E44 */ 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, 0x20010000u); #endif /* 0xBFC090B4: 27B00010 addiu $s0, $sp, 16 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (16)); PGXP_ALU(0x27B00010u, cpu->gpr[16], _pgx1, 0x00000010u); } #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, 0xBFC08E44u); cpu->pc = 0xBFC08E44u; return; } #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: 8FA600BC lw $a2, 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, 0xBFC090B8u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC090B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090BCu); #endif /* 0xBFC090BC: 8FA40078 lw $a0, 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, 0xBFC090BCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40078u, _pgxa, cpu->gpr[4]); } #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, 0x80100000u); #endif /* 0xBFC090C0: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC090C8u; /* jalr link before delay slot */ psx_delay_BFC090C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC090C4: 24050034 addiu $a1, $zero, 52 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); PGXP_ALU(0x24050034u, cpu->gpr[5], _pgx1, 0x00000034u); } #ifdef PSX_COSIM cosim_instr(0xBFC090C4u); #endif if (psx_delay_BFC090C0) { psx_delay_BFC090C0 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC090C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } 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, 0x1u); #endif /* 0xBFC090C8: 1000FF66 beq $zero, $zero, 0xBFC08E64 */ uint32_t psx_brA_BFC090C8 = cpu->gpr[0]; uint32_t psx_brB_BFC090C8 = cpu->gpr[0]; 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, 0x400000u); #endif /* 0xBFC090CC: 26D6FFCC addiu $s6, $s6, -52 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-52)); PGXP_ALU(0x26D6FFCCu, cpu->gpr[22], _pgx1, 0xFFFFFFCCu); } #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, 0xBFC08E64u); cpu->pc = 0xBFC08E64u; return; } #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 /* 0xBFC090D0: 8FA600BC lw $a2, 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, 0xBFC090D0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x20000000u); } PGXP_LOAD(0x8FA600BCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0xBFC090D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090D4u); #endif /* 0xBFC090D4: 8FA40078 lw $a0, 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, 0xBFC090D4u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20000000u); } PGXP_LOAD(0x8FA40078u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0xBFC090D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80100000u); #endif /* 0xBFC090D8: 0280F809 jalr $ra, $s4 */ cpu->gpr[31] = 0xBFC090E0u; /* jalr link before delay slot */ psx_delay_BFC090D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC090DC: 24050034 addiu $a1, $zero, 52 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (52)); PGXP_ALU(0x24050034u, cpu->gpr[5], _pgx1, 0x00000034u); } #ifdef PSX_COSIM cosim_instr(0xBFC090DCu); #endif if (psx_delay_BFC090D8) { psx_delay_BFC090D8 = 0; { uint32_t _t = cpu->gpr[20]; cpu->gpr[31] = 0xBFC090E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC090E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC090E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC090E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC090E0: 1000FF76 beq $zero, $zero, 0xBFC08EBC */ uint32_t psx_brA_BFC090E0 = cpu->gpr[0]; uint32_t psx_brB_BFC090E0 = cpu->gpr[0]; psx_taken_BFC090E0 = (psx_brA_BFC090E0 == psx_brB_BFC090E0); psx_delay_BFC090E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC090E4: 26F7FFCC addiu $s7, $s7, -52 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[23] + (-52)); PGXP_ALU(0x26F7FFCCu, cpu->gpr[23], _pgx1, 0xFFFFFFCCu); } #ifdef PSX_COSIM cosim_instr(0xBFC090E4u); #endif if (psx_delay_BFC090E0) { psx_delay_BFC090E0 = 0; if (psx_taken_BFC090E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EBCu); cpu->pc = 0xBFC08EBCu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090E8u); } label_BFC090E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC090E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC090E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC090E8: 1E40FF69 bgtz $s2, 0xBFC08E90 */ uint32_t psx_brA_BFC090E8 = cpu->gpr[18]; psx_taken_BFC090E8 = ((int32_t)psx_brA_BFC090E8 > 0); psx_delay_BFC090E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC090EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC090ECu); #endif if (psx_delay_BFC090E8) { psx_delay_BFC090E8 = 0; if (psx_taken_BFC090E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E90u); cpu->pc = 0xBFC08E90u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090F0u); } label_BFC090F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC090F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC090F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC090F0: 1000FF6F beq $zero, $zero, 0xBFC08EB0 */ uint32_t psx_brA_BFC090F0 = cpu->gpr[0]; uint32_t psx_brB_BFC090F0 = cpu->gpr[0]; psx_taken_BFC090F0 = (psx_brA_BFC090F0 == psx_brB_BFC090F0); psx_delay_BFC090F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840000u); #endif /* 0xBFC090F4: 02F2B823 subu $s7, $s7, $s2 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[23] = cpu->gpr[23] - cpu->gpr[18]; PGXP_ALU(0x02F2B823u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC090F4u); #endif if (psx_delay_BFC090F0) { psx_delay_BFC090F0 = 0; if (psx_taken_BFC090F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08EB0u); cpu->pc = 0xBFC08EB0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC090F8u); } label_BFC090F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC090F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC090F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC090F8: 1E40FF65 bgtz $s2, 0xBFC08E90 */ uint32_t psx_brA_BFC090F8 = cpu->gpr[18]; psx_taken_BFC090F8 = ((int32_t)psx_brA_BFC090F8 > 0); psx_delay_BFC090F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC090FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC090FC: 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(0xBFC090FCu); #endif if (psx_delay_BFC090F8) { psx_delay_BFC090F8 = 0; if (psx_taken_BFC090F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08E90u); cpu->pc = 0xBFC08E90u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09100u); } label_BFC09100: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09100u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09100: 1000FE15 beq $zero, $zero, 0xBFC08958 */ uint32_t psx_brA_BFC09100 = cpu->gpr[0]; uint32_t psx_brB_BFC09100 = cpu->gpr[0]; psx_taken_BFC09100 = (psx_brA_BFC09100 == psx_brB_BFC09100); psx_delay_BFC09100 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC09104: 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(0xBFC09104u); #endif if (psx_delay_BFC09100) { psx_delay_BFC09100 = 0; if (psx_taken_BFC09100) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08958u); cpu->pc = 0xBFC08958u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09108u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09108u); cpu->pc = 0xBFC09108u; return; /* fallthrough */ } void OpenBIOS_func_1FC09108(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC09108u); int psx_delay_BFC0910C = 0; int psx_taken_BFC0910C = 0; int psx_delay_BFC09114 = 0; int psx_delay_BFC0911C = 0; int psx_delay_BFC09124 = 0; int psx_taken_BFC09124 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC09114u: goto label_BFC09114; case 0xBFC0911Cu: goto label_BFC0911C; case 0xBFC09124u: goto label_BFC09124; default: break; } } 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, 0x20000000u); #endif /* 0xBFC09108: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC09108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0910Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0910C: 10800003 beq $a0, $zero, 0xBFC0911C */ uint32_t psx_brA_BFC0910C = cpu->gpr[4]; uint32_t psx_brB_BFC0910C = cpu->gpr[0]; psx_taken_BFC0910C = (psx_brA_BFC0910C == psx_brB_BFC0910C); psx_delay_BFC0910C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC09110: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09110u); return; } g_debug_last_store_pc = 0xBFC09110u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC09110u); #endif if (psx_delay_BFC0910C) { psx_delay_BFC0910C = 0; if (psx_taken_BFC0910C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0911Cu); goto label_BFC0911C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09114u); } label_BFC09114: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09114u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09114: 0FF020E4 jal 0xBFC08390 */ cpu->gpr[31] = 0xBFC0911Cu; /* jal link before delay slot */ psx_delay_BFC09114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09118: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09118u); #endif if (psx_delay_BFC09114) { psx_delay_BFC09114 = 0; cpu->gpr[31] = 0xBFC0911Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08390u); cpu->pc = 0xBFC08390u; return; } label_BFC0911C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0911Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0911Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0911Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0911C: 0FF020E2 jal 0xBFC08388 */ cpu->gpr[31] = 0xBFC09124u; /* jal link before delay slot */ psx_delay_BFC0911C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09120: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09120u); #endif if (psx_delay_BFC0911C) { psx_delay_BFC0911C = 0; cpu->gpr[31] = 0xBFC09124u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08388u); cpu->pc = 0xBFC08388u; return; } label_BFC09124: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09124u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09124: 1000FFFF beq $zero, $zero, 0xBFC09124 */ uint32_t psx_brA_BFC09124 = cpu->gpr[0]; uint32_t psx_brB_BFC09124 = cpu->gpr[0]; psx_taken_BFC09124 = (psx_brA_BFC09124 == psx_brB_BFC09124); psx_delay_BFC09124 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09128: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09128u); #endif if (psx_delay_BFC09124) { psx_delay_BFC09124 = 0; if (psx_taken_BFC09124) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09124u); goto label_BFC09124; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0912Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0912Cu); cpu->pc = 0xBFC0912Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0912C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0912Cu); int psx_delay_BFC09134 = 0; int psx_delay_BFC0913C = 0; int psx_delay_BFC09144 = 0; int psx_delay_BFC09150 = 0; int psx_delay_BFC09158 = 0; int psx_delay_BFC09160 = 0; int psx_delay_BFC09168 = 0; int psx_delay_BFC09170 = 0; int psx_delay_BFC09178 = 0; int psx_delay_BFC09188 = 0; int psx_delay_BFC09190 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0913Cu: goto label_BFC0913C; case 0xBFC09144u: goto label_BFC09144; case 0xBFC0914Cu: goto label_BFC0914C; case 0xBFC09158u: goto label_BFC09158; case 0xBFC09160u: goto label_BFC09160; case 0xBFC09168u: goto label_BFC09168; case 0xBFC09170u: goto label_BFC09170; case 0xBFC09178u: goto label_BFC09178; case 0xBFC09180u: goto label_BFC09180; case 0xBFC09190u: goto label_BFC09190; default: break; } } label_BFC0912C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0912Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0912Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0912Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0912C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0xBFC0912Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC09130: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09130u); return; } g_debug_last_store_pc = 0xBFC09130u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC09130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09134: 0FF020DC jal 0xBFC08370 */ cpu->gpr[31] = 0xBFC0913Cu; /* jal link before delay slot */ psx_delay_BFC09134 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09138: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09138u); #endif if (psx_delay_BFC09134) { psx_delay_BFC09134 = 0; cpu->gpr[31] = 0xBFC0913Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08370u); cpu->pc = 0xBFC08370u; return; } 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, 0x80000000u); #endif /* 0xBFC0913C: 0FF020E6 jal 0xBFC08398 */ cpu->gpr[31] = 0xBFC09144u; /* jal link before delay slot */ 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; cpu->gpr[31] = 0xBFC09144u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08398u); cpu->pc = 0xBFC08398u; return; } 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, 0x80000000u); #endif /* 0xBFC09144: 0FF020CC jal 0xBFC08330 */ cpu->gpr[31] = 0xBFC0914Cu; /* jal link before delay slot */ psx_delay_BFC09144 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09148: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09148u); #endif if (psx_delay_BFC09144) { psx_delay_BFC09144 = 0; cpu->gpr[31] = 0xBFC0914Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08330u); cpu->pc = 0xBFC08330u; return; } label_BFC0914C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0914Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0914Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0914Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0914C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC09150: 0FF020CE jal 0xBFC08338 */ cpu->gpr[31] = 0xBFC09158u; /* jal link before delay slot */ psx_delay_BFC09150 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09154: 24849F4C addiu $a0, $a0, -24756 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24756)); PGXP_ALU(0x24849F4Cu, cpu->gpr[4], _pgx1, 0xFFFF9F4Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC09154u); #endif if (psx_delay_BFC09150) { psx_delay_BFC09150 = 0; cpu->gpr[31] = 0xBFC09158u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08338u); cpu->pc = 0xBFC08338u; return; } 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, 0x80000000u); #endif /* 0xBFC09158: 0FF020EE jal 0xBFC083B8 */ cpu->gpr[31] = 0xBFC09160u; /* jal link before delay slot */ psx_delay_BFC09158 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0915Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0915C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0915Cu); #endif if (psx_delay_BFC09158) { psx_delay_BFC09158 = 0; cpu->gpr[31] = 0xBFC09160u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083B8u); cpu->pc = 0xBFC083B8u; return; } label_BFC09160: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09160u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09160: 0FF020DE jal 0xBFC08378 */ cpu->gpr[31] = 0xBFC09168u; /* jal link before delay slot */ psx_delay_BFC09160 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09164: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09164u); #endif if (psx_delay_BFC09160) { psx_delay_BFC09160 = 0; cpu->gpr[31] = 0xBFC09168u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08378u); cpu->pc = 0xBFC08378u; return; } label_BFC09168: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09168u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09168: 0FF020E8 jal 0xBFC083A0 */ cpu->gpr[31] = 0xBFC09170u; /* jal link before delay slot */ psx_delay_BFC09168 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0916Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0916C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0916Cu); #endif if (psx_delay_BFC09168) { psx_delay_BFC09168 = 0; cpu->gpr[31] = 0xBFC09170u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083A0u); cpu->pc = 0xBFC083A0u; return; } label_BFC09170: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09170u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09170: 0FF020E0 jal 0xBFC08380 */ cpu->gpr[31] = 0xBFC09178u; /* jal link before delay slot */ psx_delay_BFC09170 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09174: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09174u); #endif if (psx_delay_BFC09170) { psx_delay_BFC09170 = 0; cpu->gpr[31] = 0xBFC09178u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08380u); cpu->pc = 0xBFC08380u; return; } label_BFC09178: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09178u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09178: 0FF020EA jal 0xBFC083A8 */ cpu->gpr[31] = 0xBFC09180u; /* jal link before delay slot */ psx_delay_BFC09178 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0917Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0917C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0917Cu); #endif if (psx_delay_BFC09178) { psx_delay_BFC09178 = 0; cpu->gpr[31] = 0xBFC09180u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC083A8u); cpu->pc = 0xBFC083A8u; return; } label_BFC09180: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09180u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC09180: 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(0xBFC09180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC09184: 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(0xBFC09184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09188: 0FF00051 jal 0xBFC00144 */ cpu->gpr[31] = 0xBFC09190u; /* jal link before delay slot */ psx_delay_BFC09188 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0918Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0918C: 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(0xBFC0918Cu); #endif if (psx_delay_BFC09188) { psx_delay_BFC09188 = 0; cpu->gpr[31] = 0xBFC09190u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00144u); cpu->pc = 0xBFC00144u; return; } label_BFC09190: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09190u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09190: 0FF00021 jal 0xBFC00084 */ cpu->gpr[31] = 0xBFC09198u; /* jal link before delay slot */ psx_delay_BFC09190 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC09194: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09194u); #endif if (psx_delay_BFC09190) { psx_delay_BFC09190 = 0; cpu->gpr[31] = 0xBFC09198u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC00084u); cpu->pc = 0xBFC00084u; return; } } void OpenBIOS_func_1FC09198(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC09198u); int psx_delay_BFC091B0 = 0; int psx_taken_BFC091B0 = 0; int psx_delay_BFC091C4 = 0; int psx_delay_BFC091D0 = 0; int psx_delay_BFC091D8 = 0; int psx_taken_BFC091D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC091B0u: goto label_BFC091B0; case 0xBFC091B8u: goto label_BFC091B8; case 0xBFC091CCu: goto label_BFC091CC; case 0xBFC091D8u: goto label_BFC091D8; default: break; } } 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, 0x20000000u); #endif /* 0xBFC09198: 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(0xBFC09198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0919Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0919C: 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, 0xBFC0919Cu); return; } g_debug_last_store_pc = 0xBFC0919Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC0919Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC091A0: 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, 0xBFC091A0u); return; } g_debug_last_store_pc = 0xBFC091A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC091A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC091A4: 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, 0xBFC091A4u); return; } g_debug_last_store_pc = 0xBFC091A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC091A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC091A8: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC091A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20030u); #endif /* 0xBFC091AC: 00858821 addu $s1, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[17] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00858821u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC091ACu); #endif label_BFC091B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC091B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC091B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC091B0: 16110006 bne $s0, $s1, 0xBFC091CC */ uint32_t psx_brA_BFC091B0 = cpu->gpr[16]; uint32_t psx_brB_BFC091B0 = cpu->gpr[17]; psx_taken_BFC091B0 = (psx_brA_BFC091B0 != psx_brB_BFC091B0); psx_delay_BFC091B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC091B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC091B4u); #endif if (psx_delay_BFC091B0) { psx_delay_BFC091B0 = 0; if (psx_taken_BFC091B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091CCu); goto label_BFC091CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091B8u); } label_BFC091B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC091B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC091B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091B8u); #endif /* 0xBFC091B8: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC091B8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0xBFC091B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091BCu); #endif /* 0xBFC091BC: 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, 0xBFC091BCu); 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(0xBFC091BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091C0u); #endif /* 0xBFC091C0: 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, 0xBFC091C0u); 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(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, 0x20000000u); #endif /* 0xBFC091C8: 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(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 */ } 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 /* 0xBFC091CC: 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(0xBFC091CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC091D0: 0FF020D8 jal 0xBFC08360 */ cpu->gpr[31] = 0xBFC091D8u; /* jal link before delay slot */ psx_delay_BFC091D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC091D4: 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(0xBFC091D4u); #endif if (psx_delay_BFC091D0) { psx_delay_BFC091D0 = 0; cpu->gpr[31] = 0xBFC091D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08360u); cpu->pc = 0xBFC08360u; return; } label_BFC091D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC091D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC091D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC091D8: 1000FFF5 beq $zero, $zero, 0xBFC091B0 */ uint32_t psx_brA_BFC091D8 = cpu->gpr[0]; uint32_t psx_brB_BFC091D8 = cpu->gpr[0]; psx_taken_BFC091D8 = (psx_brA_BFC091D8 == psx_brB_BFC091D8); psx_delay_BFC091D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC091DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC091DCu); #endif if (psx_delay_BFC091D8) { psx_delay_BFC091D8 = 0; if (psx_taken_BFC091D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091B0u); goto label_BFC091B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; /* fallthrough */ } void OpenBIOS_func_1FC091E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC091E0u); int psx_delay_BFC091E4 = 0; label_BFC091E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC091E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC091E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091E0u); #endif /* 0xBFC091E0: 80840000 lb $a0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 4, 0x10u); PGXP_LOAD(0x80840000u, _pgxa, cpu->gpr[4]); } #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, 0x0u); #endif /* 0xBFC091E4: 0BF020D8 j 0xBFC08360 */ psx_delay_BFC091E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC091E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC091E8u); #endif if (psx_delay_BFC091E4) { psx_delay_BFC091E4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC08360u); cpu->pc = 0xBFC08360u; return; } } void OpenBIOS_func_1FC091EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC091ECu); int psx_delay_BFC0921C = 0; int psx_taken_BFC0921C = 0; int psx_delay_BFC09248 = 0; int psx_taken_BFC09248 = 0; int psx_delay_BFC09258 = 0; int psx_taken_BFC09258 = 0; int psx_delay_BFC09260 = 0; int psx_taken_BFC09260 = 0; int psx_delay_BFC09268 = 0; int psx_delay_BFC09288 = 0; int psx_taken_BFC09288 = 0; int psx_delay_BFC09294 = 0; int psx_taken_BFC09294 = 0; int psx_delay_BFC0929C = 0; int psx_taken_BFC0929C = 0; int psx_delay_BFC092A4 = 0; int psx_taken_BFC092A4 = 0; int psx_delay_BFC092AC = 0; int psx_taken_BFC092AC = 0; int psx_delay_BFC092B4 = 0; int psx_taken_BFC092B4 = 0; int psx_delay_BFC092C4 = 0; int psx_delay_BFC092CC = 0; int psx_delay_BFC092D8 = 0; int psx_taken_BFC092D8 = 0; int psx_delay_BFC092F0 = 0; int psx_taken_BFC092F0 = 0; int psx_delay_BFC092FC = 0; int psx_taken_BFC092FC = 0; int psx_delay_BFC09308 = 0; int psx_taken_BFC09308 = 0; int psx_delay_BFC09320 = 0; int psx_taken_BFC09320 = 0; int psx_delay_BFC0932C = 0; int psx_delay_BFC09340 = 0; int psx_taken_BFC09340 = 0; int psx_delay_BFC09368 = 0; int psx_taken_BFC09368 = 0; int psx_delay_BFC09394 = 0; int psx_taken_BFC09394 = 0; int psx_delay_BFC093A8 = 0; int psx_taken_BFC093A8 = 0; int psx_delay_BFC093B0 = 0; int psx_delay_BFC093B8 = 0; int psx_taken_BFC093B8 = 0; int psx_delay_BFC093C4 = 0; int psx_taken_BFC093C4 = 0; int psx_delay_BFC093CC = 0; int psx_taken_BFC093CC = 0; int psx_delay_BFC093D4 = 0; int psx_taken_BFC093D4 = 0; int psx_delay_BFC093DC = 0; int psx_taken_BFC093DC = 0; int psx_delay_BFC093F8 = 0; int psx_taken_BFC093F8 = 0; int psx_delay_BFC0940C = 0; int psx_taken_BFC0940C = 0; int psx_delay_BFC09414 = 0; int psx_delay_BFC0941C = 0; int psx_taken_BFC0941C = 0; int psx_delay_BFC09428 = 0; int psx_taken_BFC09428 = 0; int psx_delay_BFC0945C = 0; int psx_taken_BFC0945C = 0; int psx_delay_BFC09468 = 0; int psx_delay_BFC09478 = 0; int psx_taken_BFC09478 = 0; int psx_delay_BFC09480 = 0; int psx_taken_BFC09480 = 0; int psx_delay_BFC0948C = 0; int psx_taken_BFC0948C = 0; int psx_delay_BFC0949C = 0; int psx_delay_BFC094A4 = 0; int psx_taken_BFC094A4 = 0; int psx_delay_BFC094C0 = 0; int psx_taken_BFC094C0 = 0; int psx_delay_BFC094D8 = 0; int psx_taken_BFC094D8 = 0; int psx_delay_BFC094EC = 0; int psx_taken_BFC094EC = 0; int psx_delay_BFC09500 = 0; int psx_taken_BFC09500 = 0; int psx_delay_BFC09508 = 0; int psx_delay_BFC09510 = 0; int psx_taken_BFC09510 = 0; int psx_delay_BFC09518 = 0; int psx_delay_BFC09520 = 0; int psx_taken_BFC09520 = 0; int psx_delay_BFC09528 = 0; int psx_taken_BFC09528 = 0; int psx_delay_BFC09530 = 0; int psx_taken_BFC09530 = 0; int psx_delay_BFC09558 = 0; int psx_delay_BFC09574 = 0; int psx_delay_BFC0957C = 0; int psx_taken_BFC0957C = 0; int psx_delay_BFC09584 = 0; int psx_taken_BFC09584 = 0; int psx_delay_BFC0958C = 0; int psx_delay_BFC095B8 = 0; int psx_delay_BFC095C0 = 0; int psx_taken_BFC095C0 = 0; int psx_delay_BFC095C8 = 0; int psx_taken_BFC095C8 = 0; int psx_delay_BFC095E0 = 0; int psx_taken_BFC095E0 = 0; int psx_delay_BFC095E8 = 0; int psx_delay_BFC095F0 = 0; int psx_taken_BFC095F0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC09224u: goto label_BFC09224; case 0xBFC0923Cu: goto label_BFC0923C; case 0xBFC09240u: goto label_BFC09240; case 0xBFC09250u: goto label_BFC09250; case 0xBFC09260u: goto label_BFC09260; case 0xBFC09268u: goto label_BFC09268; case 0xBFC09270u: goto label_BFC09270; case 0xBFC09274u: goto label_BFC09274; case 0xBFC09290u: goto label_BFC09290; case 0xBFC0929Cu: goto label_BFC0929C; case 0xBFC092A4u: goto label_BFC092A4; case 0xBFC092ACu: goto label_BFC092AC; case 0xBFC092B4u: goto label_BFC092B4; case 0xBFC092BCu: goto label_BFC092BC; case 0xBFC092C0u: goto label_BFC092C0; case 0xBFC092CCu: goto label_BFC092CC; case 0xBFC092D4u: goto label_BFC092D4; case 0xBFC092E0u: goto label_BFC092E0; case 0xBFC092F8u: goto label_BFC092F8; case 0xBFC09304u: goto label_BFC09304; case 0xBFC09310u: goto label_BFC09310; case 0xBFC09328u: goto label_BFC09328; case 0xBFC09334u: goto label_BFC09334; case 0xBFC09338u: goto label_BFC09338; case 0xBFC09348u: goto label_BFC09348; case 0xBFC0935Cu: goto label_BFC0935C; case 0xBFC09368u: goto label_BFC09368; case 0xBFC09370u: goto label_BFC09370; case 0xBFC09374u: goto label_BFC09374; case 0xBFC0939Cu: goto label_BFC0939C; case 0xBFC093B0u: goto label_BFC093B0; case 0xBFC093B8u: goto label_BFC093B8; case 0xBFC093C0u: goto label_BFC093C0; case 0xBFC093CCu: goto label_BFC093CC; case 0xBFC093D4u: goto label_BFC093D4; case 0xBFC093DCu: goto label_BFC093DC; case 0xBFC093E4u: goto label_BFC093E4; case 0xBFC09400u: goto label_BFC09400; case 0xBFC09408u: goto label_BFC09408; case 0xBFC09414u: goto label_BFC09414; case 0xBFC0941Cu: goto label_BFC0941C; case 0xBFC09424u: goto label_BFC09424; case 0xBFC09430u: goto label_BFC09430; case 0xBFC09454u: goto label_BFC09454; case 0xBFC09464u: goto label_BFC09464; case 0xBFC09470u: goto label_BFC09470; case 0xBFC09474u: goto label_BFC09474; case 0xBFC09480u: goto label_BFC09480; case 0xBFC09488u: goto label_BFC09488; case 0xBFC09494u: goto label_BFC09494; case 0xBFC0949Cu: goto label_BFC0949C; case 0xBFC094A4u: goto label_BFC094A4; case 0xBFC094ACu: goto label_BFC094AC; case 0xBFC094C8u: goto label_BFC094C8; case 0xBFC094CCu: goto label_BFC094CC; case 0xBFC094E0u: goto label_BFC094E0; case 0xBFC094E8u: goto label_BFC094E8; case 0xBFC094F4u: goto label_BFC094F4; case 0xBFC09508u: goto label_BFC09508; case 0xBFC09510u: goto label_BFC09510; case 0xBFC09518u: goto label_BFC09518; case 0xBFC09520u: goto label_BFC09520; case 0xBFC09528u: goto label_BFC09528; case 0xBFC09530u: goto label_BFC09530; case 0xBFC09538u: goto label_BFC09538; case 0xBFC09560u: goto label_BFC09560; case 0xBFC0956Cu: goto label_BFC0956C; case 0xBFC0957Cu: goto label_BFC0957C; case 0xBFC09584u: goto label_BFC09584; case 0xBFC0958Cu: goto label_BFC0958C; case 0xBFC09594u: goto label_BFC09594; case 0xBFC095C0u: goto label_BFC095C0; case 0xBFC095C8u: goto label_BFC095C8; case 0xBFC095D0u: goto label_BFC095D0; case 0xBFC095D8u: goto label_BFC095D8; case 0xBFC095E8u: goto label_BFC095E8; case 0xBFC095F0u: goto label_BFC095F0; default: break; } } label_BFC091EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC091ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC091ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC091EC: 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(0xBFC091ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC091F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC091F0: 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, 0xBFC091F0u); return; } g_debug_last_store_pc = 0xBFC091F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0064u, _pgxa, cpu->gpr[31]); } #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, 0x20800000u); #endif /* 0xBFC091F4: AFB70060 sw $s7, 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, 0xBFC091F4u); return; } g_debug_last_store_pc = 0xBFC091F4u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70060u, _pgxa, cpu->gpr[23]); } #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, 0x20400000u); #endif /* 0xBFC091F8: AFB6005C sw $s6, 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, 0xBFC091F8u); return; } g_debug_last_store_pc = 0xBFC091F8u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB6005Cu, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC091FC: AFB50058 sw $s5, 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, 0xBFC091FCu); return; } g_debug_last_store_pc = 0xBFC091FCu; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50058u, _pgxa, cpu->gpr[21]); } #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, 0x20100000u); #endif /* 0xBFC09200: 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, 0xBFC09200u); return; } g_debug_last_store_pc = 0xBFC09200u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40054u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0xBFC09200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC09204: 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, 0xBFC09204u); return; } g_debug_last_store_pc = 0xBFC09204u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30050u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0xBFC09204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC09208: AFB2004C sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0xBFC09208u); return; } g_debug_last_store_pc = 0xBFC09208u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2004Cu, _pgxa, cpu->gpr[18]); } #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, 0x20020000u); #endif /* 0xBFC0920C: AFB10048 sw $s1, 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, 0xBFC0920Cu); return; } g_debug_last_store_pc = 0xBFC0920Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10048u, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC09210: AFB00044 sw $s0, 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, 0xBFC09210u); return; } g_debug_last_store_pc = 0xBFC09210u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00044u, _pgxa, cpu->gpr[16]); } #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, 0x20000020u); #endif /* 0xBFC09214: 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, 0xBFC09214u); return; } g_debug_last_store_pc = 0xBFC09214u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5006Cu, _pgxa, cpu->gpr[5]); } #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, 0x20000040u); #endif /* 0xBFC09218: 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, 0xBFC09218u); return; } g_debug_last_store_pc = 0xBFC09218u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60070u, _pgxa, cpu->gpr[6]); } #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, 0x11u); #endif /* 0xBFC0921C: 108000DD beq $a0, $zero, 0xBFC09594 */ uint32_t psx_brA_BFC0921C = cpu->gpr[4]; uint32_t psx_brB_BFC0921C = cpu->gpr[0]; psx_taken_BFC0921C = (psx_brA_BFC0921C == psx_brB_BFC0921C); psx_delay_BFC0921C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC09220: 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, 0xBFC09220u); return; } g_debug_last_store_pc = 0xBFC09220u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70074u, _pgxa, cpu->gpr[7]); } #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, 0xBFC09594u); goto label_BFC09594; } #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, 0x20000004u); #endif /* 0xBFC09224: 27A2006C addiu $v0, $sp, 108 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[29] + (108)); PGXP_ALU(0x27A2006Cu, cpu->gpr[2], _pgx1, 0x0000006Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC09224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC09228: 3C12BFC2 lui $s2, 0xBFC2 */ cpu->gpr[18] = 0xBFC20000u; PGXP_ALU(0x3C12BFC2u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC09228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0922Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0922C: 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, 0xBFC0922Cu); return; } g_debug_last_store_pc = 0xBFC0922Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20038u, _pgxa, cpu->gpr[2]); } #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, 0x10001u); #endif /* 0xBFC09230: 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(0xBFC09230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC09234: 24130025 addiu $s3, $zero, 37 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[0] + (37)); PGXP_ALU(0x24130025u, cpu->gpr[19], _pgx1, 0x00000025u); } #ifdef PSX_COSIM cosim_instr(0xBFC09234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC09238: 2652E4C0 addiu $s2, $s2, -6976 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (-6976)); PGXP_ALU(0x2652E4C0u, cpu->gpr[18], _pgx1, 0xFFFFE4C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC09238u); #endif label_BFC0923C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0923Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0923Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0923Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0923C: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0923Cu); #endif 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 /* 0xBFC09240: 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(0xBFC09240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09244: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC09248: 144000DD bne $v0, $zero, 0xBFC095C0 */ uint32_t psx_brA_BFC09248 = cpu->gpr[2]; uint32_t psx_brB_BFC09248 = cpu->gpr[0]; psx_taken_BFC09248 = (psx_brA_BFC09248 != psx_brB_BFC09248); psx_delay_BFC09248 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0924Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0924C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0924Cu); #endif if (psx_delay_BFC09248) { psx_delay_BFC09248 = 0; if (psx_taken_BFC09248) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095C0u); goto label_BFC095C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09250u); } 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 /* 0xBFC09250: 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(0xBFC09250u); #endif #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC09258: 104000CE beq $v0, $zero, 0xBFC09594 */ uint32_t psx_brA_BFC09258 = cpu->gpr[2]; uint32_t psx_brB_BFC09258 = cpu->gpr[0]; psx_taken_BFC09258 = (psx_brA_BFC09258 == psx_brB_BFC09258); psx_delay_BFC09258 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0925Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0925C: 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(0xBFC0925Cu); #endif if (psx_delay_BFC09258) { psx_delay_BFC09258 = 0; if (psx_taken_BFC09258) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09594u); goto label_BFC09594; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09260u); } label_BFC09260: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09260u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09260: 100000DD beq $zero, $zero, 0xBFC095D8 */ uint32_t psx_brA_BFC09260 = cpu->gpr[0]; uint32_t psx_brB_BFC09260 = cpu->gpr[0]; psx_taken_BFC09260 = (psx_brA_BFC09260 == psx_brB_BFC09260); psx_delay_BFC09260 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC09264: 00851021 addu $v0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00851021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09264u); #endif if (psx_delay_BFC09260) { psx_delay_BFC09260 = 0; if (psx_taken_BFC09260) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095D8u); goto label_BFC095D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09268u); } label_BFC09268: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09268u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09268: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC09270u; /* jal link before delay slot */ psx_delay_BFC09268 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0926Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0926C: 00A42823 subu $a1, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[4]; PGXP_ALU(0x00A42823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0926Cu); #endif if (psx_delay_BFC09268) { psx_delay_BFC09268 = 0; cpu->gpr[31] = 0xBFC09270u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } label_BFC09270: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09270u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC09270: 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(0xBFC09270u); #endif 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 /* 0xBFC09274: 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(0xBFC09274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09278: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0927Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0927C: 2443FFD0 addiu $v1, $v0, -48 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (-48)); PGXP_ALU(0x2443FFD0u, cpu->gpr[3], _pgx1, 0xFFFFFFD0u); } #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, 0x8u); #endif /* 0xBFC09280: 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(0xBFC09280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC09284: 2C64000A sltiu $a0, $v1, 10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C64000Au, cpu->gpr[4], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC09284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC09288: 14800015 bne $a0, $zero, 0xBFC092E0 */ uint32_t psx_brA_BFC09288 = cpu->gpr[4]; uint32_t psx_brB_BFC09288 = cpu->gpr[0]; psx_taken_BFC09288 = (psx_brA_BFC09288 != psx_brB_BFC09288); psx_delay_BFC09288 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0928Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0928C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0928Cu); #endif if (psx_delay_BFC09288) { psx_delay_BFC09288 = 0; if (psx_taken_BFC09288) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092E0u); goto label_BFC092E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09290u); } label_BFC09290: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09290u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC09290: 24030069 addiu $v1, $zero, 105 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (105)); PGXP_ALU(0x24030069u, cpu->gpr[3], _pgx1, 0x00000069u); } #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, 0xCu); #endif /* 0xBFC09294: 1043001E beq $v0, $v1, 0xBFC09310 */ uint32_t psx_brA_BFC09294 = cpu->gpr[2]; uint32_t psx_brB_BFC09294 = cpu->gpr[3]; psx_taken_BFC09294 = (psx_brA_BFC09294 == psx_brB_BFC09294); psx_delay_BFC09294 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC09298: 2843006A slti $v1, $v0, 106 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (106) ? 1 : 0); PGXP_ALU(0x2843006Au, cpu->gpr[3], _pgx1, 0x006Au); } #ifdef PSX_COSIM cosim_instr(0xBFC09298u); #endif if (psx_delay_BFC09294) { psx_delay_BFC09294 = 0; if (psx_taken_BFC09294) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09310u); goto label_BFC09310; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0929Cu); } label_BFC0929C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0929Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0929Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0929Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0929C: 10600048 beq $v1, $zero, 0xBFC093C0 */ uint32_t psx_brA_BFC0929C = cpu->gpr[3]; uint32_t psx_brB_BFC0929C = cpu->gpr[0]; psx_taken_BFC0929C = (psx_brA_BFC0929C == psx_brB_BFC0929C); psx_delay_BFC0929C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC092A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC092A0u); #endif if (psx_delay_BFC0929C) { psx_delay_BFC0929C = 0; if (psx_taken_BFC0929C) { #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, 0xBFC092A4u); } label_BFC092A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC092A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC092A4: 1053007B beq $v0, $s3, 0xBFC09494 */ uint32_t psx_brA_BFC092A4 = cpu->gpr[2]; uint32_t psx_brB_BFC092A4 = cpu->gpr[19]; psx_taken_BFC092A4 = (psx_brA_BFC092A4 == psx_brB_BFC092A4); psx_delay_BFC092A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC092A8: 28430026 slti $v1, $v0, 38 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (38) ? 1 : 0); PGXP_ALU(0x28430026u, cpu->gpr[3], _pgx1, 0x0026u); } #ifdef PSX_COSIM cosim_instr(0xBFC092A8u); #endif if (psx_delay_BFC092A4) { psx_delay_BFC092A4 = 0; if (psx_taken_BFC092A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09494u); goto label_BFC09494; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092ACu); } label_BFC092AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC092ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC092AC: 10600012 beq $v1, $zero, 0xBFC092F8 */ uint32_t psx_brA_BFC092AC = cpu->gpr[3]; uint32_t psx_brB_BFC092AC = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC092B0: 00000000 nop */ /* nop */ #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, 0xBFC092F8u); goto label_BFC092F8; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC092B4: 104000B5 beq $v0, $zero, 0xBFC0958C */ uint32_t psx_brA_BFC092B4 = cpu->gpr[2]; uint32_t psx_brB_BFC092B4 = cpu->gpr[0]; psx_taken_BFC092B4 = (psx_brA_BFC092B4 == psx_brB_BFC092B4); psx_delay_BFC092B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC092B8: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC092B8u); #endif if (psx_delay_BFC092B4) { psx_delay_BFC092B4 = 0; if (psx_taken_BFC092B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0958Cu); goto label_BFC0958C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092BCu); } label_BFC092BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC092BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC092BC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC092BCu); #endif label_BFC092C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC092C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC092C0: 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(0xBFC092C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC092C4: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC092CCu; /* jal link before delay slot */ psx_delay_BFC092C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC092C8: 24849F90 addiu $a0, $a0, -24688 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24688)); PGXP_ALU(0x24849F90u, cpu->gpr[4], _pgx1, 0xFFFF9F90u); } #ifdef PSX_COSIM cosim_instr(0xBFC092C8u); #endif if (psx_delay_BFC092C4) { psx_delay_BFC092C4 = 0; cpu->gpr[31] = 0xBFC092CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } label_BFC092CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC092CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC092CC: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC092D4u; /* jal link before delay slot */ psx_delay_BFC092CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20011u); #endif /* 0xBFC092D0: 02202025 or $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(0x02202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC092D0u); #endif if (psx_delay_BFC092CC) { psx_delay_BFC092CC = 0; cpu->gpr[31] = 0xBFC092D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC092D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC092D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC092D4: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC092D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC092D8: 10000070 beq $zero, $zero, 0xBFC0949C */ uint32_t psx_brA_BFC092D8 = cpu->gpr[0]; uint32_t psx_brB_BFC092D8 = cpu->gpr[0]; psx_taken_BFC092D8 = (psx_brA_BFC092D8 == psx_brB_BFC092D8); psx_delay_BFC092D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC092DC: 24849FA8 addiu $a0, $a0, -24664 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24664)); PGXP_ALU(0x24849FA8u, cpu->gpr[4], _pgx1, 0xFFFF9FA8u); } #ifdef PSX_COSIM cosim_instr(0xBFC092DCu); #endif if (psx_delay_BFC092D8) { psx_delay_BFC092D8 = 0; if (psx_taken_BFC092D8) { #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, 0xBFC092E0u); } label_BFC092E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC092E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC092E0: 00141080 sll $v0, $s4, 2 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[20] << 2u; PGXP_ALU(0x00141080u, cpu->gpr[2], _pgx1, 2u); } #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, 0x100004u); #endif /* 0xBFC092E4: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC092E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC092E8: 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(0xBFC092E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000Cu); #endif /* 0xBFC092EC: 0062A021 addu $s4, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[20] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x0062A021u, cpu->gpr[20], _pgx1, _pgx2); } #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, 0x1u); #endif /* 0xBFC092F0: 1000FFE0 beq $zero, $zero, 0xBFC09274 */ uint32_t psx_brA_BFC092F0 = cpu->gpr[0]; uint32_t psx_brB_BFC092F0 = cpu->gpr[0]; psx_taken_BFC092F0 = (psx_brA_BFC092F0 == psx_brB_BFC092F0); psx_delay_BFC092F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC092F4: 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(0xBFC092F4u); #endif if (psx_delay_BFC092F0) { psx_delay_BFC092F0 = 0; if (psx_taken_BFC092F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09274u); goto label_BFC09274; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092F8u); } label_BFC092F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC092F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC092F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC092F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC092F8: 24030063 addiu $v1, $zero, 99 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (99)); PGXP_ALU(0x24030063u, cpu->gpr[3], _pgx1, 0x00000063u); } #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, 0xCu); #endif /* 0xBFC092FC: 1043006B beq $v0, $v1, 0xBFC094AC */ uint32_t psx_brA_BFC092FC = cpu->gpr[2]; uint32_t psx_brB_BFC092FC = cpu->gpr[3]; psx_taken_BFC092FC = (psx_brA_BFC092FC == psx_brB_BFC092FC); psx_delay_BFC092FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC09300: 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(0xBFC09300u); #endif if (psx_delay_BFC092FC) { psx_delay_BFC092FC = 0; if (psx_taken_BFC092FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094ACu); goto label_BFC094AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09304u); } label_BFC09304: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09304u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC09304: 24030064 addiu $v1, $zero, 100 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (100)); PGXP_ALU(0x24030064u, cpu->gpr[3], _pgx1, 0x00000064u); } #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, 0xCu); #endif /* 0xBFC09308: 1443FFED bne $v0, $v1, 0xBFC092C0 */ uint32_t psx_brA_BFC09308 = cpu->gpr[2]; uint32_t psx_brB_BFC09308 = cpu->gpr[3]; psx_taken_BFC09308 = (psx_brA_BFC09308 != psx_brB_BFC09308); psx_delay_BFC09308 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0930Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0930C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0930Cu); #endif if (psx_delay_BFC09308) { psx_delay_BFC09308 = 0; if (psx_taken_BFC09308) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092C0u); goto label_BFC092C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09310u); } label_BFC09310: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09310u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09310u); #endif /* 0xBFC09310: 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, 0xBFC09310u); 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(0xBFC09310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09314: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09318u); #endif /* 0xBFC09318: 8C500000 lw $s0, 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, 0xBFC09318u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500000u, _pgxa, cpu->gpr[16]); } #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, 0xCu); #endif /* 0xBFC0931C: 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(0xBFC0931Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC09320: 06010005 bgez $s0, 0xBFC09338 */ uint32_t psx_brA_BFC09320 = cpu->gpr[16]; psx_taken_BFC09320 = ((int32_t)psx_brA_BFC09320 >= 0); psx_delay_BFC09320 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC09324: 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, 0xBFC09324u); return; } g_debug_last_store_pc = 0xBFC09324u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC09324u); #endif if (psx_delay_BFC09320) { psx_delay_BFC09320 = 0; if (psx_taken_BFC09320) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09338u); goto label_BFC09338; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09328u); } label_BFC09328: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09328u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09328: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC09328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0932Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0932C: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC09334u; /* jal link before delay slot */ psx_delay_BFC0932C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09330: 24849F88 addiu $a0, $a0, -24696 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24696)); PGXP_ALU(0x24849F88u, cpu->gpr[4], _pgx1, 0xFFFF9F88u); } #ifdef PSX_COSIM cosim_instr(0xBFC09330u); #endif if (psx_delay_BFC0932C) { psx_delay_BFC0932C = 0; cpu->gpr[31] = 0xBFC09334u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } 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, 0x10001u); #endif /* 0xBFC09334: 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(0xBFC09334u); #endif label_BFC09338: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09338u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09338u); #endif /* 0xBFC09338: 82230000 lb $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x82230000u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC0933C: 24020075 addiu $v0, $zero, 117 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (117)); PGXP_ALU(0x24020075u, cpu->gpr[2], _pgx1, 0x00000075u); } #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, 0xCu); #endif /* 0xBFC09340: 14620006 bne $v1, $v0, 0xBFC0935C */ uint32_t psx_brA_BFC09340 = cpu->gpr[3]; uint32_t psx_brB_BFC09340 = cpu->gpr[2]; psx_taken_BFC09340 = (psx_brA_BFC09340 != psx_brB_BFC09340); psx_delay_BFC09340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09344: 00000000 nop */ /* nop */ #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, 0xBFC0935Cu); goto label_BFC0935C; } #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 /* 0xBFC09348: 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, 0xBFC09348u); 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(0xBFC09348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0934Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0934C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0934Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC09350: 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(0xBFC09350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09354u); #endif /* 0xBFC09354: 8C500000 lw $s0, 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, 0xBFC09354u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500000u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC09354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC09358: 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, 0xBFC09358u); return; } g_debug_last_store_pc = 0xBFC09358u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC09358u); #endif 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, 0x20000001u); #endif /* 0xBFC0935C: A3A00030 sb $zero, 48($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 48; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC0935Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[29] + (48)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA3A00030u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0xBFC0935Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC09360: 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(0xBFC09360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC09364: 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(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, 0x9u); #endif /* 0xBFC09368: 14600002 bne $v1, $zero, 0xBFC09374 */ uint32_t psx_brA_BFC09368 = cpu->gpr[3]; uint32_t psx_brB_BFC09368 = cpu->gpr[0]; psx_taken_BFC09368 = (psx_brA_BFC09368 != psx_brB_BFC09368); psx_delay_BFC09368 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0936Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0936C: 0203001B divu $s0, $v1 */ { uint32_t psx_n = cpu->gpr[16]; 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(0x0203001Bu, cpu->hi, cpu->lo, cpu->gpr[16], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0xBFC0936Cu); #endif if (psx_delay_BFC09368) { psx_delay_BFC09368 = 0; if (psx_taken_BFC09368) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09374u); goto label_BFC09374; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09370u); } label_BFC09370: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09370u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC09370: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0xBFC09370u); return; #ifdef PSX_COSIM cosim_instr(0xBFC09370u); #endif 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, 0x10u); #endif /* 0xBFC09374: 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(0xBFC09374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC09378: 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(0xBFC09378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0937Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0937C: 00521021 addu $v0, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[18]; PGXP_ALU(0x00521021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0937Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09380u); #endif /* 0xBFC09380: 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(0xBFC09380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09384: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC09388: A0820000 sb $v0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0xBFC09388u; 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(0xBFC09388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0938Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0938C: 2E02000A sltiu $v0, $s0, 10 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2E02000Au, cpu->gpr[2], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0xBFC0938Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC09390: 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(0xBFC09390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC09394: 1040FFF4 beq $v0, $zero, 0xBFC09368 */ uint32_t psx_brA_BFC09394 = cpu->gpr[2]; uint32_t psx_brB_BFC09394 = cpu->gpr[0]; psx_taken_BFC09394 = (psx_brA_BFC09394 == psx_brB_BFC09394); psx_delay_BFC09394 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC09398: 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(0xBFC09398u); #endif if (psx_delay_BFC09394) { psx_delay_BFC09394 = 0; if (psx_taken_BFC09394) { #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, 0xBFC0939Cu); } label_BFC0939C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0939Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0939Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0939Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC0939C: 00851021 addu $v0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00851021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0939Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093A0u); #endif /* 0xBFC093A0: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC093A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC093A4: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC093A8: 14400061 bne $v0, $zero, 0xBFC09530 */ uint32_t psx_brA_BFC093A8 = cpu->gpr[2]; uint32_t psx_brB_BFC093A8 = cpu->gpr[0]; psx_taken_BFC093A8 = (psx_brA_BFC093A8 != psx_brB_BFC093A8); psx_delay_BFC093A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC093AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC093ACu); #endif if (psx_delay_BFC093A8) { psx_delay_BFC093A8 = 0; if (psx_taken_BFC093A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09530u); goto label_BFC09530; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC093B0u); } label_BFC093B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC093B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC093B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC093B0: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC093B8u; /* jal link before delay slot */ psx_delay_BFC093B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC093B4: 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(0xBFC093B4u); #endif if (psx_delay_BFC093B0) { psx_delay_BFC093B0 = 0; cpu->gpr[31] = 0xBFC093B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } label_BFC093B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC093B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC093B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC093B8: 1000FFA0 beq $zero, $zero, 0xBFC0923C */ uint32_t psx_brA_BFC093B8 = cpu->gpr[0]; uint32_t psx_brB_BFC093B8 = cpu->gpr[0]; psx_taken_BFC093B8 = (psx_brA_BFC093B8 == psx_brB_BFC093B8); psx_delay_BFC093B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC093BC: 26240001 addiu $a0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); PGXP_ALU(0x26240001u, cpu->gpr[4], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC093BCu); #endif if (psx_delay_BFC093B8) { psx_delay_BFC093B8 = 0; if (psx_taken_BFC093B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0923Cu); goto label_BFC0923C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC093C0u); } 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, 0x9u); #endif /* 0xBFC093C0: 24030075 addiu $v1, $zero, 117 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (117)); PGXP_ALU(0x24030075u, cpu->gpr[3], _pgx1, 0x00000075u); } #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, 0xCu); #endif /* 0xBFC093C4: 1043FFDC beq $v0, $v1, 0xBFC09338 */ uint32_t psx_brA_BFC093C4 = cpu->gpr[2]; uint32_t psx_brB_BFC093C4 = cpu->gpr[3]; psx_taken_BFC093C4 = (psx_brA_BFC093C4 == psx_brB_BFC093C4); psx_delay_BFC093C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC093C8: 28430076 slti $v1, $v0, 118 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (118) ? 1 : 0); PGXP_ALU(0x28430076u, cpu->gpr[3], _pgx1, 0x0076u); } #ifdef PSX_COSIM cosim_instr(0xBFC093C8u); #endif if (psx_delay_BFC093C4) { psx_delay_BFC093C4 = 0; if (psx_taken_BFC093C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09338u); goto label_BFC09338; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC093CCu); } 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, 0x9u); #endif /* 0xBFC093CC: 10600015 beq $v1, $zero, 0xBFC09424 */ uint32_t psx_brA_BFC093CC = cpu->gpr[3]; 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, 0x9u); #endif /* 0xBFC093D0: 24030070 addiu $v1, $zero, 112 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (112)); PGXP_ALU(0x24030070u, cpu->gpr[3], _pgx1, 0x00000070u); } #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, 0xCu); #endif /* 0xBFC093D4: 10430058 beq $v0, $v1, 0xBFC09538 */ uint32_t psx_brA_BFC093D4 = cpu->gpr[2]; uint32_t psx_brB_BFC093D4 = cpu->gpr[3]; psx_taken_BFC093D4 = (psx_brA_BFC093D4 == psx_brB_BFC093D4); psx_delay_BFC093D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC093D8: 24030073 addiu $v1, $zero, 115 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (115)); PGXP_ALU(0x24030073u, cpu->gpr[3], _pgx1, 0x00000073u); } #ifdef PSX_COSIM cosim_instr(0xBFC093D8u); #endif if (psx_delay_BFC093D4) { psx_delay_BFC093D4 = 0; if (psx_taken_BFC093D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09538u); goto label_BFC09538; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC093DCu); } label_BFC093DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC093DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC093DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC093DC: 1443FFB8 bne $v0, $v1, 0xBFC092C0 */ uint32_t psx_brA_BFC093DC = cpu->gpr[2]; uint32_t psx_brB_BFC093DC = cpu->gpr[3]; psx_taken_BFC093DC = (psx_brA_BFC093DC != psx_brB_BFC093DC); psx_delay_BFC093DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC093E0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC093E0u); #endif if (psx_delay_BFC093DC) { psx_delay_BFC093DC = 0; if (psx_taken_BFC093DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092C0u); goto label_BFC092C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC093E4u); } label_BFC093E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC093E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC093E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093E4u); #endif /* 0xBFC093E4: 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, 0xBFC093E4u); 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(0xBFC093E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC093E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC093E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093ECu); #endif /* 0xBFC093EC: 8C550000 lw $s5, 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, 0xBFC093ECu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x4u); } PGXP_LOAD(0x8C550000u, _pgxa, cpu->gpr[21]); } #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, 0xCu); #endif /* 0xBFC093F0: 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(0xBFC093F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC093F4: 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, 0xBFC093F4u); return; } g_debug_last_store_pc = 0xBFC093F4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC093F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC093F8: 16A00034 bne $s5, $zero, 0xBFC094CC */ uint32_t psx_brA_BFC093F8 = cpu->gpr[21]; uint32_t psx_brB_BFC093F8 = cpu->gpr[0]; psx_taken_BFC093F8 = (psx_brA_BFC093F8 != psx_brB_BFC093F8); psx_delay_BFC093F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC093FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC093FC: 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(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, 0xBFC094CCu); goto label_BFC094CC; } #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, 0x400000u); #endif /* 0xBFC09400: 3C16BFC1 lui $s6, 0xBFC1 */ cpu->gpr[22] = 0xBFC10000u; PGXP_ALU(0x3C16BFC1u, cpu->gpr[22], 0u, 0u); #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, 0x400000u); #endif /* 0xBFC09404: 26D69F84 addiu $s6, $s6, -24700 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-24700)); PGXP_ALU(0x26D69F84u, cpu->gpr[22], _pgx1, 0xFFFF9F84u); } #ifdef PSX_COSIM cosim_instr(0xBFC09404u); #endif label_BFC09408: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09408u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300004u); #endif /* 0xBFC09408: 02B4102A slt $v0, $s5, $s4 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] < (int32_t)cpu->gpr[20] ? 1 : 0); PGXP_ALU(0x02B4102Au, cpu->gpr[2], _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, 0x5u); #endif /* 0xBFC0940C: 10400040 beq $v0, $zero, 0xBFC09510 */ uint32_t psx_brA_BFC0940C = cpu->gpr[2]; uint32_t psx_brB_BFC0940C = cpu->gpr[0]; psx_taken_BFC0940C = (psx_brA_BFC0940C == psx_brB_BFC0940C); psx_delay_BFC0940C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09410: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09410u); #endif if (psx_delay_BFC0940C) { psx_delay_BFC0940C = 0; if (psx_taken_BFC0940C) { #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, 0xBFC09414u); } label_BFC09414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09414u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09414: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC0941Cu; /* jal link before delay slot */ psx_delay_BFC09414 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC09418: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09418u); #endif if (psx_delay_BFC09414) { psx_delay_BFC09414 = 0; cpu->gpr[31] = 0xBFC0941Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC0941C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0941Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0941Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0941Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0941C: 1000FFFA beq $zero, $zero, 0xBFC09408 */ uint32_t psx_brA_BFC0941C = cpu->gpr[0]; uint32_t psx_brB_BFC0941C = cpu->gpr[0]; psx_taken_BFC0941C = (psx_brA_BFC0941C == psx_brB_BFC0941C); psx_delay_BFC0941C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC09420: 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(0xBFC09420u); #endif if (psx_delay_BFC0941C) { psx_delay_BFC0941C = 0; if (psx_taken_BFC0941C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09408u); goto label_BFC09408; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09424u); } 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, 0x9u); #endif /* 0xBFC09424: 24030078 addiu $v1, $zero, 120 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (120)); PGXP_ALU(0x24030078u, cpu->gpr[3], _pgx1, 0x00000078u); } #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, 0xCu); #endif /* 0xBFC09428: 1443FFA4 bne $v0, $v1, 0xBFC092BC */ uint32_t psx_brA_BFC09428 = cpu->gpr[2]; uint32_t psx_brB_BFC09428 = cpu->gpr[3]; psx_taken_BFC09428 = (psx_brA_BFC09428 != psx_brB_BFC09428); psx_delay_BFC09428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0942Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0942C: 3C15BFC2 lui $s5, 0xBFC2 */ cpu->gpr[21] = 0xBFC20000u; PGXP_ALU(0x3C15BFC2u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0942Cu); #endif if (psx_delay_BFC09428) { psx_delay_BFC09428 = 0; if (psx_taken_BFC09428) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC092BCu); goto label_BFC092BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09430u); } label_BFC09430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09430u); #endif /* 0xBFC09430: 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, 0xBFC09430u); 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(0xBFC09430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09434: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC09438: 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(0xBFC09438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0943Cu); #endif /* 0xBFC0943C: 8C500000 lw $s0, 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, 0xBFC0943Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500000u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0xBFC0943Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC09440: 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, 0xBFC09440u); return; } g_debug_last_store_pc = 0xBFC09440u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC09440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC09444: 2414001C addiu $s4, $zero, 28 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); PGXP_ALU(0x2414001Cu, cpu->gpr[20], _pgx1, 0x0000001Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC09444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC09448: 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(0xBFC09448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0944Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0944C: 26B5E4C0 addiu $s5, $s5, -6976 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-6976)); PGXP_ALU(0x26B5E4C0u, cpu->gpr[21], _pgx1, 0xFFFFE4C0u); } #ifdef PSX_COSIM cosim_instr(0xBFC0944Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC09450: 2416FFFC addiu $s6, $zero, -4 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); PGXP_ALU(0x2416FFFCu, cpu->gpr[22], _pgx1, 0xFFFFFFFCu); } #ifdef PSX_COSIM cosim_instr(0xBFC09450u); #endif 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, 0x110010u); #endif /* 0xBFC09454: 02902006 srlv $a0, $s0, $s4 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[4] = cpu->gpr[16] >> (cpu->gpr[20] & 0x1Fu); PGXP_ALU(0x02902006u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC09458: 00441825 or $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(0x00441825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0945Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0945C: 10600005 beq $v1, $zero, 0xBFC09474 */ uint32_t psx_brA_BFC0945C = cpu->gpr[3]; uint32_t psx_brB_BFC0945C = cpu->gpr[0]; psx_taken_BFC0945C = (psx_brA_BFC0945C == psx_brB_BFC0945C); psx_delay_BFC0945C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC09460: 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(0xBFC09460u); #endif if (psx_delay_BFC0945C) { psx_delay_BFC0945C = 0; if (psx_taken_BFC0945C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09474u); goto label_BFC09474; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09464u); } 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, 0x10u); #endif /* 0xBFC09464: 3084000F andi $a0, $a0, 0xF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu; PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); } #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, 0x80000000u); #endif /* 0xBFC09468: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC09470u; /* jal link before delay slot */ psx_delay_BFC09468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0946Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200010u); #endif /* 0xBFC0946C: 02A42021 addu $a0, $s5, $a0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[4]; PGXP_ALU(0x02A42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0946Cu); #endif if (psx_delay_BFC09468) { psx_delay_BFC09468 = 0; cpu->gpr[31] = 0xBFC09470u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } 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, 0x5u); #endif /* 0xBFC09470: 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(0xBFC09470u); #endif label_BFC09474: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09474u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC09474: 2694FFFC addiu $s4, $s4, -4 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-4)); PGXP_ALU(0x2694FFFCu, cpu->gpr[20], _pgx1, 0xFFFFFFFCu); } #ifdef PSX_COSIM cosim_instr(0xBFC09474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500000u); #endif /* 0xBFC09478: 1696FFF6 bne $s4, $s6, 0xBFC09454 */ uint32_t psx_brA_BFC09478 = cpu->gpr[20]; uint32_t psx_brB_BFC09478 = cpu->gpr[22]; psx_taken_BFC09478 = (psx_brA_BFC09478 != psx_brB_BFC09478); psx_delay_BFC09478 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0947Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0947C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC0947Cu); #endif if (psx_delay_BFC09478) { psx_delay_BFC09478 = 0; if (psx_taken_BFC09478) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09454u); goto label_BFC09454; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09480u); } 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, 0x5u); #endif /* 0xBFC09480: 14400023 bne $v0, $zero, 0xBFC09510 */ uint32_t psx_brA_BFC09480 = cpu->gpr[2]; uint32_t psx_brB_BFC09480 = cpu->gpr[0]; psx_taken_BFC09480 = (psx_brA_BFC09480 != psx_brB_BFC09480); psx_delay_BFC09480 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09484: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09484u); #endif if (psx_delay_BFC09480) { psx_delay_BFC09480 = 0; if (psx_taken_BFC09480) { #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, 0xBFC09488u); } label_BFC09488: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09488u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09488: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC09488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0948Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0948C: 10000003 beq $zero, $zero, 0xBFC0949C */ uint32_t psx_brA_BFC0948C = cpu->gpr[0]; uint32_t psx_brB_BFC0948C = cpu->gpr[0]; psx_taken_BFC0948C = (psx_brA_BFC0948C == psx_brB_BFC0948C); psx_delay_BFC0948C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09490: 24849F1C addiu $a0, $a0, -24804 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24804)); PGXP_ALU(0x24849F1Cu, cpu->gpr[4], _pgx1, 0xFFFF9F1Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC09490u); #endif if (psx_delay_BFC0948C) { psx_delay_BFC0948C = 0; if (psx_taken_BFC0948C) { #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, 0xBFC09494u); } label_BFC09494: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09494u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09494: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC09494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09498: 24849F00 addiu $a0, $a0, -24832 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24832)); PGXP_ALU(0x24849F00u, cpu->gpr[4], _pgx1, 0xFFFF9F00u); } #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, 0x80000000u); #endif /* 0xBFC0949C: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC094A4u; /* jal link before delay slot */ psx_delay_BFC0949C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC094A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC094A0u); #endif if (psx_delay_BFC0949C) { psx_delay_BFC0949C = 0; cpu->gpr[31] = 0xBFC094A4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC094A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC094A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC094A4: 1000FF65 beq $zero, $zero, 0xBFC0923C */ uint32_t psx_brA_BFC094A4 = cpu->gpr[0]; uint32_t psx_brB_BFC094A4 = cpu->gpr[0]; psx_taken_BFC094A4 = (psx_brA_BFC094A4 == psx_brB_BFC094A4); psx_delay_BFC094A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC094A8: 26240001 addiu $a0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); PGXP_ALU(0x26240001u, cpu->gpr[4], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC094A8u); #endif if (psx_delay_BFC094A4) { psx_delay_BFC094A4 = 0; if (psx_taken_BFC094A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0923Cu); goto label_BFC0923C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094ACu); } label_BFC094AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC094ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094ACu); #endif /* 0xBFC094AC: 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, 0xBFC094ACu); 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(0xBFC094ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC094B0: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC094B4: 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(0xBFC094B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094B8u); #endif /* 0xBFC094B8: 8C420000 lw $v0, 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, 0xBFC094B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #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, 0x20000008u); #endif /* 0xBFC094BC: 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, 0xBFC094BCu); return; } g_debug_last_store_pc = 0xBFC094BCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC094BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC094C0: 1000FFF6 beq $zero, $zero, 0xBFC0949C */ uint32_t psx_brA_BFC094C0 = cpu->gpr[0]; uint32_t psx_brB_BFC094C0 = cpu->gpr[0]; psx_taken_BFC094C0 = (psx_brA_BFC094C0 == psx_brB_BFC094C0); psx_delay_BFC094C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC094C4: 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, 0xBFC094C4u); return; } g_debug_last_store_pc = 0xBFC094C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20034u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0xBFC094C4u); #endif if (psx_delay_BFC094C0) { psx_delay_BFC094C0 = 0; if (psx_taken_BFC094C0) { #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, 0xBFC094C8u); } label_BFC094C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC094C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC094C8: 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(0xBFC094C8u); #endif label_BFC094CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC094CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000Cu); #endif /* 0xBFC094CC: 02A21821 addu $v1, $s5, $v0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[21] + cpu->gpr[2]; PGXP_ALU(0x02A21821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC094CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094D0u); #endif /* 0xBFC094D0: 80630000 lb $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x80630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0xBFC094D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC094D4: 00000000 nop */ /* nop */ #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, 0x9u); #endif /* 0xBFC094D8: 1460FFFB bne $v1, $zero, 0xBFC094C8 */ uint32_t psx_brA_BFC094D8 = cpu->gpr[3]; uint32_t psx_brB_BFC094D8 = cpu->gpr[0]; psx_taken_BFC094D8 = (psx_brA_BFC094D8 != psx_brB_BFC094D8); psx_delay_BFC094D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC094DC: 3C16BFC1 lui $s6, 0xBFC1 */ cpu->gpr[22] = 0xBFC10000u; PGXP_ALU(0x3C16BFC1u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC094DCu); #endif if (psx_delay_BFC094D8) { psx_delay_BFC094D8 = 0; if (psx_taken_BFC094D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094C8u); goto label_BFC094C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094E0u); } label_BFC094E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC094E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800005u); #endif /* 0xBFC094E0: 0040B825 or $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(0x0040B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC094E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC094E4: 26D69F84 addiu $s6, $s6, -24700 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[22] = (uint32_t)((int32_t)cpu->gpr[22] + (-24700)); PGXP_ALU(0x26D69F84u, cpu->gpr[22], _pgx1, 0xFFFF9F84u); } #ifdef PSX_COSIM cosim_instr(0xBFC094E4u); #endif label_BFC094E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC094E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x900008u); #endif /* 0xBFC094E8: 02F4182A slt $v1, $s7, $s4 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[23] < (int32_t)cpu->gpr[20] ? 1 : 0); PGXP_ALU(0x02F4182Au, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC094E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC094EC: 1460000A bne $v1, $zero, 0xBFC09518 */ uint32_t psx_brA_BFC094EC = cpu->gpr[3]; uint32_t psx_brB_BFC094EC = cpu->gpr[0]; psx_taken_BFC094EC = (psx_brA_BFC094EC != psx_brB_BFC094EC); psx_delay_BFC094EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC094F0: 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(0xBFC094F0u); #endif if (psx_delay_BFC094EC) { psx_delay_BFC094EC = 0; if (psx_taken_BFC094EC) { #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, 0xBFC094F4u); } label_BFC094F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC094F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC094F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200024u); #endif /* 0xBFC094F4: 02A51021 addu $v0, $s5, $a1 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[5]; PGXP_ALU(0x02A51021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC094F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC094F8u); #endif /* 0xBFC094F8: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC094FC: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC09500: 14400009 bne $v0, $zero, 0xBFC09528 */ uint32_t psx_brA_BFC09500 = cpu->gpr[2]; uint32_t psx_brB_BFC09500 = cpu->gpr[0]; psx_taken_BFC09500 = (psx_brA_BFC09500 != psx_brB_BFC09500); psx_delay_BFC09500 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09504: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC09504u); #endif if (psx_delay_BFC09500) { psx_delay_BFC09500 = 0; if (psx_taken_BFC09500) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09528u); goto label_BFC09528; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09508u); } label_BFC09508: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09508u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09508: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC09510u; /* jal link before delay slot */ psx_delay_BFC09508 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0950Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200011u); #endif /* 0xBFC0950C: 02A02025 or $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(0x02A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0950Cu); #endif if (psx_delay_BFC09508) { psx_delay_BFC09508 = 0; cpu->gpr[31] = 0xBFC09510u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09510: 1000FF4A beq $zero, $zero, 0xBFC0923C */ uint32_t psx_brA_BFC09510 = cpu->gpr[0]; uint32_t psx_brB_BFC09510 = cpu->gpr[0]; psx_taken_BFC09510 = (psx_brA_BFC09510 == psx_brB_BFC09510); psx_delay_BFC09510 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC09514: 26240001 addiu $a0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); PGXP_ALU(0x26240001u, cpu->gpr[4], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC09514u); #endif if (psx_delay_BFC09510) { psx_delay_BFC09510 = 0; if (psx_taken_BFC09510) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0923Cu); goto label_BFC0923C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09518u); } 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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09518: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC09520u; /* jal link before delay slot */ psx_delay_BFC09518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0951Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC0951C: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC0951Cu); #endif if (psx_delay_BFC09518) { psx_delay_BFC09518 = 0; cpu->gpr[31] = 0xBFC09520u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC09520: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09520u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09520: 1000FFF1 beq $zero, $zero, 0xBFC094E8 */ uint32_t psx_brA_BFC09520 = cpu->gpr[0]; uint32_t psx_brB_BFC09520 = cpu->gpr[0]; psx_taken_BFC09520 = (psx_brA_BFC09520 == psx_brB_BFC09520); psx_delay_BFC09520 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC09524: 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(0xBFC09524u); #endif if (psx_delay_BFC09520) { psx_delay_BFC09520 = 0; if (psx_taken_BFC09520) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094E8u); goto label_BFC094E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09528u); } label_BFC09528: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09528u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09528: 1000FFF2 beq $zero, $zero, 0xBFC094F4 */ uint32_t psx_brA_BFC09528 = cpu->gpr[0]; uint32_t psx_brB_BFC09528 = cpu->gpr[0]; psx_taken_BFC09528 = (psx_brA_BFC09528 == psx_brB_BFC09528); psx_delay_BFC09528 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0952Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0952C: 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(0xBFC0952Cu); #endif if (psx_delay_BFC09528) { psx_delay_BFC09528 = 0; if (psx_taken_BFC09528) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC094F4u); goto label_BFC094F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09530u); } label_BFC09530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09530u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09530: 1000FF9A beq $zero, $zero, 0xBFC0939C */ uint32_t psx_brA_BFC09530 = cpu->gpr[0]; uint32_t psx_brB_BFC09530 = cpu->gpr[0]; psx_taken_BFC09530 = (psx_brA_BFC09530 == psx_brB_BFC09530); psx_delay_BFC09530 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC09534: 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(0xBFC09534u); #endif if (psx_delay_BFC09530) { psx_delay_BFC09530 = 0; if (psx_taken_BFC09530) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0939Cu); goto label_BFC0939C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09538u); } label_BFC09538: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09538u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09538u); #endif /* 0xBFC09538: 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, 0xBFC09538u); 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(0xBFC09538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0953Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0953C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0953Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC09540: 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(0xBFC09540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC09544: 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(0xBFC09544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09548: 24849F8C addiu $a0, $a0, -24692 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24692)); PGXP_ALU(0x24849F8Cu, cpu->gpr[4], _pgx1, 0xFFFF9F8Cu); } #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, 0x200000u); #endif /* 0xBFC0954C: 3C15BFC2 lui $s5, 0xBFC2 */ cpu->gpr[21] = 0xBFC20000u; PGXP_ALU(0x3C15BFC2u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0xBFC0954Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09550u); #endif /* 0xBFC09550: 8C560000 lw $s6, 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, 0xBFC09550u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x4u); } PGXP_LOAD(0x8C560000u, _pgxa, cpu->gpr[22]); } #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, 0x20000008u); #endif /* 0xBFC09554: 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, 0xBFC09554u); return; } g_debug_last_store_pc = 0xBFC09554u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30038u, _pgxa, cpu->gpr[3]); } #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, 0x80000000u); #endif /* 0xBFC09558: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC09560u; /* jal link before delay slot */ psx_delay_BFC09558 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0955Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC0955C: 2414001C addiu $s4, $zero, 28 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[0] + (28)); PGXP_ALU(0x2414001Cu, cpu->gpr[20], _pgx1, 0x0000001Cu); } #ifdef PSX_COSIM cosim_instr(0xBFC0955Cu); #endif if (psx_delay_BFC09558) { psx_delay_BFC09558 = 0; cpu->gpr[31] = 0xBFC09560u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } label_BFC09560: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09560u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC09560: 26B5E4C0 addiu $s5, $s5, -6976 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[21] + (-6976)); PGXP_ALU(0x26B5E4C0u, cpu->gpr[21], _pgx1, 0xFFFFE4C0u); } #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, 0x800001u); #endif /* 0xBFC09564: 2417FFFC addiu $s7, $zero, -4 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[23] = (uint32_t)((int32_t)cpu->gpr[0] + (-4)); PGXP_ALU(0x2417FFFCu, cpu->gpr[23], _pgx1, 0xFFFFFFFCu); } #ifdef PSX_COSIM cosim_instr(0xBFC09564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500010u); #endif /* 0xBFC09568: 02962006 srlv $a0, $s6, $s4 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[4] = cpu->gpr[22] >> (cpu->gpr[20] & 0x1Fu); PGXP_ALU(0x02962006u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09568u); #endif label_BFC0956C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0956Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0956Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0956Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0956C: 3084000F andi $a0, $a0, 0xF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu; PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); } #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, 0x200010u); #endif /* 0xBFC09570: 02A42021 addu $a0, $s5, $a0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[21] + cpu->gpr[4]; PGXP_ALU(0x02A42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC09574: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC0957Cu; /* jal link before delay slot */ psx_delay_BFC09574 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC09578: 2694FFFC addiu $s4, $s4, -4 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-4)); PGXP_ALU(0x2694FFFCu, cpu->gpr[20], _pgx1, 0xFFFFFFFCu); } #ifdef PSX_COSIM cosim_instr(0xBFC09578u); #endif if (psx_delay_BFC09574) { psx_delay_BFC09574 = 0; cpu->gpr[31] = 0xBFC0957Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC0957C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0957Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0957Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0957Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x900000u); #endif /* 0xBFC0957C: 1697FFFB bne $s4, $s7, 0xBFC0956C */ uint32_t psx_brA_BFC0957C = cpu->gpr[20]; uint32_t psx_brB_BFC0957C = cpu->gpr[23]; psx_taken_BFC0957C = (psx_brA_BFC0957C != psx_brB_BFC0957C); psx_delay_BFC0957C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500010u); #endif /* 0xBFC09580: 02962006 srlv $a0, $s6, $s4 */ { uint32_t _pgx1 = cpu->gpr[22]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[4] = cpu->gpr[22] >> (cpu->gpr[20] & 0x1Fu); PGXP_ALU(0x02962006u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC09580u); #endif if (psx_delay_BFC0957C) { psx_delay_BFC0957C = 0; if (psx_taken_BFC0957C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC0956Cu); goto label_BFC0956C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09584u); } label_BFC09584: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09584u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC09584: 1000FF2D beq $zero, $zero, 0xBFC0923C */ uint32_t psx_brA_BFC09584 = cpu->gpr[0]; uint32_t psx_brB_BFC09584 = cpu->gpr[0]; 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, 0x20010u); #endif /* 0xBFC09588: 26240001 addiu $a0, $s1, 1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (1)); PGXP_ALU(0x26240001u, cpu->gpr[4], _pgx1, 0x00000001u); } #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, 0xBFC0923Cu); goto label_BFC0923C; } #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, 0x80000000u); #endif /* 0xBFC0958C: 0FF02478 jal 0xBFC091E0 */ cpu->gpr[31] = 0xBFC09594u; /* jal link before delay slot */ psx_delay_BFC0958C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC09590: 24849F00 addiu $a0, $a0, -24832 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24832)); PGXP_ALU(0x24849F00u, cpu->gpr[4], _pgx1, 0xFFFF9F00u); } #ifdef PSX_COSIM cosim_instr(0xBFC09590u); #endif if (psx_delay_BFC0958C) { psx_delay_BFC0958C = 0; cpu->gpr[31] = 0xBFC09594u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC091E0u); cpu->pc = 0xBFC091E0u; return; } label_BFC09594: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC09594u); #endif #ifdef PSX_COSIM cosim_block(0x1FC09594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09594u); #endif /* 0xBFC09594: 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, 0xBFC09594u); 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(0xBFC09594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC09598u); #endif /* 0xBFC09598: 8FB70060 lw $s7, 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, 0xBFC09598u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB70060u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0xBFC09598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC0959Cu); #endif /* 0xBFC0959C: 8FB6005C lw $s6, 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, 0xBFC0959Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB6005Cu, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0xBFC0959Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095A0u); #endif /* 0xBFC095A0: 8FB50058 lw $s5, 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, 0xBFC095A0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB50058u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0xBFC095A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095A4u); #endif /* 0xBFC095A4: 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, 0xBFC095A4u); 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(0xBFC095A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095A8u); #endif /* 0xBFC095A8: 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, 0xBFC095A8u); 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(0xBFC095A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095ACu); #endif /* 0xBFC095AC: 8FB2004C lw $s2, 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, 0xBFC095ACu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB2004Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0xBFC095ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095B0u); #endif /* 0xBFC095B0: 8FB10048 lw $s1, 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, 0xBFC095B0u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10048u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0xBFC095B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095B4u); #endif /* 0xBFC095B4: 8FB00044 lw $s0, 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, 0xBFC095B4u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00044u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC095B8: 03E00008 jr $ra */ psx_delay_BFC095B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC095BC: 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(0xBFC095BCu); #endif if (psx_delay_BFC095B8) { psx_delay_BFC095B8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC095C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC095C0: 1053FF29 beq $v0, $s3, 0xBFC09268 */ uint32_t psx_brA_BFC095C0 = cpu->gpr[2]; uint32_t psx_brB_BFC095C0 = cpu->gpr[19]; psx_taken_BFC095C0 = (psx_brA_BFC095C0 == psx_brB_BFC095C0); psx_delay_BFC095C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020u); #endif /* 0xBFC095C4: 24B10001 addiu $s1, $a1, 1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[5] + (1)); PGXP_ALU(0x24B10001u, cpu->gpr[17], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0xBFC095C4u); #endif if (psx_delay_BFC095C0) { psx_delay_BFC095C0 = 0; if (psx_taken_BFC095C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09268u); goto label_BFC09268; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095C8u); } label_BFC095C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC095C8: 1000FF1D beq $zero, $zero, 0xBFC09240 */ uint32_t psx_brA_BFC095C8 = cpu->gpr[0]; uint32_t psx_brB_BFC095C8 = cpu->gpr[0]; psx_taken_BFC095C8 = (psx_brA_BFC095C8 == psx_brB_BFC095C8); psx_delay_BFC095C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC095CC: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC095CCu); #endif if (psx_delay_BFC095C8) { psx_delay_BFC095C8 = 0; if (psx_taken_BFC095C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09240u); goto label_BFC09240; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095D0u); } label_BFC095D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC095D0: 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(0xBFC095D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC095D4: 00851021 addu $v0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00851021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0xBFC095D4u); #endif label_BFC095D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095D8u); #endif /* 0xBFC095D8: 80420000 lb $v0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 2, 0x4u); PGXP_LOAD(0x80420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC095DC: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC095E0: 1440FFFB bne $v0, $zero, 0xBFC095D0 */ uint32_t psx_brA_BFC095E0 = cpu->gpr[2]; uint32_t psx_brB_BFC095E0 = cpu->gpr[0]; psx_taken_BFC095E0 = (psx_brA_BFC095E0 != psx_brB_BFC095E0); psx_delay_BFC095E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC095E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC095E4u); #endif if (psx_delay_BFC095E0) { psx_delay_BFC095E0 = 0; if (psx_taken_BFC095E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095D0u); goto label_BFC095D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095E8u); } label_BFC095E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC095E8: 0FF02466 jal 0xBFC09198 */ cpu->gpr[31] = 0xBFC095F0u; /* jal link before delay slot */ psx_delay_BFC095E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC095EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC095ECu); #endif if (psx_delay_BFC095E8) { psx_delay_BFC095E8 = 0; cpu->gpr[31] = 0xBFC095F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09198u); cpu->pc = 0xBFC09198u; return; } label_BFC095F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC095F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC095F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC095F0: 1000FFE8 beq $zero, $zero, 0xBFC09594 */ uint32_t psx_brA_BFC095F0 = cpu->gpr[0]; uint32_t psx_brB_BFC095F0 = cpu->gpr[0]; psx_taken_BFC095F0 = (psx_brA_BFC095F0 == psx_brB_BFC095F0); psx_delay_BFC095F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0xBFC095F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC095F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0xBFC095F4u); #endif if (psx_delay_BFC095F0) { psx_delay_BFC095F0 = 0; if (psx_taken_BFC095F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC09594u); goto label_BFC09594; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095F8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0xBFC095F8u); cpu->pc = 0xBFC095F8u; return; /* fallthrough */ } void OpenBIOS_func_1FC0A500(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0A500u); int psx_delay_BFC0A514 = 0; int psx_taken_BFC0A514 = 0; int psx_delay_BFC0A51C = 0; int psx_taken_BFC0A51C = 0; int psx_delay_BFC0A53C = 0; int psx_taken_BFC0A53C = 0; int psx_delay_BFC0A54C = 0; int psx_taken_BFC0A54C = 0; int psx_delay_BFC0A55C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0A510u: goto label_BFC0A510; case 0xBFC0A51Cu: goto label_BFC0A51C; case 0xBFC0A524u: goto label_BFC0A524; case 0xBFC0A544u: goto label_BFC0A544; case 0xBFC0A554u: goto label_BFC0A554; default: break; } } label_BFC0A500: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A500u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0A500: 3C0A1F80 lui $t2, 0x1F80 */ cpu->gpr[10] = 0x1F800000u; PGXP_ALU(0x3C0A1F80u, cpu->gpr[10], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030000u); #endif /* 0xBFC0A504: 8D4A101C lw $t2, 4124($t2) */ { uint32_t _pgxa = cpu->gpr[10] + 4124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (4124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030004u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } PGXP_LOAD(0x8D4A101Cu, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80030004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0A508: 3C080008 lui $t0, 0x8 */ cpu->gpr[8] = 0x00080000u; PGXP_ALU(0x3C080008u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A50C: 3C090001 lui $t1, 0x1 */ cpu->gpr[9] = 0x00010000u; PGXP_ALU(0x3C090001u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003000Cu); #endif label_BFC0A510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A510u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x502u); #endif /* 0xBFC0A510: 0148082A slt $at, $t2, $t0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0148082Au, cpu->gpr[1], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC0A514: 10200003 beq $at, $zero, 0xBFC0A524 */ uint32_t psx_brA_BFC0A514 = cpu->gpr[1]; uint32_t psx_brB_BFC0A514 = cpu->gpr[0]; psx_taken_BFC0A514 = (psx_brA_BFC0A514 == psx_brB_BFC0A514); psx_delay_BFC0A514 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A518: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030018u); #endif if (psx_delay_BFC0A514) { psx_delay_BFC0A514 = 0; if (psx_taken_BFC0A514) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030024u); goto label_BFC0A524; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003001Cu); } 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, 0x8003001Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A51C: 1000FFFC beq $zero, $zero, 0xBFC0A510 */ uint32_t psx_brA_BFC0A51C = cpu->gpr[0]; uint32_t psx_brB_BFC0A51C = cpu->gpr[0]; psx_taken_BFC0A51C = (psx_brA_BFC0A51C == psx_brB_BFC0A51C); psx_delay_BFC0A51C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC0A520: 01495020 add $t2, $t2, $t1 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[9]; { int32_t psx_a = (int32_t)cpu->gpr[10]; 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[10] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x01495020u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030020u); #endif if (psx_delay_BFC0A51C) { psx_delay_BFC0A51C = 0; if (psx_taken_BFC0A51C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030010u); goto label_BFC0A510; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030024u); } label_BFC0A524: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A524u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC0A524: 3C011F80 lui $at, 0x1F80 */ cpu->gpr[1] = 0x1F800000u; PGXP_ALU(0x3C011F80u, cpu->gpr[1], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x402u); #endif /* 0xBFC0A528: AC2A101C sw $t2, 4124($at) */ { uint32_t _pgxa = cpu->gpr[1] + 4124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (4124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030028u); return; } g_debug_last_store_pc = 0x80030028u; cpu->write_word(psx_addr, cpu->gpr[10]); } PGXP_STORE(0xAC2A101Cu, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80030028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0A52C: 3C088004 lui $t0, 0x8004 */ cpu->gpr[8] = 0x80040000u; PGXP_ALU(0x3C088004u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003002Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0A530: 25083D44 addiu $t0, $t0, 15684 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (15684)); PGXP_ALU(0x25083D44u, cpu->gpr[8], _pgx1, 0x00003D44u); } #ifdef PSX_COSIM cosim_instr(0x80030030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A534: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A538: 25295088 addiu $t1, $t1, 20616 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (20616)); PGXP_ALU(0x25295088u, cpu->gpr[9], _pgx1, 0x00005088u); } #ifdef PSX_COSIM cosim_instr(0x80030038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC0A53C: 11090005 beq $t0, $t1, 0xBFC0A554 */ uint32_t psx_brA_BFC0A53C = cpu->gpr[8]; uint32_t psx_brB_BFC0A53C = cpu->gpr[9]; psx_taken_BFC0A53C = (psx_brA_BFC0A53C == psx_brB_BFC0A53C); psx_delay_BFC0A53C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A540: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030040u); #endif if (psx_delay_BFC0A53C) { psx_delay_BFC0A53C = 0; if (psx_taken_BFC0A53C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030054u); goto label_BFC0A554; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030044u); } label_BFC0A544: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A544u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0A544: AD000000 sw $zero, 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, 0x80030044u); return; } g_debug_last_store_pc = 0x80030044u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0A548: 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(0x80030048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300u); #endif /* 0xBFC0A54C: 1509FFFD bne $t0, $t1, 0xBFC0A544 */ uint32_t psx_brA_BFC0A54C = cpu->gpr[8]; uint32_t psx_brB_BFC0A54C = cpu->gpr[9]; psx_taken_BFC0A54C = (psx_brA_BFC0A54C != psx_brB_BFC0A54C); psx_delay_BFC0A54C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A550: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030050u); #endif if (psx_delay_BFC0A54C) { psx_delay_BFC0A54C = 0; if (psx_taken_BFC0A54C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030044u); goto label_BFC0A544; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030054u); } label_BFC0A554: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A554u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0A554: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0A558: 24A53B5C addiu $a1, $a1, 15196 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (15196)); PGXP_ALU(0x24A53B5Cu, cpu->gpr[5], _pgx1, 0x00003B5Cu); } #ifdef PSX_COSIM cosim_instr(0x80030058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A55C: 0800C019 j 0xB0030064 */ psx_delay_BFC0A55C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A560: 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(0x80030060u); #endif if (psx_delay_BFC0A55C) { psx_delay_BFC0A55C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030064u); cpu->pc = 0x80030064u; return; } } void OpenBIOS_func_1FC0A564(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0A564u); int psx_delay_BFC0A594 = 0; int psx_delay_BFC0A5C0 = 0; int psx_taken_BFC0A5C0 = 0; int psx_delay_BFC0A5D0 = 0; int psx_delay_BFC0A5E0 = 0; int psx_taken_BFC0A5E0 = 0; int psx_delay_BFC0A624 = 0; int psx_delay_BFC0A62C = 0; int psx_delay_BFC0A634 = 0; int psx_delay_BFC0A63C = 0; int psx_delay_BFC0A678 = 0; int psx_taken_BFC0A678 = 0; int psx_delay_BFC0A688 = 0; int psx_taken_BFC0A688 = 0; int psx_delay_BFC0A6A0 = 0; int psx_taken_BFC0A6A0 = 0; int psx_delay_BFC0A6A8 = 0; int psx_delay_BFC0A6F0 = 0; int psx_taken_BFC0A6F0 = 0; int psx_delay_BFC0A704 = 0; int psx_taken_BFC0A704 = 0; int psx_delay_BFC0A718 = 0; int psx_taken_BFC0A718 = 0; int psx_delay_BFC0A720 = 0; int psx_taken_BFC0A720 = 0; int psx_delay_BFC0A770 = 0; int psx_taken_BFC0A770 = 0; int psx_delay_BFC0A784 = 0; int psx_taken_BFC0A784 = 0; int psx_delay_BFC0A79C = 0; int psx_taken_BFC0A79C = 0; int psx_delay_BFC0A7BC = 0; int psx_taken_BFC0A7BC = 0; int psx_delay_BFC0A7D0 = 0; int psx_taken_BFC0A7D0 = 0; int psx_delay_BFC0A7E4 = 0; int psx_delay_BFC0A7F0 = 0; int psx_delay_BFC0A7F8 = 0; int psx_taken_BFC0A7F8 = 0; int psx_delay_BFC0A808 = 0; int psx_taken_BFC0A808 = 0; int psx_delay_BFC0A850 = 0; int psx_taken_BFC0A850 = 0; int psx_delay_BFC0A878 = 0; int psx_delay_BFC0A884 = 0; int psx_delay_BFC0A8BC = 0; int psx_delay_BFC0A8C8 = 0; int psx_taken_BFC0A8C8 = 0; int psx_delay_BFC0A900 = 0; int psx_taken_BFC0A900 = 0; int psx_delay_BFC0A908 = 0; int psx_taken_BFC0A908 = 0; int psx_delay_BFC0A938 = 0; int psx_delay_BFC0A940 = 0; int psx_delay_BFC0A948 = 0; int psx_delay_BFC0A950 = 0; int psx_taken_BFC0A950 = 0; int psx_delay_BFC0A960 = 0; int psx_taken_BFC0A960 = 0; int psx_delay_BFC0A96C = 0; int psx_delay_BFC0A974 = 0; int psx_delay_BFC0A994 = 0; int psx_delay_BFC0A9A0 = 0; int psx_delay_BFC0A9B4 = 0; int psx_taken_BFC0A9B4 = 0; int psx_delay_BFC0A9E4 = 0; int psx_taken_BFC0A9E4 = 0; int psx_delay_BFC0AA2C = 0; int psx_delay_BFC0AA60 = 0; int psx_taken_BFC0AA60 = 0; int psx_delay_BFC0AA7C = 0; int psx_taken_BFC0AA7C = 0; int psx_delay_BFC0AAC4 = 0; int psx_taken_BFC0AAC4 = 0; int psx_delay_BFC0AACC = 0; int psx_delay_BFC0AAE4 = 0; int psx_taken_BFC0AAE4 = 0; int psx_delay_BFC0AB08 = 0; int psx_taken_BFC0AB08 = 0; int psx_delay_BFC0AB24 = 0; int psx_taken_BFC0AB24 = 0; int psx_delay_BFC0AB38 = 0; int psx_taken_BFC0AB38 = 0; int psx_delay_BFC0AB4C = 0; int psx_taken_BFC0AB4C = 0; int psx_delay_BFC0ABA4 = 0; int psx_delay_BFC0ABD0 = 0; int psx_taken_BFC0ABD0 = 0; int psx_delay_BFC0ABF4 = 0; int psx_delay_BFC0AC08 = 0; int psx_delay_BFC0AC1C = 0; int psx_delay_BFC0AC30 = 0; int psx_delay_BFC0AC38 = 0; int psx_taken_BFC0AC38 = 0; int psx_delay_BFC0AC40 = 0; int psx_taken_BFC0AC40 = 0; int psx_delay_BFC0AC48 = 0; int psx_delay_BFC0AC54 = 0; int psx_delay_BFC0AC5C = 0; int psx_taken_BFC0AC5C = 0; int psx_delay_BFC0AC68 = 0; int psx_taken_BFC0AC68 = 0; int psx_delay_BFC0AC70 = 0; int psx_taken_BFC0AC70 = 0; int psx_delay_BFC0AC78 = 0; int psx_taken_BFC0AC78 = 0; int psx_delay_BFC0AC80 = 0; int psx_delay_BFC0AC90 = 0; int psx_taken_BFC0AC90 = 0; int psx_delay_BFC0ACC8 = 0; int psx_delay_BFC0ACD0 = 0; int psx_taken_BFC0ACD0 = 0; int psx_delay_BFC0AD10 = 0; int psx_delay_BFC0AD18 = 0; int psx_taken_BFC0AD18 = 0; int psx_delay_BFC0AD6C = 0; int psx_taken_BFC0AD6C = 0; int psx_delay_BFC0AD84 = 0; int psx_delay_BFC0ADA0 = 0; int psx_delay_BFC0ADB4 = 0; int psx_delay_BFC0ADC8 = 0; int psx_delay_BFC0ADD8 = 0; int psx_delay_BFC0ADE8 = 0; int psx_delay_BFC0AE70 = 0; int psx_taken_BFC0AE70 = 0; int psx_delay_BFC0AE78 = 0; int psx_taken_BFC0AE78 = 0; int psx_delay_BFC0AE98 = 0; int psx_taken_BFC0AE98 = 0; int psx_delay_BFC0AEA0 = 0; int psx_taken_BFC0AEA0 = 0; int psx_delay_BFC0AEC0 = 0; int psx_taken_BFC0AEC0 = 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_BFC0AF04 = 0; int psx_taken_BFC0AF04 = 0; int psx_delay_BFC0AF18 = 0; int psx_taken_BFC0AF18 = 0; int psx_delay_BFC0AF20 = 0; int psx_taken_BFC0AF20 = 0; int psx_delay_BFC0AF28 = 0; int psx_taken_BFC0AF28 = 0; int psx_delay_BFC0AF34 = 0; int psx_taken_BFC0AF34 = 0; int psx_delay_BFC0AF40 = 0; int psx_taken_BFC0AF40 = 0; int psx_delay_BFC0AF4C = 0; int psx_taken_BFC0AF4C = 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_BFC0AF88 = 0; int psx_delay_BFC0AFD0 = 0; int psx_taken_BFC0AFD0 = 0; int psx_delay_BFC0AFF4 = 0; int psx_delay_BFC0B00C = 0; int psx_taken_BFC0B00C = 0; int psx_delay_BFC0B014 = 0; int psx_taken_BFC0B014 = 0; int psx_delay_BFC0B01C = 0; int psx_taken_BFC0B01C = 0; int psx_delay_BFC0B030 = 0; int psx_taken_BFC0B030 = 0; int psx_delay_BFC0B038 = 0; int psx_delay_BFC0B040 = 0; int psx_delay_BFC0B048 = 0; int psx_taken_BFC0B048 = 0; int psx_delay_BFC0B094 = 0; int psx_delay_BFC0B09C = 0; int psx_taken_BFC0B09C = 0; int psx_delay_BFC0B0CC = 0; int psx_taken_BFC0B0CC = 0; int psx_delay_BFC0B0E8 = 0; int psx_taken_BFC0B0E8 = 0; int psx_delay_BFC0B0F0 = 0; int psx_taken_BFC0B0F0 = 0; int psx_delay_BFC0B100 = 0; int psx_taken_BFC0B100 = 0; int psx_delay_BFC0B108 = 0; int psx_taken_BFC0B108 = 0; int psx_delay_BFC0B11C = 0; int psx_taken_BFC0B11C = 0; int psx_delay_BFC0B128 = 0; int psx_delay_BFC0B130 = 0; int psx_taken_BFC0B130 = 0; int psx_delay_BFC0B13C = 0; int psx_delay_BFC0B148 = 0; int psx_taken_BFC0B148 = 0; int psx_delay_BFC0B150 = 0; int psx_taken_BFC0B150 = 0; int psx_delay_BFC0B158 = 0; int psx_taken_BFC0B158 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0A59Cu: goto label_BFC0A59C; case 0xBFC0A5C8u: goto label_BFC0A5C8; case 0xBFC0A5CCu: goto label_BFC0A5CC; case 0xBFC0A5D8u: goto label_BFC0A5D8; case 0xBFC0A5E8u: goto label_BFC0A5E8; case 0xBFC0A5ECu: goto label_BFC0A5EC; case 0xBFC0A62Cu: goto label_BFC0A62C; case 0xBFC0A634u: goto label_BFC0A634; case 0xBFC0A63Cu: goto label_BFC0A63C; case 0xBFC0A644u: goto label_BFC0A644; case 0xBFC0A668u: goto label_BFC0A668; case 0xBFC0A680u: goto label_BFC0A680; case 0xBFC0A690u: goto label_BFC0A690; case 0xBFC0A6A8u: goto label_BFC0A6A8; case 0xBFC0A6B0u: goto label_BFC0A6B0; case 0xBFC0A6CCu: goto label_BFC0A6CC; case 0xBFC0A6D0u: goto label_BFC0A6D0; case 0xBFC0A6D4u: goto label_BFC0A6D4; case 0xBFC0A6E8u: goto label_BFC0A6E8; case 0xBFC0A6F8u: goto label_BFC0A6F8; case 0xBFC0A70Cu: goto label_BFC0A70C; case 0xBFC0A710u: goto label_BFC0A710; case 0xBFC0A720u: goto label_BFC0A720; case 0xBFC0A728u: goto label_BFC0A728; case 0xBFC0A760u: goto label_BFC0A760; case 0xBFC0A778u: goto label_BFC0A778; case 0xBFC0A77Cu: goto label_BFC0A77C; case 0xBFC0A780u: goto label_BFC0A780; case 0xBFC0A78Cu: goto label_BFC0A78C; case 0xBFC0A7A4u: goto label_BFC0A7A4; case 0xBFC0A7ACu: goto label_BFC0A7AC; case 0xBFC0A7C4u: goto label_BFC0A7C4; case 0xBFC0A7C8u: goto label_BFC0A7C8; case 0xBFC0A7D8u: goto label_BFC0A7D8; case 0xBFC0A7ECu: goto label_BFC0A7EC; case 0xBFC0A7F8u: goto label_BFC0A7F8; case 0xBFC0A800u: goto label_BFC0A800; case 0xBFC0A810u: goto label_BFC0A810; case 0xBFC0A814u: goto label_BFC0A814; case 0xBFC0A858u: goto label_BFC0A858; case 0xBFC0A85Cu: goto label_BFC0A85C; case 0xBFC0A880u: goto label_BFC0A880; case 0xBFC0A88Cu: goto label_BFC0A88C; case 0xBFC0A8B0u: goto label_BFC0A8B0; case 0xBFC0A8C4u: goto label_BFC0A8C4; case 0xBFC0A8D0u: goto label_BFC0A8D0; case 0xBFC0A8E4u: goto label_BFC0A8E4; case 0xBFC0A908u: goto label_BFC0A908; case 0xBFC0A910u: goto label_BFC0A910; case 0xBFC0A934u: goto label_BFC0A934; case 0xBFC0A940u: goto label_BFC0A940; case 0xBFC0A948u: goto label_BFC0A948; case 0xBFC0A950u: goto label_BFC0A950; case 0xBFC0A958u: goto label_BFC0A958; case 0xBFC0A968u: goto label_BFC0A968; case 0xBFC0A974u: goto label_BFC0A974; case 0xBFC0A97Cu: goto label_BFC0A97C; case 0xBFC0A98Cu: goto label_BFC0A98C; case 0xBFC0A990u: goto label_BFC0A990; case 0xBFC0A99Cu: goto label_BFC0A99C; case 0xBFC0A9A8u: goto label_BFC0A9A8; case 0xBFC0A9BCu: goto label_BFC0A9BC; case 0xBFC0A9ECu: goto label_BFC0A9EC; case 0xBFC0A9F0u: goto label_BFC0A9F0; case 0xBFC0AA34u: goto label_BFC0AA34; case 0xBFC0AA54u: goto label_BFC0AA54; case 0xBFC0AA68u: goto label_BFC0AA68; case 0xBFC0AA84u: goto label_BFC0AA84; case 0xBFC0AA88u: goto label_BFC0AA88; case 0xBFC0AAC0u: goto label_BFC0AAC0; case 0xBFC0AACCu: goto label_BFC0AACC; case 0xBFC0AAD4u: goto label_BFC0AAD4; case 0xBFC0AAECu: goto label_BFC0AAEC; case 0xBFC0AAF0u: goto label_BFC0AAF0; case 0xBFC0AAF4u: goto label_BFC0AAF4; case 0xBFC0AB00u: goto label_BFC0AB00; case 0xBFC0AB10u: goto label_BFC0AB10; case 0xBFC0AB20u: goto label_BFC0AB20; case 0xBFC0AB2Cu: goto label_BFC0AB2C; case 0xBFC0AB34u: goto label_BFC0AB34; case 0xBFC0AB40u: goto label_BFC0AB40; case 0xBFC0AB4Cu: goto label_BFC0AB4C; case 0xBFC0AB54u: goto label_BFC0AB54; case 0xBFC0ABACu: goto label_BFC0ABAC; case 0xBFC0ABC4u: goto label_BFC0ABC4; case 0xBFC0ABD8u: goto label_BFC0ABD8; case 0xBFC0ABFCu: goto label_BFC0ABFC; case 0xBFC0AC10u: goto label_BFC0AC10; case 0xBFC0AC24u: goto label_BFC0AC24; case 0xBFC0AC38u: goto label_BFC0AC38; case 0xBFC0AC40u: goto label_BFC0AC40; case 0xBFC0AC48u: goto label_BFC0AC48; case 0xBFC0AC50u: goto label_BFC0AC50; case 0xBFC0AC54u: goto label_BFC0AC54; case 0xBFC0AC5Cu: goto label_BFC0AC5C; case 0xBFC0AC64u: goto label_BFC0AC64; case 0xBFC0AC70u: goto label_BFC0AC70; case 0xBFC0AC78u: goto label_BFC0AC78; case 0xBFC0AC80u: goto label_BFC0AC80; case 0xBFC0AC88u: goto label_BFC0AC88; case 0xBFC0AC98u: goto label_BFC0AC98; case 0xBFC0AC9Cu: goto label_BFC0AC9C; case 0xBFC0ACD0u: goto label_BFC0ACD0; case 0xBFC0ACD8u: goto label_BFC0ACD8; case 0xBFC0AD18u: goto label_BFC0AD18; case 0xBFC0AD20u: goto label_BFC0AD20; case 0xBFC0AD74u: goto label_BFC0AD74; case 0xBFC0AD8Cu: goto label_BFC0AD8C; case 0xBFC0ADA8u: goto label_BFC0ADA8; case 0xBFC0ADBCu: goto label_BFC0ADBC; case 0xBFC0ADD0u: goto label_BFC0ADD0; case 0xBFC0ADE0u: goto label_BFC0ADE0; case 0xBFC0ADF0u: goto label_BFC0ADF0; case 0xBFC0AE6Cu: goto label_BFC0AE6C; case 0xBFC0AE78u: goto label_BFC0AE78; case 0xBFC0AE80u: goto label_BFC0AE80; case 0xBFC0AE88u: goto label_BFC0AE88; case 0xBFC0AE94u: goto label_BFC0AE94; case 0xBFC0AEA0u: goto label_BFC0AEA0; case 0xBFC0AEA8u: goto label_BFC0AEA8; case 0xBFC0AEB0u: goto label_BFC0AEB0; case 0xBFC0AEBCu: goto label_BFC0AEBC; case 0xBFC0AEC8u: goto label_BFC0AEC8; case 0xBFC0AED0u: goto label_BFC0AED0; case 0xBFC0AED8u: goto label_BFC0AED8; case 0xBFC0AEE0u: goto label_BFC0AEE0; case 0xBFC0AEE8u: goto label_BFC0AEE8; case 0xBFC0AEF0u: goto label_BFC0AEF0; case 0xBFC0AEF4u: goto label_BFC0AEF4; case 0xBFC0AEFCu: goto label_BFC0AEFC; case 0xBFC0AF04u: goto label_BFC0AF04; case 0xBFC0AF0Cu: goto label_BFC0AF0C; case 0xBFC0AF10u: goto label_BFC0AF10; case 0xBFC0AF18u: goto label_BFC0AF18; case 0xBFC0AF20u: goto label_BFC0AF20; case 0xBFC0AF28u: goto label_BFC0AF28; case 0xBFC0AF30u: goto label_BFC0AF30; case 0xBFC0AF3Cu: goto label_BFC0AF3C; case 0xBFC0AF48u: goto label_BFC0AF48; case 0xBFC0AF54u: goto label_BFC0AF54; case 0xBFC0AF60u: goto label_BFC0AF60; case 0xBFC0AF6Cu: goto label_BFC0AF6C; case 0xBFC0AF78u: goto label_BFC0AF78; case 0xBFC0AF90u: goto label_BFC0AF90; case 0xBFC0AFD8u: goto label_BFC0AFD8; case 0xBFC0AFE8u: goto label_BFC0AFE8; case 0xBFC0AFFCu: goto label_BFC0AFFC; case 0xBFC0B014u: goto label_BFC0B014; case 0xBFC0B01Cu: goto label_BFC0B01C; case 0xBFC0B024u: goto label_BFC0B024; case 0xBFC0B028u: goto label_BFC0B028; case 0xBFC0B038u: goto label_BFC0B038; case 0xBFC0B040u: goto label_BFC0B040; case 0xBFC0B048u: goto label_BFC0B048; case 0xBFC0B050u: goto label_BFC0B050; case 0xBFC0B09Cu: goto label_BFC0B09C; case 0xBFC0B0A4u: goto label_BFC0B0A4; case 0xBFC0B0D4u: goto label_BFC0B0D4; case 0xBFC0B0DCu: goto label_BFC0B0DC; case 0xBFC0B0E4u: goto label_BFC0B0E4; case 0xBFC0B0F0u: goto label_BFC0B0F0; case 0xBFC0B0F8u: goto label_BFC0B0F8; case 0xBFC0B108u: goto label_BFC0B108; case 0xBFC0B110u: goto label_BFC0B110; case 0xBFC0B124u: goto label_BFC0B124; case 0xBFC0B130u: goto label_BFC0B130; case 0xBFC0B138u: goto label_BFC0B138; case 0xBFC0B144u: goto label_BFC0B144; case 0xBFC0B150u: goto label_BFC0B150; case 0xBFC0B158u: goto label_BFC0B158; default: break; } } label_BFC0A564: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A564u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0A564: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0A568: 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(0x80030068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0A56C: 24843504 addiu $a0, $a0, 13572 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (13572)); PGXP_ALU(0x24843504u, cpu->gpr[4], _pgx1, 0x00003504u); } #ifdef PSX_COSIM cosim_instr(0x8003006Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0A570: AFBF00CC sw $ra, 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, 0x80030070u); return; } g_debug_last_store_pc = 0x80030070u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF00CCu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80030070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC0A574: AFBE00C8 sw $fp, 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, 0x80030074u); return; } g_debug_last_store_pc = 0x80030074u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE00C8u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x80030074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC0A578: AFB700C4 sw $s7, 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, 0x80030078u); return; } g_debug_last_store_pc = 0x80030078u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB700C4u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x80030078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC0A57C: AFB600C0 sw $s6, 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, 0x8003007Cu); return; } g_debug_last_store_pc = 0x8003007Cu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB600C0u, _pgxa, cpu->gpr[22]); } #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, 0x20200000u); #endif /* 0xBFC0A580: AFB500BC sw $s5, 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, 0x80030080u); return; } g_debug_last_store_pc = 0x80030080u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB500BCu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80030080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0A584: AFB400B8 sw $s4, 184($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 184; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030084u); return; } g_debug_last_store_pc = 0x80030084u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB400B8u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80030084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0A588: AFB300B4 sw $s3, 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, 0x80030088u); return; } g_debug_last_store_pc = 0x80030088u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB300B4u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80030088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0A58C: AFB200B0 sw $s2, 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, 0x8003008Cu); return; } g_debug_last_store_pc = 0x8003008Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB200B0u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x8003008Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0A590: AFB100AC sw $s1, 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, 0x80030090u); return; } g_debug_last_store_pc = 0x80030090u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB100ACu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80030090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A594: 0C00CED4 jal 0xB0033B50 */ cpu->gpr[31] = 0x8003009Cu; /* jal link before delay slot */ psx_delay_BFC0A594 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0A598: AFB000A8 sw $s0, 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, 0x80030098u); return; } g_debug_last_store_pc = 0x80030098u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB000A8u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80030098u); #endif if (psx_delay_BFC0A594) { psx_delay_BFC0A594 = 0; cpu->gpr[31] = 0x8003009Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B50u); cpu->pc = 0x80033B50u; return; } label_BFC0A59C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A59Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A59Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003009Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A59C: 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(0x8003009Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A5A0: 0000000C syscall */ cpu->pc = 0x800300A0u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x800300A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A5A4: AFA200A0 sw $v0, 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, 0x800300A4u); return; } g_debug_last_store_pc = 0x800300A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA200A0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800300A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A5A8: 3C02BFC7 lui $v0, 0xBFC7 */ cpu->gpr[2] = 0xBFC70000u; PGXP_ALU(0x3C02BFC7u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800300A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A5AC: 3442FF52 ori $v0, $v0, 0xFF52 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0xFF52u; PGXP_ALU(0x3442FF52u, cpu->gpr[2], _pgx1, 0xFF52u); } #ifdef PSX_COSIM cosim_instr(0x800300ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300B0u); #endif /* 0xBFC0A5B0: 80430000 lb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 3, 0x4u); PGXP_LOAD(0x80430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800300B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A5B4: 24040045 addiu $a0, $zero, 69 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (69)); PGXP_ALU(0x24040045u, cpu->gpr[4], _pgx1, 0x00000045u); } #ifdef PSX_COSIM cosim_instr(0x800300B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0A5B8: 38700045 xori $s0, $v1, 0x45 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[16] = cpu->gpr[3] ^ 0x45u; PGXP_ALU(0x38700045u, cpu->gpr[16], _pgx1, 0x0045u); } #ifdef PSX_COSIM cosim_instr(0x800300B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0A5BC: 2E100001 sltiu $s0, $s0, 1 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)(cpu->gpr[16] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2E100001u, cpu->gpr[16], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x800300BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0A5C0: 10640002 beq $v1, $a0, 0xBFC0A5CC */ uint32_t psx_brA_BFC0A5C0 = cpu->gpr[3]; uint32_t psx_brB_BFC0A5C0 = cpu->gpr[4]; psx_taken_BFC0A5C0 = (psx_brA_BFC0A5C0 == psx_brB_BFC0A5C0); psx_delay_BFC0A5C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A5C4: 24020032 addiu $v0, $zero, 50 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (50)); PGXP_ALU(0x24020032u, cpu->gpr[2], _pgx1, 0x00000032u); } #ifdef PSX_COSIM cosim_instr(0x800300C4u); #endif if (psx_delay_BFC0A5C0) { psx_delay_BFC0A5C0 = 0; if (psx_taken_BFC0A5C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800300CCu); goto label_BFC0A5CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800300C8u); } label_BFC0A5C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A5C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A5C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A5C8: 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(0x800300C8u); #endif label_BFC0A5CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A5CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A5CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0A5CC: 3C138004 lui $s3, 0x8004 */ cpu->gpr[19] = 0x80040000u; PGXP_ALU(0x3C138004u, cpu->gpr[19], 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, 0x80000000u); #endif /* 0xBFC0A5D0: 0C00C4F3 jal 0xB00313CC */ cpu->gpr[31] = 0x800300D8u; /* jal link before delay slot */ psx_delay_BFC0A5D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC0A5D4: AE624DD8 sw $v0, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); 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[2]); } PGXP_STORE(0xAE624DD8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800300D4u); #endif if (psx_delay_BFC0A5D0) { psx_delay_BFC0A5D0 = 0; cpu->gpr[31] = 0x800300D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313CCu); cpu->pc = 0x800313CCu; return; } label_BFC0A5D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A5D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A5D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300D8u); #endif /* 0xBFC0A5D8: 8E634DD8 lw $v1, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800300D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E634DD8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800300D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A5DC: 3C020400 lui $v0, 0x400 */ cpu->gpr[2] = 0x04000000u; PGXP_ALU(0x3C020400u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC0A5E0: 14600002 bne $v1, $zero, 0xBFC0A5EC */ uint32_t psx_brA_BFC0A5E0 = cpu->gpr[3]; uint32_t psx_brB_BFC0A5E0 = cpu->gpr[0]; psx_taken_BFC0A5E0 = (psx_brA_BFC0A5E0 != psx_brB_BFC0A5E0); psx_delay_BFC0A5E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A5E4: 0043001B divu $v0, $v1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0043001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800300E4u); #endif if (psx_delay_BFC0A5E0) { psx_delay_BFC0A5E0 = 0; if (psx_taken_BFC0A5E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800300ECu); goto label_BFC0A5EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800300E8u); } label_BFC0A5E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A5E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A5E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A5E8: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800300E8u); return; #ifdef PSX_COSIM cosim_instr(0x800300E8u); #endif label_BFC0A5EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A5ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A5ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800300ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0A5EC: 3C158004 lui $s5, 0x8004 */ cpu->gpr[21] = 0x80040000u; PGXP_ALU(0x3C158004u, cpu->gpr[21], 0u, 0u); #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, 0x4u); #endif /* 0xBFC0A5F0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800300F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC0A5F4: A6A04DC8 sh $zero, 19912($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19912; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19912)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800300F4u); return; } g_debug_last_store_pc = 0x800300F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA6A04DC8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800300F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A5F8: 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(0x800300F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0A5FC: 3C148004 lui $s4, 0x8004 */ cpu->gpr[20] = 0x80040000u; PGXP_ALU(0x3C148004u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800300FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400000u); #endif /* 0xBFC0A600: 3C168004 lui $s6, 0x8004 */ cpu->gpr[22] = 0x80040000u; PGXP_ALU(0x3C168004u, cpu->gpr[22], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A604: 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(0x80030104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A608: AC434DD4 sw $v1, 19924($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19924)); 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[3]); } PGXP_STORE(0xAC434DD4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC0A60C: 26A24DC8 addiu $v0, $s5, 19912 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] + (19912)); PGXP_ALU(0x26A24DC8u, cpu->gpr[2], _pgx1, 0x00004DC8u); } #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, 0x5u); #endif /* 0xBFC0A610: A0400002 sb $zero, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030110u; 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(0x80030110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A614: AFA2008C sw $v0, 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, 0x80030114u); return; } g_debug_last_store_pc = 0x80030114u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2008Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030114u); #endif /* 0xBFC0A618: 8EA24DC8 lw $v0, 19912($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19912; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[21] + (19912)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030118u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200000u); } PGXP_LOAD(0x8EA24DC8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A61C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003011Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0A620: AE824DCC sw $v0, 19916($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 19916; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (19916)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030120u); return; } g_debug_last_store_pc = 0x80030120u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE824DCCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A624: 0C00C704 jal 0xB0031C10 */ cpu->gpr[31] = 0x8003012Cu; /* jal link before delay slot */ psx_delay_BFC0A624 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC0A628: AEC24DD0 sw $v0, 19920($s6) */ { uint32_t _pgxa = cpu->gpr[22] + 19920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (19920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030128u); return; } g_debug_last_store_pc = 0x80030128u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAEC24DD0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030128u); #endif if (psx_delay_BFC0A624) { psx_delay_BFC0A624 = 0; cpu->gpr[31] = 0x8003012Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C10u); cpu->pc = 0x80031C10u; return; } 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, 0x8003012Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A62C: 0C00C5A5 jal 0xB0031694 */ cpu->gpr[31] = 0x80030134u; /* jal link before delay slot */ psx_delay_BFC0A62C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0A630: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030130u); #endif if (psx_delay_BFC0A62C) { psx_delay_BFC0A62C = 0; cpu->gpr[31] = 0x80030134u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031694u); cpu->pc = 0x80031694u; return; } 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, 0x80030134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A634: 0C00C9D0 jal 0xB0032740 */ cpu->gpr[31] = 0x8003013Cu; /* jal link before delay slot */ psx_delay_BFC0A634 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A638: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030138u); #endif if (psx_delay_BFC0A634) { psx_delay_BFC0A634 = 0; cpu->gpr[31] = 0x8003013Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032740u); cpu->pc = 0x80032740u; return; } label_BFC0A63C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A63Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A63Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003013Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A63C: 0C00C346 jal 0xB0030D18 */ cpu->gpr[31] = 0x80030144u; /* jal link before delay slot */ psx_delay_BFC0A63C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A640: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030140u); #endif if (psx_delay_BFC0A63C) { psx_delay_BFC0A63C = 0; cpu->gpr[31] = 0x80030144u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D18u); cpu->pc = 0x80030D18u; return; } label_BFC0A644: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A644u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A644: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A648: 3C030300 lui $v1, 0x300 */ cpu->gpr[3] = 0x03000000u; PGXP_ALU(0x3C030300u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A64C: AC431814 sw $v1, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003014Cu); return; } g_debug_last_store_pc = 0x8003014Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431814u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC0A650: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A654: AFA20098 sw $v0, 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, 0x80030154u); return; } g_debug_last_store_pc = 0x80030154u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20098u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0A658: 24514DEC addiu $s1, $v0, 19948 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[2] + (19948)); PGXP_ALU(0x24514DECu, cpu->gpr[17], _pgx1, 0x00004DECu); } #ifdef PSX_COSIM cosim_instr(0x80030158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A65C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003015Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A660: 2442366C addiu $v0, $v0, 13932 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (13932)); PGXP_ALU(0x2442366Cu, cpu->gpr[2], _pgx1, 0x0000366Cu); } #ifdef PSX_COSIM cosim_instr(0x80030160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A664: AFA2009C sw $v0, 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, 0x80030164u); return; } g_debug_last_store_pc = 0x80030164u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2009Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030164u); #endif label_BFC0A668: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A668u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A668: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A66C: AFA20094 sw $v0, 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, 0x8003016Cu); return; } g_debug_last_store_pc = 0x8003016Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20094u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003016Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030170u); #endif /* 0xBFC0A670: 8C424DB0 lw $v0, 19888($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030170u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424DB0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030170u); #endif /* 0xBFC0A674: 8E634DD8 lw $v1, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030174u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E634DD8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A678: 10400014 beq $v0, $zero, 0xBFC0A6CC */ uint32_t psx_brA_BFC0A678 = cpu->gpr[2]; uint32_t psx_brB_BFC0A678 = cpu->gpr[0]; psx_taken_BFC0A678 = (psx_brA_BFC0A678 == psx_brB_BFC0A678); psx_delay_BFC0A678 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A67C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003017Cu); #endif if (psx_delay_BFC0A678) { psx_delay_BFC0A678 = 0; if (psx_taken_BFC0A678) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301CCu); goto label_BFC0A6CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030180u); } label_BFC0A680: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A680u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030180u); #endif /* 0xBFC0A680: 8C424DDC lw $v0, 19932($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19932; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19932)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030180u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424DDCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A684: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A688: 10400011 beq $v0, $zero, 0xBFC0A6D0 */ uint32_t psx_brA_BFC0A688 = cpu->gpr[2]; uint32_t psx_brB_BFC0A688 = cpu->gpr[0]; psx_taken_BFC0A688 = (psx_brA_BFC0A688 == psx_brB_BFC0A688); psx_delay_BFC0A688 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A68C: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003018Cu); #endif if (psx_delay_BFC0A688) { psx_delay_BFC0A688 = 0; if (psx_taken_BFC0A688) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301D0u); goto label_BFC0A6D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030190u); } label_BFC0A690: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A690u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0A690: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030190u); #endif /* 0xBFC0A694: 8C824DAC lw $v0, 19884($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030194u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C824DACu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A698: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0A69C: 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(0x8003019Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A6A0: 14400167 bne $v0, $zero, 0xBFC0AC40 */ uint32_t psx_brA_BFC0A6A0 = cpu->gpr[2]; uint32_t psx_brB_BFC0A6A0 = cpu->gpr[0]; psx_taken_BFC0A6A0 = (psx_brA_BFC0A6A0 != psx_brB_BFC0A6A0); psx_delay_BFC0A6A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0A6A4: AC854DAC sw $a1, 19884($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19884; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301A4u); return; } g_debug_last_store_pc = 0x800301A4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC854DACu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800301A4u); #endif if (psx_delay_BFC0A6A0) { psx_delay_BFC0A6A0 = 0; if (psx_taken_BFC0A6A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030740u); goto label_BFC0AC40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301A8u); } label_BFC0A6A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A6A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A6A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A6A8: 0C00C704 jal 0xB0031C10 */ cpu->gpr[31] = 0x800301B0u; /* jal link before delay slot */ psx_delay_BFC0A6A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A6AC: 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(0x800301ACu); #endif if (psx_delay_BFC0A6A8) { psx_delay_BFC0A6A8 = 0; cpu->gpr[31] = 0x800301B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C10u); cpu->pc = 0x80031C10u; return; } 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, 0x800301B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A6B0: 240209C7 addiu $v0, $zero, 2503 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2503)); PGXP_ALU(0x240209C7u, cpu->gpr[2], _pgx1, 0x000009C7u); } #ifdef PSX_COSIM cosim_instr(0x800301B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A6B4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800301B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A6B8: AC624DBC sw $v0, 19900($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19900; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301B8u); return; } g_debug_last_store_pc = 0x800301B8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624DBCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800301B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A6BC: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800301BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A6C0: AC624DC0 sw $v0, 19904($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19904; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19904)); 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[2]); } PGXP_STORE(0xAC624DC0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800301C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A6C4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800301C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A6C8: AC624DC4 sw $v0, 19908($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19908; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301C8u); return; } g_debug_last_store_pc = 0x800301C8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624DC4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800301C8u); #endif 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, 0x800301CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A6CC: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800301CCu); #endif label_BFC0A6D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A6D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A6D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A6D0: 25293C74 addiu $t1, $t1, 15476 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (15476)); PGXP_ALU(0x25293C74u, cpu->gpr[9], _pgx1, 0x00003C74u); } #ifdef PSX_COSIM cosim_instr(0x800301D0u); #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, 0x800301D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0A6D4: 3C0B0100 lui $t3, 0x100 */ cpu->gpr[11] = 0x01000000u; PGXP_ALU(0x3C0B0100u, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800301D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1200u); #endif /* 0xBFC0A6D8: 252C00A8 addiu $t4, $t1, 168 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[9] + (168)); PGXP_ALU(0x252C00A8u, cpu->gpr[12], _pgx1, 0x000000A8u); } #ifdef PSX_COSIM cosim_instr(0x800301D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC0A6DC: 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(0x800301DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4800u); #endif /* 0xBFC0A6E0: 256E0001 addiu $t6, $t3, 1 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[11] + (1)); PGXP_ALU(0x256E0001u, cpu->gpr[14], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x800301E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC0A6E4: 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(0x800301E4u); #endif label_BFC0A6E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A6E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A6E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301E8u); #endif /* 0xBFC0A6E8: 8D220010 lw $v0, 16($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } PGXP_LOAD(0x8D220010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800301E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A6EC: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC0A6F0: 10400023 beq $v0, $zero, 0xBFC0A780 */ uint32_t psx_brA_BFC0A6F0 = cpu->gpr[2]; uint32_t psx_brB_BFC0A6F0 = cpu->gpr[0]; psx_taken_BFC0A6F0 = (psx_brA_BFC0A6F0 == psx_brB_BFC0A6F0); psx_delay_BFC0A6F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A6F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800301F4u); #endif if (psx_delay_BFC0A6F0) { psx_delay_BFC0A6F0 = 0; if (psx_taken_BFC0A6F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030280u); goto label_BFC0A780; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301F8u); } label_BFC0A6F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A6F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A6F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800301F8u); #endif /* 0xBFC0A6F8: 8D2A000C lw $t2, 12($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800301F8u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } PGXP_LOAD(0x8D2A000Cu, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x800301F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A6FC: 00000000 nop */ /* nop */ #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, 0xC04u); #endif /* 0xBFC0A700: 014B102A slt $v0, $t2, $t3 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x014B102Au, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A704: 14400002 bne $v0, $zero, 0xBFC0A710 */ uint32_t psx_brA_BFC0A704 = cpu->gpr[2]; uint32_t psx_brB_BFC0A704 = cpu->gpr[0]; psx_taken_BFC0A704 = (psx_brA_BFC0A704 != psx_brB_BFC0A704); psx_delay_BFC0A704 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A708: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030208u); #endif if (psx_delay_BFC0A704) { psx_delay_BFC0A704 = 0; if (psx_taken_BFC0A704) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030210u); goto label_BFC0A710; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003020Cu); } label_BFC0A70C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A70Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A70Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003020Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0A70C: AD200010 sw $zero, 16($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003020Cu); return; } g_debug_last_store_pc = 0x8003020Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD200010u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x8003020Cu); #endif label_BFC0A710: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A710u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030210u); #endif /* 0xBFC0A710: 8D220014 lw $v0, 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, 0x80030210u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } PGXP_LOAD(0x8D220014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A714: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2004u); #endif /* 0xBFC0A718: 104D0181 beq $v0, $t5, 0xBFC0AD20 */ uint32_t psx_brA_BFC0A718 = cpu->gpr[2]; uint32_t psx_brB_BFC0A718 = cpu->gpr[13]; psx_taken_BFC0A718 = (psx_brA_BFC0A718 == psx_brB_BFC0A718); psx_delay_BFC0A718 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A71C: 2C430003 sltiu $v1, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C430003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x8003021Cu); #endif if (psx_delay_BFC0A718) { psx_delay_BFC0A718 = 0; if (psx_taken_BFC0A718) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030820u); goto label_BFC0AD20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030220u); } label_BFC0A720: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A720u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0A720: 1060016B beq $v1, $zero, 0xBFC0ACD0 */ uint32_t psx_brA_BFC0A720 = cpu->gpr[3]; 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_cyc_step(cpu, 0x408u); #endif /* 0xBFC0A724: 000A1C03 sra $v1, $t2, 16 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); PGXP_ALU(0x000A1C03u, cpu->gpr[3], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x80030224u); #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, 0x800307D0u); goto label_BFC0ACD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030228u); } 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, 0x80030228u); #endif /* 0xBFC0A728: 8D250000 lw $a1, 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, 0x80030228u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x200u); } PGXP_LOAD(0x8D250000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A72C: 24020100 addiu $v0, $zero, 256 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); PGXP_ALU(0x24020100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x8003022Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A730: 00431023 subu $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(0x00431023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0A734: 00450018 mult $v0, $a1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[5]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00450018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0x80030234u); #endif /* 0xBFC0A738: 8D250004 lw $a1, 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, 0x80030238u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x200u); } PGXP_LOAD(0x8D250004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030238u); #endif /* 0xBFC0A73C: 8D240008 lw $a0, 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, 0x8003023Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200u); } PGXP_LOAD(0x8D240008u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x8003023Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A740: 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(0x80030240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A744: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A748: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0A74C: 00650018 mult $v1, $a1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[5]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00650018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0x8003024Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A750: 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(0x80030250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A754: 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(0x80030254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A758: 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(0x80030258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0A75C: 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, 0x8003025Cu); return; } g_debug_last_store_pc = 0x8003025Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003025Cu); #endif label_BFC0A760: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A760u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030260u); #endif /* 0xBFC0A760: 8D220010 lw $v0, 16($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030260u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } PGXP_LOAD(0x8D220010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A764: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0A768: 004A1021 addu $v0, $v0, $t2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[10]; PGXP_ALU(0x004A1021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400Cu); #endif /* 0xBFC0A76C: 004E182A slt $v1, $v0, $t6 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[14]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[14] ? 1 : 0); PGXP_ALU(0x004E182Au, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC0A770: 14600002 bne $v1, $zero, 0xBFC0A77C */ uint32_t psx_brA_BFC0A770 = cpu->gpr[3]; uint32_t psx_brB_BFC0A770 = cpu->gpr[0]; psx_taken_BFC0A770 = (psx_brA_BFC0A770 != psx_brB_BFC0A770); psx_delay_BFC0A770 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A774: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030274u); #endif if (psx_delay_BFC0A770) { psx_delay_BFC0A770 = 0; if (psx_taken_BFC0A770) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003027Cu); goto label_BFC0A77C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030278u); } label_BFC0A778: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A778u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A778: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030278u); #endif label_BFC0A77C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A77Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A77Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003027Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0A77C: AD22000C sw $v0, 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, 0x8003027Cu); return; } g_debug_last_store_pc = 0x8003027Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAD22000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003027Cu); #endif label_BFC0A780: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A780u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0A780: 25290018 addiu $t1, $t1, 24 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (24)); PGXP_ALU(0x25290018u, cpu->gpr[9], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80030280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1200u); #endif /* 0xBFC0A784: 1589FFD8 bne $t4, $t1, 0xBFC0A6E8 */ uint32_t psx_brA_BFC0A784 = cpu->gpr[12]; uint32_t psx_brB_BFC0A784 = cpu->gpr[9]; psx_taken_BFC0A784 = (psx_brA_BFC0A784 != psx_brB_BFC0A784); psx_delay_BFC0A784 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A788: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030288u); #endif if (psx_delay_BFC0A784) { psx_delay_BFC0A784 = 0; if (psx_taken_BFC0A784) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301E8u); goto label_BFC0A6E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003028Cu); } label_BFC0A78C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A78Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A78Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003028Cu); #endif /* 0xBFC0A78C: 8C574DE0 lw $s7, 19936($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19936; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19936)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003028Cu); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x4u); } PGXP_LOAD(0x8C574DE0u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x8003028Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030290u); #endif /* 0xBFC0A790: 8E644DD8 lw $a0, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030290u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80000u); } PGXP_LOAD(0x8E644DD8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800008u); #endif /* 0xBFC0A794: 26E30001 addiu $v1, $s7, 1 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[23] + (1)); PGXP_ALU(0x26E30001u, cpu->gpr[3], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x80030294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A798: AC434DE0 sw $v1, 19936($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19936; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19936)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030298u); return; } g_debug_last_store_pc = 0x80030298u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434DE0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0A79C: 16E40003 bne $s7, $a0, 0xBFC0A7AC */ uint32_t psx_brA_BFC0A79C = cpu->gpr[23]; uint32_t psx_brB_BFC0A79C = cpu->gpr[4]; psx_taken_BFC0A79C = (psx_brA_BFC0A79C != psx_brB_BFC0A79C); psx_delay_BFC0A79C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A7A0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800302A0u); #endif if (psx_delay_BFC0A79C) { psx_delay_BFC0A79C = 0; if (psx_taken_BFC0A79C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302ACu); goto label_BFC0A7AC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302A4u); } 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, 0x800302A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0A7A4: 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(0x800302A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A7A8: AC434DDC sw $v1, 19932($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19932; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19932)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302A8u); return; } g_debug_last_store_pc = 0x800302A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434DDCu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800302A8u); #endif label_BFC0A7AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A7ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A7ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302ACu); #endif /* 0xBFC0A7AC: 8C5E4DDC lw $fp, 19932($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19932; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19932)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302ACu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x4u); } PGXP_LOAD(0x8C5E4DDCu, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x800302ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0A7B0: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x800302B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000Cu); #endif /* 0xBFC0A7B4: 00571821 addu $v1, $v0, $s7 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[23]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[23]; PGXP_ALU(0x00571821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800302B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0A7B8: 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(0x800302B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A7BC: 14400002 bne $v0, $zero, 0xBFC0A7C8 */ uint32_t psx_brA_BFC0A7BC = cpu->gpr[2]; uint32_t psx_brB_BFC0A7BC = cpu->gpr[0]; psx_taken_BFC0A7BC = (psx_brA_BFC0A7BC != psx_brB_BFC0A7BC); psx_delay_BFC0A7BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A7C0: 0062001B divu $v1, $v0 */ { uint32_t psx_n = cpu->gpr[3]; 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(0x0062001Bu, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x800302C0u); #endif if (psx_delay_BFC0A7BC) { psx_delay_BFC0A7BC = 0; if (psx_taken_BFC0A7BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302C8u); goto label_BFC0A7C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302C4u); } 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, 0x800302C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A7C4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800302C4u); return; #ifdef PSX_COSIM cosim_instr(0x800302C4u); #endif label_BFC0A7C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A7C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A7C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A7C8: 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(0x800302C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A7CC: 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(0x800302CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A7D0: 14620009 bne $v1, $v0, 0xBFC0A7F8 */ uint32_t psx_brA_BFC0A7D0 = cpu->gpr[3]; uint32_t psx_brB_BFC0A7D0 = cpu->gpr[2]; psx_taken_BFC0A7D0 = (psx_brA_BFC0A7D0 != psx_brB_BFC0A7D0); psx_delay_BFC0A7D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0A7D4: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800302D4u); #endif if (psx_delay_BFC0A7D0) { psx_delay_BFC0A7D0 = 0; if (psx_taken_BFC0A7D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302F8u); goto label_BFC0A7F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800302D8u); } label_BFC0A7D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A7D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A7D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A7D8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800302D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0A7DC: 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(0x800302DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0A7E0: 24844E04 addiu $a0, $a0, 19972 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19972)); PGXP_ALU(0x24844E04u, cpu->gpr[4], _pgx1, 0x00004E04u); } #ifdef PSX_COSIM cosim_instr(0x800302E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A7E4: 0C00C66B jal 0xB00319AC */ cpu->gpr[31] = 0x800302ECu; /* jal link before delay slot */ psx_delay_BFC0A7E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A7E8: AC404DE4 sw $zero, 19940($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19940; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19940)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302E8u); return; } g_debug_last_store_pc = 0x800302E8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404DE4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800302E8u); #endif if (psx_delay_BFC0A7E4) { psx_delay_BFC0A7E4 = 0; cpu->gpr[31] = 0x800302ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800319ACu); cpu->pc = 0x800319ACu; return; } label_BFC0A7EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A7ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A7ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A7EC: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC0A7F0: 0C00CA23 jal 0xB003288C */ cpu->gpr[31] = 0x800302F8u; /* jal link before delay slot */ psx_delay_BFC0A7F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A7F4: AC624DE8 sw $v0, 19944($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800302F4u); return; } g_debug_last_store_pc = 0x800302F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624DE8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800302F4u); #endif if (psx_delay_BFC0A7F0) { psx_delay_BFC0A7F0 = 0; cpu->gpr[31] = 0x800302F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003288Cu); cpu->pc = 0x8003288Cu; return; } label_BFC0A7F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A7F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A7F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800302F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0A7F8: 17C0015E bne $fp, $zero, 0xBFC0AD74 */ uint32_t psx_brA_BFC0A7F8 = cpu->gpr[30]; uint32_t psx_brB_BFC0A7F8 = cpu->gpr[0]; psx_taken_BFC0A7F8 = (psx_brA_BFC0A7F8 != psx_brB_BFC0A7F8); psx_delay_BFC0A7F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0A7FC: 27B00020 addiu $s0, $sp, 32 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[29] + (32)); PGXP_ALU(0x27B00020u, cpu->gpr[16], _pgx1, 0x00000020u); } #ifdef PSX_COSIM cosim_instr(0x800302FCu); #endif if (psx_delay_BFC0A7F8) { psx_delay_BFC0A7F8 = 0; if (psx_taken_BFC0A7F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030874u); goto label_BFC0AD74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030300u); } label_BFC0A800: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A800u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030300u); #endif /* 0xBFC0A800: 8E644DD8 lw $a0, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030300u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80000u); } PGXP_LOAD(0x8E644DD8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC0A804: 00171600 sll $v0, $s7, 24 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] << 24u; PGXP_ALU(0x00171600u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A808: 14800002 bne $a0, $zero, 0xBFC0A814 */ uint32_t psx_brA_BFC0A808 = cpu->gpr[4]; uint32_t psx_brB_BFC0A808 = cpu->gpr[0]; psx_taken_BFC0A808 = (psx_brA_BFC0A808 != psx_brB_BFC0A808); psx_delay_BFC0A808 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0A80C: 0044001B divu $v0, $a0 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0044001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x8003030Cu); #endif if (psx_delay_BFC0A808) { psx_delay_BFC0A808 = 0; if (psx_taken_BFC0A808) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030314u); goto label_BFC0A814; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030310u); } label_BFC0A810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A810u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A810: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80030310u); return; #ifdef PSX_COSIM cosim_instr(0x80030310u); #endif label_BFC0A814: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A814u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A814: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A818: 3C020194 lui $v0, 0x194 */ cpu->gpr[2] = 0x01940000u; PGXP_ALU(0x3C020194u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A81C: 24427AE1 addiu $v0, $v0, 31457 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (31457)); PGXP_ALU(0x24427AE1u, cpu->gpr[2], _pgx1, 0x00007AE1u); } #ifdef PSX_COSIM cosim_instr(0x8003031Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC0A820: 0017BA00 sll $s7, $s7, 8 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = cpu->gpr[23] << 8u; PGXP_ALU(0x0017BA00u, cpu->gpr[23], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0A824: 24050800 addiu $a1, $zero, 2048 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (2048)); PGXP_ALU(0x24050800u, cpu->gpr[5], _pgx1, 0x00000800u); } #ifdef PSX_COSIM cosim_instr(0x80030324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0A828: 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(0x80030328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC0A82C: 00721823 subu $v1, $v1, $s2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[18]; PGXP_ALU(0x00721823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003032Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A830: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A834: 00620018 mult $v1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00620018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80030334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0A838: 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(0x80030338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0A83C: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x8003033Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0A840: 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(0x80030340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0A844: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80030344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0A848: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A84C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x11u); #endif /* 0xBFC0A850: 14800002 bne $a0, $zero, 0xBFC0A85C */ uint32_t psx_brA_BFC0A850 = cpu->gpr[4]; uint32_t psx_brB_BFC0A850 = cpu->gpr[0]; psx_taken_BFC0A850 = (psx_brA_BFC0A850 != psx_brB_BFC0A850); psx_delay_BFC0A850 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0A854: 02E4001B divu $s7, $a0 */ { uint32_t psx_n = cpu->gpr[23]; 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(0x02E4001Bu, cpu->hi, cpu->lo, cpu->gpr[23], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80030354u); #endif if (psx_delay_BFC0A850) { psx_delay_BFC0A850 = 0; if (psx_taken_BFC0A850) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003035Cu); goto label_BFC0A85C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030358u); } label_BFC0A858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A858: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80030358u); return; #ifdef PSX_COSIM cosim_instr(0x80030358u); #endif 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, 0x8003035Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0A85C: 00529021 addu $s2, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[2] + cpu->gpr[18]; PGXP_ALU(0x00529021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003035Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0A860: 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(0x80030360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A864: 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(0x80030364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A868: 00031040 sll $v0, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 1u; PGXP_ALU(0x00031040u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80030368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A86C: 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(0x8003036Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A870: 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(0x80030370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A874: 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(0x80030374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A878: 0C00C7B0 jal 0xB0031EC0 */ cpu->gpr[31] = 0x80030380u; /* jal link before delay slot */ psx_delay_BFC0A878 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0A87C: 00A22823 subu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[2]; PGXP_ALU(0x00A22823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003037Cu); #endif if (psx_delay_BFC0A878) { psx_delay_BFC0A878 = 0; cpu->gpr[31] = 0x80030380u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); cpu->pc = 0x80031EC0u; return; } label_BFC0A880: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A880u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40021u); #endif /* 0xBFC0A880: 02402825 or $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(0x02402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A884: 0C00C8CA jal 0xB0032328 */ cpu->gpr[31] = 0x8003038Cu; /* jal link before delay slot */ psx_delay_BFC0A884 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0A888: 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(0x80030388u); #endif if (psx_delay_BFC0A884) { psx_delay_BFC0A884 = 0; cpu->gpr[31] = 0x8003038Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032328u); cpu->pc = 0x80032328u; return; } 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, 0x8003038Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A88C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #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, 0x40000u); #endif /* 0xBFC0A890: 3C128004 lui $s2, 0x8004 */ cpu->gpr[18] = 0x80040000u; PGXP_ALU(0x3C128004u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0A894: 26524E04 addiu $s2, $s2, 19972 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (19972)); PGXP_ALU(0x26524E04u, cpu->gpr[18], _pgx1, 0x00004E04u); } #ifdef PSX_COSIM cosim_instr(0x80030394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A898: 244236CC addiu $v0, $v0, 14028 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (14028)); PGXP_ALU(0x244236CCu, cpu->gpr[2], _pgx1, 0x000036CCu); } #ifdef PSX_COSIM cosim_instr(0x80030398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A89C: AFA20088 sw $v0, 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, 0x8003039Cu); return; } g_debug_last_store_pc = 0x8003039Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20088u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003039Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0A8A0: 26420040 addiu $v0, $s2, 64 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[18] + (64)); PGXP_ALU(0x26420040u, cpu->gpr[2], _pgx1, 0x00000040u); } #ifdef PSX_COSIM cosim_instr(0x800303A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A8A4: AFA20090 sw $v0, 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, 0x800303A4u); return; } g_debug_last_store_pc = 0x800303A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20090u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40009u); #endif /* 0xBFC0A8A8: 02401825 or $v1, $s2, $zero */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[18] | cpu->gpr[0]; PGXP_ALU(0x02401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800303A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840001u); #endif /* 0xBFC0A8AC: 0240B825 or $s7, $s2, $zero */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[23] = cpu->gpr[18] | cpu->gpr[0]; PGXP_ALU(0x0240B825u, cpu->gpr[23], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800303ACu); #endif label_BFC0A8B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A8B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A8B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303B0u); #endif /* 0xBFC0A8B0: 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, 0x800303B0u); 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(0x800303B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10041u); #endif /* 0xBFC0A8B4: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800303B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0A8B8: 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(0x800303B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A8BC: 0C00C91C jal 0xB0032470 */ cpu->gpr[31] = 0x800303C4u; /* jal link before delay slot */ psx_delay_BFC0A8BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC0A8C0: AFA300A4 sw $v1, 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, 0x800303C0u); return; } g_debug_last_store_pc = 0x800303C0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA300A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800303C0u); #endif if (psx_delay_BFC0A8BC) { psx_delay_BFC0A8BC = 0; cpu->gpr[31] = 0x800303C4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032470u); cpu->pc = 0x80032470u; return; } label_BFC0A8C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A8C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A8C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303C4u); #endif /* 0xBFC0A8C4: 8FA300A4 lw $v1, 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, 0x800303C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA300A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800303C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0A8C8: 17C001AB bne $fp, $zero, 0xBFC0AF78 */ uint32_t psx_brA_BFC0A8C8 = cpu->gpr[30]; uint32_t psx_brB_BFC0A8C8 = cpu->gpr[0]; psx_taken_BFC0A8C8 = (psx_brA_BFC0A8C8 != psx_brB_BFC0A8C8); psx_delay_BFC0A8C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A8CC: 3C020D00 lui $v0, 0xD00 */ cpu->gpr[2] = 0x0D000000u; PGXP_ALU(0x3C020D00u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800303CCu); #endif if (psx_delay_BFC0A8C8) { psx_delay_BFC0A8C8 = 0; if (psx_taken_BFC0A8C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A78u); goto label_BFC0AF78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800303D0u); } label_BFC0A8D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A8D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A8D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303D0u); #endif /* 0xBFC0A8D0: 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, 0x800303D0u); 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(0x800303D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A8D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800303D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A8D8: 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, 0x800303D8u); return; } g_debug_last_store_pc = 0x800303D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303D8u); #endif /* 0xBFC0A8DC: 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, 0x800303DCu); 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(0x800303DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A8E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800303E0u); #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, 0x800303E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A8E4: 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, 0x800303E4u); return; } g_debug_last_store_pc = 0x800303E4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303E4u); #endif /* 0xBFC0A8E8: 8FA20088 lw $v0, 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, 0x800303E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20088u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A8EC: 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(0x800303ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800303F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A8F0: 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(0x800303F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A8F4: AFA20088 sw $v0, 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, 0x800303F4u); return; } g_debug_last_store_pc = 0x800303F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20088u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303F4u); #endif /* 0xBFC0A8F8: 8FA20090 lw $v0, 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, 0x800303F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20090u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800303F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A8FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800303FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A900: 1443FFEB bne $v0, $v1, 0xBFC0A8B0 */ uint32_t psx_brA_BFC0A900 = cpu->gpr[2]; uint32_t psx_brB_BFC0A900 = cpu->gpr[3]; psx_taken_BFC0A900 = (psx_brA_BFC0A900 != psx_brB_BFC0A900); psx_delay_BFC0A900 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A904: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030404u); #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, 0x800303B0u); goto label_BFC0A8B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030408u); } 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, 0x80030408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0A908: 17C001B3 bne $fp, $zero, 0xBFC0AFD8 */ uint32_t psx_brA_BFC0A908 = cpu->gpr[30]; uint32_t psx_brB_BFC0A908 = cpu->gpr[0]; psx_taken_BFC0A908 = (psx_brA_BFC0A908 != psx_brB_BFC0A908); psx_delay_BFC0A908 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A90C: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003040Cu); #endif if (psx_delay_BFC0A908) { psx_delay_BFC0A908 = 0; if (psx_taken_BFC0A908) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030AD8u); goto label_BFC0AFD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030410u); } label_BFC0A910: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A910u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030410u); #endif /* 0xBFC0A910: 8FA30098 lw $v1, 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, 0x80030410u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30098u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A914: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A918: AC624DEC sw $v0, 19948($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19948; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19948)); 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[2]); } PGXP_STORE(0xAC624DECu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A91C: 3C02FF00 lui $v0, 0xFF00 */ cpu->gpr[2] = 0xFF000000u; PGXP_ALU(0x3C02FF00u, cpu->gpr[2], 0u, 0u); #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, 0x20004u); #endif /* 0xBFC0A920: AE220004 sw $v0, 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, 0x80030420u); return; } g_debug_last_store_pc = 0x80030420u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0A924: AE220008 sw $v0, 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, 0x80030424u); return; } g_debug_last_store_pc = 0x80030424u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0A928: AE22000C sw $v0, 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, 0x80030428u); return; } g_debug_last_store_pc = 0x80030428u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE22000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0A92C: AE220010 sw $v0, 16($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003042Cu); return; } g_debug_last_store_pc = 0x8003042Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220010u, _pgxa, cpu->gpr[2]); } #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, 0x20004u); #endif /* 0xBFC0A930: AE220014 sw $v0, 20($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030430u); return; } g_debug_last_store_pc = 0x80030430u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE220014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030430u); #endif 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, 0x80030434u); #endif /* 0xBFC0A934: 8E644DD8 lw $a0, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030434u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80000u); } PGXP_LOAD(0x8E644DD8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A938: 0C00C36C jal 0xB0030DB0 */ cpu->gpr[31] = 0x80030440u; /* jal link before delay slot */ psx_delay_BFC0A938 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A93C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003043Cu); #endif if (psx_delay_BFC0A938) { psx_delay_BFC0A938 = 0; cpu->gpr[31] = 0x80030440u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030DB0u); cpu->pc = 0x80030DB0u; return; } label_BFC0A940: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A940u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A940: 0C00C354 jal 0xB0030D50 */ cpu->gpr[31] = 0x80030448u; /* jal link before delay slot */ psx_delay_BFC0A940 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A944: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030444u); #endif if (psx_delay_BFC0A940) { psx_delay_BFC0A940 = 0; cpu->gpr[31] = 0x80030448u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D50u); cpu->pc = 0x80030D50u; return; } label_BFC0A948: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A948u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A948: 0C00C360 jal 0xB0030D80 */ cpu->gpr[31] = 0x80030450u; /* jal link before delay slot */ psx_delay_BFC0A948 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000005u); #endif /* 0xBFC0A94C: 0040F025 or $fp, $v0, $zero */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[30] = cpu->gpr[2] | cpu->gpr[0]; PGXP_ALU(0x0040F025u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003044Cu); #endif if (psx_delay_BFC0A948) { psx_delay_BFC0A948 = 0; cpu->gpr[31] = 0x80030450u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D80u); cpu->pc = 0x80030D80u; return; } label_BFC0A950: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A950u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0A950: 13C001FF beq $fp, $zero, 0xBFC0B150 */ uint32_t psx_brA_BFC0A950 = cpu->gpr[30]; uint32_t psx_brB_BFC0A950 = cpu->gpr[0]; psx_taken_BFC0A950 = (psx_brA_BFC0A950 == psx_brB_BFC0A950); psx_delay_BFC0A950 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A954: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030454u); #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, 0x80030C50u); goto label_BFC0B150; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030458u); } 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, 0x80030458u); #endif /* 0xBFC0A958: 8C644DA8 lw $a0, 19880($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030458u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C644DA8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A95C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003045Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A960: 148001E9 bne $a0, $zero, 0xBFC0B108 */ uint32_t psx_brA_BFC0A960 = cpu->gpr[4]; uint32_t psx_brB_BFC0A960 = cpu->gpr[0]; psx_taken_BFC0A960 = (psx_brA_BFC0A960 != psx_brB_BFC0A960); psx_delay_BFC0A960 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A964: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030464u); #endif if (psx_delay_BFC0A960) { psx_delay_BFC0A960 = 0; if (psx_taken_BFC0A960) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C08u); goto label_BFC0B108; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030468u); } label_BFC0A968: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A968u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0A968: 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(0x80030468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A96C: 0C00CA5E jal 0xB0032978 */ cpu->gpr[31] = 0x80030474u; /* jal link before delay slot */ psx_delay_BFC0A96C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A970: AC624DA8 sw $v0, 19880($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030470u); return; } g_debug_last_store_pc = 0x80030470u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624DA8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030470u); #endif if (psx_delay_BFC0A96C) { psx_delay_BFC0A96C = 0; cpu->gpr[31] = 0x80030474u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032978u); cpu->pc = 0x80032978u; return; } label_BFC0A974: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A974u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A974: 0C00C704 jal 0xB0031C10 */ cpu->gpr[31] = 0x8003047Cu; /* jal link before delay slot */ psx_delay_BFC0A974 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A978: 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(0x80030478u); #endif if (psx_delay_BFC0A974) { psx_delay_BFC0A974 = 0; cpu->gpr[31] = 0x8003047Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C10u); cpu->pc = 0x80031C10u; return; } label_BFC0A97C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A97Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A97Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003047Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A97C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003047Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A980: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A984: 2442352C addiu $v0, $v0, 13612 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (13612)); PGXP_ALU(0x2442352Cu, cpu->gpr[2], _pgx1, 0x0000352Cu); } #ifdef PSX_COSIM cosim_instr(0x80030484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A988: AC622084 sw $v0, 8324($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 8324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (8324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030488u); return; } g_debug_last_store_pc = 0x80030488u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC622084u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030488u); #endif label_BFC0A98C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A98Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A98Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003048Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0A98C: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003048Cu); #endif label_BFC0A990: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A990u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0A990: 24A51DAC addiu $a1, $a1, 7596 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (7596)); PGXP_ALU(0x24A51DACu, cpu->gpr[5], _pgx1, 0x00001DACu); } #ifdef PSX_COSIM cosim_instr(0x80030490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A994: 0C00C56A jal 0xB00315A8 */ cpu->gpr[31] = 0x8003049Cu; /* jal link before delay slot */ psx_delay_BFC0A994 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A998: 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(0x80030498u); #endif if (psx_delay_BFC0A994) { psx_delay_BFC0A994 = 0; cpu->gpr[31] = 0x8003049Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315A8u); cpu->pc = 0x800315A8u; return; } 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, 0x8003049Cu); #endif /* 0xBFC0A99C: 8EC54DD0 lw $a1, 19920($s6) */ { uint32_t _pgxa = cpu->gpr[22] + 19920; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[22] + (19920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003049Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x400000u); } PGXP_LOAD(0x8EC54DD0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x8003049Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0A9A0: 0C00C513 jal 0xB003144C */ cpu->gpr[31] = 0x800304A8u; /* jal link before delay slot */ psx_delay_BFC0A9A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0A9A4: 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(0x800304A4u); #endif if (psx_delay_BFC0A9A0) { psx_delay_BFC0A9A0 = 0; cpu->gpr[31] = 0x800304A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003144Cu); cpu->pc = 0x8003144Cu; return; } label_BFC0A9A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A9A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A9A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0A9A8: 3C0B8004 lui $t3, 0x8004 */ cpu->gpr[11] = 0x80040000u; PGXP_ALU(0x3C0B8004u, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800304A8u); #endif /* 0xBFC0A9AC: 8D6C4DE8 lw $t4, 19944($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 19944; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (19944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304ACu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } PGXP_LOAD(0x8D6C4DE8u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x800304ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0A9B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800304B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC0A9B4: 1180004F beq $t4, $zero, 0xBFC0AAF4 */ uint32_t psx_brA_BFC0A9B4 = cpu->gpr[12]; uint32_t psx_brB_BFC0A9B4 = cpu->gpr[0]; psx_taken_BFC0A9B4 = (psx_brA_BFC0A9B4 == psx_brB_BFC0A9B4); psx_delay_BFC0A9B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20009u); #endif /* 0xBFC0A9B8: 02201825 or $v1, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x02201825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800304B8u); #endif if (psx_delay_BFC0A9B4) { psx_delay_BFC0A9B4 = 0; if (psx_taken_BFC0A9B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800305F4u); goto label_BFC0AAF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800304BCu); } label_BFC0A9BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0A9BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0A9BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A9BC: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800304BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304C0u); #endif /* 0xBFC0A9C0: 8C4A4DE4 lw $t2, 19940($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19940; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19940)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304C0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } PGXP_LOAD(0x8C4A4DE4u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x800304C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100010u); #endif /* 0xBFC0A9C4: 26844DCC addiu $a0, $s4, 19916 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[20] + (19916)); PGXP_ALU(0x26844DCCu, cpu->gpr[4], _pgx1, 0x00004DCCu); } #ifdef PSX_COSIM cosim_instr(0x800304C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0A9C8: 25430001 addiu $v1, $t2, 1 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[10] + (1)); PGXP_ALU(0x25430001u, cpu->gpr[3], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x800304C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A9CC: AC434DE4 sw $v1, 19940($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19940; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19940)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304CCu); return; } g_debug_last_store_pc = 0x800304CCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434DE4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800304CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC0A9D0: 000A4840 sll $t1, $t2, 1 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[10] << 1u; PGXP_ALU(0x000A4840u, cpu->gpr[9], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x800304D0u); #endif /* 0xBFC0A9D4: 8E634DD8 lw $v1, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800304D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E634DD8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800304D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x604u); #endif /* 0xBFC0A9D8: 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(0x800304D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A9DC: 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(0x800304DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800304E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0A9E0: 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(0x800304E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0A9E4: 14600002 bne $v1, $zero, 0xBFC0A9F0 */ uint32_t psx_brA_BFC0A9E4 = cpu->gpr[3]; uint32_t psx_brB_BFC0A9E4 = cpu->gpr[0]; psx_taken_BFC0A9E4 = (psx_brA_BFC0A9E4 != psx_brB_BFC0A9E4); psx_delay_BFC0A9E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0A9E8: 0043001B divu $v0, $v1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0043001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800304E8u); #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, 0x800304F0u); goto label_BFC0A9F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800304ECu); } 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, 0x800304ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0A9EC: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800304ECu); return; #ifdef PSX_COSIM cosim_instr(0x800304ECu); #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, 0x800304F0u); #endif /* 0xBFC0A9F0: 92854DCC lbu $a1, 19916($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 19916; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (19916)), 5, 0x100000u); PGXP_LOAD(0x92854DCCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800304F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0A9F4: 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(0x800304F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0A9F8: 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, 0x800304F8u); return; } g_debug_last_store_pc = 0x800304F8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800304F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC0A9FC: 26C24DD0 addiu $v0, $s6, 19920 */ { uint32_t _pgx1 = cpu->gpr[22]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[22] + (19920)); PGXP_ALU(0x26C24DD0u, cpu->gpr[2], _pgx1, 0x00004DD0u); } #ifdef PSX_COSIM cosim_instr(0x800304FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030500u); #endif /* 0xBFC0AA00: 90430002 lbu $v1, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 3, 0x4u); PGXP_LOAD(0x90430002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AA04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC0AA08: 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, 0x80030508u); return; } g_debug_last_store_pc = 0x80030508u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30018u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030508u); #endif /* 0xBFC0AA0C: 90420001 lbu $v0, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 2, 0x4u); PGXP_LOAD(0x90420001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003050Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AA10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0AA14: 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, 0x80030514u); return; } g_debug_last_store_pc = 0x80030514u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030514u); #endif /* 0xBFC0AA18: 92C24DD0 lbu $v0, 19920($s6) */ { uint32_t _pgxa = cpu->gpr[22] + 19920; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[22] + (19920)), 2, 0x400000u); PGXP_LOAD(0x92C24DD0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AA1C: 00000000 nop */ /* nop */ #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, 0x20000004u); #endif /* 0xBFC0AA20: 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, 0x80030520u); return; } g_debug_last_store_pc = 0x80030520u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030520u); #endif /* 0xBFC0AA24: 90870002 lbu $a3, 2($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 7, 0x10u); PGXP_LOAD(0x90870002u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80030524u); #endif /* 0xBFC0AA28: 90860001 lbu $a2, 1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 6, 0x10u); PGXP_LOAD(0x90860001u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AA2C: 0C00C772 jal 0xB0031DC8 */ cpu->gpr[31] = 0x80030534u; /* jal link before delay slot */ psx_delay_BFC0AA2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0AA30: 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(0x80030530u); #endif if (psx_delay_BFC0AA2C) { psx_delay_BFC0AA2C = 0; cpu->gpr[31] = 0x80030534u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031DC8u); cpu->pc = 0x80031DC8u; return; } label_BFC0AA34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AA34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AA34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030534u); #endif /* 0xBFC0AA34: 93A20062 lbu $v0, 98($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 98; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (98)), 2, 0x20000000u); PGXP_LOAD(0x93A20062u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030534u); #endif /* 0xBFC0AA38: 97A30060 lhu $v1, 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, 0x80030538u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x97A30060u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AA3C: 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(0x8003053Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AA40: 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(0x80030540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AA44: 3C034800 lui $v1, 0x4800 */ cpu->gpr[3] = 0x48000000u; PGXP_ALU(0x3C034800u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AA48: 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(0x80030548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AA4C: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003054Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AA50: 3C050400 lui $a1, 0x400 */ cpu->gpr[5] = 0x04000000u; PGXP_ALU(0x3C050400u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030550u); #endif label_BFC0AA54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AA54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AA54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030554u); #endif /* 0xBFC0AA54: 8C831814 lw $v1, 6164($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030554u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C831814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AA58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0AA5C: 00651824 and $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] & cpu->gpr[5]; PGXP_ALU(0x00651824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0AA60: 1060FFFC beq $v1, $zero, 0xBFC0AA54 */ uint32_t psx_brA_BFC0AA60 = cpu->gpr[3]; uint32_t psx_brB_BFC0AA60 = cpu->gpr[0]; psx_taken_BFC0AA60 = (psx_brA_BFC0AA60 == psx_brB_BFC0AA60); psx_delay_BFC0AA60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AA64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030564u); #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, 0x80030554u); goto label_BFC0AA54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030568u); } 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, 0x80030568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AA68: AC821810 sw $v0, 6160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030568u); return; } g_debug_last_store_pc = 0x80030568u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030568u); #endif /* 0xBFC0AA6C: 8E624DD8 lw $v0, 19928($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 19928; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (19928)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003056Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80000u); } PGXP_LOAD(0x8E624DD8u, _pgxa, cpu->gpr[2]); } #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, 0x600u); #endif /* 0xBFC0AA70: 012A4821 addu $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(0x012A4821u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AA74: 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(0x80030574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0AA78: 00094E00 sll $t1, $t1, 24 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[9] << 24u; PGXP_ALU(0x00094E00u, cpu->gpr[9], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0AA7C: 14400002 bne $v0, $zero, 0xBFC0AA88 */ uint32_t psx_brA_BFC0AA7C = cpu->gpr[2]; uint32_t psx_brB_BFC0AA7C = cpu->gpr[0]; psx_taken_BFC0AA7C = (psx_brA_BFC0AA7C != psx_brB_BFC0AA7C); psx_delay_BFC0AA7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0AA80: 0122001B divu $t1, $v0 */ { uint32_t psx_n = cpu->gpr[9]; 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(0x0122001Bu, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80030580u); #endif if (psx_delay_BFC0AA7C) { psx_delay_BFC0AA7C = 0; if (psx_taken_BFC0AA7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030588u); goto label_BFC0AA88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030584u); } label_BFC0AA84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AA84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AA84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0AA84: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80030584u); return; #ifdef PSX_COSIM cosim_instr(0x80030584u); #endif label_BFC0AA88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AA88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AA88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AA88: 3C0301C0 lui $v1, 0x1C0 */ cpu->gpr[3] = 0x01C00000u; PGXP_ALU(0x3C0301C0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AA8C: 3C050100 lui $a1, 0x100 */ cpu->gpr[5] = 0x01000000u; PGXP_ALU(0x3C050100u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003058Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0AA90: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0AA94: 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(0x80030594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AA98: 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(0x80030598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0AA9C: 00A22823 subu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[2]; PGXP_ALU(0x00A22823u, cpu->gpr[5], _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, 0x1u); #endif /* 0xBFC0AAA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800305A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AAA4: 00430018 mult $v0, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00430018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800305A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0AAA8: 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(0x800305A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0AAAC: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #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, 0x80u); #endif /* 0xBFC0AAB0: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800305B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0AAB4: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800305B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AAB8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800305B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0AABC: 00A22821 addu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A22821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800305BCu); #endif 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, 0x800305C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1104u); #endif /* 0xBFC0AAC0: 010C102A slt $v0, $t0, $t4 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (int32_t)cpu->gpr[12] ? 1 : 0); PGXP_ALU(0x010C102Au, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800305C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0AAC4: 14400162 bne $v0, $zero, 0xBFC0B050 */ uint32_t psx_brA_BFC0AAC4 = cpu->gpr[2]; uint32_t psx_brB_BFC0AAC4 = cpu->gpr[0]; psx_taken_BFC0AAC4 = (psx_brA_BFC0AAC4 != psx_brB_BFC0AAC4); psx_delay_BFC0AAC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AAC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800305C8u); #endif if (psx_delay_BFC0AAC4) { psx_delay_BFC0AAC4 = 0; if (psx_taken_BFC0AAC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B50u); goto label_BFC0B050; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800305CCu); } label_BFC0AACC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AACCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AACC: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x800305D4u; /* jal link before delay slot */ psx_delay_BFC0AACC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0AAD0: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800305D0u); #endif if (psx_delay_BFC0AACC) { psx_delay_BFC0AACC = 0; cpu->gpr[31] = 0x800305D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; return; } label_BFC0AAD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AAD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AAD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AAD4: 3C025000 lui $v0, 0x5000 */ cpu->gpr[2] = 0x50000000u; PGXP_ALU(0x3C025000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800305D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AAD8: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800305D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AADC: 24425000 addiu $v0, $v0, 20480 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20480)); PGXP_ALU(0x24425000u, cpu->gpr[2], _pgx1, 0x00005000u); } #ifdef PSX_COSIM cosim_instr(0x800305DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0AAE0: 2D4A0028 sltiu $t2, $t2, 40 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)(cpu->gpr[10] < 0x00000028u ? 1 : 0); PGXP_ALU(0x2D4A0028u, cpu->gpr[10], _pgx1, 0x0028u); } #ifdef PSX_COSIM cosim_instr(0x800305E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0AAE4: 15400002 bne $t2, $zero, 0xBFC0AAF0 */ uint32_t psx_brA_BFC0AAE4 = cpu->gpr[10]; uint32_t psx_brB_BFC0AAE4 = cpu->gpr[0]; psx_taken_BFC0AAE4 = (psx_brA_BFC0AAE4 != psx_brB_BFC0AAE4); psx_delay_BFC0AAE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AAE8: AC621810 sw $v0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800305E8u); return; } g_debug_last_store_pc = 0x800305E8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800305E8u); #endif if (psx_delay_BFC0AAE4) { psx_delay_BFC0AAE4 = 0; if (psx_taken_BFC0AAE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800305F0u); goto label_BFC0AAF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800305ECu); } label_BFC0AAEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AAECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AAECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0AAEC: AD604DE8 sw $zero, 19944($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 19944; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (19944)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800305ECu); return; } g_debug_last_store_pc = 0x800305ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAD604DE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800305ECu); #endif 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, 0x800305F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20009u); #endif /* 0xBFC0AAF0: 02201825 or $v1, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x02201825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800305F0u); #endif label_BFC0AAF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AAF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AAF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800305F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001u); #endif /* 0xBFC0AAF4: 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(0x800305F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0AAF8: 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(0x800305F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0AAFC: 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(0x800305FCu); #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, 0x80030600u); #endif /* 0xBFC0AB00: 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, 0x80030600u); 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(0x80030600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AB08: 18800005 blez $a0, 0xBFC0AB20 */ uint32_t psx_brA_BFC0AB08 = cpu->gpr[4]; psx_taken_BFC0AB08 = ((int32_t)psx_brA_BFC0AB08 <= 0); psx_delay_BFC0AB08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003060Cu); #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, 0x80030620u); goto label_BFC0AB20; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030610u); } 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, 0x80030610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2010u); #endif /* 0xBFC0AB10: 000D2080 sll $a0, $t5, 2 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[13] << 2u; PGXP_ALU(0x000D2080u, cpu->gpr[4], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80030610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC0AB14: 02042021 addu $a0, $s0, $a0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[16] + cpu->gpr[4]; PGXP_ALU(0x02042021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AB18: 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, 0x80030618u); return; } g_debug_last_store_pc = 0x80030618u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0AB1C: 25AD0001 addiu $t5, $t5, 1 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (1)); PGXP_ALU(0x25AD0001u, cpu->gpr[13], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x8003061Cu); #endif label_BFC0AB20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AB20: 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(0x80030620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0AB24: 1445FFF6 bne $v0, $a1, 0xBFC0AB00 */ uint32_t psx_brA_BFC0AB24 = cpu->gpr[2]; uint32_t psx_brB_BFC0AB24 = cpu->gpr[5]; psx_taken_BFC0AB24 = (psx_brA_BFC0AB24 != psx_brB_BFC0AB24); psx_delay_BFC0AB24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AB28: 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(0x80030628u); #endif if (psx_delay_BFC0AB24) { psx_delay_BFC0AB24 = 0; if (psx_taken_BFC0AB24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030600u); goto label_BFC0AB00; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003062Cu); } label_BFC0AB2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003062Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2080u); #endif /* 0xBFC0AB2C: 25A7FFFF addiu $a3, $t5, -1 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[13] + (-1)); PGXP_ALU(0x25A7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFFFFFu); } #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, 0x9u); #endif /* 0xBFC0AB30: 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(0x80030630u); #endif label_BFC0AB34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8Cu); #endif /* 0xBFC0AB34: 0067102A slt $v0, $v1, $a3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[7] ? 1 : 0); PGXP_ALU(0x0067102Au, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0AB38: 1440016F bne $v0, $zero, 0xBFC0B0F8 */ uint32_t psx_brA_BFC0AB38 = cpu->gpr[2]; uint32_t psx_brB_BFC0AB38 = cpu->gpr[0]; psx_taken_BFC0AB38 = (psx_brA_BFC0AB38 != psx_brB_BFC0AB38); psx_delay_BFC0AB38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC0AB3C: 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(0x8003063Cu); #endif if (psx_delay_BFC0AB38) { psx_delay_BFC0AB38 = 0; if (psx_taken_BFC0AB38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BF8u); goto label_BFC0B0F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030640u); } label_BFC0AB40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100400u); #endif /* 0xBFC0AB40: 268A4DCC addiu $t2, $s4, 19916 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[20] + (19916)); PGXP_ALU(0x268A4DCCu, cpu->gpr[10], _pgx1, 0x00004DCCu); } #ifdef PSX_COSIM cosim_instr(0x80030640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0AB44: 3C0C2800 lui $t4, 0x2800 */ cpu->gpr[12] = 0x28000000u; PGXP_ALU(0x3C0C2800u, cpu->gpr[12], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0AB48: 3C0B1F80 lui $t3, 0x1F80 */ cpu->gpr[11] = 0x1F800000u; PGXP_ALU(0x3C0B1F80u, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030648u); #endif label_BFC0AB4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003064Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6000u); #endif /* 0xBFC0AB4C: 11CDFEC6 beq $t6, $t5, 0xBFC0A668 */ uint32_t psx_brA_BFC0AB4C = cpu->gpr[14]; uint32_t psx_brB_BFC0AB4C = cpu->gpr[13]; psx_taken_BFC0AB4C = (psx_brA_BFC0AB4C == psx_brB_BFC0AB4C); psx_delay_BFC0AB4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030650u); #endif if (psx_delay_BFC0AB4C) { psx_delay_BFC0AB4C = 0; if (psx_taken_BFC0AB4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030168u); goto label_BFC0A668; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030654u); } label_BFC0AB54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AB54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AB54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030654u); #endif /* 0xBFC0AB54: 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, 0x80030654u); 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(0x80030654u); #endif /* 0xBFC0AB58: 92A54DC8 lbu $a1, 19912($s5) */ { uint32_t _pgxa = cpu->gpr[21] + 19912; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[21] + (19912)), 5, 0x200000u); PGXP_LOAD(0x92A54DC8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0AB5C: 00091080 sll $v0, $t1, 2 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[9] << 2u; PGXP_ALU(0x00091080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x8003065Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0AB60: 00511021 addu $v0, $v0, $s1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[17]; PGXP_ALU(0x00511021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030660u); #endif /* 0xBFC0AB64: 84420002 lh $v0, 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, 0x80030664u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x84420002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0AB6C: 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, 0x8003066Cu); return; } g_debug_last_store_pc = 0x8003066Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003066Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030670u); #endif /* 0xBFC0AB70: 91420002 lbu $v0, 2($t2) */ { uint32_t _pgxa = cpu->gpr[10] + 2; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (2)), 2, 0x400u); PGXP_LOAD(0x91420002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0AB78: AFA20018 sw $v0, 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, 0x80030678u); return; } g_debug_last_store_pc = 0x80030678u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030678u); #endif /* 0xBFC0AB7C: 91420001 lbu $v0, 1($t2) */ { uint32_t _pgxa = cpu->gpr[10] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[10] + (1)), 2, 0x400u); PGXP_LOAD(0x91420001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003067Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0AB84: 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, 0x80030684u); return; } g_debug_last_store_pc = 0x80030684u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030684u); #endif /* 0xBFC0AB88: 92824DCC lbu $v0, 19916($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 19916; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[20] + (19916)), 2, 0x100000u); PGXP_LOAD(0x92824DCCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB8C: 00000000 nop */ /* nop */ #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, 0x20000004u); #endif /* 0xBFC0AB90: 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, 0x80030690u); return; } g_debug_last_store_pc = 0x80030690u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030690u); #endif /* 0xBFC0AB94: 8FA2008C lw $v0, 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, 0x80030694u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA2008Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AB98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030698u); #endif /* 0xBFC0AB9C: 90470002 lbu $a3, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 7, 0x4u); PGXP_LOAD(0x90470002u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x8003069Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306A0u); #endif /* 0xBFC0ABA0: 90460001 lbu $a2, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (1)), 6, 0x4u); PGXP_LOAD(0x90460001u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x800306A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ABA4: 0C00C772 jal 0xB0031DC8 */ cpu->gpr[31] = 0x800306ACu; /* jal link before delay slot */ psx_delay_BFC0ABA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0ABA8: 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(0x800306A8u); #endif if (psx_delay_BFC0ABA4) { psx_delay_BFC0ABA4 = 0; cpu->gpr[31] = 0x800306ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031DC8u); cpu->pc = 0x80031DC8u; return; } label_BFC0ABAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ABACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ABACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306ACu); #endif /* 0xBFC0ABAC: 93A20062 lbu $v0, 98($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 98; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (98)), 2, 0x20000000u); PGXP_LOAD(0x93A20062u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800306ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306B0u); #endif /* 0xBFC0ABB0: 97A30060 lhu $v1, 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, 0x800306B0u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x97A30060u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800306B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0ABB4: 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(0x800306B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0ABB8: 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(0x800306B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1004u); #endif /* 0xBFC0ABBC: 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(0x800306BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0ABC0: 3C040400 lui $a0, 0x400 */ cpu->gpr[4] = 0x04000000u; PGXP_ALU(0x3C040400u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800306C0u); #endif label_BFC0ABC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ABC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ABC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306C4u); #endif /* 0xBFC0ABC4: 8D631814 lw $v1, 6164($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800306C4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800u); } PGXP_LOAD(0x8D631814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800306C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0ABC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800306C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0ABCC: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC0ABD0: 1060FFFC beq $v1, $zero, 0xBFC0ABC4 */ uint32_t psx_brA_BFC0ABD0 = cpu->gpr[3]; uint32_t psx_brB_BFC0ABD0 = cpu->gpr[0]; psx_taken_BFC0ABD0 = (psx_brA_BFC0ABD0 == psx_brB_BFC0ABD0); psx_delay_BFC0ABD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0ABD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800306D4u); #endif if (psx_delay_BFC0ABD0) { psx_delay_BFC0ABD0 = 0; if (psx_taken_BFC0ABD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800306C4u); goto label_BFC0ABC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800306D8u); } label_BFC0ABD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ABD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ABD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC0ABD8: AD621810 sw $v0, 6160($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800306D8u); return; } g_debug_last_store_pc = 0x800306D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAD621810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800306D8u); #endif /* 0xBFC0ABDC: 8FA2009C lw $v0, 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, 0x800306DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA2009Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800306DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x220u); #endif /* 0xBFC0ABE0: 00092900 sll $a1, $t1, 4 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[5] = cpu->gpr[9] << 4u; PGXP_ALU(0x00092900u, cpu->gpr[5], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x800306E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0ABE4: 00A22821 addu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A22821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800306E4u); #endif /* 0xBFC0ABE8: 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, 0x800306E8u); 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(0x800306E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0ABEC: 25CE0001 addiu $t6, $t6, 1 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); PGXP_ALU(0x25CE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x800306ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800306F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0ABF0: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x800306F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ABF4: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x800306FCu; /* jal link before delay slot */ psx_delay_BFC0ABF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0ABF8: 02E42021 addu $a0, $s7, $a0 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[4]; PGXP_ALU(0x02E42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800306F8u); #endif if (psx_delay_BFC0ABF4) { psx_delay_BFC0ABF4 = 0; cpu->gpr[31] = 0x800306FCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; 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, 0x800306FCu); #endif /* 0xBFC0ABFC: 8CA40004 lw $a0, 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, 0x800306FCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20u); } PGXP_LOAD(0x8CA40004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800306FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0AC00: 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(0x80030700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AC04: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80030704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC08: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x80030710u; /* jal link before delay slot */ psx_delay_BFC0AC08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0AC0C: 02E42021 addu $a0, $s7, $a0 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[4]; PGXP_ALU(0x02E42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003070Cu); #endif if (psx_delay_BFC0AC08) { psx_delay_BFC0AC08 = 0; cpu->gpr[31] = 0x80030710u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; return; } label_BFC0AC10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030710u); #endif /* 0xBFC0AC10: 8CA4000C lw $a0, 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, 0x80030710u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20u); } PGXP_LOAD(0x8CA4000Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AC18: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80030718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC1C: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x80030724u; /* jal link before delay slot */ psx_delay_BFC0AC1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0AC20: 02E42021 addu $a0, $s7, $a0 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[4]; PGXP_ALU(0x02E42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030720u); #endif if (psx_delay_BFC0AC1C) { psx_delay_BFC0AC1C = 0; cpu->gpr[31] = 0x80030724u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; return; } label_BFC0AC24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030724u); #endif /* 0xBFC0AC24: 8CA40008 lw $a0, 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, 0x80030724u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20u); } PGXP_LOAD(0x8CA40008u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AC2C: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x8003072Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC30: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x80030738u; /* jal link before delay slot */ psx_delay_BFC0AC30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC0AC34: 02E42021 addu $a0, $s7, $a0 */ { uint32_t _pgx1 = cpu->gpr[23]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[23] + cpu->gpr[4]; PGXP_ALU(0x02E42021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030734u); #endif if (psx_delay_BFC0AC30) { psx_delay_BFC0AC30 = 0; cpu->gpr[31] = 0x80030738u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; return; } label_BFC0AC38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC38: 1000FFC4 beq $zero, $zero, 0xBFC0AB4C */ uint32_t psx_brA_BFC0AC38 = cpu->gpr[0]; uint32_t psx_brB_BFC0AC38 = cpu->gpr[0]; psx_taken_BFC0AC38 = (psx_brA_BFC0AC38 == psx_brB_BFC0AC38); psx_delay_BFC0AC38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003073Cu); #endif if (psx_delay_BFC0AC38) { psx_delay_BFC0AC38 = 0; if (psx_taken_BFC0AC38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003064Cu); goto label_BFC0AB4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030740u); } label_BFC0AC40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AC40: 14430008 bne $v0, $v1, 0xBFC0AC64 */ uint32_t psx_brA_BFC0AC40 = cpu->gpr[2]; uint32_t psx_brB_BFC0AC40 = cpu->gpr[3]; psx_taken_BFC0AC40 = (psx_brA_BFC0AC40 != psx_brB_BFC0AC40); psx_delay_BFC0AC40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0AC44: 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(0x80030744u); #endif if (psx_delay_BFC0AC40) { psx_delay_BFC0AC40 = 0; if (psx_taken_BFC0AC40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030764u); goto label_BFC0AC64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030748u); } label_BFC0AC48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC48: 0C00CA48 jal 0xB0032920 */ cpu->gpr[31] = 0x80030750u; /* jal link before delay slot */ psx_delay_BFC0AC48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003074Cu); #endif if (psx_delay_BFC0AC48) { psx_delay_BFC0AC48 = 0; cpu->gpr[31] = 0x80030750u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032920u); cpu->pc = 0x80032920u; return; } label_BFC0AC50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AC50: 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(0x80030750u); #endif label_BFC0AC54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC54: 0C00C704 jal 0xB0031C10 */ cpu->gpr[31] = 0x8003075Cu; /* jal link before delay slot */ psx_delay_BFC0AC54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0AC58: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030758u); #endif if (psx_delay_BFC0AC54) { psx_delay_BFC0AC54 = 0; cpu->gpr[31] = 0x8003075Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C10u); cpu->pc = 0x80031C10u; return; } 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, 0x8003075Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC5C: 1000FE9D beq $zero, $zero, 0xBFC0A6D4 */ uint32_t psx_brA_BFC0AC5C = cpu->gpr[0]; uint32_t psx_brB_BFC0AC5C = cpu->gpr[0]; psx_taken_BFC0AC5C = (psx_brA_BFC0AC5C == psx_brB_BFC0AC5C); psx_delay_BFC0AC5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0AC60: 25293C74 addiu $t1, $t1, 15476 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (15476)); PGXP_ALU(0x25293C74u, cpu->gpr[9], _pgx1, 0x00003C74u); } #ifdef PSX_COSIM cosim_instr(0x80030760u); #endif if (psx_delay_BFC0AC5C) { psx_delay_BFC0AC5C = 0; if (psx_taken_BFC0AC5C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301D4u); goto label_BFC0A6D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030764u); } label_BFC0AC64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AC64: 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(0x80030764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AC68: 14430003 bne $v0, $v1, 0xBFC0AC78 */ uint32_t psx_brA_BFC0AC68 = cpu->gpr[2]; uint32_t psx_brB_BFC0AC68 = cpu->gpr[3]; psx_taken_BFC0AC68 = (psx_brA_BFC0AC68 != psx_brB_BFC0AC68); psx_delay_BFC0AC68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC6C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003076Cu); #endif if (psx_delay_BFC0AC68) { psx_delay_BFC0AC68 = 0; if (psx_taken_BFC0AC68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030778u); goto label_BFC0AC78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030770u); } label_BFC0AC70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC70: 1000FFF8 beq $zero, $zero, 0xBFC0AC54 */ uint32_t psx_brA_BFC0AC70 = cpu->gpr[0]; uint32_t psx_brB_BFC0AC70 = cpu->gpr[0]; psx_taken_BFC0AC70 = (psx_brA_BFC0AC70 == psx_brB_BFC0AC70); psx_delay_BFC0AC70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AC74: 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(0x80030774u); #endif if (psx_delay_BFC0AC70) { psx_delay_BFC0AC70 = 0; if (psx_taken_BFC0AC70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030754u); goto label_BFC0AC54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030778u); } label_BFC0AC78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AC78: 1444FE95 bne $v0, $a0, 0xBFC0A6D0 */ uint32_t psx_brA_BFC0AC78 = cpu->gpr[2]; uint32_t psx_brB_BFC0AC78 = cpu->gpr[4]; psx_taken_BFC0AC78 = (psx_brA_BFC0AC78 != psx_brB_BFC0AC78); psx_delay_BFC0AC78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0AC7C: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003077Cu); #endif if (psx_delay_BFC0AC78) { psx_delay_BFC0AC78 = 0; if (psx_taken_BFC0AC78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800301D0u); goto label_BFC0A6D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030780u); } label_BFC0AC80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AC80: 0C00CA1D jal 0xB0032874 */ cpu->gpr[31] = 0x80030788u; /* jal link before delay slot */ psx_delay_BFC0AC80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030784u); #endif if (psx_delay_BFC0AC80) { psx_delay_BFC0AC80 = 0; cpu->gpr[31] = 0x80030788u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032874u); cpu->pc = 0x80032874u; return; } label_BFC0AC88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030788u); #endif /* 0xBFC0AC88: 8FA200A0 lw $v0, 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, 0x80030788u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA200A0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AC8C: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC0AC90: 14400002 bne $v0, $zero, 0xBFC0AC9C */ uint32_t psx_brA_BFC0AC90 = cpu->gpr[2]; uint32_t psx_brB_BFC0AC90 = cpu->gpr[0]; psx_taken_BFC0AC90 = (psx_brA_BFC0AC90 != psx_brB_BFC0AC90); psx_delay_BFC0AC90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AC94: 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(0x80030794u); #endif if (psx_delay_BFC0AC90) { psx_delay_BFC0AC90 = 0; if (psx_taken_BFC0AC90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003079Cu); goto label_BFC0AC9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030798u); } label_BFC0AC98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0AC98: 0000000C syscall */ cpu->pc = 0x80030798u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x80030798u); #endif label_BFC0AC9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AC9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AC9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003079Cu); #endif /* 0xBFC0AC9C: 8FBF00CC lw $ra, 204($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 204; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (204)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003079Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF00CCu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x8003079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800307A0u); #endif /* 0xBFC0ACA0: 8FBE00C8 lw $fp, 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, 0x800307A0u); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x20000000u); } PGXP_LOAD(0x8FBE00C8u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x800307A0u); #endif /* 0xBFC0ACA4: 8FB700C4 lw $s7, 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, 0x800307A4u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x20000000u); } PGXP_LOAD(0x8FB700C4u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x800307A4u); #endif /* 0xBFC0ACA8: 8FB600C0 lw $s6, 192($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 192; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307A8u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20000000u); } PGXP_LOAD(0x8FB600C0u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x800307A8u); #endif /* 0xBFC0ACAC: 8FB500BC lw $s5, 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, 0x800307ACu); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20000000u); } PGXP_LOAD(0x8FB500BCu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x800307ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800307B0u); #endif /* 0xBFC0ACB0: 8FB400B8 lw $s4, 184($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 184; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800307B0u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB400B8u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x800307B0u); #endif /* 0xBFC0ACB4: 8FB300B4 lw $s3, 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, 0x800307B4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB300B4u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x800307B4u); #endif /* 0xBFC0ACB8: 8FB200B0 lw $s2, 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, 0x800307B8u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB200B0u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x800307B8u); #endif /* 0xBFC0ACBC: 8FB100AC lw $s1, 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, 0x800307BCu); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB100ACu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800307BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800307C0u); #endif /* 0xBFC0ACC0: 8FB000A8 lw $s0, 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, 0x800307C0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB000A8u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x800307C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0ACC4: 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(0x800307C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0ACC8: 03E00008 jr $ra */ psx_delay_BFC0ACC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0ACCC: 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(0x800307CCu); #endif if (psx_delay_BFC0ACC8) { psx_delay_BFC0ACC8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x800307D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8004u); #endif /* 0xBFC0ACD0: 144FFEA3 bne $v0, $t7, 0xBFC0A760 */ uint32_t psx_brA_BFC0ACD0 = cpu->gpr[2]; uint32_t psx_brB_BFC0ACD0 = cpu->gpr[15]; psx_taken_BFC0ACD0 = (psx_brA_BFC0ACD0 != psx_brB_BFC0ACD0); psx_delay_BFC0ACD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0ACD4: 000A1403 sra $v0, $t2, 16 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] >> 16u); PGXP_ALU(0x000A1403u, cpu->gpr[2], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x800307D4u); #endif if (psx_delay_BFC0ACD0) { psx_delay_BFC0ACD0 = 0; if (psx_taken_BFC0ACD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030260u); goto label_BFC0A760; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800307D8u); } label_BFC0ACD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ACD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ACD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800307D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0ACD8: 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, 0x800307D8u); return; } g_debug_last_store_pc = 0x800307D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307D8u); #endif /* 0xBFC0ACDC: 91220006 lbu $v0, 6($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 6; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (6)), 2, 0x200u); PGXP_LOAD(0x91220006u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800307E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0ACE0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800307E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0ACE4: AFA20018 sw $v0, 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, 0x800307E4u); return; } g_debug_last_store_pc = 0x800307E4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307E4u); #endif /* 0xBFC0ACE8: 91220005 lbu $v0, 5($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 5; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (5)), 2, 0x200u); PGXP_LOAD(0x91220005u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0ACEC: 00000000 nop */ /* nop */ #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, 0x20000004u); #endif /* 0xBFC0ACF0: 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, 0x800307F0u); return; } g_debug_last_store_pc = 0x800307F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307F0u); #endif /* 0xBFC0ACF4: 91220004 lbu $v0, 4($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 4; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (4)), 2, 0x200u); PGXP_LOAD(0x91220004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0ACF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800307F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0ACFC: 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, 0x800307FCu); return; } g_debug_last_store_pc = 0x800307FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800307FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030800u); #endif /* 0xBFC0AD00: 91270002 lbu $a3, 2($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 2; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (2)), 7, 0x200u); PGXP_LOAD(0x91270002u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80030800u); #endif /* 0xBFC0AD04: 91260001 lbu $a2, 1($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 1; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (1)), 6, 0x200u); PGXP_LOAD(0x91260001u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030804u); #endif /* 0xBFC0AD08: 91250000 lbu $a1, 0($t1) */ { uint32_t _pgxa = cpu->gpr[9]; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[9] + (0)), 5, 0x200u); PGXP_LOAD(0x91250000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030808u); #endif /* 0xBFC0AD0C: 8D240008 lw $a0, 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, 0x8003080Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x200u); } PGXP_LOAD(0x8D240008u, _pgxa, cpu->gpr[4]); } #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, 0x80000000u); #endif /* 0xBFC0AD10: 0C00C772 jal 0xB0031DC8 */ cpu->gpr[31] = 0x80030818u; /* jal link before delay slot */ psx_delay_BFC0AD10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AD14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030814u); #endif if (psx_delay_BFC0AD10) { psx_delay_BFC0AD10 = 0; cpu->gpr[31] = 0x80030818u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031DC8u); cpu->pc = 0x80031DC8u; return; } label_BFC0AD18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AD18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AD18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AD18: 1000FE91 beq $zero, $zero, 0xBFC0A760 */ uint32_t psx_brA_BFC0AD18 = cpu->gpr[0]; uint32_t psx_brB_BFC0AD18 = cpu->gpr[0]; psx_taken_BFC0AD18 = (psx_brA_BFC0AD18 == psx_brB_BFC0AD18); psx_delay_BFC0AD18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AD1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003081Cu); #endif if (psx_delay_BFC0AD18) { psx_delay_BFC0AD18 = 0; if (psx_taken_BFC0AD18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030260u); goto label_BFC0A760; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030820u); } label_BFC0AD20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AD20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AD20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030820u); #endif /* 0xBFC0AD20: 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, 0x80030820u); 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(0x80030820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AD24: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0AD28: 004A1023 subu $v0, $v0, $t2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[10]; PGXP_ALU(0x004A1023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AD2C: 00430018 mult $v0, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00430018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x8003082Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030830u); #endif /* 0xBFC0AD30: 8D260008 lw $a2, 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, 0x80030830u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x200u); } PGXP_LOAD(0x8D260008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AD34: 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(0x80030834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AD38: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AD3C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 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, 0x28u); #endif /* 0xBFC0AD40: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0AD44: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030844u); #endif /* 0xBFC0AD48: 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, 0x80030848u); 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(0x80030848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AD4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003084Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0AD50: 01430018 mult $t2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01430018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80030850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AD54: 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(0x80030854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AD58: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AD5C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 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, 0x28u); #endif /* 0xBFC0AD60: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0AD64: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AD68: 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(0x80030868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AD6C: 1000FE7C beq $zero, $zero, 0xBFC0A760 */ uint32_t psx_brA_BFC0AD6C = cpu->gpr[0]; uint32_t psx_brB_BFC0AD6C = cpu->gpr[0]; psx_taken_BFC0AD6C = (psx_brA_BFC0AD6C == psx_brB_BFC0AD6C); psx_delay_BFC0AD6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0AD70: 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, 0x80030870u); return; } g_debug_last_store_pc = 0x80030870u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030870u); #endif if (psx_delay_BFC0AD6C) { psx_delay_BFC0AD6C = 0; if (psx_taken_BFC0AD6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030260u); goto label_BFC0A760; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030874u); } label_BFC0AD74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AD74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AD74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0AD74: 3C128004 lui $s2, 0x8004 */ cpu->gpr[18] = 0x80040000u; PGXP_ALU(0x3C128004u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030874u); #endif /* 0xBFC0AD78: 8E453D20 lw $a1, 15648($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15648; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15648)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030878u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40000u); } PGXP_LOAD(0x8E453D20u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AD7C: 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(0x8003087Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AD80: 00052B43 sra $a1, $a1, 13 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 13u); PGXP_ALU(0x00052B43u, cpu->gpr[5], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x80030880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AD84: 0C00C7B0 jal 0xB0031EC0 */ cpu->gpr[31] = 0x8003088Cu; /* jal link before delay slot */ psx_delay_BFC0AD84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0AD88: 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(0x80030888u); #endif if (psx_delay_BFC0AD84) { psx_delay_BFC0AD84 = 0; cpu->gpr[31] = 0x8003088Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); cpu->pc = 0x80031EC0u; return; } label_BFC0AD8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AD8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AD8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003088Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0AD8C: 3C078004 lui $a3, 0x8004 */ cpu->gpr[7] = 0x80040000u; PGXP_ALU(0x3C078004u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003088Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030890u); #endif /* 0xBFC0AD90: 8CE54DB8 lw $a1, 19896($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19896; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030890u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x80u); } PGXP_LOAD(0x8CE54DB8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AD94: 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(0x80030894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AD98: 00052B43 sra $a1, $a1, 13 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 13u); PGXP_ALU(0x00052B43u, cpu->gpr[5], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x80030898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0AD9C: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003089Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800308A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ADA0: 0C00C7B0 jal 0xB0031EC0 */ cpu->gpr[31] = 0x800308A8u; /* jal link before delay slot */ psx_delay_BFC0ADA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC0ADA4: 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, 0x800308A4u); return; } g_debug_last_store_pc = 0x800308A4u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA70088u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800308A4u); #endif if (psx_delay_BFC0ADA0) { psx_delay_BFC0ADA0 = 0; cpu->gpr[31] = 0x800308A8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); cpu->pc = 0x80031EC0u; return; } label_BFC0ADA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ADA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ADA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800308A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC0ADA8: 27A60060 addiu $a2, $sp, 96 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); PGXP_ALU(0x27A60060u, cpu->gpr[6], _pgx1, 0x00000060u); } #ifdef PSX_COSIM cosim_instr(0x800308A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x51u); #endif /* 0xBFC0ADAC: 00C02025 or $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(0x00C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800308ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800308B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC0ADB0: 3C178004 lui $s7, 0x8004 */ cpu->gpr[23] = 0x80040000u; PGXP_ALU(0x3C178004u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800308B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ADB4: 0C00C7EA jal 0xB0031FA8 */ cpu->gpr[31] = 0x800308BCu; /* jal link before delay slot */ psx_delay_BFC0ADB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0ADB8: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800308B8u); #endif if (psx_delay_BFC0ADB4) { psx_delay_BFC0ADB4 = 0; cpu->gpr[31] = 0x800308BCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031FA8u); cpu->pc = 0x80031FA8u; return; } label_BFC0ADBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0ADBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0ADBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800308BCu); #endif /* 0xBFC0ADBC: 8EE54DB4 lw $a1, 19892($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308BCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x800000u); } PGXP_LOAD(0x8EE54DB4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800308BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800308C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0ADC0: 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(0x800308C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0ADC4: 00052B43 sra $a1, $a1, 13 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 13u); PGXP_ALU(0x00052B43u, cpu->gpr[5], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x800308C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ADC8: 0C00C7B0 jal 0xB0031EC0 */ cpu->gpr[31] = 0x800308D0u; /* jal link before delay slot */ psx_delay_BFC0ADC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0ADCC: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800308CCu); #endif if (psx_delay_BFC0ADC8) { psx_delay_BFC0ADC8 = 0; cpu->gpr[31] = 0x800308D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); cpu->pc = 0x80031EC0u; 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, 0x800308D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC0ADD0: 27A60060 addiu $a2, $sp, 96 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[29] + (96)); PGXP_ALU(0x27A60060u, cpu->gpr[6], _pgx1, 0x00000060u); } #ifdef PSX_COSIM cosim_instr(0x800308D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x51u); #endif /* 0xBFC0ADD4: 00C02025 or $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(0x00C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800308D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ADD8: 0C00C7EA jal 0xB0031FA8 */ cpu->gpr[31] = 0x800308E0u; /* jal link before delay slot */ psx_delay_BFC0ADD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0ADDC: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800308DCu); #endif if (psx_delay_BFC0ADD8) { psx_delay_BFC0ADD8 = 0; cpu->gpr[31] = 0x800308E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031FA8u); cpu->pc = 0x80031FA8u; 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, 0x800308E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0ADE0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800308E0u); #endif /* 0xBFC0ADE4: 8C453D1C lw $a1, 15644($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15644; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15644)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308E4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C453D1Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800308E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0ADE8: 0C00C8CA jal 0xB0032328 */ cpu->gpr[31] = 0x800308F0u; /* jal link before delay slot */ psx_delay_BFC0ADE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0ADEC: 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(0x800308ECu); #endif if (psx_delay_BFC0ADE8) { psx_delay_BFC0ADE8 = 0; cpu->gpr[31] = 0x800308F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032328u); cpu->pc = 0x80032328u; return; } 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, 0x800308F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0ADF0: 3C0B8004 lui $t3, 0x8004 */ cpu->gpr[11] = 0x80040000u; PGXP_ALU(0x3C0B8004u, cpu->gpr[11], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800308F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0ADF4: 3C058004 lui $a1, 0x8004 */ cpu->gpr[5] = 0x80040000u; PGXP_ALU(0x3C058004u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800308F4u); #endif /* 0xBFC0ADF8: 8D6C3D2C lw $t4, 15660($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 15660; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (15660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308F8u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x800u); } PGXP_LOAD(0x8D6C3D2Cu, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x800308F8u); #endif /* 0xBFC0ADFC: 8CA54DC4 lw $a1, 19908($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 19908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (19908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800308FCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA54DC4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800308FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0AE00: 3C098004 lui $t1, 0x8004 */ cpu->gpr[9] = 0x80040000u; PGXP_ALU(0x3C098004u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1020u); #endif /* 0xBFC0AE04: 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(0x80030904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x820u); #endif /* 0xBFC0AE08: AD653D2C sw $a1, 15660($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 15660; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[11] + (15660)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030908u); return; } g_debug_last_store_pc = 0x80030908u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAD653D2Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AE0C: 3C058004 lui $a1, 0x8004 */ cpu->gpr[5] = 0x80040000u; PGXP_ALU(0x3C058004u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003090Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030910u); #endif /* 0xBFC0AE10: 8D2A3D28 lw $t2, 15656($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 15656; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (15656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030910u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x200u); } PGXP_LOAD(0x8D2A3D28u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80030910u); #endif /* 0xBFC0AE14: 8CA54DC0 lw $a1, 19904($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 19904; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (19904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030914u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA54DC0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030914u); #endif /* 0xBFC0AE18: 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, 0x80030918u); 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(0x80030918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420u); #endif /* 0xBFC0AE1C: 00AA2821 addu $a1, $a1, $t2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[10]; PGXP_ALU(0x00AA2821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003091Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0AE20: 3C068004 lui $a2, 0x8004 */ cpu->gpr[6] = 0x80040000u; PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x220u); #endif /* 0xBFC0AE24: AD253D28 sw $a1, 15656($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 15656; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (15656)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030924u); return; } g_debug_last_store_pc = 0x80030924u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAD253D28u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AE28: 3C058004 lui $a1, 0x8004 */ cpu->gpr[5] = 0x80040000u; PGXP_ALU(0x3C058004u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030928u); #endif /* 0xBFC0AE2C: 8CC83D24 lw $t0, 15652($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 15652; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (15652)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003092Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } PGXP_LOAD(0x8CC83D24u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x8003092Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030930u); #endif /* 0xBFC0AE30: 8CE44DB8 lw $a0, 19896($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19896; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030930u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80u); } PGXP_LOAD(0x8CE44DB8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030930u); #endif /* 0xBFC0AE34: 8EE34DB4 lw $v1, 19892($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030934u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800000u); } PGXP_LOAD(0x8EE34DB4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030934u); #endif /* 0xBFC0AE38: 8E423D20 lw $v0, 15648($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15648; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15648)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030938u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E423D20u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030938u); #endif /* 0xBFC0AE3C: 8CA54DBC lw $a1, 19900($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 19900; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (19900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003093Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA54DBCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x8003093Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1010u); #endif /* 0xBFC0AE40: 01842021 addu $a0, $t4, $a0 */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[12] + cpu->gpr[4]; PGXP_ALU(0x01842021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0AE44: 00A82821 addu $a1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[8]; PGXP_ALU(0x00A82821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0AE48: 01021021 addu $v0, $t0, $v0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[8] + cpu->gpr[2]; PGXP_ALU(0x01021021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0AE4C: 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(0x8003094Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0AE50: ACC53D24 sw $a1, 15652($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 15652; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (15652)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030950u); return; } g_debug_last_store_pc = 0x80030950u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xACC53D24u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC0AE54: ACE44DB8 sw $a0, 19896($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030954u); return; } g_debug_last_store_pc = 0x80030954u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACE44DB8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800008u); #endif /* 0xBFC0AE58: AEE34DB4 sw $v1, 19892($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030958u); return; } g_debug_last_store_pc = 0x80030958u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAEE34DB4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0AE5C: AE423D20 sw $v0, 15648($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15648; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15648)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003095Cu); return; } g_debug_last_store_pc = 0x8003095Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE423D20u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003095Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0AE60: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AE64: 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(0x80030964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0AE68: 3C080100 lui $t0, 0x100 */ cpu->gpr[8] = 0x01000000u; PGXP_ALU(0x3C080100u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030968u); #endif 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, 0x8003096Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x320u); #endif /* 0xBFC0AE6C: 00A8482A slt $t1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); } #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, 0x201u); #endif /* 0xBFC0AE70: 1120002F beq $t1, $zero, 0xBFC0AF30 */ uint32_t psx_brA_BFC0AE70 = cpu->gpr[9]; uint32_t psx_brB_BFC0AE70 = cpu->gpr[0]; psx_taken_BFC0AE70 = (psx_brA_BFC0AE70 == psx_brB_BFC0AE70); psx_delay_BFC0AE70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AE74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030974u); #endif if (psx_delay_BFC0AE70) { psx_delay_BFC0AE70 = 0; if (psx_taken_BFC0AE70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A30u); goto label_BFC0AF30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030978u); } label_BFC0AE78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AE78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AE78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AE78: 10C00003 beq $a2, $zero, 0xBFC0AE88 */ uint32_t psx_brA_BFC0AE78 = cpu->gpr[6]; uint32_t psx_brB_BFC0AE78 = cpu->gpr[0]; psx_taken_BFC0AE78 = (psx_brA_BFC0AE78 == psx_brB_BFC0AE78); psx_delay_BFC0AE78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AE7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003097Cu); #endif if (psx_delay_BFC0AE78) { psx_delay_BFC0AE78 = 0; if (psx_taken_BFC0AE78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030988u); goto label_BFC0AE88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030980u); } label_BFC0AE80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AE80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AE80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0AE80: ACE54DB8 sw $a1, 19896($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19896)); 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[5]); } PGXP_STORE(0xACE54DB8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0AE84: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030984u); #endif label_BFC0AE88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AE88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AE88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC0AE88: 00602825 or $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(0x00602825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AE8C: 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(0x8003098Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0AE90: 3C080100 lui $t0, 0x100 */ cpu->gpr[8] = 0x01000000u; PGXP_ALU(0x3C080100u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030990u); #endif label_BFC0AE94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AE94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AE94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x320u); #endif /* 0xBFC0AE94: 00A8482A slt $t1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0AE98: 11200028 beq $t1, $zero, 0xBFC0AF3C */ uint32_t psx_brA_BFC0AE98 = cpu->gpr[9]; uint32_t psx_brB_BFC0AE98 = cpu->gpr[0]; psx_taken_BFC0AE98 = (psx_brA_BFC0AE98 == psx_brB_BFC0AE98); psx_delay_BFC0AE98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AE9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003099Cu); #endif if (psx_delay_BFC0AE98) { psx_delay_BFC0AE98 = 0; if (psx_taken_BFC0AE98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A3Cu); goto label_BFC0AF3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309A0u); } 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, 0x800309A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AEA0: 10C00003 beq $a2, $zero, 0xBFC0AEB0 */ uint32_t psx_brA_BFC0AEA0 = cpu->gpr[6]; uint32_t psx_brB_BFC0AEA0 = cpu->gpr[0]; psx_taken_BFC0AEA0 = (psx_brA_BFC0AEA0 == psx_brB_BFC0AEA0); psx_delay_BFC0AEA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AEA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800309A4u); #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, 0x800309B0u); goto label_BFC0AEB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309A8u); } 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, 0x800309A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800020u); #endif /* 0xBFC0AEA8: AEE54DB4 sw $a1, 19892($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309A8u); return; } g_debug_last_store_pc = 0x800309A8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAEE54DB4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800309A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x29u); #endif /* 0xBFC0AEAC: 00A01825 or $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(0x00A01825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800309ACu); #endif label_BFC0AEB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC0AEB0: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800309B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AEB4: 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(0x800309B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0AEB8: 3C080100 lui $t0, 0x100 */ cpu->gpr[8] = 0x01000000u; PGXP_ALU(0x3C080100u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800309B8u); #endif label_BFC0AEBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x320u); #endif /* 0xBFC0AEBC: 00A8482A slt $t1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[5] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x00A8482Au, cpu->gpr[9], _pgx1, _pgx2); } #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, 0x201u); #endif /* 0xBFC0AEC0: 11200021 beq $t1, $zero, 0xBFC0AF48 */ uint32_t psx_brA_BFC0AEC0 = cpu->gpr[9]; uint32_t psx_brB_BFC0AEC0 = cpu->gpr[0]; psx_taken_BFC0AEC0 = (psx_brA_BFC0AEC0 == psx_brB_BFC0AEC0); psx_delay_BFC0AEC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AEC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800309C4u); #endif if (psx_delay_BFC0AEC0) { psx_delay_BFC0AEC0 = 0; if (psx_taken_BFC0AEC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A48u); goto label_BFC0AF48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309C8u); } label_BFC0AEC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AEC8: 10C00003 beq $a2, $zero, 0xBFC0AED8 */ uint32_t psx_brA_BFC0AEC8 = cpu->gpr[6]; uint32_t psx_brB_BFC0AEC8 = cpu->gpr[0]; psx_taken_BFC0AEC8 = (psx_brA_BFC0AEC8 == psx_brB_BFC0AEC8); psx_delay_BFC0AEC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AECC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800309CCu); #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, 0x800309D8u); goto label_BFC0AED8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309D0u); } 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, 0x800309D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40020u); #endif /* 0xBFC0AED0: AE453D20 sw $a1, 15648($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15648; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15648)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309D0u); return; } g_debug_last_store_pc = 0x800309D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE453D20u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800309D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC0AED4: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800309D4u); #endif label_BFC0AED8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AED8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0AED8: 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(0x800309D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0AEDC: 3C060100 lui $a2, 0x100 */ cpu->gpr[6] = 0x01000000u; PGXP_ALU(0x3C060100u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800309DCu); #endif label_BFC0AEE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AEE0: 0480001C bltz $a0, 0xBFC0AF54 */ uint32_t psx_brA_BFC0AEE0 = cpu->gpr[4]; psx_taken_BFC0AEE0 = ((int32_t)psx_brA_BFC0AEE0 < 0); psx_delay_BFC0AEE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AEE4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800309E4u); #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, 0x80030A54u); goto label_BFC0AF54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309E8u); } 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, 0x800309E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0AEE8: 10A00002 beq $a1, $zero, 0xBFC0AEF4 */ uint32_t psx_brA_BFC0AEE8 = cpu->gpr[5]; uint32_t psx_brB_BFC0AEE8 = cpu->gpr[0]; psx_taken_BFC0AEE8 = (psx_brA_BFC0AEE8 == psx_brB_BFC0AEE8); psx_delay_BFC0AEE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AEEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800309ECu); #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, 0x800309F4u); goto label_BFC0AEF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309F0u); } 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, 0x800309F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC0AEF0: ACE44DB8 sw $a0, 19896($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19896; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800309F0u); return; } g_debug_last_store_pc = 0x800309F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACE44DB8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800309F0u); #endif label_BFC0AEF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AEF4: 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(0x800309F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AEF8: 3C050100 lui $a1, 0x100 */ cpu->gpr[5] = 0x01000000u; PGXP_ALU(0x3C050100u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800309F8u); #endif label_BFC0AEFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AEFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AEFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800309FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0AEFC: 04600018 bltz $v1, 0xBFC0AF60 */ uint32_t psx_brA_BFC0AEFC = cpu->gpr[3]; psx_taken_BFC0AEFC = ((int32_t)psx_brA_BFC0AEFC < 0); psx_delay_BFC0AEFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030A00u); #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, 0x80030A60u); goto label_BFC0AF60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A04u); } 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, 0x80030A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AF04: 10800002 beq $a0, $zero, 0xBFC0AF10 */ uint32_t psx_brA_BFC0AF04 = cpu->gpr[4]; uint32_t psx_brB_BFC0AF04 = cpu->gpr[0]; psx_taken_BFC0AF04 = (psx_brA_BFC0AF04 == psx_brB_BFC0AF04); psx_delay_BFC0AF04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030A08u); #endif if (psx_delay_BFC0AF04) { psx_delay_BFC0AF04 = 0; if (psx_taken_BFC0AF04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A10u); goto label_BFC0AF10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A0Cu); } label_BFC0AF0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800008u); #endif /* 0xBFC0AF0C: AEE34DB4 sw $v1, 19892($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 19892; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (19892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A0Cu); return; } g_debug_last_store_pc = 0x80030A0Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAEE34DB4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030A0Cu); #endif label_BFC0AF10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0AF10: 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(0x80030A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AF14: 3C040100 lui $a0, 0x100 */ cpu->gpr[4] = 0x01000000u; PGXP_ALU(0x3C040100u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030A14u); #endif label_BFC0AF18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0AF18: 04400014 bltz $v0, 0xBFC0AF6C */ uint32_t psx_brA_BFC0AF18 = cpu->gpr[2]; psx_taken_BFC0AF18 = ((int32_t)psx_brA_BFC0AF18 < 0); psx_delay_BFC0AF18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030A1Cu); #endif if (psx_delay_BFC0AF18) { psx_delay_BFC0AF18 = 0; if (psx_taken_BFC0AF18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A6Cu); goto label_BFC0AF6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A20u); } label_BFC0AF20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0AF20: 1060FE5A beq $v1, $zero, 0xBFC0A88C */ uint32_t psx_brA_BFC0AF20 = cpu->gpr[3]; uint32_t psx_brB_BFC0AF20 = cpu->gpr[0]; psx_taken_BFC0AF20 = (psx_brA_BFC0AF20 == psx_brB_BFC0AF20); psx_delay_BFC0AF20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030A24u); #endif if (psx_delay_BFC0AF20) { psx_delay_BFC0AF20 = 0; if (psx_taken_BFC0AF20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003038Cu); goto label_BFC0A88C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A28u); } 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, 0x80030A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF28: 1000FE58 beq $zero, $zero, 0xBFC0A88C */ uint32_t psx_brA_BFC0AF28 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF28 = cpu->gpr[0]; psx_taken_BFC0AF28 = (psx_brA_BFC0AF28 == psx_brB_BFC0AF28); psx_delay_BFC0AF28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0AF2C: AE423D20 sw $v0, 15648($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15648; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15648)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030A2Cu); return; } g_debug_last_store_pc = 0x80030A2Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE423D20u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030A2Cu); #endif if (psx_delay_BFC0AF28) { psx_delay_BFC0AF28 = 0; if (psx_taken_BFC0AF28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003038Cu); goto label_BFC0A88C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A30u); } label_BFC0AF30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0AF30: 00A82823 subu $a1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[8]; PGXP_ALU(0x00A82823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF34: 1000FFCD beq $zero, $zero, 0xBFC0AE6C */ uint32_t psx_brA_BFC0AF34 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF34 = cpu->gpr[0]; psx_taken_BFC0AF34 = (psx_brA_BFC0AF34 == psx_brB_BFC0AF34); psx_delay_BFC0AF34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AF38: 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(0x80030A38u); #endif if (psx_delay_BFC0AF34) { psx_delay_BFC0AF34 = 0; if (psx_taken_BFC0AF34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003096Cu); goto label_BFC0AE6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A3Cu); } label_BFC0AF3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0AF3C: 00A82823 subu $a1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[8]; PGXP_ALU(0x00A82823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF40: 1000FFD4 beq $zero, $zero, 0xBFC0AE94 */ uint32_t psx_brA_BFC0AF40 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF40 = cpu->gpr[0]; psx_taken_BFC0AF40 = (psx_brA_BFC0AF40 == psx_brB_BFC0AF40); psx_delay_BFC0AF40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AF44: 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(0x80030A44u); #endif if (psx_delay_BFC0AF40) { psx_delay_BFC0AF40 = 0; if (psx_taken_BFC0AF40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030994u); goto label_BFC0AE94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A48u); } label_BFC0AF48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0AF48: 00A82823 subu $a1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[5] - cpu->gpr[8]; PGXP_ALU(0x00A82823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF4C: 1000FFDB beq $zero, $zero, 0xBFC0AEBC */ uint32_t psx_brA_BFC0AF4C = cpu->gpr[0]; uint32_t psx_brB_BFC0AF4C = cpu->gpr[0]; psx_taken_BFC0AF4C = (psx_brA_BFC0AF4C == psx_brB_BFC0AF4C); psx_delay_BFC0AF4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0AF50: 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(0x80030A50u); #endif if (psx_delay_BFC0AF4C) { psx_delay_BFC0AF4C = 0; if (psx_taken_BFC0AF4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800309BCu); goto label_BFC0AEBC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A54u); } label_BFC0AF54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0AF54: 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(0x80030A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF58: 1000FFE1 beq $zero, $zero, 0xBFC0AEE0 */ uint32_t psx_brA_BFC0AF58 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF58 = cpu->gpr[0]; psx_taken_BFC0AF58 = (psx_brA_BFC0AF58 == psx_brB_BFC0AF58); psx_delay_BFC0AF58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0AF5C: 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(0x80030A5Cu); #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, 0x800309E0u); goto label_BFC0AEE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A60u); } 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, 0x80030A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0AF60: 00651821 addu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00651821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF64: 1000FFE5 beq $zero, $zero, 0xBFC0AEFC */ 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_cyc_step(cpu, 0x11u); #endif /* 0xBFC0AF68: 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(0x80030A68u); #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, 0x800309FCu); goto label_BFC0AEFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A6Cu); } 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, 0x80030A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AF6C: 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(0x80030A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF70: 1000FFE9 beq $zero, $zero, 0xBFC0AF18 */ uint32_t psx_brA_BFC0AF70 = cpu->gpr[0]; uint32_t psx_brB_BFC0AF70 = cpu->gpr[0]; psx_taken_BFC0AF70 = (psx_brA_BFC0AF70 == psx_brB_BFC0AF70); psx_delay_BFC0AF70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0AF74: 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(0x80030A74u); #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, 0x80030A18u); goto label_BFC0AF18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030A78u); } 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, 0x80030A78u); #endif /* 0xBFC0AF78: 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, 0x80030A78u); 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(0x80030A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AF7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0AF80: 00452823 subu $a1, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[2] - cpu->gpr[5]; PGXP_ALU(0x00452823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AF84: 3C040C00 lui $a0, 0xC00 */ cpu->gpr[4] = 0x0C000000u; PGXP_ALU(0x3C040C00u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AF88: 0C00C988 jal 0xB0032620 */ cpu->gpr[31] = 0x80030A90u; /* jal link before delay slot */ psx_delay_BFC0AF88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC0AF8C: AFA300A4 sw $v1, 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, 0x80030A8Cu); return; } g_debug_last_store_pc = 0x80030A8Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA300A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030A8Cu); #endif if (psx_delay_BFC0AF88) { psx_delay_BFC0AF88 = 0; cpu->gpr[31] = 0x80030A90u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032620u); cpu->pc = 0x80032620u; return; } label_BFC0AF90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AF90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AF90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030A90u); #endif /* 0xBFC0AF90: 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, 0x80030A90u); 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(0x80030A90u); #endif /* 0xBFC0AF94: 8FA300A4 lw $v1, 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, 0x80030A94u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA300A4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AF98: 00440018 mult $v0, $a0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[4]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00440018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80030A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0AF9C: 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(0x80030A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0AFA0: 00062602 srl $a0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00062602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0AFA4: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80030AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0AFA8: 00072A00 sll $a1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[5] = cpu->gpr[7] << 8u; PGXP_ALU(0x00072A00u, cpu->gpr[5], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0AFAC: 00A42021 addu $a0, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[4]; PGXP_ALU(0x00A42021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x18u); #endif /* 0xBFC0AFB0: 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, 0x80030AB0u); return; } g_debug_last_store_pc = 0x80030AB0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030AB0u); #endif /* 0xBFC0AFB4: 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, 0x80030AB4u); 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(0x80030AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0AFB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AFBC: 00440018 mult $v0, $a0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[4]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00440018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80030ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AFC0: 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(0x80030AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0AFC4: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0AFC8: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80030AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0AFCC: 00051200 sll $v0, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051200u, cpu->gpr[2], _pgx1, 8u); } #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 /* 0xBFC0AFD0: 1000FE44 beq $zero, $zero, 0xBFC0A8E4 */ uint32_t psx_brA_BFC0AFD0 = cpu->gpr[0]; uint32_t psx_brB_BFC0AFD0 = cpu->gpr[0]; psx_taken_BFC0AFD0 = (psx_brA_BFC0AFD0 == psx_brB_BFC0AFD0); psx_delay_BFC0AFD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0AFD4: 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(0x80030AD4u); #endif if (psx_delay_BFC0AFD0) { psx_delay_BFC0AFD0 = 0; if (psx_taken_BFC0AFD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800303E4u); goto label_BFC0A8E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030AD8u); } label_BFC0AFD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AFD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AFD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC0AFD8: 3C1E8004 lui $fp, 0x8004 */ cpu->gpr[30] = 0x80040000u; PGXP_ALU(0x3C1E8004u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC0AFDC: 27DE3624 addiu $fp, $fp, 13860 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (13860)); PGXP_ALU(0x27DE3624u, cpu->gpr[30], _pgx1, 0x00003624u); } #ifdef PSX_COSIM cosim_instr(0x80030ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20009u); #endif /* 0xBFC0AFE0: 02201825 or $v1, $s1, $zero */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[17] | cpu->gpr[0]; PGXP_ALU(0x02201825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000040u); #endif /* 0xBFC0AFE4: 27C60048 addiu $a2, $fp, 72 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[30] + (72)); PGXP_ALU(0x27C60048u, cpu->gpr[6], _pgx1, 0x00000048u); } #ifdef PSX_COSIM cosim_instr(0x80030AE4u); #endif 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, 0x80030AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000021u); #endif /* 0xBFC0AFE8: 03C02825 or $a1, $fp, $zero */ { uint32_t _pgx1 = cpu->gpr[30]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[30] | cpu->gpr[0]; PGXP_ALU(0x03C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC0AFEC: 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(0x80030AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC0AFF0: AFA30090 sw $v1, 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, 0x80030AF0u); return; } g_debug_last_store_pc = 0x80030AF0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30090u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0AFF4: 0C00C96C jal 0xB00325B0 */ cpu->gpr[31] = 0x80030AFCu; /* jal link before delay slot */ psx_delay_BFC0AFF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC0AFF8: AFA60088 sw $a2, 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, 0x80030AF8u); return; } g_debug_last_store_pc = 0x80030AF8u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60088u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030AF8u); #endif if (psx_delay_BFC0AFF4) { psx_delay_BFC0AFF4 = 0; cpu->gpr[31] = 0x80030AFCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800325B0u); cpu->pc = 0x800325B0u; return; } label_BFC0AFFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0AFFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0AFFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030AFCu); #endif /* 0xBFC0AFFC: 8FA30090 lw $v1, 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, 0x80030AFCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000000u); } PGXP_LOAD(0x8FA30090u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B00u); #endif /* 0xBFC0B000: 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, 0x80030B00u); 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(0x80030B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC0B004: 27DE000C addiu $fp, $fp, 12 */ { uint32_t _pgx1 = cpu->gpr[30]; cpu->gpr[30] = (uint32_t)((int32_t)cpu->gpr[30] + (12)); PGXP_ALU(0x27DE000Cu, cpu->gpr[30], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0x80030B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B008: 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, 0x80030B08u); return; } g_debug_last_store_pc = 0x80030B08u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000040u); #endif /* 0xBFC0B00C: 14DEFFF6 bne $a2, $fp, 0xBFC0AFE8 */ uint32_t psx_brA_BFC0B00C = cpu->gpr[6]; uint32_t psx_brB_BFC0B00C = cpu->gpr[30]; psx_taken_BFC0B00C = (psx_brA_BFC0B00C != psx_brB_BFC0B00C); psx_delay_BFC0B00C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B010: 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(0x80030B10u); #endif if (psx_delay_BFC0B00C) { psx_delay_BFC0B00C = 0; if (psx_taken_BFC0B00C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030AE8u); goto label_BFC0AFE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B14u); } label_BFC0B014: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B014u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B014: 1000FE47 beq $zero, $zero, 0xBFC0A934 */ uint32_t psx_brA_BFC0B014 = cpu->gpr[0]; uint32_t psx_brB_BFC0B014 = cpu->gpr[0]; psx_taken_BFC0B014 = (psx_brA_BFC0B014 == psx_brB_BFC0B014); psx_delay_BFC0B014 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B018: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030B18u); #endif if (psx_delay_BFC0B014) { psx_delay_BFC0B014 = 0; if (psx_taken_BFC0B014) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030434u); goto label_BFC0A934; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B1Cu); } label_BFC0B01C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B01Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B01Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0B01C: 17C0FE5C bne $fp, $zero, 0xBFC0A990 */ uint32_t psx_brA_BFC0B01C = cpu->gpr[30]; uint32_t psx_brB_BFC0B01C = cpu->gpr[0]; psx_taken_BFC0B01C = (psx_brA_BFC0B01C != psx_brB_BFC0B01C); psx_delay_BFC0B01C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B020: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030B20u); #endif if (psx_delay_BFC0B01C) { psx_delay_BFC0B01C = 0; if (psx_taken_BFC0B01C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030490u); goto label_BFC0A990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B24u); } 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, 0x80030B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B024: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030B24u); #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, 0x80030B28u); #endif /* 0xBFC0B028: 8C434DA8 lw $v1, 19880($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B28u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C434DA8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B02C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B030: 1060FE57 beq $v1, $zero, 0xBFC0A990 */ uint32_t psx_brA_BFC0B030 = cpu->gpr[3]; uint32_t psx_brB_BFC0B030 = cpu->gpr[0]; psx_taken_BFC0B030 = (psx_brA_BFC0B030 == psx_brB_BFC0B030); psx_delay_BFC0B030 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B034: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030B34u); #endif if (psx_delay_BFC0B030) { psx_delay_BFC0B030 = 0; if (psx_taken_BFC0B030) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030490u); goto label_BFC0A990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B38u); } label_BFC0B038: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B038u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B038: 0C00CA3B jal 0xB00328EC */ cpu->gpr[31] = 0x80030B40u; /* jal link before delay slot */ psx_delay_BFC0B038 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B03C: AC404DA8 sw $zero, 19880($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19880; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B3Cu); return; } g_debug_last_store_pc = 0x80030B3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404DA8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030B3Cu); #endif if (psx_delay_BFC0B038) { psx_delay_BFC0B038 = 0; cpu->gpr[31] = 0x80030B40u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328ECu); cpu->pc = 0x800328ECu; return; } 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, 0x80030B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B040: 0C00C704 jal 0xB0031C10 */ cpu->gpr[31] = 0x80030B48u; /* jal link before delay slot */ psx_delay_BFC0B040 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B044: 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(0x80030B44u); #endif if (psx_delay_BFC0B040) { psx_delay_BFC0B040 = 0; cpu->gpr[31] = 0x80030B48u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C10u); cpu->pc = 0x80031C10u; return; } label_BFC0B048: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B048u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B048: 1000FE51 beq $zero, $zero, 0xBFC0A990 */ uint32_t psx_brA_BFC0B048 = cpu->gpr[0]; uint32_t psx_brB_BFC0B048 = cpu->gpr[0]; psx_taken_BFC0B048 = (psx_brA_BFC0B048 == psx_brB_BFC0B048); psx_delay_BFC0B048 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B04C: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030B4Cu); #endif if (psx_delay_BFC0B048) { psx_delay_BFC0B048 = 0; if (psx_taken_BFC0B048) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030490u); goto label_BFC0A990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B50u); } 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, 0x80030B50u); #endif /* 0xBFC0B050: 8E420044 lw $v0, 68($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E420044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030B50u); #endif /* 0xBFC0B054: 8E460040 lw $a2, 64($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030B54u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40000u); } PGXP_LOAD(0x8E460040u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B058: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80030B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0B05C: 26520008 addiu $s2, $s2, 8 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (8)); PGXP_ALU(0x26520008u, cpu->gpr[18], _pgx1, 0x00000008u); } #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, 0x100u); #endif /* 0xBFC0B060: 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(0x80030B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0B064: 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(0x80030B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4004u); #endif /* 0xBFC0B068: 000E1602 srl $v0, $t6, 24 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[2] = cpu->gpr[14] >> 24u; PGXP_ALU(0x000E1602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000u); #endif /* 0xBFC0B06C: 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(0x80030B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8008u); #endif /* 0xBFC0B070: 000F1A00 sll $v1, $t7, 8 */ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[3] = cpu->gpr[15] << 8u; PGXP_ALU(0x000F1A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B074: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0B078: 00A60018 mult $a1, $a2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[6]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A60018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[6]); #ifdef PSX_COSIM cosim_instr(0x80030B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B07C: AC820004 sw $v0, 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, 0x80030B7Cu); return; } g_debug_last_store_pc = 0x80030B7Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B080: 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(0x80030B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B084: 00063602 srl $a2, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00063602u, cpu->gpr[6], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80030B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0B088: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80030B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0B08C: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80030B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0B090: 00663021 addu $a2, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00663021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B094: 0C00C6F7 jal 0xB0031BDC */ cpu->gpr[31] = 0x80030B9Cu; /* jal link before delay slot */ psx_delay_BFC0B094 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0B098: AC860000 sw $a2, 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, 0x80030B98u); return; } g_debug_last_store_pc = 0x80030B98u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030B98u); #endif if (psx_delay_BFC0B094) { psx_delay_BFC0B094 = 0; cpu->gpr[31] = 0x80030B9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BDCu); cpu->pc = 0x80031BDCu; return; } label_BFC0B09C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B09Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B09Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B09C: 1000FE88 beq $zero, $zero, 0xBFC0AAC0 */ 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, 0x80030BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B0A0: 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(0x80030BA0u); #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, 0x800305C0u); goto label_BFC0AAC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BA4u); } 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, 0x80030BA4u); #endif /* 0xBFC0B0A4: 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, 0x80030BA4u); 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(0x80030BA4u); #endif /* 0xBFC0B0A8: 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, 0x80030BA8u); 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(0x80030BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0B0AC: 00082880 sll $a1, $t0, 2 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[8] << 2u; PGXP_ALU(0x00082880u, cpu->gpr[5], _pgx1, 2u); } #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, 0x240u); #endif /* 0xBFC0B0B0: 00093080 sll $a2, $t1, 2 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[6] = cpu->gpr[9] << 2u; PGXP_ALU(0x00093080u, cpu->gpr[6], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80030BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020u); #endif /* 0xBFC0B0B4: 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(0x80030BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040u); #endif /* 0xBFC0B0B8: 00D13021 addu $a2, $a2, $s1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[17]; PGXP_ALU(0x00D13021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030BB8u); #endif /* 0xBFC0B0BC: 8CA50000 lw $a1, 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, 0x80030BBCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BC0u); #endif /* 0xBFC0B0C0: 8CC60000 lw $a2, 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, 0x80030BC0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } PGXP_LOAD(0x8CC60000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80030BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B0C4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0B0C8: 00C5282A slt $a1, $a2, $a1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[6] < (int32_t)cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x00C5282Au, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B0CC: 10A00003 beq $a1, $zero, 0xBFC0B0DC */ uint32_t psx_brA_BFC0B0CC = cpu->gpr[5]; uint32_t psx_brB_BFC0B0CC = cpu->gpr[0]; psx_taken_BFC0B0CC = (psx_brA_BFC0B0CC == psx_brB_BFC0B0CC); psx_delay_BFC0B0CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B0D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030BD0u); #endif if (psx_delay_BFC0B0CC) { psx_delay_BFC0B0CC = 0; if (psx_taken_BFC0B0CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BDCu); goto label_BFC0B0DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BD4u); } label_BFC0B0D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B0D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B0D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0B0D4: 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, 0x80030BD4u); return; } g_debug_last_store_pc = 0x80030BD4u; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAC490000u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x80030BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0B0D8: AC480004 sw $t0, 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, 0x80030BD8u); return; } g_debug_last_store_pc = 0x80030BD8u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC480004u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80030BD8u); #endif label_BFC0B0DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B0DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B0DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B0DC: 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(0x80030BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B0E0: 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(0x80030BE0u); #endif label_BFC0B0E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B0E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B0E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x430u); #endif /* 0xBFC0B0E4: 008A282A slt $a1, $a0, $t2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (int32_t)cpu->gpr[10] ? 1 : 0); PGXP_ALU(0x008A282Au, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B0E8: 14A0FFEE bne $a1, $zero, 0xBFC0B0A4 */ uint32_t psx_brA_BFC0B0E8 = cpu->gpr[5]; uint32_t psx_brB_BFC0B0E8 = cpu->gpr[0]; psx_taken_BFC0B0E8 = (psx_brA_BFC0B0E8 != psx_brB_BFC0B0E8); psx_delay_BFC0B0E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B0EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030BECu); #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, 0x80030BA4u); goto label_BFC0B0A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BF0u); } 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, 0x80030BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B0F0: 1000FE90 beq $zero, $zero, 0xBFC0AB34 */ uint32_t psx_brA_BFC0B0F0 = cpu->gpr[0]; uint32_t psx_brB_BFC0B0F0 = cpu->gpr[0]; psx_taken_BFC0B0F0 = (psx_brA_BFC0B0F0 == psx_brB_BFC0B0F0); psx_delay_BFC0B0F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B0F4: 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(0x80030BF4u); #endif if (psx_delay_BFC0B0F0) { psx_delay_BFC0B0F0 = 0; if (psx_taken_BFC0B0F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030634u); goto label_BFC0AB34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BF8u); } label_BFC0B0F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B0F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B0F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10005u); #endif /* 0xBFC0B0F8: 02001025 or $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(0x02001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B0FC: 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(0x80030BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B100: 1000FFF8 beq $zero, $zero, 0xBFC0B0E4 */ uint32_t psx_brA_BFC0B100 = cpu->gpr[0]; uint32_t psx_brB_BFC0B100 = cpu->gpr[0]; psx_taken_BFC0B100 = (psx_brA_BFC0B100 == psx_brB_BFC0B100); psx_delay_BFC0B100 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x488u); #endif /* 0xBFC0B104: 00E35023 subu $t2, $a3, $v1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[10] = cpu->gpr[7] - cpu->gpr[3]; PGXP_ALU(0x00E35023u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030C04u); #endif if (psx_delay_BFC0B100) { psx_delay_BFC0B100 = 0; if (psx_taken_BFC0B100) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030BE4u); goto label_BFC0B0E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C08u); } label_BFC0B108: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B108u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B108: 1040FE21 beq $v0, $zero, 0xBFC0A990 */ uint32_t psx_brA_BFC0B108 = cpu->gpr[2]; 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_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B10C: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C0Cu); #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, 0x80030490u); goto label_BFC0A990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C10u); } 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, 0x80030C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B110: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C10u); #endif /* 0xBFC0B114: 8C434DA4 lw $v1, 19876($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19876; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C14u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C434DA4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B118: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B11C: 1460FFBF bne $v1, $zero, 0xBFC0B01C */ uint32_t psx_brA_BFC0B11C = cpu->gpr[3]; uint32_t psx_brB_BFC0B11C = cpu->gpr[0]; psx_taken_BFC0B11C = (psx_brA_BFC0B11C != psx_brB_BFC0B11C); psx_delay_BFC0B11C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B120: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030C20u); #endif if (psx_delay_BFC0B11C) { psx_delay_BFC0B11C = 0; if (psx_taken_BFC0B11C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B1Cu); goto label_BFC0B01C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C24u); } label_BFC0B124: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B124u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC0B124: 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(0x80030C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B128: 0C00C366 jal 0xB0030D98 */ cpu->gpr[31] = 0x80030C30u; /* jal link before delay slot */ psx_delay_BFC0B128 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC0B12C: AC5E4DA4 sw $fp, 19876($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19876; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C2Cu); return; } g_debug_last_store_pc = 0x80030C2Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC5E4DA4u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x80030C2Cu); #endif if (psx_delay_BFC0B128) { psx_delay_BFC0B128 = 0; cpu->gpr[31] = 0x80030C30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D98u); cpu->pc = 0x80030D98u; return; } label_BFC0B130: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B130u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B130: 1440FE17 bne $v0, $zero, 0xBFC0A990 */ uint32_t psx_brA_BFC0B130 = cpu->gpr[2]; uint32_t psx_brB_BFC0B130 = cpu->gpr[0]; psx_taken_BFC0B130 = (psx_brA_BFC0B130 != psx_brB_BFC0B130); psx_delay_BFC0B130 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B134: 3C058003 lui $a1, 0x8003 */ cpu->gpr[5] = 0x80030000u; PGXP_ALU(0x3C058003u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C34u); #endif if (psx_delay_BFC0B130) { psx_delay_BFC0B130 = 0; if (psx_taken_BFC0B130) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030490u); goto label_BFC0A990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C38u); } label_BFC0B138: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B138u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B138: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B13C: 0C00CED4 jal 0xB0033B50 */ cpu->gpr[31] = 0x80030C44u; /* jal link before delay slot */ psx_delay_BFC0B13C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B140: 24843588 addiu $a0, $a0, 13704 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (13704)); PGXP_ALU(0x24843588u, cpu->gpr[4], _pgx1, 0x00003588u); } #ifdef PSX_COSIM cosim_instr(0x80030C40u); #endif if (psx_delay_BFC0B13C) { psx_delay_BFC0B13C = 0; cpu->gpr[31] = 0x80030C44u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B50u); cpu->pc = 0x80033B50u; return; } label_BFC0B144: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B144u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C44u); #endif /* 0xBFC0B144: 8FA20094 lw $v0, 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, 0x80030C44u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20094u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B148: 1000FE10 beq $zero, $zero, 0xBFC0A98C */ uint32_t psx_brA_BFC0B148 = cpu->gpr[0]; uint32_t psx_brB_BFC0B148 = cpu->gpr[0]; psx_taken_BFC0B148 = (psx_brA_BFC0B148 == psx_brB_BFC0B148); psx_delay_BFC0B148 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC0B14C: AC5E4DB0 sw $fp, 19888($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19888; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C4Cu); return; } g_debug_last_store_pc = 0x80030C4Cu; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAC5E4DB0u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x80030C4Cu); #endif if (psx_delay_BFC0B148) { psx_delay_BFC0B148 = 0; if (psx_taken_BFC0B148) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003048Cu); goto label_BFC0A98C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C50u); } label_BFC0B150: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B150u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B150: 1440FFEF bne $v0, $zero, 0xBFC0B110 */ uint32_t psx_brA_BFC0B150 = cpu->gpr[2]; 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_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B154: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C54u); #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, 0x80030C10u); goto label_BFC0B110; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C58u); } 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, 0x80030C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B158: 1000FFB3 beq $zero, $zero, 0xBFC0B028 */ uint32_t psx_brA_BFC0B158 = cpu->gpr[0]; uint32_t psx_brB_BFC0B158 = cpu->gpr[0]; psx_taken_BFC0B158 = (psx_brA_BFC0B158 == psx_brB_BFC0B158); psx_delay_BFC0B158 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B15C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030C5Cu); #endif if (psx_delay_BFC0B158) { psx_delay_BFC0B158 = 0; if (psx_taken_BFC0B158) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030B28u); goto label_BFC0B028; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C60u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C60u); cpu->pc = 0x80030C60u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B160(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B160u); int psx_delay_BFC0B16C = 0; int psx_taken_BFC0B16C = 0; int psx_delay_BFC0B174 = 0; int psx_delay_BFC0B17C = 0; int psx_taken_BFC0B17C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B16Cu: goto label_BFC0B16C; case 0xBFC0B174u: goto label_BFC0B174; case 0xBFC0B17Cu: goto label_BFC0B17C; default: break; } } 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, 0x80030C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0B160: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0B164: 00863021 addu $a2, $a0, $a2 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[6]; PGXP_ALU(0x00863021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0B168: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030C68u); #endif label_BFC0B16C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B16Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B16Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0B16C: 14660003 bne $v1, $a2, 0xBFC0B17C */ uint32_t psx_brA_BFC0B16C = cpu->gpr[3]; uint32_t psx_brB_BFC0B16C = cpu->gpr[6]; psx_taken_BFC0B16C = (psx_brA_BFC0B16C != psx_brB_BFC0B16C); psx_delay_BFC0B16C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B170: 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(0x80030C70u); #endif if (psx_delay_BFC0B16C) { psx_delay_BFC0B16C = 0; if (psx_taken_BFC0B16C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C7Cu); goto label_BFC0B17C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C74u); } label_BFC0B174: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B174u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B174: 03E00008 jr $ra */ psx_delay_BFC0B174 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B178: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030C78u); #endif if (psx_delay_BFC0B174) { psx_delay_BFC0B174 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0B17C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B17Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B17Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B17C: 1000FFFB beq $zero, $zero, 0xBFC0B16C */ uint32_t psx_brA_BFC0B17C = cpu->gpr[0]; uint32_t psx_brB_BFC0B17C = cpu->gpr[0]; psx_taken_BFC0B17C = (psx_brA_BFC0B17C == psx_brB_BFC0B17C); psx_delay_BFC0B17C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0B180: A065FFFF sb $a1, -1($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030C80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (-1)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA065FFFFu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030C80u); #endif if (psx_delay_BFC0B17C) { psx_delay_BFC0B17C = 0; if (psx_taken_BFC0B17C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C6Cu); goto label_BFC0B16C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C84u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C84u); cpu->pc = 0x80030C84u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B184(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B184u); int psx_delay_BFC0B210 = 0; label_BFC0B184: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B184u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B184: 3C030002 lui $v1, 0x2 */ cpu->gpr[3] = 0x00020000u; PGXP_ALU(0x3C030002u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B188: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B18C: 24630943 addiu $v1, $v1, 2371 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (2371)); PGXP_ALU(0x24630943u, cpu->gpr[3], _pgx1, 0x00000943u); } #ifdef PSX_COSIM cosim_instr(0x80030C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B190: AC431018 sw $v1, 4120($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C90u); return; } g_debug_last_store_pc = 0x80030C90u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431018u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B194: 2403132C addiu $v1, $zero, 4908 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4908)); PGXP_ALU(0x2403132Cu, cpu->gpr[3], _pgx1, 0x0000132Cu); } #ifdef PSX_COSIM cosim_instr(0x80030C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B198: AC431020 sw $v1, 4128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030C98u); return; } g_debug_last_store_pc = 0x80030C98u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B19C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030C9Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030CA0u); #endif /* 0xBFC0B1A0: 90431800 lbu $v1, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6144)), 3, 0x4u); PGXP_LOAD(0x90431800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B1A4: A0401803 sb $zero, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030CA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401803u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030CA4u); #endif /* 0xBFC0B1A8: 90431803 lbu $v1, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6147)), 3, 0x4u); PGXP_LOAD(0x90431803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B1AC: 2403FF80 addiu $v1, $zero, -128 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-128)); PGXP_ALU(0x2403FF80u, cpu->gpr[3], _pgx1, 0xFFFFFF80u); } #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, 0x5u); #endif /* 0xBFC0B1B0: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030CB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B1B4: A0431803 sb $v1, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030CB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CB4u); #endif /* 0xBFC0B1B8: 8C4310F4 lw $v1, 4340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CB8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4310F4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B1BC: 3C0400FF lui $a0, 0xFF */ cpu->gpr[4] = 0x00FF0000u; PGXP_ALU(0x3C0400FFu, cpu->gpr[4], 0u, 0u); #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, 0x10u); #endif /* 0xBFC0B1C0: 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(0x80030CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B1C4: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B1C8: 3C040088 lui $a0, 0x88 */ cpu->gpr[4] = 0x00880000u; PGXP_ALU(0x3C040088u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B1CC: 00641825 or $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(0x00641825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B1D0: AC4310F4 sw $v1, 4340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CD0u); return; } g_debug_last_store_pc = 0x80030CD0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310F4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CD0u); #endif /* 0xBFC0B1D4: 8C4310F0 lw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CD4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B1D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1DC: 34638000 ori $v1, $v1, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x8000u; PGXP_ALU(0x34638000u, cpu->gpr[3], _pgx1, 0x8000u); } #ifdef PSX_COSIM cosim_instr(0x80030CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B1E0: AC4310F0 sw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CE0u); return; } g_debug_last_store_pc = 0x80030CE0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1E4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1E8: 24633D90 addiu $v1, $v1, 15760 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15760)); PGXP_ALU(0x24633D90u, cpu->gpr[3], _pgx1, 0x00003D90u); } #ifdef PSX_COSIM cosim_instr(0x80030CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B1EC: AC4310B0 sw $v1, 4272($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CECu); return; } g_debug_last_store_pc = 0x80030CECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310B0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1F0: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1F4: 24630200 addiu $v1, $v1, 512 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (512)); PGXP_ALU(0x24630200u, cpu->gpr[3], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0x80030CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B1F8: AC4310B4 sw $v1, 4276($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030CF8u); return; } g_debug_last_store_pc = 0x80030CF8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310B4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B1FC: 3C031100 lui $v1, 0x1100 */ cpu->gpr[3] = 0x11000000u; PGXP_ALU(0x3C031100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B200: AC4310B8 sw $v1, 4280($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D00u); return; } g_debug_last_store_pc = 0x80030D00u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4310B8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B204: 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(0x80030D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B208: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D08u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B20C: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D0Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B210: 03E00008 jr $ra */ psx_delay_BFC0B210 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B214: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030D14u); #endif if (psx_delay_BFC0B210) { psx_delay_BFC0B210 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B218(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B218u); int psx_delay_BFC0B248 = 0; 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, 0x80030D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B218: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B21C: 2403001F addiu $v1, $zero, 31 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); PGXP_ALU(0x2403001Fu, cpu->gpr[3], _pgx1, 0x0000001Fu); } #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 /* 0xBFC0B220: 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(0x80030D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B224: A0441800 sb $a0, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441800u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B228: A0431803 sb $v1, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B22C: A0441800 sb $a0, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441800u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80030D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B230: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B234: 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(0x80030D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B238: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B23C: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030D3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B240: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B244: 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(0x80030D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B248: 03E00008 jr $ra */ psx_delay_BFC0B248 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B24C: AC433D8C sw $v1, 15756($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D4Cu); return; } g_debug_last_store_pc = 0x80030D4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D4Cu); #endif if (psx_delay_BFC0B248) { psx_delay_BFC0B248 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B250(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B250u); int psx_delay_BFC0B25C = 0; int psx_taken_BFC0B25C = 0; int psx_delay_BFC0B278 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B264u: goto label_BFC0B264; case 0xBFC0B278u: goto label_BFC0B278; default: break; } } label_BFC0B250: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B250u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B250: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D50u); #endif /* 0xBFC0B254: 8C433D8C lw $v1, 15756($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D54u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C433D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B258: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B25C: 10600006 beq $v1, $zero, 0xBFC0B278 */ uint32_t psx_brA_BFC0B25C = cpu->gpr[3]; uint32_t psx_brB_BFC0B25C = cpu->gpr[0]; psx_taken_BFC0B25C = (psx_brA_BFC0B25C == psx_brB_BFC0B25C); psx_delay_BFC0B25C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B260: 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(0x80030D60u); #endif if (psx_delay_BFC0B25C) { psx_delay_BFC0B25C = 0; if (psx_taken_BFC0B25C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D78u); goto label_BFC0B278; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D64u); } label_BFC0B264: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B264u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B264: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D64u); #endif /* 0xBFC0B268: 8C424590 lw $v0, 17808($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 17808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (17808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D68u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424590u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B26C: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC0B270: 2C42000A sltiu $v0, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C42000Au, cpu->gpr[2], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0x80030D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B274: 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(0x80030D74u); #endif label_BFC0B278: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B278u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B278: 03E00008 jr $ra */ psx_delay_BFC0B278 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B27C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030D7Cu); #endif if (psx_delay_BFC0B278) { psx_delay_BFC0B278 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B280(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B280u); int psx_delay_BFC0B290 = 0; label_BFC0B280: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B280u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B280: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D80u); #endif /* 0xBFC0B284: 8C423D8C lw $v0, 15756($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B288: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B28C: 2442FFF2 addiu $v0, $v0, -14 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-14)); PGXP_ALU(0x2442FFF2u, cpu->gpr[2], _pgx1, 0xFFFFFFF2u); } #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, 0x80000001u); #endif /* 0xBFC0B290: 03E00008 jr $ra */ psx_delay_BFC0B290 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B294: 2C420002 sltiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0x80030D94u); #endif if (psx_delay_BFC0B290) { psx_delay_BFC0B290 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B298(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B298u); int psx_delay_BFC0B2A8 = 0; 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, 0x80030D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B298: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030D98u); #endif /* 0xBFC0B29C: 8C423D8C lw $v0, 15756($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030D9Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D8Cu, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0B2A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B2A4: 3842000F xori $v0, $v0, 0xF */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0xFu; PGXP_ALU(0x3842000Fu, cpu->gpr[2], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80030DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B2A8: 03E00008 jr $ra */ psx_delay_BFC0B2A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B2AC: 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(0x80030DACu); #endif if (psx_delay_BFC0B2A8) { psx_delay_BFC0B2A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B2B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B2B0u); int psx_delay_BFC0B2D8 = 0; int psx_taken_BFC0B2D8 = 0; int psx_delay_BFC0B2E4 = 0; int psx_taken_BFC0B2E4 = 0; int psx_delay_BFC0B2EC = 0; int psx_taken_BFC0B2EC = 0; int psx_delay_BFC0B300 = 0; int psx_taken_BFC0B300 = 0; int psx_delay_BFC0B334 = 0; int psx_taken_BFC0B334 = 0; int psx_delay_BFC0B33C = 0; int psx_taken_BFC0B33C = 0; int psx_delay_BFC0B344 = 0; int psx_taken_BFC0B344 = 0; int psx_delay_BFC0B354 = 0; int psx_taken_BFC0B354 = 0; int psx_delay_BFC0B360 = 0; int psx_taken_BFC0B360 = 0; int psx_delay_BFC0B370 = 0; int psx_taken_BFC0B370 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B324u: goto label_BFC0B324; case 0xBFC0B32Cu: goto label_BFC0B32C; case 0xBFC0B2E0u: goto label_BFC0B2E0; case 0xBFC0B2ECu: goto label_BFC0B2EC; case 0xBFC0B2F4u: goto label_BFC0B2F4; case 0xBFC0B308u: goto label_BFC0B308; case 0xBFC0B328u: goto label_BFC0B328; case 0xBFC0B33Cu: goto label_BFC0B33C; case 0xBFC0B344u: goto label_BFC0B344; case 0xBFC0B34Cu: goto label_BFC0B34C; case 0xBFC0B35Cu: goto label_BFC0B35C; case 0xBFC0B368u: goto label_BFC0B368; default: break; } } label_BFC0B2B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B2B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B2B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0B2B0: 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(0x80030DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0B2B4: 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, 0x80030DB4u); return; } g_debug_last_store_pc = 0x80030DB4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80030DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0B2B8: 3C108004 lui $s0, 0x8004 */ cpu->gpr[16] = 0x80040000u; PGXP_ALU(0x3C108004u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030DB8u); #endif /* 0xBFC0B2BC: 8E023D8C lw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D8Cu, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC0B2C0: 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(0x80030DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0B2C4: 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, 0x80030DC4u); return; } g_debug_last_store_pc = 0x80030DC4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0034u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80030DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC0B2C8: 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, 0x80030DC8u); return; } g_debug_last_store_pc = 0x80030DC8u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50030u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80030DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0B2CC: 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, 0x80030DCCu); return; } g_debug_last_store_pc = 0x80030DCCu; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB4002Cu, _pgxa, cpu->gpr[20]); } #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, 0x20080000u); #endif /* 0xBFC0B2D0: 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, 0x80030DD0u); return; } g_debug_last_store_pc = 0x80030DD0u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30028u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80030DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0B2D4: 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, 0x80030DD4u); return; } g_debug_last_store_pc = 0x80030DD4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20024u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80030DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B2D8: 10430030 beq $v0, $v1, 0xBFC0B39C */ uint32_t psx_brA_BFC0B2D8 = cpu->gpr[2]; uint32_t psx_brB_BFC0B2D8 = cpu->gpr[3]; psx_taken_BFC0B2D8 = (psx_brA_BFC0B2D8 == psx_brB_BFC0B2D8); psx_delay_BFC0B2D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0B2DC: 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, 0x80030DDCu); return; } g_debug_last_store_pc = 0x80030DDCu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80030DDCu); #endif if (psx_delay_BFC0B2D8) { psx_delay_BFC0B2D8 = 0; if (psx_taken_BFC0B2D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E9Cu); cpu->pc = 0x80030E9Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030DE0u); } label_BFC0B2E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B2E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B2E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B2E0: 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(0x80030DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B2E4: 10430024 beq $v0, $v1, 0xBFC0B378 */ uint32_t psx_brA_BFC0B2E4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B2E4 = cpu->gpr[3]; psx_taken_BFC0B2E4 = (psx_brA_BFC0B2E4 == psx_brB_BFC0B2E4); psx_delay_BFC0B2E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B2E8: 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(0x80030DE8u); #endif if (psx_delay_BFC0B2E4) { psx_delay_BFC0B2E4 = 0; if (psx_taken_BFC0B2E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030DECu); } label_BFC0B2EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B2ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B2ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B2EC: 1443000E bne $v0, $v1, 0xBFC0B328 */ uint32_t psx_brA_BFC0B2EC = cpu->gpr[2]; uint32_t psx_brB_BFC0B2EC = cpu->gpr[3]; psx_taken_BFC0B2EC = (psx_brA_BFC0B2EC != psx_brB_BFC0B2EC); psx_delay_BFC0B2EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B2F0: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030DF0u); #endif if (psx_delay_BFC0B2EC) { psx_delay_BFC0B2EC = 0; if (psx_taken_BFC0B2EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E28u); goto label_BFC0B328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030DF4u); } label_BFC0B2F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B2F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B2F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030DF4u); #endif /* 0xBFC0B2F4: 8CA210B8 lw $v0, 4280($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030DF4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA210B8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B2F8: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B2FC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x5u); #endif /* 0xBFC0B300: 14400009 bne $v0, $zero, 0xBFC0B328 */ uint32_t psx_brA_BFC0B300 = cpu->gpr[2]; uint32_t psx_brB_BFC0B300 = cpu->gpr[0]; psx_taken_BFC0B300 = (psx_brA_BFC0B300 != psx_brB_BFC0B300); psx_delay_BFC0B300 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B304: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030E04u); #endif if (psx_delay_BFC0B300) { psx_delay_BFC0B300 = 0; if (psx_taken_BFC0B300) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E28u); goto label_BFC0B328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E08u); } label_BFC0B308: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B308u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E08u); #endif /* 0xBFC0B308: 8CA210F4 lw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B30C: 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(0x80030E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B310: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B314: 3C038800 lui $v1, 0x8800 */ cpu->gpr[3] = 0x88000000u; PGXP_ALU(0x3C038800u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B318: 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(0x80030E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B31C: ACA210F4 sw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E1Cu); return; } g_debug_last_store_pc = 0x80030E1Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B320: 24020009 addiu $v0, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24020009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0x80030E20u); #endif 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, 0x80030E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B324: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E24u); return; } g_debug_last_store_pc = 0x80030E24u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030E24u); #endif label_BFC0B328: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B328u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0B328: 3C128004 lui $s2, 0x8004 */ cpu->gpr[18] = 0x80040000u; PGXP_ALU(0x3C128004u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030E28u); #endif 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, 0x80030E2Cu); #endif /* 0xBFC0B32C: 8E424594 lw $v0, 17812($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 17812; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (17812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E2Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E424594u, _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, 0x1u); #endif /* 0xBFC0B330: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B334: 10400036 beq $v0, $zero, 0xBFC0B410 */ uint32_t psx_brA_BFC0B334 = cpu->gpr[2]; uint32_t psx_brB_BFC0B334 = cpu->gpr[0]; psx_taken_BFC0B334 = (psx_brA_BFC0B334 == psx_brB_BFC0B334); psx_delay_BFC0B334 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B338: 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(0x80030E38u); #endif if (psx_delay_BFC0B334) { psx_delay_BFC0B334 = 0; if (psx_taken_BFC0B334) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F10u); cpu->pc = 0x80030F10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E3Cu); } label_BFC0B33C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B33Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B33Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B33C: 1080000E beq $a0, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B33C = cpu->gpr[4]; uint32_t psx_brB_BFC0B33C = cpu->gpr[0]; psx_taken_BFC0B33C = (psx_brA_BFC0B33C == psx_brB_BFC0B33C); psx_delay_BFC0B33C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B340: 0044202B sltu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0044202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030E40u); #endif if (psx_delay_BFC0B33C) { psx_delay_BFC0B33C = 0; if (psx_taken_BFC0B33C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E44u); } label_BFC0B344: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B344u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B344: 148000AF bne $a0, $zero, 0xBFC0B604 */ uint32_t psx_brA_BFC0B344 = cpu->gpr[4]; 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_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B348: 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(0x80030E48u); #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, 0x80031104u); cpu->pc = 0x80031104u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E4Cu); } 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, 0x80030E4Cu); #endif /* 0xBFC0B34C: 8E023D8C lw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E4Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B350: 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(0x80030E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B354: 1043007C beq $v0, $v1, 0xBFC0B548 */ uint32_t psx_brA_BFC0B354 = cpu->gpr[2]; uint32_t psx_brB_BFC0B354 = cpu->gpr[3]; psx_taken_BFC0B354 = (psx_brA_BFC0B354 == psx_brB_BFC0B354); psx_delay_BFC0B354 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC0B358: AE404594 sw $zero, 17812($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 17812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (17812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030E58u); return; } g_debug_last_store_pc = 0x80030E58u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE404594u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030E58u); #endif if (psx_delay_BFC0B354) { psx_delay_BFC0B354 = 0; if (psx_taken_BFC0B354) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031048u); cpu->pc = 0x80031048u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E5Cu); } label_BFC0B35C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B35Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B35Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B35C: 2C430004 sltiu $v1, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000004u ? 1 : 0); PGXP_ALU(0x2C430004u, cpu->gpr[3], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x80030E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B360: 1060001C beq $v1, $zero, 0xBFC0B3D4 */ uint32_t psx_brA_BFC0B360 = cpu->gpr[3]; uint32_t psx_brB_BFC0B360 = cpu->gpr[0]; psx_taken_BFC0B360 = (psx_brA_BFC0B360 == psx_brB_BFC0B360); psx_delay_BFC0B360 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B364: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030E64u); #endif if (psx_delay_BFC0B360) { psx_delay_BFC0B360 = 0; if (psx_taken_BFC0B360) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030ED4u); cpu->pc = 0x80030ED4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E68u); } label_BFC0B368: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B368u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B368: 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(0x80030E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B36C: 2C420002 sltiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); } #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, 0x5u); #endif /* 0xBFC0B370: 1440001E bne $v0, $zero, 0xBFC0B3EC */ uint32_t psx_brA_BFC0B370 = cpu->gpr[2]; uint32_t psx_brB_BFC0B370 = cpu->gpr[0]; psx_taken_BFC0B370 = (psx_brA_BFC0B370 != psx_brB_BFC0B370); psx_delay_BFC0B370 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B374: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030E74u); #endif if (psx_delay_BFC0B370) { psx_delay_BFC0B370 = 0; if (psx_taken_BFC0B370) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EECu); cpu->pc = 0x80030EECu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B378(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B378u); int psx_delay_BFC0B394 = 0; label_BFC0B378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E78u); #endif /* 0xBFC0B378: 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, 0x80030E78u); 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(0x80030E78u); #endif /* 0xBFC0B37C: 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, 0x80030E7Cu); 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(0x80030E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E80u); #endif /* 0xBFC0B380: 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, 0x80030E80u); 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(0x80030E80u); #endif /* 0xBFC0B384: 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, 0x80030E84u); 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(0x80030E84u); #endif /* 0xBFC0B388: 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, 0x80030E88u); 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(0x80030E88u); #endif /* 0xBFC0B38C: 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, 0x80030E8Cu); 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(0x80030E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E90u); #endif /* 0xBFC0B390: 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, 0x80030E90u); 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(0x80030E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B394: 03E00008 jr $ra */ psx_delay_BFC0B394 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0B398: 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(0x80030E98u); #endif if (psx_delay_BFC0B394) { psx_delay_BFC0B394 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B39C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B39Cu); int psx_delay_BFC0B3AC = 0; int psx_taken_BFC0B3AC = 0; int psx_delay_BFC0B3CC = 0; int psx_taken_BFC0B3CC = 0; int psx_delay_BFC0B3D8 = 0; int psx_taken_BFC0B3D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B3D4u: goto label_BFC0B3D4; case 0xBFC0B3B4u: goto label_BFC0B3B4; default: break; } } label_BFC0B39C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B39Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B39Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B39C: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EA0u); #endif /* 0xBFC0B3A0: 8CA210B8 lw $v0, 4280($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030EA0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA210B8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B3A4: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B3A8: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B3AC: 1440FFDF bne $v0, $zero, 0xBFC0B32C */ uint32_t psx_brA_BFC0B3AC = cpu->gpr[2]; uint32_t psx_brB_BFC0B3AC = cpu->gpr[0]; psx_taken_BFC0B3AC = (psx_brA_BFC0B3AC != psx_brB_BFC0B3AC); psx_delay_BFC0B3AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0B3B0: 3C128004 lui $s2, 0x8004 */ cpu->gpr[18] = 0x80040000u; PGXP_ALU(0x3C128004u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030EB0u); #endif if (psx_delay_BFC0B3AC) { psx_delay_BFC0B3AC = 0; if (psx_taken_BFC0B3AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E2Cu); cpu->pc = 0x80030E2Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EB4u); } label_BFC0B3B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B3B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B3B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EB4u); #endif /* 0xBFC0B3B4: 8CA210F4 lw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030EB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B3B8: 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(0x80030EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B3BC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B3C0: 3C038800 lui $v1, 0x8800 */ cpu->gpr[3] = 0x88000000u; PGXP_ALU(0x3C038800u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B3C4: 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(0x80030EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B3C8: ACA210F4 sw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030EC8u); return; } g_debug_last_store_pc = 0x80030EC8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B3CC: 1000FFD5 beq $zero, $zero, 0xBFC0B324 */ uint32_t psx_brA_BFC0B3CC = cpu->gpr[0]; uint32_t psx_brB_BFC0B3CC = cpu->gpr[0]; psx_taken_BFC0B3CC = (psx_brA_BFC0B3CC == psx_brB_BFC0B3CC); psx_delay_BFC0B3CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B3D0: 2402000D addiu $v0, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x2402000Du, cpu->gpr[2], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0x80030ED0u); #endif if (psx_delay_BFC0B3CC) { psx_delay_BFC0B3CC = 0; if (psx_taken_BFC0B3CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E24u); cpu->pc = 0x80030E24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030ED4u); } label_BFC0B3D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B3D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B3D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B3D4: 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(0x80030ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B3D8: 1443FFE7 bne $v0, $v1, 0xBFC0B378 */ uint32_t psx_brA_BFC0B3D8 = cpu->gpr[2]; uint32_t psx_brB_BFC0B3D8 = cpu->gpr[3]; psx_taken_BFC0B3D8 = (psx_brA_BFC0B3D8 != psx_brB_BFC0B3D8); psx_delay_BFC0B3D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B3DC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030EDCu); #endif if (psx_delay_BFC0B3D8) { psx_delay_BFC0B3D8 = 0; if (psx_taken_BFC0B3D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EE0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EE0u); cpu->pc = 0x80030EE0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B3E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B3E0u); int psx_delay_BFC0B3E4 = 0; int psx_taken_BFC0B3E4 = 0; int psx_delay_BFC0B408 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B3ECu: goto label_BFC0B3EC; default: break; } } label_BFC0B3E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B3E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B3E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B3E0: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030EE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B3E4: 10000052 beq $zero, $zero, 0xBFC0B530 */ uint32_t psx_brA_BFC0B3E4 = cpu->gpr[0]; uint32_t psx_brB_BFC0B3E4 = cpu->gpr[0]; psx_taken_BFC0B3E4 = (psx_brA_BFC0B3E4 == psx_brB_BFC0B3E4); psx_delay_BFC0B3E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B3E8: 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(0x80030EE8u); #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, 0x80031030u); cpu->pc = 0x80031030u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EECu); } 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, 0x80030EECu); #endif /* 0xBFC0B3EC: 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, 0x80030EECu); 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(0x80030EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030EF0u); #endif /* 0xBFC0B3F0: 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, 0x80030EF0u); 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(0x80030EF0u); #endif /* 0xBFC0B3F4: 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, 0x80030EF4u); 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(0x80030EF4u); #endif /* 0xBFC0B3F8: 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, 0x80030EF8u); 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(0x80030EF8u); #endif /* 0xBFC0B3FC: 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, 0x80030EFCu); 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(0x80030EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F00u); #endif /* 0xBFC0B400: 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, 0x80030F00u); 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(0x80030F00u); #endif /* 0xBFC0B404: 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, 0x80030F04u); 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(0x80030F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B408: 0800C346 j 0xB0030D18 */ psx_delay_BFC0B408 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0B40C: 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(0x80030F0Cu); #endif if (psx_delay_BFC0B408) { psx_delay_BFC0B408 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030D18u); cpu->pc = 0x80030D18u; return; } } void OpenBIOS_func_1FC0B410(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B410u); int psx_delay_BFC0B428 = 0; int psx_taken_BFC0B428 = 0; int psx_delay_BFC0B440 = 0; int psx_taken_BFC0B440 = 0; int psx_delay_BFC0B460 = 0; int psx_taken_BFC0B460 = 0; int psx_delay_BFC0B47C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B430u: goto label_BFC0B430; case 0xBFC0B43Cu: goto label_BFC0B43C; case 0xBFC0B448u: goto label_BFC0B448; case 0xBFC0B454u: goto label_BFC0B454; case 0xBFC0B468u: goto label_BFC0B468; default: break; } } label_BFC0B410: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B410u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B410: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B414: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0B418: A0851800 sb $a1, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F18u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0851800u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030F18u); #endif /* 0xBFC0B41C: 90431803 lbu $v1, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6147)), 3, 0x4u); PGXP_LOAD(0x90431803u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0B420: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B424: 30620007 andi $v0, $v1, 0x7 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] & 0x7u; PGXP_ALU(0x30620007u, cpu->gpr[2], _pgx1, 0x0007u); } #ifdef PSX_COSIM cosim_instr(0x80030F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B428: 10400004 beq $v0, $zero, 0xBFC0B43C */ uint32_t psx_brA_BFC0B428 = cpu->gpr[2]; uint32_t psx_brB_BFC0B428 = cpu->gpr[0]; psx_taken_BFC0B428 = (psx_brA_BFC0B428 == psx_brB_BFC0B428); psx_delay_BFC0B428 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B42C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030F2Cu); #endif if (psx_delay_BFC0B428) { psx_delay_BFC0B428 = 0; if (psx_taken_BFC0B428) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F3Cu); goto label_BFC0B43C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F30u); } label_BFC0B430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0B430: A0851800 sb $a1, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F30u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0851800u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B434: 24050007 addiu $a1, $zero, 7 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); PGXP_ALU(0x24050007u, cpu->gpr[5], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0x80030F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0B438: A0851803 sb $a1, 6147($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6147)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0851803u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80030F38u); #endif label_BFC0B43C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B43Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B43Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B43C: 30630018 andi $v1, $v1, 0x18 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u; PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); } #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, 0x9u); #endif /* 0xBFC0B440: 10600004 beq $v1, $zero, 0xBFC0B454 */ uint32_t psx_brA_BFC0B440 = cpu->gpr[3]; uint32_t psx_brB_BFC0B440 = cpu->gpr[0]; psx_taken_BFC0B440 = (psx_brA_BFC0B440 == psx_brB_BFC0B440); psx_delay_BFC0B440 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B444: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F44u); #endif if (psx_delay_BFC0B440) { psx_delay_BFC0B440 = 0; if (psx_taken_BFC0B440) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F54u); goto label_BFC0B454; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F48u); } label_BFC0B448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B448u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B448: 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(0x80030F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0B44C: A0851800 sb $a1, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0851800u, _pgxa, cpu->gpr[5]); } #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, 0x18u); #endif /* 0xBFC0B450: A0831803 sb $v1, 6147($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6147)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0831803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80030F50u); #endif label_BFC0B454: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B454u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B454: 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(0x80030F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B458: 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(0x80030F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B45C: 2C430005 sltiu $v1, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0); PGXP_ALU(0x2C430005u, cpu->gpr[3], _pgx1, 0x0005u); } #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, 0x9u); #endif /* 0xBFC0B460: 1060FFC5 beq $v1, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B460 = cpu->gpr[3]; uint32_t psx_brB_BFC0B460 = cpu->gpr[0]; psx_taken_BFC0B460 = (psx_brA_BFC0B460 == psx_brB_BFC0B460); psx_delay_BFC0B460 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B464: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F64u); #endif if (psx_delay_BFC0B460) { psx_delay_BFC0B460 = 0; if (psx_taken_BFC0B460) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030F68u); } 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, 0x80030F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B468: 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(0x80030F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B46C: 246335B4 addiu $v1, $v1, 13748 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (13748)); PGXP_ALU(0x246335B4u, cpu->gpr[3], _pgx1, 0x000035B4u); } #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, 0xCu); #endif /* 0xBFC0B470: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80030F70u); #endif /* 0xBFC0B474: 8C420000 lw $v0, 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, 0x80030F74u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B478: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B47C: 00400008 jr $v0 */ psx_delay_BFC0B47C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B480: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030F80u); #endif if (psx_delay_BFC0B47C) { psx_delay_BFC0B47C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC0B484(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B484u); int psx_delay_BFC0B49C = 0; int psx_taken_BFC0B49C = 0; int psx_delay_BFC0B4A4 = 0; int psx_taken_BFC0B4A4 = 0; int psx_delay_BFC0B4AC = 0; int psx_delay_BFC0B4B4 = 0; int psx_taken_BFC0B4B4 = 0; int psx_delay_BFC0B4BC = 0; int psx_delay_BFC0B4C8 = 0; int psx_taken_BFC0B4C8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B4C8u: goto label_BFC0B4C8; case 0xBFC0B4A4u: goto label_BFC0B4A4; case 0xBFC0B4ACu: goto label_BFC0B4AC; case 0xBFC0B4B4u: goto label_BFC0B4B4; case 0xBFC0B4BCu: goto label_BFC0B4BC; case 0xBFC0B4C4u: goto label_BFC0B4C4; default: break; } } label_BFC0B484: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B484u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B484: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B488: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030F88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B48C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030F90u); #endif /* 0xBFC0B490: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030F90u); #endif /* 0xBFC0B494: 8E023D8C lw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030F94u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B498: 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(0x80030F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B49C: 10430007 beq $v0, $v1, 0xBFC0B4BC */ uint32_t psx_brA_BFC0B49C = cpu->gpr[2]; uint32_t psx_brB_BFC0B49C = cpu->gpr[3]; psx_taken_BFC0B49C = (psx_brA_BFC0B49C == psx_brB_BFC0B49C); psx_delay_BFC0B49C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B4A0: 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(0x80030FA0u); #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, 0x80030FBCu); goto label_BFC0B4BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FA4u); } 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, 0x80030FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B4A4: 1443FFB4 bne $v0, $v1, 0xBFC0B378 */ uint32_t psx_brA_BFC0B4A4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B4A4 = cpu->gpr[3]; psx_taken_BFC0B4A4 = (psx_brA_BFC0B4A4 != psx_brB_BFC0B4A4); psx_delay_BFC0B4A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030FA8u); #endif if (psx_delay_BFC0B4A4) { psx_delay_BFC0B4A4 = 0; if (psx_taken_BFC0B4A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FACu); } label_BFC0B4AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B4AC: 0C00C321 jal 0xB0030C84 */ cpu->gpr[31] = 0x80030FB4u; /* jal link before delay slot */ psx_delay_BFC0B4AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030FB0u); #endif if (psx_delay_BFC0B4AC) { psx_delay_BFC0B4AC = 0; cpu->gpr[31] = 0x80030FB4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C84u); cpu->pc = 0x80030C84u; return; } label_BFC0B4B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4B4: 10000004 beq $zero, $zero, 0xBFC0B4C8 */ uint32_t psx_brA_BFC0B4B4 = cpu->gpr[0]; uint32_t psx_brB_BFC0B4B4 = cpu->gpr[0]; psx_taken_BFC0B4B4 = (psx_brA_BFC0B4B4 == psx_brB_BFC0B4B4); psx_delay_BFC0B4B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B4B8: 2402000C addiu $v0, $zero, 12 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); PGXP_ALU(0x2402000Cu, cpu->gpr[2], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0x80030FB8u); #endif if (psx_delay_BFC0B4B4) { psx_delay_BFC0B4B4 = 0; if (psx_taken_BFC0B4B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FC8u); goto label_BFC0B4C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FBCu); } label_BFC0B4BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B4BC: 0C00C321 jal 0xB0030C84 */ cpu->gpr[31] = 0x80030FC4u; /* jal link before delay slot */ psx_delay_BFC0B4BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030FC0u); #endif if (psx_delay_BFC0B4BC) { psx_delay_BFC0B4BC = 0; cpu->gpr[31] = 0x80030FC4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C84u); cpu->pc = 0x80030C84u; return; } label_BFC0B4C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B4C4: 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(0x80030FC4u); #endif label_BFC0B4C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4C8: 1000FFAB beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B4C8 = cpu->gpr[0]; uint32_t psx_brB_BFC0B4C8 = cpu->gpr[0]; psx_taken_BFC0B4C8 = (psx_brA_BFC0B4C8 == psx_brB_BFC0B4C8); psx_delay_BFC0B4C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B4CC: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030FCCu); return; } g_debug_last_store_pc = 0x80030FCCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030FCCu); #endif if (psx_delay_BFC0B4C8) { psx_delay_BFC0B4C8 = 0; if (psx_taken_BFC0B4C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FD0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FD0u); cpu->pc = 0x80030FD0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B4D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B4D0u); int psx_delay_BFC0B4F0 = 0; int psx_taken_BFC0B4F0 = 0; int psx_delay_BFC0B50C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B4F8u: goto label_BFC0B4F8; default: break; } } label_BFC0B4D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B4D0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B4D4: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80030FD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80030FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B4D8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030FD8u); #endif /* 0xBFC0B4DC: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FE0u); #endif /* 0xBFC0B4E0: 8E023D8C lw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80030FE0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80030FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B4E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80030FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B4E8: 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(0x80030FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B4EC: 2C43000D sltiu $v1, $v0, 13 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Du ? 1 : 0); PGXP_ALU(0x2C43000Du, cpu->gpr[3], _pgx1, 0x000Du); } #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, 0x9u); #endif /* 0xBFC0B4F0: 1060FFA1 beq $v1, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B4F0 = cpu->gpr[3]; uint32_t psx_brB_BFC0B4F0 = cpu->gpr[0]; psx_taken_BFC0B4F0 = (psx_brA_BFC0B4F0 == psx_brB_BFC0B4F0); psx_delay_BFC0B4F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B4F4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80030FF4u); #endif if (psx_delay_BFC0B4F0) { psx_delay_BFC0B4F0 = 0; if (psx_taken_BFC0B4F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FF8u); } label_BFC0B4F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B4F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B4F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80030FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B4F8: 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(0x80030FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B4FC: 246335C8 addiu $v1, $v1, 13768 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (13768)); PGXP_ALU(0x246335C8u, cpu->gpr[3], _pgx1, 0x000035C8u); } #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, 0xCu); #endif /* 0xBFC0B500: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031000u); #endif /* 0xBFC0B504: 8C420000 lw $v0, 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, 0x80031004u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B508: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B50C: 00400008 jr $v0 */ psx_delay_BFC0B50C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B510: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031010u); #endif if (psx_delay_BFC0B50C) { psx_delay_BFC0B50C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC0B514(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B514u); int psx_delay_BFC0B530 = 0; int psx_taken_BFC0B530 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B530u: goto label_BFC0B530; default: break; } } label_BFC0B514: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B514u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B514: 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(0x80031014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B518: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031018u); return; } g_debug_last_store_pc = 0x80031018u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B51C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC0B520: AC404590 sw $zero, 17808($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 17808; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (17808)); 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[0]); } PGXP_STORE(0xAC404590u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B524: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B528: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031028u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B52C: 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(0x8003102Cu); #endif 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, 0x80031030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B530: 1000FF91 beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B530 = cpu->gpr[0]; uint32_t psx_brB_BFC0B530 = cpu->gpr[0]; psx_taken_BFC0B530 = (psx_brA_BFC0B530 == psx_brB_BFC0B530); psx_delay_BFC0B530 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B534: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031034u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031034u); #endif if (psx_delay_BFC0B530) { psx_delay_BFC0B530 = 0; if (psx_taken_BFC0B530) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031038u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031038u); cpu->pc = 0x80031038u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B538(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B538u); int psx_delay_BFC0B550 = 0; int psx_taken_BFC0B550 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B548u: goto label_BFC0B548; default: break; } } label_BFC0B538: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B538u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B538: 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(0x80031038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B53C: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003103Cu); return; } g_debug_last_store_pc = 0x8003103Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC0B540: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B544: AC404590 sw $zero, 17808($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 17808; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (17808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031044u); return; } g_debug_last_store_pc = 0x80031044u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404590u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031044u); #endif label_BFC0B548: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B548u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B548: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B54C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003104Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x8003104Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B550: 1000FFF7 beq $zero, $zero, 0xBFC0B530 */ uint32_t psx_brA_BFC0B550 = cpu->gpr[0]; uint32_t psx_brB_BFC0B550 = cpu->gpr[0]; psx_taken_BFC0B550 = (psx_brA_BFC0B550 == psx_brB_BFC0B550); psx_delay_BFC0B550 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B554: 24030013 addiu $v1, $zero, 19 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (19)); PGXP_ALU(0x24030013u, cpu->gpr[3], _pgx1, 0x00000013u); } #ifdef PSX_COSIM cosim_instr(0x80031054u); #endif if (psx_delay_BFC0B550) { psx_delay_BFC0B550 = 0; if (psx_taken_BFC0B550) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031030u); cpu->pc = 0x80031030u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031058u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031058u); cpu->pc = 0x80031058u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B558(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B558u); int psx_delay_BFC0B570 = 0; int psx_taken_BFC0B570 = 0; int psx_delay_BFC0B58C = 0; int psx_taken_BFC0B58C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B568u: goto label_BFC0B568; case 0xBFC0B578u: goto label_BFC0B578; default: break; } } label_BFC0B558: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B558u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B558: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B55C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003105Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #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, 0x8u); #endif /* 0xBFC0B560: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B564: 24020007 addiu $v0, $zero, 7 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (7)); PGXP_ALU(0x24020007u, cpu->gpr[2], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0x80031064u); #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, 0x80031068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B568: 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(0x80031068u); #endif /* 0xBFC0B56C: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #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, 0x5u); #endif /* 0xBFC0B570: 1440FFFD bne $v0, $zero, 0xBFC0B568 */ uint32_t psx_brA_BFC0B570 = cpu->gpr[2]; uint32_t psx_brB_BFC0B570 = cpu->gpr[0]; psx_taken_BFC0B570 = (psx_brA_BFC0B570 != psx_brB_BFC0B570); psx_delay_BFC0B570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B574: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031074u); #endif if (psx_delay_BFC0B570) { psx_delay_BFC0B570 = 0; if (psx_taken_BFC0B570) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031068u); goto label_BFC0B568; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031078u); } label_BFC0B578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B578u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B578: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B57C: 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(0x8003107Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B580: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031080u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B584: A0401802 sb $zero, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031084u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401802u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B588: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031088u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B58C: 1000FFCE beq $zero, $zero, 0xBFC0B4C8 */ uint32_t psx_brA_BFC0B58C = cpu->gpr[0]; uint32_t psx_brB_BFC0B58C = cpu->gpr[0]; psx_taken_BFC0B58C = (psx_brA_BFC0B58C == psx_brB_BFC0B58C); psx_delay_BFC0B58C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B590: 24020005 addiu $v0, $zero, 5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (5)); PGXP_ALU(0x24020005u, cpu->gpr[2], _pgx1, 0x00000005u); } #ifdef PSX_COSIM cosim_instr(0x80031090u); #endif if (psx_delay_BFC0B58C) { psx_delay_BFC0B58C = 0; if (psx_taken_BFC0B58C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FC8u); cpu->pc = 0x80030FC8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031094u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031094u); cpu->pc = 0x80031094u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B594(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B594u); int psx_delay_BFC0B5A4 = 0; int psx_taken_BFC0B5A4 = 0; int psx_delay_BFC0B5B4 = 0; int psx_taken_BFC0B5B4 = 0; int psx_delay_BFC0B5C4 = 0; int psx_taken_BFC0B5C4 = 0; int psx_delay_BFC0B5D4 = 0; int psx_taken_BFC0B5D4 = 0; int psx_delay_BFC0B5E4 = 0; int psx_taken_BFC0B5E4 = 0; int psx_delay_BFC0B5F4 = 0; int psx_taken_BFC0B5F4 = 0; int psx_delay_BFC0B604 = 0; int psx_taken_BFC0B604 = 0; int psx_delay_BFC0B62C = 0; int psx_taken_BFC0B62C = 0; int psx_delay_BFC0B64C = 0; int psx_taken_BFC0B64C = 0; int psx_delay_BFC0B66C = 0; int psx_taken_BFC0B66C = 0; int psx_delay_BFC0B684 = 0; int psx_taken_BFC0B684 = 0; int psx_delay_BFC0B698 = 0; int psx_taken_BFC0B698 = 0; int psx_delay_BFC0B6B0 = 0; int psx_taken_BFC0B6B0 = 0; int psx_delay_BFC0B6E8 = 0; int psx_taken_BFC0B6E8 = 0; int psx_delay_BFC0B6F8 = 0; int psx_taken_BFC0B6F8 = 0; int psx_delay_BFC0B710 = 0; int psx_delay_BFC0B72C = 0; int psx_taken_BFC0B72C = 0; int psx_delay_BFC0B734 = 0; int psx_taken_BFC0B734 = 0; int psx_delay_BFC0B73C = 0; int psx_taken_BFC0B73C = 0; int psx_delay_BFC0B748 = 0; int psx_taken_BFC0B748 = 0; int psx_delay_BFC0B758 = 0; int psx_taken_BFC0B758 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B604u: goto label_BFC0B604; case 0xBFC0B6F0u: goto label_BFC0B6F0; case 0xBFC0B734u: goto label_BFC0B734; case 0xBFC0B5ACu: goto label_BFC0B5AC; case 0xBFC0B5BCu: goto label_BFC0B5BC; case 0xBFC0B5CCu: goto label_BFC0B5CC; case 0xBFC0B5DCu: goto label_BFC0B5DC; case 0xBFC0B5ECu: goto label_BFC0B5EC; case 0xBFC0B5FCu: goto label_BFC0B5FC; case 0xBFC0B60Cu: goto label_BFC0B60C; case 0xBFC0B634u: goto label_BFC0B634; case 0xBFC0B638u: goto label_BFC0B638; case 0xBFC0B654u: goto label_BFC0B654; case 0xBFC0B658u: goto label_BFC0B658; case 0xBFC0B674u: goto label_BFC0B674; case 0xBFC0B678u: goto label_BFC0B678; case 0xBFC0B68Cu: goto label_BFC0B68C; case 0xBFC0B690u: goto label_BFC0B690; case 0xBFC0B6A0u: goto label_BFC0B6A0; case 0xBFC0B6A4u: goto label_BFC0B6A4; case 0xBFC0B6B8u: goto label_BFC0B6B8; case 0xBFC0B6BCu: goto label_BFC0B6BC; case 0xBFC0B700u: goto label_BFC0B700; case 0xBFC0B70Cu: goto label_BFC0B70C; case 0xBFC0B718u: goto label_BFC0B718; case 0xBFC0B71Cu: goto label_BFC0B71C; case 0xBFC0B73Cu: goto label_BFC0B73C; case 0xBFC0B744u: goto label_BFC0B744; case 0xBFC0B750u: goto label_BFC0B750; default: break; } } 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, 0x80031094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B594: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B598: 24423D90 addiu $v0, $v0, 15760 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15760)); PGXP_ALU(0x24423D90u, cpu->gpr[2], _pgx1, 0x00003D90u); } #ifdef PSX_COSIM cosim_instr(0x80031098u); #endif /* 0xBFC0B59C: 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(0x8003109Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B5A0: 24030043 addiu $v1, $zero, 67 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (67)); PGXP_ALU(0x24030043u, cpu->gpr[3], _pgx1, 0x00000043u); } #ifdef PSX_COSIM cosim_instr(0x800310A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B5A4: 14830015 bne $a0, $v1, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B5A4 = cpu->gpr[4]; uint32_t psx_brB_BFC0B5A4 = cpu->gpr[3]; psx_taken_BFC0B5A4 = (psx_brA_BFC0B5A4 != psx_brB_BFC0B5A4); psx_delay_BFC0B5A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B5A8: 24030044 addiu $v1, $zero, 68 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (68)); PGXP_ALU(0x24030044u, cpu->gpr[3], _pgx1, 0x00000044u); } #ifdef PSX_COSIM cosim_instr(0x800310A8u); #endif if (psx_delay_BFC0B5A4) { psx_delay_BFC0B5A4 = 0; if (psx_taken_BFC0B5A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310ACu); } label_BFC0B5AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B5ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B5ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310ACu); #endif /* 0xBFC0B5AC: 90440002 lbu $a0, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (2)), 4, 0x4u); PGXP_LOAD(0x90440002u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC0B5B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B5B4: 14830011 bne $a0, $v1, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B5B4 = cpu->gpr[4]; uint32_t psx_brB_BFC0B5B4 = cpu->gpr[3]; psx_taken_BFC0B5B4 = (psx_brA_BFC0B5B4 != psx_brB_BFC0B5B4); psx_delay_BFC0B5B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B5B8: 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(0x800310B8u); #endif if (psx_delay_BFC0B5B4) { psx_delay_BFC0B5B4 = 0; if (psx_taken_BFC0B5B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310BCu); } 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, 0x800310BCu); #endif /* 0xBFC0B5BC: 90430003 lbu $v1, 3($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 3; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (3)), 3, 0x4u); PGXP_LOAD(0x90430003u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0B5C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B5C4: 1464000D bne $v1, $a0, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B5C4 = cpu->gpr[3]; uint32_t psx_brB_BFC0B5C4 = cpu->gpr[4]; psx_taken_BFC0B5C4 = (psx_brA_BFC0B5C4 != psx_brB_BFC0B5C4); psx_delay_BFC0B5C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B5C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310C8u); #endif if (psx_delay_BFC0B5C4) { psx_delay_BFC0B5C4 = 0; if (psx_taken_BFC0B5C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310CCu); } label_BFC0B5CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B5CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B5CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310CCu); #endif /* 0xBFC0B5CC: 90440004 lbu $a0, 4($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4)), 4, 0x4u); PGXP_LOAD(0x90440004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800310CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B5D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B5D4: 14830009 bne $a0, $v1, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B5D4 = cpu->gpr[4]; uint32_t psx_brB_BFC0B5D4 = cpu->gpr[3]; psx_taken_BFC0B5D4 = (psx_brA_BFC0B5D4 != psx_brB_BFC0B5D4); psx_delay_BFC0B5D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B5D8: 24030031 addiu $v1, $zero, 49 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (49)); PGXP_ALU(0x24030031u, cpu->gpr[3], _pgx1, 0x00000031u); } #ifdef PSX_COSIM cosim_instr(0x800310D8u); #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, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310DCu); } 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, 0x800310DCu); #endif /* 0xBFC0B5DC: 90440005 lbu $a0, 5($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 5; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (5)), 4, 0x4u); PGXP_LOAD(0x90440005u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC0B5E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B5E4: 14830005 bne $a0, $v1, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B5E4 = cpu->gpr[4]; uint32_t psx_brB_BFC0B5E4 = cpu->gpr[3]; psx_taken_BFC0B5E4 = (psx_brA_BFC0B5E4 != psx_brB_BFC0B5E4); psx_delay_BFC0B5E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B5E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800310E8u); #endif if (psx_delay_BFC0B5E4) { psx_delay_BFC0B5E4 = 0; if (psx_taken_BFC0B5E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310ECu); } label_BFC0B5EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B5ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B5ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310ECu); #endif /* 0xBFC0B5EC: 90430006 lbu $v1, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6)), 3, 0x4u); PGXP_LOAD(0x90430006u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC0B5F0: 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(0x800310F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B5F4: 10620005 beq $v1, $v0, 0xBFC0B60C */ uint32_t psx_brA_BFC0B5F4 = cpu->gpr[3]; uint32_t psx_brB_BFC0B5F4 = cpu->gpr[2]; psx_taken_BFC0B5F4 = (psx_brA_BFC0B5F4 == psx_brB_BFC0B5F4); psx_delay_BFC0B5F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B5F8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800310F8u); #endif if (psx_delay_BFC0B5F4) { psx_delay_BFC0B5F4 = 0; if (psx_taken_BFC0B5F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003110Cu); goto label_BFC0B60C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); } label_BFC0B5FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B5FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B5FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800310FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B5FC: 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(0x800310FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B600: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031100u); return; } g_debug_last_store_pc = 0x80031100u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031100u); #endif 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, 0x80031104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B604: 1000FF5C beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B604 = cpu->gpr[0]; uint32_t psx_brB_BFC0B604 = cpu->gpr[0]; psx_taken_BFC0B604 = (psx_brA_BFC0B604 == psx_brB_BFC0B604); psx_delay_BFC0B604 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0B608: AE424594 sw $v0, 17812($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 17812; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (17812)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031108u); return; } g_debug_last_store_pc = 0x80031108u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE424594u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031108u); #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, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003110Cu); } 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, 0x8003110Cu); #endif /* 0xBFC0B60C: 94433E2E lhu $v1, 15918($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15918; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15918)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003110Cu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x94433E2Eu, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC0B610: 24423E2E addiu $v0, $v0, 15918 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (15918)); PGXP_ALU(0x24423E2Eu, cpu->gpr[2], _pgx1, 0x00003E2Eu); } #ifdef PSX_COSIM cosim_instr(0x80031110u); #endif /* 0xBFC0B614: 94420002 lhu $v0, 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, 0x80031114u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x94420002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC0B618: A7A30010 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031118u); return; } g_debug_last_store_pc = 0x80031118u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA7A30010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0B61C: A7A20012 sh $v0, 18($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 18; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (18)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003111Cu); return; } g_debug_last_store_pc = 0x8003111Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA7A20012u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003111Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031120u); #endif /* 0xBFC0B620: 8FA20010 lw $v0, 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, 0x80031120u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B624: 24031194 addiu $v1, $zero, 4500 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4500)); PGXP_ALU(0x24031194u, cpu->gpr[3], _pgx1, 0x00001194u); } #ifdef PSX_COSIM cosim_instr(0x80031124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B628: 24420096 addiu $v0, $v0, 150 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (150)); PGXP_ALU(0x24420096u, cpu->gpr[2], _pgx1, 0x00000096u); } #ifdef PSX_COSIM cosim_instr(0x80031128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B62C: 14600002 bne $v1, $zero, 0xBFC0B638 */ uint32_t psx_brA_BFC0B62C = cpu->gpr[3]; uint32_t psx_brB_BFC0B62C = cpu->gpr[0]; psx_taken_BFC0B62C = (psx_brA_BFC0B62C != psx_brB_BFC0B62C); psx_delay_BFC0B62C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B630: 0043001B divu $v0, $v1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0043001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80031130u); #endif if (psx_delay_BFC0B62C) { psx_delay_BFC0B62C = 0; if (psx_taken_BFC0B62C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031138u); goto label_BFC0B638; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031134u); } label_BFC0B634: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B634u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B634: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80031134u); return; #ifdef PSX_COSIM cosim_instr(0x80031134u); #endif 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, 0x80031138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B638: 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(0x80031138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0B63C: 240702EE addiu $a3, $zero, 750 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (750)); PGXP_ALU(0x240702EEu, cpu->gpr[7], _pgx1, 0x000002EEu); } #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, 0x10u); #endif /* 0xBFC0B640: 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(0x80031140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B644: 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(0x80031144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B648: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B64C: 14600002 bne $v1, $zero, 0xBFC0B658 */ uint32_t psx_brA_BFC0B64C = cpu->gpr[3]; uint32_t psx_brB_BFC0B64C = cpu->gpr[0]; psx_taken_BFC0B64C = (psx_brA_BFC0B64C != psx_brB_BFC0B64C); psx_delay_BFC0B64C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B650: 0083001B divu $a0, $v1 */ { uint32_t psx_n = cpu->gpr[4]; 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(0x0083001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80031150u); #endif if (psx_delay_BFC0B64C) { psx_delay_BFC0B64C = 0; if (psx_taken_BFC0B64C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031158u); goto label_BFC0B658; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031154u); } label_BFC0B654: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B654u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B654: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80031154u); return; #ifdef PSX_COSIM cosim_instr(0x80031154u); #endif 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, 0x80031158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B658: 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(0x80031158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B65C: 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(0x8003115Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B660: 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(0x80031160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0B664: 00C43021 addu $a2, $a2, $a0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[4]; PGXP_ALU(0x00C43021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B668: 2404004B addiu $a0, $zero, 75 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (75)); PGXP_ALU(0x2404004Bu, cpu->gpr[4], _pgx1, 0x0000004Bu); } #ifdef PSX_COSIM cosim_instr(0x80031168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B66C: 14800002 bne $a0, $zero, 0xBFC0B678 */ uint32_t psx_brA_BFC0B66C = cpu->gpr[4]; uint32_t psx_brB_BFC0B66C = cpu->gpr[0]; psx_taken_BFC0B66C = (psx_brA_BFC0B66C != psx_brB_BFC0B66C); psx_delay_BFC0B66C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B670: 0044001B divu $v0, $a0 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0044001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80031170u); #endif if (psx_delay_BFC0B66C) { psx_delay_BFC0B66C = 0; if (psx_taken_BFC0B66C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031178u); goto label_BFC0B678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031174u); } label_BFC0B674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B674u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B674: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80031174u); return; #ifdef PSX_COSIM cosim_instr(0x80031174u); #endif label_BFC0B678: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B678u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B678: 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(0x80031178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B67C: 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(0x8003117Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B680: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B684: 14600002 bne $v1, $zero, 0xBFC0B690 */ uint32_t psx_brA_BFC0B684 = cpu->gpr[3]; 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_cyc_step(cpu, 0x28u); #endif /* 0xBFC0B688: 00A3001B divu $a1, $v1 */ { uint32_t psx_n = cpu->gpr[5]; 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(0x00A3001Bu, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80031188u); #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, 0x80031190u); goto label_BFC0B690; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003118Cu); } 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, 0x8003118Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B68C: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x8003118Cu); return; #ifdef PSX_COSIM cosim_instr(0x8003118Cu); #endif label_BFC0B690: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B690u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B690: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80031190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B694: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0B698: 14E00002 bne $a3, $zero, 0xBFC0B6A4 */ uint32_t psx_brA_BFC0B698 = cpu->gpr[7]; 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_cyc_step(cpu, 0x84u); #endif /* 0xBFC0B69C: 0047001B divu $v0, $a3 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0047001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[7]); #ifdef PSX_COSIM cosim_instr(0x8003119Cu); #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, 0x800311A4u); goto label_BFC0B6A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800311A0u); } 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, 0x800311A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B6A0: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800311A0u); return; #ifdef PSX_COSIM cosim_instr(0x800311A0u); #endif label_BFC0B6A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B6A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B6A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800311A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B6A4: 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(0x800311A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B6A8: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x800311A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B6AC: 00A22821 addu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A22821u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC0B6B0: 14600002 bne $v1, $zero, 0xBFC0B6BC */ uint32_t psx_brA_BFC0B6B0 = cpu->gpr[3]; uint32_t psx_brB_BFC0B6B0 = cpu->gpr[0]; psx_taken_BFC0B6B0 = (psx_brA_BFC0B6B0 != psx_brB_BFC0B6B0); psx_delay_BFC0B6B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B6B4: 0083001B divu $a0, $v1 */ { uint32_t psx_n = cpu->gpr[4]; 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(0x0083001Bu, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800311B4u); #endif if (psx_delay_BFC0B6B0) { psx_delay_BFC0B6B0 = 0; if (psx_taken_BFC0B6B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800311BCu); goto label_BFC0B6BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800311B8u); } label_BFC0B6B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B6B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B6B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800311B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0B6B8: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800311B8u); return; #ifdef PSX_COSIM cosim_instr(0x800311B8u); #endif 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, 0x800311BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B6BC: 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(0x800311BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800311C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B6C0: 00021100 sll $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 4u; PGXP_ALU(0x00021100u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x800311C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B6C4: 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(0x800311C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B6C8: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800311C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B6CC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800311CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800311D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B6D0: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800311D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0B6D4: A0461802 sb $a2, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311D4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0461802u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x800311D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B6D8: A0451802 sb $a1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0451802u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800311D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B6DC: A0441802 sb $a0, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441802u, _pgxa, cpu->gpr[4]); } #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, 0x11u); #endif /* 0xBFC0B6E0: 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(0x800311E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B6E4: A0441801 sb $a0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800311E4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800311E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B6E8: 1000FF23 beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B6E8 = cpu->gpr[0]; uint32_t psx_brB_BFC0B6E8 = cpu->gpr[0]; psx_taken_BFC0B6E8 = (psx_brA_BFC0B6E8 == psx_brB_BFC0B6E8); psx_delay_BFC0B6E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0B6EC: AE033D8C sw $v1, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800311ECu); return; } g_debug_last_store_pc = 0x800311ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE033D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800311ECu); #endif if (psx_delay_BFC0B6E8) { psx_delay_BFC0B6E8 = 0; if (psx_taken_BFC0B6E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800311F0u); } label_BFC0B6F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B6F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B6F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800311F0u); #endif /* 0xBFC0B6F0: 92230020 lbu $v1, 32($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 32; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (32)), 3, 0x20000u); PGXP_LOAD(0x92230020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800311F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B6F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800311F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B6F8: 14640012 bne $v1, $a0, 0xBFC0B744 */ uint32_t psx_brA_BFC0B6F8 = cpu->gpr[3]; uint32_t psx_brB_BFC0B6F8 = cpu->gpr[4]; psx_taken_BFC0B6F8 = (psx_brA_BFC0B6F8 != psx_brB_BFC0B6F8); psx_delay_BFC0B6F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC0B6FC: 26240021 addiu $a0, $s1, 33 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (33)); PGXP_ALU(0x26240021u, cpu->gpr[4], _pgx1, 0x00000021u); } #ifdef PSX_COSIM cosim_instr(0x800311FCu); #endif if (psx_delay_BFC0B6F8) { psx_delay_BFC0B6F8 = 0; if (psx_taken_BFC0B6F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031244u); goto label_BFC0B744; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031200u); } label_BFC0B700: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B700u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0B700: 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(0x80031200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0B704: 24060009 addiu $a2, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24060009u, cpu->gpr[6], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0x80031204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100020u); #endif /* 0xBFC0B708: 268534E8 addiu $a1, $s4, 13544 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[20] + (13544)); PGXP_ALU(0x268534E8u, cpu->gpr[5], _pgx1, 0x000034E8u); } #ifdef PSX_COSIM cosim_instr(0x80031208u); #endif 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, 0x8003120Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B70C: 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(0x8003120Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC0B710: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x80031218u; /* jalr link before delay slot */ psx_delay_BFC0B710 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B714: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031214u); #endif if (psx_delay_BFC0B710) { psx_delay_BFC0B710 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x80031218u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0B718: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B718u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B718: 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(0x80031218u); #endif label_BFC0B71C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B71Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B71Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003121Cu); #endif /* 0xBFC0B71C: 92230000 lbu $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x92230000u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0B720: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC0B724: 02238821 addu $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(0x02238821u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0008u); #endif /* 0xBFC0B728: 0233182B sltu $v1, $s1, $s3 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[19]; cpu->gpr[3] = (uint32_t)(cpu->gpr[17] < cpu->gpr[19] ? 1 : 0); PGXP_ALU(0x0233182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B72C: 14600014 bne $v1, $zero, 0xBFC0B780 */ uint32_t psx_brA_BFC0B72C = cpu->gpr[3]; uint32_t psx_brB_BFC0B72C = cpu->gpr[0]; psx_taken_BFC0B72C = (psx_brA_BFC0B72C != psx_brB_BFC0B72C); psx_delay_BFC0B72C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B730: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031230u); #endif if (psx_delay_BFC0B72C) { psx_delay_BFC0B72C = 0; if (psx_taken_BFC0B72C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031280u); cpu->pc = 0x80031280u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031234u); } label_BFC0B734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B734u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B734: 1040FFB1 beq $v0, $zero, 0xBFC0B5FC */ uint32_t psx_brA_BFC0B734 = cpu->gpr[2]; uint32_t psx_brB_BFC0B734 = cpu->gpr[0]; psx_taken_BFC0B734 = (psx_brA_BFC0B734 == psx_brB_BFC0B734); psx_delay_BFC0B734 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B738: 2402000E addiu $v0, $zero, 14 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); PGXP_ALU(0x2402000Eu, cpu->gpr[2], _pgx1, 0x0000000Eu); } #ifdef PSX_COSIM cosim_instr(0x80031238u); #endif if (psx_delay_BFC0B734) { psx_delay_BFC0B734 = 0; if (psx_taken_BFC0B734) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800310FCu); goto label_BFC0B5FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003123Cu); } label_BFC0B73C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B73Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B73Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003123Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B73C: 1000FF0E beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B73C = cpu->gpr[0]; uint32_t psx_brB_BFC0B73C = cpu->gpr[0]; psx_taken_BFC0B73C = (psx_brA_BFC0B73C == psx_brB_BFC0B73C); psx_delay_BFC0B73C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B740: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031240u); return; } g_debug_last_store_pc = 0x80031240u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031240u); #endif if (psx_delay_BFC0B73C) { psx_delay_BFC0B73C = 0; if (psx_taken_BFC0B73C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031244u); } label_BFC0B744: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B744u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B744: 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(0x80031244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B748: 1464FFF4 bne $v1, $a0, 0xBFC0B71C */ uint32_t psx_brA_BFC0B748 = cpu->gpr[3]; uint32_t psx_brB_BFC0B748 = cpu->gpr[4]; psx_taken_BFC0B748 = (psx_brA_BFC0B748 != psx_brB_BFC0B748); psx_delay_BFC0B748 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC0B74C: 26240021 addiu $a0, $s1, 33 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (33)); PGXP_ALU(0x26240021u, cpu->gpr[4], _pgx1, 0x00000021u); } #ifdef PSX_COSIM cosim_instr(0x8003124Cu); #endif if (psx_delay_BFC0B748) { psx_delay_BFC0B748 = 0; if (psx_taken_BFC0B748) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003121Cu); goto label_BFC0B71C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031250u); } label_BFC0B750: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B750u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0B750: 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(0x80031250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0B754: 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(0x80031254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B758: 1000FFEC beq $zero, $zero, 0xBFC0B70C */ uint32_t psx_brA_BFC0B758 = cpu->gpr[0]; uint32_t psx_brB_BFC0B758 = cpu->gpr[0]; psx_taken_BFC0B758 = (psx_brA_BFC0B758 == psx_brB_BFC0B758); psx_delay_BFC0B758 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200021u); #endif /* 0xBFC0B75C: 02A02825 or $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(0x02A02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003125Cu); #endif if (psx_delay_BFC0B758) { psx_delay_BFC0B758 = 0; if (psx_taken_BFC0B758) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003120Cu); goto label_BFC0B70C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031260u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031260u); cpu->pc = 0x80031260u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B760(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B760u); int psx_delay_BFC0B788 = 0; int psx_taken_BFC0B788 = 0; int psx_delay_BFC0B790 = 0; int psx_taken_BFC0B790 = 0; int psx_delay_BFC0B798 = 0; int psx_taken_BFC0B798 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B780u: goto label_BFC0B780; case 0xBFC0B790u: goto label_BFC0B790; case 0xBFC0B798u: goto label_BFC0B798; default: break; } } label_BFC0B760: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B760u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0B760: 3C118004 lui $s1, 0x8004 */ cpu->gpr[17] = 0x80040000u; PGXP_ALU(0x3C118004u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B764: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0B768: 3C138004 lui $s3, 0x8004 */ cpu->gpr[19] = 0x80040000u; PGXP_ALU(0x3C138004u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B76C: 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(0x8003126Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0B770: 26313D90 addiu $s1, $s1, 15760 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (15760)); PGXP_ALU(0x26313D90u, cpu->gpr[17], _pgx1, 0x00003D90u); } #ifdef PSX_COSIM cosim_instr(0x80031270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200008u); #endif /* 0xBFC0B774: 247534F4 addiu $s5, $v1, 13556 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[21] = (uint32_t)((int32_t)cpu->gpr[3] + (13556)); PGXP_ALU(0x247534F4u, cpu->gpr[21], _pgx1, 0x000034F4u); } #ifdef PSX_COSIM cosim_instr(0x80031274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0B778: 3C148004 lui $s4, 0x8004 */ cpu->gpr[20] = 0x80040000u; PGXP_ALU(0x3C148004u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0B77C: 26734590 addiu $s3, $s3, 17808 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[19] = (uint32_t)((int32_t)cpu->gpr[19] + (17808)); PGXP_ALU(0x26734590u, cpu->gpr[19], _pgx1, 0x00004590u); } #ifdef PSX_COSIM cosim_instr(0x8003127Cu); #endif label_BFC0B780: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B780u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031280u); #endif /* 0xBFC0B780: 92230000 lbu $v1, 0($s1) */ { uint32_t _pgxa = cpu->gpr[17]; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[17] + (0)), 3, 0x20000u); PGXP_LOAD(0x92230000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B784: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B788: 1060FFEA beq $v1, $zero, 0xBFC0B734 */ uint32_t psx_brA_BFC0B788 = cpu->gpr[3]; uint32_t psx_brB_BFC0B788 = cpu->gpr[0]; psx_taken_BFC0B788 = (psx_brA_BFC0B788 == psx_brB_BFC0B788); psx_delay_BFC0B788 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B78C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003128Cu); #endif if (psx_delay_BFC0B788) { psx_delay_BFC0B788 = 0; if (psx_taken_BFC0B788) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031234u); cpu->pc = 0x80031234u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031290u); } label_BFC0B790: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B790u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B790: 1040FFD7 beq $v0, $zero, 0xBFC0B6F0 */ uint32_t psx_brA_BFC0B790 = cpu->gpr[2]; uint32_t psx_brB_BFC0B790 = cpu->gpr[0]; psx_taken_BFC0B790 = (psx_brA_BFC0B790 == psx_brB_BFC0B790); psx_delay_BFC0B790 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B794: 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(0x80031294u); #endif if (psx_delay_BFC0B790) { psx_delay_BFC0B790 = 0; if (psx_taken_BFC0B790) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800311F0u); cpu->pc = 0x800311F0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031298u); } label_BFC0B798: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B798u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B798: 1000FF4B beq $zero, $zero, 0xBFC0B4C8 */ uint32_t psx_brA_BFC0B798 = cpu->gpr[0]; uint32_t psx_brB_BFC0B798 = cpu->gpr[0]; psx_taken_BFC0B798 = (psx_brA_BFC0B798 == psx_brB_BFC0B798); psx_delay_BFC0B798 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B79C: 2402000E addiu $v0, $zero, 14 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (14)); PGXP_ALU(0x2402000Eu, cpu->gpr[2], _pgx1, 0x0000000Eu); } #ifdef PSX_COSIM cosim_instr(0x8003129Cu); #endif if (psx_delay_BFC0B798) { psx_delay_BFC0B798 = 0; if (psx_taken_BFC0B798) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FC8u); cpu->pc = 0x80030FC8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800312A0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800312A0u); cpu->pc = 0x800312A0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B7A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B7A0u); int psx_delay_BFC0B7B0 = 0; int psx_taken_BFC0B7B0 = 0; int psx_delay_BFC0B7CC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B7B8u: goto label_BFC0B7B8; default: break; } } label_BFC0B7A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B7A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B7A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312A0u); #endif /* 0xBFC0B7A0: 8E023D8C lw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800312A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800312A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B7A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800312A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B7A8: 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(0x800312A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B7AC: 2C43000A sltiu $v1, $v0, 10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C43000Au, cpu->gpr[3], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0x800312ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B7B0: 1060FEF1 beq $v1, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B7B0 = cpu->gpr[3]; uint32_t psx_brB_BFC0B7B0 = cpu->gpr[0]; psx_taken_BFC0B7B0 = (psx_brA_BFC0B7B0 == psx_brB_BFC0B7B0); psx_delay_BFC0B7B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B7B4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800312B4u); #endif if (psx_delay_BFC0B7B0) { psx_delay_BFC0B7B0 = 0; if (psx_taken_BFC0B7B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800312B8u); } label_BFC0B7B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B7B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B7B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B7B8: 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(0x800312B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B7BC: 246335FC addiu $v1, $v1, 13820 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (13820)); PGXP_ALU(0x246335FCu, cpu->gpr[3], _pgx1, 0x000035FCu); } #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, 0xCu); #endif /* 0xBFC0B7C0: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800312C0u); #endif /* 0xBFC0B7C4: 8C420000 lw $v0, 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, 0x800312C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800312C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B7C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800312C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B7CC: 00400008 jr $v0 */ psx_delay_BFC0B7CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B7D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800312D0u); #endif if (psx_delay_BFC0B7CC) { psx_delay_BFC0B7CC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC0B7D4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B7D4u); int psx_delay_BFC0B7E4 = 0; int psx_taken_BFC0B7E4 = 0; label_BFC0B7D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B7D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B7D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B7D4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800312D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B7D8: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800312D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800312D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B7DC: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800312DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312E0u); #endif /* 0xBFC0B7E0: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800312E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B7E4: 1000FEE4 beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B7E4 = cpu->gpr[0]; uint32_t psx_brB_BFC0B7E4 = cpu->gpr[0]; psx_taken_BFC0B7E4 = (psx_brA_BFC0B7E4 == psx_brB_BFC0B7E4); psx_delay_BFC0B7E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B7E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800312E8u); #endif if (psx_delay_BFC0B7E4) { psx_delay_BFC0B7E4 = 0; if (psx_taken_BFC0B7E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800312ECu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800312ECu); cpu->pc = 0x800312ECu; return; /* fallthrough */ } void OpenBIOS_func_1FC0B7EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B7ECu); int psx_delay_BFC0B808 = 0; int psx_taken_BFC0B808 = 0; label_BFC0B7EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B7ECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B7ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800312ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B7EC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x5u); #endif /* 0xBFC0B7F0: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800312F0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800312F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B7F4: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800312F4u); #endif /* 0xBFC0B7F8: 90631801 lbu $v1, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 3, 0x8u); PGXP_LOAD(0x90631801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800312F8u); #endif /* 0xBFC0B7FC: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800312FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031300u); #endif /* 0xBFC0B800: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B804: 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(0x80031304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B808: 1000FEF5 beq $zero, $zero, 0xBFC0B3E0 */ uint32_t psx_brA_BFC0B808 = cpu->gpr[0]; uint32_t psx_brB_BFC0B808 = cpu->gpr[0]; psx_taken_BFC0B808 = (psx_brA_BFC0B808 == psx_brB_BFC0B808); psx_delay_BFC0B808 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0B80C: AE033D8C sw $v1, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003130Cu); return; } g_debug_last_store_pc = 0x8003130Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE033D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003130Cu); #endif if (psx_delay_BFC0B808) { psx_delay_BFC0B808 = 0; if (psx_taken_BFC0B808) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030EE0u); cpu->pc = 0x80030EE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031310u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031310u); cpu->pc = 0x80031310u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B810(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B810u); int psx_delay_BFC0B83C = 0; int psx_taken_BFC0B83C = 0; label_BFC0B810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B810u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B810: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B814: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031314u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B818: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031318u); #endif /* 0xBFC0B81C: 90631801 lbu $v1, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 3, 0x8u); PGXP_LOAD(0x90631801u, _pgxa, cpu->gpr[3]); } #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, 0x11u); #endif /* 0xBFC0B820: 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(0x80031320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B824: 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(0x80031324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B828: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031328u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B82C: A0401802 sb $zero, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003132Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401802u, _pgxa, cpu->gpr[0]); } #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, 0xCu); #endif /* 0xBFC0B830: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031330u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B834: A0441802 sb $a0, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031334u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441802u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B838: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031338u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B83C: 1000FF22 beq $zero, $zero, 0xBFC0B4C8 */ uint32_t psx_brA_BFC0B83C = cpu->gpr[0]; uint32_t psx_brB_BFC0B83C = cpu->gpr[0]; psx_taken_BFC0B83C = (psx_brA_BFC0B83C == psx_brB_BFC0B83C); psx_delay_BFC0B83C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B840: 24020006 addiu $v0, $zero, 6 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (6)); PGXP_ALU(0x24020006u, cpu->gpr[2], _pgx1, 0x00000006u); } #ifdef PSX_COSIM cosim_instr(0x80031340u); #endif if (psx_delay_BFC0B83C) { psx_delay_BFC0B83C = 0; if (psx_taken_BFC0B83C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030FC8u); cpu->pc = 0x80030FC8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031344u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031344u); cpu->pc = 0x80031344u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B844(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B844u); int psx_delay_BFC0B860 = 0; int psx_taken_BFC0B860 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B858u: goto label_BFC0B858; default: break; } } label_BFC0B844: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B844u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B844: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B848: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031348u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B84C: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003134Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031350u); #endif /* 0xBFC0B850: 90631801 lbu $v1, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 3, 0x8u); PGXP_LOAD(0x90631801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B854: 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(0x80031354u); #endif label_BFC0B858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B858u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC0B858: AE033D8C sw $v1, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031358u); return; } g_debug_last_store_pc = 0x80031358u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE033D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B85C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003135Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC0B860: 1000FF33 beq $zero, $zero, 0xBFC0B530 */ uint32_t psx_brA_BFC0B860 = cpu->gpr[0]; uint32_t psx_brB_BFC0B860 = cpu->gpr[0]; psx_taken_BFC0B860 = (psx_brA_BFC0B860 == psx_brB_BFC0B860); psx_delay_BFC0B860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B864: 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(0x80031364u); #endif if (psx_delay_BFC0B860) { psx_delay_BFC0B860 = 0; if (psx_taken_BFC0B860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031030u); cpu->pc = 0x80031030u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031368u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031368u); cpu->pc = 0x80031368u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B868(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B868u); int psx_delay_BFC0B878 = 0; int psx_taken_BFC0B878 = 0; label_BFC0B868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B868u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B868: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B86C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003136Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #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, 0x8u); #endif /* 0xBFC0B870: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031370u); #endif /* 0xBFC0B874: 90631801 lbu $v1, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 3, 0x8u); PGXP_LOAD(0x90631801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B878: 1000FFF7 beq $zero, $zero, 0xBFC0B858 */ uint32_t psx_brA_BFC0B878 = cpu->gpr[0]; uint32_t psx_brB_BFC0B878 = cpu->gpr[0]; psx_taken_BFC0B878 = (psx_brA_BFC0B878 == psx_brB_BFC0B878); psx_delay_BFC0B878 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B87C: 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(0x8003137Cu); #endif if (psx_delay_BFC0B878) { psx_delay_BFC0B878 = 0; if (psx_taken_BFC0B878) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031358u); cpu->pc = 0x80031358u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031380u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031380u); cpu->pc = 0x80031380u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B880(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B880u); int psx_delay_BFC0B880 = 0; int psx_taken_BFC0B880 = 0; label_BFC0B880: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B880u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B880: 1000FEBD beq $zero, $zero, 0xBFC0B378 */ uint32_t psx_brA_BFC0B880 = cpu->gpr[0]; uint32_t psx_brB_BFC0B880 = cpu->gpr[0]; psx_taken_BFC0B880 = (psx_brA_BFC0B880 == psx_brB_BFC0B880); psx_delay_BFC0B880 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC0B884: AE003D8C sw $zero, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); 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[0]); } PGXP_STORE(0xAE003D8Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031384u); #endif if (psx_delay_BFC0B880) { psx_delay_BFC0B880 = 0; if (psx_taken_BFC0B880) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030E78u); cpu->pc = 0x80030E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031388u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031388u); cpu->pc = 0x80031388u; return; /* fallthrough */ } void OpenBIOS_func_1FC0B888(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B888u); int psx_delay_BFC0B8B4 = 0; int psx_taken_BFC0B8B4 = 0; int psx_delay_BFC0B8C4 = 0; int psx_taken_BFC0B8C4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B8BCu: goto label_BFC0B8BC; case 0xBFC0B8C4u: goto label_BFC0B8C4; default: break; } } label_BFC0B888: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B888u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B888: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B88C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003138Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #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, 0x4u); #endif /* 0xBFC0B890: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031390u); #endif /* 0xBFC0B894: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B898: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031398u); #endif /* 0xBFC0B89C: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003139Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313A0u); #endif /* 0xBFC0B8A0: 8C624590 lw $v0, 17808($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 17808; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (17808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C624590u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800313A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B8A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800313A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0B8A8: 24440001 addiu $a0, $v0, 1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (1)); PGXP_ALU(0x24440001u, cpu->gpr[4], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x800313A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0B8AC: AC644590 sw $a0, 17808($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 17808; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (17808)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313ACu); return; } g_debug_last_store_pc = 0x800313ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644590u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800313ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0B8B0: 24030014 addiu $v1, $zero, 20 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (20)); PGXP_ALU(0x24030014u, cpu->gpr[3], _pgx1, 0x00000014u); } #ifdef PSX_COSIM cosim_instr(0x800313B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B8B4: 14430003 bne $v0, $v1, 0xBFC0B8C4 */ uint32_t psx_brA_BFC0B8B4 = cpu->gpr[2]; uint32_t psx_brB_BFC0B8B4 = cpu->gpr[3]; psx_taken_BFC0B8B4 = (psx_brA_BFC0B8B4 != psx_brB_BFC0B8B4); psx_delay_BFC0B8B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B8B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800313B8u); #endif if (psx_delay_BFC0B8B4) { psx_delay_BFC0B8B4 = 0; if (psx_taken_BFC0B8B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313C4u); goto label_BFC0B8C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313BCu); } label_BFC0B8BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B8BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B8BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B8BC: 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(0x800313BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0B8C0: AE023D8C sw $v0, 15756($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15756; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313C0u); return; } g_debug_last_store_pc = 0x800313C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D8Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800313C0u); #endif label_BFC0B8C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B8C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B8C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B8C4: 1000FF4F beq $zero, $zero, 0xBFC0B604 */ uint32_t psx_brA_BFC0B8C4 = cpu->gpr[0]; uint32_t psx_brB_BFC0B8C4 = cpu->gpr[0]; psx_taken_BFC0B8C4 = (psx_brA_BFC0B8C4 == psx_brB_BFC0B8C4); psx_delay_BFC0B8C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B8C8: 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(0x800313C8u); #endif if (psx_delay_BFC0B8C4) { psx_delay_BFC0B8C4 = 0; if (psx_taken_BFC0B8C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031104u); cpu->pc = 0x80031104u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313CCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313CCu); cpu->pc = 0x800313CCu; return; /* fallthrough */ } void OpenBIOS_func_1FC0B8CC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B8CCu); int psx_delay_BFC0B918 = 0; int psx_taken_BFC0B918 = 0; int psx_delay_BFC0B920 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B8ECu: goto label_BFC0B8EC; case 0xBFC0B920u: goto label_BFC0B920; default: break; } } label_BFC0B8CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B8CCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B8CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B8CC: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #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, 0x40u); #endif /* 0xBFC0B8D0: 3C060100 lui $a2, 0x100 */ cpu->gpr[6] = 0x01000000u; PGXP_ALU(0x3C060100u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800313D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0B8D4: AC864598 sw $a2, 17816($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 17816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (17816)); 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(0xAC864598u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x800313D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B8D8: 24844598 addiu $a0, $a0, 17816 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17816)); PGXP_ALU(0x24844598u, cpu->gpr[4], _pgx1, 0x00004598u); } #ifdef PSX_COSIM cosim_instr(0x800313D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B8DC: 24C6FFB1 addiu $a2, $a2, -79 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-79)); PGXP_ALU(0x24C6FFB1u, cpu->gpr[6], _pgx1, 0xFFFFFFB1u); } #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, 0x50u); #endif /* 0xBFC0B8E0: AC860004 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800313E0u); return; } g_debug_last_store_pc = 0x800313E0u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC860004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x800313E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0B8E4: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800313E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC0B8E8: 248707F4 addiu $a3, $a0, 2036 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[4] + (2036)); PGXP_ALU(0x248707F4u, cpu->gpr[7], _pgx1, 0x000007F4u); } #ifdef PSX_COSIM cosim_instr(0x800313E8u); #endif 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, 0x800313ECu); #endif /* 0xBFC0B8EC: 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, 0x800313ECu); 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(0x800313ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800313F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B8F0: 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(0x800313F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0B8F4: 00460018 mult $v0, $a2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[6]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00460018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[6]); #ifdef PSX_COSIM cosim_instr(0x800313F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0B8F8: 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(0x800313F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0B8FC: 000815C2 srl $v0, $t0, 23 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 23u; PGXP_ALU(0x000815C2u, cpu->gpr[2], _pgx1, 23u); } #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, 0x200u); #endif /* 0xBFC0B900: 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(0x80031400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0B904: 00091A40 sll $v1, $t1, 9 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 9u; PGXP_ALU(0x00091A40u, cpu->gpr[3], _pgx1, 9u); } #ifdef PSX_COSIM cosim_instr(0x80031404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B908: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031408u); #endif /* 0xBFC0B90C: 8CA3FFFC lw $v1, -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, 0x8003140Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x8CA3FFFCu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0B910: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B914: 00431023 subu $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(0x00431023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0B918: 14A7FFF4 bne $a1, $a3, 0xBFC0B8EC */ uint32_t psx_brA_BFC0B918 = cpu->gpr[5]; uint32_t psx_brB_BFC0B918 = cpu->gpr[7]; psx_taken_BFC0B918 = (psx_brA_BFC0B918 != psx_brB_BFC0B918); psx_delay_BFC0B918 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B91C: ACA20004 sw $v0, 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, 0x8003141Cu); return; } g_debug_last_store_pc = 0x8003141Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003141Cu); #endif if (psx_delay_BFC0B918) { psx_delay_BFC0B918 = 0; if (psx_taken_BFC0B918) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800313ECu); goto label_BFC0B8EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031420u); } 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, 0x80031420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B920: 03E00008 jr $ra */ psx_delay_BFC0B920 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B924: AC8007FC sw $zero, 2044($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 2044; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (2044)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031424u); return; } g_debug_last_store_pc = 0x80031424u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC8007FCu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031424u); #endif if (psx_delay_BFC0B920) { psx_delay_BFC0B920 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B928(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B928u); int psx_delay_BFC0B93C = 0; int psx_taken_BFC0B93C = 0; int psx_delay_BFC0B944 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B930u: goto label_BFC0B930; case 0xBFC0B944u: goto label_BFC0B944; default: break; } } label_BFC0B928: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B928u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0B928: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B92C: 3C030400 lui $v1, 0x400 */ cpu->gpr[3] = 0x04000000u; PGXP_ALU(0x3C030400u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003142Cu); #endif label_BFC0B930: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B930u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031430u); #endif /* 0xBFC0B930: 8C821814 lw $v0, 6164($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031430u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B934: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B938: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B93C: 1040FFFC beq $v0, $zero, 0xBFC0B930 */ uint32_t psx_brA_BFC0B93C = cpu->gpr[2]; uint32_t psx_brB_BFC0B93C = cpu->gpr[0]; psx_taken_BFC0B93C = (psx_brA_BFC0B93C == psx_brB_BFC0B93C); psx_delay_BFC0B93C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B940: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031440u); #endif if (psx_delay_BFC0B93C) { psx_delay_BFC0B93C = 0; if (psx_taken_BFC0B93C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031430u); goto label_BFC0B930; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031444u); } label_BFC0B944: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B944u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0B944: 03E00008 jr $ra */ psx_delay_BFC0B944 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B948: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031448u); #endif if (psx_delay_BFC0B944) { psx_delay_BFC0B944 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0B94C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0B94Cu); int psx_delay_BFC0B954 = 0; int psx_taken_BFC0B954 = 0; int psx_delay_BFC0B970 = 0; int psx_taken_BFC0B970 = 0; int psx_delay_BFC0B994 = 0; int psx_taken_BFC0B994 = 0; int psx_delay_BFC0B9A8 = 0; int psx_delay_BFC0B9C8 = 0; int psx_delay_BFC0B9E8 = 0; int psx_delay_BFC0BA04 = 0; int psx_delay_BFC0BA48 = 0; int psx_delay_BFC0BA54 = 0; int psx_taken_BFC0BA54 = 0; int psx_delay_BFC0BA68 = 0; int psx_delay_BFC0BAA0 = 0; int psx_taken_BFC0BAA0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0B95Cu: goto label_BFC0B95C; case 0xBFC0B978u: goto label_BFC0B978; case 0xBFC0B97Cu: goto label_BFC0B97C; case 0xBFC0B99Cu: goto label_BFC0B99C; case 0xBFC0B9A0u: goto label_BFC0B9A0; case 0xBFC0B9B0u: goto label_BFC0B9B0; case 0xBFC0B9D0u: goto label_BFC0B9D0; case 0xBFC0B9F0u: goto label_BFC0B9F0; case 0xBFC0BA0Cu: goto label_BFC0BA0C; case 0xBFC0BA40u: goto label_BFC0BA40; case 0xBFC0BA50u: goto label_BFC0BA50; case 0xBFC0BA5Cu: goto label_BFC0BA5C; case 0xBFC0BA70u: goto label_BFC0BA70; default: break; } } label_BFC0B94C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B94Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B94Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003144Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0B94C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x8003144Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0B950: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031450u); return; } g_debug_last_store_pc = 0x80031450u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B954: 10800041 beq $a0, $zero, 0xBFC0BA5C */ uint32_t psx_brA_BFC0B954 = cpu->gpr[4]; uint32_t psx_brB_BFC0B954 = cpu->gpr[0]; psx_taken_BFC0B954 = (psx_brA_BFC0B954 == psx_brB_BFC0B954); psx_delay_BFC0B954 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC0B958: 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, 0x80031458u); return; } g_debug_last_store_pc = 0x80031458u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031458u); #endif if (psx_delay_BFC0B954) { psx_delay_BFC0B954 = 0; if (psx_taken_BFC0B954) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003155Cu); goto label_BFC0BA5C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003145Cu); } label_BFC0B95C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B95Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B95Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003145Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0B95C: 3C068004 lui $a2, 0x8004 */ cpu->gpr[6] = 0x80040000u; PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003145Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031460u); #endif /* 0xBFC0B960: 8CC34D9C lw $v1, 19868($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19868; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031460u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } PGXP_LOAD(0x8CC34D9Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0B964: 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(0x80031464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B968: 38620001 xori $v0, $v1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] ^ 0x1u; PGXP_ALU(0x38620001u, cpu->gpr[2], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80031468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0B96C: ACC24D9C sw $v0, 19868($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19868; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19868)); 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[2]); } PGXP_STORE(0xACC24D9Cu, _pgxa, cpu->gpr[2]); } #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, 0x18u); #endif /* 0xBFC0B970: 10640002 beq $v1, $a0, 0xBFC0B97C */ uint32_t psx_brA_BFC0B970 = cpu->gpr[3]; uint32_t psx_brB_BFC0B970 = cpu->gpr[4]; psx_taken_BFC0B970 = (psx_brA_BFC0B970 == psx_brB_BFC0B970); psx_delay_BFC0B970 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B974: 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(0x80031474u); #endif if (psx_delay_BFC0B970) { psx_delay_BFC0B970 = 0; if (psx_taken_BFC0B970) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003147Cu); goto label_BFC0B97C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031478u); } label_BFC0B978: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B978u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B978: 24020280 addiu $v0, $zero, 640 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); PGXP_ALU(0x24020280u, cpu->gpr[2], _pgx1, 0x00000280u); } #ifdef PSX_COSIM cosim_instr(0x80031478u); #endif label_BFC0B97C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B97Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B97Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003147Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B97C: 3C030500 lui $v1, 0x500 */ cpu->gpr[3] = 0x05000000u; PGXP_ALU(0x3C030500u, cpu->gpr[3], 0u, 0u); #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, 0xCu); #endif /* 0xBFC0B980: 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(0x80031480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B984: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0B988: AC621814 sw $v0, 6164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031488u); return; } g_debug_last_store_pc = 0x80031488u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031488u); #endif /* 0xBFC0B98C: 8CC24D9C lw $v0, 19868($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19868; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003148Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } PGXP_LOAD(0x8CC24D9Cu, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0B990: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B994: 1040002E beq $v0, $zero, 0xBFC0BA50 */ uint32_t psx_brA_BFC0B994 = cpu->gpr[2]; uint32_t psx_brB_BFC0B994 = cpu->gpr[0]; psx_taken_BFC0B994 = (psx_brA_BFC0B994 == psx_brB_BFC0B994); psx_delay_BFC0B994 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0B998: 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(0x80031498u); #endif if (psx_delay_BFC0B994) { psx_delay_BFC0B994 = 0; if (psx_taken_BFC0B994) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031550u); goto label_BFC0BA50; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003149Cu); } label_BFC0B99C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B99Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B99Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003149Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0B99C: 24050280 addiu $a1, $zero, 640 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); PGXP_ALU(0x24050280u, cpu->gpr[5], _pgx1, 0x00000280u); } #ifdef PSX_COSIM cosim_instr(0x8003149Cu); #endif label_BFC0B9A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B9A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B9A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800314A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0B9A0: 3C03E300 lui $v1, 0xE300 */ cpu->gpr[3] = 0xE3000000u; PGXP_ALU(0x3C03E300u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800314A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10Cu); #endif /* 0xBFC0B9A4: 00434025 or $t0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[8] = cpu->gpr[2] | cpu->gpr[3]; PGXP_ALU(0x00434025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800314A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B9A8: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x800314B0u; /* jal link before delay slot */ psx_delay_BFC0B9A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B9AC: 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(0x800314ACu); #endif if (psx_delay_BFC0B9A8) { psx_delay_BFC0B9A8 = 0; cpu->gpr[31] = 0x800314B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0B9B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B9B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B9B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800314B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B9B0: 3C02E407 lui $v0, 0xE407 */ cpu->gpr[2] = 0xE4070000u; PGXP_ALU(0x3C02E407u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800314B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0B9B4: 3C071F80 lui $a3, 0x1F80 */ cpu->gpr[7] = 0x1F800000u; PGXP_ALU(0x3C071F80u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800314B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B9B8: 24427C00 addiu $v0, $v0, 31744 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (31744)); PGXP_ALU(0x24427C00u, cpu->gpr[2], _pgx1, 0x00007C00u); } #ifdef PSX_COSIM cosim_instr(0x800314B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B9BC: 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(0x800314BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800314C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B9C0: 00A22825 or $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] | cpu->gpr[2]; PGXP_ALU(0x00A22825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800314C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0B9C4: ACE81810 sw $t0, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314C4u); return; } g_debug_last_store_pc = 0x800314C4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE81810u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800314C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B9C8: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x800314D0u; /* jal link before delay slot */ psx_delay_BFC0B9C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0B9CC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800314CCu); #endif if (psx_delay_BFC0B9C8) { psx_delay_BFC0B9C8 = 0; cpu->gpr[31] = 0x800314D0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; 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, 0x800314D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0B9D0: ACE51810 sw $a1, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314D0u); return; } g_debug_last_store_pc = 0x800314D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xACE51810u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800314D0u); #endif /* 0xBFC0B9D4: 8CC54D9C lw $a1, 19868($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19868; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314D4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x40u); } PGXP_LOAD(0x8CC54D9Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800314D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0B9D8: 3C02E500 lui $v0, 0xE500 */ cpu->gpr[2] = 0xE5000000u; PGXP_ALU(0x3C02E500u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800314D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B9DC: 2CA50001 sltiu $a1, $a1, 1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2CA50001u, cpu->gpr[5], _pgx1, 0x0001u); } #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, 0x21u); #endif /* 0xBFC0B9E0: 00052823 subu $a1, $zero, $a1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[0] - cpu->gpr[5]; PGXP_ALU(0x00052823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800314E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0B9E4: 30A50280 andi $a1, $a1, 0x280 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x280u; PGXP_ALU(0x30A50280u, cpu->gpr[5], _pgx1, 0x0280u); } #ifdef PSX_COSIM cosim_instr(0x800314E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0B9E8: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x800314F0u; /* jal link before delay slot */ psx_delay_BFC0B9E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0B9EC: 00A22825 or $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] | cpu->gpr[2]; PGXP_ALU(0x00A22825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800314ECu); #endif if (psx_delay_BFC0B9E8) { psx_delay_BFC0B9E8 = 0; cpu->gpr[31] = 0x800314F0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0B9F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0B9F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0B9F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800314F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0B9F0: ACE51810 sw $a1, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800314F0u); return; } g_debug_last_store_pc = 0x800314F0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xACE51810u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800314F0u); #endif /* 0xBFC0B9F4: 93A5001D lbu $a1, 29($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 29; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (29)), 5, 0x20000000u); PGXP_LOAD(0x93A5001Du, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800314F4u); #endif /* 0xBFC0B9F8: 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(0x800314F8u); #endif /* 0xBFC0B9FC: 93A9001C lbu $t1, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[9] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 9, 0x20000000u); PGXP_LOAD(0x93A9001Cu, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x800314FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031500u); #endif /* 0xBFC0BA00: 8CC64D9C lw $a2, 19868($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19868; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031500u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } PGXP_LOAD(0x8CC64D9Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BA04: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x8003150Cu; /* jal link before delay slot */ psx_delay_BFC0BA04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0BA08: 2CC60001 sltiu $a2, $a2, 1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)(cpu->gpr[6] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2CC60001u, cpu->gpr[6], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80031508u); #endif if (psx_delay_BFC0BA04) { psx_delay_BFC0BA04 = 0; cpu->gpr[31] = 0x8003150Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0BA0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BA0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BA0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0BA0C: 00081C00 sll $v1, $t0, 16 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] << 16u; PGXP_ALU(0x00081C00u, cpu->gpr[3], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x8003150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BA10: 00051200 sll $v0, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051200u, cpu->gpr[2], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80031510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA14: 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(0x80031514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0BA18: 00491025 or $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(0x00491025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BA1C: 3C030200 lui $v1, 0x200 */ cpu->gpr[3] = 0x02000000u; PGXP_ALU(0x3C030200u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003151Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA20: 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(0x80031520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0BA24: ACE21810 sw $v0, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031524u); return; } g_debug_last_store_pc = 0x80031524u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE21810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0BA28: 00063023 subu $a2, $zero, $a2 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[0] - cpu->gpr[6]; PGXP_ALU(0x00063023u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BA2C: 3C0201E0 lui $v0, 0x1E0 */ cpu->gpr[2] = 0x01E00000u; PGXP_ALU(0x3C0201E0u, cpu->gpr[2], 0u, 0u); #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, 0x40u); #endif /* 0xBFC0BA30: 30C60280 andi $a2, $a2, 0x280 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x280u; PGXP_ALU(0x30C60280u, cpu->gpr[6], _pgx1, 0x0280u); } #ifdef PSX_COSIM cosim_instr(0x80031530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BA34: 24420280 addiu $v0, $v0, 640 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (640)); PGXP_ALU(0x24420280u, cpu->gpr[2], _pgx1, 0x00000280u); } #ifdef PSX_COSIM cosim_instr(0x80031534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0BA38: ACE61810 sw $a2, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); 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[6]); } PGXP_STORE(0xACE61810u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0BA3C: ACE21810 sw $v0, 6160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003153Cu); return; } g_debug_last_store_pc = 0x8003153Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE21810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003153Cu); #endif label_BFC0BA40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BA40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BA40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031540u); #endif /* 0xBFC0BA40: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031540u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BA44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BA48: 03E00008 jr $ra */ psx_delay_BFC0BA48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BA4C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x8003154Cu); #endif if (psx_delay_BFC0BA48) { psx_delay_BFC0BA48 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0BA50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BA50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BA50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BA50: 24020280 addiu $v0, $zero, 640 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (640)); PGXP_ALU(0x24020280u, cpu->gpr[2], _pgx1, 0x00000280u); } #ifdef PSX_COSIM cosim_instr(0x80031550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BA54: 1000FFD2 beq $zero, $zero, 0xBFC0B9A0 */ uint32_t psx_brA_BFC0BA54 = cpu->gpr[0]; uint32_t psx_brB_BFC0BA54 = cpu->gpr[0]; psx_taken_BFC0BA54 = (psx_brA_BFC0BA54 == psx_brB_BFC0BA54); psx_delay_BFC0BA54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0BA58: 24050500 addiu $a1, $zero, 1280 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (1280)); PGXP_ALU(0x24050500u, cpu->gpr[5], _pgx1, 0x00000500u); } #ifdef PSX_COSIM cosim_instr(0x80031558u); #endif if (psx_delay_BFC0BA54) { psx_delay_BFC0BA54 = 0; if (psx_taken_BFC0BA54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800314A0u); goto label_BFC0B9A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003155Cu); } label_BFC0BA5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BA5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BA5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003155Cu); #endif /* 0xBFC0BA5C: 93A5001D lbu $a1, 29($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 29; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (29)), 5, 0x20000000u); PGXP_LOAD(0x93A5001Du, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x8003155Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031560u); #endif /* 0xBFC0BA60: 93A6001E lbu $a2, 30($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 30; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (30)), 6, 0x20000000u); PGXP_LOAD(0x93A6001Eu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031560u); #endif /* 0xBFC0BA64: 93A7001C lbu $a3, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (28)), 7, 0x20000000u); PGXP_LOAD(0x93A7001Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80031564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BA68: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x80031570u; /* jal link before delay slot */ psx_delay_BFC0BA68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BA6C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003156Cu); #endif if (psx_delay_BFC0BA68) { psx_delay_BFC0BA68 = 0; cpu->gpr[31] = 0x80031570u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0BA70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BA70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BA70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0BA70: 00061C00 sll $v1, $a2, 16 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] << 16u; PGXP_ALU(0x00061C00u, cpu->gpr[3], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x80031570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BA74: 00051200 sll $v0, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051200u, cpu->gpr[2], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80031574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA78: 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(0x80031578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0BA7C: 00471025 or $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[2] | cpu->gpr[7]; PGXP_ALU(0x00471025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x8u); #endif /* 0xBFC0BA80: 3C030200 lui $v1, 0x200 */ cpu->gpr[3] = 0x02000000u; PGXP_ALU(0x3C030200u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA84: 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(0x80031584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BA88: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA8C: AC621810 sw $v0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003158Cu); return; } g_debug_last_store_pc = 0x8003158Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621810u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC0BA90: 3C0201E0 lui $v0, 0x1E0 */ cpu->gpr[2] = 0x01E00000u; PGXP_ALU(0x3C0201E0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BA94: 24420280 addiu $v0, $v0, 640 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (640)); PGXP_ALU(0x24420280u, cpu->gpr[2], _pgx1, 0x00000280u); } #ifdef PSX_COSIM cosim_instr(0x80031594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0BA98: AC601810 sw $zero, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031598u); return; } g_debug_last_store_pc = 0x80031598u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC601810u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BA9C: AC621810 sw $v0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003159Cu); return; } g_debug_last_store_pc = 0x8003159Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621810u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0BAA0: 1000FFE7 beq $zero, $zero, 0xBFC0BA40 */ uint32_t psx_brA_BFC0BAA0 = cpu->gpr[0]; uint32_t psx_brB_BFC0BAA0 = cpu->gpr[0]; psx_taken_BFC0BAA0 = (psx_brA_BFC0BAA0 == psx_brB_BFC0BAA0); psx_delay_BFC0BAA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BAA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800315A4u); #endif if (psx_delay_BFC0BAA0) { psx_delay_BFC0BAA0 = 0; if (psx_taken_BFC0BAA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031540u); goto label_BFC0BA40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315A8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315A8u); cpu->pc = 0x800315A8u; return; /* fallthrough */ } void OpenBIOS_func_1FC0BAA8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BAA8u); int psx_delay_BFC0BABC = 0; int psx_taken_BFC0BABC = 0; int psx_delay_BFC0BAD4 = 0; int psx_taken_BFC0BAD4 = 0; int psx_delay_BFC0BAEC = 0; int psx_taken_BFC0BAEC = 0; int psx_delay_BFC0BAF4 = 0; int psx_taken_BFC0BAF4 = 0; int psx_delay_BFC0BAFC = 0; int psx_taken_BFC0BAFC = 0; int psx_delay_BFC0BB08 = 0; int psx_taken_BFC0BB08 = 0; int psx_delay_BFC0BB30 = 0; int psx_taken_BFC0BB30 = 0; int psx_delay_BFC0BB5C = 0; int psx_delay_BFC0BB64 = 0; int psx_delay_BFC0BB6C = 0; int psx_taken_BFC0BB6C = 0; int psx_delay_BFC0BB74 = 0; int psx_taken_BFC0BB74 = 0; int psx_delay_BFC0BB7C = 0; int psx_taken_BFC0BB7C = 0; int psx_delay_BFC0BB84 = 0; int psx_delay_BFC0BB8C = 0; int psx_taken_BFC0BB8C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BAC4u: goto label_BFC0BAC4; case 0xBFC0BADCu: goto label_BFC0BADC; case 0xBFC0BAE0u: goto label_BFC0BAE0; case 0xBFC0BAF4u: goto label_BFC0BAF4; case 0xBFC0BAFCu: goto label_BFC0BAFC; case 0xBFC0BB04u: goto label_BFC0BB04; case 0xBFC0BB10u: goto label_BFC0BB10; case 0xBFC0BB24u: goto label_BFC0BB24; case 0xBFC0BB38u: goto label_BFC0BB38; case 0xBFC0BB4Cu: goto label_BFC0BB4C; case 0xBFC0BB64u: goto label_BFC0BB64; case 0xBFC0BB6Cu: goto label_BFC0BB6C; case 0xBFC0BB74u: goto label_BFC0BB74; case 0xBFC0BB7Cu: goto label_BFC0BB7C; case 0xBFC0BB84u: goto label_BFC0BB84; case 0xBFC0BB8Cu: goto label_BFC0BB8C; default: break; } } label_BFC0BAA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BAA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BAA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BAA8: 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(0x800315A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0BAAC: 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, 0x800315ACu); return; } g_debug_last_store_pc = 0x800315ACu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x800315ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0BAB0: 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, 0x800315B0u); return; } g_debug_last_store_pc = 0x800315B0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800315B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0BAB4: 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, 0x800315B4u); return; } g_debug_last_store_pc = 0x800315B4u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x800315B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0BAB8: 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, 0x800315B8u); return; } g_debug_last_store_pc = 0x800315B8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800315B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0BABC: 10800014 beq $a0, $zero, 0xBFC0BB10 */ uint32_t psx_brA_BFC0BABC = cpu->gpr[4]; uint32_t psx_brB_BFC0BABC = cpu->gpr[0]; psx_taken_BFC0BABC = (psx_brA_BFC0BABC == psx_brB_BFC0BABC); psx_delay_BFC0BABC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0BAC0: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800315C0u); #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, 0x80031610u); goto label_BFC0BB10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315C4u); } 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, 0x800315C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BAC4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800315C4u); #endif /* 0xBFC0BAC8: 8C432080 lw $v1, 8320($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 8320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (8320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800315C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C432080u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800315C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BACC: 3C025853 lui $v0, 0x5853 */ cpu->gpr[2] = 0x58530000u; PGXP_ALU(0x3C025853u, cpu->gpr[2], 0u, 0u); #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, 0x4u); #endif /* 0xBFC0BAD0: 24424350 addiu $v0, $v0, 17232 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (17232)); PGXP_ALU(0x24424350u, cpu->gpr[2], _pgx1, 0x00004350u); } #ifdef PSX_COSIM cosim_instr(0x800315D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BAD4: 1062000E beq $v1, $v0, 0xBFC0BB10 */ uint32_t psx_brA_BFC0BAD4 = cpu->gpr[3]; uint32_t psx_brB_BFC0BAD4 = cpu->gpr[2]; psx_taken_BFC0BAD4 = (psx_brA_BFC0BAD4 == psx_brB_BFC0BAD4); psx_delay_BFC0BAD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0BAD8: 3C121F80 lui $s2, 0x1F80 */ cpu->gpr[18] = 0x1F800000u; PGXP_ALU(0x3C121F80u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800315D8u); #endif if (psx_delay_BFC0BAD4) { psx_delay_BFC0BAD4 = 0; if (psx_taken_BFC0BAD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031610u); goto label_BFC0BB10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315DCu); } label_BFC0BADC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BADCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0BADC: 3C118004 lui $s1, 0x8004 */ cpu->gpr[17] = 0x80040000u; PGXP_ALU(0x3C118004u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800315DCu); #endif label_BFC0BAE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BAE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BAE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315E0u); #endif /* 0xBFC0BAE0: 8E431814 lw $v1, 6164($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800315E0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E431814u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800315E0u); #endif /* 0xBFC0BAE4: 8E224D98 lw $v0, 19864($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800315E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E224D98u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800315E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BAE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800315E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BAEC: 10400021 beq $v0, $zero, 0xBFC0BB74 */ uint32_t psx_brA_BFC0BAEC = cpu->gpr[2]; uint32_t psx_brB_BFC0BAEC = cpu->gpr[0]; psx_taken_BFC0BAEC = (psx_brA_BFC0BAEC == psx_brB_BFC0BAEC); psx_delay_BFC0BAEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0BAF0: 30642000 andi $a0, $v1, 0x2000 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[3] & 0x2000u; PGXP_ALU(0x30642000u, cpu->gpr[4], _pgx1, 0x2000u); } #ifdef PSX_COSIM cosim_instr(0x800315F0u); #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, 0x80031674u); goto label_BFC0BB74; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315F4u); } 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, 0x800315F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BAF4: 04600023 bltz $v1, 0xBFC0BB84 */ uint32_t psx_brA_BFC0BAF4 = cpu->gpr[3]; psx_taken_BFC0BAF4 = ((int32_t)psx_brA_BFC0BAF4 < 0); psx_delay_BFC0BAF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BAF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800315F8u); #endif if (psx_delay_BFC0BAF4) { psx_delay_BFC0BAF4 = 0; if (psx_taken_BFC0BAF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031684u); goto label_BFC0BB84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315FCu); } label_BFC0BAFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BAFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BAFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800315FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0BAFC: 10800021 beq $a0, $zero, 0xBFC0BB84 */ uint32_t psx_brA_BFC0BAFC = cpu->gpr[4]; uint32_t psx_brB_BFC0BAFC = cpu->gpr[0]; psx_taken_BFC0BAFC = (psx_brA_BFC0BAFC == psx_brB_BFC0BAFC); psx_delay_BFC0BAFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031600u); #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, 0x80031684u); goto label_BFC0BB84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031604u); } 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, 0x80031604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BB04: 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(0x80031604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB08: 10000010 beq $zero, $zero, 0xBFC0BB4C */ uint32_t psx_brA_BFC0BB08 = cpu->gpr[0]; uint32_t psx_brB_BFC0BB08 = cpu->gpr[0]; psx_taken_BFC0BB08 = (psx_brA_BFC0BB08 == psx_brB_BFC0BB08); psx_delay_BFC0BB08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0BB0C: AE224D98 sw $v0, 19864($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19864; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003160Cu); return; } g_debug_last_store_pc = 0x8003160Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE224D98u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003160Cu); #endif if (psx_delay_BFC0BB08) { psx_delay_BFC0BB08 = 0; if (psx_taken_BFC0BB08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003164Cu); goto label_BFC0BB4C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031610u); } label_BFC0BB10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BB10: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031610u); #endif /* 0xBFC0BB14: 8C521074 lw $s2, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031614u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x4u); } PGXP_LOAD(0x8C521074u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80031614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0BB18: 3C11BF80 lui $s1, 0xBF80 */ cpu->gpr[17] = 0xBF800000u; PGXP_ALU(0x3C11BF80u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC0BB1C: 36430001 ori $v1, $s2, 0x1 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[3] = cpu->gpr[18] | 0x1u; PGXP_ALU(0x36430001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x8003161Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BB20: AC431074 sw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031620u); return; } g_debug_last_store_pc = 0x80031620u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031620u); #endif label_BFC0BB24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031624u); #endif /* 0xBFC0BB24: 8E221070 lw $v0, 4208($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031624u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E221070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BB2C: 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(0x8003162Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BB30: 1040000C beq $v0, $zero, 0xBFC0BB64 */ uint32_t psx_brA_BFC0BB30 = cpu->gpr[2]; uint32_t psx_brB_BFC0BB30 = cpu->gpr[0]; psx_taken_BFC0BB30 = (psx_brA_BFC0BB30 == psx_brB_BFC0BB30); psx_delay_BFC0BB30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031634u); #endif if (psx_delay_BFC0BB30) { psx_delay_BFC0BB30 = 0; if (psx_taken_BFC0BB30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031664u); goto label_BFC0BB64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031638u); } label_BFC0BB38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031638u); #endif /* 0xBFC0BB38: 8E221070 lw $v0, 4208($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031638u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E221070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0BB3C: 2403FFFE addiu $v1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2403FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #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, 0xCu); #endif /* 0xBFC0BB40: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0BB44: AE221070 sw $v0, 4208($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4208)); 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[2]); } PGXP_STORE(0xAE221070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000u); #endif /* 0xBFC0BB48: AE321074 sw $s2, 4212($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031648u); return; } g_debug_last_store_pc = 0x80031648u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE321074u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80031648u); #endif label_BFC0BB4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003164Cu); #endif /* 0xBFC0BB4C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003164Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x8003164Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031650u); #endif /* 0xBFC0BB50: 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, 0x80031650u); 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(0x80031650u); #endif /* 0xBFC0BB54: 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, 0x80031654u); 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(0x80031654u); #endif /* 0xBFC0BB58: 8FB00010 lw $s0, 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, 0x80031658u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80031658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BB5C: 03E00008 jr $ra */ psx_delay_BFC0BB5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BB60: 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(0x80031660u); #endif if (psx_delay_BFC0BB5C) { psx_delay_BFC0BB5C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0BB64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC0BB64: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x8003166Cu; /* jalr link before delay slot */ psx_delay_BFC0BB64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031668u); #endif if (psx_delay_BFC0BB64) { psx_delay_BFC0BB64 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x8003166Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0BB6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003166Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB6C: 1000FFED beq $zero, $zero, 0xBFC0BB24 */ uint32_t psx_brA_BFC0BB6C = cpu->gpr[0]; uint32_t psx_brB_BFC0BB6C = cpu->gpr[0]; psx_taken_BFC0BB6C = (psx_brA_BFC0BB6C == psx_brB_BFC0BB6C); psx_delay_BFC0BB6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031670u); #endif if (psx_delay_BFC0BB6C) { psx_delay_BFC0BB6C = 0; if (psx_taken_BFC0BB6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031624u); goto label_BFC0BB24; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031674u); } label_BFC0BB74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BB74: 04610003 bgez $v1, 0xBFC0BB84 */ uint32_t psx_brA_BFC0BB74 = cpu->gpr[3]; psx_taken_BFC0BB74 = ((int32_t)psx_brA_BFC0BB74 >= 0); psx_delay_BFC0BB74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031678u); #endif if (psx_delay_BFC0BB74) { psx_delay_BFC0BB74 = 0; if (psx_taken_BFC0BB74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031684u); goto label_BFC0BB84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003167Cu); } label_BFC0BB7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003167Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0BB7C: 1080FFE1 beq $a0, $zero, 0xBFC0BB04 */ uint32_t psx_brA_BFC0BB7C = cpu->gpr[4]; uint32_t psx_brB_BFC0BB7C = cpu->gpr[0]; psx_taken_BFC0BB7C = (psx_brA_BFC0BB7C == psx_brB_BFC0BB7C); psx_delay_BFC0BB7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031680u); #endif if (psx_delay_BFC0BB7C) { psx_delay_BFC0BB7C = 0; if (psx_taken_BFC0BB7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031604u); goto label_BFC0BB04; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031684u); } label_BFC0BB84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC0BB84: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x8003168Cu; /* jalr link before delay slot */ psx_delay_BFC0BB84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031688u); #endif if (psx_delay_BFC0BB84) { psx_delay_BFC0BB84 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x8003168Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC0BB8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003168Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB8C: 1000FFD4 beq $zero, $zero, 0xBFC0BAE0 */ uint32_t psx_brA_BFC0BB8C = cpu->gpr[0]; uint32_t psx_brB_BFC0BB8C = cpu->gpr[0]; psx_taken_BFC0BB8C = (psx_brA_BFC0BB8C == psx_brB_BFC0BB8C); psx_delay_BFC0BB8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BB90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031690u); #endif if (psx_delay_BFC0BB8C) { psx_delay_BFC0BB8C = 0; if (psx_taken_BFC0BB8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800315E0u); goto label_BFC0BAE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031694u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031694u); cpu->pc = 0x80031694u; return; /* fallthrough */ } void OpenBIOS_func_1FC0BB94(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BB94u); int psx_delay_BFC0BBE0 = 0; int psx_delay_BFC0BBF0 = 0; int psx_delay_BFC0BC04 = 0; int psx_delay_BFC0BC1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BBE8u: goto label_BFC0BBE8; case 0xBFC0BBF8u: goto label_BFC0BBF8; case 0xBFC0BC0Cu: goto label_BFC0BC0C; default: break; } } label_BFC0BB94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BB94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BB94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0BB94: 0004202B sltu $a0, $zero, $a0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BB98: 3C020800 lui $v0, 0x800 */ cpu->gpr[2] = 0x08000000u; PGXP_ALU(0x3C020800u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BB9C: 24420027 addiu $v0, $v0, 39 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (39)); PGXP_ALU(0x24420027u, cpu->gpr[2], _pgx1, 0x00000027u); } #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, 0x10u); #endif /* 0xBFC0BBA0: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x800316A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0BBA4: 00822025 or $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(0x00822025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800316A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBA8: 3C0206C6 lui $v0, 0x6C6 */ cpu->gpr[2] = 0x06C60000u; PGXP_ALU(0x3C0206C6u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BBAC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x20u); #endif /* 0xBFC0BBB0: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBB4: 24420260 addiu $v0, $v0, 608 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (608)); PGXP_ALU(0x24420260u, cpu->gpr[2], _pgx1, 0x00000260u); } #ifdef PSX_COSIM cosim_instr(0x800316B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0BBB8: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316B8u); return; } g_debug_last_store_pc = 0x800316B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800316B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0BBBC: ACA01814 sw $zero, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316BCu); return; } g_debug_last_store_pc = 0x800316BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACA01814u, _pgxa, cpu->gpr[0]); } #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, 0x30u); #endif /* 0xBFC0BBC0: ACA41814 sw $a0, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316C0u); return; } g_debug_last_store_pc = 0x800316C0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA41814u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800316C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BBC4: ACA21814 sw $v0, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316C4u); return; } g_debug_last_store_pc = 0x800316C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA21814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800316C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBC8: 3C020703 lui $v0, 0x703 */ cpu->gpr[2] = 0x07030000u; PGXP_ALU(0x3C020703u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBCC: 3442FC10 ori $v0, $v0, 0xFC10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0xFC10u; PGXP_ALU(0x3442FC10u, cpu->gpr[2], _pgx1, 0xFC10u); } #ifdef PSX_COSIM cosim_instr(0x800316CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800316D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BBD0: ACA21814 sw $v0, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); 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[2]); } PGXP_STORE(0xACA21814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800316D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBD4: 3C020500 lui $v0, 0x500 */ cpu->gpr[2] = 0x05000000u; PGXP_ALU(0x3C020500u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBD8: 24420800 addiu $v0, $v0, 2048 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (2048)); PGXP_ALU(0x24420800u, cpu->gpr[2], _pgx1, 0x00000800u); } #ifdef PSX_COSIM cosim_instr(0x800316D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BBDC: ACA21814 sw $v0, 6164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6164)); 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[2]); } PGXP_STORE(0xACA21814u, _pgxa, cpu->gpr[2]); } #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, 0x80000000u); #endif /* 0xBFC0BBE0: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x800316E8u; /* jal link before delay slot */ psx_delay_BFC0BBE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BBE4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800316E4u); #endif if (psx_delay_BFC0BBE0) { psx_delay_BFC0BBE0 = 0; cpu->gpr[31] = 0x800316E8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0BBE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BBE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BBE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800316E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBE8: 3C02E300 lui $v0, 0xE300 */ cpu->gpr[2] = 0xE3000000u; PGXP_ALU(0x3C02E300u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BBEC: ACA21810 sw $v0, 6160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800316ECu); return; } g_debug_last_store_pc = 0x800316ECu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA21810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800316ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800316F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BBF0: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x800316F8u; /* jal link before delay slot */ psx_delay_BFC0BBF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BBF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800316F4u); #endif if (psx_delay_BFC0BBF0) { psx_delay_BFC0BBF0 = 0; cpu->gpr[31] = 0x800316F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0BBF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BBF8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BBF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800316F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBF8: 3C02E407 lui $v0, 0xE407 */ cpu->gpr[2] = 0xE4070000u; PGXP_ALU(0x3C02E407u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800316F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BBFC: 24427E7F addiu $v0, $v0, 32383 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (32383)); PGXP_ALU(0x24427E7Fu, cpu->gpr[2], _pgx1, 0x00007E7Fu); } #ifdef PSX_COSIM cosim_instr(0x800316FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0BC00: ACA21810 sw $v0, 6160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031700u); return; } g_debug_last_store_pc = 0x80031700u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA21810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BC04: 0C00C50A jal 0xB0031428 */ cpu->gpr[31] = 0x8003170Cu; /* jal link before delay slot */ psx_delay_BFC0BC04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BC08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031708u); #endif if (psx_delay_BFC0BC04) { psx_delay_BFC0BC04 = 0; cpu->gpr[31] = 0x8003170Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031428u); cpu->pc = 0x80031428u; return; } label_BFC0BC0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003170Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BC0C: 3C02E500 lui $v0, 0xE500 */ cpu->gpr[2] = 0xE5000000u; PGXP_ALU(0x3C02E500u, cpu->gpr[2], 0u, 0u); #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, 0x24u); #endif /* 0xBFC0BC10: ACA21810 sw $v0, 6160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031710u); return; } g_debug_last_store_pc = 0x80031710u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA21810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031710u); #endif /* 0xBFC0BC14: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031714u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BC18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BC1C: 03E00008 jr $ra */ psx_delay_BFC0BC1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BC20: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80031720u); #endif if (psx_delay_BFC0BC1C) { psx_delay_BFC0BC1C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0BC24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BC24u); int psx_delay_BFC0BC6C = 0; int psx_taken_BFC0BC6C = 0; int psx_delay_BFC0BC74 = 0; int psx_taken_BFC0BC74 = 0; int psx_delay_BFC0BC80 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BC74u: goto label_BFC0BC74; case 0xBFC0BC7Cu: goto label_BFC0BC7C; case 0xBFC0BC80u: goto label_BFC0BC80; default: break; } } label_BFC0BC24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031724u); #endif /* 0xBFC0BC24: 8FA20010 lw $v0, 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, 0x80031724u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0BC28: 00063443 sra $a2, $a2, 17 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] >> 17u); PGXP_ALU(0x00063443u, cpu->gpr[6], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0BC2C: 00073C43 sra $a3, $a3, 17 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] >> 17u); PGXP_ALU(0x00073C43u, cpu->gpr[7], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x8003172Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0BC30: 00052C43 sra $a1, $a1, 17 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] >> 17u); PGXP_ALU(0x00052C43u, cpu->gpr[5], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BC34: 00021443 sra $v0, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 17u); PGXP_ALU(0x00021443u, cpu->gpr[2], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0BC38: 00461023 subu $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(0x00461023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0BC3C: 00E52823 subu $a1, $a3, $a1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[7] - cpu->gpr[5]; PGXP_ALU(0x00E52823u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x24u); #endif /* 0xBFC0BC40: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80031740u); #endif /* 0xBFC0BC44: 8FA20014 lw $v0, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031744u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0BC48: 00042443 sra $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 17u); PGXP_ALU(0x00042443u, cpu->gpr[4], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BC4C: 00021443 sra $v0, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 17u); PGXP_ALU(0x00021443u, cpu->gpr[2], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x8003174Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0BC50: 00471023 subu $v0, $v0, $a3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[7]; PGXP_ALU(0x00471023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC0BC54: 00C43023 subu $a2, $a2, $a0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[6] - cpu->gpr[4]; PGXP_ALU(0x00C43023u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0BC58: 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(0x80031758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BC5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003175Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BC60: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0BC64: 00C20018 mult $a2, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[6] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[6])); #endif PGXP_MULDIV(0x00C20018u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80031764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BC68: 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(0x80031768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0BC6C: 10A30004 beq $a1, $v1, 0xBFC0BC80 */ uint32_t psx_brA_BFC0BC6C = cpu->gpr[5]; uint32_t psx_brB_BFC0BC6C = cpu->gpr[3]; psx_taken_BFC0BC6C = (psx_brA_BFC0BC6C == psx_brB_BFC0BC6C); psx_delay_BFC0BC6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2Cu); #endif /* 0xBFC0BC70: 00A31023 subu $v0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[5] - cpu->gpr[3]; PGXP_ALU(0x00A31023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031770u); #endif if (psx_delay_BFC0BC6C) { psx_delay_BFC0BC6C = 0; if (psx_taken_BFC0BC6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031780u); goto label_BFC0BC80; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031774u); } label_BFC0BC74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BC74: 1C400002 bgtz $v0, 0xBFC0BC80 */ uint32_t psx_brA_BFC0BC74 = cpu->gpr[2]; psx_taken_BFC0BC74 = ((int32_t)psx_brA_BFC0BC74 > 0); psx_delay_BFC0BC74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BC78: 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(0x80031778u); #endif if (psx_delay_BFC0BC74) { psx_delay_BFC0BC74 = 0; if (psx_taken_BFC0BC74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031780u); goto label_BFC0BC80; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003177Cu); } label_BFC0BC7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC7Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003177Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BC7C: 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(0x8003177Cu); #endif label_BFC0BC80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BC80: 03E00008 jr $ra */ psx_delay_BFC0BC80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BC84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031784u); #endif if (psx_delay_BFC0BC80) { psx_delay_BFC0BC80 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0BC88(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BC88u); int psx_delay_BFC0BC88 = 0; int psx_taken_BFC0BC88 = 0; int psx_delay_BFC0BCC4 = 0; int psx_delay_BFC0BCCC = 0; int psx_taken_BFC0BCCC = 0; int psx_delay_BFC0BD48 = 0; int psx_taken_BFC0BD48 = 0; int psx_delay_BFC0BD5C = 0; int psx_delay_BFC0BD64 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BC90u: goto label_BFC0BC90; case 0xBFC0BCCCu: goto label_BFC0BCCC; case 0xBFC0BCD4u: goto label_BFC0BCD4; case 0xBFC0BD50u: goto label_BFC0BD50; case 0xBFC0BD54u: goto label_BFC0BD54; case 0xBFC0BD64u: goto label_BFC0BD64; default: break; } } label_BFC0BC88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC88u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0BC88: 10850036 beq $a0, $a1, 0xBFC0BD64 */ uint32_t psx_brA_BFC0BC88 = cpu->gpr[4]; uint32_t psx_brB_BFC0BC88 = cpu->gpr[5]; psx_taken_BFC0BC88 = (psx_brA_BFC0BC88 == psx_brB_BFC0BC88); psx_delay_BFC0BC88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BC8C: 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(0x8003178Cu); #endif if (psx_delay_BFC0BC88) { psx_delay_BFC0BC88 = 0; if (psx_taken_BFC0BC88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031864u); goto label_BFC0BD64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031790u); } label_BFC0BC90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BC90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BC90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BC90: 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(0x80031790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0BC94: 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, 0x80031794u); return; } g_debug_last_store_pc = 0x80031794u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031794u); #endif /* 0xBFC0BC98: 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, 0x80031798u); 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(0x80031798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BC9C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003179Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000200u); #endif /* 0xBFC0BCA0: 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, 0x800317A0u); return; } g_debug_last_store_pc = 0x800317A0u; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAFA90010u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x800317A0u); #endif /* 0xBFC0BCA4: 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, 0x800317A4u); 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(0x800317A4u); #endif /* 0xBFC0BCA8: 8C4B4DA0 lw $t3, 19872($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800317A8u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } PGXP_LOAD(0x8C4B4DA0u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x800317A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000100u); #endif /* 0xBFC0BCAC: 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, 0x800317ACu); return; } g_debug_last_store_pc = 0x800317ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAFA80014u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800317ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317B0u); #endif /* 0xBFC0BCB0: 8C860000 lw $a2, 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, 0x800317B0u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } PGXP_LOAD(0x8C860000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x800317B0u); #endif /* 0xBFC0BCB4: 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, 0x800317B4u); 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(0x800317B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x411u); #endif /* 0xBFC0BCB8: 00805025 or $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(0x00805025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800317B8u); #endif /* 0xBFC0BCBC: 8D650004 lw $a1, 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, 0x800317BCu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x800u); } PGXP_LOAD(0x8D650004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800317BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317C0u); #endif /* 0xBFC0BCC0: 8D640000 lw $a0, 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, 0x800317C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800u); } PGXP_LOAD(0x8D640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800317C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BCC4: 0C00C5C9 jal 0xB0031724 */ cpu->gpr[31] = 0x800317CCu; /* jal link before delay slot */ psx_delay_BFC0BCC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BCC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800317C8u); #endif if (psx_delay_BFC0BCC4) { psx_delay_BFC0BCC4 = 0; cpu->gpr[31] = 0x800317CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031724u); cpu->pc = 0x80031724u; return; } label_BFC0BCCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BCCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BCCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BCCC: 14400021 bne $v0, $zero, 0xBFC0BD54 */ uint32_t psx_brA_BFC0BCCC = cpu->gpr[2]; uint32_t psx_brB_BFC0BCCC = cpu->gpr[0]; psx_taken_BFC0BCCC = (psx_brA_BFC0BCCC != psx_brB_BFC0BCCC); psx_delay_BFC0BCCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0BCD0: 00094C43 sra $t1, $t1, 17 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] >> 17u); PGXP_ALU(0x00094C43u, cpu->gpr[9], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x800317D0u); #endif if (psx_delay_BFC0BCCC) { psx_delay_BFC0BCCC = 0; if (psx_taken_BFC0BCCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031854u); goto label_BFC0BD54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800317D4u); } label_BFC0BCD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BCD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BCD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317D4u); #endif /* 0xBFC0BCD4: 8D630000 lw $v1, 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, 0x800317D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800u); } PGXP_LOAD(0x8D630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800317D4u); #endif /* 0xBFC0BCD8: 8D440000 lw $a0, 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, 0x800317D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400u); } PGXP_LOAD(0x8D440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800317D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BCDC: 00031C43 sra $v1, $v1, 17 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 17u); PGXP_ALU(0x00031C43u, cpu->gpr[3], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x800317DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0BCE0: 00042443 sra $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 17u); PGXP_ALU(0x00042443u, cpu->gpr[4], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x800317E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0BCE4: 00694823 subu $t1, $v1, $t1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[3] - cpu->gpr[9]; PGXP_ALU(0x00694823u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800317E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0BCE8: 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(0x800317E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BCEC: 00630018 mult $v1, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00630018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800317ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800317F0u); #endif /* 0xBFC0BCF0: 8D620004 lw $v0, 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, 0x800317F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x800u); } PGXP_LOAD(0x8D620004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800317F0u); #endif /* 0xBFC0BCF4: 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, 0x800317F4u); 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(0x800317F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BCF8: 00021443 sra $v0, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 17u); PGXP_ALU(0x00021443u, cpu->gpr[2], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x800317F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0BCFC: 00042443 sra $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] >> 17u); PGXP_ALU(0x00042443u, cpu->gpr[4], _pgx1, 17u); } #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, 0x100u); #endif /* 0xBFC0BD00: 00084443 sra $t0, $t0, 17 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] >> 17u); PGXP_ALU(0x00084443u, cpu->gpr[8], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0BD04: 00484023 subu $t0, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[2] - cpu->gpr[8]; PGXP_ALU(0x00484023u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0BD08: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BD0C: 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(0x8003180Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BD18: 00420018 mult $v0, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00420018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80031818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BD1C: 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(0x8003181Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BD20: 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(0x80031820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0BD28: 01290018 mult $t1, $t1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[9] * (int64_t)(int32_t)cpu->gpr[9]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[9])); #endif PGXP_MULDIV(0x01290018u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[9]); #ifdef PSX_COSIM cosim_instr(0x80031828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BD2C: 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(0x8003182Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0BD38: 01080018 mult $t0, $t0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[8] * (int64_t)(int32_t)cpu->gpr[8]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[8])); #endif PGXP_MULDIV(0x01080018u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[8]); #ifdef PSX_COSIM cosim_instr(0x80031838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0BD3C: 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(0x8003183Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0BD40: 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(0x80031840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0BD44: 0043182A slt $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043182Au, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0BD48: 14600002 bne $v1, $zero, 0xBFC0BD54 */ uint32_t psx_brA_BFC0BD48 = cpu->gpr[3]; uint32_t psx_brB_BFC0BD48 = cpu->gpr[0]; psx_taken_BFC0BD48 = (psx_brA_BFC0BD48 != psx_brB_BFC0BD48); psx_delay_BFC0BD48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BD4C: 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(0x8003184Cu); #endif if (psx_delay_BFC0BD48) { psx_delay_BFC0BD48 = 0; if (psx_taken_BFC0BD48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031854u); goto label_BFC0BD54; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031850u); } label_BFC0BD50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BD50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BD50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BD50: 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(0x80031850u); #endif label_BFC0BD54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BD54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BD54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031854u); #endif /* 0xBFC0BD54: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031854u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BD5C: 03E00008 jr $ra */ psx_delay_BFC0BD5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BD60: 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(0x80031860u); #endif if (psx_delay_BFC0BD5C) { psx_delay_BFC0BD5C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0BD64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BD64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BD64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BD64: 03E00008 jr $ra */ psx_delay_BFC0BD64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BD68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031868u); #endif if (psx_delay_BFC0BD64) { psx_delay_BFC0BD64 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0BD6C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BD6Cu); int psx_delay_BFC0BDA0 = 0; int psx_taken_BFC0BDA0 = 0; int psx_delay_BFC0BDC4 = 0; int psx_delay_BFC0BDDC = 0; int psx_delay_BFC0BDE4 = 0; int psx_taken_BFC0BDE4 = 0; int psx_delay_BFC0BDEC = 0; int psx_taken_BFC0BDEC = 0; int psx_delay_BFC0BE14 = 0; int psx_taken_BFC0BE14 = 0; int psx_delay_BFC0BE1C = 0; int psx_taken_BFC0BE1C = 0; int psx_delay_BFC0BE24 = 0; int psx_taken_BFC0BE24 = 0; int psx_delay_BFC0BE34 = 0; int psx_taken_BFC0BE34 = 0; int psx_delay_BFC0BE48 = 0; int psx_taken_BFC0BE48 = 0; int psx_delay_BFC0BE58 = 0; int psx_delay_BFC0BE7C = 0; int psx_delay_BFC0BE84 = 0; int psx_taken_BFC0BE84 = 0; int psx_delay_BFC0BE90 = 0; int psx_taken_BFC0BE90 = 0; int psx_delay_BFC0BE9C = 0; int psx_delay_BFC0BEA4 = 0; int psx_taken_BFC0BEA4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BD9Cu: goto label_BFC0BD9C; case 0xBFC0BDA8u: goto label_BFC0BDA8; case 0xBFC0BDCCu: goto label_BFC0BDCC; case 0xBFC0BDD4u: goto label_BFC0BDD4; case 0xBFC0BDE4u: goto label_BFC0BDE4; case 0xBFC0BDECu: goto label_BFC0BDEC; case 0xBFC0BDF4u: goto label_BFC0BDF4; case 0xBFC0BE1Cu: goto label_BFC0BE1C; case 0xBFC0BE24u: goto label_BFC0BE24; case 0xBFC0BE2Cu: goto label_BFC0BE2C; case 0xBFC0BE30u: goto label_BFC0BE30; case 0xBFC0BE3Cu: goto label_BFC0BE3C; case 0xBFC0BE50u: goto label_BFC0BE50; case 0xBFC0BE60u: goto label_BFC0BE60; case 0xBFC0BE64u: goto label_BFC0BE64; case 0xBFC0BE70u: goto label_BFC0BE70; case 0xBFC0BE84u: goto label_BFC0BE84; case 0xBFC0BE8Cu: goto label_BFC0BE8C; case 0xBFC0BE90u: goto label_BFC0BE90; case 0xBFC0BE98u: goto label_BFC0BE98; case 0xBFC0BEA4u: goto label_BFC0BEA4; default: break; } } label_BFC0BD6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BD6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BD6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003186Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BD6C: 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(0x8003186Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC0BD70: 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, 0x80031870u); return; } g_debug_last_store_pc = 0x80031870u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50028u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80031870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0BD74: 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, 0x80031874u); return; } g_debug_last_store_pc = 0x80031874u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40024u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80031874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0BD78: 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, 0x80031878u); return; } g_debug_last_store_pc = 0x80031878u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2001Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80031878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0BD7C: 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, 0x8003187Cu); return; } g_debug_last_store_pc = 0x8003187Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #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, 0xA0000000u); #endif /* 0xBFC0BD80: 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, 0x80031880u); return; } g_debug_last_store_pc = 0x80031880u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF002Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0BD84: 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, 0x80031884u); return; } g_debug_last_store_pc = 0x80031884u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30020u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80031884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0BD88: 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, 0x80031888u); return; } g_debug_last_store_pc = 0x80031888u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80031888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0BD8C: 00809025 or $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(0x00809025u, cpu->gpr[18], _pgx1, _pgx2); } #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, 0x20021u); #endif /* 0xBFC0BD90: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC0BD94: 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(0x80031894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC0BD98: 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(0x80031898u); #endif label_BFC0BD9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BD9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BD9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003189Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0BD9C: 2E220002 sltiu $v0, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[17] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2E220002u, cpu->gpr[2], _pgx1, 0x0002u); } #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, 0x5u); #endif /* 0xBFC0BDA0: 10400030 beq $v0, $zero, 0xBFC0BE64 */ uint32_t psx_brA_BFC0BDA0 = cpu->gpr[2]; uint32_t psx_brB_BFC0BDA0 = cpu->gpr[0]; psx_taken_BFC0BDA0 = (psx_brA_BFC0BDA0 == psx_brB_BFC0BDA0); psx_delay_BFC0BDA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21000u); #endif /* 0xBFC0BDA4: 262CFFFF addiu $t4, $s1, -1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); PGXP_ALU(0x262CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x800318A4u); #endif if (psx_delay_BFC0BDA0) { psx_delay_BFC0BDA0 = 0; if (psx_taken_BFC0BDA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031964u); goto label_BFC0BE64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800318A8u); } label_BFC0BDA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BDA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BDA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318A8u); #endif /* 0xBFC0BDA8: 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, 0x800318A8u); 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(0x800318A8u); #endif /* 0xBFC0BDAC: 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, 0x800318ACu); 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(0x800318ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318B0u); #endif /* 0xBFC0BDB0: 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, 0x800318B0u); 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(0x800318B0u); #endif /* 0xBFC0BDB4: 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, 0x800318B4u); 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(0x800318B4u); #endif /* 0xBFC0BDB8: 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, 0x800318B8u); 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(0x800318B8u); #endif /* 0xBFC0BDBC: 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, 0x800318BCu); 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(0x800318BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318C0u); #endif /* 0xBFC0BDC0: 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, 0x800318C0u); 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(0x800318C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0BDC4: 03E00008 jr $ra */ psx_delay_BFC0BDC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BDC8: 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(0x800318C8u); #endif if (psx_delay_BFC0BDC4) { psx_delay_BFC0BDC4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x800318CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0BDCC: 258CFFFF addiu $t4, $t4, -1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-1)); PGXP_ALU(0x258CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } #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, 0x3000u); #endif /* 0xBFC0BDD0: 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(0x800318D0u); #endif 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, 0x800318D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2042000u); #endif /* 0xBFC0BDD4: 024DC821 addu $t9, $s2, $t5 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[25] = cpu->gpr[18] + cpu->gpr[13]; PGXP_ALU(0x024DC821u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800318D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000021u); #endif /* 0xBFC0BDD8: 03202825 or $a1, $t9, $zero */ { uint32_t _pgx1 = cpu->gpr[25]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[25] | cpu->gpr[0]; PGXP_ALU(0x03202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800318D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BDDC: 0C00C5E2 jal 0xB0031788 */ cpu->gpr[31] = 0x800318E4u; /* jal link before delay slot */ psx_delay_BFC0BDDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0BDE0: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800318E0u); #endif if (psx_delay_BFC0BDDC) { psx_delay_BFC0BDDC = 0; cpu->gpr[31] = 0x800318E4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031788u); cpu->pc = 0x80031788u; return; } label_BFC0BDE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BDE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BDE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC0BDE4: 1055FFF9 beq $v0, $s5, 0xBFC0BDCC */ uint32_t psx_brA_BFC0BDE4 = cpu->gpr[2]; uint32_t psx_brB_BFC0BDE4 = cpu->gpr[21]; psx_taken_BFC0BDE4 = (psx_brA_BFC0BDE4 == psx_brB_BFC0BDE4); psx_delay_BFC0BDE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5004u); #endif /* 0xBFC0BDE8: 01CC102B sltu $v0, $t6, $t4 */ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[12]; cpu->gpr[2] = (uint32_t)(cpu->gpr[14] < cpu->gpr[12] ? 1 : 0); PGXP_ALU(0x01CC102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800318E8u); #endif if (psx_delay_BFC0BDE4) { psx_delay_BFC0BDE4 = 0; if (psx_taken_BFC0BDE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800318CCu); goto label_BFC0BDCC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800318ECu); } label_BFC0BDEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BDECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BDECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BDEC: 10400013 beq $v0, $zero, 0xBFC0BE3C */ uint32_t psx_brA_BFC0BDEC = cpu->gpr[2]; uint32_t psx_brB_BFC0BDEC = cpu->gpr[0]; psx_taken_BFC0BDEC = (psx_brA_BFC0BDEC == psx_brB_BFC0BDEC); psx_delay_BFC0BDEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BDF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800318F0u); #endif if (psx_delay_BFC0BDEC) { psx_delay_BFC0BDEC = 0; if (psx_taken_BFC0BDEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003193Cu); goto label_BFC0BE3C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800318F4u); } label_BFC0BDF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BDF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BDF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800318F4u); #endif /* 0xBFC0BDF4: 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, 0x800318F4u); 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(0x800318F4u); #endif /* 0xBFC0BDF8: 8DE30000 lw $v1, 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, 0x800318F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8000u); } PGXP_LOAD(0x8DE30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800318F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8010u); #endif /* 0xBFC0BDFC: ADE40000 sw $a0, 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, 0x800318FCu); return; } g_debug_last_store_pc = 0x800318FCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xADE40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800318FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031900u); #endif /* 0xBFC0BE00: 8DE20004 lw $v0, 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, 0x80031900u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8000u); } PGXP_LOAD(0x8DE20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031900u); #endif /* 0xBFC0BE04: 8F240004 lw $a0, 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, 0x80031904u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x2000000u); } PGXP_LOAD(0x8F240004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BE08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8010u); #endif /* 0xBFC0BE0C: ADE40004 sw $a0, 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, 0x8003190Cu); return; } g_debug_last_store_pc = 0x8003190Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xADE40004u, _pgxa, cpu->gpr[4]); } #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, 0x2000008u); #endif /* 0xBFC0BE10: AF230000 sw $v1, 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, 0x80031910u); return; } g_debug_last_store_pc = 0x80031910u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAF230000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1004000u); #endif /* 0xBFC0BE14: 130E0005 beq $t8, $t6, 0xBFC0BE2C */ uint32_t psx_brA_BFC0BE14 = cpu->gpr[24]; uint32_t psx_brB_BFC0BE14 = cpu->gpr[14]; psx_taken_BFC0BE14 = (psx_brA_BFC0BE14 == psx_brB_BFC0BE14); psx_delay_BFC0BE14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000004u); #endif /* 0xBFC0BE18: 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, 0x80031918u); return; } g_debug_last_store_pc = 0x80031918u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAF220004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031918u); #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, 0x8003192Cu); goto label_BFC0BE2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003191Cu); } 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, 0x8003191Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001000u); #endif /* 0xBFC0BE1C: 15980004 bne $t4, $t8, 0xBFC0BE30 */ uint32_t psx_brA_BFC0BE1C = cpu->gpr[12]; uint32_t psx_brB_BFC0BE1C = cpu->gpr[24]; psx_taken_BFC0BE1C = (psx_brA_BFC0BE1C != psx_brB_BFC0BE1C); psx_delay_BFC0BE1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BE20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031920u); #endif if (psx_delay_BFC0BE1C) { psx_delay_BFC0BE1C = 0; if (psx_taken_BFC0BE1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031930u); goto label_BFC0BE30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031924u); } label_BFC0BE24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BE24: 10000002 beq $zero, $zero, 0xBFC0BE30 */ uint32_t psx_brA_BFC0BE24 = cpu->gpr[0]; uint32_t psx_brB_BFC0BE24 = cpu->gpr[0]; psx_taken_BFC0BE24 = (psx_brA_BFC0BE24 == psx_brB_BFC0BE24); psx_delay_BFC0BE24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1004001u); #endif /* 0xBFC0BE28: 01C0C025 or $t8, $t6, $zero */ { uint32_t _pgx1 = cpu->gpr[14]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[14] | cpu->gpr[0]; PGXP_ALU(0x01C0C025u, cpu->gpr[24], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031928u); #endif if (psx_delay_BFC0BE24) { psx_delay_BFC0BE24 = 0; if (psx_taken_BFC0BE24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031930u); goto label_BFC0BE30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003192Cu); } label_BFC0BE2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003192Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001001u); #endif /* 0xBFC0BE2C: 0180C025 or $t8, $t4, $zero */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[12] | cpu->gpr[0]; PGXP_ALU(0x0180C025u, cpu->gpr[24], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003192Cu); #endif label_BFC0BE30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0BE30: 25CE0001 addiu $t6, $t6, 1 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); PGXP_ALU(0x25CE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x80031930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BE34: 10000016 beq $zero, $zero, 0xBFC0BE90 */ uint32_t psx_brA_BFC0BE34 = cpu->gpr[0]; uint32_t psx_brB_BFC0BE34 = cpu->gpr[0]; psx_taken_BFC0BE34 = (psx_brA_BFC0BE34 == psx_brB_BFC0BE34); psx_delay_BFC0BE34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0BE38: 258CFFFF addiu $t4, $t4, -1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (-1)); PGXP_ALU(0x258CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x80031938u); #endif if (psx_delay_BFC0BE34) { psx_delay_BFC0BE34 = 0; if (psx_taken_BFC0BE34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031990u); goto label_BFC0BE90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003193Cu); } label_BFC0BE3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003193Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11000u); #endif /* 0xBFC0BE3C: 25900001 addiu $s0, $t4, 1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[12] + (1)); PGXP_ALU(0x25900001u, cpu->gpr[16], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x8003193Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC0BE40: 02308823 subu $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(0x02308823u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30004u); #endif /* 0xBFC0BE44: 0211102B sltu $v0, $s0, $s1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BE48: 10400013 beq $v0, $zero, 0xBFC0BE98 */ uint32_t psx_brA_BFC0BE48 = cpu->gpr[2]; uint32_t psx_brB_BFC0BE48 = cpu->gpr[0]; psx_taken_BFC0BE48 = (psx_brA_BFC0BE48 == psx_brB_BFC0BE48); psx_delay_BFC0BE48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0BE4C: 25AD0008 addiu $t5, $t5, 8 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (8)); PGXP_ALU(0x25AD0008u, cpu->gpr[13], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0x8003194Cu); #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, 0x80031998u); goto label_BFC0BE98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031950u); } 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, 0x80031950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40011u); #endif /* 0xBFC0BE50: 02402025 or $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(0x02402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC0BE54: 02002825 or $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(0x02002825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BE58: 0C00C61B jal 0xB003186C */ cpu->gpr[31] = 0x80031960u; /* jal link before delay slot */ psx_delay_BFC0BE58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x42000u); #endif /* 0xBFC0BE5C: 024D9021 addu $s2, $s2, $t5 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[18] = cpu->gpr[18] + cpu->gpr[13]; PGXP_ALU(0x024D9021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003195Cu); #endif if (psx_delay_BFC0BE58) { psx_delay_BFC0BE58 = 0; cpu->gpr[31] = 0x80031960u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003186Cu); cpu->pc = 0x8003186Cu; return; } label_BFC0BE60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21000u); #endif /* 0xBFC0BE60: 262CFFFF addiu $t4, $s1, -1 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[17] + (-1)); PGXP_ALU(0x262CFFFFu, cpu->gpr[12], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x80031960u); #endif label_BFC0BE64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001000u); #endif /* 0xBFC0BE64: 000CC042 srl $t8, $t4, 1 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[24] = cpu->gpr[12] >> 1u; PGXP_ALU(0x000CC042u, cpu->gpr[24], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80031964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48001u); #endif /* 0xBFC0BE68: 02407825 or $t7, $s2, $zero */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[15] = cpu->gpr[18] | cpu->gpr[0]; PGXP_ALU(0x02407825u, cpu->gpr[15], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC0BE6C: 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(0x8003196Cu); #endif label_BFC0BE70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1010000u); #endif /* 0xBFC0BE70: 001880C0 sll $s0, $t8, 3 */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[16] = cpu->gpr[24] << 3u; PGXP_ALU(0x001880C0u, cpu->gpr[16], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC0BE74: 02508021 addu $s0, $s2, $s0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[16]; PGXP_ALU(0x02508021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8021u); #endif /* 0xBFC0BE78: 01E02825 or $a1, $t7, $zero */ { uint32_t _pgx1 = cpu->gpr[15]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[5] = cpu->gpr[15] | cpu->gpr[0]; PGXP_ALU(0x01E02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BE7C: 0C00C5E2 jal 0xB0031788 */ cpu->gpr[31] = 0x80031984u; /* jal link before delay slot */ psx_delay_BFC0BE7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0BE80: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031980u); #endif if (psx_delay_BFC0BE7C) { psx_delay_BFC0BE7C = 0; cpu->gpr[31] = 0x80031984u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031788u); cpu->pc = 0x80031788u; return; } label_BFC0BE84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0BE84: 1454FFD3 bne $v0, $s4, 0xBFC0BDD4 */ uint32_t psx_brA_BFC0BE84 = cpu->gpr[2]; uint32_t psx_brB_BFC0BE84 = cpu->gpr[20]; psx_taken_BFC0BE84 = (psx_brA_BFC0BE84 != psx_brB_BFC0BE84); psx_delay_BFC0BE84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3000u); #endif /* 0xBFC0BE88: 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(0x80031988u); #endif if (psx_delay_BFC0BE84) { psx_delay_BFC0BE84 = 0; if (psx_taken_BFC0BE84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800318D4u); goto label_BFC0BDD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003198Cu); } label_BFC0BE8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003198Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0BE8C: 25CE0001 addiu $t6, $t6, 1 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (1)); PGXP_ALU(0x25CE0001u, cpu->gpr[14], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x8003198Cu); #endif 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, 0x80031990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BE90: 1000FFF7 beq $zero, $zero, 0xBFC0BE70 */ uint32_t psx_brA_BFC0BE90 = cpu->gpr[0]; uint32_t psx_brB_BFC0BE90 = cpu->gpr[0]; psx_taken_BFC0BE90 = (psx_brA_BFC0BE90 == psx_brB_BFC0BE90); psx_delay_BFC0BE90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000u); #endif /* 0xBFC0BE94: 25EF0008 addiu $t7, $t7, 8 */ { uint32_t _pgx1 = cpu->gpr[15]; cpu->gpr[15] = (uint32_t)((int32_t)cpu->gpr[15] + (8)); PGXP_ALU(0x25EF0008u, cpu->gpr[15], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0x80031994u); #endif if (psx_delay_BFC0BE90) { psx_delay_BFC0BE90 = 0; if (psx_taken_BFC0BE90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031970u); goto label_BFC0BE70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031998u); } label_BFC0BE98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BE98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BE98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC0BE98: 02202825 or $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(0x02202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BE9C: 0C00C61B jal 0xB003186C */ cpu->gpr[31] = 0x800319A4u; /* jal link before delay slot */ psx_delay_BFC0BE9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x42010u); #endif /* 0xBFC0BEA0: 024D2021 addu $a0, $s2, $t5 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[4] = cpu->gpr[18] + cpu->gpr[13]; PGXP_ALU(0x024D2021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319A0u); #endif if (psx_delay_BFC0BE9C) { psx_delay_BFC0BE9C = 0; cpu->gpr[31] = 0x800319A4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003186Cu); cpu->pc = 0x8003186Cu; return; } label_BFC0BEA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BEA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BEA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BEA4: 1000FFBD beq $zero, $zero, 0xBFC0BD9C */ uint32_t psx_brA_BFC0BEA4 = cpu->gpr[0]; uint32_t psx_brB_BFC0BEA4 = cpu->gpr[0]; psx_taken_BFC0BEA4 = (psx_brA_BFC0BEA4 == psx_brB_BFC0BEA4); psx_delay_BFC0BEA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30001u); #endif /* 0xBFC0BEA8: 02008825 or $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(0x02008825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319A8u); #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, 0x8003189Cu); goto label_BFC0BD9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800319ACu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800319ACu); cpu->pc = 0x800319ACu; return; /* fallthrough */ } void OpenBIOS_func_1FC0BEAC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0BEACu); int psx_delay_BFC0BEE8 = 0; int psx_taken_BFC0BEE8 = 0; int psx_delay_BFC0BF1C = 0; int psx_taken_BFC0BF1C = 0; int psx_delay_BFC0BF24 = 0; int psx_delay_BFC0BF38 = 0; int psx_taken_BFC0BF38 = 0; int psx_delay_BFC0BF44 = 0; int psx_taken_BFC0BF44 = 0; int psx_delay_BFC0BF94 = 0; int psx_taken_BFC0BF94 = 0; int psx_delay_BFC0BF9C = 0; int psx_taken_BFC0BF9C = 0; int psx_delay_BFC0BFB0 = 0; int psx_taken_BFC0BFB0 = 0; int psx_delay_BFC0BFB8 = 0; int psx_taken_BFC0BFB8 = 0; int psx_delay_BFC0BFD4 = 0; int psx_taken_BFC0BFD4 = 0; int psx_delay_BFC0BFE0 = 0; int psx_taken_BFC0BFE0 = 0; int psx_delay_BFC0BFEC = 0; int psx_taken_BFC0BFEC = 0; int psx_delay_BFC0BFF4 = 0; int psx_taken_BFC0BFF4 = 0; int psx_delay_BFC0C004 = 0; int psx_taken_BFC0C004 = 0; int psx_delay_BFC0C034 = 0; int psx_delay_BFC0C03C = 0; int psx_taken_BFC0C03C = 0; int psx_delay_BFC0C05C = 0; int psx_taken_BFC0C05C = 0; int psx_delay_BFC0C094 = 0; int psx_delay_BFC0C09C = 0; int psx_taken_BFC0C09C = 0; int psx_delay_BFC0C0BC = 0; int psx_taken_BFC0C0BC = 0; int psx_delay_BFC0C0D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0BEE4u: goto label_BFC0BEE4; case 0xBFC0BEF0u: goto label_BFC0BEF0; case 0xBFC0BF24u: goto label_BFC0BF24; case 0xBFC0BF2Cu: goto label_BFC0BF2C; case 0xBFC0BF30u: goto label_BFC0BF30; case 0xBFC0BF34u: goto label_BFC0BF34; case 0xBFC0BF40u: goto label_BFC0BF40; case 0xBFC0BF4Cu: goto label_BFC0BF4C; case 0xBFC0BF94u: goto label_BFC0BF94; case 0xBFC0BF9Cu: goto label_BFC0BF9C; case 0xBFC0BFA4u: goto label_BFC0BFA4; case 0xBFC0BFB8u: goto label_BFC0BFB8; case 0xBFC0BFC0u: goto label_BFC0BFC0; case 0xBFC0BFDCu: goto label_BFC0BFDC; case 0xBFC0BFE8u: goto label_BFC0BFE8; case 0xBFC0BFF4u: goto label_BFC0BFF4; case 0xBFC0BFFCu: goto label_BFC0BFFC; case 0xBFC0C000u: goto label_BFC0C000; case 0xBFC0C00Cu: goto label_BFC0C00C; case 0xBFC0C03Cu: goto label_BFC0C03C; case 0xBFC0C044u: goto label_BFC0C044; case 0xBFC0C064u: goto label_BFC0C064; case 0xBFC0C06Cu: goto label_BFC0C06C; case 0xBFC0C09Cu: goto label_BFC0C09C; case 0xBFC0C0A4u: goto label_BFC0C0A4; case 0xBFC0C0C4u: goto label_BFC0C0C4; case 0xBFC0C0C8u: goto label_BFC0C0C8; default: break; } } 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, 0x800319ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0BEAC: 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(0x800319ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0BEB0: 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, 0x800319B0u); return; } g_debug_last_store_pc = 0x800319B0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10020u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800319B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0BEB4: 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, 0x800319B4u); return; } g_debug_last_store_pc = 0x800319B4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB0001Cu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x800319B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0BEB8: 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, 0x800319B8u); return; } g_debug_last_store_pc = 0x800319B8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800319B8u); #endif /* 0xBFC0BEBC: 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, 0x800319BCu); 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(0x800319BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BEC0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800319C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC0BEC4: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0BEC8: 24850008 addiu $a1, $a0, 8 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] + (8)); PGXP_ALU(0x24850008u, cpu->gpr[5], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0x800319C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0BECC: AC444DA0 sw $a0, 19872($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19872; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800319CCu); return; } g_debug_last_store_pc = 0x800319CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC444DA0u, _pgxa, cpu->gpr[4]); } #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, 0x10011u); #endif /* 0xBFC0BED0: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x241u); #endif /* 0xBFC0BED4: 01203025 or $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(0x01203025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0BED8: 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(0x800319D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BEDC: 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(0x800319DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC0BEE0: 00A02025 or $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(0x00A02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319E0u); #endif label_BFC0BEE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BEE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BEE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20088u); #endif /* 0xBFC0BEE4: 0071382A slt $a3, $v1, $s1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0071382Au, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0BEE8: 14E0002E bne $a3, $zero, 0xBFC0BFA4 */ uint32_t psx_brA_BFC0BEE8 = cpu->gpr[7]; uint32_t psx_brB_BFC0BEE8 = cpu->gpr[0]; psx_taken_BFC0BEE8 = (psx_brA_BFC0BEE8 != psx_brB_BFC0BEE8); psx_delay_BFC0BEE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BEEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800319ECu); #endif if (psx_delay_BFC0BEE8) { psx_delay_BFC0BEE8 = 0; if (psx_taken_BFC0BEE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AA4u); goto label_BFC0BFA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800319F0u); } label_BFC0BEF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BEF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BEF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800319F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0BEF0: 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(0x800319F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BEF4: 02021021 addu $v0, $s0, $v0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[2]; PGXP_ALU(0x02021021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800319F4u); #endif /* 0xBFC0BEF8: 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, 0x800319F8u); 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(0x800319F8u); #endif /* 0xBFC0BEFC: 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, 0x800319FCu); 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(0x800319FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC0BF00: AE050000 sw $a1, 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, 0x80031A00u); return; } g_debug_last_store_pc = 0x80031A00u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031A00u); #endif /* 0xBFC0BF04: 8C450004 lw $a1, 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, 0x80031A04u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BF08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC0BF0C: AE050004 sw $a1, 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, 0x80031A0Cu); return; } g_debug_last_store_pc = 0x80031A0Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAE050004u, _pgxa, cpu->gpr[5]); } #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, 0xCu); #endif /* 0xBFC0BF10: 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, 0x80031A10u); return; } g_debug_last_store_pc = 0x80031A10u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0BF14: AC490004 sw $t1, 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, 0x80031A14u); return; } g_debug_last_store_pc = 0x80031A14u; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAC490004u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x80031A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0BF18: 2A220002 slti $v0, $s1, 2 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[17] < (2) ? 1 : 0); PGXP_ALU(0x2A220002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0x80031A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BF1C: 14400004 bne $v0, $zero, 0xBFC0BF30 */ uint32_t psx_brA_BFC0BF1C = cpu->gpr[2]; uint32_t psx_brB_BFC0BF1C = cpu->gpr[0]; psx_taken_BFC0BF1C = (psx_brA_BFC0BF1C != psx_brB_BFC0BF1C); psx_delay_BFC0BF1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0BF20: 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(0x80031A20u); #endif if (psx_delay_BFC0BF1C) { psx_delay_BFC0BF1C = 0; if (psx_taken_BFC0BF1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A30u); goto label_BFC0BF30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A24u); } label_BFC0BF24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF24u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0BF24: 0C00C61B jal 0xB003186C */ cpu->gpr[31] = 0x80031A2Cu; /* jal link before delay slot */ psx_delay_BFC0BF24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020u); #endif /* 0xBFC0BF28: 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(0x80031A28u); #endif if (psx_delay_BFC0BF24) { psx_delay_BFC0BF24 = 0; cpu->gpr[31] = 0x80031A2Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003186Cu); cpu->pc = 0x8003186Cu; return; } label_BFC0BF2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0BF2C: 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(0x80031A2Cu); #endif label_BFC0BF30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0BF30: 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(0x80031A30u); #endif label_BFC0BF34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20404u); #endif /* 0xBFC0BF34: 0151102A slt $v0, $t2, $s1 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[10] < (int32_t)cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0151102Au, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0BF38: 14400031 bne $v0, $zero, 0xBFC0C000 */ uint32_t psx_brA_BFC0BF38 = cpu->gpr[2]; uint32_t psx_brB_BFC0BF38 = cpu->gpr[0]; psx_taken_BFC0BF38 = (psx_brA_BFC0BF38 != psx_brB_BFC0BF38); psx_delay_BFC0BF38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC0BF3C: 000A48C0 sll $t1, $t2, 3 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[10] << 3u; PGXP_ALU(0x000A48C0u, cpu->gpr[9], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031A3Cu); #endif if (psx_delay_BFC0BF38) { psx_delay_BFC0BF38 = 0; if (psx_taken_BFC0BF38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B00u); goto label_BFC0C000; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A40u); } label_BFC0BF40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0BF40: 29030003 slti $v1, $t0, 3 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] < (3) ? 1 : 0); PGXP_ALU(0x29030003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x80031A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0BF44: 14600060 bne $v1, $zero, 0xBFC0C0C8 */ uint32_t psx_brA_BFC0BF44 = cpu->gpr[3]; uint32_t psx_brB_BFC0BF44 = cpu->gpr[0]; psx_taken_BFC0BF44 = (psx_brA_BFC0BF44 != psx_brB_BFC0BF44); psx_delay_BFC0BF44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC0BF48: 01001025 or $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(0x01001025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031A48u); #endif if (psx_delay_BFC0BF44) { psx_delay_BFC0BF44 = 0; if (psx_taken_BFC0BF44) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BC8u); goto label_BFC0C0C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A4Cu); } label_BFC0BF4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF4Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A4Cu); #endif /* 0xBFC0BF4C: 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, 0x80031A4Cu); 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(0x80031A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0BF50: 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(0x80031A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BF54: AE020040 sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A54u); return; } g_debug_last_store_pc = 0x80031A54u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A54u); #endif /* 0xBFC0BF58: 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, 0x80031A58u); 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(0x80031A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10300u); #endif /* 0xBFC0BF5C: 02084821 addu $t1, $s0, $t0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[9] = cpu->gpr[16] + cpu->gpr[8]; PGXP_ALU(0x02084821u, cpu->gpr[9], _pgx1, _pgx2); } #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, 0x10004u); #endif /* 0xBFC0BF60: AE020044 sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A60u); return; } g_debug_last_store_pc = 0x80031A60u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A60u); #endif /* 0xBFC0BF64: 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, 0x80031A64u); 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(0x80031A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10800u); #endif /* 0xBFC0BF68: 260B0018 addiu $t3, $s0, 24 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[16] + (24)); PGXP_ALU(0x260B0018u, cpu->gpr[11], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80031A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BF6C: AE020048 sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A6Cu); return; } g_debug_last_store_pc = 0x80031A6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020048u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A70u); #endif /* 0xBFC0BF70: 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, 0x80031A70u); 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(0x80031A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0BF74: 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(0x80031A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BF78: AE02004C sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A78u); return; } g_debug_last_store_pc = 0x80031A78u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE02004Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A78u); #endif /* 0xBFC0BF7C: 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, 0x80031A7Cu); 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(0x80031A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x12000u); #endif /* 0xBFC0BF80: 260D0038 addiu $t5, $s0, 56 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[16] + (56)); PGXP_ALU(0x260D0038u, cpu->gpr[13], _pgx1, 0x00000038u); } #ifdef PSX_COSIM cosim_instr(0x80031A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BF84: AE020050 sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A84u); return; } g_debug_last_store_pc = 0x80031A84u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020050u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A84u); #endif /* 0xBFC0BF88: 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, 0x80031A88u); 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(0x80031A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001u); #endif /* 0xBFC0BF8C: 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(0x80031A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0BF90: AE020054 sw $v0, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031A90u); return; } g_debug_last_store_pc = 0x80031A90u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020054u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031A90u); #endif label_BFC0BF94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BF94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BF94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA00u); #endif /* 0xBFC0BF94: 112B004B beq $t1, $t3, 0xBFC0C0C4 */ uint32_t psx_brA_BFC0BF94 = cpu->gpr[9]; uint32_t psx_brB_BFC0BF94 = cpu->gpr[11]; psx_taken_BFC0BF94 = (psx_brA_BFC0BF94 == psx_brB_BFC0BF94); psx_delay_BFC0BF94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC0BF98: 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(0x80031A98u); #endif if (psx_delay_BFC0BF94) { psx_delay_BFC0BF94 = 0; if (psx_taken_BFC0BF94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BC4u); goto label_BFC0C0C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A9Cu); } 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, 0x80031A9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BF9C: 10000033 beq $zero, $zero, 0xBFC0C06C */ 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, 0x80031AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2400u); #endif /* 0xBFC0BFA0: 014D5021 addu $t2, $t2, $t5 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[13]; cpu->gpr[10] = cpu->gpr[10] + cpu->gpr[13]; PGXP_ALU(0x014D5021u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AA0u); #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, 0x80031B6Cu); goto label_BFC0C06C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AA4u); } 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, 0x80031AA4u); #endif /* 0xBFC0BFA4: 8CA70004 lw $a3, 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, 0x80031AA4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80031AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFA8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1C0u); #endif /* 0xBFC0BFAC: 00E6402A slt $t0, $a3, $a2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[6] ? 1 : 0); PGXP_ALU(0x00E6402Au, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0BFB0: 1500000D bne $t0, $zero, 0xBFC0BFE8 */ uint32_t psx_brA_BFC0BFB0 = cpu->gpr[8]; 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_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031AB4u); #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, 0x80031AE8u); goto label_BFC0BFE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AB8u); } 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, 0x80031AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0BFB8: 14E60008 bne $a3, $a2, 0xBFC0BFDC */ uint32_t psx_brA_BFC0BFB8 = cpu->gpr[7]; uint32_t psx_brB_BFC0BFB8 = cpu->gpr[6]; psx_taken_BFC0BFB8 = (psx_brA_BFC0BFB8 != psx_brB_BFC0BFB8); psx_delay_BFC0BFB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0BFBC: 000240C0 sll $t0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[8] = cpu->gpr[2] << 3u; PGXP_ALU(0x000240C0u, cpu->gpr[8], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031ABCu); #endif if (psx_delay_BFC0BFB8) { psx_delay_BFC0BFB8 = 0; if (psx_taken_BFC0BFB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031ADCu); goto label_BFC0BFDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AC0u); } label_BFC0BFC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BFC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BFC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10100u); #endif /* 0xBFC0BFC0: 02084021 addu $t0, $s0, $t0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[16] + cpu->gpr[8]; PGXP_ALU(0x02084021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AC0u); #endif /* 0xBFC0BFC4: 8CA70000 lw $a3, 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, 0x80031AC4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80031AC4u); #endif /* 0xBFC0BFC8: 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, 0x80031AC8u); 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(0x80031AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFCC: 00000000 nop */ /* nop */ #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, 0x180u); #endif /* 0xBFC0BFD0: 00E8382A slt $a3, $a3, $t0 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] < (int32_t)cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x00E8382Au, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0BFD4: 14E00007 bne $a3, $zero, 0xBFC0BFF4 */ uint32_t psx_brA_BFC0BFD4 = cpu->gpr[7]; uint32_t psx_brB_BFC0BFD4 = cpu->gpr[0]; psx_taken_BFC0BFD4 = (psx_brA_BFC0BFD4 != psx_brB_BFC0BFD4); psx_delay_BFC0BFD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFD8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031AD8u); #endif if (psx_delay_BFC0BFD4) { psx_delay_BFC0BFD4 = 0; if (psx_taken_BFC0BFD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AF4u); goto label_BFC0BFF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031ADCu); } label_BFC0BFDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BFDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BFDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0BFDC: 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(0x80031ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFE0: 1000FFC0 beq $zero, $zero, 0xBFC0BEE4 */ uint32_t psx_brA_BFC0BFE0 = cpu->gpr[0]; uint32_t psx_brB_BFC0BFE0 = cpu->gpr[0]; psx_taken_BFC0BFE0 = (psx_brA_BFC0BFE0 == psx_brB_BFC0BFE0); psx_delay_BFC0BFE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0BFE4: 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(0x80031AE4u); #endif if (psx_delay_BFC0BFE0) { psx_delay_BFC0BFE0 = 0; if (psx_taken_BFC0BFE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800319E4u); goto label_BFC0BEE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AE8u); } label_BFC0BFE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BFE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BFE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0BFE8: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFEC: 1000FFFB beq $zero, $zero, 0xBFC0BFDC */ uint32_t psx_brA_BFC0BFEC = cpu->gpr[0]; uint32_t psx_brB_BFC0BFEC = cpu->gpr[0]; psx_taken_BFC0BFEC = (psx_brA_BFC0BFEC == psx_brB_BFC0BFEC); psx_delay_BFC0BFEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC1u); #endif /* 0xBFC0BFF0: 00E03025 or $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(0x00E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AF0u); #endif if (psx_delay_BFC0BFEC) { psx_delay_BFC0BFEC = 0; if (psx_taken_BFC0BFEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031ADCu); goto label_BFC0BFDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AF4u); } label_BFC0BFF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BFF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BFF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0BFF4: 1000FFF9 beq $zero, $zero, 0xBFC0BFDC */ uint32_t psx_brA_BFC0BFF4 = cpu->gpr[0]; uint32_t psx_brB_BFC0BFF4 = cpu->gpr[0]; psx_taken_BFC0BFF4 = (psx_brA_BFC0BFF4 == psx_brB_BFC0BFF4); psx_delay_BFC0BFF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0BFF8: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031AF8u); #endif if (psx_delay_BFC0BFF4) { psx_delay_BFC0BFF4 = 0; if (psx_taken_BFC0BFF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031ADCu); goto label_BFC0BFDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AFCu); } label_BFC0BFFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0BFFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0BFFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC0BFFC: 000A48C0 sll $t1, $t2, 3 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[9] = cpu->gpr[10] << 3u; PGXP_ALU(0x000A48C0u, cpu->gpr[9], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031AFCu); #endif label_BFC0C000: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C000u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0C000: 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(0x80031B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400u); #endif /* 0xBFC0C004: 122A000F beq $s1, $t2, 0xBFC0C044 */ uint32_t psx_brA_BFC0C004 = cpu->gpr[17]; uint32_t psx_brB_BFC0C004 = cpu->gpr[10]; psx_taken_BFC0C004 = (psx_brA_BFC0C004 == psx_brB_BFC0C004); psx_delay_BFC0C004 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10200u); #endif /* 0xBFC0C008: 02094821 addu $t1, $s0, $t1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[9] = cpu->gpr[16] + cpu->gpr[9]; PGXP_ALU(0x02094821u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031B08u); #endif if (psx_delay_BFC0C004) { psx_delay_BFC0C004 = 0; if (psx_taken_BFC0C004) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B44u); goto label_BFC0C044; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B0Cu); } label_BFC0C00C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C00Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C00Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B0Cu); #endif /* 0xBFC0C00C: 8D220008 lw $v0, 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, 0x80031B0Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } PGXP_LOAD(0x8D220008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C010: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0C014: 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, 0x80031B14u); return; } g_debug_last_store_pc = 0x80031B14u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B14u); #endif /* 0xBFC0C018: 8D22000C lw $v0, 12($t1) */ { uint32_t _pgxa = cpu->gpr[9] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[9] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B18u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x200u); } PGXP_LOAD(0x8D22000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C01C: 00000000 nop */ /* nop */ #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, 0x20000004u); #endif /* 0xBFC0C020: 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, 0x80031B20u); return; } g_debug_last_store_pc = 0x80031B20u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B20u); #endif /* 0xBFC0C024: 8D260000 lw $a2, 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, 0x80031B24u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x200u); } PGXP_LOAD(0x8D260000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031B24u); #endif /* 0xBFC0C028: 8D270004 lw $a3, 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, 0x80031B28u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x200u); } PGXP_LOAD(0x8D270004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80031B28u); #endif /* 0xBFC0C02C: 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, 0x80031B2Cu); 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(0x80031B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B30u); #endif /* 0xBFC0C030: 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, 0x80031B30u); 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(0x80031B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0C034: 0C00C5C9 jal 0xB0031724 */ cpu->gpr[31] = 0x80031B3Cu; /* jal link before delay slot */ psx_delay_BFC0C034 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C038: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B38u); #endif if (psx_delay_BFC0C034) { psx_delay_BFC0C034 = 0; cpu->gpr[31] = 0x80031B3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031724u); cpu->pc = 0x80031724u; return; } label_BFC0C03C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C03Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C03Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C03C: 1040FFEF beq $v0, $zero, 0xBFC0BFFC */ uint32_t psx_brA_BFC0C03C = cpu->gpr[2]; uint32_t psx_brB_BFC0C03C = cpu->gpr[0]; psx_taken_BFC0C03C = (psx_brA_BFC0C03C == psx_brB_BFC0C03C); psx_delay_BFC0C03C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C040: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B40u); #endif if (psx_delay_BFC0C03C) { psx_delay_BFC0C03C = 0; if (psx_taken_BFC0C03C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031AFCu); goto label_BFC0BFFC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B44u); } label_BFC0C044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C044u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B44u); #endif /* 0xBFC0C044: 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, 0x80031B44u); 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(0x80031B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C048: 000810C0 sll $v0, $t0, 3 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] << 3u; PGXP_ALU(0x000810C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0C04C: 02021021 addu $v0, $s0, $v0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[2]; PGXP_ALU(0x02021021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0xCu); #endif /* 0xBFC0C050: 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, 0x80031B50u); return; } g_debug_last_store_pc = 0x80031B50u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031B50u); #endif /* 0xBFC0C054: 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, 0x80031B54u); 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(0x80031B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C058: 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(0x80031B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C05C: 1000FFB5 beq $zero, $zero, 0xBFC0BF34 */ uint32_t psx_brA_BFC0C05C = cpu->gpr[0]; uint32_t psx_brB_BFC0C05C = cpu->gpr[0]; psx_taken_BFC0C05C = (psx_brA_BFC0C05C == psx_brB_BFC0C05C); psx_delay_BFC0C05C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C060: 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, 0x80031B60u); return; } g_debug_last_store_pc = 0x80031B60u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031B60u); #endif if (psx_delay_BFC0C05C) { psx_delay_BFC0C05C = 0; if (psx_taken_BFC0C05C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A34u); goto label_BFC0BF34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B64u); } label_BFC0C064: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C064u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0C064: 254AFFF8 addiu $t2, $t2, -8 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (-8)); PGXP_ALU(0x254AFFF8u, cpu->gpr[10], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x80031B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C068: 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(0x80031B68u); #endif label_BFC0C06C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C06Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C06Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B6Cu); #endif /* 0xBFC0C06C: 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, 0x80031B6Cu); 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(0x80031B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C070: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001000u); #endif /* 0xBFC0C074: 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, 0x80031B74u); return; } g_debug_last_store_pc = 0x80031B74u; cpu->write_word(psx_addr, cpu->gpr[12]); } PGXP_STORE(0xAFAC0010u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x80031B74u); #endif /* 0xBFC0C078: 8D620004 lw $v0, 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, 0x80031B78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x800u); } PGXP_LOAD(0x8D620004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C07C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0C080: 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, 0x80031B80u); return; } g_debug_last_store_pc = 0x80031B80u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031B80u); #endif /* 0xBFC0C084: 8D460008 lw $a2, 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, 0x80031B84u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x400u); } PGXP_LOAD(0x8D460008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031B84u); #endif /* 0xBFC0C088: 8D47000C lw $a3, 12($t2) */ { uint32_t _pgxa = cpu->gpr[10] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[10] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031B88u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x400u); } PGXP_LOAD(0x8D47000Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80031B88u); #endif /* 0xBFC0C08C: 8D440000 lw $a0, 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, 0x80031B8Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x400u); } PGXP_LOAD(0x8D440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B90u); #endif /* 0xBFC0C090: 8D450004 lw $a1, 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, 0x80031B90u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x400u); } PGXP_LOAD(0x8D450004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0C094: 0C00C5C9 jal 0xB0031724 */ cpu->gpr[31] = 0x80031B9Cu; /* jal link before delay slot */ psx_delay_BFC0C094 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C098: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031B98u); #endif if (psx_delay_BFC0C094) { psx_delay_BFC0C094 = 0; cpu->gpr[31] = 0x80031B9Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031724u); cpu->pc = 0x80031724u; return; } label_BFC0C09C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C09Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C09Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4004u); #endif /* 0xBFC0C09C: 144EFFF1 bne $v0, $t6, 0xBFC0C064 */ uint32_t psx_brA_BFC0C09C = cpu->gpr[2]; uint32_t psx_brB_BFC0C09C = cpu->gpr[14]; psx_taken_BFC0C09C = (psx_brA_BFC0C09C != psx_brB_BFC0C09C); psx_delay_BFC0C09C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C0A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031BA0u); #endif if (psx_delay_BFC0C09C) { psx_delay_BFC0C09C = 0; if (psx_taken_BFC0C09C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031B64u); goto label_BFC0C064; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BA4u); } label_BFC0C0A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C0A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C0A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C0A4: 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(0x80031BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C0A8: 000810C0 sll $v0, $t0, 3 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] << 3u; PGXP_ALU(0x000810C0u, cpu->gpr[2], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80031BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0C0AC: 02021021 addu $v0, $s0, $v0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[16] + cpu->gpr[2]; PGXP_ALU(0x02021021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1004u); #endif /* 0xBFC0C0B0: AC4C0040 sw $t4, 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, 0x80031BB0u); return; } g_debug_last_store_pc = 0x80031BB0u; cpu->write_word(psx_addr, cpu->gpr[12]); } PGXP_STORE(0xAC4C0040u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x80031BB0u); #endif /* 0xBFC0C0B4: 8D630004 lw $v1, 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, 0x80031BB4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800u); } PGXP_LOAD(0x8D630004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0C0B8: 256B0008 addiu $t3, $t3, 8 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (8)); PGXP_ALU(0x256B0008u, cpu->gpr[11], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0x80031BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C0BC: 1000FFB5 beq $zero, $zero, 0xBFC0BF94 */ uint32_t psx_brA_BFC0C0BC = cpu->gpr[0]; uint32_t psx_brB_BFC0C0BC = cpu->gpr[0]; psx_taken_BFC0C0BC = (psx_brA_BFC0C0BC == psx_brB_BFC0C0BC); psx_delay_BFC0C0BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C0C0: AC430044 sw $v1, 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, 0x80031BC0u); return; } g_debug_last_store_pc = 0x80031BC0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430044u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031BC0u); #endif if (psx_delay_BFC0C0BC) { psx_delay_BFC0C0BC = 0; if (psx_taken_BFC0C0BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031A94u); goto label_BFC0BF94; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031BC4u); } label_BFC0C0C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C0C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C0C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C0C4: 25020001 addiu $v0, $t0, 1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] + (1)); PGXP_ALU(0x25020001u, cpu->gpr[2], _pgx1, 0x00000001u); } #ifdef PSX_COSIM cosim_instr(0x80031BC4u); #endif 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, 0x80031BC8u); #endif /* 0xBFC0C0C8: 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, 0x80031BC8u); 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(0x80031BC8u); #endif /* 0xBFC0C0CC: 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, 0x80031BCCu); 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(0x80031BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BD0u); #endif /* 0xBFC0C0D0: 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, 0x80031BD0u); 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(0x80031BD0u); #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_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C0D8: 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(0x80031BD8u); #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 OpenBIOS_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_BFC0C108 = 0; 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, 0x80031BDCu); #endif /* 0xBFC0C0DC: 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, 0x80031BDCu); 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(0x80031BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BE0u); #endif /* 0xBFC0C0E0: 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, 0x80031BE0u); 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(0x80031BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C0E4: 00031C43 sra $v1, $v1, 17 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 17u); PGXP_ALU(0x00031C43u, cpu->gpr[3], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C0E8: 00021443 sra $v0, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 17u); PGXP_ALU(0x00021443u, cpu->gpr[2], _pgx1, 17u); } #ifdef PSX_COSIM cosim_instr(0x80031BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C0EC: 24420140 addiu $v0, $v0, 320 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (320)); PGXP_ALU(0x24420140u, cpu->gpr[2], _pgx1, 0x00000140u); } #ifdef PSX_COSIM cosim_instr(0x80031BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C0F0: 246300F0 addiu $v1, $v1, 240 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (240)); PGXP_ALU(0x246300F0u, cpu->gpr[3], _pgx1, 0x000000F0u); } #ifdef PSX_COSIM cosim_instr(0x80031BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C0F4: 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(0x80031BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C0F8: 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(0x80031BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C0FC: 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(0x80031BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C100: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C104: AC621810 sw $v0, 6160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (6160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C04u); return; } g_debug_last_store_pc = 0x80031C04u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621810u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C108: 03E00008 jr $ra */ psx_delay_BFC0C108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C10C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031C0Cu); #endif if (psx_delay_BFC0C108) { psx_delay_BFC0C108 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0C110(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C110u); int psx_delay_BFC0C194 = 0; int psx_taken_BFC0C194 = 0; int psx_delay_BFC0C1A0 = 0; int psx_taken_BFC0C1A0 = 0; int psx_delay_BFC0C1AC = 0; int psx_taken_BFC0C1AC = 0; int psx_delay_BFC0C1B4 = 0; int psx_taken_BFC0C1B4 = 0; int psx_delay_BFC0C1EC = 0; int psx_delay_BFC0C208 = 0; int psx_taken_BFC0C208 = 0; int psx_delay_BFC0C238 = 0; int psx_delay_BFC0C278 = 0; int psx_delay_BFC0C2A4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0C19Cu: goto label_BFC0C19C; case 0xBFC0C1A8u: goto label_BFC0C1A8; case 0xBFC0C1B4u: goto label_BFC0C1B4; case 0xBFC0C1BCu: goto label_BFC0C1BC; case 0xBFC0C1D4u: goto label_BFC0C1D4; case 0xBFC0C1F4u: goto label_BFC0C1F4; case 0xBFC0C210u: goto label_BFC0C210; case 0xBFC0C240u: goto label_BFC0C240; case 0xBFC0C280u: goto label_BFC0C280; default: break; } } label_BFC0C110: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C110u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C110: 3C058004 lui $a1, 0x8004 */ cpu->gpr[5] = 0x80040000u; PGXP_ALU(0x3C058004u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C114: 24A23C74 addiu $v0, $a1, 15476 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[5] + (15476)); PGXP_ALU(0x24A23C74u, cpu->gpr[2], _pgx1, 0x00003C74u); } #ifdef PSX_COSIM cosim_instr(0x80031C14u); #endif /* 0xBFC0C118: 8C460008 lw $a2, 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, 0x80031C18u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C460008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C11C: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C20u); #endif /* 0xBFC0C120: 8CC60000 lw $a2, 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, 0x80031C20u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x40u); } PGXP_LOAD(0x8CC60000u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031C20u); #endif /* 0xBFC0C124: 8C634DD4 lw $v1, 19924($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C24u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C634DD4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0C128: ACA63C74 sw $a2, 15476($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 15476; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (15476)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C28u); return; } g_debug_last_store_pc = 0x80031C28u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xACA63C74u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80031C28u); #endif /* 0xBFC0C12C: 8C450020 lw $a1, 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, 0x80031C2Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450020u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C130: AC400084 sw $zero, 132($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C30u); return; } g_debug_last_store_pc = 0x80031C30u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400084u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C30u); #endif /* 0xBFC0C134: 8CA50000 lw $a1, 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, 0x80031C34u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C138: AC40006C sw $zero, 108($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 108; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C38u); return; } g_debug_last_store_pc = 0x80031C38u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40006Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C13C: AC450018 sw $a1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C3Cu); return; } g_debug_last_store_pc = 0x80031C3Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450018u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C40u); #endif /* 0xBFC0C140: 8C450038 lw $a1, 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, 0x80031C40u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450038u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C144: AC400054 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, 0x80031C44u); return; } g_debug_last_store_pc = 0x80031C44u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400054u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C44u); #endif /* 0xBFC0C148: 8CA50000 lw $a1, 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, 0x80031C48u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C14C: AC40003C sw $zero, 60($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C4Cu); return; } g_debug_last_store_pc = 0x80031C4Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40003Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C150: AC450030 sw $a1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C50u); return; } g_debug_last_store_pc = 0x80031C50u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450030u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C50u); #endif /* 0xBFC0C154: 8C450050 lw $a1, 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, 0x80031C54u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450050u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C158: AC400024 sw $zero, 36($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 36; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C58u); return; } g_debug_last_store_pc = 0x80031C58u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400024u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C58u); #endif /* 0xBFC0C15C: 8CA50000 lw $a1, 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, 0x80031C5Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #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, 0x5u); #endif /* 0xBFC0C160: 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, 0x80031C60u); return; } g_debug_last_store_pc = 0x80031C60u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C164: AC450048 sw $a1, 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, 0x80031C64u); return; } g_debug_last_store_pc = 0x80031C64u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450048u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C64u); #endif /* 0xBFC0C168: 8C450068 lw $a1, 104($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 104; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C68u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450068u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C16C: AC430088 sw $v1, 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, 0x80031C6Cu); return; } g_debug_last_store_pc = 0x80031C6Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430088u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C70u); #endif /* 0xBFC0C170: 8CA50000 lw $a1, 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, 0x80031C70u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C174: AC430070 sw $v1, 112($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C74u); return; } g_debug_last_store_pc = 0x80031C74u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C178: AC450060 sw $a1, 96($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C78u); return; } g_debug_last_store_pc = 0x80031C78u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450060u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C78u); #endif /* 0xBFC0C17C: 8C450080 lw $a1, 128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C7Cu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x8C450080u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C180: AC430058 sw $v1, 88($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C80u); return; } g_debug_last_store_pc = 0x80031C80u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430058u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C80u); #endif /* 0xBFC0C184: 8CA50000 lw $a1, 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, 0x80031C84u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20u); } PGXP_LOAD(0x8CA50000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C188: AC430028 sw $v1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C88u); return; } g_debug_last_store_pc = 0x80031C88u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430028u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C18C: AC450078 sw $a1, 120($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C8Cu); return; } g_debug_last_store_pc = 0x80031C8Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450078u, _pgxa, cpu->gpr[5]); } #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, 0x21u); #endif /* 0xBFC0C190: 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(0x80031C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C194: 1085002A beq $a0, $a1, 0xBFC0C240 */ uint32_t psx_brA_BFC0C194 = cpu->gpr[4]; uint32_t psx_brB_BFC0C194 = cpu->gpr[5]; psx_taken_BFC0C194 = (psx_brA_BFC0C194 == psx_brB_BFC0C194); psx_delay_BFC0C194 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C198: AC430010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031C98u); return; } g_debug_last_store_pc = 0x80031C98u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031C98u); #endif if (psx_delay_BFC0C194) { psx_delay_BFC0C194 = 0; if (psx_taken_BFC0C194) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031D40u); goto label_BFC0C240; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031C9Cu); } label_BFC0C19C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C19Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C19Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0C19C: 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(0x80031C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C1A0: 10850037 beq $a0, $a1, 0xBFC0C280 */ uint32_t psx_brA_BFC0C1A0 = cpu->gpr[4]; uint32_t psx_brB_BFC0C1A0 = cpu->gpr[5]; psx_taken_BFC0C1A0 = (psx_brA_BFC0C1A0 == psx_brB_BFC0C1A0); psx_delay_BFC0C1A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C1A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031CA4u); #endif if (psx_delay_BFC0C1A0) { psx_delay_BFC0C1A0 = 0; if (psx_taken_BFC0C1A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031D80u); goto label_BFC0C280; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031CA8u); } label_BFC0C1A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C1A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C1A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1A8: 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(0x80031CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C1AC: 10830011 beq $a0, $v1, 0xBFC0C1F4 */ uint32_t psx_brA_BFC0C1AC = cpu->gpr[4]; uint32_t psx_brB_BFC0C1AC = cpu->gpr[3]; psx_taken_BFC0C1AC = (psx_brA_BFC0C1AC == psx_brB_BFC0C1AC); psx_delay_BFC0C1AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1B0: 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(0x80031CB0u); #endif if (psx_delay_BFC0C1AC) { psx_delay_BFC0C1AC = 0; if (psx_taken_BFC0C1AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031CF4u); goto label_BFC0C1F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031CB4u); } label_BFC0C1B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C1B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C1B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C1B4: 10830016 beq $a0, $v1, 0xBFC0C210 */ uint32_t psx_brA_BFC0C1B4 = cpu->gpr[4]; uint32_t psx_brB_BFC0C1B4 = cpu->gpr[3]; psx_taken_BFC0C1B4 = (psx_brA_BFC0C1B4 == psx_brB_BFC0C1B4); psx_delay_BFC0C1B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1B8: 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(0x80031CB8u); #endif if (psx_delay_BFC0C1B4) { psx_delay_BFC0C1B4 = 0; if (psx_taken_BFC0C1B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031D10u); goto label_BFC0C210; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031CBCu); } label_BFC0C1BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C1BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C1BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1BC: 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, 0x80031CBCu); return; } g_debug_last_store_pc = 0x80031CBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1C0: 2403005B addiu $v1, $zero, 91 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (91)); PGXP_ALU(0x2403005Bu, cpu->gpr[3], _pgx1, 0x0000005Bu); } #ifdef PSX_COSIM cosim_instr(0x80031CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1C4: A0430006 sb $v1, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031CC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430006u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1C8: 2403DC9C addiu $v1, $zero, -9060 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-9060)); PGXP_ALU(0x2403DC9Cu, cpu->gpr[3], _pgx1, 0xFFFFDC9Cu); } #ifdef PSX_COSIM cosim_instr(0x80031CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1CC: A443001C sh $v1, 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, 0x80031CCCu); return; } g_debug_last_store_pc = 0x80031CCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443001Cu, _pgxa, cpu->gpr[3]); } #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, 0x9u); #endif /* 0xBFC0C1D0: 2403FFDA addiu $v1, $zero, -38 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-38)); PGXP_ALU(0x2403FFDAu, cpu->gpr[3], _pgx1, 0xFFFFFFDAu); } #ifdef PSX_COSIM cosim_instr(0x80031CD0u); #endif label_BFC0C1D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C1D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C1D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1D4: A043001E sb $v1, 30($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031CD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (30)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA043001Eu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1D8: 24033000 addiu $v1, $zero, 12288 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (12288)); PGXP_ALU(0x24033000u, cpu->gpr[3], _pgx1, 0x00003000u); } #ifdef PSX_COSIM cosim_instr(0x80031CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1DC: AC43004C sw $v1, 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, 0x80031CDCu); return; } g_debug_last_store_pc = 0x80031CDCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43004Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1E0: 24032AAA addiu $v1, $zero, 10922 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (10922)); PGXP_ALU(0x24032AAAu, cpu->gpr[3], _pgx1, 0x00002AAAu); } #ifdef PSX_COSIM cosim_instr(0x80031CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1E4: AC430064 sw $v1, 100($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CE4u); return; } g_debug_last_store_pc = 0x80031CE4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430064u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1E8: 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(0x80031CE8u); #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, 0x80031CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1F0: AC43007C sw $v1, 124($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031CF0u); return; } g_debug_last_store_pc = 0x80031CF0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43007Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CF0u); #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 */ } label_BFC0C1F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C1F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C1F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1F4: 24035B24 addiu $v1, $zero, 23332 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (23332)); PGXP_ALU(0x24035B24u, cpu->gpr[3], _pgx1, 0x00005B24u); } #ifdef PSX_COSIM cosim_instr(0x80031CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C1F8: 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, 0x80031CF8u); return; } g_debug_last_store_pc = 0x80031CF8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C1FC: 2403E098 addiu $v1, $zero, -8040 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-8040)); PGXP_ALU(0x2403E098u, cpu->gpr[3], _pgx1, 0xFFFFE098u); } #ifdef PSX_COSIM cosim_instr(0x80031CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C200: A443001C sh $v1, 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, 0x80031D00u); return; } g_debug_last_store_pc = 0x80031D00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C204: A0400006 sb $zero, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D04u; 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(0x80031D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C208: 1000FFF2 beq $zero, $zero, 0xBFC0C1D4 */ uint32_t psx_brA_BFC0C208 = cpu->gpr[0]; uint32_t psx_brB_BFC0C208 = cpu->gpr[0]; psx_taken_BFC0C208 = (psx_brA_BFC0C208 == psx_brB_BFC0C208); psx_delay_BFC0C208 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C20C: 2403FF9B addiu $v1, $zero, -101 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-101)); PGXP_ALU(0x2403FF9Bu, cpu->gpr[3], _pgx1, 0xFFFFFF9Bu); } #ifdef PSX_COSIM cosim_instr(0x80031D0Cu); #endif if (psx_delay_BFC0C208) { psx_delay_BFC0C208 = 0; if (psx_taken_BFC0C208) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031CD4u); goto label_BFC0C1D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031D10u); } 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, 0x80031D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C210: 2403123C addiu $v1, $zero, 4668 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4668)); PGXP_ALU(0x2403123Cu, cpu->gpr[3], _pgx1, 0x0000123Cu); } #ifdef PSX_COSIM cosim_instr(0x80031D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C214: 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, 0x80031D14u); return; } g_debug_last_store_pc = 0x80031D14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C218: 24039CDC addiu $v1, $zero, -25380 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-25380)); PGXP_ALU(0x24039CDCu, cpu->gpr[3], _pgx1, 0xFFFF9CDCu); } #ifdef PSX_COSIM cosim_instr(0x80031D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C21C: A443001C sh $v1, 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, 0x80031D1Cu); return; } g_debug_last_store_pc = 0x80031D1Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C220: 2403FF9C addiu $v1, $zero, -100 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-100)); PGXP_ALU(0x2403FF9Cu, cpu->gpr[3], _pgx1, 0xFFFFFF9Cu); } #ifdef PSX_COSIM cosim_instr(0x80031D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C224: A043001E sb $v1, 30($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (30)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA043001Eu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C228: 24030AAA addiu $v1, $zero, 2730 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (2730)); PGXP_ALU(0x24030AAAu, cpu->gpr[3], _pgx1, 0x00000AAAu); } #ifdef PSX_COSIM cosim_instr(0x80031D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C22C: A0400006 sb $zero, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D2Cu; 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(0x80031D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C230: AC40004C 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, 0x80031D30u); return; } g_debug_last_store_pc = 0x80031D30u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40004Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C234: AC430064 sw $v1, 100($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D34u); return; } g_debug_last_store_pc = 0x80031D34u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430064u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C238: 03E00008 jr $ra */ psx_delay_BFC0C238 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C23C: AC40007C sw $zero, 124($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D3Cu); return; } g_debug_last_store_pc = 0x80031D3Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40007Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D3Cu); #endif if (psx_delay_BFC0C238) { psx_delay_BFC0C238 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0C240: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C240u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0C240: 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(0x80031D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C244: 00031883 sra $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 2u); PGXP_ALU(0x00031883u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80031D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C248: A4440004 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031D48u); return; } g_debug_last_store_pc = 0x80031D48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA4440004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C24C: A0440006 sb $a0, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440006u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C250: A444001C sh $a0, 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, 0x80031D50u); return; } g_debug_last_store_pc = 0x80031D50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA444001Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C254: A044001E sb $a0, 30($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (30)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA044001Eu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C258: A4440034 sh $a0, 52($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031D58u); return; } g_debug_last_store_pc = 0x80031D58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA4440034u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C25C: A0440036 sb $a0, 54($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 54; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D5Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (54)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440036u, _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, 0xCu); #endif /* 0xBFC0C260: AC4300A0 sw $v1, 160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D60u); return; } g_debug_last_store_pc = 0x80031D60u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC4300A0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C264: AC430040 sw $v1, 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, 0x80031D64u); return; } g_debug_last_store_pc = 0x80031D64u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C268: AC430028 sw $v1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D68u); return; } g_debug_last_store_pc = 0x80031D68u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430028u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C26C: AC430010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D6Cu); return; } g_debug_last_store_pc = 0x80031D6Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C270: AC400088 sw $zero, 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, 0x80031D70u); return; } g_debug_last_store_pc = 0x80031D70u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400088u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C274: AC400070 sw $zero, 112($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D74u); return; } g_debug_last_store_pc = 0x80031D74u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400070u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C278: 03E00008 jr $ra */ psx_delay_BFC0C278 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C27C: AC400058 sw $zero, 88($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031D7Cu); return; } g_debug_last_store_pc = 0x80031D7Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400058u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D7Cu); #endif if (psx_delay_BFC0C278) { psx_delay_BFC0C278 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0C280: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C280u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C280: 00031883 sra $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] >> 2u); PGXP_ALU(0x00031883u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80031D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C284: 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, 0x80031D84u); return; } g_debug_last_store_pc = 0x80031D84u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4400004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C288: A0400006 sb $zero, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D88u; 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(0x80031D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C28C: A440001C sh $zero, 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, 0x80031D8Cu); return; } g_debug_last_store_pc = 0x80031D8Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA440001Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C290: A040001E sb $zero, 30($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 30; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (30)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA040001Eu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C294: A4400034 sh $zero, 52($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 52; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (52)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80031D94u); return; } g_debug_last_store_pc = 0x80031D94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4400034u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C298: A0400036 sb $zero, 54($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 54; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031D98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (54)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0400036u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C29C: AC430040 sw $v1, 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, 0x80031D9Cu); return; } g_debug_last_store_pc = 0x80031D9Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430040u, _pgxa, cpu->gpr[3]); } #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, 0xCu); #endif /* 0xBFC0C2A0: AC430028 sw $v1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DA0u); return; } g_debug_last_store_pc = 0x80031DA0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430028u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C2A4: 03E00008 jr $ra */ psx_delay_BFC0C2A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C2A8: AC430010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DA8u); return; } g_debug_last_store_pc = 0x80031DA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031DA8u); #endif if (psx_delay_BFC0C2A4) { psx_delay_BFC0C2A4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0C2AC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C2ACu); int psx_delay_BFC0C2B4 = 0; int psx_delay_BFC0C2C0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0C2BCu: goto label_BFC0C2BC; default: break; } } label_BFC0C2AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C2ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C2ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C2AC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0xA0000000u); #endif /* 0xBFC0C2B0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DB0u); return; } g_debug_last_store_pc = 0x80031DB0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0C2B4: 0C00C36C jal 0xB0030DB0 */ cpu->gpr[31] = 0x80031DBCu; /* jal link before delay slot */ psx_delay_BFC0C2B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0C2B8: 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(0x80031DB8u); #endif if (psx_delay_BFC0C2B4) { psx_delay_BFC0C2B4 = 0; cpu->gpr[31] = 0x80031DBCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030DB0u); cpu->pc = 0x80030DB0u; return; } label_BFC0C2BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C2BCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C2BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DBCu); #endif /* 0xBFC0C2BC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031DBCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x0u); #endif /* 0xBFC0C2C0: 0800C9E6 j 0xB0032798 */ psx_delay_BFC0C2C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C2C4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80031DC4u); #endif if (psx_delay_BFC0C2C0) { psx_delay_BFC0C2C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032798u); cpu->pc = 0x80032798u; return; } } void OpenBIOS_func_1FC0C2C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C2C8u); int psx_delay_BFC0C34C = 0; label_BFC0C2C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C2C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C2C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DC8u); #endif /* 0xBFC0C2C8: 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, 0x80031DC8u); 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(0x80031DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C2CC: 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(0x80031DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0C2D0: 00681823 subu $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(0x00681823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C2D4: 00A30018 mult $a1, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A30018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80031DD4u); #endif /* 0xBFC0C2D8: 93A50010 lbu $a1, 16($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 16; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (16)), 5, 0x20000000u); PGXP_LOAD(0x93A50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC0C2DC: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C2E0: 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(0x80031DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C2E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C2E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0C2EC: 00A80018 mult $a1, $t0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[8]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A80018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[8]); #ifdef PSX_COSIM cosim_instr(0x80031DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C2F0: 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(0x80031DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C2F4: 00852021 addu $a0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031DF4u); #endif /* 0xBFC0C2F8: 93A50014 lbu $a1, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[29] + (20)), 5, 0x20000000u); PGXP_LOAD(0x93A50014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80031DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0C2FC: 00C30018 mult $a2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[6] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[6])); #endif PGXP_MULDIV(0x00C30018u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[3]); #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, 0x10u); #endif /* 0xBFC0C300: 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(0x80031E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C304: A0440000 sb $a0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031E04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C308: 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(0x80031E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C30C: 00000000 nop */ /* nop */ #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, 0x1u); #endif /* 0xBFC0C310: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0C314: 00A80018 mult $a1, $t0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[8]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A80018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[8]); #ifdef PSX_COSIM cosim_instr(0x80031E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C318: 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(0x80031E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C31C: 00852021 addu $a0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C320: 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(0x80031E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C324: 00E30018 mult $a3, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E30018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80031E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C328: A0440001 sb $a0, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031E28u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440001u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80031E28u); #endif /* 0xBFC0C32C: 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(0x80031E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C330: 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(0x80031E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C334: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C338: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC0C33C: 00880018 mult $a0, $t0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[4] * (int64_t)(int32_t)cpu->gpr[8]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[4])); #endif PGXP_MULDIV(0x00880018u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[8]); #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, 0x10u); #endif /* 0xBFC0C340: 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(0x80031E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C344: 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(0x80031E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C348: 00031A02 srl $v1, $v1, 8 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 8u; PGXP_ALU(0x00031A02u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80031E48u); #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, 0x80031E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C350: A0430002 sb $v1, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80031E50u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031E50u); #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 OpenBIOS_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_BFC0C360 = 0; int psx_taken_BFC0C360 = 0; int psx_delay_BFC0C374 = 0; int psx_delay_BFC0C380 = 0; int psx_taken_BFC0C380 = 0; int psx_delay_BFC0C398 = 0; int psx_delay_BFC0C3A4 = 0; int psx_taken_BFC0C3A4 = 0; int psx_delay_BFC0C3AC = 0; int psx_taken_BFC0C3AC = 0; int psx_delay_BFC0C3B8 = 0; int psx_taken_BFC0C3B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0C368u: goto label_BFC0C368; case 0xBFC0C37Cu: goto label_BFC0C37C; case 0xBFC0C388u: goto label_BFC0C388; case 0xBFC0C38Cu: goto label_BFC0C38C; case 0xBFC0C3A0u: goto label_BFC0C3A0; case 0xBFC0C3ACu: goto label_BFC0C3AC; case 0xBFC0C3B4u: goto label_BFC0C3B4; 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, 0x80031E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C354: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C358: 30850600 andi $a1, $a0, 0x600 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0x600u; PGXP_ALU(0x30850600u, cpu->gpr[5], _pgx1, 0x0600u); } #ifdef PSX_COSIM cosim_instr(0x80031E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C35C: 308307FF andi $v1, $a0, 0x7FF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x7FFu; PGXP_ALU(0x308307FFu, cpu->gpr[3], _pgx1, 0x07FFu); } #ifdef PSX_COSIM cosim_instr(0x80031E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0C360: 14A00006 bne $a1, $zero, 0xBFC0C37C */ uint32_t psx_brA_BFC0C360 = cpu->gpr[5]; uint32_t psx_brB_BFC0C360 = cpu->gpr[0]; psx_taken_BFC0C360 = (psx_brA_BFC0C360 != psx_brB_BFC0C360); psx_delay_BFC0C360 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C364: 24424598 addiu $v0, $v0, 17816 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (17816)); PGXP_ALU(0x24424598u, cpu->gpr[2], _pgx1, 0x00004598u); } #ifdef PSX_COSIM cosim_instr(0x80031E64u); #endif if (psx_delay_BFC0C360) { psx_delay_BFC0C360 = 0; if (psx_taken_BFC0C360) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E7Cu); goto label_BFC0C37C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E68u); } label_BFC0C368: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C368u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C368: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80031E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C36C: 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(0x80031E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E70u); #endif /* 0xBFC0C370: 8C420000 lw $v0, 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, 0x80031E70u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C374: 03E00008 jr $ra */ psx_delay_BFC0C374 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C378: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031E78u); #endif if (psx_delay_BFC0C374) { psx_delay_BFC0C374 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x80031E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C37C: 30840400 andi $a0, $a0, 0x400 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x400u; PGXP_ALU(0x30840400u, cpu->gpr[4], _pgx1, 0x0400u); } #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, 0x11u); #endif /* 0xBFC0C380: 14800007 bne $a0, $zero, 0xBFC0C3A0 */ uint32_t psx_brA_BFC0C380 = cpu->gpr[4]; uint32_t psx_brB_BFC0C380 = cpu->gpr[0]; psx_taken_BFC0C380 = (psx_brA_BFC0C380 != psx_brB_BFC0C380); psx_delay_BFC0C380 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0C384: 240403FF addiu $a0, $zero, 1023 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (1023)); PGXP_ALU(0x240403FFu, cpu->gpr[4], _pgx1, 0x000003FFu); } #ifdef PSX_COSIM cosim_instr(0x80031E84u); #endif if (psx_delay_BFC0C380) { psx_delay_BFC0C380 = 0; if (psx_taken_BFC0C380) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EA0u); goto label_BFC0C3A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E88u); } label_BFC0C388: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C388u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C388: 00831823 subu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] - cpu->gpr[3]; PGXP_ALU(0x00831823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031E88u); #endif 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, 0x80031E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C38C: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80031E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C390: 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(0x80031E90u); #endif /* 0xBFC0C394: 8C420000 lw $v0, 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, 0x80031E94u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C398: 03E00008 jr $ra */ psx_delay_BFC0C398 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C39C: 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(0x80031E9Cu); #endif if (psx_delay_BFC0C398) { psx_delay_BFC0C398 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0C3A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C3A0: 2C640600 sltiu $a0, $v1, 1536 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[3] < 0x00000600u ? 1 : 0); PGXP_ALU(0x2C640600u, cpu->gpr[4], _pgx1, 0x0600u); } #ifdef PSX_COSIM cosim_instr(0x80031EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0C3A4: 10800003 beq $a0, $zero, 0xBFC0C3B4 */ uint32_t psx_brA_BFC0C3A4 = cpu->gpr[4]; uint32_t psx_brB_BFC0C3A4 = cpu->gpr[0]; psx_taken_BFC0C3A4 = (psx_brA_BFC0C3A4 == psx_brB_BFC0C3A4); psx_delay_BFC0C3A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C3A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031EA8u); #endif if (psx_delay_BFC0C3A4) { psx_delay_BFC0C3A4 = 0; if (psx_taken_BFC0C3A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EB4u); goto label_BFC0C3B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EACu); } label_BFC0C3AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C3AC: 1000FFF7 beq $zero, $zero, 0xBFC0C38C */ uint32_t psx_brA_BFC0C3AC = cpu->gpr[0]; uint32_t psx_brB_BFC0C3AC = cpu->gpr[0]; psx_taken_BFC0C3AC = (psx_brA_BFC0C3AC == psx_brB_BFC0C3AC); psx_delay_BFC0C3AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C3B0: 2463FC00 addiu $v1, $v1, -1024 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-1024)); PGXP_ALU(0x2463FC00u, cpu->gpr[3], _pgx1, 0xFFFFFC00u); } #ifdef PSX_COSIM cosim_instr(0x80031EB0u); #endif if (psx_delay_BFC0C3AC) { psx_delay_BFC0C3AC = 0; if (psx_taken_BFC0C3AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E8Cu); goto label_BFC0C38C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EB4u); } label_BFC0C3B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0C3B4: 240407FF addiu $a0, $zero, 2047 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (2047)); PGXP_ALU(0x240407FFu, cpu->gpr[4], _pgx1, 0x000007FFu); } #ifdef PSX_COSIM cosim_instr(0x80031EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C3B8: 1000FFEB beq $zero, $zero, 0xBFC0C368 */ uint32_t psx_brA_BFC0C3B8 = cpu->gpr[0]; uint32_t psx_brB_BFC0C3B8 = cpu->gpr[0]; psx_taken_BFC0C3B8 = (psx_brA_BFC0C3B8 == psx_brB_BFC0C3B8); psx_delay_BFC0C3B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C3BC: 00831823 subu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] - cpu->gpr[3]; PGXP_ALU(0x00831823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031EBCu); #endif if (psx_delay_BFC0C3B8) { psx_delay_BFC0C3B8 = 0; if (psx_taken_BFC0C3B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E68u); goto label_BFC0C368; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EC0u); cpu->pc = 0x80031EC0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0C3C0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C3C0u); int psx_delay_BFC0C3D4 = 0; int psx_taken_BFC0C3D4 = 0; int psx_delay_BFC0C3E0 = 0; int psx_delay_BFC0C3EC = 0; int psx_delay_BFC0C3F8 = 0; int psx_taken_BFC0C3F8 = 0; int psx_delay_BFC0C400 = 0; int psx_taken_BFC0C400 = 0; int psx_delay_BFC0C408 = 0; int psx_taken_BFC0C408 = 0; int psx_delay_BFC0C440 = 0; int psx_delay_BFC0C448 = 0; int psx_taken_BFC0C448 = 0; int psx_delay_BFC0C474 = 0; int psx_taken_BFC0C474 = 0; int psx_delay_BFC0C4A0 = 0; int psx_taken_BFC0C4A0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0C3DCu: goto label_BFC0C3DC; case 0xBFC0C3E0u: goto label_BFC0C3E0; case 0xBFC0C3E8u: goto label_BFC0C3E8; case 0xBFC0C3F4u: goto label_BFC0C3F4; case 0xBFC0C400u: goto label_BFC0C400; case 0xBFC0C408u: goto label_BFC0C408; case 0xBFC0C410u: goto label_BFC0C410; case 0xBFC0C434u: goto label_BFC0C434; case 0xBFC0C438u: goto label_BFC0C438; case 0xBFC0C448u: goto label_BFC0C448; case 0xBFC0C450u: goto label_BFC0C450; case 0xBFC0C47Cu: goto label_BFC0C47C; default: break; } } label_BFC0C3C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C3C0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x80031EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C3C4: 30A20600 andi $v0, $a1, 0x600 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] & 0x600u; PGXP_ALU(0x30A20600u, cpu->gpr[2], _pgx1, 0x0600u); } #ifdef PSX_COSIM cosim_instr(0x80031EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC0C3C8: 00803825 or $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(0x00803825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x221u); #endif /* 0xBFC0C3CC: 00A04825 or $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(0x00A04825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0C3D0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031ED0u); return; } g_debug_last_store_pc = 0x80031ED0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0C3D4: 1440001C bne $v0, $zero, 0xBFC0C448 */ uint32_t psx_brA_BFC0C3D4 = cpu->gpr[2]; uint32_t psx_brB_BFC0C3D4 = cpu->gpr[0]; psx_taken_BFC0C3D4 = (psx_brA_BFC0C3D4 != psx_brB_BFC0C3D4); psx_delay_BFC0C3D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0C3D8: 30A407FF andi $a0, $a1, 0x7FF */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[5] & 0x7FFu; PGXP_ALU(0x30A407FFu, cpu->gpr[4], _pgx1, 0x07FFu); } #ifdef PSX_COSIM cosim_instr(0x80031ED8u); #endif if (psx_delay_BFC0C3D4) { psx_delay_BFC0C3D4 = 0; if (psx_taken_BFC0C3D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F48u); goto label_BFC0C448; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EDCu); } label_BFC0C3DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C3DC: 24840600 addiu $a0, $a0, 1536 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (1536)); PGXP_ALU(0x24840600u, cpu->gpr[4], _pgx1, 0x00000600u); } #ifdef PSX_COSIM cosim_instr(0x80031EDCu); #endif label_BFC0C3E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0C3E0: 0C00C795 jal 0xB0031E54 */ cpu->gpr[31] = 0x80031EE8u; /* jal link before delay slot */ psx_delay_BFC0C3E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C3E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031EE4u); #endif if (psx_delay_BFC0C3E0) { psx_delay_BFC0C3E0 = 0; cpu->gpr[31] = 0x80031EE8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E54u); cpu->pc = 0x80031E54u; return; } label_BFC0C3E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x211u); #endif /* 0xBFC0C3E8: 01202025 or $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(0x01202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0C3EC: 0C00C795 jal 0xB0031E54 */ cpu->gpr[31] = 0x80031EF4u; /* jal link before delay slot */ psx_delay_BFC0C3EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x105u); #endif /* 0xBFC0C3F0: 00404025 or $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(0x00404025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031EF0u); #endif if (psx_delay_BFC0C3EC) { psx_delay_BFC0C3EC = 0; cpu->gpr[31] = 0x80031EF4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031E54u); cpu->pc = 0x80031E54u; return; } label_BFC0C3F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C3F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C3F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C3F4: 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(0x80031EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0C3F8: 10C30015 beq $a2, $v1, 0xBFC0C450 */ uint32_t psx_brA_BFC0C3F8 = cpu->gpr[6]; uint32_t psx_brB_BFC0C3F8 = cpu->gpr[3]; psx_taken_BFC0C3F8 = (psx_brA_BFC0C3F8 == psx_brB_BFC0C3F8); psx_delay_BFC0C3F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0C3FC: 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(0x80031EFCu); #endif if (psx_delay_BFC0C3F8) { psx_delay_BFC0C3F8 = 0; if (psx_taken_BFC0C3F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F50u); goto label_BFC0C450; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F00u); } label_BFC0C400: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C400u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0C400: 10C3001E beq $a2, $v1, 0xBFC0C47C */ uint32_t psx_brA_BFC0C400 = cpu->gpr[6]; uint32_t psx_brB_BFC0C400 = cpu->gpr[3]; psx_taken_BFC0C400 = (psx_brA_BFC0C400 == psx_brB_BFC0C400); psx_delay_BFC0C400 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C404: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80031F04u); #endif if (psx_delay_BFC0C400) { psx_delay_BFC0C400 = 0; if (psx_taken_BFC0C400) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F7Cu); goto label_BFC0C47C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F08u); } label_BFC0C408: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C408u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0C408: 14C0000B bne $a2, $zero, 0xBFC0C438 */ uint32_t psx_brA_BFC0C408 = cpu->gpr[6]; uint32_t psx_brB_BFC0C408 = cpu->gpr[0]; psx_taken_BFC0C408 = (psx_brA_BFC0C408 != psx_brB_BFC0C408); psx_delay_BFC0C408 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C40C: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031F0Cu); #endif if (psx_delay_BFC0C408) { psx_delay_BFC0C408 = 0; if (psx_taken_BFC0C408) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F38u); goto label_BFC0C438; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F10u); } label_BFC0C410: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C410u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0C410: ACE80014 sw $t0, 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, 0x80031F10u); return; } g_debug_last_store_pc = 0x80031F10u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE80014u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80031F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0C414: 00084023 subu $t0, $zero, $t0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[0] - cpu->gpr[8]; PGXP_ALU(0x00084023u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C418: 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, 0x80031F18u); return; } g_debug_last_store_pc = 0x80031F18u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACE30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C41C: ACE00004 sw $zero, 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, 0x80031F1Cu); return; } g_debug_last_store_pc = 0x80031F1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C420: ACE00008 sw $zero, 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, 0x80031F20u); return; } g_debug_last_store_pc = 0x80031F20u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00008u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C424: ACE0000C sw $zero, 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, 0x80031F24u); return; } g_debug_last_store_pc = 0x80031F24u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE0000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0C428: ACE20010 sw $v0, 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, 0x80031F28u); return; } g_debug_last_store_pc = 0x80031F28u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C42C: ACE00018 sw $zero, 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, 0x80031F2Cu); return; } g_debug_last_store_pc = 0x80031F2Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0C430: ACE8001C sw $t0, 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, 0x80031F30u); return; } g_debug_last_store_pc = 0x80031F30u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE8001Cu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80031F30u); #endif label_BFC0C434: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C434u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0C434: ACE20020 sw $v0, 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, 0x80031F34u); return; } g_debug_last_store_pc = 0x80031F34u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031F34u); #endif label_BFC0C438: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C438u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F38u); #endif /* 0xBFC0C438: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031F38u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80031F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C43C: 00000000 nop */ /* nop */ #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, 0x80000001u); #endif /* 0xBFC0C440: 03E00008 jr $ra */ psx_delay_BFC0C440 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C444: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80031F44u); #endif if (psx_delay_BFC0C440) { psx_delay_BFC0C440 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0C448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C448u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C448: 1000FFE5 beq $zero, $zero, 0xBFC0C3E0 */ uint32_t psx_brA_BFC0C448 = cpu->gpr[0]; uint32_t psx_brB_BFC0C448 = cpu->gpr[0]; psx_taken_BFC0C448 = (psx_brA_BFC0C448 == psx_brB_BFC0C448); psx_delay_BFC0C448 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C44C: 2484FE00 addiu $a0, $a0, -512 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-512)); PGXP_ALU(0x2484FE00u, cpu->gpr[4], _pgx1, 0xFFFFFE00u); } #ifdef PSX_COSIM cosim_instr(0x80031F4Cu); #endif if (psx_delay_BFC0C448) { psx_delay_BFC0C448 = 0; if (psx_taken_BFC0C448) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031EE0u); goto label_BFC0C3E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F50u); } label_BFC0C450: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C450u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x109u); #endif /* 0xBFC0C450: 00081823 subu $v1, $zero, $t0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[0] - cpu->gpr[8]; PGXP_ALU(0x00081823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C454: ACE30008 sw $v1, 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, 0x80031F54u); return; } g_debug_last_store_pc = 0x80031F54u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACE30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0C458: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0C45C: ACE20000 sw $v0, 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, 0x80031F5Cu); return; } g_debug_last_store_pc = 0x80031F5Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20000u, _pgxa, cpu->gpr[2]); } #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, 0x81u); #endif /* 0xBFC0C460: ACE00004 sw $zero, 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, 0x80031F60u); return; } g_debug_last_store_pc = 0x80031F60u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C464: ACE0000C sw $zero, 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, 0x80031F64u); return; } g_debug_last_store_pc = 0x80031F64u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE0000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C468: ACE30010 sw $v1, 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, 0x80031F68u); return; } g_debug_last_store_pc = 0x80031F68u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACE30010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80031F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C46C: ACE00014 sw $zero, 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, 0x80031F6Cu); return; } g_debug_last_store_pc = 0x80031F6Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00014u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0C470: 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, 0x80031F70u); return; } g_debug_last_store_pc = 0x80031F70u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE80018u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80031F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C474: 1000FFEF beq $zero, $zero, 0xBFC0C434 */ uint32_t psx_brA_BFC0C474 = cpu->gpr[0]; uint32_t psx_brB_BFC0C474 = cpu->gpr[0]; psx_taken_BFC0C474 = (psx_brA_BFC0C474 == psx_brB_BFC0C474); psx_delay_BFC0C474 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C478: ACE0001C sw $zero, 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, 0x80031F78u); return; } g_debug_last_store_pc = 0x80031F78u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE0001Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F78u); #endif if (psx_delay_BFC0C474) { psx_delay_BFC0C474 = 0; if (psx_taken_BFC0C474) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F34u); goto label_BFC0C434; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F7Cu); } label_BFC0C47C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C47Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C47Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0C47C: ACE80004 sw $t0, 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, 0x80031F7Cu); return; } g_debug_last_store_pc = 0x80031F7Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE80004u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80031F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0C480: 00084023 subu $t0, $zero, $t0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[0] - cpu->gpr[8]; PGXP_ALU(0x00084023u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80031F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0C484: ACE20000 sw $v0, 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, 0x80031F84u); return; } g_debug_last_store_pc = 0x80031F84u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0C488: ACE20010 sw $v0, 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, 0x80031F88u); return; } g_debug_last_store_pc = 0x80031F88u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80031F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C48C: ACE00008 sw $zero, 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, 0x80031F8Cu); return; } g_debug_last_store_pc = 0x80031F8Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00008u, _pgxa, cpu->gpr[0]); } #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, 0x180u); #endif /* 0xBFC0C490: ACE8000C sw $t0, 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, 0x80031F90u); return; } g_debug_last_store_pc = 0x80031F90u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACE8000Cu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80031F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C494: ACE00014 sw $zero, 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, 0x80031F94u); return; } g_debug_last_store_pc = 0x80031F94u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00014u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C498: ACE00018 sw $zero, 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, 0x80031F98u); return; } g_debug_last_store_pc = 0x80031F98u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE00018u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0C49C: ACE0001C sw $zero, 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, 0x80031F9Cu); return; } g_debug_last_store_pc = 0x80031F9Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE0001Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80031F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C4A0: 1000FFE4 beq $zero, $zero, 0xBFC0C434 */ uint32_t psx_brA_BFC0C4A0 = cpu->gpr[0]; uint32_t psx_brB_BFC0C4A0 = cpu->gpr[0]; psx_taken_BFC0C4A0 = (psx_brA_BFC0C4A0 == psx_brB_BFC0C4A0); psx_delay_BFC0C4A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0C4A4: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80031FA4u); #endif if (psx_delay_BFC0C4A0) { psx_delay_BFC0C4A0 = 0; if (psx_taken_BFC0C4A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031F34u); goto label_BFC0C434; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031FA8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80031FA8u); cpu->pc = 0x80031FA8u; return; /* fallthrough */ } void OpenBIOS_func_1FC0C4A8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C4A8u); int psx_delay_BFC0C820 = 0; label_BFC0C4A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C4A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C4A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C4A8: 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(0x80031FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC0C4AC: 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, 0x80031FACu); return; } g_debug_last_store_pc = 0x80031FACu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB6001Cu, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x80031FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC0C4B0: 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, 0x80031FB0u); return; } g_debug_last_store_pc = 0x80031FB0u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB50018u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80031FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0C4B4: AFB40014 sw $s4, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FB4u); return; } g_debug_last_store_pc = 0x80031FB4u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40014u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80031FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0C4B8: AFB30010 sw $s3, 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, 0x80031FB8u); return; } g_debug_last_store_pc = 0x80031FB8u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30010u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80031FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0C4BC: AFB2000C sw $s2, 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, 0x80031FBCu); return; } g_debug_last_store_pc = 0x80031FBCu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB2000Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80031FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0C4C0: AFB10008 sw $s1, 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, 0x80031FC0u); return; } g_debug_last_store_pc = 0x80031FC0u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10008u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80031FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0C4C4: 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, 0x80031FC4u); return; } g_debug_last_store_pc = 0x80031FC4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00004u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80031FC4u); #endif /* 0xBFC0C4C8: 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, 0x80031FC8u); 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(0x80031FC8u); #endif /* 0xBFC0C4CC: 8CB60004 lw $s6, 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, 0x80031FCCu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x20u); } PGXP_LOAD(0x8CB60004u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x80031FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FD0u); #endif /* 0xBFC0C4D0: 8CB50000 lw $s5, 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, 0x80031FD0u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x20u); } PGXP_LOAD(0x8CB50000u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80031FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x410000u); #endif /* 0xBFC0C4D4: 02160018 mult $s0, $s6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[16] * (int64_t)(int32_t)cpu->gpr[22]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[16])); #endif PGXP_MULDIV(0x02160018u, cpu->hi, cpu->lo, cpu->gpr[16], cpu->gpr[22]); #ifdef PSX_COSIM cosim_instr(0x80031FD4u); #endif /* 0xBFC0C4D8: 8C990000 lw $t9, 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, 0x80031FD8u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x10u); } PGXP_LOAD(0x8C990000u, _pgxa, cpu->gpr[25]); } #ifdef PSX_COSIM cosim_instr(0x80031FD8u); #endif /* 0xBFC0C4DC: 8CB40008 lw $s4, 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, 0x80031FDCu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20u); } PGXP_LOAD(0x8CB40008u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80031FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FE0u); #endif /* 0xBFC0C4E0: 8CB2000C lw $s2, 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, 0x80031FE0u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20u); } PGXP_LOAD(0x8CB2000Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x80031FE0u); #endif /* 0xBFC0C4E4: 8CB30010 lw $s3, 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, 0x80031FE4u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20u); } PGXP_LOAD(0x8CB30010u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80031FE4u); #endif /* 0xBFC0C4E8: 8CB10014 lw $s1, 20($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FE8u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20u); } PGXP_LOAD(0x8CB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80031FE8u); #endif /* 0xBFC0C4EC: 8C980018 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FECu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x10u); } PGXP_LOAD(0x8C980018u, _pgxa, cpu->gpr[24]); } #ifdef PSX_COSIM cosim_instr(0x80031FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80031FF0u); #endif /* 0xBFC0C4F0: 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, 0x80031FF0u); 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(0x80031FF0u); #endif /* 0xBFC0C4F4: 8C8F0010 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80031FF4u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x10u); } PGXP_LOAD(0x8C8F0010u, _pgxa, cpu->gpr[15]); } #ifdef PSX_COSIM cosim_instr(0x80031FF4u); #endif /* 0xBFC0C4F8: 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, 0x80031FF8u); 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(0x80031FF8u); #endif /* 0xBFC0C4FC: 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, 0x80031FFCu); 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(0x80031FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032000u); #endif /* 0xBFC0C500: 8C890014 lw $t1, 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, 0x80032000u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x10u); } PGXP_LOAD(0x8C890014u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x80032000u); #endif /* 0xBFC0C504: 8C870020 lw $a3, 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, 0x80032004u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x10u); } PGXP_LOAD(0x8C870020u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80032004u); #endif /* 0xBFC0C508: 8CAC0018 lw $t4, 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, 0x80032008u); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x20u); } PGXP_LOAD(0x8CAC0018u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x80032008u); #endif /* 0xBFC0C50C: 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, 0x8003200Cu); 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(0x8003200Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032010u); #endif /* 0xBFC0C510: 8CA80020 lw $t0, 32($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032010u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } PGXP_LOAD(0x8CA80020u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80032010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C514: 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(0x80032014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C518: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C51C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x8003201Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C520: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C524: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2200000u); #endif /* 0xBFC0C528: 03350018 mult $t9, $s5 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[25] * (int64_t)(int32_t)cpu->gpr[21]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[25])); #endif PGXP_MULDIV(0x03350018u, cpu->hi, cpu->lo, cpu->gpr[25], cpu->gpr[21]); #ifdef PSX_COSIM cosim_instr(0x80032028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C52C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x8003202Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C530: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C534: 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(0x80032034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C538: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C53C: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003203Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1100000u); #endif /* 0xBFC0C540: 03140018 mult $t8, $s4 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[24] * (int64_t)(int32_t)cpu->gpr[20]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[24])); #endif PGXP_MULDIV(0x03140018u, cpu->hi, cpu->lo, cpu->gpr[24], cpu->gpr[20]); #ifdef PSX_COSIM cosim_instr(0x80032040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C544: 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(0x80032044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C548: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C54C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003204Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C550: 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(0x80032050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C554: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C558: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408000u); #endif /* 0xBFC0C55C: 01F60018 mult $t7, $s6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[15] * (int64_t)(int32_t)cpu->gpr[22]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[15])); #endif PGXP_MULDIV(0x01F60018u, cpu->hi, cpu->lo, cpu->gpr[15], cpu->gpr[22]); #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, 0x14u); #endif /* 0xBFC0C560: 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(0x80032060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C564: 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, 0x80032064u); return; } g_debug_last_store_pc = 0x80032064u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C568: 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(0x80032068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C56C: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x8003206Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C570: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C574: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C578: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204000u); #endif /* 0xBFC0C57C: 01D50018 mult $t6, $s5 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[14] * (int64_t)(int32_t)cpu->gpr[21]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[14])); #endif PGXP_MULDIV(0x01D50018u, cpu->hi, cpu->lo, cpu->gpr[14], cpu->gpr[21]); #ifdef PSX_COSIM cosim_instr(0x8003207Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C580: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C584: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C588: 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(0x80032088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C58C: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #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, 0x18u); #endif /* 0xBFC0C590: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x102000u); #endif /* 0xBFC0C594: 01B40018 mult $t5, $s4 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[13] * (int64_t)(int32_t)cpu->gpr[20]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[13])); #endif PGXP_MULDIV(0x01B40018u, cpu->hi, cpu->lo, cpu->gpr[13], cpu->gpr[20]); #ifdef PSX_COSIM cosim_instr(0x80032094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C598: 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(0x80032098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C59C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #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, 0x28u); #endif /* 0xBFC0C5A0: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800320A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C5A4: 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(0x800320A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C5A8: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800320A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C5AC: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800320ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800320B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400200u); #endif /* 0xBFC0C5B0: 01360018 mult $t1, $s6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[9] * (int64_t)(int32_t)cpu->gpr[22]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[9])); #endif PGXP_MULDIV(0x01360018u, cpu->hi, cpu->lo, cpu->gpr[9], cpu->gpr[22]); #ifdef PSX_COSIM cosim_instr(0x800320B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C5B4: 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(0x800320B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C5B8: ACC20004 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, 0x800320B8u); return; } g_debug_last_store_pc = 0x800320B8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800320B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C5BC: 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(0x800320BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800320C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C5C0: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800320C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C5C4: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800320C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C5C8: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800320C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C5CC: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x200800u); #endif /* 0xBFC0C5D0: 01750018 mult $t3, $s5 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[11] * (int64_t)(int32_t)cpu->gpr[21]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[11])); #endif PGXP_MULDIV(0x01750018u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[21]); #ifdef PSX_COSIM cosim_instr(0x800320D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C5D4: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800320D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C5D8: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800320D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C5DC: 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(0x800320DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800320E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C5E0: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800320E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C5E4: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800320E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100080u); #endif /* 0xBFC0C5E8: 00F40018 mult $a3, $s4 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[20]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00F40018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[20]); #ifdef PSX_COSIM cosim_instr(0x800320E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C5EC: 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(0x800320ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800320F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0C5F0: 0000A810 mfhi $s5 */ cpu->gpr[21] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x0000A810u, cpu->gpr[21], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800320F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200008u); #endif /* 0xBFC0C5F4: 00151A00 sll $v1, $s5, 8 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[3] = cpu->gpr[21] << 8u; PGXP_ALU(0x00151A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800320F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0C5F8: 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(0x800320F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0C5FC: 0014A602 srl $s4, $s4, 24 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] >> 24u; PGXP_ALU(0x0014A602u, cpu->gpr[20], _pgx1, 24u); } #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, 0x100008u); #endif /* 0xBFC0C600: 0074A021 addu $s4, $v1, $s4 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[3] + cpu->gpr[20]; PGXP_ALU(0x0074A021u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90000u); #endif /* 0xBFC0C604: 02700018 mult $s3, $s0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[19] * (int64_t)(int32_t)cpu->gpr[16]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[19])); #endif PGXP_MULDIV(0x02700018u, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[16]); #ifdef PSX_COSIM cosim_instr(0x80032104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0C608: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C60C: ACC20008 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003210Cu); return; } g_debug_last_store_pc = 0x8003210Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20008u, _pgxa, cpu->gpr[2]); } #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, 0x10u); #endif /* 0xBFC0C610: 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(0x80032110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C614: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C618: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C61C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0xCu); #endif /* 0xBFC0C620: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2040000u); #endif /* 0xBFC0C624: 02590018 mult $s2, $t9 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[18] * (int64_t)(int32_t)cpu->gpr[25]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[18])); #endif PGXP_MULDIV(0x02590018u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[25]); #ifdef PSX_COSIM cosim_instr(0x80032124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C628: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C62C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003212Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C630: 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(0x80032130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C634: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C638: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1020000u); #endif /* 0xBFC0C63C: 02380018 mult $s1, $t8 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[17] * (int64_t)(int32_t)cpu->gpr[24]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[17])); #endif PGXP_MULDIV(0x02380018u, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[24]); #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, 0x14u); #endif /* 0xBFC0C640: 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(0x80032140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0C644: 0000A810 mfhi $s5 */ cpu->gpr[21] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x0000A810u, cpu->gpr[21], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200008u); #endif /* 0xBFC0C648: 00151A00 sll $v1, $s5, 8 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[3] = cpu->gpr[21] << 8u; PGXP_ALU(0x00151A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0C64C: 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(0x8003214Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0C650: 0014A602 srl $s4, $s4, 24 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] >> 24u; PGXP_ALU(0x0014A602u, cpu->gpr[20], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC0C654: 0074A021 addu $s4, $v1, $s4 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[3] + cpu->gpr[20]; PGXP_ALU(0x0074A021u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032154u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88000u); #endif /* 0xBFC0C658: 026F0018 mult $s3, $t7 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[19] * (int64_t)(int32_t)cpu->gpr[15]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[19])); #endif PGXP_MULDIV(0x026F0018u, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[15]); #ifdef PSX_COSIM cosim_instr(0x80032158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0C65C: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x44u); #endif /* 0xBFC0C660: ACC2000C sw $v0, 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, 0x80032160u); return; } g_debug_last_store_pc = 0x80032160u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC2000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C664: 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(0x80032164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C668: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C66C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #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, 0x28u); #endif /* 0xBFC0C670: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C674: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44000u); #endif /* 0xBFC0C678: 024E0018 mult $s2, $t6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[18] * (int64_t)(int32_t)cpu->gpr[14]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[18])); #endif PGXP_MULDIV(0x024E0018u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[14]); #ifdef PSX_COSIM cosim_instr(0x80032178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C67C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #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, 0x28u); #endif /* 0xBFC0C680: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C684: 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(0x80032184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C688: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C68C: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x22000u); #endif /* 0xBFC0C690: 022D0018 mult $s1, $t5 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[17] * (int64_t)(int32_t)cpu->gpr[13]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[17])); #endif PGXP_MULDIV(0x022D0018u, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[13]); #ifdef PSX_COSIM cosim_instr(0x80032190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C694: 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(0x80032194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200000u); #endif /* 0xBFC0C698: 0000A810 mfhi $s5 */ cpu->gpr[21] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x0000A810u, cpu->gpr[21], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200008u); #endif /* 0xBFC0C69C: 00151A00 sll $v1, $s5, 8 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[3] = cpu->gpr[21] << 8u; PGXP_ALU(0x00151A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0x100000u); #endif /* 0xBFC0C6A0: 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(0x800321A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0C6A4: 0014A602 srl $s4, $s4, 24 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[20] >> 24u; PGXP_ALU(0x0014A602u, cpu->gpr[20], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800321A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100008u); #endif /* 0xBFC0C6A8: 0074A021 addu $s4, $v1, $s4 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[20] = cpu->gpr[3] + cpu->gpr[20]; PGXP_ALU(0x0074A021u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800321A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80200u); #endif /* 0xBFC0C6AC: 02690018 mult $s3, $t1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[19] * (int64_t)(int32_t)cpu->gpr[9]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[19])); #endif PGXP_MULDIV(0x02690018u, cpu->hi, cpu->lo, cpu->gpr[19], cpu->gpr[9]); #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, 0x100004u); #endif /* 0xBFC0C6B0: 00541021 addu $v0, $v0, $s4 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[20]; PGXP_ALU(0x00541021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800321B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C6B4: ACC20010 sw $v0, 16($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 16; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800321B4u); return; } g_debug_last_store_pc = 0x800321B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800321B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C6B8: 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(0x800321B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C6BC: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #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, 0x20u); #endif /* 0xBFC0C6C0: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800321C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C6C4: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800321C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C6C8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800321C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40800u); #endif /* 0xBFC0C6CC: 024B0018 mult $s2, $t3 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[18] * (int64_t)(int32_t)cpu->gpr[11]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[18])); #endif PGXP_MULDIV(0x024B0018u, cpu->hi, cpu->lo, cpu->gpr[18], cpu->gpr[11]); #ifdef PSX_COSIM cosim_instr(0x800321CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800321D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C6D0: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800321D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C6D4: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800321D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C6D8: 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(0x800321D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C6DC: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800321DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800321E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C6E0: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800321E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080u); #endif /* 0xBFC0C6E4: 02270018 mult $s1, $a3 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[17] * (int64_t)(int32_t)cpu->gpr[7]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[17])); #endif PGXP_MULDIV(0x02270018u, cpu->hi, cpu->lo, cpu->gpr[17], cpu->gpr[7]); #ifdef PSX_COSIM cosim_instr(0x800321E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C6E8: 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(0x800321E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0C6EC: 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(0x800321ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800321F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80008u); #endif /* 0xBFC0C6F0: 00131A00 sll $v1, $s3, 8 */ { uint32_t _pgx1 = cpu->gpr[19]; cpu->gpr[3] = cpu->gpr[19] << 8u; PGXP_ALU(0x00131A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800321F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0C6F4: 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(0x800321F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0C6F8: 00129602 srl $s2, $s2, 24 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[18] >> 24u; PGXP_ALU(0x00129602u, cpu->gpr[18], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800321F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40008u); #endif /* 0xBFC0C6FC: 00729021 addu $s2, $v1, $s2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[18] = cpu->gpr[3] + cpu->gpr[18]; PGXP_ALU(0x00729021u, cpu->gpr[18], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800321FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10400u); #endif /* 0xBFC0C700: 01500018 mult $t2, $s0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[16]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01500018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[16]); #ifdef PSX_COSIM cosim_instr(0x80032200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0C704: 00521021 addu $v0, $v0, $s2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[18]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[18]; PGXP_ALU(0x00521021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C708: ACC20014 sw $v0, 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, 0x80032208u); return; } g_debug_last_store_pc = 0x80032208u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032208u); #endif /* 0xBFC0C70C: 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, 0x8003220Cu); 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(0x8003220Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032210u); #endif /* 0xBFC0C710: 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, 0x80032210u); 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(0x80032210u); #endif /* 0xBFC0C714: 8FB40014 lw $s4, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032214u); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x20000000u); } PGXP_LOAD(0x8FB40014u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80032214u); #endif /* 0xBFC0C718: 8FB30010 lw $s3, 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, 0x80032218u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x20000000u); } PGXP_LOAD(0x8FB30010u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80032218u); #endif /* 0xBFC0C71C: 8FB2000C lw $s2, 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, 0x8003221Cu); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x20000000u); } PGXP_LOAD(0x8FB2000Cu, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x8003221Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032220u); #endif /* 0xBFC0C720: 8FB10008 lw $s1, 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, 0x80032220u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x20000000u); } PGXP_LOAD(0x8FB10008u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80032220u); #endif /* 0xBFC0C724: 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, 0x80032224u); 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(0x80032224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0C728: 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(0x80032228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C72C: 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(0x8003222Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C730: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C734: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C738: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C73C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003223Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2001000u); #endif /* 0xBFC0C740: 01990018 mult $t4, $t9 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[12] * (int64_t)(int32_t)cpu->gpr[25]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[12])); #endif PGXP_MULDIV(0x01990018u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[25]); #ifdef PSX_COSIM cosim_instr(0x80032240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C744: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C748: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C74C: 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(0x8003224Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C750: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C754: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000100u); #endif /* 0xBFC0C758: 01180018 mult $t0, $t8 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[8] * (int64_t)(int32_t)cpu->gpr[24]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[8])); #endif PGXP_MULDIV(0x01180018u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[24]); #ifdef PSX_COSIM cosim_instr(0x80032258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C75C: 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(0x8003225Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C760: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C764: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C768: 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(0x80032268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C76C: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x8003226Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C770: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8400u); #endif /* 0xBFC0C774: 014F0018 mult $t2, $t7 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[15]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x014F0018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[15]); #ifdef PSX_COSIM cosim_instr(0x80032274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C778: 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(0x80032278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C77C: ACC20018 sw $v0, 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, 0x8003227Cu); return; } g_debug_last_store_pc = 0x8003227Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003227Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C780: 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(0x80032280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C784: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C788: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C78C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003228Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C790: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5000u); #endif /* 0xBFC0C794: 018E0018 mult $t4, $t6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[12] * (int64_t)(int32_t)cpu->gpr[14]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[12])); #endif PGXP_MULDIV(0x018E0018u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[14]); #ifdef PSX_COSIM cosim_instr(0x80032294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C798: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C79C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0x10u); #endif /* 0xBFC0C7A0: 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(0x800322A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7A4: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800322A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C7A8: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800322A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2100u); #endif /* 0xBFC0C7AC: 010D0018 mult $t0, $t5 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[8] * (int64_t)(int32_t)cpu->gpr[13]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[8])); #endif PGXP_MULDIV(0x010D0018u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[13]); #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, 0x14u); #endif /* 0xBFC0C7B0: 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(0x800322B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C7B4: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800322B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C7B8: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800322B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7BC: 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(0x800322BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800322C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7C0: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800322C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C7C4: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800322C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1800u); #endif /* 0xBFC0C7C8: 018B0018 mult $t4, $t3 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[12] * (int64_t)(int32_t)cpu->gpr[11]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[12])); #endif PGXP_MULDIV(0x018B0018u, cpu->hi, cpu->lo, cpu->gpr[12], cpu->gpr[11]); #ifdef PSX_COSIM cosim_instr(0x800322C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C7CC: 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(0x800322CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800322D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C7D0: ACC2001C sw $v0, 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, 0x800322D0u); return; } g_debug_last_store_pc = 0x800322D0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC2001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800322D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7D4: 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(0x800322D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C7D8: 00041602 srl $v0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00041602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800322D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C7DC: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800322DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800322E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C7E0: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800322E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C7E4: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800322E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC0C7E8: 01490018 mult $t2, $t1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[9]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01490018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[9]); #ifdef PSX_COSIM cosim_instr(0x800322E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C7EC: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800322ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800322F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C7F0: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800322F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7F4: 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(0x800322F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C7F8: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800322F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C7FC: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800322FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0C800: 01070018 mult $t0, $a3 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[8] * (int64_t)(int32_t)cpu->gpr[7]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[8])); #endif PGXP_MULDIV(0x01070018u, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[7]); #ifdef PSX_COSIM cosim_instr(0x80032300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C804: 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(0x80032304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0C808: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0C80C: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003230Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C810: 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(0x80032310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0C814: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0C818: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C81C: 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(0x8003231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C820: 03E00008 jr $ra */ psx_delay_BFC0C820 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C824: ACC20020 sw $v0, 32($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 32; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032324u); return; } g_debug_last_store_pc = 0x80032324u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032324u); #endif if (psx_delay_BFC0C820) { psx_delay_BFC0C820 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0C828(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C828u); int psx_delay_BFC0C968 = 0; label_BFC0C828: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C828u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032328u); #endif /* 0xBFC0C828: 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, 0x80032328u); 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(0x80032328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C82C: 00000000 nop */ /* nop */ #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, 0x24u); #endif /* 0xBFC0C830: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C834: 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(0x80032334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C838: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C83C: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x8003233Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C840: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C844: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C848: 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, 0x80032348u); return; } g_debug_last_store_pc = 0x80032348u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032348u); #endif /* 0xBFC0C84C: 8C820004 lw $v0, 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, 0x8003234Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003234Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C850: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C854: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C858: 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(0x80032358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C85C: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x8003235Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C860: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C864: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C868: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C86C: AC820004 sw $v0, 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, 0x8003236Cu); return; } g_debug_last_store_pc = 0x8003236Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003236Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032370u); #endif /* 0xBFC0C870: 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, 0x80032370u); 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(0x80032370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C874: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C878: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C87C: 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(0x8003237Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C880: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C884: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C888: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C88C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003238Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C890: AC820008 sw $v0, 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, 0x80032390u); return; } g_debug_last_store_pc = 0x80032390u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032390u); #endif /* 0xBFC0C894: 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, 0x80032394u); 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(0x80032394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C898: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C89C: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x8003239Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800323A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C8A0: 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(0x800323A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C8A4: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800323A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C8A8: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800323A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C8AC: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0xCu); #endif /* 0xBFC0C8B0: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800323B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C8B4: AC82000C sw $v0, 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, 0x800323B4u); return; } g_debug_last_store_pc = 0x800323B4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC82000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800323B4u); #endif /* 0xBFC0C8B8: 8C820010 lw $v0, 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, 0x800323B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800323B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C8BC: 00000000 nop */ /* nop */ #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, 0x24u); #endif /* 0xBFC0C8C0: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x800323C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C8C4: 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(0x800323C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C8C8: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800323C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C8CC: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #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, 0x88u); #endif /* 0xBFC0C8D0: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800323D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C8D4: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800323D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C8D8: 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, 0x800323D8u); return; } g_debug_last_store_pc = 0x800323D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800323D8u); #endif /* 0xBFC0C8DC: 8C820014 lw $v0, 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, 0x800323DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820014u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0C8E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800323E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C8E4: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x800323E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C8E8: 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(0x800323E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C8EC: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #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, 0x80u); #endif /* 0xBFC0C8F0: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800323F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C8F4: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800323F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C8F8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800323F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C8FC: 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, 0x800323FCu); return; } g_debug_last_store_pc = 0x800323FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820014u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800323FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032400u); #endif /* 0xBFC0C900: 8C820018 lw $v0, 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, 0x80032400u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C904: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C908: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C90C: 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(0x8003240Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C910: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C914: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C918: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C91C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003241Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C920: AC820018 sw $v0, 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, 0x80032420u); return; } g_debug_last_store_pc = 0x80032420u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820018u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032420u); #endif /* 0xBFC0C924: 8C82001C lw $v0, 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, 0x80032424u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C928: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C92C: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x8003242Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C930: 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(0x80032430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C934: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C938: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x80032438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C93C: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0xCu); #endif /* 0xBFC0C940: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C944: 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, 0x80032444u); return; } g_debug_last_store_pc = 0x80032444u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032444u); #endif /* 0xBFC0C948: 8C820020 lw $v0, 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, 0x80032448u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C94C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003244Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0C950: 00A20018 mult $a1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A20018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0C954: 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(0x80032454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0C958: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0C95C: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x8003245Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C960: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C964: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0C968: 03E00008 jr $ra */ psx_delay_BFC0C968 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0C96C: 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, 0x8003246Cu); return; } g_debug_last_store_pc = 0x8003246Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003246Cu); #endif if (psx_delay_BFC0C968) { psx_delay_BFC0C968 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0C970(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0C970u); int psx_delay_BFC0CAA8 = 0; label_BFC0C970: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0C970u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0C970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032470u); #endif /* 0xBFC0C970: 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, 0x80032470u); 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(0x80032470u); #endif /* 0xBFC0C974: 8C820010 lw $v0, 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, 0x80032474u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C820010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032474u); #endif /* 0xBFC0C978: 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, 0x80032478u); 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(0x80032478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC0C97C: 01620018 mult $t3, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[11] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[11])); #endif PGXP_MULDIV(0x01620018u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x8003247Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032480u); #endif /* 0xBFC0C980: 8CA70008 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032480u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70008u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80032480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C984: 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(0x80032484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C988: 00081602 srl $v0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00081602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0C98C: 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(0x8003248Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0C990: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C994: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032494u); #endif /* 0xBFC0C998: 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, 0x80032498u); 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(0x80032498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C99C: 00000000 nop */ /* nop */ #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, 0x408u); #endif /* 0xBFC0C9A0: 01430018 mult $t2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01430018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800324A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0C9A4: 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(0x800324A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0C9A8: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800324A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C9AC: 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(0x800324ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800324B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C9B0: 00084602 srl $t0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00084602u, cpu->gpr[8], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800324B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0C9B4: 00684021 addu $t0, $v1, $t0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[8]; PGXP_ALU(0x00684021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800324B4u); #endif /* 0xBFC0C9B8: 8C830014 lw $v1, 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, 0x800324B8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830014u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800324B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C9BC: 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(0x800324BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800324C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0C9C0: 00E30018 mult $a3, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E30018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800324C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0C9C4: 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(0x800324C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0C9C8: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800324C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C9CC: 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(0x800324CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800324D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C9D0: 00084602 srl $t0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00084602u, cpu->gpr[8], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800324D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0C9D4: 00684021 addu $t0, $v1, $t0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[8]; PGXP_ALU(0x00684021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800324D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x124u); #endif /* 0xBFC0C9D8: 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(0x800324D8u); #endif /* 0xBFC0C9DC: 8C82001C lw $v0, 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, 0x800324DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800324DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800324E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0C9E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800324E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC0C9E4: 01620018 mult $t3, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[11] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[11])); #endif PGXP_MULDIV(0x01620018u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x800324E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0C9E8: 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(0x800324E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0C9EC: 00081602 srl $v0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00081602u, cpu->gpr[2], _pgx1, 24u); } #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, 0x200u); #endif /* 0xBFC0C9F0: 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(0x800324F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0C9F4: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800324F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0C9F8: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800324F8u); #endif /* 0xBFC0C9FC: 8C830018 lw $v1, 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, 0x800324FCu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830018u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800324FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CA00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0CA04: 01430018 mult $t2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01430018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0CA08: 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(0x80032508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0CA0C: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0x100u); #endif /* 0xBFC0CA10: 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(0x80032510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0CA14: 00084602 srl $t0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00084602u, cpu->gpr[8], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0CA18: 00684021 addu $t0, $v1, $t0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[8]; PGXP_ALU(0x00684021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032518u); #endif /* 0xBFC0CA1C: 8C830020 lw $v1, 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, 0x8003251Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830020u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003251Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CA20: 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(0x80032520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0CA24: 00E30018 mult $a3, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E30018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0CA28: 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(0x80032528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0CA2C: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0x100u); #endif /* 0xBFC0CA30: 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(0x80032530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0CA34: 00084602 srl $t0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00084602u, cpu->gpr[8], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0CA38: 00684021 addu $t0, $v1, $t0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[8]; PGXP_ALU(0x00684021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032538u); #endif /* 0xBFC0CA3C: 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, 0x8003253Cu); 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(0x8003253Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CA40: 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(0x80032540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0CA44: 01630018 mult $t3, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[11] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[11])); #endif PGXP_MULDIV(0x01630018u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0CA48: 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(0x80032548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0CA4C: 00084602 srl $t0, $t0, 24 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] >> 24u; PGXP_ALU(0x00084602u, cpu->gpr[8], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x8003254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0CA50: 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(0x80032550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0CA54: 00091A00 sll $v1, $t1, 8 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] << 8u; PGXP_ALU(0x00091A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0CA58: 00684021 addu $t0, $v1, $t0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[3] + cpu->gpr[8]; PGXP_ALU(0x00684021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032558u); #endif /* 0xBFC0CA5C: 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, 0x8003255Cu); 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(0x8003255Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CA60: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0CA64: 01430018 mult $t2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[10] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[10])); #endif PGXP_MULDIV(0x01430018u, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0CA68: 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(0x80032568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0CA6C: 000B1A00 sll $v1, $t3, 8 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[11] << 8u; PGXP_ALU(0x000B1A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003256Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0CA70: 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(0x80032570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0CA74: 000A5602 srl $t2, $t2, 24 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] >> 24u; PGXP_ALU(0x000A5602u, cpu->gpr[10], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0CA78: 006A5021 addu $t2, $v1, $t2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[10]; PGXP_ALU(0x006A5021u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032578u); #endif /* 0xBFC0CA7C: 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, 0x8003257Cu); 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(0x8003257Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC0CA80: 010A4021 addu $t0, $t0, $t2 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[10]; PGXP_ALU(0x010A4021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0CA84: 00E30018 mult $a3, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[7] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[7])); #endif PGXP_MULDIV(0x00E30018u, cpu->hi, cpu->lo, cpu->gpr[7], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0CA88: ACC50004 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032588u); return; } g_debug_last_store_pc = 0x80032588u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xACC50004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80032588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0CA8C: ACC20008 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003258Cu); return; } g_debug_last_store_pc = 0x8003258Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACC20008u, _pgxa, cpu->gpr[2]); } #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, 0x400u); #endif /* 0xBFC0CA90: 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(0x80032590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0CA94: 000A5602 srl $t2, $t2, 24 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[10] >> 24u; PGXP_ALU(0x000A5602u, cpu->gpr[10], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0CA98: 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(0x80032598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0CA9C: 000B1A00 sll $v1, $t3, 8 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[11] << 8u; PGXP_ALU(0x000B1A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x8003259Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800325A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC0CAA0: 006A5021 addu $t2, $v1, $t2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = cpu->gpr[3] + cpu->gpr[10]; PGXP_ALU(0x006A5021u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800325A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC0CAA4: 010A4021 addu $t0, $t0, $t2 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[8] + cpu->gpr[10]; PGXP_ALU(0x010A4021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800325A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CAA8: 03E00008 jr $ra */ psx_delay_BFC0CAA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC0CAAC: 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, 0x800325ACu); return; } g_debug_last_store_pc = 0x800325ACu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACC80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800325ACu); #endif if (psx_delay_BFC0CAA8) { psx_delay_BFC0CAA8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CAB0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CAB0u); int psx_delay_BFC0CB18 = 0; label_BFC0CAB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CAB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CAB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800325B0u); #endif /* 0xBFC0CAB0: 8CA30004 lw $v1, 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, 0x800325B0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x8CA30004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800325B0u); #endif /* 0xBFC0CAB4: 8C82001C lw $v0, 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, 0x800325B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C82001Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800325B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CAB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800325B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CABC: 00620018 mult $v1, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00620018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #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, 0x40u); #endif /* 0xBFC0CAC0: 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(0x800325C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0CAC4: 00061602 srl $v0, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00061602u, cpu->gpr[2], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800325C4u); #endif /* 0xBFC0CAC8: 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, 0x800325C8u); 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(0x800325C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0CACC: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 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, 0x88u); #endif /* 0xBFC0CAD0: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800325D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CAD4: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800325D4u); #endif /* 0xBFC0CAD8: 8C830018 lw $v1, 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, 0x800325D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C830018u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800325D8u); #endif /* 0xBFC0CADC: 8C840020 lw $a0, 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, 0x800325DCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x10u); } PGXP_LOAD(0x8C840020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800325DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800325E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0CAE0: 00C30018 mult $a2, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[6] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[6])); #endif PGXP_MULDIV(0x00C30018u, cpu->hi, cpu->lo, cpu->gpr[6], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800325E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0CAE4: 00003810 mfhi $a3 */ cpu->gpr[7] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00003810u, cpu->gpr[7], cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x800325E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0CAE8: 00071A00 sll $v1, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[3] = cpu->gpr[7] << 8u; PGXP_ALU(0x00071A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800325E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0CAEC: 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(0x800325ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800325F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0CAF0: 00063602 srl $a2, $a2, 24 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] >> 24u; PGXP_ALU(0x00063602u, cpu->gpr[6], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x800325F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0CAF4: 00663021 addu $a2, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00663021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800325F4u); #endif /* 0xBFC0CAF8: 8CA30008 lw $v1, 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, 0x800325F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x8CA30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800325F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0CAFC: 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(0x800325FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0CB00: 00830018 mult $a0, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[4] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[4])); #endif PGXP_MULDIV(0x00830018u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CB04: 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(0x80032604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CB08: 00042602 srl $a0, $a0, 24 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] >> 24u; PGXP_ALU(0x00042602u, cpu->gpr[4], _pgx1, 24u); } #ifdef PSX_COSIM cosim_instr(0x80032608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CB0C: 00002810 mfhi $a1 */ cpu->gpr[5] = cpu->hi; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_stall(cpu); #endif PGXP_ALU(0x00002810u, cpu->gpr[5], cpu->hi, 0u); #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, 0x28u); #endif /* 0xBFC0CB10: 00051A00 sll $v1, $a1, 8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] << 8u; PGXP_ALU(0x00051A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0CB14: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CB18: 03E00008 jr $ra */ psx_delay_BFC0CB18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CB1C: 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(0x8003261Cu); #endif if (psx_delay_BFC0CB18) { psx_delay_BFC0CB18 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CB20(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CB20u); int psx_delay_BFC0CB20 = 0; int psx_taken_BFC0CB20 = 0; int psx_delay_BFC0CB30 = 0; int psx_taken_BFC0CB30 = 0; int psx_delay_BFC0CB4C = 0; int psx_taken_BFC0CB4C = 0; int psx_delay_BFC0CB54 = 0; int psx_taken_BFC0CB54 = 0; int psx_delay_BFC0CB7C = 0; int psx_taken_BFC0CB7C = 0; int psx_delay_BFC0CBA4 = 0; int psx_taken_BFC0CBA4 = 0; int psx_delay_BFC0CBAC = 0; int psx_taken_BFC0CBAC = 0; int psx_delay_BFC0CBB4 = 0; int psx_taken_BFC0CBB4 = 0; int psx_delay_BFC0CBBC = 0; int psx_taken_BFC0CBBC = 0; int psx_delay_BFC0CBC4 = 0; int psx_taken_BFC0CBC4 = 0; int psx_delay_BFC0CBCC = 0; int psx_taken_BFC0CBCC = 0; int psx_delay_BFC0CBD8 = 0; int psx_taken_BFC0CBD8 = 0; int psx_delay_BFC0CBE0 = 0; int psx_taken_BFC0CBE0 = 0; int psx_delay_BFC0CBE8 = 0; int psx_taken_BFC0CBE8 = 0; int psx_delay_BFC0CC28 = 0; int psx_taken_BFC0CC28 = 0; int psx_delay_BFC0CC38 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CB28u: goto label_BFC0CB28; case 0xBFC0CB30u: goto label_BFC0CB30; case 0xBFC0CB38u: goto label_BFC0CB38; case 0xBFC0CB40u: goto label_BFC0CB40; case 0xBFC0CB54u: goto label_BFC0CB54; case 0xBFC0CB5Cu: goto label_BFC0CB5C; case 0xBFC0CB60u: goto label_BFC0CB60; case 0xBFC0CB78u: goto label_BFC0CB78; case 0xBFC0CB84u: goto label_BFC0CB84; case 0xBFC0CB88u: goto label_BFC0CB88; case 0xBFC0CBA4u: goto label_BFC0CBA4; case 0xBFC0CBACu: goto label_BFC0CBAC; case 0xBFC0CBB4u: goto label_BFC0CBB4; case 0xBFC0CBBCu: goto label_BFC0CBBC; case 0xBFC0CBC4u: goto label_BFC0CBC4; case 0xBFC0CBCCu: goto label_BFC0CBCC; case 0xBFC0CBD4u: goto label_BFC0CBD4; case 0xBFC0CBD8u: goto label_BFC0CBD8; case 0xBFC0CBE0u: goto label_BFC0CBE0; case 0xBFC0CBE8u: goto label_BFC0CBE8; case 0xBFC0CBF0u: goto label_BFC0CBF0; case 0xBFC0CC08u: goto label_BFC0CC08; case 0xBFC0CC0Cu: goto label_BFC0CC0C; case 0xBFC0CC30u: goto label_BFC0CC30; default: break; } } label_BFC0CB20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB20u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CB20: 04810003 bgez $a0, 0xBFC0CB30 */ uint32_t psx_brA_BFC0CB20 = cpu->gpr[4]; psx_taken_BFC0CB20 = ((int32_t)psx_brA_BFC0CB20 >= 0); psx_delay_BFC0CB20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0CB24: 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(0x80032624u); #endif if (psx_delay_BFC0CB20) { psx_delay_BFC0CB20 = 0; if (psx_taken_BFC0CB20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032630u); goto label_BFC0CB30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032628u); } 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, 0x80032628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CB28: 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(0x80032628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0CB2C: 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(0x8003262Cu); #endif 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, 0x80032630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CB30: 04A10003 bgez $a1, 0xBFC0CB40 */ uint32_t psx_brA_BFC0CB30 = cpu->gpr[5]; psx_taken_BFC0CB30 = ((int32_t)psx_brA_BFC0CB30 >= 0); psx_delay_BFC0CB30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC0CB34: 00044203 sra $t0, $a0, 8 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[4] >> 8u); PGXP_ALU(0x00044203u, cpu->gpr[8], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032634u); #endif if (psx_delay_BFC0CB30) { psx_delay_BFC0CB30 = 0; if (psx_taken_BFC0CB30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032640u); goto label_BFC0CB40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032638u); } label_BFC0CB38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0CB38: 00052823 subu $a1, $zero, $a1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[0] - cpu->gpr[5]; PGXP_ALU(0x00052823u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x801u); #endif /* 0xBFC0CB3C: 000B5823 subu $t3, $zero, $t3 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[0] - cpu->gpr[11]; PGXP_ALU(0x000B5823u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003263Cu); #endif label_BFC0CB40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x128u); #endif /* 0xBFC0CB40: 0105182B sltu $v1, $t0, $a1 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = (uint32_t)(cpu->gpr[8] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0105182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CB44: 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(0x80032644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CB48: 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(0x80032648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CB4C: 1460000A bne $v1, $zero, 0xBFC0CB78 */ uint32_t psx_brA_BFC0CB4C = cpu->gpr[3]; uint32_t psx_brB_BFC0CB4C = cpu->gpr[0]; psx_taken_BFC0CB4C = (psx_brA_BFC0CB4C != psx_brB_BFC0CB4C); psx_delay_BFC0CB4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0CB50: 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(0x80032650u); #endif if (psx_delay_BFC0CB4C) { psx_delay_BFC0CB4C = 0; if (psx_taken_BFC0CB4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032678u); goto label_BFC0CB78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032654u); } label_BFC0CB54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB54u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0CB54: 14A00002 bne $a1, $zero, 0xBFC0CB60 */ uint32_t psx_brA_BFC0CB54 = cpu->gpr[5]; uint32_t psx_brB_BFC0CB54 = cpu->gpr[0]; psx_taken_BFC0CB54 = (psx_brA_BFC0CB54 != psx_brB_BFC0CB54); psx_delay_BFC0CB54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC0CB58: 0105001B divu $t0, $a1 */ { uint32_t psx_n = cpu->gpr[8]; 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(0x0105001Bu, cpu->hi, cpu->lo, cpu->gpr[8], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0x80032658u); #endif if (psx_delay_BFC0CB54) { psx_delay_BFC0CB54 = 0; if (psx_taken_BFC0CB54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032660u); goto label_BFC0CB60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003265Cu); } label_BFC0CB5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003265Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0CB5C: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x8003265Cu); return; #ifdef PSX_COSIM cosim_instr(0x8003265Cu); #endif 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, 0x80032660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CB60: 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(0x80032660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CB64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CB68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0CB6C: 00A30018 mult $a1, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A30018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x8003266Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CB70: 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(0x80032670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0CB74: 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(0x80032674u); #endif label_BFC0CB78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CB78: 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(0x80032678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CB7C: 10000009 beq $zero, $zero, 0xBFC0CBA4 */ uint32_t psx_brA_BFC0CB7C = cpu->gpr[0]; uint32_t psx_brB_BFC0CB7C = cpu->gpr[0]; psx_taken_BFC0CB7C = (psx_brA_BFC0CB7C == psx_brB_BFC0CB7C); psx_delay_BFC0CB7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0CB80: 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(0x80032680u); #endif if (psx_delay_BFC0CB7C) { psx_delay_BFC0CB7C = 0; if (psx_taken_BFC0CB7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326A4u); goto label_BFC0CBA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032684u); } label_BFC0CB84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CB84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CB84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0CB84: 00053FC2 srl $a3, $a1, 31 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] >> 31u; PGXP_ALU(0x00053FC2u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x80032684u); #endif 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, 0x80032688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CB88: 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(0x80032688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0CB8C: 00E21021 addu $v0, $a3, $v0 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[2]; PGXP_ALU(0x00E21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003268Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0CB90: 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(0x80032690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0CB94: 00033FC2 srl $a3, $v1, 31 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[7] = cpu->gpr[3] >> 31u; PGXP_ALU(0x00033FC2u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x80032694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CB98: 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(0x80032698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0CB9C: 00E63021 addu $a2, $a3, $a2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[6]; PGXP_ALU(0x00E63021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003269Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CBA0: 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(0x800326A0u); #endif 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, 0x800326A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CBA4: 1C400005 bgtz $v0, 0xBFC0CBBC */ uint32_t psx_brA_BFC0CBA4 = cpu->gpr[2]; psx_taken_BFC0CBA4 = ((int32_t)psx_brA_BFC0CBA4 > 0); psx_delay_BFC0CBA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x184u); #endif /* 0xBFC0CBA8: 0048382B sltu $a3, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0048382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326A8u); #endif if (psx_delay_BFC0CBA4) { psx_delay_BFC0CBA4 = 0; if (psx_taken_BFC0CBA4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326BCu); goto label_BFC0CBBC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326ACu); } label_BFC0CBAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CBAC: 1440000A bne $v0, $zero, 0xBFC0CBD8 */ uint32_t psx_brA_BFC0CBAC = cpu->gpr[2]; uint32_t psx_brB_BFC0CBAC = cpu->gpr[0]; psx_taken_BFC0CBAC = (psx_brA_BFC0CBAC != psx_brB_BFC0CBAC); psx_delay_BFC0CBAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x184u); #endif /* 0xBFC0CBB0: 0102382B sltu $a3, $t0, $v0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0102382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326B0u); #endif if (psx_delay_BFC0CBAC) { psx_delay_BFC0CBAC = 0; if (psx_taken_BFC0CBAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326D8u); goto label_BFC0CBD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326B4u); } label_BFC0CBB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBB4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0CBB4: 10A00007 beq $a1, $zero, 0xBFC0CBD4 */ uint32_t psx_brA_BFC0CBB4 = cpu->gpr[5]; uint32_t psx_brB_BFC0CBB4 = cpu->gpr[0]; psx_taken_BFC0CBB4 = (psx_brA_BFC0CBB4 == psx_brB_BFC0CBB4); psx_delay_BFC0CBB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x184u); #endif /* 0xBFC0CBB8: 0048382B sltu $a3, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[7] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0048382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326B8u); #endif if (psx_delay_BFC0CBB4) { psx_delay_BFC0CBB4 = 0; if (psx_taken_BFC0CBB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326D4u); goto label_BFC0CBD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326BCu); } label_BFC0CBBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBBCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0CBBC: 14E0FFF1 bne $a3, $zero, 0xBFC0CB84 */ uint32_t psx_brA_BFC0CBBC = cpu->gpr[7]; uint32_t psx_brB_BFC0CBBC = cpu->gpr[0]; psx_taken_BFC0CBBC = (psx_brA_BFC0CBBC != psx_brB_BFC0CBBC); psx_delay_BFC0CBBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CBC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800326C0u); #endif if (psx_delay_BFC0CBBC) { psx_delay_BFC0CBBC = 0; if (psx_taken_BFC0CBBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032684u); goto label_BFC0CB84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326C4u); } label_BFC0CBC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CBC4: 15020003 bne $t0, $v0, 0xBFC0CBD4 */ uint32_t psx_brA_BFC0CBC4 = cpu->gpr[8]; uint32_t psx_brB_BFC0CBC4 = cpu->gpr[2]; psx_taken_BFC0CBC4 = (psx_brA_BFC0CBC4 != psx_brB_BFC0CBC4); psx_delay_BFC0CBC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xB0u); #endif /* 0xBFC0CBC8: 00A4382B sltu $a3, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[7] = (uint32_t)(cpu->gpr[5] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x00A4382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326C8u); #endif if (psx_delay_BFC0CBC4) { psx_delay_BFC0CBC4 = 0; if (psx_taken_BFC0CBC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326D4u); goto label_BFC0CBD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326CCu); } label_BFC0CBCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0CBCC: 14E0FFEE bne $a3, $zero, 0xBFC0CB88 */ uint32_t psx_brA_BFC0CBCC = cpu->gpr[7]; uint32_t psx_brB_BFC0CBCC = cpu->gpr[0]; psx_taken_BFC0CBCC = (psx_brA_BFC0CBCC != psx_brB_BFC0CBCC); psx_delay_BFC0CBCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0CBD0: 00053FC2 srl $a3, $a1, 31 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] >> 31u; PGXP_ALU(0x00053FC2u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x800326D0u); #endif if (psx_delay_BFC0CBCC) { psx_delay_BFC0CBCC = 0; if (psx_taken_BFC0CBCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032688u); goto label_BFC0CB88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326D4u); } label_BFC0CBD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x184u); #endif /* 0xBFC0CBD4: 0102382B sltu $a3, $t0, $v0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = (uint32_t)(cpu->gpr[8] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0102382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326D4u); #endif label_BFC0CBD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0CBD8: 14E0000B bne $a3, $zero, 0xBFC0CC08 */ uint32_t psx_brA_BFC0CBD8 = cpu->gpr[7]; 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_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CBDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800326DCu); #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, 0x80032708u); goto label_BFC0CC08; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326E0u); } 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, 0x800326E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CBE0: 14480003 bne $v0, $t0, 0xBFC0CBF0 */ uint32_t psx_brA_BFC0CBE0 = cpu->gpr[2]; uint32_t psx_brB_BFC0CBE0 = cpu->gpr[8]; psx_taken_BFC0CBE0 = (psx_brA_BFC0CBE0 != psx_brB_BFC0CBE0); psx_delay_BFC0CBE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xB0u); #endif /* 0xBFC0CBE4: 0085382B sltu $a3, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[7] = (uint32_t)(cpu->gpr[4] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0085382Bu, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326E4u); #endif if (psx_delay_BFC0CBE0) { psx_delay_BFC0CBE0 = 0; if (psx_taken_BFC0CBE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326F0u); goto label_BFC0CBF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326E8u); } label_BFC0CBE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0CBE8: 14E00008 bne $a3, $zero, 0xBFC0CC0C */ uint32_t psx_brA_BFC0CBE8 = cpu->gpr[7]; uint32_t psx_brB_BFC0CBE8 = cpu->gpr[0]; psx_taken_BFC0CBE8 = (psx_brA_BFC0CBE8 != psx_brB_BFC0CBE8); psx_delay_BFC0CBE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0CBEC: 00023FC0 sll $a3, $v0, 31 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 31u; PGXP_ALU(0x00023FC0u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x800326ECu); #endif if (psx_delay_BFC0CBE8) { psx_delay_BFC0CBE8 = 0; if (psx_taken_BFC0CBE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003270Cu); goto label_BFC0CC0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326F0u); } label_BFC0CBF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CBF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CBF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800326F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xB0u); #endif /* 0xBFC0CBF0: 00853823 subu $a3, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[4] - cpu->gpr[5]; PGXP_ALU(0x00853823u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x490u); #endif /* 0xBFC0CBF4: 0087502B sltu $t2, $a0, $a3 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[10] = (uint32_t)(cpu->gpr[4] < cpu->gpr[7] ? 1 : 0); PGXP_ALU(0x0087502Bu, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800326F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CBF8: 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(0x800326F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC0CBFC: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _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, 0x500u); #endif /* 0xBFC0CC00: 010A4023 subu $t0, $t0, $t2 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[8] = cpu->gpr[8] - cpu->gpr[10]; PGXP_ALU(0x010A4023u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0CC04: 01234821 addu $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(0x01234821u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032704u); #endif label_BFC0CC08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CC08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CC08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0CC08: 00023FC0 sll $a3, $v0, 31 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[2] << 31u; PGXP_ALU(0x00023FC0u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x80032708u); #endif label_BFC0CC0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CC0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CC0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003270Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CC0C: 00052842 srl $a1, $a1, 1 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] >> 1u; PGXP_ALU(0x00052842u, cpu->gpr[5], _pgx1, 1u); } #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, 0xA0u); #endif /* 0xBFC0CC10: 00E52821 addu $a1, $a3, $a1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[7] + cpu->gpr[5]; PGXP_ALU(0x00E52821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CC14: 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(0x80032714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0CC18: 00063FC0 sll $a3, $a2, 31 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[6] << 31u; PGXP_ALU(0x00063FC0u, cpu->gpr[7], _pgx1, 31u); } #ifdef PSX_COSIM cosim_instr(0x80032718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0CC1C: 00E31821 addu $v1, $a3, $v1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[3]; PGXP_ALU(0x00E31821u, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x40u); #endif /* 0xBFC0CC20: 00063042 srl $a2, $a2, 1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] >> 1u; PGXP_ALU(0x00063042u, cpu->gpr[6], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80032720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC8u); #endif /* 0xBFC0CC24: 00663825 or $a3, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[3] | cpu->gpr[6]; PGXP_ALU(0x00663825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0CC28: 14E0FFEA bne $a3, $zero, 0xBFC0CBD4 */ uint32_t psx_brA_BFC0CC28 = cpu->gpr[7]; uint32_t psx_brB_BFC0CC28 = cpu->gpr[0]; psx_taken_BFC0CC28 = (psx_brA_BFC0CC28 != psx_brB_BFC0CC28); psx_delay_BFC0CC28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CC2C: 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(0x8003272Cu); #endif if (psx_delay_BFC0CC28) { psx_delay_BFC0CC28 = 0; if (psx_taken_BFC0CC28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800326D4u); goto label_BFC0CBD4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032730u); } label_BFC0CC30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CC30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CC30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA00u); #endif /* 0xBFC0CC30: 01690018 mult $t3, $t1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[11] * (int64_t)(int32_t)cpu->gpr[9]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[11])); #endif PGXP_MULDIV(0x01690018u, cpu->hi, cpu->lo, cpu->gpr[11], cpu->gpr[9]); #ifdef PSX_COSIM cosim_instr(0x80032730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CC34: 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(0x80032734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CC38: 03E00008 jr $ra */ psx_delay_BFC0CC38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CC3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003273Cu); #endif if (psx_delay_BFC0CC38) { psx_delay_BFC0CC38 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CC40(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CC40u); int psx_delay_BFC0CC68 = 0; int psx_delay_BFC0CC90 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CC70u: goto label_BFC0CC70; default: break; } } 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, 0x80032740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0CC40: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x80032740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0CC44: 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, 0x80032744u); return; } g_debug_last_store_pc = 0x80032744u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80032744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0CC48: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032748u); return; } g_debug_last_store_pc = 0x80032748u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80032748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0CC4C: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003274Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032750u); #endif /* 0xBFC0CC50: 96031114 lhu $v1, 4372($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4372; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4372)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032750u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x96031114u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CC54: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CC58: A4434E84 sh $v1, 20100($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032758u); return; } g_debug_last_store_pc = 0x80032758u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4434E84u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CC5C: 3C048003 lui $a0, 0x8003 */ cpu->gpr[4] = 0x80030000u; PGXP_ALU(0x3C048003u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003275Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CC60: 24020100 addiu $v0, $zero, 256 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); PGXP_ALU(0x24020100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x80032760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0CC64: A6021114 sh $v0, 4372($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4372)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032764u); return; } g_debug_last_store_pc = 0x80032764u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6021114u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0CC68: 0C00CCE1 jal 0xB0033384 */ cpu->gpr[31] = 0x80032770u; /* jal link before delay slot */ psx_delay_BFC0CC68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CC6C: 24843B6C addiu $a0, $a0, 15212 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15212)); PGXP_ALU(0x24843B6Cu, cpu->gpr[4], _pgx1, 0x00003B6Cu); } #ifdef PSX_COSIM cosim_instr(0x8003276Cu); #endif if (psx_delay_BFC0CC68) { psx_delay_BFC0CC68 = 0; cpu->gpr[31] = 0x80032770u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033384u); cpu->pc = 0x80033384u; return; } label_BFC0CC70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CC70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CC70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CC70: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032770u); #endif /* 0xBFC0CC74: 96021110 lhu $v0, 4368($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4368; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4368)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032774u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x96021110u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032774u); #endif /* 0xBFC0CC78: 8C633D44 lw $v1, 15684($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032778u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C633D44u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032778u); #endif /* 0xBFC0CC7C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003277Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x8003277Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CC80: 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(0x80032780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CC84: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032784u); #endif /* 0xBFC0CC88: 8FB00010 lw $s0, 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, 0x80032788u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80032788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CC8C: A4624E86 sh $v0, 20102($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 20102; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (20102)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003278Cu); return; } g_debug_last_store_pc = 0x8003278Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4624E86u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003278Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CC90: 03E00008 jr $ra */ psx_delay_BFC0CC90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0CC94: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80032794u); #endif if (psx_delay_BFC0CC90) { psx_delay_BFC0CC90 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CC98(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CC98u); int psx_delay_BFC0CCC4 = 0; int psx_taken_BFC0CCC4 = 0; int psx_delay_BFC0CCCC = 0; int psx_delay_BFC0CCF8 = 0; int psx_taken_BFC0CCF8 = 0; int psx_delay_BFC0CD08 = 0; int psx_taken_BFC0CD08 = 0; int psx_delay_BFC0CD30 = 0; int psx_taken_BFC0CD30 = 0; int psx_delay_BFC0CD40 = 0; int psx_taken_BFC0CD40 = 0; int psx_delay_BFC0CD50 = 0; int psx_taken_BFC0CD50 = 0; int psx_delay_BFC0CD6C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CCCCu: goto label_BFC0CCCC; case 0xBFC0CCD4u: goto label_BFC0CCD4; case 0xBFC0CD00u: goto label_BFC0CD00; case 0xBFC0CD10u: goto label_BFC0CD10; case 0xBFC0CD18u: goto label_BFC0CD18; case 0xBFC0CD1Cu: goto label_BFC0CD1C; case 0xBFC0CD38u: goto label_BFC0CD38; case 0xBFC0CD48u: goto label_BFC0CD48; case 0xBFC0CD58u: goto label_BFC0CD58; case 0xBFC0CD64u: goto label_BFC0CD64; default: break; } } label_BFC0CC98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CC98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CC98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0CC98: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x80032798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CC9C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0x20010000u); #endif /* 0xBFC0CCA0: 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, 0x800327A0u); return; } g_debug_last_store_pc = 0x800327A0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x800327A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0CCA4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327A4u); return; } g_debug_last_store_pc = 0x800327A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800327A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0CCA8: 3C108004 lui $s0, 0x8004 */ cpu->gpr[16] = 0x80040000u; PGXP_ALU(0x3C108004u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800327A8u); #endif /* 0xBFC0CCAC: 94431110 lhu $v1, 4368($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4368; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4368)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800327ACu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x94431110u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800327ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327B0u); #endif /* 0xBFC0CCB0: 96024E86 lhu $v0, 20102($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 20102; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20102)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800327B0u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x96024E86u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800327B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CCB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800327B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CCB8: 00431023 subu $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(0x00431023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800327B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CCBC: 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(0x800327BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CCC0: 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(0x800327C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CCC4: 1C400027 bgtz $v0, 0xBFC0CD64 */ uint32_t psx_brA_BFC0CCC4 = cpu->gpr[2]; psx_taken_BFC0CCC4 = ((int32_t)psx_brA_BFC0CCC4 > 0); psx_delay_BFC0CCC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CCC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800327C8u); #endif if (psx_delay_BFC0CCC4) { psx_delay_BFC0CCC4 = 0; if (psx_taken_BFC0CCC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032864u); goto label_BFC0CD64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800327CCu); } label_BFC0CCCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CCCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CCCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0CCCC: 0C00CCF1 jal 0xB00333C4 */ cpu->gpr[31] = 0x800327D4u; /* jal link before delay slot */ psx_delay_BFC0CCCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CCD0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800327D0u); #endif if (psx_delay_BFC0CCCC) { psx_delay_BFC0CCCC = 0; cpu->gpr[31] = 0x800327D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800333C4u); cpu->pc = 0x800333C4u; return; } label_BFC0CCD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CCD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CCD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CCD4: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800327D4u); #endif /* 0xBFC0CCD8: 96034E86 lhu $v1, 20102($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 20102; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20102)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800327D8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x96034E86u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800327D8u); #endif /* 0xBFC0CCDC: 8C423D44 lw $v0, 15684($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15684; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D44u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800327DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CCE0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800327E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CCE4: 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(0x800327E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0CCE8: A6024E86 sh $v0, 20102($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 20102; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (20102)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800327E8u); return; } g_debug_last_store_pc = 0x800327E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6024E86u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800327E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CCEC: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800327ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800327F0u); #endif /* 0xBFC0CCF0: 8C423D80 lw $v0, 15744($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800327F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D80u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800327F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CCF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800327F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CCF8: 10400007 beq $v0, $zero, 0xBFC0CD18 */ uint32_t psx_brA_BFC0CCF8 = cpu->gpr[2]; uint32_t psx_brB_BFC0CCF8 = cpu->gpr[0]; psx_taken_BFC0CCF8 = (psx_brA_BFC0CCF8 == psx_brB_BFC0CCF8); psx_delay_BFC0CCF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CCFC: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800327FCu); #endif if (psx_delay_BFC0CCF8) { psx_delay_BFC0CCF8 = 0; if (psx_taken_BFC0CCF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032818u); goto label_BFC0CD18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032800u); } label_BFC0CD00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032800u); #endif /* 0xBFC0CD00: 8C653D78 lw $a1, 15736($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032800u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C653D78u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80032800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CD04: 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(0x80032804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0CD08: 14A40004 bne $a1, $a0, 0xBFC0CD1C */ uint32_t psx_brA_BFC0CD08 = cpu->gpr[5]; uint32_t psx_brB_BFC0CD08 = cpu->gpr[4]; psx_taken_BFC0CD08 = (psx_brA_BFC0CD08 != psx_brB_BFC0CD08); psx_delay_BFC0CD08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0CD0C: 3C068004 lui $a2, 0x8004 */ cpu->gpr[6] = 0x80040000u; PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003280Cu); #endif if (psx_delay_BFC0CD08) { psx_delay_BFC0CD08 = 0; if (psx_taken_BFC0CD08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003281Cu); goto label_BFC0CD1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032810u); } label_BFC0CD10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD10u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CD10: 2404003B addiu $a0, $zero, 59 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (59)); PGXP_ALU(0x2404003Bu, cpu->gpr[4], _pgx1, 0x0000003Bu); } #ifdef PSX_COSIM cosim_instr(0x80032810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0CD14: AC643D78 sw $a0, 15736($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032814u); return; } g_debug_last_store_pc = 0x80032814u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC643D78u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032814u); #endif label_BFC0CD18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0CD18: 3C068004 lui $a2, 0x8004 */ cpu->gpr[6] = 0x80040000u; PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032818u); #endif label_BFC0CD1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD1Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003281Cu); #endif /* 0xBFC0CD1C: 8C673D78 lw $a3, 15736($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003281Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8u); } PGXP_LOAD(0x8C673D78u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x8003281Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032820u); #endif /* 0xBFC0CD20: 8CC83D38 lw $t0, 15672($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 15672; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (15672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032820u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x40u); } PGXP_LOAD(0x8CC83D38u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80032820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CD24: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032824u); #endif /* 0xBFC0CD28: 8C643D7C lw $a0, 15740($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15740; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032828u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C643D7Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CD2C: 3C058004 lui $a1, 0x8004 */ cpu->gpr[5] = 0x80040000u; PGXP_ALU(0x3C058004u, cpu->gpr[5], 0u, 0u); #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, 0x180u); #endif /* 0xBFC0CD30: 15070009 bne $t0, $a3, 0xBFC0CD58 */ uint32_t psx_brA_BFC0CD30 = cpu->gpr[8]; uint32_t psx_brB_BFC0CD30 = cpu->gpr[7]; psx_taken_BFC0CD30 = (psx_brA_BFC0CD30 != psx_brB_BFC0CD30); psx_delay_BFC0CD30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CD34: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032834u); #endif if (psx_delay_BFC0CD30) { psx_delay_BFC0CD30 = 0; if (psx_taken_BFC0CD30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032858u); goto label_BFC0CD58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032838u); } label_BFC0CD38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032838u); #endif /* 0xBFC0CD38: 8CA83D34 lw $t0, 15668($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 15668; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (15668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032838u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x20u); } PGXP_LOAD(0x8CA83D34u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80032838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003283Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0CD40: 14480005 bne $v0, $t0, 0xBFC0CD58 */ uint32_t psx_brA_BFC0CD40 = cpu->gpr[2]; uint32_t psx_brB_BFC0CD40 = cpu->gpr[8]; psx_taken_BFC0CD40 = (psx_brA_BFC0CD40 != psx_brB_BFC0CD40); psx_delay_BFC0CD40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032844u); #endif if (psx_delay_BFC0CD40) { psx_delay_BFC0CD40 = 0; if (psx_taken_BFC0CD40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032858u); goto label_BFC0CD58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032848u); } label_BFC0CD48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032848u); #endif /* 0xBFC0CD48: 8C683D30 lw $t0, 15664($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15664; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032848u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } PGXP_LOAD(0x8C683D30u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80032848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003284Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC0CD50: 11040004 beq $t0, $a0, 0xBFC0CD64 */ uint32_t psx_brA_BFC0CD50 = cpu->gpr[8]; uint32_t psx_brB_BFC0CD50 = cpu->gpr[4]; psx_taken_BFC0CD50 = (psx_brA_BFC0CD50 == psx_brB_BFC0CD50); psx_delay_BFC0CD50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032854u); #endif if (psx_delay_BFC0CD50) { psx_delay_BFC0CD50 = 0; if (psx_taken_BFC0CD50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032864u); goto label_BFC0CD64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032858u); } 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, 0x80032858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0CD58: ACC73D38 sw $a3, 15672($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 15672; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (15672)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032858u); return; } g_debug_last_store_pc = 0x80032858u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACC73D38u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80032858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0CD5C: ACA23D34 sw $v0, 15668($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 15668; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (15668)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003285Cu); return; } g_debug_last_store_pc = 0x8003285Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA23D34u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003285Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0CD60: AC643D30 sw $a0, 15664($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15664; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15664)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032860u); return; } g_debug_last_store_pc = 0x80032860u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC643D30u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032860u); #endif 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, 0x80032864u); #endif /* 0xBFC0CD64: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032864u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80032864u); #endif /* 0xBFC0CD68: 8FB00010 lw $s0, 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, 0x80032868u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80032868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CD6C: 03E00008 jr $ra */ psx_delay_BFC0CD6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0CD70: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80032870u); #endif if (psx_delay_BFC0CD6C) { psx_delay_BFC0CD6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CD74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CD74u); int psx_delay_BFC0CD84 = 0; label_BFC0CD74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD74u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CD74: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032874u); #endif /* 0xBFC0CD78: 94434E84 lhu $v1, 20100($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 20100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (20100)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032878u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x94434E84u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CD7C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003287Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CD80: A4431114 sh $v1, 4372($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4372)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032880u); return; } g_debug_last_store_pc = 0x80032880u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431114u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0CD84: 0800CCE3 j 0xB003338C */ psx_delay_BFC0CD84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032888u); #endif if (psx_delay_BFC0CD84) { psx_delay_BFC0CD84 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003338Cu); cpu->pc = 0x8003338Cu; return; } } void OpenBIOS_func_1FC0CD8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CD8Cu); int psx_delay_BFC0CD98 = 0; int psx_taken_BFC0CD98 = 0; int psx_delay_BFC0CDA8 = 0; int psx_taken_BFC0CDA8 = 0; int psx_delay_BFC0CDB0 = 0; int psx_taken_BFC0CDB0 = 0; int psx_delay_BFC0CDC4 = 0; int psx_taken_BFC0CDC4 = 0; int psx_delay_BFC0CDE4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CDA0u: goto label_BFC0CDA0; case 0xBFC0CDB0u: goto label_BFC0CDB0; case 0xBFC0CDB8u: goto label_BFC0CDB8; case 0xBFC0CDCCu: goto label_BFC0CDCC; case 0xBFC0CDE4u: goto label_BFC0CDE4; default: break; } } label_BFC0CD8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CD8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CD8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003288Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CD8C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003288Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032890u); #endif /* 0xBFC0CD90: 8C423D3C lw $v0, 15676($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15676; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032890u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D3Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CD94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CD98: 10400012 beq $v0, $zero, 0xBFC0CDE4 */ uint32_t psx_brA_BFC0CD98 = cpu->gpr[2]; uint32_t psx_brB_BFC0CD98 = cpu->gpr[0]; psx_taken_BFC0CD98 = (psx_brA_BFC0CD98 == psx_brB_BFC0CD98); psx_delay_BFC0CD98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CD9C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003289Cu); #endif if (psx_delay_BFC0CD98) { psx_delay_BFC0CD98 = 0; if (psx_taken_BFC0CD98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328E4u); goto label_BFC0CDE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328A0u); } label_BFC0CDA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CDA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CDA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328A0u); #endif /* 0xBFC0CDA0: 8C423D80 lw $v0, 15744($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D80u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800328A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CDA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800328A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CDA8: 1040000E beq $v0, $zero, 0xBFC0CDE4 */ uint32_t psx_brA_BFC0CDA8 = cpu->gpr[2]; uint32_t psx_brB_BFC0CDA8 = cpu->gpr[0]; psx_taken_BFC0CDA8 = (psx_brA_BFC0CDA8 == psx_brB_BFC0CDA8); psx_delay_BFC0CDA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CDAC: 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(0x800328ACu); #endif if (psx_delay_BFC0CDA8) { psx_delay_BFC0CDA8 = 0; if (psx_taken_BFC0CDA8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328E4u); goto label_BFC0CDE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328B0u); } label_BFC0CDB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CDB0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CDB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CDB0: 14430006 bne $v0, $v1, 0xBFC0CDCC */ uint32_t psx_brA_BFC0CDB0 = cpu->gpr[2]; uint32_t psx_brB_BFC0CDB0 = cpu->gpr[3]; psx_taken_BFC0CDB0 = (psx_brA_BFC0CDB0 != psx_brB_BFC0CDB0); psx_delay_BFC0CDB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CDB4: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800328B4u); #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, 0x800328CCu); goto label_BFC0CDCC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328B8u); } 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, 0x800328B8u); #endif /* 0xBFC0CDB8: 8C423D78 lw $v0, 15736($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800328B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CDBC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800328BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CDC0: 2C42001F sltiu $v0, $v0, 31 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0); PGXP_ALU(0x2C42001Fu, cpu->gpr[2], _pgx1, 0x001Fu); } #ifdef PSX_COSIM cosim_instr(0x800328C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CDC4: 14400007 bne $v0, $zero, 0xBFC0CDE4 */ uint32_t psx_brA_BFC0CDC4 = cpu->gpr[2]; uint32_t psx_brB_BFC0CDC4 = cpu->gpr[0]; psx_taken_BFC0CDC4 = (psx_brA_BFC0CDC4 != psx_brB_BFC0CDC4); psx_delay_BFC0CDC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CDC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800328C8u); #endif if (psx_delay_BFC0CDC4) { psx_delay_BFC0CDC4 = 0; if (psx_taken_BFC0CDC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328E4u); goto label_BFC0CDE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800328CCu); } label_BFC0CDCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CDCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CDCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CDCC: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800328CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CDD0: 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(0x800328D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CDD4: AC433D5C sw $v1, 15708($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328D4u); return; } g_debug_last_store_pc = 0x800328D4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D5Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800328D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CDD8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800328D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CDDC: 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(0x800328DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CDE0: AC433D58 sw $v1, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328E0u); return; } g_debug_last_store_pc = 0x800328E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800328E0u); #endif 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, 0x800328E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CDE4: 03E00008 jr $ra */ psx_delay_BFC0CDE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CDE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800328E8u); #endif if (psx_delay_BFC0CDE4) { psx_delay_BFC0CDE4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CDEC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CDECu); int psx_delay_BFC0CDF8 = 0; int psx_taken_BFC0CDF8 = 0; int psx_delay_BFC0CE18 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CE00u: goto label_BFC0CE00; case 0xBFC0CE18u: goto label_BFC0CE18; default: break; } } label_BFC0CDEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CDECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CDECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CDEC: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800328ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800328F0u); #endif /* 0xBFC0CDF0: 8C623D3C lw $v0, 15676($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15676; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800328F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C623D3Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800328F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CDF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800328F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CDF8: 14400007 bne $v0, $zero, 0xBFC0CE18 */ uint32_t psx_brA_BFC0CDF8 = cpu->gpr[2]; uint32_t psx_brB_BFC0CDF8 = cpu->gpr[0]; psx_taken_BFC0CDF8 = (psx_brA_BFC0CDF8 != psx_brB_BFC0CDF8); psx_delay_BFC0CDF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CDFC: 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(0x800328FCu); #endif if (psx_delay_BFC0CDF8) { psx_delay_BFC0CDF8 = 0; if (psx_taken_BFC0CDF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032918u); goto label_BFC0CE18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032900u); } label_BFC0CE00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE00: AC623D3C sw $v0, 15676($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15676; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032900u); return; } g_debug_last_store_pc = 0x80032900u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D3Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CE04: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE08: AC623D5C sw $v0, 15708($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032908u); return; } g_debug_last_store_pc = 0x80032908u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D5Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE0C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC0CE10: 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(0x80032910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE14: AC433D58 sw $v1, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032914u); return; } g_debug_last_store_pc = 0x80032914u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032914u); #endif label_BFC0CE18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CE18: 03E00008 jr $ra */ psx_delay_BFC0CE18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CE1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003291Cu); #endif if (psx_delay_BFC0CE18) { psx_delay_BFC0CE18 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CE20(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CE20u); int psx_delay_BFC0CE34 = 0; int psx_taken_BFC0CE34 = 0; int psx_delay_BFC0CE3C = 0; int psx_taken_BFC0CE3C = 0; int psx_delay_BFC0CE50 = 0; int psx_taken_BFC0CE50 = 0; int psx_delay_BFC0CE70 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CE3Cu: goto label_BFC0CE3C; case 0xBFC0CE44u: goto label_BFC0CE44; case 0xBFC0CE58u: goto label_BFC0CE58; case 0xBFC0CE70u: goto label_BFC0CE70; default: break; } } 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, 0x80032920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE20: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CE24: AC403D3C sw $zero, 15676($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15676; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032924u); return; } g_debug_last_store_pc = 0x80032924u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D3Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE28: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032928u); #endif /* 0xBFC0CE2C: 8C423D80 lw $v0, 15744($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003292Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D80u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0CE30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CE34: 1040000E beq $v0, $zero, 0xBFC0CE70 */ uint32_t psx_brA_BFC0CE34 = cpu->gpr[2]; uint32_t psx_brB_BFC0CE34 = cpu->gpr[0]; psx_taken_BFC0CE34 = (psx_brA_BFC0CE34 == psx_brB_BFC0CE34); psx_delay_BFC0CE34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CE38: 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(0x80032938u); #endif if (psx_delay_BFC0CE34) { psx_delay_BFC0CE34 = 0; if (psx_taken_BFC0CE34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032970u); goto label_BFC0CE70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003293Cu); } label_BFC0CE3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE3Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003293Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE3C: 14430006 bne $v0, $v1, 0xBFC0CE58 */ uint32_t psx_brA_BFC0CE3C = cpu->gpr[2]; uint32_t psx_brB_BFC0CE3C = cpu->gpr[3]; psx_taken_BFC0CE3C = (psx_brA_BFC0CE3C != psx_brB_BFC0CE3C); psx_delay_BFC0CE3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE40: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032940u); #endif if (psx_delay_BFC0CE3C) { psx_delay_BFC0CE3C = 0; if (psx_taken_BFC0CE3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032958u); goto label_BFC0CE58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032944u); } label_BFC0CE44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032944u); #endif /* 0xBFC0CE44: 8C423D78 lw $v0, 15736($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032944u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CE48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE4C: 2C42001F sltiu $v0, $v0, 31 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000001Fu ? 1 : 0); PGXP_ALU(0x2C42001Fu, cpu->gpr[2], _pgx1, 0x001Fu); } #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, 0x5u); #endif /* 0xBFC0CE50: 14400007 bne $v0, $zero, 0xBFC0CE70 */ uint32_t psx_brA_BFC0CE50 = cpu->gpr[2]; uint32_t psx_brB_BFC0CE50 = cpu->gpr[0]; psx_taken_BFC0CE50 = (psx_brA_BFC0CE50 != psx_brB_BFC0CE50); psx_delay_BFC0CE50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CE54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032954u); #endif if (psx_delay_BFC0CE50) { psx_delay_BFC0CE50 = 0; if (psx_taken_BFC0CE50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032970u); goto label_BFC0CE70; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032958u); } label_BFC0CE58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE58: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CE5C: 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(0x8003295Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE60: AC433D5C sw $v1, 15708($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15708)); 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[3]); } PGXP_STORE(0xAC433D5Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE64: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CE68: 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(0x80032968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE6C: AC433D58 sw $v1, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); 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[3]); } PGXP_STORE(0xAC433D58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003296Cu); #endif label_BFC0CE70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CE70: 03E00008 jr $ra */ psx_delay_BFC0CE70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CE74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032974u); #endif if (psx_delay_BFC0CE70) { psx_delay_BFC0CE70 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CE78(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CE78u); int psx_delay_BFC0CE94 = 0; 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, 0x80032978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE78: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CE7C: 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(0x8003297Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CE80: AC403D3C sw $zero, 15676($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15676; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15676)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032980u); return; } g_debug_last_store_pc = 0x80032980u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D3Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE84: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE88: AC433D5C sw $v1, 15708($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15708)); 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[3]); } PGXP_STORE(0xAC433D5Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE8C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC0CE90: 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(0x80032990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CE94: 03E00008 jr $ra */ psx_delay_BFC0CE94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CE98: AC433D58 sw $v1, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032998u); return; } g_debug_last_store_pc = 0x80032998u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032998u); #endif if (psx_delay_BFC0CE94) { psx_delay_BFC0CE94 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CE9C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CE9Cu); int psx_delay_BFC0CF0C = 0; label_BFC0CE9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CE9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CE9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003299Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CE9C: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003299Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800329A0u); #endif /* 0xBFC0CEA0: 8C4310F0 lw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800329A0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CEA4: 3C04000B lui $a0, 0xB */ cpu->gpr[4] = 0x000B0000u; PGXP_ALU(0x3C04000Bu, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800329A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0CEA8: 00641825 or $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(0x00641825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800329A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CEAC: AC4310F0 sw $v1, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); 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[3]); } PGXP_STORE(0xAC4310F0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800329B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CEB0: 24033800 addiu $v1, $zero, 14336 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (14336)); PGXP_ALU(0x24033800u, cpu->gpr[3], _pgx1, 0x00003800u); } #ifdef PSX_COSIM cosim_instr(0x800329B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CEB4: A4431D80 sh $v1, 7552($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7552)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329B4u); return; } g_debug_last_store_pc = 0x800329B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431D80u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CEB8: A4431D82 sh $v1, 7554($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7554; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7554)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329B8u); return; } g_debug_last_store_pc = 0x800329B8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431D82u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CEBC: 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(0x800329BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800329C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEC0: A4401DAA sh $zero, 7594($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7594; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329C0u); return; } g_debug_last_store_pc = 0x800329C0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401DAAu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEC4: A4401D88 sh $zero, 7560($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7560)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329C4u); return; } g_debug_last_store_pc = 0x800329C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D88u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEC8: A4401D8A sh $zero, 7562($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7562; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7562)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329C8u); return; } g_debug_last_store_pc = 0x800329C8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D8Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CECC: A4431D8C sh $v1, 7564($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7564; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7564)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329CCu); return; } g_debug_last_store_pc = 0x800329CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431D8Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800329D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CED0: A4431D8E sh $v1, 7566($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7566; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7566)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329D0u); return; } g_debug_last_store_pc = 0x800329D0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431D8Eu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CED4: 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(0x800329D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CED8: A4431DAC sh $v1, 7596($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7596; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7596)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329D8u); return; } g_debug_last_store_pc = 0x800329D8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431DACu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800329D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0CEDC: 24038000 addiu $v1, $zero, -32768 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-32768)); PGXP_ALU(0x24038000u, cpu->gpr[3], _pgx1, 0xFFFF8000u); } #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, 0x5u); #endif /* 0xBFC0CEE0: A4401DB0 sh $zero, 7600($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7600; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7600)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329E0u); return; } g_debug_last_store_pc = 0x800329E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401DB0u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEE4: A4401DB2 sh $zero, 7602($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7602; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7602)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329E4u); return; } g_debug_last_store_pc = 0x800329E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401DB2u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEE8: A4401D90 sh $zero, 7568($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7568; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7568)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329E8u); return; } g_debug_last_store_pc = 0x800329E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D90u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEEC: A4401D92 sh $zero, 7570($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7570; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7570)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329ECu); return; } g_debug_last_store_pc = 0x800329ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D92u, _pgxa, cpu->gpr[0]); } #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, 0x5u); #endif /* 0xBFC0CEF0: A4401D94 sh $zero, 7572($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7572; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7572)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329F0u); return; } g_debug_last_store_pc = 0x800329F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D94u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEF4: A4401D96 sh $zero, 7574($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7574; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7574)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329F4u); return; } g_debug_last_store_pc = 0x800329F4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D96u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEF8: A4401D98 sh $zero, 7576($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7576; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7576)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329F8u); return; } g_debug_last_store_pc = 0x800329F8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D98u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CEFC: A4401D9A sh $zero, 7578($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7578; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7578)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800329FCu); return; } g_debug_last_store_pc = 0x800329FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401D9Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800329FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CF00: A4401DB4 sh $zero, 7604($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7604; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7604)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A00u); return; } g_debug_last_store_pc = 0x80032A00u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401DB4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CF04: A4401DB6 sh $zero, 7606($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7606; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7606)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A04u); return; } g_debug_last_store_pc = 0x80032A04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4401DB6u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0CF08: A4431DAA sh $v1, 7594($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7594; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032A08u); return; } g_debug_last_store_pc = 0x80032A08u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431DAAu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CF0C: 03E00008 jr $ra */ psx_delay_BFC0CF0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CF10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032A10u); #endif if (psx_delay_BFC0CF0C) { psx_delay_BFC0CF0C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CF14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CF14u); int psx_delay_BFC0CF48 = 0; 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, 0x80032A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF14: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF18: 24421C00 addiu $v0, $v0, 7168 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (7168)); PGXP_ALU(0x24421C00u, cpu->gpr[2], _pgx1, 0x00001C00u); } #ifdef PSX_COSIM cosim_instr(0x80032A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CF1C: 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(0x80032A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CF20: 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(0x80032A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CF24: 2402000F addiu $v0, $zero, 15 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (15)); PGXP_ALU(0x2402000Fu, cpu->gpr[2], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0x80032A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF28: 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, 0x80032A28u); return; } g_debug_last_store_pc = 0x80032A28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4800000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF2C: 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, 0x80032A2Cu); return; } g_debug_last_store_pc = 0x80032A2Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4800002u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF30: A4800004 sh $zero, 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, 0x80032A30u); return; } g_debug_last_store_pc = 0x80032A30u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4800004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF34: A4800006 sh $zero, 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, 0x80032A34u); return; } g_debug_last_store_pc = 0x80032A34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4800006u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CF38: A4820008 sh $v0, 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, 0x80032A38u); return; } g_debug_last_store_pc = 0x80032A38u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF3C: 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, 0x80032A3Cu); return; } g_debug_last_store_pc = 0x80032A3Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA480000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF40: 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, 0x80032A40u); return; } g_debug_last_store_pc = 0x80032A40u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA480000Eu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CF44: 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, 0x80032A44u); return; } g_debug_last_store_pc = 0x80032A44u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA480000Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80032A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CF48: 03E00008 jr $ra */ psx_delay_BFC0CF48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CF4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032A4Cu); #endif if (psx_delay_BFC0CF48) { psx_delay_BFC0CF48 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CF50(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CF50u); int psx_delay_BFC0CF88 = 0; label_BFC0CF50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CF50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CF50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF50: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032A50u); #endif /* 0xBFC0CF54: 8C433D40 lw $v1, 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, 0x80032A54u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C433D40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF58: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0CF5C: 00650018 mult $v1, $a1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[5]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00650018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[5]); #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, 0x4u); #endif /* 0xBFC0CF60: 24421C00 addiu $v0, $v0, 7168 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (7168)); PGXP_ALU(0x24421C00u, cpu->gpr[2], _pgx1, 0x00001C00u); } #ifdef PSX_COSIM cosim_instr(0x80032A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0CF64: 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(0x80032A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CF68: 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(0x80032A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF6C: 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(0x80032A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF70: 00021402 srl $v0, $v0, 16 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 16u; PGXP_ALU(0x00021402u, cpu->gpr[2], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x80032A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CF74: 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, 0x80032A74u); return; } g_debug_last_store_pc = 0x80032A74u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0CF78: 00660018 mult $v1, $a2 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[3] * (int64_t)(int32_t)cpu->gpr[6]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[3])); #endif PGXP_MULDIV(0x00660018u, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[6]); #ifdef PSX_COSIM cosim_instr(0x80032A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF7C: 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(0x80032A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF80: 00021402 srl $v0, $v0, 16 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 16u; PGXP_ALU(0x00021402u, cpu->gpr[2], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x80032A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CF84: A4820002 sh $v0, 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, 0x80032A84u); return; } g_debug_last_store_pc = 0x80032A84u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CF88: 03E00008 jr $ra */ psx_delay_BFC0CF88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CF8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032A8Cu); #endif if (psx_delay_BFC0CF88) { psx_delay_BFC0CF88 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CF90(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CF90u); int psx_delay_BFC0CF9C = 0; int psx_taken_BFC0CF9C = 0; int psx_delay_BFC0CFB0 = 0; int psx_taken_BFC0CFB0 = 0; int psx_delay_BFC0CFB8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CF98u: goto label_BFC0CF98; case 0xBFC0CFA4u: goto label_BFC0CFA4; case 0xBFC0CFB8u: goto label_BFC0CFB8; default: break; } } label_BFC0CF90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CF90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CF90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CF90: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CF94: 240207FD addiu $v0, $zero, 2045 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2045)); PGXP_ALU(0x240207FDu, cpu->gpr[2], _pgx1, 0x000007FDu); } #ifdef PSX_COSIM cosim_instr(0x80032A94u); #endif label_BFC0CF98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CF98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CF98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CF98: 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(0x80032A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CF9C: 1440FFFE bne $v0, $zero, 0xBFC0CF98 */ uint32_t psx_brA_BFC0CF9C = cpu->gpr[2]; 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, 0x80032AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CFA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032AA0u); #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, 0x80032A98u); goto label_BFC0CF98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AA4u); } 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, 0x80032AA4u); #endif /* 0xBFC0CFA4: 94621DAE lhu $v0, 7598($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 7598; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (7598)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032AA4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94621DAEu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CFA8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CFAC: 304207FF andi $v0, $v0, 0x7FF */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x7FFu; PGXP_ALU(0x304207FFu, cpu->gpr[2], _pgx1, 0x07FFu); } #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, 0x5u); #endif /* 0xBFC0CFB0: 1440FFF9 bne $v0, $zero, 0xBFC0CF98 */ uint32_t psx_brA_BFC0CFB0 = cpu->gpr[2]; uint32_t psx_brB_BFC0CFB0 = cpu->gpr[0]; psx_taken_BFC0CFB0 = (psx_brA_BFC0CFB0 != psx_brB_BFC0CFB0); psx_delay_BFC0CFB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CFB4: 240207FD addiu $v0, $zero, 2045 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (2045)); PGXP_ALU(0x240207FDu, cpu->gpr[2], _pgx1, 0x000007FDu); } #ifdef PSX_COSIM cosim_instr(0x80032AB4u); #endif if (psx_delay_BFC0CFB0) { psx_delay_BFC0CFB0 = 0; if (psx_taken_BFC0CFB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A98u); goto label_BFC0CF98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AB8u); } label_BFC0CFB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CFB8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CFB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0CFB8: 03E00008 jr $ra */ psx_delay_BFC0CFB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0CFBC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032ABCu); #endif if (psx_delay_BFC0CFB8) { psx_delay_BFC0CFB8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0CFC0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0CFC0u); int psx_delay_BFC0CFE4 = 0; int psx_taken_BFC0CFE4 = 0; int psx_delay_BFC0CFEC = 0; int psx_taken_BFC0CFEC = 0; int psx_delay_BFC0CFF8 = 0; int psx_taken_BFC0CFF8 = 0; int psx_delay_BFC0D00C = 0; int psx_delay_BFC0D014 = 0; int psx_taken_BFC0D014 = 0; int psx_delay_BFC0D01C = 0; int psx_taken_BFC0D01C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0CFECu: goto label_BFC0CFEC; case 0xBFC0CFF4u: goto label_BFC0CFF4; case 0xBFC0CFF8u: goto label_BFC0CFF8; case 0xBFC0D000u: goto label_BFC0D000; case 0xBFC0D004u: goto label_BFC0D004; case 0xBFC0D014u: goto label_BFC0D014; case 0xBFC0D01Cu: goto label_BFC0D01C; default: break; } } label_BFC0CFC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CFC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CFC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CFC0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CFC4: AC443D6C sw $a0, 15724($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15724; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15724)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032AC4u); return; } g_debug_last_store_pc = 0x80032AC4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC443D6Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0CFC8: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032AC8u); #endif /* 0xBFC0CFCC: 8C421814 lw $v0, 6164($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (6164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032ACCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C421814u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0CFD0: 3C050010 lui $a1, 0x10 */ cpu->gpr[5] = 0x00100000u; PGXP_ALU(0x3C050010u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CFD4: 3C03BFC7 lui $v1, 0xBFC7 */ cpu->gpr[3] = 0xBFC70000u; PGXP_ALU(0x3C03BFC7u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0CFD8: 3463FF52 ori $v1, $v1, 0xFF52 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0xFF52u; PGXP_ALU(0x3463FF52u, cpu->gpr[3], _pgx1, 0xFF52u); } #ifdef PSX_COSIM cosim_instr(0x80032AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0CFDC: 00451024 and $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5]; PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AE0u); #endif /* 0xBFC0CFE0: 80630000 lb $v1, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (0)), 3, 0x8u); PGXP_LOAD(0x80630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CFE4: 1040000B beq $v0, $zero, 0xBFC0D014 */ uint32_t psx_brA_BFC0CFE4 = cpu->gpr[2]; 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_cyc_step(cpu, 0x21u); #endif /* 0xBFC0CFE8: 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(0x80032AE8u); #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, 0x80032B14u); goto label_BFC0D014; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AECu); } 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, 0x80032AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0CFEC: 14650002 bne $v1, $a1, 0xBFC0CFF8 */ uint32_t psx_brA_BFC0CFEC = cpu->gpr[3]; uint32_t psx_brB_BFC0CFEC = cpu->gpr[5]; psx_taken_BFC0CFEC = (psx_brA_BFC0CFEC != psx_brB_BFC0CFEC); psx_delay_BFC0CFEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CFF0: 340299FE ori $v0, $zero, 0x99FE */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0x99FEu; PGXP_ALU(0x340299FEu, cpu->gpr[2], _pgx1, 0x99FEu); } #ifdef PSX_COSIM cosim_instr(0x80032AF0u); #endif if (psx_delay_BFC0CFEC) { psx_delay_BFC0CFEC = 0; if (psx_taken_BFC0CFEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AF8u); goto label_BFC0CFF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AF4u); } label_BFC0CFF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0CFF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0CFF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0CFF4: 34029896 ori $v0, $zero, 0x9896 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0x9896u; PGXP_ALU(0x34029896u, cpu->gpr[2], _pgx1, 0x9896u); } #ifdef PSX_COSIM cosim_instr(0x80032AF4u); #endif 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, 0x80032AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0CFF8: 14800002 bne $a0, $zero, 0xBFC0D004 */ uint32_t psx_brA_BFC0CFF8 = cpu->gpr[4]; 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_cyc_step(cpu, 0x14u); #endif /* 0xBFC0CFFC: 0044001B divu $v0, $a0 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0044001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80032AFCu); #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, 0x80032B04u); goto label_BFC0D004; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B00u); } 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, 0x80032B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D000: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80032B00u); return; #ifdef PSX_COSIM cosim_instr(0x80032B00u); #endif label_BFC0D004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D004u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D004: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D008: 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(0x80032B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D00C: 03E00008 jr $ra */ psx_delay_BFC0D00C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D010: AC433D44 sw $v1, 15684($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15684; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15684)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B10u); return; } g_debug_last_store_pc = 0x80032B10u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC433D44u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032B10u); #endif if (psx_delay_BFC0D00C) { psx_delay_BFC0D00C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0D014: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D014u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D014: 1465FFF8 bne $v1, $a1, 0xBFC0CFF8 */ uint32_t psx_brA_BFC0D014 = cpu->gpr[3]; uint32_t psx_brB_BFC0D014 = cpu->gpr[5]; psx_taken_BFC0D014 = (psx_brA_BFC0D014 != psx_brB_BFC0D014); psx_delay_BFC0D014 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D018: 340299A8 ori $v0, $zero, 0x99A8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0x99A8u; PGXP_ALU(0x340299A8u, cpu->gpr[2], _pgx1, 0x99A8u); } #ifdef PSX_COSIM cosim_instr(0x80032B18u); #endif if (psx_delay_BFC0D014) { psx_delay_BFC0D014 = 0; if (psx_taken_BFC0D014) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AF8u); goto label_BFC0CFF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B1Cu); } label_BFC0D01C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D01Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D01Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D01C: 1000FFF6 beq $zero, $zero, 0xBFC0CFF8 */ uint32_t psx_brA_BFC0D01C = cpu->gpr[0]; uint32_t psx_brB_BFC0D01C = cpu->gpr[0]; psx_taken_BFC0D01C = (psx_brA_BFC0D01C == psx_brB_BFC0D01C); psx_delay_BFC0D01C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D020: 34029841 ori $v0, $zero, 0x9841 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0x9841u; PGXP_ALU(0x34029841u, cpu->gpr[2], _pgx1, 0x9841u); } #ifdef PSX_COSIM cosim_instr(0x80032B20u); #endif if (psx_delay_BFC0D01C) { psx_delay_BFC0D01C = 0; if (psx_taken_BFC0D01C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AF8u); goto label_BFC0CFF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B24u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B24u); cpu->pc = 0x80032B24u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D024(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D024u); int psx_delay_BFC0D060 = 0; int psx_taken_BFC0D060 = 0; int psx_delay_BFC0D068 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D060u: goto label_BFC0D060; case 0xBFC0D068u: goto label_BFC0D068; default: break; } } label_BFC0D024: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D024u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D024: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B24u); #endif /* 0xBFC0D028: 8C4B3D68 lw $t3, 15720($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15720; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B28u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x4u); } PGXP_LOAD(0x8C4B3D68u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x80032B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0D02C: 3C078004 lui $a3, 0x8004 */ cpu->gpr[7] = 0x80040000u; PGXP_ALU(0x3C078004u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D030: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0D034: 24E74E88 addiu $a3, $a3, 20104 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (20104)); PGXP_ALU(0x24E74E88u, cpu->gpr[7], _pgx1, 0x00004E88u); } #ifdef PSX_COSIM cosim_instr(0x80032B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0D038: 3C091F80 lui $t1, 0x1F80 */ cpu->gpr[9] = 0x1F800000u; PGXP_ALU(0x3C091F80u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0D03C: 3C0C8004 lui $t4, 0x8004 */ cpu->gpr[12] = 0x80040000u; PGXP_ALU(0x3C0C8004u, cpu->gpr[12], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0D040: 3C0A006C lui $t2, 0x6C */ cpu->gpr[10] = 0x006C0000u; PGXP_ALU(0x3C0A006Cu, cpu->gpr[10], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032B40u); #endif /* 0xBFC0D044: 8C4E3D88 lw $t6, 15752($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032B44u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x4u); } PGXP_LOAD(0x8C4E3D88u, _pgxa, cpu->gpr[14]); } #ifdef PSX_COSIM cosim_instr(0x80032B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0D048: 25291C00 addiu $t1, $t1, 7168 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (7168)); PGXP_ALU(0x25291C00u, cpu->gpr[9], _pgx1, 0x00001C00u); } #ifdef PSX_COSIM cosim_instr(0x80032B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0D04C: 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(0x80032B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2081u); #endif /* 0xBFC0D050: 00E06825 or $t5, $a3, $zero */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[13] = cpu->gpr[7] | cpu->gpr[0]; PGXP_ALU(0x00E06825u, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0D054: 258C372C addiu $t4, $t4, 14124 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = (uint32_t)((int32_t)cpu->gpr[12] + (14124)); PGXP_ALU(0x258C372Cu, cpu->gpr[12], _pgx1, 0x0000372Cu); } #ifdef PSX_COSIM cosim_instr(0x80032B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC0D058: 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(0x80032B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0D05C: 254A3E1D addiu $t2, $t2, 15901 */ { uint32_t _pgx1 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)((int32_t)cpu->gpr[10] + (15901)); PGXP_ALU(0x254A3E1Du, cpu->gpr[10], _pgx1, 0x00003E1Du); } #ifdef PSX_COSIM cosim_instr(0x80032B5Cu); #endif 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, 0x80032B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4100u); #endif /* 0xBFC0D060: 150E013A bne $t0, $t6, 0xBFC0D54C */ uint32_t psx_brA_BFC0D060 = cpu->gpr[8]; uint32_t psx_brB_BFC0D060 = cpu->gpr[14]; psx_taken_BFC0D060 = (psx_brA_BFC0D060 != psx_brB_BFC0D060); psx_delay_BFC0D060 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D064: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032B64u); #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, 0x8003304Cu); cpu->pc = 0x8003304Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B68u); } 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, 0x80032B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D068: 03E00008 jr $ra */ psx_delay_BFC0D068 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D06C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032B6Cu); #endif if (psx_delay_BFC0D068) { psx_delay_BFC0D068 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0D070(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D070u); int psx_delay_BFC0D084 = 0; int psx_taken_BFC0D084 = 0; label_BFC0D070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D070u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B70u); #endif /* 0xBFC0D070: 91630002 lbu $v1, 2($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (2)), 3, 0x800u); PGXP_LOAD(0x91630002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032B70u); #endif /* 0xBFC0D074: 91620003 lbu $v0, 3($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 3; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (3)), 2, 0x800u); PGXP_LOAD(0x91620003u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D078: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80032B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0D07C: 2C66000F sltiu $a2, $v1, 15 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0); PGXP_ALU(0x2C66000Fu, cpu->gpr[6], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80032B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D080: 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(0x80032B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D084: 10C00025 beq $a2, $zero, 0xBFC0D11C */ uint32_t psx_brA_BFC0D084 = cpu->gpr[6]; uint32_t psx_brB_BFC0D084 = cpu->gpr[0]; psx_taken_BFC0D084 = (psx_brA_BFC0D084 == psx_brB_BFC0D084); psx_delay_BFC0D084 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D088: 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(0x80032B88u); #endif if (psx_delay_BFC0D084) { psx_delay_BFC0D084 = 0; if (psx_taken_BFC0D084) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B8Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B8Cu); cpu->pc = 0x80032B8Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0D08C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D08Cu); int psx_delay_BFC0D09C = 0; label_BFC0D08C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D08Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D08Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D08C: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #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, 0x1008u); #endif /* 0xBFC0D090: 01831821 addu $v1, $t4, $v1 */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[12] + cpu->gpr[3]; PGXP_ALU(0x01831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032B90u); #endif /* 0xBFC0D094: 8C630000 lw $v1, 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, 0x80032B94u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D098: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D09C: 00600008 jr $v1 */ psx_delay_BFC0D09C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D0A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032BA0u); #endif if (psx_delay_BFC0D09C) { psx_delay_BFC0D09C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[3]); cpu->pc = cpu->gpr[3]; return; } } void OpenBIOS_func_1FC0D0A4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D0A4u); int psx_delay_BFC0D0A4 = 0; int psx_taken_BFC0D0A4 = 0; int psx_delay_BFC0D0B4 = 0; int psx_taken_BFC0D0B4 = 0; int psx_delay_BFC0D0C8 = 0; int psx_taken_BFC0D0C8 = 0; int psx_delay_BFC0D0D4 = 0; int psx_taken_BFC0D0D4 = 0; int psx_delay_BFC0D0EC = 0; int psx_taken_BFC0D0EC = 0; int psx_delay_BFC0D108 = 0; int psx_taken_BFC0D108 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D0E0u: goto label_BFC0D0E0; case 0xBFC0D0E4u: goto label_BFC0D0E4; case 0xBFC0D0FCu: goto label_BFC0D0FC; case 0xBFC0D0ACu: goto label_BFC0D0AC; case 0xBFC0D0BCu: goto label_BFC0D0BC; case 0xBFC0D0C0u: goto label_BFC0D0C0; case 0xBFC0D0D0u: goto label_BFC0D0D0; case 0xBFC0D0DCu: goto label_BFC0D0DC; case 0xBFC0D0F4u: goto label_BFC0D0F4; case 0xBFC0D0F8u: goto label_BFC0D0F8; case 0xBFC0D110u: goto label_BFC0D110; case 0xBFC0D114u: goto label_BFC0D114; default: break; } } label_BFC0D0A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D0A4: 1040001D beq $v0, $zero, 0xBFC0D11C */ uint32_t psx_brA_BFC0D0A4 = cpu->gpr[2]; uint32_t psx_brB_BFC0D0A4 = cpu->gpr[0]; psx_taken_BFC0D0A4 = (psx_brA_BFC0D0A4 == psx_brB_BFC0D0A4); psx_delay_BFC0D0A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D0A8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032BA8u); #endif if (psx_delay_BFC0D0A4) { psx_delay_BFC0D0A4 = 0; if (psx_taken_BFC0D0A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BACu); } label_BFC0D0AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BACu); #endif /* 0xBFC0D0AC: 90423D70 lbu $v0, 15728($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15728; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (15728)), 2, 0x4u); PGXP_LOAD(0x90423D70u, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC0D0B0: 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(0x80032BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D0B4: 14600002 bne $v1, $zero, 0xBFC0D0C0 */ uint32_t psx_brA_BFC0D0B4 = cpu->gpr[3]; uint32_t psx_brB_BFC0D0B4 = cpu->gpr[0]; psx_taken_BFC0D0B4 = (psx_brA_BFC0D0B4 != psx_brB_BFC0D0B4); psx_delay_BFC0D0B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D0B8: 0043001B divu $v0, $v1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0043001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032BB8u); #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, 0x80032BC0u); goto label_BFC0D0C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BBCu); } 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, 0x80032BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D0BC: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80032BBCu); return; #ifdef PSX_COSIM cosim_instr(0x80032BBCu); #endif label_BFC0D0C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0C0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D0C0: 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(0x80032BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D0C4: 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(0x80032BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC0D0C8: 1046001D beq $v0, $a2, 0xBFC0D140 */ uint32_t psx_brA_BFC0D0C8 = cpu->gpr[2]; uint32_t psx_brB_BFC0D0C8 = cpu->gpr[6]; psx_taken_BFC0D0C8 = (psx_brA_BFC0D0C8 == psx_brB_BFC0D0C8); psx_delay_BFC0D0C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D0CC: 304300FF andi $v1, $v0, 0xFF */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0xFFu; PGXP_ALU(0x304300FFu, cpu->gpr[3], _pgx1, 0x00FFu); } #ifdef PSX_COSIM cosim_instr(0x80032BCCu); #endif if (psx_delay_BFC0D0C8) { psx_delay_BFC0D0C8 = 0; if (psx_taken_BFC0D0C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C40u); cpu->pc = 0x80032C40u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BD0u); } label_BFC0D0D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D0D0: 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(0x80032BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D0D4: 10620024 beq $v1, $v0, 0xBFC0D168 */ uint32_t psx_brA_BFC0D0D4 = cpu->gpr[3]; uint32_t psx_brB_BFC0D0D4 = cpu->gpr[2]; psx_taken_BFC0D0D4 = (psx_brA_BFC0D0D4 == psx_brB_BFC0D0D4); psx_delay_BFC0D0D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D0D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032BD8u); #endif if (psx_delay_BFC0D0D4) { psx_delay_BFC0D0D4 = 0; if (psx_taken_BFC0D0D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C68u); cpu->pc = 0x80032C68u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BDCu); } label_BFC0D0DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BDCu); #endif /* 0xBFC0D0DC: 84E20002 lh $v0, 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, 0x80032BDCu); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x84E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032BDCu); #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, 0x80032BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D0E0: 3C03006C lui $v1, 0x6C */ cpu->gpr[3] = 0x006C0000u; PGXP_ALU(0x3C03006Cu, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032BE0u); #endif label_BFC0D0E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D0E4: 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(0x80032BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D0E8: 24633E1D addiu $v1, $v1, 15901 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15901)); PGXP_ALU(0x24633E1Du, cpu->gpr[3], _pgx1, 0x00003E1Du); } #ifdef PSX_COSIM cosim_instr(0x80032BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D0EC: 14400002 bne $v0, $zero, 0xBFC0D0F8 */ uint32_t psx_brA_BFC0D0EC = cpu->gpr[2]; uint32_t psx_brB_BFC0D0EC = cpu->gpr[0]; psx_taken_BFC0D0EC = (psx_brA_BFC0D0EC != psx_brB_BFC0D0EC); psx_delay_BFC0D0EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D0F0: 0062001A div $v1, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0062001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032BF0u); #endif if (psx_delay_BFC0D0EC) { psx_delay_BFC0D0EC = 0; if (psx_taken_BFC0D0EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BF8u); goto label_BFC0D0F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BF4u); } label_BFC0D0F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D0F4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80032BF4u); return; #ifdef PSX_COSIM cosim_instr(0x80032BF4u); #endif label_BFC0D0F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D0F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D0F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D0F8: 3403AC44 ori $v1, $zero, 0xAC44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xAC44u; PGXP_ALU(0x3403AC44u, cpu->gpr[3], _pgx1, 0xAC44u); } #ifdef PSX_COSIM cosim_instr(0x80032BF8u); #endif 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, 0x80032BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D0FC: 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(0x80032BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D100: 00021300 sll $v0, $v0, 12 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 12u; PGXP_ALU(0x00021300u, cpu->gpr[2], _pgx1, 12u); } #ifdef PSX_COSIM cosim_instr(0x80032C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D104: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D108: 14600002 bne $v1, $zero, 0xBFC0D114 */ uint32_t psx_brA_BFC0D108 = cpu->gpr[3]; uint32_t psx_brB_BFC0D108 = cpu->gpr[0]; psx_taken_BFC0D108 = (psx_brA_BFC0D108 != psx_brB_BFC0D108); psx_delay_BFC0D108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D10C: 0043001A div $v0, $v1 */ { int32_t psx_n = (int32_t)cpu->gpr[2]; 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(0x0043001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032C0Cu); #endif if (psx_delay_BFC0D108) { psx_delay_BFC0D108 = 0; if (psx_taken_BFC0D108) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C14u); goto label_BFC0D114; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C10u); } label_BFC0D110: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D110u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D110: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80032C10u); return; #ifdef PSX_COSIM cosim_instr(0x80032C10u); #endif label_BFC0D114: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D114u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D114: 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(0x80032C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0D118: A5220004 sh $v0, 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, 0x80032C18u); return; } g_debug_last_store_pc = 0x80032C18u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA5220004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; /* fallthrough */ } void OpenBIOS_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_BFC0D128 = 0; int psx_taken_BFC0D128 = 0; int psx_delay_BFC0D138 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D120u: goto label_BFC0D120; case 0xBFC0D130u: goto label_BFC0D130; 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, 0x80032C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0D11C: 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(0x80032C1Cu); #endif label_BFC0D120: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D120u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0D120: 256B0004 addiu $t3, $t3, 4 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); PGXP_ALU(0x256B0004u, cpu->gpr[11], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x80032C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0D124: 24E70010 addiu $a3, $a3, 16 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (16)); PGXP_ALU(0x24E70010u, cpu->gpr[7], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x80032C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4100u); #endif /* 0xBFC0D128: 150EFFD1 bne $t0, $t6, 0xBFC0D070 */ uint32_t psx_brA_BFC0D128 = cpu->gpr[8]; uint32_t psx_brB_BFC0D128 = cpu->gpr[14]; psx_taken_BFC0D128 = (psx_brA_BFC0D128 != psx_brB_BFC0D128); psx_delay_BFC0D128 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0D12C: 25290010 addiu $t1, $t1, 16 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (16)); PGXP_ALU(0x25290010u, cpu->gpr[9], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x80032C2Cu); #endif if (psx_delay_BFC0D128) { psx_delay_BFC0D128 = 0; if (psx_taken_BFC0D128) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B70u); cpu->pc = 0x80032B70u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C30u); } label_BFC0D130: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D130u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C30u); #endif /* 0xBFC0D130: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032C30u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80032C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D134: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D138: 03E00008 jr $ra */ psx_delay_BFC0D138 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D13C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x80032C3Cu); #endif if (psx_delay_BFC0D138) { psx_delay_BFC0D138 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0D140(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D140u); int psx_delay_BFC0D160 = 0; int psx_taken_BFC0D160 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D14Cu: goto label_BFC0D14C; default: break; } } label_BFC0D140: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D140u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C40u); #endif /* 0xBFC0D140: 94E20000 lhu $v0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032C40u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x94E20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D144: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D148: 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(0x80032C48u); #endif label_BFC0D14C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D14Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D14Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D14C: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #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, 0x4u); #endif /* 0xBFC0D150: 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(0x80032C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D154: 246337D4 addiu $v1, $v1, 14292 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14292)); PGXP_ALU(0x246337D4u, cpu->gpr[3], _pgx1, 0x000037D4u); } #ifdef PSX_COSIM cosim_instr(0x80032C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D158: 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(0x80032C58u); #endif /* 0xBFC0D15C: 94420000 lhu $v0, 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, 0x80032C5Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x94420000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0D160: 1000FFE0 beq $zero, $zero, 0xBFC0D0E4 */ uint32_t psx_brA_BFC0D160 = cpu->gpr[0]; uint32_t psx_brB_BFC0D160 = cpu->gpr[0]; psx_taken_BFC0D160 = (psx_brA_BFC0D160 == psx_brB_BFC0D160); psx_delay_BFC0D160 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D164: 3C03006C lui $v1, 0x6C */ cpu->gpr[3] = 0x006C0000u; PGXP_ALU(0x3C03006Cu, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032C64u); #endif if (psx_delay_BFC0D160) { psx_delay_BFC0D160 = 0; if (psx_taken_BFC0D160) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BE4u); cpu->pc = 0x80032BE4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C68u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C68u); cpu->pc = 0x80032C68u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D168(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D168u); int psx_delay_BFC0D16C = 0; int psx_taken_BFC0D16C = 0; label_BFC0D168: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D168u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C68u); #endif /* 0xBFC0D168: 94E20000 lhu $v0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032C68u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x94E20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D16C: 1000FFF7 beq $zero, $zero, 0xBFC0D14C */ uint32_t psx_brA_BFC0D16C = cpu->gpr[0]; uint32_t psx_brB_BFC0D16C = cpu->gpr[0]; psx_taken_BFC0D16C = (psx_brA_BFC0D16C == psx_brB_BFC0D16C); psx_delay_BFC0D16C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D170: 00451021 addu $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00451021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032C70u); #endif if (psx_delay_BFC0D16C) { psx_delay_BFC0D16C = 0; if (psx_taken_BFC0D16C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C4Cu); cpu->pc = 0x80032C4Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C74u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C74u); cpu->pc = 0x80032C74u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D174(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D174u); int psx_delay_BFC0D184 = 0; int psx_taken_BFC0D184 = 0; int psx_delay_BFC0D190 = 0; int psx_taken_BFC0D190 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D190u: goto label_BFC0D190; case 0xBFC0D18Cu: goto label_BFC0D18C; default: break; } } label_BFC0D174: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D174u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C74u); #endif /* 0xBFC0D174: 84E30002 lh $v1, 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, 0x80032C74u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x84E30002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D178: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D17C: 00621023 subu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[2]; PGXP_ALU(0x00621023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D180: 2843006C slti $v1, $v0, 108 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (108) ? 1 : 0); PGXP_ALU(0x2843006Cu, cpu->gpr[3], _pgx1, 0x006Cu); } #ifdef PSX_COSIM cosim_instr(0x80032C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D184: 10600002 beq $v1, $zero, 0xBFC0D190 */ uint32_t psx_brA_BFC0D184 = cpu->gpr[3]; uint32_t psx_brB_BFC0D184 = cpu->gpr[0]; psx_taken_BFC0D184 = (psx_brA_BFC0D184 == psx_brB_BFC0D184); psx_delay_BFC0D184 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D188: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C88u); #endif if (psx_delay_BFC0D184) { psx_delay_BFC0D184 = 0; if (psx_taken_BFC0D184) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C90u); goto label_BFC0D190; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C8Cu); } label_BFC0D18C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D18Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D18Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D18C: 2402006C addiu $v0, $zero, 108 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (108)); PGXP_ALU(0x2402006Cu, cpu->gpr[2], _pgx1, 0x0000006Cu); } #ifdef PSX_COSIM cosim_instr(0x80032C8Cu); #endif label_BFC0D190: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D190u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D190: 1000FFD3 beq $zero, $zero, 0xBFC0D0E0 */ uint32_t psx_brA_BFC0D190 = cpu->gpr[0]; uint32_t psx_brB_BFC0D190 = cpu->gpr[0]; psx_taken_BFC0D190 = (psx_brA_BFC0D190 == psx_brB_BFC0D190); psx_delay_BFC0D190 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0D194: A4E20002 sh $v0, 2($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032C94u); return; } g_debug_last_store_pc = 0x80032C94u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032C94u); #endif if (psx_delay_BFC0D190) { psx_delay_BFC0D190 = 0; if (psx_taken_BFC0D190) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BE0u); cpu->pc = 0x80032BE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C98u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C98u); cpu->pc = 0x80032C98u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D198(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D198u); int psx_delay_BFC0D1A8 = 0; int psx_taken_BFC0D1A8 = 0; int psx_delay_BFC0D1B0 = 0; int psx_taken_BFC0D1B0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D1B0u: goto label_BFC0D1B0; default: break; } } label_BFC0D198: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D198u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032C98u); #endif /* 0xBFC0D198: 84E30002 lh $v1, 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, 0x80032C98u); return; } cpu->gpr[3] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x84E30002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D19C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D1A0: 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(0x80032CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D1A4: 2843038C slti $v1, $v0, 908 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] < (908) ? 1 : 0); PGXP_ALU(0x2843038Cu, cpu->gpr[3], _pgx1, 0x038Cu); } #ifdef PSX_COSIM cosim_instr(0x80032CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D1A8: 1460FFF9 bne $v1, $zero, 0xBFC0D190 */ uint32_t psx_brA_BFC0D1A8 = cpu->gpr[3]; uint32_t psx_brB_BFC0D1A8 = cpu->gpr[0]; psx_taken_BFC0D1A8 = (psx_brA_BFC0D1A8 != psx_brB_BFC0D1A8); psx_delay_BFC0D1A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D1AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032CACu); #endif if (psx_delay_BFC0D1A8) { psx_delay_BFC0D1A8 = 0; if (psx_taken_BFC0D1A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C90u); cpu->pc = 0x80032C90u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CB0u); } label_BFC0D1B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D1B0: 1000FFF7 beq $zero, $zero, 0xBFC0D190 */ uint32_t psx_brA_BFC0D1B0 = cpu->gpr[0]; uint32_t psx_brB_BFC0D1B0 = cpu->gpr[0]; psx_taken_BFC0D1B0 = (psx_brA_BFC0D1B0 == psx_brB_BFC0D1B0); psx_delay_BFC0D1B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D1B4: 2402038B addiu $v0, $zero, 907 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (907)); PGXP_ALU(0x2402038Bu, cpu->gpr[2], _pgx1, 0x0000038Bu); } #ifdef PSX_COSIM cosim_instr(0x80032CB4u); #endif if (psx_delay_BFC0D1B0) { psx_delay_BFC0D1B0 = 0; if (psx_taken_BFC0D1B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C90u); cpu->pc = 0x80032C90u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CB8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CB8u); cpu->pc = 0x80032CB8u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D1B8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D1B8u); int psx_delay_BFC0D1C0 = 0; int psx_taken_BFC0D1C0 = 0; int psx_delay_BFC0D1C8 = 0; int psx_taken_BFC0D1C8 = 0; int psx_delay_BFC0D1EC = 0; int psx_taken_BFC0D1EC = 0; int psx_delay_BFC0D1FC = 0; int psx_taken_BFC0D1FC = 0; int psx_delay_BFC0D20C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D1D4u: goto label_BFC0D1D4; case 0xBFC0D1C8u: goto label_BFC0D1C8; case 0xBFC0D1D0u: goto label_BFC0D1D0; case 0xBFC0D1F4u: goto label_BFC0D1F4; case 0xBFC0D204u: goto label_BFC0D204; case 0xBFC0D20Cu: goto label_BFC0D20C; default: break; } } label_BFC0D1B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D1B8: 2C450011 sltiu $a1, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0); PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x80032CB8u); #endif /* 0xBFC0D1BC: 90E30007 lbu $v1, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 3, 0x80u); PGXP_LOAD(0x90E30007u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D1C0: 10A00028 beq $a1, $zero, 0xBFC0D264 */ uint32_t psx_brA_BFC0D1C0 = cpu->gpr[5]; uint32_t psx_brB_BFC0D1C0 = cpu->gpr[0]; psx_taken_BFC0D1C0 = (psx_brA_BFC0D1C0 == psx_brB_BFC0D1C0); psx_delay_BFC0D1C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D1C4: 00621023 subu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[2]; PGXP_ALU(0x00621023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032CC4u); #endif if (psx_delay_BFC0D1C0) { psx_delay_BFC0D1C0 = 0; if (psx_taken_BFC0D1C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D64u); cpu->pc = 0x80032D64u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CC8u); } label_BFC0D1C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D1C8: 04410002 bgez $v0, 0xBFC0D1D4 */ uint32_t psx_brA_BFC0D1C8 = cpu->gpr[2]; psx_taken_BFC0D1C8 = ((int32_t)psx_brA_BFC0D1C8 >= 0); psx_delay_BFC0D1C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D1CC: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032CCCu); #endif if (psx_delay_BFC0D1C8) { psx_delay_BFC0D1C8 = 0; if (psx_taken_BFC0D1C8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CD4u); goto label_BFC0D1D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CD0u); } label_BFC0D1D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1D0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D1D0: 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(0x80032CD0u); #endif label_BFC0D1D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D1D4: A0E60007 sb $a2, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032CD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0E60007u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80032CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D1D8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D1DC: 00063200 sll $a2, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 8u; PGXP_ALU(0x00063200u, cpu->gpr[6], _pgx1, 8u); } #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, 0x40u); #endif /* 0xBFC0D1E0: 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(0x80032CE0u); #endif /* 0xBFC0D1E4: 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, 0x80032CE4u); 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(0x80032CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D1E8: 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(0x80032CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D1EC: 10400007 beq $v0, $zero, 0xBFC0D20C */ uint32_t psx_brA_BFC0D1EC = cpu->gpr[2]; uint32_t psx_brB_BFC0D1EC = cpu->gpr[0]; psx_taken_BFC0D1EC = (psx_brA_BFC0D1EC == psx_brB_BFC0D1EC); psx_delay_BFC0D1EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D1F0: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032CF0u); #endif if (psx_delay_BFC0D1EC) { psx_delay_BFC0D1EC = 0; if (psx_taken_BFC0D1EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D0Cu); goto label_BFC0D20C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CF4u); } label_BFC0D1F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D1F4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D1F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0D1F4: 31030001 andi $v1, $t0, 0x1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u; PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80032CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0D1F8: 00081042 srl $v0, $t0, 1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 1u; PGXP_ALU(0x00081042u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80032CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D1FC: 14620003 bne $v1, $v0, 0xBFC0D20C */ uint32_t psx_brA_BFC0D1FC = cpu->gpr[3]; uint32_t psx_brB_BFC0D1FC = cpu->gpr[2]; psx_taken_BFC0D1FC = (psx_brA_BFC0D1FC != psx_brB_BFC0D1FC); psx_delay_BFC0D1FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D200: 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(0x80032D00u); #endif if (psx_delay_BFC0D1FC) { psx_delay_BFC0D1FC = 0; if (psx_taken_BFC0D1FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D0Cu); goto label_BFC0D20C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D04u); } label_BFC0D204: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D204u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D204: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D208: 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(0x80032D08u); #endif 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, 0x80032D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D20C: 0C00CA94 jal 0xB0032A50 */ cpu->gpr[31] = 0x80032D14u; /* jal link before delay slot */ psx_delay_BFC0D20C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0D210: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D10u); #endif if (psx_delay_BFC0D20C) { psx_delay_BFC0D20C = 0; cpu->gpr[31] = 0x80032D14u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A50u); cpu->pc = 0x80032A50u; return; } } void OpenBIOS_func_1FC0D214(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D214u); int psx_delay_BFC0D224 = 0; int psx_taken_BFC0D224 = 0; int psx_delay_BFC0D23C = 0; int psx_taken_BFC0D23C = 0; int psx_delay_BFC0D250 = 0; int psx_taken_BFC0D250 = 0; int psx_delay_BFC0D25C = 0; int psx_taken_BFC0D25C = 0; int psx_delay_BFC0D26C = 0; int psx_taken_BFC0D26C = 0; int psx_delay_BFC0D274 = 0; int psx_taken_BFC0D274 = 0; int psx_delay_BFC0D280 = 0; int psx_taken_BFC0D280 = 0; int psx_delay_BFC0D294 = 0; int psx_taken_BFC0D294 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D250u: goto label_BFC0D250; case 0xBFC0D264u: goto label_BFC0D264; case 0xBFC0D22Cu: goto label_BFC0D22C; case 0xBFC0D23Cu: goto label_BFC0D23C; case 0xBFC0D244u: goto label_BFC0D244; case 0xBFC0D248u: goto label_BFC0D248; case 0xBFC0D258u: goto label_BFC0D258; case 0xBFC0D25Cu: goto label_BFC0D25C; case 0xBFC0D274u: goto label_BFC0D274; case 0xBFC0D27Cu: goto label_BFC0D27C; case 0xBFC0D288u: goto label_BFC0D288; default: break; } } label_BFC0D214: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D214u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D14u); #endif /* 0xBFC0D214: 84E20002 lh $v0, 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, 0x80032D14u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x84E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032D14u); #endif /* 0xBFC0D218: 94E30004 lhu $v1, 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, 0x80032D18u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x94E30004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D21C: 00000000 nop */ /* nop */ #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, 0x1Cu); #endif /* 0xBFC0D220: 0043202A slt $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043202Au, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D224: 10800015 beq $a0, $zero, 0xBFC0D27C */ uint32_t psx_brA_BFC0D224 = cpu->gpr[4]; 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_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D228: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032D28u); #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, 0x80032D7Cu); goto label_BFC0D27C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D2Cu); } 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, 0x80032D2Cu); #endif /* 0xBFC0D22C: 90E40006 lbu $a0, 6($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (6)), 4, 0x80u); PGXP_LOAD(0x90E40006u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D230: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D234: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D238: 0062202A slt $a0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0062202Au, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D38u); #endif label_BFC0D23C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D23Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D23Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D23C: 10800002 beq $a0, $zero, 0xBFC0D248 */ uint32_t psx_brA_BFC0D23C = cpu->gpr[4]; uint32_t psx_brB_BFC0D23C = cpu->gpr[0]; psx_taken_BFC0D23C = (psx_brA_BFC0D23C == psx_brB_BFC0D23C); psx_delay_BFC0D23C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D240: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032D40u); #endif if (psx_delay_BFC0D23C) { psx_delay_BFC0D23C = 0; if (psx_taken_BFC0D23C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D48u); goto label_BFC0D248; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D44u); } 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, 0x80032D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0D244: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D44u); #endif label_BFC0D248: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D248u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0D248: A4E20002 sh $v0, 2($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80032D48u); return; } g_debug_last_store_pc = 0x80032D48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D24C: 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(0x80032D4Cu); #endif label_BFC0D250: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D250u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D250: 14400002 bne $v0, $zero, 0xBFC0D25C */ uint32_t psx_brA_BFC0D250 = cpu->gpr[2]; uint32_t psx_brB_BFC0D250 = cpu->gpr[0]; psx_taken_BFC0D250 = (psx_brA_BFC0D250 != psx_brB_BFC0D250); psx_delay_BFC0D250 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0D254: 0142001A div $t2, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[10]; 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(0x0142001Au, cpu->hi, cpu->lo, cpu->gpr[10], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80032D54u); #endif if (psx_delay_BFC0D250) { psx_delay_BFC0D250 = 0; if (psx_taken_BFC0D250) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D5Cu); goto label_BFC0D25C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D58u); } label_BFC0D258: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D258u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D258: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80032D58u); return; #ifdef PSX_COSIM cosim_instr(0x80032D58u); #endif 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, 0x80032D5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D25C: 1000FFA7 beq $zero, $zero, 0xBFC0D0FC */ uint32_t psx_brA_BFC0D25C = cpu->gpr[0]; uint32_t psx_brB_BFC0D25C = cpu->gpr[0]; psx_taken_BFC0D25C = (psx_brA_BFC0D25C == psx_brB_BFC0D25C); psx_delay_BFC0D25C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D260: 3403AC44 ori $v1, $zero, 0xAC44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xAC44u; PGXP_ALU(0x3403AC44u, cpu->gpr[3], _pgx1, 0xAC44u); } #ifdef PSX_COSIM cosim_instr(0x80032D60u); #endif if (psx_delay_BFC0D25C) { psx_delay_BFC0D25C = 0; if (psx_taken_BFC0D25C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032BFCu); cpu->pc = 0x80032BFCu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D64u); } label_BFC0D264: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D264u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D264: 00831021 addu $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(0x00831021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D268: 2C430040 sltiu $v1, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80032D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D26C: 1060FFD9 beq $v1, $zero, 0xBFC0D1D4 */ uint32_t psx_brA_BFC0D26C = cpu->gpr[3]; uint32_t psx_brB_BFC0D26C = cpu->gpr[0]; psx_taken_BFC0D26C = (psx_brA_BFC0D26C == psx_brB_BFC0D26C); psx_delay_BFC0D26C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D270: 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(0x80032D70u); #endif if (psx_delay_BFC0D26C) { psx_delay_BFC0D26C = 0; if (psx_taken_BFC0D26C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CD4u); cpu->pc = 0x80032CD4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D74u); } label_BFC0D274: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D274u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D274: 1000FFD7 beq $zero, $zero, 0xBFC0D1D4 */ uint32_t psx_brA_BFC0D274 = cpu->gpr[0]; uint32_t psx_brB_BFC0D274 = cpu->gpr[0]; psx_taken_BFC0D274 = (psx_brA_BFC0D274 == psx_brB_BFC0D274); psx_delay_BFC0D274 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D278: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D78u); #endif if (psx_delay_BFC0D274) { psx_delay_BFC0D274 = 0; if (psx_taken_BFC0D274) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032CD4u); cpu->pc = 0x80032CD4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D7Cu); } label_BFC0D27C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D27Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D27Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D27C: 0062202A slt $a0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[3] < (int32_t)cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0062202Au, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D280: 1080FFF1 beq $a0, $zero, 0xBFC0D248 */ uint32_t psx_brA_BFC0D280 = cpu->gpr[4]; uint32_t psx_brB_BFC0D280 = cpu->gpr[0]; psx_taken_BFC0D280 = (psx_brA_BFC0D280 == psx_brB_BFC0D280); psx_delay_BFC0D280 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D284: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032D84u); #endif if (psx_delay_BFC0D280) { psx_delay_BFC0D280 = 0; if (psx_taken_BFC0D280) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D48u); goto label_BFC0D248; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D88u); } label_BFC0D288: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D288u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D88u); #endif /* 0xBFC0D288: 90E40006 lbu $a0, 6($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (6)), 4, 0x80u); PGXP_LOAD(0x90E40006u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D28C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D290: 00441023 subu $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(0x00441023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D294: 1000FFE9 beq $zero, $zero, 0xBFC0D23C */ uint32_t psx_brA_BFC0D294 = cpu->gpr[0]; uint32_t psx_brB_BFC0D294 = cpu->gpr[0]; psx_taken_BFC0D294 = (psx_brA_BFC0D294 == psx_brB_BFC0D294); psx_delay_BFC0D294 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D298: 0043202A slt $a0, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (int32_t)cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043202Au, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032D98u); #endif if (psx_delay_BFC0D294) { psx_delay_BFC0D294 = 0; if (psx_taken_BFC0D294) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D3Cu); goto label_BFC0D23C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D9Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D9Cu); cpu->pc = 0x80032D9Cu; return; /* fallthrough */ } void OpenBIOS_func_1FC0D29C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D29Cu); int psx_delay_BFC0D2A4 = 0; int psx_taken_BFC0D2A4 = 0; int psx_delay_BFC0D2AC = 0; int psx_taken_BFC0D2AC = 0; int psx_delay_BFC0D2D0 = 0; int psx_taken_BFC0D2D0 = 0; int psx_delay_BFC0D2E0 = 0; int psx_taken_BFC0D2E0 = 0; int psx_delay_BFC0D2F0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D2B8u: goto label_BFC0D2B8; case 0xBFC0D2ACu: goto label_BFC0D2AC; case 0xBFC0D2B4u: goto label_BFC0D2B4; case 0xBFC0D2D8u: goto label_BFC0D2D8; case 0xBFC0D2E8u: goto label_BFC0D2E8; case 0xBFC0D2F0u: goto label_BFC0D2F0; default: break; } } label_BFC0D29C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D29Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D29Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D29C: 2C450011 sltiu $a1, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0); PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x80032D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DA0u); #endif /* 0xBFC0D2A0: 90E30007 lbu $v1, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 3, 0x80u); PGXP_LOAD(0x90E30007u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D2A4: 10A00034 beq $a1, $zero, 0xBFC0D378 */ uint32_t psx_brA_BFC0D2A4 = cpu->gpr[5]; uint32_t psx_brB_BFC0D2A4 = cpu->gpr[0]; psx_taken_BFC0D2A4 = (psx_brA_BFC0D2A4 == psx_brB_BFC0D2A4); psx_delay_BFC0D2A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D2A8: 00621023 subu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[2]; PGXP_ALU(0x00621023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032DA8u); #endif if (psx_delay_BFC0D2A4) { psx_delay_BFC0D2A4 = 0; if (psx_taken_BFC0D2A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E78u); cpu->pc = 0x80032E78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DACu); } 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, 0x80032DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D2AC: 04410002 bgez $v0, 0xBFC0D2B8 */ uint32_t psx_brA_BFC0D2AC = cpu->gpr[2]; psx_taken_BFC0D2AC = ((int32_t)psx_brA_BFC0D2AC >= 0); psx_delay_BFC0D2AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D2B0: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032DB0u); #endif if (psx_delay_BFC0D2AC) { psx_delay_BFC0D2AC = 0; if (psx_taken_BFC0D2AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DB8u); goto label_BFC0D2B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DB4u); } label_BFC0D2B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D2B4: 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(0x80032DB4u); #endif label_BFC0D2B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D2B8: A0E60007 sb $a2, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032DB8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0E60007u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80032DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D2BC: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D2C0: 00063200 sll $a2, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 8u; PGXP_ALU(0x00063200u, cpu->gpr[6], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D2C4: 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(0x80032DC4u); #endif /* 0xBFC0D2C8: 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, 0x80032DC8u); 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(0x80032DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D2CC: 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(0x80032DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D2D0: 10400007 beq $v0, $zero, 0xBFC0D2F0 */ uint32_t psx_brA_BFC0D2D0 = cpu->gpr[2]; uint32_t psx_brB_BFC0D2D0 = cpu->gpr[0]; psx_taken_BFC0D2D0 = (psx_brA_BFC0D2D0 == psx_brB_BFC0D2D0); psx_delay_BFC0D2D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D2D4: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032DD4u); #endif if (psx_delay_BFC0D2D0) { psx_delay_BFC0D2D0 = 0; if (psx_taken_BFC0D2D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DF0u); goto label_BFC0D2F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DD8u); } label_BFC0D2D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0D2D8: 31030001 andi $v1, $t0, 0x1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u; PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80032DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0D2DC: 00081042 srl $v0, $t0, 1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 1u; PGXP_ALU(0x00081042u, cpu->gpr[2], _pgx1, 1u); } #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, 0xCu); #endif /* 0xBFC0D2E0: 14620003 bne $v1, $v0, 0xBFC0D2F0 */ uint32_t psx_brA_BFC0D2E0 = cpu->gpr[3]; uint32_t psx_brB_BFC0D2E0 = cpu->gpr[2]; psx_taken_BFC0D2E0 = (psx_brA_BFC0D2E0 != psx_brB_BFC0D2E0); psx_delay_BFC0D2E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D2E4: 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(0x80032DE4u); #endif if (psx_delay_BFC0D2E0) { psx_delay_BFC0D2E0 = 0; if (psx_taken_BFC0D2E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DF0u); goto label_BFC0D2F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DE8u); } label_BFC0D2E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D2E8: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D2EC: 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(0x80032DECu); #endif label_BFC0D2F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2F0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D2F0: 0C00CA94 jal 0xB0032A50 */ cpu->gpr[31] = 0x80032DF8u; /* jal link before delay slot */ psx_delay_BFC0D2F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0D2F4: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032DF4u); #endif if (psx_delay_BFC0D2F0) { psx_delay_BFC0D2F0 = 0; cpu->gpr[31] = 0x80032DF8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A50u); cpu->pc = 0x80032A50u; return; } } void OpenBIOS_func_1FC0D2F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D2F8u); int psx_delay_BFC0D304 = 0; int psx_taken_BFC0D304 = 0; int psx_delay_BFC0D310 = 0; int psx_taken_BFC0D310 = 0; int psx_delay_BFC0D340 = 0; int psx_taken_BFC0D340 = 0; int psx_delay_BFC0D360 = 0; int psx_taken_BFC0D360 = 0; int psx_delay_BFC0D370 = 0; int psx_taken_BFC0D370 = 0; int psx_delay_BFC0D380 = 0; int psx_taken_BFC0D380 = 0; int psx_delay_BFC0D388 = 0; int psx_taken_BFC0D388 = 0; int psx_delay_BFC0D390 = 0; int psx_taken_BFC0D390 = 0; int psx_delay_BFC0D3A0 = 0; int psx_taken_BFC0D3A0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D378u: goto label_BFC0D378; case 0xBFC0D30Cu: goto label_BFC0D30C; case 0xBFC0D318u: goto label_BFC0D318; case 0xBFC0D328u: goto label_BFC0D328; case 0xBFC0D348u: goto label_BFC0D348; case 0xBFC0D34Cu: goto label_BFC0D34C; case 0xBFC0D368u: goto label_BFC0D368; case 0xBFC0D36Cu: goto label_BFC0D36C; case 0xBFC0D388u: goto label_BFC0D388; case 0xBFC0D390u: goto label_BFC0D390; case 0xBFC0D398u: goto label_BFC0D398; default: break; } } label_BFC0D2F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D2F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D2F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032DF8u); #endif /* 0xBFC0D2F8: 90E5000D lbu $a1, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (13)), 5, 0x80u); PGXP_LOAD(0x90E5000Du, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80032DF8u); #endif /* 0xBFC0D2FC: 80E40009 lb $a0, 9($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 9; cpu->gpr[4] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (9)), 4, 0x80u); PGXP_LOAD(0x80E40009u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032DFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D300: 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(0x80032E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8020u); #endif /* 0xBFC0D304: 10AF0022 beq $a1, $t7, 0xBFC0D390 */ uint32_t psx_brA_BFC0D304 = cpu->gpr[5]; uint32_t psx_brB_BFC0D304 = cpu->gpr[15]; psx_taken_BFC0D304 = (psx_brA_BFC0D304 == psx_brB_BFC0D304); psx_delay_BFC0D304 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D308: 3082001F andi $v0, $a0, 0x1F */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0x1Fu; PGXP_ALU(0x3082001Fu, cpu->gpr[2], _pgx1, 0x001Fu); } #ifdef PSX_COSIM cosim_instr(0x80032E08u); #endif if (psx_delay_BFC0D304) { psx_delay_BFC0D304 = 0; if (psx_taken_BFC0D304) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E90u); goto label_BFC0D390; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E0Cu); } label_BFC0D30C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D30Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D30Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D30C: 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(0x80032E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0D310: 10A60005 beq $a1, $a2, 0xBFC0D328 */ uint32_t psx_brA_BFC0D310 = cpu->gpr[5]; uint32_t psx_brB_BFC0D310 = cpu->gpr[6]; psx_taken_BFC0D310 = (psx_brA_BFC0D310 == psx_brB_BFC0D310); psx_delay_BFC0D310 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D314: 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(0x80032E14u); #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, 0x80032E28u); goto label_BFC0D328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E18u); } 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, 0x80032E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D318: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D31C: 24633C54 addiu $v1, $v1, 15444 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15444)); PGXP_ALU(0x24633C54u, cpu->gpr[3], _pgx1, 0x00003C54u); } #ifdef PSX_COSIM cosim_instr(0x80032E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D320: 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(0x80032E20u); #endif /* 0xBFC0D324: 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(0x80032E24u); #endif label_BFC0D328: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D328u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E28u); #endif /* 0xBFC0D328: 90E2000B lbu $v0, 11($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 11; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (11)), 2, 0x80u); PGXP_LOAD(0x90E2000Bu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032E28u); #endif /* 0xBFC0D32C: 84E60002 lh $a2, 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, 0x80032E2Cu); return; } cpu->gpr[6] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 6, 0x80u); } PGXP_LOAD(0x84E60002u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80032E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D330: 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(0x80032E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D334: 00A30018 mult $a1, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[5] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[5])); #endif PGXP_MULDIV(0x00A30018u, cpu->hi, cpu->lo, cpu->gpr[5], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x80032E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D338: 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(0x80032E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D33C: 000529C2 srl $a1, $a1, 7 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] >> 7u; PGXP_ALU(0x000529C2u, cpu->gpr[5], _pgx1, 7u); } #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, 0x10u); #endif /* 0xBFC0D340: 04810002 bgez $a0, 0xBFC0D34C */ uint32_t psx_brA_BFC0D340 = cpu->gpr[4]; psx_taken_BFC0D340 = ((int32_t)psx_brA_BFC0D340 >= 0); psx_delay_BFC0D340 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x68u); #endif /* 0xBFC0D344: 00A61821 addu $v1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[6]; PGXP_ALU(0x00A61821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032E44u); #endif if (psx_delay_BFC0D340) { psx_delay_BFC0D340 = 0; if (psx_taken_BFC0D340) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E4Cu); goto label_BFC0D34C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E48u); } label_BFC0D348: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D348u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x68u); #endif /* 0xBFC0D348: 00C51823 subu $v1, $a2, $a1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[6] - cpu->gpr[5]; PGXP_ALU(0x00C51823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032E48u); #endif 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, 0x80032E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D34C: 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(0x80032E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D350: 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(0x80032E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D354: 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(0x80032E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D358: 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(0x80032E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0D35C: 28850020 slti $a1, $a0, 32 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0); PGXP_ALU(0x28850020u, cpu->gpr[5], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x80032E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D360: 14A00002 bne $a1, $zero, 0xBFC0D36C */ uint32_t psx_brA_BFC0D360 = cpu->gpr[5]; uint32_t psx_brB_BFC0D360 = cpu->gpr[0]; psx_taken_BFC0D360 = (psx_brA_BFC0D360 != psx_brB_BFC0D360); psx_delay_BFC0D360 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D364: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032E64u); #endif if (psx_delay_BFC0D360) { psx_delay_BFC0D360 = 0; if (psx_taken_BFC0D360) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E6Cu); goto label_BFC0D36C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E68u); } label_BFC0D368: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D368u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D368: 2444FFC0 addiu $a0, $v0, -64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (-64)); PGXP_ALU(0x2444FFC0u, cpu->gpr[4], _pgx1, 0xFFFFFFC0u); } #ifdef PSX_COSIM cosim_instr(0x80032E68u); #endif label_BFC0D36C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D36Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D36Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC0D36C: A0E40009 sb $a0, 9($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 9; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032E6Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (9)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0E40009u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC0D370: 1000FFB7 beq $zero, $zero, 0xBFC0D250 */ uint32_t psx_brA_BFC0D370 = cpu->gpr[0]; uint32_t psx_brB_BFC0D370 = cpu->gpr[0]; psx_taken_BFC0D370 = (psx_brA_BFC0D370 == psx_brB_BFC0D370); psx_delay_BFC0D370 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D374: 00031040 sll $v0, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[3] << 1u; PGXP_ALU(0x00031040u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80032E74u); #endif if (psx_delay_BFC0D370) { psx_delay_BFC0D370 = 0; if (psx_taken_BFC0D370) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032D50u); cpu->pc = 0x80032D50u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E78u); } label_BFC0D378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D378u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D378: 00831021 addu $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(0x00831021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D37C: 2C430040 sltiu $v1, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80032E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D380: 1060FFCD beq $v1, $zero, 0xBFC0D2B8 */ uint32_t psx_brA_BFC0D380 = cpu->gpr[3]; uint32_t psx_brB_BFC0D380 = cpu->gpr[0]; psx_taken_BFC0D380 = (psx_brA_BFC0D380 == psx_brB_BFC0D380); psx_delay_BFC0D380 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D384: 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(0x80032E84u); #endif if (psx_delay_BFC0D380) { psx_delay_BFC0D380 = 0; if (psx_taken_BFC0D380) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DB8u); cpu->pc = 0x80032DB8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E88u); } label_BFC0D388: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D388u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D388: 1000FFCB beq $zero, $zero, 0xBFC0D2B8 */ uint32_t psx_brA_BFC0D388 = cpu->gpr[0]; uint32_t psx_brB_BFC0D388 = cpu->gpr[0]; psx_taken_BFC0D388 = (psx_brA_BFC0D388 == psx_brB_BFC0D388); psx_delay_BFC0D388 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D38C: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032E8Cu); #endif if (psx_delay_BFC0D388) { psx_delay_BFC0D388 = 0; if (psx_taken_BFC0D388) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032DB8u); cpu->pc = 0x80032DB8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E90u); } label_BFC0D390: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D390u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D390: 0481FFE5 bgez $a0, 0xBFC0D328 */ uint32_t psx_brA_BFC0D390 = cpu->gpr[4]; psx_taken_BFC0D390 = ((int32_t)psx_brA_BFC0D390 >= 0); psx_delay_BFC0D390 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D394: 000218C0 sll $v1, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] << 3u; PGXP_ALU(0x000218C0u, cpu->gpr[3], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80032E94u); #endif if (psx_delay_BFC0D390) { psx_delay_BFC0D390 = 0; if (psx_taken_BFC0D390) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E28u); goto label_BFC0D328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E98u); } label_BFC0D398: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D398u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D398: 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(0x80032E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D39C: 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(0x80032E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D3A0: 1000FFE1 beq $zero, $zero, 0xBFC0D328 */ uint32_t psx_brA_BFC0D3A0 = cpu->gpr[0]; uint32_t psx_brB_BFC0D3A0 = cpu->gpr[0]; psx_taken_BFC0D3A0 = (psx_brA_BFC0D3A0 == psx_brB_BFC0D3A0); psx_delay_BFC0D3A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D3A4: 244300FF addiu $v1, $v0, 255 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] + (255)); PGXP_ALU(0x244300FFu, cpu->gpr[3], _pgx1, 0x000000FFu); } #ifdef PSX_COSIM cosim_instr(0x80032EA4u); #endif if (psx_delay_BFC0D3A0) { psx_delay_BFC0D3A0 = 0; if (psx_taken_BFC0D3A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032E28u); goto label_BFC0D328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EA8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EA8u); cpu->pc = 0x80032EA8u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D3A8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D3A8u); int psx_delay_BFC0D3C0 = 0; int psx_taken_BFC0D3C0 = 0; int psx_delay_BFC0D3CC = 0; int psx_taken_BFC0D3CC = 0; int psx_delay_BFC0D3FC = 0; int psx_taken_BFC0D3FC = 0; int psx_delay_BFC0D424 = 0; int psx_taken_BFC0D424 = 0; int psx_delay_BFC0D438 = 0; int psx_taken_BFC0D438 = 0; int psx_delay_BFC0D458 = 0; int psx_taken_BFC0D458 = 0; int psx_delay_BFC0D468 = 0; int psx_taken_BFC0D468 = 0; int psx_delay_BFC0D478 = 0; int psx_delay_BFC0D480 = 0; int psx_taken_BFC0D480 = 0; int psx_delay_BFC0D488 = 0; int psx_taken_BFC0D488 = 0; int psx_delay_BFC0D498 = 0; int psx_taken_BFC0D498 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D444u: goto label_BFC0D444; case 0xBFC0D478u: goto label_BFC0D478; case 0xBFC0D3C8u: goto label_BFC0D3C8; case 0xBFC0D3D4u: goto label_BFC0D3D4; case 0xBFC0D3E4u: goto label_BFC0D3E4; case 0xBFC0D404u: goto label_BFC0D404; case 0xBFC0D408u: goto label_BFC0D408; case 0xBFC0D42Cu: goto label_BFC0D42C; case 0xBFC0D430u: goto label_BFC0D430; case 0xBFC0D440u: goto label_BFC0D440; case 0xBFC0D460u: goto label_BFC0D460; case 0xBFC0D470u: goto label_BFC0D470; case 0xBFC0D480u: goto label_BFC0D480; case 0xBFC0D488u: goto label_BFC0D488; case 0xBFC0D490u: goto label_BFC0D490; default: break; } } label_BFC0D3A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D3A8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D3A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EA8u); #endif /* 0xBFC0D3A8: 91A5000D lbu $a1, 13($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 13; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (13)), 5, 0x2000u); PGXP_LOAD(0x91A5000Du, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80032EA8u); #endif /* 0xBFC0D3AC: 91A2000A lbu $v0, 10($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 10; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (10)), 2, 0x2000u); PGXP_LOAD(0x91A2000Au, _pgxa, cpu->gpr[2]); } #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, 0x20u); #endif /* 0xBFC0D3B0: 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(0x80032EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D3B4: 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(0x80032EB4u); #endif /* 0xBFC0D3B8: 90E3000A lbu $v1, 10($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 10; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (10)), 3, 0x80u); PGXP_LOAD(0x90E3000Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032EB8u); #endif /* 0xBFC0D3BC: 80E6000A lb $a2, 10($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 10; cpu->gpr[6] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (10)), 6, 0x80u); PGXP_LOAD(0x80E6000Au, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80032EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC0D3C0: 10A40031 beq $a1, $a0, 0xBFC0D488 */ uint32_t psx_brA_BFC0D3C0 = cpu->gpr[5]; uint32_t psx_brB_BFC0D3C0 = cpu->gpr[4]; psx_taken_BFC0D3C0 = (psx_brA_BFC0D3C0 == psx_brB_BFC0D3C0); psx_delay_BFC0D3C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D3C4: 3042001F andi $v0, $v0, 0x1F */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x1Fu; PGXP_ALU(0x3042001Fu, cpu->gpr[2], _pgx1, 0x001Fu); } #ifdef PSX_COSIM cosim_instr(0x80032EC4u); #endif if (psx_delay_BFC0D3C0) { psx_delay_BFC0D3C0 = 0; if (psx_taken_BFC0D3C0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F88u); goto label_BFC0D488; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EC8u); } label_BFC0D3C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D3C8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D3C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000001u); #endif /* 0xBFC0D3C8: 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(0x80032EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000020u); #endif /* 0xBFC0D3CC: 10B80005 beq $a1, $t8, 0xBFC0D3E4 */ uint32_t psx_brA_BFC0D3CC = cpu->gpr[5]; uint32_t psx_brB_BFC0D3CC = cpu->gpr[24]; psx_taken_BFC0D3CC = (psx_brA_BFC0D3CC == psx_brB_BFC0D3CC); psx_delay_BFC0D3CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D3D0: 240400FF addiu $a0, $zero, 255 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (255)); PGXP_ALU(0x240400FFu, cpu->gpr[4], _pgx1, 0x000000FFu); } #ifdef PSX_COSIM cosim_instr(0x80032ED0u); #endif if (psx_delay_BFC0D3CC) { psx_delay_BFC0D3CC = 0; if (psx_taken_BFC0D3CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EE4u); goto label_BFC0D3E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032ED4u); } label_BFC0D3D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D3D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D3D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D3D4: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D3D8: 24843C54 addiu $a0, $a0, 15444 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15444)); PGXP_ALU(0x24843C54u, cpu->gpr[4], _pgx1, 0x00003C54u); } #ifdef PSX_COSIM cosim_instr(0x80032ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D3DC: 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(0x80032EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EE0u); #endif /* 0xBFC0D3E0: 90440000 lbu $a0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); PGXP_LOAD(0x90440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032EE0u); #endif label_BFC0D3E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D3E4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D3E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EE4u); #endif /* 0xBFC0D3E4: 90E2000D lbu $v0, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (13)), 2, 0x80u); PGXP_LOAD(0x90E2000Du, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032EE4u); #endif /* 0xBFC0D3E8: 90E50007 lbu $a1, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 5, 0x80u); PGXP_LOAD(0x90E50007u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x80032EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D3EC: 00021102 srl $v0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 4u; PGXP_ALU(0x00021102u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x80032EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D3F0: 00440018 mult $v0, $a0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[4]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00440018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x80032EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D3F4: 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(0x80032EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D3F8: 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(0x80032EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D3FC: 04C10002 bgez $a2, 0xBFC0D408 */ uint32_t psx_brA_BFC0D3FC = cpu->gpr[6]; psx_taken_BFC0D3FC = ((int32_t)psx_brA_BFC0D3FC >= 0); psx_delay_BFC0D3FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC0D400: 00851021 addu $v0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00851021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F00u); #endif if (psx_delay_BFC0D3FC) { psx_delay_BFC0D3FC = 0; if (psx_taken_BFC0D3FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F08u); goto label_BFC0D408; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F04u); } label_BFC0D404: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D404u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x34u); #endif /* 0xBFC0D404: 00A41023 subu $v0, $a1, $a0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[5] - cpu->gpr[4]; PGXP_ALU(0x00A41023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F04u); #endif label_BFC0D408: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D408u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F08u); #endif /* 0xBFC0D408: 90E4000C lbu $a0, 12($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 12; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (12)), 4, 0x80u); PGXP_LOAD(0x90E4000Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80032F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D40C: 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(0x80032F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D410: 3084000F andi $a0, $a0, 0xF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0xFu; PGXP_ALU(0x3084000Fu, cpu->gpr[4], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80032F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D414: 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(0x80032F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D418: 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(0x80032F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D41C: 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(0x80032F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D420: 28840020 slti $a0, $a0, 32 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] < (32) ? 1 : 0); PGXP_ALU(0x28840020u, cpu->gpr[4], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x80032F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D424: 14800002 bne $a0, $zero, 0xBFC0D430 */ uint32_t psx_brA_BFC0D424 = cpu->gpr[4]; uint32_t psx_brB_BFC0D424 = cpu->gpr[0]; psx_taken_BFC0D424 = (psx_brA_BFC0D424 != psx_brB_BFC0D424); psx_delay_BFC0D424 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D428: 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(0x80032F28u); #endif if (psx_delay_BFC0D424) { psx_delay_BFC0D424 = 0; if (psx_taken_BFC0D424) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F30u); goto label_BFC0D430; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F2Cu); } label_BFC0D42C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D42Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D42Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D42C: 2463FFC0 addiu $v1, $v1, -64 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-64)); PGXP_ALU(0x2463FFC0u, cpu->gpr[3], _pgx1, 0xFFFFFFC0u); } #ifdef PSX_COSIM cosim_instr(0x80032F2Cu); #endif label_BFC0D430: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D430u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D430: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D434: 28420040 slti $v0, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] < (64) ? 1 : 0); PGXP_ALU(0x28420040u, cpu->gpr[2], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80032F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D438: 14400002 bne $v0, $zero, 0xBFC0D444 */ uint32_t psx_brA_BFC0D438 = cpu->gpr[2]; uint32_t psx_brB_BFC0D438 = cpu->gpr[0]; psx_taken_BFC0D438 = (psx_brA_BFC0D438 != psx_brB_BFC0D438); psx_delay_BFC0D438 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0D43C: A0E3000A sb $v1, 10($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032F3Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (10)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0E3000Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032F3Cu); #endif if (psx_delay_BFC0D438) { psx_delay_BFC0D438 = 0; if (psx_taken_BFC0D438) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F44u); goto label_BFC0D444; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F40u); } label_BFC0D440: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D440u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D440: 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(0x80032F40u); #endif 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, 0x80032F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D444: 00063200 sll $a2, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 8u; PGXP_ALU(0x00063200u, cpu->gpr[6], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80032F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D448: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D44C: 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(0x80032F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F50u); #endif /* 0xBFC0D450: 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, 0x80032F50u); 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(0x80032F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D454: 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(0x80032F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D458: 10400007 beq $v0, $zero, 0xBFC0D478 */ uint32_t psx_brA_BFC0D458 = cpu->gpr[2]; uint32_t psx_brB_BFC0D458 = cpu->gpr[0]; psx_taken_BFC0D458 = (psx_brA_BFC0D458 == psx_brB_BFC0D458); psx_delay_BFC0D458 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D45C: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F5Cu); #endif if (psx_delay_BFC0D458) { psx_delay_BFC0D458 = 0; if (psx_taken_BFC0D458) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F78u); goto label_BFC0D478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F60u); } label_BFC0D460: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D460u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0D460: 31030001 andi $v1, $t0, 0x1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = cpu->gpr[8] & 0x1u; PGXP_ALU(0x31030001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80032F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0D464: 00081042 srl $v0, $t0, 1 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = cpu->gpr[8] >> 1u; PGXP_ALU(0x00081042u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80032F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D468: 14620003 bne $v1, $v0, 0xBFC0D478 */ uint32_t psx_brA_BFC0D468 = cpu->gpr[3]; uint32_t psx_brB_BFC0D468 = cpu->gpr[2]; psx_taken_BFC0D468 = (psx_brA_BFC0D468 != psx_brB_BFC0D468); psx_delay_BFC0D468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D46C: 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(0x80032F6Cu); #endif if (psx_delay_BFC0D468) { psx_delay_BFC0D468 = 0; if (psx_taken_BFC0D468) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F78u); goto label_BFC0D478; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F70u); } 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, 0x80032F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0D470: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D474: 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(0x80032F74u); #endif label_BFC0D478: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D478u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D478: 0C00CA94 jal 0xB0032A50 */ cpu->gpr[31] = 0x80032F80u; /* jal link before delay slot */ psx_delay_BFC0D478 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0D47C: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032F7Cu); #endif if (psx_delay_BFC0D478) { psx_delay_BFC0D478 = 0; cpu->gpr[31] = 0x80032F80u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A50u); cpu->pc = 0x80032A50u; return; } label_BFC0D480: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D480u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D480: 1000FF27 beq $zero, $zero, 0xBFC0D120 */ uint32_t psx_brA_BFC0D480 = cpu->gpr[0]; uint32_t psx_brB_BFC0D480 = cpu->gpr[0]; psx_taken_BFC0D480 = (psx_brA_BFC0D480 == psx_brB_BFC0D480); psx_delay_BFC0D480 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0D484: 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(0x80032F84u); #endif if (psx_delay_BFC0D480) { psx_delay_BFC0D480 = 0; if (psx_taken_BFC0D480) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C20u); cpu->pc = 0x80032C20u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F88u); } label_BFC0D488: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D488u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D488: 04C1FFD6 bgez $a2, 0xBFC0D3E4 */ uint32_t psx_brA_BFC0D488 = cpu->gpr[6]; psx_taken_BFC0D488 = ((int32_t)psx_brA_BFC0D488 >= 0); psx_delay_BFC0D488 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D48C: 000220C0 sll $a0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 3u; PGXP_ALU(0x000220C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x80032F8Cu); #endif if (psx_delay_BFC0D488) { psx_delay_BFC0D488 = 0; if (psx_taken_BFC0D488) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EE4u); goto label_BFC0D3E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F90u); } label_BFC0D490: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D490u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D490: 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(0x80032F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D494: 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(0x80032F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D498: 1000FFD2 beq $zero, $zero, 0xBFC0D3E4 */ uint32_t psx_brA_BFC0D498 = cpu->gpr[0]; uint32_t psx_brB_BFC0D498 = cpu->gpr[0]; psx_taken_BFC0D498 = (psx_brA_BFC0D498 == psx_brB_BFC0D498); psx_delay_BFC0D498 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D49C: 244400FF addiu $a0, $v0, 255 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] + (255)); PGXP_ALU(0x244400FFu, cpu->gpr[4], _pgx1, 0x000000FFu); } #ifdef PSX_COSIM cosim_instr(0x80032F9Cu); #endif if (psx_delay_BFC0D498) { psx_delay_BFC0D498 = 0; if (psx_taken_BFC0D498) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032EE4u); goto label_BFC0D3E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FA0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FA0u); cpu->pc = 0x80032FA0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D4A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D4A0u); int psx_delay_BFC0D4A8 = 0; int psx_taken_BFC0D4A8 = 0; int psx_delay_BFC0D4B0 = 0; int psx_taken_BFC0D4B0 = 0; int psx_delay_BFC0D4BC = 0; int psx_taken_BFC0D4BC = 0; int psx_delay_BFC0D4CC = 0; int psx_taken_BFC0D4CC = 0; int psx_delay_BFC0D4D4 = 0; int psx_taken_BFC0D4D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D4B0u: goto label_BFC0D4B0; case 0xBFC0D4B8u: goto label_BFC0D4B8; case 0xBFC0D4BCu: goto label_BFC0D4BC; case 0xBFC0D4C4u: goto label_BFC0D4C4; case 0xBFC0D4D4u: goto label_BFC0D4D4; default: break; } } label_BFC0D4A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4A0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D4A0: 2C450011 sltiu $a1, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0); PGXP_ALU(0x2C450011u, cpu->gpr[5], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x80032FA0u); #endif /* 0xBFC0D4A4: 90E30007 lbu $v1, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 3, 0x80u); PGXP_LOAD(0x90E30007u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80032FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D4A8: 10A00006 beq $a1, $zero, 0xBFC0D4C4 */ uint32_t psx_brA_BFC0D4A8 = cpu->gpr[5]; uint32_t psx_brB_BFC0D4A8 = cpu->gpr[0]; psx_taken_BFC0D4A8 = (psx_brA_BFC0D4A8 == psx_brB_BFC0D4A8); psx_delay_BFC0D4A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D4AC: 00621023 subu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] - cpu->gpr[2]; PGXP_ALU(0x00621023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032FACu); #endif if (psx_delay_BFC0D4A8) { psx_delay_BFC0D4A8 = 0; if (psx_taken_BFC0D4A8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FC4u); goto label_BFC0D4C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FB0u); } label_BFC0D4B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D4B0: 04410002 bgez $v0, 0xBFC0D4BC */ uint32_t psx_brA_BFC0D4B0 = cpu->gpr[2]; psx_taken_BFC0D4B0 = ((int32_t)psx_brA_BFC0D4B0 >= 0); psx_delay_BFC0D4B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D4B4: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032FB4u); #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, 0x80032FBCu); goto label_BFC0D4BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FB8u); } 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, 0x80032FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D4B8: 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(0x80032FB8u); #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, 0x80032FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D4BC: 1000FFE1 beq $zero, $zero, 0xBFC0D444 */ uint32_t psx_brA_BFC0D4BC = cpu->gpr[0]; uint32_t psx_brB_BFC0D4BC = cpu->gpr[0]; psx_taken_BFC0D4BC = (psx_brA_BFC0D4BC == psx_brB_BFC0D4BC); psx_delay_BFC0D4BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D4C0: A0E60007 sb $a2, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80032FC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0E60007u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80032FC0u); #endif if (psx_delay_BFC0D4BC) { psx_delay_BFC0D4BC = 0; if (psx_taken_BFC0D4BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F44u); cpu->pc = 0x80032F44u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FC4u); } label_BFC0D4C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC0D4C4: 00831021 addu $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(0x00831021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D4C8: 2C430040 sltiu $v1, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80032FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D4CC: 1060FFFB beq $v1, $zero, 0xBFC0D4BC */ uint32_t psx_brA_BFC0D4CC = cpu->gpr[3]; uint32_t psx_brB_BFC0D4CC = cpu->gpr[0]; psx_taken_BFC0D4CC = (psx_brA_BFC0D4CC == psx_brB_BFC0D4CC); psx_delay_BFC0D4CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D4D0: 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(0x80032FD0u); #endif if (psx_delay_BFC0D4CC) { psx_delay_BFC0D4CC = 0; if (psx_taken_BFC0D4CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FBCu); goto label_BFC0D4BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FD4u); } label_BFC0D4D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4D4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D4D4: 1000FFF9 beq $zero, $zero, 0xBFC0D4BC */ uint32_t psx_brA_BFC0D4D4 = cpu->gpr[0]; uint32_t psx_brB_BFC0D4D4 = cpu->gpr[0]; psx_taken_BFC0D4D4 = (psx_brA_BFC0D4D4 == psx_brB_BFC0D4D4); psx_delay_BFC0D4D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0D4D8: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80032FD8u); #endif if (psx_delay_BFC0D4D4) { psx_delay_BFC0D4D4 = 0; if (psx_taken_BFC0D4D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FBCu); goto label_BFC0D4BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FDCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FDCu); cpu->pc = 0x80032FDCu; return; /* fallthrough */ } void OpenBIOS_func_1FC0D4DC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D4DCu); int psx_delay_BFC0D4E0 = 0; int psx_taken_BFC0D4E0 = 0; int psx_delay_BFC0D4E8 = 0; int psx_taken_BFC0D4E8 = 0; int psx_delay_BFC0D4F8 = 0; int psx_taken_BFC0D4F8 = 0; int psx_delay_BFC0D504 = 0; int psx_taken_BFC0D504 = 0; int psx_delay_BFC0D518 = 0; int psx_taken_BFC0D518 = 0; int psx_delay_BFC0D528 = 0; int psx_taken_BFC0D528 = 0; int psx_delay_BFC0D544 = 0; int psx_taken_BFC0D544 = 0; int psx_delay_BFC0D560 = 0; int psx_taken_BFC0D560 = 0; int psx_delay_BFC0D574 = 0; int psx_taken_BFC0D574 = 0; int psx_delay_BFC0D580 = 0; int psx_taken_BFC0D580 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D54Cu: goto label_BFC0D54C; case 0xBFC0D4E8u: goto label_BFC0D4E8; case 0xBFC0D4F0u: goto label_BFC0D4F0; case 0xBFC0D500u: goto label_BFC0D500; case 0xBFC0D50Cu: goto label_BFC0D50C; case 0xBFC0D520u: goto label_BFC0D520; case 0xBFC0D524u: goto label_BFC0D524; case 0xBFC0D530u: goto label_BFC0D530; case 0xBFC0D568u: goto label_BFC0D568; case 0xBFC0D57Cu: goto label_BFC0D57C; default: break; } } label_BFC0D4DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D4DC: 24020009 addiu $v0, $zero, 9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (9)); PGXP_ALU(0x24020009u, cpu->gpr[2], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0x80032FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D4E0: 1082000A beq $a0, $v0, 0xBFC0D50C */ uint32_t psx_brA_BFC0D4E0 = cpu->gpr[4]; uint32_t psx_brB_BFC0D4E0 = cpu->gpr[2]; psx_taken_BFC0D4E0 = (psx_brA_BFC0D4E0 == psx_brB_BFC0D4E0); psx_delay_BFC0D4E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D4E4: 2402000C addiu $v0, $zero, 12 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (12)); PGXP_ALU(0x2402000Cu, cpu->gpr[2], _pgx1, 0x0000000Cu); } #ifdef PSX_COSIM cosim_instr(0x80032FE4u); #endif if (psx_delay_BFC0D4E0) { psx_delay_BFC0D4E0 = 0; if (psx_taken_BFC0D4E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003300Cu); goto label_BFC0D50C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FE8u); } label_BFC0D4E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D4E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D4E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80032FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D4E8: 1482FF0C bne $a0, $v0, 0xBFC0D11C */ uint32_t psx_brA_BFC0D4E8 = cpu->gpr[4]; uint32_t psx_brB_BFC0D4E8 = cpu->gpr[2]; psx_taken_BFC0D4E8 = (psx_brA_BFC0D4E8 != psx_brB_BFC0D4E8); psx_delay_BFC0D4E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D4EC: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80032FECu); #endif if (psx_delay_BFC0D4E8) { psx_delay_BFC0D4E8 = 0; if (psx_taken_BFC0D4E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032FF0u); } 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, 0x80032FF0u); #endif /* 0xBFC0D4F0: 8C423D70 lw $v0, 15728($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80032FF0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D70u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80032FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D4F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80032FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D4F8: 14A2FF08 bne $a1, $v0, 0xBFC0D11C */ uint32_t psx_brA_BFC0D4F8 = cpu->gpr[5]; uint32_t psx_brB_BFC0D4F8 = cpu->gpr[2]; psx_taken_BFC0D4F8 = (psx_brA_BFC0D4F8 != psx_brB_BFC0D4F8); psx_delay_BFC0D4F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D4FC: 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(0x80032FFCu); #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, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033000u); } 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, 0x80033000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0D500: A0E00007 sb $zero, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033000u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0E00007u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D504: 1000FFDC beq $zero, $zero, 0xBFC0D478 */ uint32_t psx_brA_BFC0D504 = cpu->gpr[0]; uint32_t psx_brB_BFC0D504 = cpu->gpr[0]; psx_taken_BFC0D504 = (psx_brA_BFC0D504 == psx_brB_BFC0D504); psx_delay_BFC0D504 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D508: 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(0x80033008u); #endif if (psx_delay_BFC0D504) { psx_delay_BFC0D504 = 0; if (psx_taken_BFC0D504) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032F78u); cpu->pc = 0x80032F78u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003300Cu); } label_BFC0D50C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D50Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D50Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003300Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D50C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003300Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033010u); #endif /* 0xBFC0D510: 8C423D70 lw $v0, 15728($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033010u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D70u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D514: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D518: 14A00002 bne $a1, $zero, 0xBFC0D524 */ uint32_t psx_brA_BFC0D518 = cpu->gpr[5]; uint32_t psx_brB_BFC0D518 = cpu->gpr[0]; psx_taken_BFC0D518 = (psx_brA_BFC0D518 != psx_brB_BFC0D518); psx_delay_BFC0D518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D51C: 0045001B divu $v0, $a1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0045001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0x8003301Cu); #endif if (psx_delay_BFC0D518) { psx_delay_BFC0D518 = 0; if (psx_taken_BFC0D518) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033024u); goto label_BFC0D524; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033020u); } label_BFC0D520: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D520u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D520: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x80033020u); return; #ifdef PSX_COSIM cosim_instr(0x80033020u); #endif label_BFC0D524: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D524u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D524: 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(0x80033024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D528: 1440FEFC bne $v0, $zero, 0xBFC0D11C */ uint32_t psx_brA_BFC0D528 = cpu->gpr[2]; uint32_t psx_brB_BFC0D528 = cpu->gpr[0]; psx_taken_BFC0D528 = (psx_brA_BFC0D528 != psx_brB_BFC0D528); psx_delay_BFC0D528 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D52C: 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(0x8003302Cu); #endif if (psx_delay_BFC0D528) { psx_delay_BFC0D528 = 0; if (psx_taken_BFC0D528) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032C1Cu); cpu->pc = 0x80032C1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033030u); } label_BFC0D530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D530u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0D530: 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(0x80033030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D534: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D538: A4621D88 sh $v0, 7560($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 7560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (7560)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033038u); return; } g_debug_last_store_pc = 0x80033038u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4621D88u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D53C: 00021402 srl $v0, $v0, 16 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] >> 16u; PGXP_ALU(0x00021402u, cpu->gpr[2], _pgx1, 16u); } #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, 0xCu); #endif /* 0xBFC0D540: A4621D8A sh $v0, 7562($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 7562; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (7562)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033040u); return; } g_debug_last_store_pc = 0x80033040u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4621D8Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D544: 1000FEF6 beq $zero, $zero, 0xBFC0D120 */ 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_cyc_step(cpu, 0x100u); #endif /* 0xBFC0D548: 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(0x80033048u); #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, 0x80032C20u); cpu->pc = 0x80032C20u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003304Cu); } 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, 0x8003304Cu); #endif /* 0xBFC0D54C: 91630002 lbu $v1, 2($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (2)), 3, 0x800u); PGXP_LOAD(0x91630002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003304Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033050u); #endif /* 0xBFC0D550: 91620003 lbu $v0, 3($t3) */ { uint32_t _pgxa = cpu->gpr[11] + 3; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[11] + (3)), 2, 0x800u); PGXP_LOAD(0x91620003u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D554: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80033054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0D558: 2C66000F sltiu $a2, $v1, 15 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Fu ? 1 : 0); PGXP_ALU(0x2C66000Fu, cpu->gpr[6], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80033058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D55C: 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(0x8003305Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D560: 14C00006 bne $a2, $zero, 0xBFC0D57C */ uint32_t psx_brA_BFC0D560 = cpu->gpr[6]; uint32_t psx_brB_BFC0D560 = cpu->gpr[0]; psx_taken_BFC0D560 = (psx_brA_BFC0D560 != psx_brB_BFC0D560); psx_delay_BFC0D560 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D564: 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(0x80033064u); #endif if (psx_delay_BFC0D560) { psx_delay_BFC0D560 = 0; if (psx_taken_BFC0D560) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003307Cu); goto label_BFC0D57C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033068u); } label_BFC0D568: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D568u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0D568: 256B0004 addiu $t3, $t3, 4 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (4)); PGXP_ALU(0x256B0004u, cpu->gpr[11], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x80033068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0D56C: 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(0x8003306Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0D570: 24E70010 addiu $a3, $a3, 16 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (16)); PGXP_ALU(0x24E70010u, cpu->gpr[7], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x80033070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D574: 1000FEBA beq $zero, $zero, 0xBFC0D060 */ uint32_t psx_brA_BFC0D574 = cpu->gpr[0]; uint32_t psx_brB_BFC0D574 = cpu->gpr[0]; psx_taken_BFC0D574 = (psx_brA_BFC0D574 == psx_brB_BFC0D574); psx_delay_BFC0D574 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0D578: 25290010 addiu $t1, $t1, 16 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (16)); PGXP_ALU(0x25290010u, cpu->gpr[9], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x80033078u); #endif if (psx_delay_BFC0D574) { psx_delay_BFC0D574 = 0; if (psx_taken_BFC0D574) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B60u); cpu->pc = 0x80032B60u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003307Cu); } label_BFC0D57C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D57Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D57Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003307Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D57C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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 /* 0xBFC0D580: 1000FEC2 beq $zero, $zero, 0xBFC0D08C */ uint32_t psx_brA_BFC0D580 = cpu->gpr[0]; uint32_t psx_brB_BFC0D580 = cpu->gpr[0]; psx_taken_BFC0D580 = (psx_brA_BFC0D580 == psx_brB_BFC0D580); psx_delay_BFC0D580 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0D584: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033084u); return; } g_debug_last_store_pc = 0x80033084u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80033084u); #endif if (psx_delay_BFC0D580) { psx_delay_BFC0D580 = 0; if (psx_taken_BFC0D580) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B8Cu); cpu->pc = 0x80032B8Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033088u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033088u); cpu->pc = 0x80033088u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D588(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D588u); int psx_delay_BFC0D5D0 = 0; int psx_taken_BFC0D5D0 = 0; int psx_delay_BFC0D614 = 0; int psx_taken_BFC0D614 = 0; int psx_delay_BFC0D61C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D5C4u: goto label_BFC0D5C4; case 0xBFC0D5D8u: goto label_BFC0D5D8; case 0xBFC0D608u: goto label_BFC0D608; case 0xBFC0D61Cu: goto label_BFC0D61C; default: break; } } 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, 0x80033088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D588: 00051182 srl $v0, $a1, 6 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] >> 6u; PGXP_ALU(0x00051182u, cpu->gpr[2], _pgx1, 6u); } #ifdef PSX_COSIM cosim_instr(0x80033088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D58C: 30A5003F andi $a1, $a1, 0x3F */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x3Fu; PGXP_ALU(0x30A5003Fu, cpu->gpr[5], _pgx1, 0x003Fu); } #ifdef PSX_COSIM cosim_instr(0x8003308Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D590: 0005282B sltu $a1, $zero, $a1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)(cpu->gpr[0] < cpu->gpr[5] ? 1 : 0); PGXP_ALU(0x0005282Bu, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D594: 00451021 addu $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00451021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D598: 24030202 addiu $v1, $zero, 514 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (514)); PGXP_ALU(0x24030202u, cpu->gpr[3], _pgx1, 0x00000202u); } #ifdef PSX_COSIM cosim_instr(0x80033098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D59C: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D5A0: A4A31DA6 sh $v1, 7590($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 7590; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (7590)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800330A0u); return; } g_debug_last_store_pc = 0x800330A0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A31DA6u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800330A0u); #endif /* 0xBFC0D5A4: 94A31DAA lhu $v1, 7594($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 7594; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800330A4u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x94A31DAAu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800330A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D5A8: 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(0x800330A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D5AC: 3063FFCF andi $v1, $v1, 0xFFCF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFFCFu; PGXP_ALU(0x3063FFCFu, cpu->gpr[3], _pgx1, 0xFFCFu); } #ifdef PSX_COSIM cosim_instr(0x800330ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D5B0: 34630020 ori $v1, $v1, 0x20 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x20u; PGXP_ALU(0x34630020u, cpu->gpr[3], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x800330B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D5B4: A4A31DAA sh $v1, 7594($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 7594; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800330B4u); return; } g_debug_last_store_pc = 0x800330B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A31DAAu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800330B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D5B8: 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(0x800330B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D5BC: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #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, 0x41u); #endif /* 0xBFC0D5C0: 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(0x800330C0u); #endif label_BFC0D5C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D5C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D5C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330C4u); #endif /* 0xBFC0D5C4: 94651DAA lhu $a1, 7594($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 7594; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800330C4u); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x94651DAAu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800330C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D5C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800330C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D5CC: 30A50030 andi $a1, $a1, 0x30 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x30u; PGXP_ALU(0x30A50030u, cpu->gpr[5], _pgx1, 0x0030u); } #ifdef PSX_COSIM cosim_instr(0x800330CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0D5D0: 14A6FFFC bne $a1, $a2, 0xBFC0D5C4 */ uint32_t psx_brA_BFC0D5D0 = cpu->gpr[5]; uint32_t psx_brB_BFC0D5D0 = cpu->gpr[6]; psx_taken_BFC0D5D0 = (psx_brA_BFC0D5D0 != psx_brB_BFC0D5D0); psx_delay_BFC0D5D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D5D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800330D4u); #endif if (psx_delay_BFC0D5D0) { psx_delay_BFC0D5D0 = 0; if (psx_taken_BFC0D5D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800330C4u); goto label_BFC0D5C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800330D8u); } label_BFC0D5D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D5D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D5D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330D8u); #endif /* 0xBFC0D5D8: 8C651014 lw $a1, 4116($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330D8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C651014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800330D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D5DC: 3C06F0FF lui $a2, 0xF0FF */ cpu->gpr[6] = 0xF0FF0000u; PGXP_ALU(0x3C06F0FFu, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800330DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D5E0: 34C6FFFF ori $a2, $a2, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] | 0xFFFFu; PGXP_ALU(0x34C6FFFFu, cpu->gpr[6], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x800330E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0D5E4: 00A62824 and $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6]; PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800330E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D5E8: AC651014 sw $a1, 4116($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330E8u); return; } g_debug_last_store_pc = 0x800330E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC651014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x800330E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D5EC: AC6410C0 sw $a0, 4288($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4288; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4288)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330ECu); return; } g_debug_last_store_pc = 0x800330ECu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC6410C0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800330ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800330F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D5F0: AC6210C4 sw $v0, 4292($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330F0u); return; } g_debug_last_store_pc = 0x800330F0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC6210C4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800330F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D5F4: 3C020100 lui $v0, 0x100 */ cpu->gpr[2] = 0x01000000u; PGXP_ALU(0x3C020100u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800330F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D5F8: 24420201 addiu $v0, $v0, 513 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (513)); PGXP_ALU(0x24420201u, cpu->gpr[2], _pgx1, 0x00000201u); } #ifdef PSX_COSIM cosim_instr(0x800330F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D5FC: AC6210C8 sw $v0, 4296($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800330FCu); return; } g_debug_last_store_pc = 0x800330FCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC6210C8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800330FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D600: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D604: 3C030100 lui $v1, 0x100 */ cpu->gpr[3] = 0x01000000u; PGXP_ALU(0x3C030100u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033104u); #endif label_BFC0D608: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D608u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033108u); #endif /* 0xBFC0D608: 8C8210C8 lw $v0, 4296($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4296; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033108u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C8210C8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D60C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003310Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D610: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D614: 1440FFFC bne $v0, $zero, 0xBFC0D608 */ uint32_t psx_brA_BFC0D614 = cpu->gpr[2]; uint32_t psx_brB_BFC0D614 = cpu->gpr[0]; psx_taken_BFC0D614 = (psx_brA_BFC0D614 != psx_brB_BFC0D614); psx_delay_BFC0D614 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D618: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033118u); #endif if (psx_delay_BFC0D614) { psx_delay_BFC0D614 = 0; if (psx_taken_BFC0D614) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033108u); goto label_BFC0D608; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003311Cu); } label_BFC0D61C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D61Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D61Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003311Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D61C: 03E00008 jr $ra */ psx_delay_BFC0D61C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D620: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033120u); #endif if (psx_delay_BFC0D61C) { psx_delay_BFC0D61C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0D624(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D624u); int psx_delay_BFC0D62C = 0; int psx_taken_BFC0D62C = 0; int psx_delay_BFC0D634 = 0; int psx_delay_BFC0D644 = 0; int psx_taken_BFC0D644 = 0; int psx_delay_BFC0D654 = 0; int psx_taken_BFC0D654 = 0; int psx_delay_BFC0D660 = 0; int psx_delay_BFC0D66C = 0; int psx_taken_BFC0D66C = 0; int psx_delay_BFC0D690 = 0; int psx_taken_BFC0D690 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D634u: goto label_BFC0D634; case 0xBFC0D63Cu: goto label_BFC0D63C; case 0xBFC0D64Cu: goto label_BFC0D64C; case 0xBFC0D65Cu: goto label_BFC0D65C; case 0xBFC0D660u: goto label_BFC0D660; case 0xBFC0D668u: goto label_BFC0D668; case 0xBFC0D674u: goto label_BFC0D674; default: break; } } label_BFC0D624: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D624u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033124u); #endif /* 0xBFC0D624: 80830438 lb $v1, 1080($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1080; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1080)), 3, 0x10u); PGXP_LOAD(0x80830438u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D628: 24020048 addiu $v0, $zero, 72 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (72)); PGXP_ALU(0x24020048u, cpu->gpr[2], _pgx1, 0x00000048u); } #ifdef PSX_COSIM cosim_instr(0x80033128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D62C: 10620003 beq $v1, $v0, 0xBFC0D63C */ uint32_t psx_brA_BFC0D62C = cpu->gpr[3]; uint32_t psx_brB_BFC0D62C = cpu->gpr[2]; psx_taken_BFC0D62C = (psx_brA_BFC0D62C == psx_brB_BFC0D62C); psx_delay_BFC0D62C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D630: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033130u); #endif if (psx_delay_BFC0D62C) { psx_delay_BFC0D62C = 0; if (psx_taken_BFC0D62C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003313Cu); goto label_BFC0D63C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033134u); } label_BFC0D634: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D634u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D634: 03E00008 jr $ra */ psx_delay_BFC0D634 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D638: 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(0x80033138u); #endif if (psx_delay_BFC0D634) { psx_delay_BFC0D634 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0D63C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D63Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D63Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003313Cu); #endif /* 0xBFC0D63C: 80820439 lb $v0, 1081($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1081; cpu->gpr[2] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1081)), 2, 0x10u); PGXP_LOAD(0x80820439u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003313Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D640: 24030049 addiu $v1, $zero, 73 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (73)); PGXP_ALU(0x24030049u, cpu->gpr[3], _pgx1, 0x00000049u); } #ifdef PSX_COSIM cosim_instr(0x80033140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D644: 14430008 bne $v0, $v1, 0xBFC0D668 */ uint32_t psx_brA_BFC0D644 = cpu->gpr[2]; uint32_t psx_brB_BFC0D644 = cpu->gpr[3]; psx_taken_BFC0D644 = (psx_brA_BFC0D644 != psx_brB_BFC0D644); psx_delay_BFC0D644 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D648: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033148u); #endif if (psx_delay_BFC0D644) { psx_delay_BFC0D644 = 0; if (psx_taken_BFC0D644) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033168u); goto label_BFC0D668; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003314Cu); } label_BFC0D64C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D64Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D64Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003314Cu); #endif /* 0xBFC0D64C: 8083043A lb $v1, 1082($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1082; cpu->gpr[3] = (uint32_t)(int32_t)(int8_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1082)), 3, 0x10u); PGXP_LOAD(0x8083043Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003314Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D650: 24020054 addiu $v0, $zero, 84 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (84)); PGXP_ALU(0x24020054u, cpu->gpr[2], _pgx1, 0x00000054u); } #ifdef PSX_COSIM cosim_instr(0x80033150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D654: 1462FFF7 bne $v1, $v0, 0xBFC0D634 */ uint32_t psx_brA_BFC0D654 = cpu->gpr[3]; uint32_t psx_brB_BFC0D654 = cpu->gpr[2]; psx_taken_BFC0D654 = (psx_brA_BFC0D654 != psx_brB_BFC0D654); psx_delay_BFC0D654 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D658: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033158u); #endif if (psx_delay_BFC0D654) { psx_delay_BFC0D654 = 0; if (psx_taken_BFC0D654) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033134u); goto label_BFC0D634; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003315Cu); } label_BFC0D65C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D65Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D65Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003315Cu); #endif /* 0xBFC0D65C: 9082043B lbu $v0, 1083($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1083; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1083)), 2, 0x10u); PGXP_LOAD(0x9082043Bu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003315Cu); #endif label_BFC0D660: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D660u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D660: 03E00008 jr $ra */ psx_delay_BFC0D660 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D664: 2442FFD0 addiu $v0, $v0, -48 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-48)); PGXP_ALU(0x2442FFD0u, cpu->gpr[2], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0x80033164u); #endif if (psx_delay_BFC0D660) { psx_delay_BFC0D660 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC0D668: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D668u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D668: 2403004D addiu $v1, $zero, 77 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (77)); PGXP_ALU(0x2403004Du, cpu->gpr[3], _pgx1, 0x0000004Du); } #ifdef PSX_COSIM cosim_instr(0x80033168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D66C: 1443FFF1 bne $v0, $v1, 0xBFC0D634 */ uint32_t psx_brA_BFC0D66C = cpu->gpr[2]; uint32_t psx_brB_BFC0D66C = cpu->gpr[3]; psx_taken_BFC0D66C = (psx_brA_BFC0D66C != psx_brB_BFC0D66C); psx_delay_BFC0D66C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D670: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033170u); #endif if (psx_delay_BFC0D66C) { psx_delay_BFC0D66C = 0; if (psx_taken_BFC0D66C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033134u); goto label_BFC0D634; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033174u); } label_BFC0D674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D674u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033174u); #endif /* 0xBFC0D674: 9083043A lbu $v1, 1082($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1082; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1082)), 3, 0x10u); PGXP_LOAD(0x9083043Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D678: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D67C: 2463FFD0 addiu $v1, $v1, -48 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-48)); PGXP_ALU(0x2463FFD0u, cpu->gpr[3], _pgx1, 0xFFFFFFD0u); } #ifdef PSX_COSIM cosim_instr(0x8003317Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D680: 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(0x80033180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D684: 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(0x80033184u); #endif /* 0xBFC0D688: 9083043B lbu $v1, 1083($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1083; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1083)), 3, 0x10u); PGXP_LOAD(0x9083043Bu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D68C: 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(0x8003318Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D690: 1000FFF3 beq $zero, $zero, 0xBFC0D660 */ uint32_t psx_brA_BFC0D690 = cpu->gpr[0]; uint32_t psx_brB_BFC0D690 = cpu->gpr[0]; psx_taken_BFC0D690 = (psx_brA_BFC0D690 == psx_brB_BFC0D690); psx_delay_BFC0D690 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D694: 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(0x80033194u); #endif if (psx_delay_BFC0D690) { psx_delay_BFC0D690 = 0; if (psx_taken_BFC0D690) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033160u); goto label_BFC0D660; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033198u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033198u); cpu->pc = 0x80033198u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D698(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D698u); int psx_delay_BFC0D6A8 = 0; int psx_delay_BFC0D6B0 = 0; int psx_delay_BFC0D6BC = 0; int psx_taken_BFC0D6BC = 0; int psx_delay_BFC0D70C = 0; int psx_taken_BFC0D70C = 0; int psx_delay_BFC0D73C = 0; int psx_taken_BFC0D73C = 0; int psx_delay_BFC0D74C = 0; int psx_taken_BFC0D74C = 0; int psx_delay_BFC0D764 = 0; int psx_taken_BFC0D764 = 0; int psx_delay_BFC0D774 = 0; int psx_delay_BFC0D7D8 = 0; int psx_delay_BFC0D7E0 = 0; int psx_taken_BFC0D7E0 = 0; int psx_delay_BFC0D81C = 0; int psx_delay_BFC0D830 = 0; int psx_delay_BFC0D85C = 0; int psx_delay_BFC0D864 = 0; int psx_taken_BFC0D864 = 0; int psx_delay_BFC0D87C = 0; int psx_taken_BFC0D87C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D6B0u: goto label_BFC0D6B0; case 0xBFC0D6B8u: goto label_BFC0D6B8; case 0xBFC0D6C4u: goto label_BFC0D6C4; case 0xBFC0D6DCu: goto label_BFC0D6DC; case 0xBFC0D714u: goto label_BFC0D714; case 0xBFC0D730u: goto label_BFC0D730; case 0xBFC0D744u: goto label_BFC0D744; case 0xBFC0D748u: goto label_BFC0D748; case 0xBFC0D754u: goto label_BFC0D754; case 0xBFC0D76Cu: goto label_BFC0D76C; case 0xBFC0D774u: goto label_BFC0D774; case 0xBFC0D77Cu: goto label_BFC0D77C; case 0xBFC0D7D8u: goto label_BFC0D7D8; case 0xBFC0D7E0u: goto label_BFC0D7E0; case 0xBFC0D7E8u: goto label_BFC0D7E8; case 0xBFC0D824u: goto label_BFC0D824; case 0xBFC0D838u: goto label_BFC0D838; case 0xBFC0D850u: goto label_BFC0D850; case 0xBFC0D864u: goto label_BFC0D864; case 0xBFC0D86Cu: goto label_BFC0D86C; default: break; } } label_BFC0D698: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D698u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D698: 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(0x80033198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0D69C: 00804025 or $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(0x00804025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003319Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0D6A0: 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, 0x800331A0u); return; } g_debug_last_store_pc = 0x800331A0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800331A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0D6A4: 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, 0x800331A4u); return; } g_debug_last_store_pc = 0x800331A4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800331A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D6A8: 0C00CA67 jal 0xB003299C */ cpu->gpr[31] = 0x800331B0u; /* jal link before delay slot */ psx_delay_BFC0D6A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0D6AC: 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, 0x800331ACu); return; } g_debug_last_store_pc = 0x800331ACu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x800331ACu); #endif if (psx_delay_BFC0D6A8) { psx_delay_BFC0D6A8 = 0; cpu->gpr[31] = 0x800331B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003299Cu); cpu->pc = 0x8003299Cu; return; } label_BFC0D6B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D6B0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D6B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D6B0: 0C00CC49 jal 0xB0033124 */ cpu->gpr[31] = 0x800331B8u; /* jal link before delay slot */ psx_delay_BFC0D6B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0D6B4: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800331B4u); #endif if (psx_delay_BFC0D6B0) { psx_delay_BFC0D6B0 = 0; cpu->gpr[31] = 0x800331B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033124u); cpu->pc = 0x80033124u; return; } label_BFC0D6B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D6B8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D6B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0D6B8: 3C118004 lui $s1, 0x8004 */ cpu->gpr[17] = 0x80040000u; PGXP_ALU(0x3C118004u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800331B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D6BC: 10400064 beq $v0, $zero, 0xBFC0D850 */ uint32_t psx_brA_BFC0D6BC = cpu->gpr[2]; uint32_t psx_brB_BFC0D6BC = cpu->gpr[0]; psx_taken_BFC0D6BC = (psx_brA_BFC0D6BC == psx_brB_BFC0D6BC); psx_delay_BFC0D6BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC0D6C0: AE223D88 sw $v0, 15752($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 15752; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (15752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800331C0u); return; } g_debug_last_store_pc = 0x800331C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE223D88u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800331C0u); #endif if (psx_delay_BFC0D6BC) { psx_delay_BFC0D6BC = 0; if (psx_taken_BFC0D6BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033350u); goto label_BFC0D850; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800331C4u); } label_BFC0D6C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D6C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D6C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D6C4: 3C068004 lui $a2, 0x8004 */ cpu->gpr[6] = 0x80040000u; PGXP_ALU(0x3C068004u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800331C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x221u); #endif /* 0xBFC0D6C8: 00A04825 or $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(0x00A04825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800331C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D6CC: 24C6500C addiu $a2, $a2, 20492 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (20492)); PGXP_ALU(0x24C6500Cu, cpu->gpr[6], _pgx1, 0x0000500Cu); } #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, 0x108u); #endif /* 0xBFC0D6D0: 2503002A addiu $v1, $t0, 42 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] + (42)); PGXP_ALU(0x2503002Au, cpu->gpr[3], _pgx1, 0x0000002Au); } #ifdef PSX_COSIM cosim_instr(0x800331D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC0D6D4: 250403CC addiu $a0, $t0, 972 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[8] + (972)); PGXP_ALU(0x250403CCu, cpu->gpr[4], _pgx1, 0x000003CCu); } #ifdef PSX_COSIM cosim_instr(0x800331D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D6D8: 24051010 addiu $a1, $zero, 4112 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (4112)); PGXP_ALU(0x24051010u, cpu->gpr[5], _pgx1, 0x00001010u); } #ifdef PSX_COSIM cosim_instr(0x800331D8u); #endif label_BFC0D6DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D6DCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D6DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0D6DC: 00053902 srl $a3, $a1, 4 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[7] = cpu->gpr[5] >> 4u; PGXP_ALU(0x00053902u, cpu->gpr[7], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x800331DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D6E0: A4C70000 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800331E0u); return; } g_debug_last_store_pc = 0x800331E0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } PGXP_STORE(0xA4C70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331E0u); #endif /* 0xBFC0D6E4: 90670002 lbu $a3, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (2)), 7, 0x8u); PGXP_LOAD(0x90670002u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D6E8: 2463001E addiu $v1, $v1, 30 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30)); PGXP_ALU(0x2463001Eu, cpu->gpr[3], _pgx1, 0x0000001Eu); } #ifdef PSX_COSIM cosim_instr(0x800331E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D6EC: A0C70002 sb $a3, 2($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800331ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (2)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0C70002u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800331F0u); #endif /* 0xBFC0D6F0: 9067FFE5 lbu $a3, -27($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -27; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-27)), 7, 0x8u); PGXP_LOAD(0x9067FFE5u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0D6F4: 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(0x800331F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0D6F8: A0C7FFFF sb $a3, -1($a2) */ { uint32_t _pgxa = cpu->gpr[6] + -1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800331F8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (-1)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0C7FFFFu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331F8u); #endif /* 0xBFC0D6FC: 9067FFE2 lbu $a3, -30($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -30; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-30)), 7, 0x8u); PGXP_LOAD(0x9067FFE2u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x800331FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033200u); #endif /* 0xBFC0D700: 906AFFE3 lbu $t2, -29($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -29; cpu->gpr[10] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (-29)), 10, 0x8u); PGXP_LOAD(0x906AFFE3u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80033200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0D704: 00073A00 sll $a3, $a3, 8 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] << 8u; PGXP_ALU(0x00073A00u, cpu->gpr[7], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80033204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480u); #endif /* 0xBFC0D708: 00EA3821 addu $a3, $a3, $t2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[10]; PGXP_ALU(0x00EA3821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D70C: 1483FFF3 bne $a0, $v1, 0xBFC0D6DC */ uint32_t psx_brA_BFC0D70C = cpu->gpr[4]; uint32_t psx_brB_BFC0D70C = cpu->gpr[3]; psx_taken_BFC0D70C = (psx_brA_BFC0D70C != psx_brB_BFC0D70C); psx_delay_BFC0D70C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC0D710: 00A72821 addu $a1, $a1, $a3 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[7]; PGXP_ALU(0x00A72821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033210u); #endif if (psx_delay_BFC0D70C) { psx_delay_BFC0D70C = 0; if (psx_taken_BFC0D70C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800331DCu); goto label_BFC0D6DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033214u); } label_BFC0D714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D714u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033214u); #endif /* 0xBFC0D714: 910403B6 lbu $a0, 950($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 950; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (950)), 4, 0x100u); PGXP_LOAD(0x910403B6u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80033214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D718: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D71C: AC643D84 sw $a0, 15748($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15748; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15748)); 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[4]); } PGXP_STORE(0xAC643D84u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x8003321Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC0D720: 250303B8 addiu $v1, $t0, 952 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[8] + (952)); PGXP_ALU(0x250303B8u, cpu->gpr[3], _pgx1, 0x000003B8u); } #ifdef PSX_COSIM cosim_instr(0x80033220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC0D724: 25060438 addiu $a2, $t0, 1080 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[8] + (1080)); PGXP_ALU(0x25060438u, cpu->gpr[6], _pgx1, 0x00000438u); } #ifdef PSX_COSIM cosim_instr(0x80033224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC0D728: 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(0x80033228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x89u); #endif /* 0xBFC0D72C: 00603825 or $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(0x00603825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003322Cu); #endif label_BFC0D730: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D730u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033230u); #endif /* 0xBFC0D730: 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(0x80033230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D734: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10410u); #endif /* 0xBFC0D738: 0204502B sltu $t2, $s0, $a0 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = (uint32_t)(cpu->gpr[16] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0204502Bu, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0D73C: 11400002 beq $t2, $zero, 0xBFC0D748 */ uint32_t psx_brA_BFC0D73C = cpu->gpr[10]; uint32_t psx_brB_BFC0D73C = cpu->gpr[0]; psx_taken_BFC0D73C = (psx_brA_BFC0D73C == psx_brB_BFC0D73C); psx_delay_BFC0D73C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D740: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033240u); #endif if (psx_delay_BFC0D73C) { psx_delay_BFC0D73C = 0; if (psx_taken_BFC0D73C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033248u); goto label_BFC0D748; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033244u); } 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, 0x80033244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC0D744: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033244u); #endif label_BFC0D748: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D748u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D748: 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(0x80033248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0D74C: 14C3FFF8 bne $a2, $v1, 0xBFC0D730 */ uint32_t psx_brA_BFC0D74C = cpu->gpr[6]; uint32_t psx_brB_BFC0D74C = cpu->gpr[3]; psx_taken_BFC0D74C = (psx_brA_BFC0D74C != psx_brB_BFC0D74C); psx_delay_BFC0D74C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D750: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033250u); #endif if (psx_delay_BFC0D74C) { psx_delay_BFC0D74C = 0; if (psx_taken_BFC0D74C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033230u); goto label_BFC0D730; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033254u); } label_BFC0D754: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D754u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D754: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0D758: AC675008 sw $a3, 20488($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 20488; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (20488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033258u); return; } g_debug_last_store_pc = 0x80033258u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC675008u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x80033258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0D75C: 2523FFFF addiu $v1, $t1, -1 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[9] + (-1)); PGXP_ALU(0x2523FFFFu, cpu->gpr[3], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x8003325Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D760: 2C63FFFE sltiu $v1, $v1, -2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0xFFFFFFFEu ? 1 : 0); PGXP_ALU(0x2C63FFFEu, cpu->gpr[3], _pgx1, 0xFFFEu); } #ifdef PSX_COSIM cosim_instr(0x80033260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D764: 1060003F beq $v1, $zero, 0xBFC0D864 */ uint32_t psx_brA_BFC0D764 = cpu->gpr[3]; uint32_t psx_brB_BFC0D764 = cpu->gpr[0]; psx_taken_BFC0D764 = (psx_brA_BFC0D764 == psx_brB_BFC0D764); psx_delay_BFC0D764 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0D768: 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(0x80033268u); #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, 0x80033364u); goto label_BFC0D864; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003326Cu); } 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, 0x8003326Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D76C: 24A5EFF0 addiu $a1, $a1, -4112 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4112)); PGXP_ALU(0x24A5EFF0u, cpu->gpr[5], _pgx1, 0xFFFFEFF0u); } #ifdef PSX_COSIM cosim_instr(0x8003326Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x211u); #endif /* 0xBFC0D770: 01202025 or $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(0x01202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033270u); #endif 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, 0x80033274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D774: 0C00CC22 jal 0xB0033088 */ cpu->gpr[31] = 0x8003327Cu; /* jal link before delay slot */ psx_delay_BFC0D774 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D778: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033278u); #endif if (psx_delay_BFC0D774) { psx_delay_BFC0D774 = 0; cpu->gpr[31] = 0x8003327Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033088u); cpu->pc = 0x80033088u; return; } 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, 0x8003327Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D77C: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003327Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D780: AC403D80 sw $zero, 15744($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033280u); return; } g_debug_last_store_pc = 0x80033280u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D80u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033280u); #endif /* 0xBFC0D784: 910203B8 lbu $v0, 952($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 952; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (952)), 2, 0x100u); PGXP_LOAD(0x910203B8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D788: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D78C: AC623D7C sw $v0, 15740($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15740; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003328Cu); return; } g_debug_last_store_pc = 0x8003328Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D7Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003328Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D790: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D794: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D798: AC603D78 sw $zero, 15736($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033298u); return; } g_debug_last_store_pc = 0x80033298u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC603D78u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D79C: 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(0x8003329Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D7A0: AC833D74 sw $v1, 15732($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332A0u); return; } g_debug_last_store_pc = 0x800332A0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC833D74u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800332A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D7A4: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800332A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D7A8: AC833D70 sw $v1, 15728($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332A8u); return; } g_debug_last_store_pc = 0x800332A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC833D70u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800332A8u); #endif /* 0xBFC0D7AC: 8E233D88 lw $v1, 15752($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 15752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (15752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332ACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } PGXP_LOAD(0x8E233D88u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800332ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D7B0: 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(0x800332B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D7B4: 00430018 mult $v0, $v1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[3]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00430018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800332B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D7B8: 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(0x800332B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D7BC: 00031A00 sll $v1, $v1, 8 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 8u; PGXP_ALU(0x00031A00u, cpu->gpr[3], _pgx1, 8u); } #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, 0x8u); #endif /* 0xBFC0D7C0: 24630084 addiu $v1, $v1, 132 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (132)); PGXP_ALU(0x24630084u, cpu->gpr[3], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0x800332C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8Cu); #endif /* 0xBFC0D7C4: 00E31021 addu $v0, $a3, $v1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[7] + cpu->gpr[3]; PGXP_ALU(0x00E31021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800332C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D7C8: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800332C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D7CC: AC623D68 sw $v0, 15720($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332CCu); return; } g_debug_last_store_pc = 0x800332CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D68u, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC0D7D0: 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(0x800332D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0D7D4: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800332D4u); #endif label_BFC0D7D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D7D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D7D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D7D8: 0C00CA85 jal 0xB0032A14 */ cpu->gpr[31] = 0x800332E0u; /* jal link before delay slot */ psx_delay_BFC0D7D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D7DC: 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(0x800332DCu); #endif if (psx_delay_BFC0D7D8) { psx_delay_BFC0D7D8 = 0; cpu->gpr[31] = 0x800332E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A14u); cpu->pc = 0x80032A14u; return; } label_BFC0D7E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D7E0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D7E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D7E0: 1465FFFD bne $v1, $a1, 0xBFC0D7D8 */ uint32_t psx_brA_BFC0D7E0 = cpu->gpr[3]; uint32_t psx_brB_BFC0D7E0 = cpu->gpr[5]; psx_taken_BFC0D7E0 = (psx_brA_BFC0D7E0 != psx_brB_BFC0D7E0); psx_delay_BFC0D7E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0D7E4: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800332E4u); #endif if (psx_delay_BFC0D7E0) { psx_delay_BFC0D7E0 = 0; if (psx_taken_BFC0D7E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800332D8u); goto label_BFC0D7D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800332E8u); } label_BFC0D7E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D7E8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D7E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D7E8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800332E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D7EC: AC403D64 sw $zero, 15716($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15716)); 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[0]); } PGXP_STORE(0xAC403D64u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800332ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800332F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D7F0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800332F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D7F4: AC403D5C sw $zero, 15708($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332F4u); return; } g_debug_last_store_pc = 0x800332F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D5Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x800332F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D7F8: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800332F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D7FC: AC403D50 sw $zero, 15696($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15696; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800332FCu); return; } g_debug_last_store_pc = 0x800332FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D50u, _pgxa, cpu->gpr[0]); } #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, 0x10u); #endif /* 0xBFC0D800: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D804: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D808: AC403D4C sw $zero, 15692($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033308u); return; } g_debug_last_store_pc = 0x80033308u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC403D4Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D80C: 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(0x8003330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D810: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D814: 24844E88 addiu $a0, $a0, 20104 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (20104)); PGXP_ALU(0x24844E88u, cpu->gpr[4], _pgx1, 0x00004E88u); } #ifdef PSX_COSIM cosim_instr(0x80033314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0D818: 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(0x80033318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D81C: 0C00C318 jal 0xB0030C60 */ cpu->gpr[31] = 0x80033324u; /* jal link before delay slot */ psx_delay_BFC0D81C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D820: A0403D54 sb $zero, 15700($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15700; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033320u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (15700)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0403D54u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033320u); #endif if (psx_delay_BFC0D81C) { psx_delay_BFC0D81C = 0; cpu->gpr[31] = 0x80033324u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80030C60u); cpu->pc = 0x80030C60u; return; } label_BFC0D824: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D824u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D824: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D828: 2403C000 addiu $v1, $zero, -16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-16384)); PGXP_ALU(0x2403C000u, cpu->gpr[3], _pgx1, 0xFFFFC000u); } #ifdef PSX_COSIM cosim_instr(0x80033328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D82C: A4431DAA sh $v1, 7594($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7594; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (7594)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003332Cu); return; } g_debug_last_store_pc = 0x8003332Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4431DAAu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003332Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D830: 0C00CAB0 jal 0xB0032AC0 */ cpu->gpr[31] = 0x80033338u; /* jal link before delay slot */ psx_delay_BFC0D830 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D834: 2404007D addiu $a0, $zero, 125 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (125)); PGXP_ALU(0x2404007Du, cpu->gpr[4], _pgx1, 0x0000007Du); } #ifdef PSX_COSIM cosim_instr(0x80033334u); #endif if (psx_delay_BFC0D830) { psx_delay_BFC0D830 = 0; cpu->gpr[31] = 0x80033338u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AC0u); cpu->pc = 0x80032AC0u; 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, 0x80033338u); #endif /* 0xBFC0D838: 8E223D88 lw $v0, 15752($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 15752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (15752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033338u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E223D88u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D83C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003333Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0D840: 02020018 mult $s0, $v0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[16] * (int64_t)(int32_t)cpu->gpr[2]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[16])); #endif PGXP_MULDIV(0x02020018u, cpu->hi, cpu->lo, cpu->gpr[16], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x80033340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D844: 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(0x80033344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D848: 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(0x80033348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D84C: 24420084 addiu $v0, $v0, 132 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (132)); PGXP_ALU(0x24420084u, cpu->gpr[2], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0x8003334Cu); #endif 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, 0x80033350u); #endif /* 0xBFC0D850: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033350u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80033350u); #endif /* 0xBFC0D854: 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, 0x80033354u); 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(0x80033354u); #endif /* 0xBFC0D858: 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, 0x80033358u); 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(0x80033358u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D85C: 03E00008 jr $ra */ psx_delay_BFC0D85C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D860: 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(0x80033360u); #endif if (psx_delay_BFC0D85C) { psx_delay_BFC0D85C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x80033364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0D864: 1520FFC5 bne $t1, $zero, 0xBFC0D77C */ uint32_t psx_brA_BFC0D864 = cpu->gpr[9]; uint32_t psx_brB_BFC0D864 = cpu->gpr[0]; psx_taken_BFC0D864 = (psx_brA_BFC0D864 != psx_brB_BFC0D864); psx_delay_BFC0D864 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0D868: 00500018 mult $v0, $s0 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[16]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00500018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[16]); #ifdef PSX_COSIM cosim_instr(0x80033368u); #endif if (psx_delay_BFC0D864) { psx_delay_BFC0D864 = 0; if (psx_taken_BFC0D864) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003327Cu); goto label_BFC0D77C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003336Cu); } label_BFC0D86C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D86Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D86Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003336Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0D86C: 24A5EFF0 addiu $a1, $a1, -4112 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-4112)); PGXP_ALU(0x24A5EFF0u, cpu->gpr[5], _pgx1, 0xFFFFEFF0u); } #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, 0x8u); #endif /* 0xBFC0D870: 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(0x80033370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D874: 00031A00 sll $v1, $v1, 8 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 8u; PGXP_ALU(0x00031A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80033374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D878: 24630084 addiu $v1, $v1, 132 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (132)); PGXP_ALU(0x24630084u, cpu->gpr[3], _pgx1, 0x00000084u); } #ifdef PSX_COSIM cosim_instr(0x80033378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D87C: 1000FFBD beq $zero, $zero, 0xBFC0D774 */ uint32_t psx_brA_BFC0D87C = cpu->gpr[0]; uint32_t psx_brB_BFC0D87C = cpu->gpr[0]; psx_taken_BFC0D87C = (psx_brA_BFC0D87C == psx_brB_BFC0D87C); psx_delay_BFC0D87C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x98u); #endif /* 0xBFC0D880: 00E32021 addu $a0, $a3, $v1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[7] + cpu->gpr[3]; PGXP_ALU(0x00E32021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033380u); #endif if (psx_delay_BFC0D87C) { psx_delay_BFC0D87C = 0; if (psx_taken_BFC0D87C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033274u); goto label_BFC0D774; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033384u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033384u); cpu->pc = 0x80033384u; return; /* fallthrough */ } void OpenBIOS_func_1FC0D884(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D884u); int psx_delay_BFC0D884 = 0; label_BFC0D884: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D884u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0D884: 0800CC66 j 0xB0033198 */ psx_delay_BFC0D884 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D888: 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(0x80033388u); #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, 0x80033198u); cpu->pc = 0x80033198u; return; } } void OpenBIOS_func_1FC0D88C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D88Cu); int psx_delay_BFC0D894 = 0; int psx_delay_BFC0D8A4 = 0; int psx_delay_BFC0D8AC = 0; int psx_taken_BFC0D8AC = 0; int psx_delay_BFC0D8BC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D89Cu: goto label_BFC0D89C; case 0xBFC0D8A4u: goto label_BFC0D8A4; case 0xBFC0D8ACu: goto label_BFC0D8AC; case 0xBFC0D8B4u: goto label_BFC0D8B4; default: break; } } label_BFC0D88C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D88Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D88Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D88C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x8003338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0D890: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033390u); return; } g_debug_last_store_pc = 0x80033390u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x80033390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D894: 0C00CA67 jal 0xB003299C */ cpu->gpr[31] = 0x8003339Cu; /* jal link before delay slot */ psx_delay_BFC0D894 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0D898: 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(0x80033398u); #endif if (psx_delay_BFC0D894) { psx_delay_BFC0D894 = 0; cpu->gpr[31] = 0x8003339Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003299Cu); cpu->pc = 0x8003299Cu; return; } label_BFC0D89C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D89Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D89Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003339Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D89C: 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(0x8003339Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0D8A0: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800333A0u); #endif label_BFC0D8A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D8A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D8A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D8A4: 0C00CA85 jal 0xB0032A14 */ cpu->gpr[31] = 0x800333ACu; /* jal link before delay slot */ psx_delay_BFC0D8A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D8A8: 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(0x800333A8u); #endif if (psx_delay_BFC0D8A4) { psx_delay_BFC0D8A4 = 0; cpu->gpr[31] = 0x800333ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A14u); cpu->pc = 0x80032A14u; return; } label_BFC0D8AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D8ACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D8ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D8AC: 1465FFFD bne $v1, $a1, 0xBFC0D8A4 */ uint32_t psx_brA_BFC0D8AC = cpu->gpr[3]; uint32_t psx_brB_BFC0D8AC = cpu->gpr[5]; psx_taken_BFC0D8AC = (psx_brA_BFC0D8AC != psx_brB_BFC0D8AC); psx_delay_BFC0D8AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0D8B0: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800333B0u); #endif if (psx_delay_BFC0D8AC) { psx_delay_BFC0D8AC = 0; if (psx_taken_BFC0D8AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800333A4u); goto label_BFC0D8A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800333B4u); } label_BFC0D8B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D8B4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D8B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333B4u); #endif /* 0xBFC0D8B4: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333B4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800333B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D8B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800333B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0D8BC: 03E00008 jr $ra */ psx_delay_BFC0D8BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D8C0: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x800333C0u); #endif if (psx_delay_BFC0D8BC) { psx_delay_BFC0D8BC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC0D8C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0D8C4u); int psx_delay_BFC0D910 = 0; int psx_taken_BFC0D910 = 0; int psx_delay_BFC0D918 = 0; int psx_delay_BFC0D920 = 0; int psx_taken_BFC0D920 = 0; int psx_delay_BFC0D928 = 0; int psx_taken_BFC0D928 = 0; int psx_delay_BFC0D948 = 0; int psx_taken_BFC0D948 = 0; int psx_delay_BFC0D99C = 0; int psx_taken_BFC0D99C = 0; int psx_delay_BFC0D9D0 = 0; int psx_taken_BFC0D9D0 = 0; int psx_delay_BFC0D9F0 = 0; int psx_taken_BFC0D9F0 = 0; int psx_delay_BFC0DA78 = 0; int psx_taken_BFC0DA78 = 0; int psx_delay_BFC0DA90 = 0; int psx_taken_BFC0DA90 = 0; int psx_delay_BFC0DAA0 = 0; int psx_taken_BFC0DAA0 = 0; int psx_delay_BFC0DAD8 = 0; int psx_delay_BFC0DAE0 = 0; int psx_taken_BFC0DAE0 = 0; int psx_delay_BFC0DB20 = 0; int psx_taken_BFC0DB20 = 0; int psx_delay_BFC0DB2C = 0; int psx_taken_BFC0DB2C = 0; int psx_delay_BFC0DB50 = 0; int psx_taken_BFC0DB50 = 0; int psx_delay_BFC0DB60 = 0; int psx_taken_BFC0DB60 = 0; int psx_delay_BFC0DB7C = 0; int psx_taken_BFC0DB7C = 0; int psx_delay_BFC0DB8C = 0; int psx_taken_BFC0DB8C = 0; int psx_delay_BFC0DB9C = 0; int psx_delay_BFC0DBC0 = 0; int psx_taken_BFC0DBC0 = 0; int psx_delay_BFC0DBE0 = 0; int psx_taken_BFC0DBE0 = 0; int psx_delay_BFC0DBEC = 0; int psx_taken_BFC0DBEC = 0; int psx_delay_BFC0DC2C = 0; int psx_taken_BFC0DC2C = 0; int psx_delay_BFC0DC3C = 0; int psx_taken_BFC0DC3C = 0; int psx_delay_BFC0DC50 = 0; int psx_taken_BFC0DC50 = 0; int psx_delay_BFC0DC58 = 0; int psx_delay_BFC0DCA0 = 0; int psx_taken_BFC0DCA0 = 0; int psx_delay_BFC0DCBC = 0; int psx_taken_BFC0DCBC = 0; int psx_delay_BFC0DCDC = 0; int psx_taken_BFC0DCDC = 0; int psx_delay_BFC0DCF8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0D918u: goto label_BFC0D918; case 0xBFC0DA78u: goto label_BFC0DA78; case 0xBFC0DAACu: goto label_BFC0DAAC; case 0xBFC0D920u: goto label_BFC0D920; case 0xBFC0D928u: goto label_BFC0D928; case 0xBFC0D930u: goto label_BFC0D930; case 0xBFC0D950u: goto label_BFC0D950; case 0xBFC0D990u: goto label_BFC0D990; case 0xBFC0D9A4u: goto label_BFC0D9A4; case 0xBFC0D9D8u: goto label_BFC0D9D8; case 0xBFC0D9F8u: goto label_BFC0D9F8; case 0xBFC0D9FCu: goto label_BFC0D9FC; case 0xBFC0DA18u: goto label_BFC0DA18; case 0xBFC0DA80u: goto label_BFC0DA80; case 0xBFC0DA98u: goto label_BFC0DA98; case 0xBFC0DAA8u: goto label_BFC0DAA8; case 0xBFC0DAE0u: goto label_BFC0DAE0; case 0xBFC0DAE8u: goto label_BFC0DAE8; case 0xBFC0DB28u: goto label_BFC0DB28; case 0xBFC0DB2Cu: goto label_BFC0DB2C; case 0xBFC0DB34u: goto label_BFC0DB34; case 0xBFC0DB58u: goto label_BFC0DB58; case 0xBFC0DB5Cu: goto label_BFC0DB5C; case 0xBFC0DB68u: goto label_BFC0DB68; case 0xBFC0DB84u: goto label_BFC0DB84; case 0xBFC0DB94u: goto label_BFC0DB94; case 0xBFC0DB9Cu: goto label_BFC0DB9C; case 0xBFC0DBA4u: goto label_BFC0DBA4; case 0xBFC0DBC0u: goto label_BFC0DBC0; case 0xBFC0DBC8u: goto label_BFC0DBC8; case 0xBFC0DBD8u: goto label_BFC0DBD8; case 0xBFC0DBE8u: goto label_BFC0DBE8; case 0xBFC0DBF4u: goto label_BFC0DBF4; case 0xBFC0DC34u: goto label_BFC0DC34; case 0xBFC0DC38u: goto label_BFC0DC38; case 0xBFC0DC44u: goto label_BFC0DC44; case 0xBFC0DC48u: goto label_BFC0DC48; case 0xBFC0DC58u: goto label_BFC0DC58; case 0xBFC0DC60u: goto label_BFC0DC60; case 0xBFC0DC90u: goto label_BFC0DC90; case 0xBFC0DCA8u: goto label_BFC0DCA8; case 0xBFC0DCACu: goto label_BFC0DCAC; case 0xBFC0DCC4u: goto label_BFC0DCC4; case 0xBFC0DCC8u: goto label_BFC0DCC8; case 0xBFC0DCD0u: goto label_BFC0DCD0; case 0xBFC0DCE4u: goto label_BFC0DCE4; default: break; } } label_BFC0D8C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D8C4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D8C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0D8C4: 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(0x800333C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D8C8: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800333C8u); #endif /* 0xBFC0D8CC: 8C623D70 lw $v0, 15728($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15728; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C623D70u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800333CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC0D8D0: 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, 0x800333D0u); return; } g_debug_last_store_pc = 0x800333D0u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x800333D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC0D8D4: 3C178004 lui $s7, 0x8004 */ cpu->gpr[23] = 0x80040000u; PGXP_ALU(0x3C178004u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800333D4u); #endif /* 0xBFC0D8D8: 8EE43D74 lw $a0, 15732($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 15732; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (15732)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333D8u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x800000u); } PGXP_LOAD(0x8EE43D74u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800333D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D8DC: 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(0x800333DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000000u); #endif /* 0xBFC0D8E0: 3C198004 lui $t9, 0x8004 */ cpu->gpr[25] = 0x80040000u; PGXP_ALU(0x3C198004u, cpu->gpr[25], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800333E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D8E4: AC623D70 sw $v0, 15728($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800333E4u); return; } g_debug_last_store_pc = 0x800333E4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D70u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800333E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC0D8E8: 0044102B sltu $v0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0044102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800333E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC0D8EC: 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, 0x800333ECu); return; } g_debug_last_store_pc = 0x800333ECu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800333ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800333F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC0D8F0: 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, 0x800333F0u); return; } g_debug_last_store_pc = 0x800333F0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x800333F0u); #endif /* 0xBFC0D8F4: 93313D54 lbu $s1, 15700($t9) */ { uint32_t _pgxa = cpu->gpr[25] + 15700; cpu->gpr[17] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (15700)), 17, 0x2000000u); PGXP_LOAD(0x93313D54u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800333F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC0D8F8: 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, 0x800333F8u); return; } g_debug_last_store_pc = 0x800333F8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x800333F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC0D8FC: 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, 0x800333FCu); return; } g_debug_last_store_pc = 0x800333FCu; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x800333FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC0D900: 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, 0x80033400u); return; } g_debug_last_store_pc = 0x80033400u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x80033400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC0D904: 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, 0x80033404u); return; } g_debug_last_store_pc = 0x80033404u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x80033404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC0D908: 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, 0x80033408u); return; } g_debug_last_store_pc = 0x80033408u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x80033408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC0D90C: 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, 0x8003340Cu); return; } g_debug_last_store_pc = 0x8003340Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x8003340Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D910: 10400005 beq $v0, $zero, 0xBFC0D928 */ uint32_t psx_brA_BFC0D910 = cpu->gpr[2]; uint32_t psx_brB_BFC0D910 = cpu->gpr[0]; psx_taken_BFC0D910 = (psx_brA_BFC0D910 == psx_brB_BFC0D910); psx_delay_BFC0D910 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC0D914: 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, 0x80033414u); return; } g_debug_last_store_pc = 0x80033414u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x80033414u); #endif if (psx_delay_BFC0D910) { psx_delay_BFC0D910 = 0; if (psx_taken_BFC0D910) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033428u); goto label_BFC0D928; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033418u); } label_BFC0D918: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D918u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0D918: 0C00CAC9 jal 0xB0032B24 */ cpu->gpr[31] = 0x80033420u; /* jal link before delay slot */ psx_delay_BFC0D918 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D91C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003341Cu); #endif if (psx_delay_BFC0D918) { psx_delay_BFC0D918 = 0; cpu->gpr[31] = 0x80033420u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032B24u); cpu->pc = 0x80032B24u; return; } 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, 0x80033420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D920: 10000062 beq $zero, $zero, 0xBFC0DAAC */ uint32_t psx_brA_BFC0D920 = cpu->gpr[0]; uint32_t psx_brB_BFC0D920 = cpu->gpr[0]; psx_taken_BFC0D920 = (psx_brA_BFC0D920 == psx_brB_BFC0D920); psx_delay_BFC0D920 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D924: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033424u); #endif if (psx_delay_BFC0D920) { psx_delay_BFC0D920 = 0; if (psx_taken_BFC0D920) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335ACu); goto label_BFC0DAAC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033428u); } label_BFC0D928: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D928u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC0D928: 162001C7 bne $s1, $zero, 0xBFC0E048 */ uint32_t psx_brA_BFC0D928 = cpu->gpr[17]; uint32_t psx_brB_BFC0D928 = cpu->gpr[0]; psx_taken_BFC0D928 = (psx_brA_BFC0D928 != psx_brB_BFC0D928); psx_delay_BFC0D928 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D92C: AC603D70 sw $zero, 15728($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15728; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15728)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003342Cu); return; } g_debug_last_store_pc = 0x8003342Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC603D70u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x8003342Cu); #endif if (psx_delay_BFC0D928) { psx_delay_BFC0D928 = 0; if (psx_taken_BFC0D928) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B48u); cpu->pc = 0x80033B48u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033430u); } 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, 0x80033430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC0D930: 3C148004 lui $s4, 0x8004 */ cpu->gpr[20] = 0x80040000u; PGXP_ALU(0x3C148004u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033430u); #endif /* 0xBFC0D934: 8E843D5C lw $a0, 15708($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 15708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033434u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x100000u); } PGXP_LOAD(0x8E843D5Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80033434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D938: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033438u); #endif /* 0xBFC0D93C: 8C563D88 lw $s6, 15752($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003343Cu); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x4u); } PGXP_LOAD(0x8C563D88u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x8003343Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000u); #endif /* 0xBFC0D940: 3C0F8004 lui $t7, 0x8004 */ cpu->gpr[15] = 0x80040000u; PGXP_ALU(0x3C0F8004u, cpu->gpr[15], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC0D944: 3C128004 lui $s2, 0x8004 */ cpu->gpr[18] = 0x80040000u; PGXP_ALU(0x3C128004u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D948: 10800011 beq $a0, $zero, 0xBFC0D990 */ uint32_t psx_brA_BFC0D948 = cpu->gpr[4]; uint32_t psx_brB_BFC0D948 = cpu->gpr[0]; psx_taken_BFC0D948 = (psx_brA_BFC0D948 == psx_brB_BFC0D948); psx_delay_BFC0D948 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC0D94C: 3C138004 lui $s3, 0x8004 */ cpu->gpr[19] = 0x80040000u; PGXP_ALU(0x3C138004u, cpu->gpr[19], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003344Cu); #endif if (psx_delay_BFC0D948) { psx_delay_BFC0D948 = 0; if (psx_taken_BFC0D948) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033490u); goto label_BFC0D990; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033450u); } 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, 0x80033450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D950: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D954: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033454u); #endif /* 0xBFC0D958: 8C423D58 lw $v0, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033458u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D58u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033458u); #endif /* 0xBFC0D95C: 8C633D84 lw $v1, 15748($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003345Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C633D84u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003345Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC0D960: ADE03D78 sw $zero, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033460u); return; } g_debug_last_store_pc = 0x80033460u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xADE03D78u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D964: 0043182B sltu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D968: 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(0x80033468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D96C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003346Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D970: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D974: AC623D80 sw $v0, 15744($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033474u); return; } g_debug_last_store_pc = 0x80033474u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D80u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033474u); #endif /* 0xBFC0D978: 8E635008 lw $v1, 20488($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 20488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (20488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033478u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E635008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D97C: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC0D980: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033480u); #endif /* 0xBFC0D984: 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(0x80033484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D988: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0D98C: AE423D7C sw $v0, 15740($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15740; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003348Cu); return; } g_debug_last_store_pc = 0x8003348Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE423D7Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003348Cu); #endif 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, 0x80033490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC0D990: 3C108004 lui $s0, 0x8004 */ cpu->gpr[16] = 0x80040000u; PGXP_ALU(0x3C108004u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033490u); #endif /* 0xBFC0D994: 8E023D64 lw $v0, 15716($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033494u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D64u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D998: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0D99C: 1040001E beq $v0, $zero, 0xBFC0DA18 */ uint32_t psx_brA_BFC0D99C = cpu->gpr[2]; uint32_t psx_brB_BFC0D99C = cpu->gpr[0]; psx_taken_BFC0D99C = (psx_brA_BFC0D99C == psx_brB_BFC0D99C); psx_delay_BFC0D99C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D9A0: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800334A0u); #endif if (psx_delay_BFC0D99C) { psx_delay_BFC0D99C = 0; if (psx_taken_BFC0D99C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033518u); goto label_BFC0DA18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800334A4u); } label_BFC0D9A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D9A4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D9A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334A4u); #endif /* 0xBFC0D9A4: 8C433D60 lw $v1, 15712($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15712; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C433D60u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800334A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D9A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800334A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0D9AC: 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(0x800334ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D9B0: 00051080 sll $v0, $a1, 2 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[5] << 2u; PGXP_ALU(0x00051080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x800334B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC0D9B4: 00451021 addu $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00451021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800334B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0D9B8: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x800334B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D9BC: 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(0x800334BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D9C0: 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(0x800334C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D9C4: 2C430040 sltiu $v1, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x800334C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0D9C8: 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(0x800334C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D9CC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800334CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0D9D0: 10800011 beq $a0, $zero, 0xBFC0DA18 */ uint32_t psx_brA_BFC0D9D0 = cpu->gpr[4]; uint32_t psx_brB_BFC0D9D0 = cpu->gpr[0]; psx_taken_BFC0D9D0 = (psx_brA_BFC0D9D0 == psx_brB_BFC0D9D0); psx_delay_BFC0D9D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8004u); #endif /* 0xBFC0D9D4: ADE23D78 sw $v0, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334D4u); return; } g_debug_last_store_pc = 0x800334D4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xADE23D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800334D4u); #endif if (psx_delay_BFC0D9D0) { psx_delay_BFC0D9D0 = 0; if (psx_taken_BFC0D9D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033518u); goto label_BFC0DA18; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800334D8u); } label_BFC0D9D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D9D8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D9D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0D9D8: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800334D8u); #endif /* 0xBFC0D9DC: 8C823D80 lw $v0, 15744($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334DCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C823D80u, _pgxa, cpu->gpr[2]); } #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, 0x8u); #endif /* 0xBFC0D9E0: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800334E0u); #endif /* 0xBFC0D9E4: 8C633D84 lw $v1, 15748($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C633D84u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800334E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0D9E8: 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(0x800334E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0D9EC: 0043182B sltu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC0D9F0: 1060003B beq $v1, $zero, 0xBFC0DAE0 */ uint32_t psx_brA_BFC0D9F0 = cpu->gpr[3]; uint32_t psx_brB_BFC0D9F0 = cpu->gpr[0]; psx_taken_BFC0D9F0 = (psx_brA_BFC0D9F0 == psx_brB_BFC0D9F0); psx_delay_BFC0D9F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0D9F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800334F4u); #endif if (psx_delay_BFC0D9F0) { psx_delay_BFC0D9F0 = 0; if (psx_taken_BFC0D9F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335E0u); goto label_BFC0DAE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800334F8u); } label_BFC0D9F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D9F8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D9F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0D9F8: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800334F8u); #endif label_BFC0D9FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0D9FCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0D9FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800334FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0D9FC: AC833D80 sw $v1, 15744($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800334FCu); return; } g_debug_last_store_pc = 0x800334FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC833D80u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800334FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033500u); #endif /* 0xBFC0DA00: 8E635008 lw $v1, 20488($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 20488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (20488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033500u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E635008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DA04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DA08: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033508u); #endif /* 0xBFC0DA0C: 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(0x8003350Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DA10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0DA14: AE423D7C sw $v0, 15740($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15740; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033514u); return; } g_debug_last_store_pc = 0x80033514u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE423D7Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033514u); #endif label_BFC0DA18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DA18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DA18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033518u); #endif /* 0xBFC0DA18: 8E423D7C lw $v0, 15740($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15740; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033518u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E423D7Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033518u); #endif /* 0xBFC0DA1C: 8DE33D78 lw $v1, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003351Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8000u); } PGXP_LOAD(0x8DE33D78u, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC0DA20: 00021180 sll $v0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 6u; PGXP_ALU(0x00021180u, cpu->gpr[2], _pgx1, 6u); } #ifdef PSX_COSIM cosim_instr(0x80033520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DA24: 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(0x80033524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400004u); #endif /* 0xBFC0DA28: 00560018 mult $v0, $s6 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[2] * (int64_t)(int32_t)cpu->gpr[22]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[2])); #endif PGXP_MULDIV(0x00560018u, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[22]); #ifdef PSX_COSIM cosim_instr(0x80033528u); #endif /* 0xBFC0DA2C: 8E6D5008 lw $t5, 20488($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 20488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (20488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003352Cu); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x80000u); } PGXP_LOAD(0x8E6D5008u, _pgxa, cpu->gpr[13]); } #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, 0x200000u); #endif /* 0xBFC0DA30: 3C158004 lui $s5, 0x8004 */ cpu->gpr[21] = 0x80040000u; PGXP_ALU(0x3C158004u, cpu->gpr[21], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0DA34: 3C078004 lui $a3, 0x8004 */ cpu->gpr[7] = 0x80040000u; PGXP_ALU(0x3C078004u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0DA38: 3C0E1F80 lui $t6, 0x1F80 */ cpu->gpr[14] = 0x1F800000u; PGXP_ALU(0x3C0E1F80u, cpu->gpr[14], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0DA3C: 3C118004 lui $s1, 0x8004 */ cpu->gpr[17] = 0x80040000u; PGXP_ALU(0x3C118004u, cpu->gpr[17], 0u, 0u); #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, 0x10001u); #endif /* 0xBFC0DA40: AE003D64 sw $zero, 15716($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033540u); return; } g_debug_last_store_pc = 0x80033540u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE003D64u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100001u); #endif /* 0xBFC0DA44: AE803D5C sw $zero, 15708($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033544u); return; } g_debug_last_store_pc = 0x80033544u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE803D5Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0DA48: 24E74E88 addiu $a3, $a3, 20104 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (20104)); PGXP_ALU(0x24E74E88u, cpu->gpr[7], _pgx1, 0x00004E88u); } #ifdef PSX_COSIM cosim_instr(0x80033548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0DA4C: 25CE1C00 addiu $t6, $t6, 7168 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (7168)); PGXP_ALU(0x25CE1C00u, cpu->gpr[14], _pgx1, 0x00001C00u); } #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, 0x201u); #endif /* 0xBFC0DA50: 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(0x80033550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0DA54: 2631500C addiu $s1, $s1, 20492 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[17] + (20492)); PGXP_ALU(0x2631500Cu, cpu->gpr[17], _pgx1, 0x0000500Cu); } #ifdef PSX_COSIM cosim_instr(0x80033554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DA58: 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(0x80033558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DA5C: 24420021 addiu $v0, $v0, 33 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (33)); PGXP_ALU(0x24420021u, cpu->gpr[2], _pgx1, 0x00000021u); } #ifdef PSX_COSIM cosim_instr(0x8003355Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DA60: 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(0x80033560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2004u); #endif /* 0xBFC0DA64: 01A26821 addu $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(0x01A26821u, cpu->gpr[13], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DA68: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2004u); #endif /* 0xBFC0DA6C: AC4D3D68 sw $t5, 15720($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15720; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15720)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003356Cu); return; } g_debug_last_store_pc = 0x8003356Cu; cpu->write_word(psx_addr, cpu->gpr[13]); } PGXP_STORE(0xAC4D3D68u, _pgxa, cpu->gpr[13]); } #ifdef PSX_COSIM cosim_instr(0x8003356Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC0DA70: 26A23768 addiu $v0, $s5, 14184 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] + (14184)); PGXP_ALU(0x26A23768u, cpu->gpr[2], _pgx1, 0x00003768u); } #ifdef PSX_COSIM cosim_instr(0x80033570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000004u); #endif /* 0xBFC0DA74: 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, 0x80033574u); return; } g_debug_last_store_pc = 0x80033574u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAFA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033574u); #endif label_BFC0DA78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DA78u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DA78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400200u); #endif /* 0xBFC0DA78: 16C9001B bne $s6, $t1, 0xBFC0DAE8 */ uint32_t psx_brA_BFC0DA78 = cpu->gpr[22]; uint32_t psx_brB_BFC0DA78 = cpu->gpr[9]; psx_taken_BFC0DA78 = (psx_brA_BFC0DA78 != psx_brB_BFC0DA78); psx_delay_BFC0DA78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DA7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003357Cu); #endif if (psx_delay_BFC0DA78) { psx_delay_BFC0DA78 = 0; if (psx_taken_BFC0DA78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335E8u); goto label_BFC0DAE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033580u); } 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, 0x80033580u); #endif /* 0xBFC0DA80: 8DE23D78 lw $v0, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033580u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8000u); } PGXP_LOAD(0x8DE23D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033580u); #endif /* 0xBFC0DA84: 93313D54 lbu $s1, 15700($t9) */ { uint32_t _pgxa = cpu->gpr[25] + 15700; cpu->gpr[17] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[25] + (15700)), 17, 0x2000000u); PGXP_LOAD(0x93313D54u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x80033584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DA88: 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(0x80033588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DA8C: 2C430040 sltiu $v1, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C430040u, cpu->gpr[3], _pgx1, 0x0040u); } #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, 0x9u); #endif /* 0xBFC0DA90: 1060015C beq $v1, $zero, 0xBFC0E004 */ uint32_t psx_brA_BFC0DA90 = cpu->gpr[3]; uint32_t psx_brB_BFC0DA90 = cpu->gpr[0]; psx_taken_BFC0DA90 = (psx_brA_BFC0DA90 == psx_brB_BFC0DA90); psx_delay_BFC0DA90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0DA94: 3C048004 lui $a0, 0x8004 */ cpu->gpr[4] = 0x80040000u; PGXP_ALU(0x3C048004u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033594u); #endif if (psx_delay_BFC0DA90) { psx_delay_BFC0DA90 = 0; if (psx_taken_BFC0DA90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B04u); cpu->pc = 0x80033B04u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033598u); } label_BFC0DA98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DA98u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DA98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033598u); #endif /* 0xBFC0DA98: 8E033D64 lw $v1, 15716($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033598u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E033D64u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DA9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003359Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DAA0: 14600158 bne $v1, $zero, 0xBFC0E004 */ uint32_t psx_brA_BFC0DAA0 = cpu->gpr[3]; uint32_t psx_brB_BFC0DAA0 = cpu->gpr[0]; psx_taken_BFC0DAA0 = (psx_brA_BFC0DAA0 != psx_brB_BFC0DAA0); psx_delay_BFC0DAA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DAA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800335A4u); #endif if (psx_delay_BFC0DAA0) { psx_delay_BFC0DAA0 = 0; if (psx_taken_BFC0DAA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B04u); cpu->pc = 0x80033B04u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335A8u); } label_BFC0DAA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DAA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DAA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8004u); #endif /* 0xBFC0DAA8: ADE23D78 sw $v0, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800335A8u); return; } g_debug_last_store_pc = 0x800335A8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xADE23D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800335A8u); #endif label_BFC0DAAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DAACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DAACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335ACu); #endif /* 0xBFC0DAAC: 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, 0x800335ACu); 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(0x800335ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335B0u); #endif /* 0xBFC0DAB0: 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, 0x800335B0u); 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(0x800335B0u); #endif /* 0xBFC0DAB4: 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, 0x800335B4u); 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(0x800335B4u); #endif /* 0xBFC0DAB8: 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, 0x800335B8u); 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(0x800335B8u); #endif /* 0xBFC0DABC: 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, 0x800335BCu); 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(0x800335BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335C0u); #endif /* 0xBFC0DAC0: 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, 0x800335C0u); 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(0x800335C0u); #endif /* 0xBFC0DAC4: 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, 0x800335C4u); 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(0x800335C4u); #endif /* 0xBFC0DAC8: 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, 0x800335C8u); 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(0x800335C8u); #endif /* 0xBFC0DACC: 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, 0x800335CCu); 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(0x800335CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2020000u); #endif /* 0xBFC0DAD0: A3313D54 sb $s1, 15700($t9) */ { uint32_t _pgxa = cpu->gpr[25] + 15700; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800335D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (15700)), (uint8_t)(cpu->gpr[17] & 0xFFu)); PGXP_STORE(0xA3313D54u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x800335D0u); #endif /* 0xBFC0DAD4: 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, 0x800335D4u); 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(0x800335D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC0DAD8: 03E00008 jr $ra */ psx_delay_BFC0DAD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC0DADC: 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(0x800335DCu); #endif if (psx_delay_BFC0DAD8) { psx_delay_BFC0DAD8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_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, 0x800335E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DAE0: 1000FFC6 beq $zero, $zero, 0xBFC0D9FC */ uint32_t psx_brA_BFC0DAE0 = cpu->gpr[0]; uint32_t psx_brB_BFC0DAE0 = cpu->gpr[0]; psx_taken_BFC0DAE0 = (psx_brA_BFC0DAE0 == psx_brB_BFC0DAE0); psx_delay_BFC0DAE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DAE4: 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(0x800335E4u); #endif if (psx_delay_BFC0DAE0) { psx_delay_BFC0DAE0 = 0; if (psx_taken_BFC0DAE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800334FCu); goto label_BFC0D9FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335E8u); } label_BFC0DAE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DAE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DAE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335E8u); #endif /* 0xBFC0DAE8: 91AC0000 lbu $t4, 0($t5) */ { uint32_t _pgxa = cpu->gpr[13]; cpu->gpr[12] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (0)), 12, 0x2000u); PGXP_LOAD(0x91AC0000u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x800335E8u); #endif /* 0xBFC0DAEC: 91AB0002 lbu $t3, 2($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 2; cpu->gpr[11] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (2)), 11, 0x2000u); PGXP_LOAD(0x91AB0002u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x800335ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800335F0u); #endif /* 0xBFC0DAF0: 91A40001 lbu $a0, 1($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 1; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (1)), 4, 0x2000u); PGXP_LOAD(0x91A40001u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800335F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1008u); #endif /* 0xBFC0DAF4: 318300F0 andi $v1, $t4, 0xF0 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[3] = cpu->gpr[12] & 0xF0u; PGXP_ALU(0x318300F0u, cpu->gpr[3], _pgx1, 0x00F0u); } #ifdef PSX_COSIM cosim_instr(0x800335F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0DAF8: 000C6200 sll $t4, $t4, 8 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] << 8u; PGXP_ALU(0x000C6200u, cpu->gpr[12], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x800335F8u); #endif /* 0xBFC0DAFC: 91A80003 lbu $t0, 3($t5) */ { uint32_t _pgxa = cpu->gpr[13] + 3; cpu->gpr[8] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[13] + (3)), 8, 0x2000u); PGXP_LOAD(0x91A80003u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800335FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC0DB00: 000B1102 srl $v0, $t3, 4 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[2] = cpu->gpr[11] >> 4u; PGXP_ALU(0x000B1102u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x80033600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000u); #endif /* 0xBFC0DB04: 318C0F00 andi $t4, $t4, 0xF00 */ { uint32_t _pgx1 = cpu->gpr[12]; cpu->gpr[12] = cpu->gpr[12] & 0xF00u; PGXP_ALU(0x318C0F00u, cpu->gpr[12], _pgx1, 0x0F00u); } #ifdef PSX_COSIM cosim_instr(0x80033604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DB08: 00621825 or $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(0x00621825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1010u); #endif /* 0xBFC0DB0C: 01846025 or $t4, $t4, $a0 */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[12] = cpu->gpr[12] | cpu->gpr[4]; PGXP_ALU(0x01846025u, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003360Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0DB10: 316B000F andi $t3, $t3, 0xF */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFu; PGXP_ALU(0x316B000Fu, cpu->gpr[11], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x80033610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0DB14: 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(0x80033614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000009u); #endif /* 0xBFC0DB18: 0060C025 or $t8, $v1, $zero */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[24] = cpu->gpr[3] | cpu->gpr[0]; PGXP_ALU(0x0060C025u, cpu->gpr[24], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC0DB1C: 310A000F andi $t2, $t0, 0xF */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[10] = cpu->gpr[8] & 0xFu; PGXP_ALU(0x310A000Fu, cpu->gpr[10], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x8003361Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x810u); #endif /* 0xBFC0DB20: 11640002 beq $t3, $a0, 0xBFC0DB2C */ uint32_t psx_brA_BFC0DB20 = cpu->gpr[11]; uint32_t psx_brB_BFC0DB20 = cpu->gpr[4]; psx_taken_BFC0DB20 = (psx_brA_BFC0DB20 == psx_brB_BFC0DB20); psx_delay_BFC0DB20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200100u); #endif /* 0xBFC0DB24: 0008A902 srl $s5, $t0, 4 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[21] = cpu->gpr[8] >> 4u; PGXP_ALU(0x0008A902u, cpu->gpr[21], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x80033624u); #endif if (psx_delay_BFC0DB20) { psx_delay_BFC0DB20 = 0; if (psx_taken_BFC0DB20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003362Cu); goto label_BFC0DB2C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033628u); } label_BFC0DB28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0DB28: A4E0000E sh $zero, 14($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033628u); return; } g_debug_last_store_pc = 0x80033628u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4E0000Eu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033628u); #endif label_BFC0DB2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB2Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003362Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DB2C: 10600024 beq $v1, $zero, 0xBFC0DBC0 */ uint32_t psx_brA_BFC0DB2C = cpu->gpr[3]; uint32_t psx_brB_BFC0DB2C = cpu->gpr[0]; psx_taken_BFC0DB2C = (psx_brA_BFC0DB2C == psx_brB_BFC0DB2C); psx_delay_BFC0DB2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DB30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033630u); #endif if (psx_delay_BFC0DB2C) { psx_delay_BFC0DB2C = 0; if (psx_taken_BFC0DB2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336C0u); goto label_BFC0DBC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033634u); } label_BFC0DB34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000008u); #endif /* 0xBFC0DB34: 2478FFFF addiu $t8, $v1, -1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[24] = (uint32_t)((int32_t)cpu->gpr[3] + (-1)); PGXP_ALU(0x2478FFFFu, cpu->gpr[24], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x80033634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41000000u); #endif /* 0xBFC0DB38: 0018F080 sll $fp, $t8, 2 */ { uint32_t _pgx1 = cpu->gpr[24]; cpu->gpr[30] = cpu->gpr[24] << 2u; PGXP_ALU(0x0018F080u, cpu->gpr[30], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80033638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40020008u); #endif /* 0xBFC0DB3C: 023E1821 addu $v1, $s1, $fp */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[3] = cpu->gpr[17] + cpu->gpr[30]; PGXP_ALU(0x023E1821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003363Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033640u); #endif /* 0xBFC0DB40: 90660003 lbu $a2, 3($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 3; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (3)), 6, 0x8u); PGXP_LOAD(0x90660003u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80033640u); #endif /* 0xBFC0DB44: 90630003 lbu $v1, 3($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 3; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (3)), 3, 0x8u); PGXP_LOAD(0x90630003u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DB48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DB4C: 28630040 slti $v1, $v1, 64 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] < (64) ? 1 : 0); PGXP_ALU(0x28630040u, cpu->gpr[3], _pgx1, 0x0040u); } #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, 0x9u); #endif /* 0xBFC0DB50: 14600002 bne $v1, $zero, 0xBFC0DB5C */ uint32_t psx_brA_BFC0DB50 = cpu->gpr[3]; uint32_t psx_brB_BFC0DB50 = cpu->gpr[0]; psx_taken_BFC0DB50 = (psx_brA_BFC0DB50 != psx_brB_BFC0DB50); psx_delay_BFC0DB50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000080u); #endif /* 0xBFC0DB54: A0F80008 sb $t8, 8($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 8; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033654u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (8)), (uint8_t)(cpu->gpr[24] & 0xFFu)); PGXP_STORE(0xA0F80008u, _pgxa, cpu->gpr[24]); } #ifdef PSX_COSIM cosim_instr(0x80033654u); #endif if (psx_delay_BFC0DB50) { psx_delay_BFC0DB50 = 0; if (psx_taken_BFC0DB50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003365Cu); goto label_BFC0DB5C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033658u); } label_BFC0DB58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DB58: 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(0x80033658u); #endif label_BFC0DB5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB5Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003365Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DB5C: 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(0x8003365Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0DB60: 11630010 beq $t3, $v1, 0xBFC0DBA4 */ uint32_t psx_brA_BFC0DB60 = cpu->gpr[11]; uint32_t psx_brB_BFC0DB60 = cpu->gpr[3]; psx_taken_BFC0DB60 = (psx_brA_BFC0DB60 == psx_brB_BFC0DB60); psx_delay_BFC0DB60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0DB64: A0E60007 sb $a2, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033664u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0E60007u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80033664u); #endif if (psx_delay_BFC0DB60) { psx_delay_BFC0DB60 = 0; if (psx_taken_BFC0DB60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336A4u); goto label_BFC0DBA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033668u); } label_BFC0DB68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DB68: 00063200 sll $a2, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 8u; PGXP_ALU(0x00063200u, cpu->gpr[6], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x80033668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DB6C: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003366Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DB70: 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(0x80033670u); #endif /* 0xBFC0DB74: 8C633D48 lw $v1, 15688($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15688; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15688)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033674u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C633D48u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DB78: 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(0x80033678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DB7C: 10600007 beq $v1, $zero, 0xBFC0DB9C */ uint32_t psx_brA_BFC0DB7C = cpu->gpr[3]; uint32_t psx_brB_BFC0DB7C = cpu->gpr[0]; psx_taken_BFC0DB7C = (psx_brA_BFC0DB7C == psx_brB_BFC0DB7C); psx_delay_BFC0DB7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0DB80: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033680u); #endif if (psx_delay_BFC0DB7C) { psx_delay_BFC0DB7C = 0; if (psx_taken_BFC0DB7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003369Cu); goto label_BFC0DB9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033684u); } label_BFC0DB84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210u); #endif /* 0xBFC0DB84: 31240001 andi $a0, $t1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[4] = cpu->gpr[9] & 0x1u; PGXP_ALU(0x31240001u, cpu->gpr[4], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80033684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0DB88: 00091842 srl $v1, $t1, 1 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] >> 1u; PGXP_ALU(0x00091842u, cpu->gpr[3], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x80033688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0DB8C: 14830003 bne $a0, $v1, 0xBFC0DB9C */ uint32_t psx_brA_BFC0DB8C = cpu->gpr[4]; uint32_t psx_brB_BFC0DB8C = cpu->gpr[3]; psx_taken_BFC0DB8C = (psx_brA_BFC0DB8C != psx_brB_BFC0DB8C); psx_delay_BFC0DB8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0DB90: 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(0x80033690u); #endif if (psx_delay_BFC0DB8C) { psx_delay_BFC0DB8C = 0; if (psx_taken_BFC0DB8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003369Cu); goto label_BFC0DB9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033694u); } label_BFC0DB94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB94u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0DB94: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DB98: 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(0x80033698u); #endif label_BFC0DB9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DB9Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DB9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003369Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0DB9C: 0C00CA94 jal 0xB0032A50 */ cpu->gpr[31] = 0x800336A4u; /* jal link before delay slot */ psx_delay_BFC0DB9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x211u); #endif /* 0xBFC0DBA0: 01202025 or $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(0x01202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800336A0u); #endif if (psx_delay_BFC0DB9C) { psx_delay_BFC0DB9C = 0; cpu->gpr[31] = 0x800336A4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A50u); cpu->pc = 0x80032A50u; return; } label_BFC0DBA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DBA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DBA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336A4u); #endif /* 0xBFC0DBA4: 94E4000E lhu $a0, 14($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 14; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800336A4u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x80u); } PGXP_LOAD(0x94E4000Eu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x800336A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40020000u); #endif /* 0xBFC0DBA8: 023EF021 addu $fp, $s1, $fp */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[30]; cpu->gpr[30] = cpu->gpr[17] + cpu->gpr[30]; PGXP_ALU(0x023EF021u, cpu->gpr[30], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800336A8u); #endif /* 0xBFC0DBAC: 97C30000 lhu $v1, 0($fp) */ { uint32_t _pgxa = cpu->gpr[30]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800336ACu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x40000000u); } PGXP_LOAD(0x97C30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800336ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0DBB0: 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(0x800336B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0DBB4: 00831804 sllv $v1, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[3] << (cpu->gpr[4] & 0x1Fu); PGXP_ALU(0x00831804u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800336B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DBB8: 000318C2 srl $v1, $v1, 3 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 3u; PGXP_ALU(0x000318C2u, cpu->gpr[3], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x800336B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4008u); #endif /* 0xBFC0DBBC: A5C30006 sh $v1, 6($t6) */ { uint32_t _pgxa = cpu->gpr[14] + 6; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[14] + (6)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800336BCu); return; } g_debug_last_store_pc = 0x800336BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA5C30006u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800336BCu); #endif 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, 0x800336C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC0DBC0: 11800043 beq $t4, $zero, 0xBFC0DCD0 */ uint32_t psx_brA_BFC0DBC0 = cpu->gpr[12]; uint32_t psx_brB_BFC0DBC0 = cpu->gpr[0]; psx_taken_BFC0DBC0 = (psx_brA_BFC0DBC0 == psx_brB_BFC0DBC0); psx_delay_BFC0DBC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DBC4: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800336C4u); #endif if (psx_delay_BFC0DBC0) { psx_delay_BFC0DBC0 = 0; if (psx_taken_BFC0DBC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337D0u); goto label_BFC0DCD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336C8u); } label_BFC0DBC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DBC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DBC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DBC8: 246337D4 addiu $v1, $v1, 14292 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14292)); PGXP_ALU(0x246337D4u, cpu->gpr[3], _pgx1, 0x000037D4u); } #ifdef PSX_COSIM cosim_instr(0x800336C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0DBCC: 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(0x800336CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC0DBD0: 00602025 or $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(0x00602025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800336D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DBD4: 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(0x800336D4u); #endif label_BFC0DBD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DBD8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DBD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336D8u); #endif /* 0xBFC0DBD8: 947E0044 lhu $fp, 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, 0x800336D8u); return; } cpu->gpr[30] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 30, 0x8u); } PGXP_LOAD(0x947E0044u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x800336D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DBDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800336DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001000u); #endif /* 0xBFC0DBE0: 119E0004 beq $t4, $fp, 0xBFC0DBF4 */ uint32_t psx_brA_BFC0DBE0 = cpu->gpr[12]; uint32_t psx_brB_BFC0DBE0 = cpu->gpr[30]; psx_taken_BFC0DBE0 = (psx_brA_BFC0DBE0 == psx_brB_BFC0DBE0); psx_delay_BFC0DBE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DBE4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800336E4u); #endif if (psx_delay_BFC0DBE0) { psx_delay_BFC0DBE0 = 0; if (psx_taken_BFC0DBE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336F4u); goto label_BFC0DBF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336E8u); } label_BFC0DBE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DBE8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DBE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0DBE8: 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(0x800336E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC0DBEC: 14A6FFFA bne $a1, $a2, 0xBFC0DBD8 */ uint32_t psx_brA_BFC0DBEC = cpu->gpr[5]; uint32_t psx_brB_BFC0DBEC = cpu->gpr[6]; psx_taken_BFC0DBEC = (psx_brA_BFC0DBEC != psx_brB_BFC0DBEC); psx_delay_BFC0DBEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DBF0: 2463FFFE addiu $v1, $v1, -2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-2)); PGXP_ALU(0x2463FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0x800336F0u); #endif if (psx_delay_BFC0DBEC) { psx_delay_BFC0DBEC = 0; if (psx_taken_BFC0DBEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336D8u); goto label_BFC0DBD8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800336F4u); } label_BFC0DBF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DBF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DBF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800336F4u); #endif /* 0xBFC0DBF4: 90E30008 lbu $v1, 8($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 8; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (8)), 3, 0x80u); PGXP_LOAD(0x90E30008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800336F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DBF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800336F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DBFC: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x800336FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC0DC00: 02231821 addu $v1, $s1, $v1 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[17] + cpu->gpr[3]; PGXP_ALU(0x02231821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033700u); #endif /* 0xBFC0DC04: 90660002 lbu $a2, 2($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 2; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (2)), 6, 0x8u); PGXP_LOAD(0x90660002u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80033704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC0DC0C: 000618C0 sll $v1, $a2, 3 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] << 3u; PGXP_ALU(0x000618C0u, cpu->gpr[3], _pgx1, 3u); } #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, 0x48u); #endif /* 0xBFC0DC10: 00661821 addu $v1, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00661821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC14: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x80033714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0DC18: 00651821 addu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00651821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033718u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0DC1C: A4E30000 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003371Cu); return; } g_debug_last_store_pc = 0x8003371Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4E30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003371Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033720u); #endif /* 0xBFC0DC20: 90E3000D lbu $v1, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (13)), 3, 0x80u); PGXP_LOAD(0x90E3000Du, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC24: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0DC28: 3065000C andi $a1, $v1, 0xC */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = cpu->gpr[3] & 0xCu; PGXP_ALU(0x3065000Cu, cpu->gpr[5], _pgx1, 0x000Cu); } #ifdef PSX_COSIM cosim_instr(0x80033728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0DC2C: 14A00002 bne $a1, $zero, 0xBFC0DC38 */ uint32_t psx_brA_BFC0DC2C = cpu->gpr[5]; uint32_t psx_brB_BFC0DC2C = cpu->gpr[0]; psx_taken_BFC0DC2C = (psx_brA_BFC0DC2C != psx_brB_BFC0DC2C); psx_delay_BFC0DC2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033730u); #endif if (psx_delay_BFC0DC2C) { psx_delay_BFC0DC2C = 0; if (psx_taken_BFC0DC2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033738u); goto label_BFC0DC38; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033734u); } label_BFC0DC34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0DC34: A0E00009 sb $zero, 9($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 9; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033734u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (9)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0E00009u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033734u); #endif label_BFC0DC38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC38: 2C630040 sltiu $v1, $v1, 64 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C630040u, cpu->gpr[3], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80033738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DC3C: 10600002 beq $v1, $zero, 0xBFC0DC48 */ uint32_t psx_brA_BFC0DC3C = cpu->gpr[3]; uint32_t psx_brB_BFC0DC3C = cpu->gpr[0]; psx_taken_BFC0DC3C = (psx_brA_BFC0DC3C == psx_brB_BFC0DC3C); psx_delay_BFC0DC3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC40: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033740u); #endif if (psx_delay_BFC0DC3C) { psx_delay_BFC0DC3C = 0; if (psx_taken_BFC0DC3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033748u); goto label_BFC0DC48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033744u); } label_BFC0DC44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC0DC44: A0E0000A sb $zero, 10($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 10; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033744u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (10)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0E0000Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033744u); #endif label_BFC0DC48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0DC48: 2563FFFD addiu $v1, $t3, -3 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[11] + (-3)); PGXP_ALU(0x2563FFFDu, cpu->gpr[3], _pgx1, 0xFFFFFFFDu); } #ifdef PSX_COSIM cosim_instr(0x80033748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC4C: 306300FD andi $v1, $v1, 0xFD */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFDu; PGXP_ALU(0x306300FDu, cpu->gpr[3], _pgx1, 0x00FDu); } #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, 0x9u); #endif /* 0xBFC0DC50: 1060000F beq $v1, $zero, 0xBFC0DC90 */ uint32_t psx_brA_BFC0DC50 = cpu->gpr[3]; uint32_t psx_brB_BFC0DC50 = cpu->gpr[0]; psx_taken_BFC0DC50 = (psx_brA_BFC0DC50 == psx_brB_BFC0DC50); psx_delay_BFC0DC50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033754u); #endif if (psx_delay_BFC0DC50) { psx_delay_BFC0DC50 = 0; if (psx_taken_BFC0DC50) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033790u); goto label_BFC0DC90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033758u); } label_BFC0DC58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC58u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0DC58: 0C00CAA4 jal 0xB0032A90 */ cpu->gpr[31] = 0x80033760u; /* jal link before delay slot */ psx_delay_BFC0DC58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC0DC5C: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x8003375Cu); #endif if (psx_delay_BFC0DC58) { psx_delay_BFC0DC58 = 0; cpu->gpr[31] = 0x80033760u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A90u); cpu->pc = 0x80032A90u; return; } label_BFC0DC60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DC60: 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(0x80033760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0DC64: 01231804 sllv $v1, $v1, $t1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[3] << (cpu->gpr[9] & 0x1Fu); PGXP_ALU(0x01231804u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0DC68: A4A31D88 sh $v1, 7560($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 7560; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (7560)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033768u); return; } g_debug_last_store_pc = 0x80033768u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A31D88u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC6C: 00031C02 srl $v1, $v1, 16 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] >> 16u; PGXP_ALU(0x00031C02u, cpu->gpr[3], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x8003376Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC0DC70: A4A31D8A sh $v1, 7562($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 7562; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (7562)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033770u); return; } g_debug_last_store_pc = 0x80033770u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A31D8Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033770u); #endif /* 0xBFC0DC74: 94E30000 lhu $v1, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033774u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x94E30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC7C: 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(0x8003377Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0DC80: 00832021 addu $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00832021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033780u); #endif /* 0xBFC0DC84: 94830000 lhu $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, 0x80033784u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x94830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DC88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC0DC8C: A4E30002 sh $v1, 2($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x8003378Cu); return; } g_debug_last_store_pc = 0x8003378Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4E30002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x8003378Cu); #endif label_BFC0DC90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DC90u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DC90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033790u); #endif /* 0xBFC0DC90: 84E40002 lh $a0, 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, 0x80033790u); return; } cpu->gpr[4] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x80u); } PGXP_LOAD(0x84E40002u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x80033790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC94: 3C03006C lui $v1, 0x6C */ cpu->gpr[3] = 0x006C0000u; PGXP_ALU(0x3C03006Cu, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033794u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC0DC98: 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(0x80033798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DC9C: 24633E1D addiu $v1, $v1, 15901 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15901)); PGXP_ALU(0x24633E1Du, cpu->gpr[3], _pgx1, 0x00003E1Du); } #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, 0x11u); #endif /* 0xBFC0DCA0: 14800002 bne $a0, $zero, 0xBFC0DCAC */ uint32_t psx_brA_BFC0DCA0 = cpu->gpr[4]; uint32_t psx_brB_BFC0DCA0 = cpu->gpr[0]; psx_taken_BFC0DCA0 = (psx_brA_BFC0DCA0 != psx_brB_BFC0DCA0); psx_delay_BFC0DCA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0DCA4: 0064001A div $v1, $a0 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0064001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x800337A4u); #endif if (psx_delay_BFC0DCA0) { psx_delay_BFC0DCA0 = 0; if (psx_taken_BFC0DCA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337ACu); goto label_BFC0DCAC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337A8u); } label_BFC0DCA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0DCA8: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800337A8u); return; #ifdef PSX_COSIM cosim_instr(0x800337A8u); #endif label_BFC0DCAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0DCAC: 3404AC44 ori $a0, $zero, 0xAC44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = cpu->gpr[0] | 0xAC44u; PGXP_ALU(0x3404AC44u, cpu->gpr[4], _pgx1, 0xAC44u); } #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, 0x8u); #endif /* 0xBFC0DCB0: 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(0x800337B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DCB4: 00031B00 sll $v1, $v1, 12 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 12u; PGXP_ALU(0x00031B00u, cpu->gpr[3], _pgx1, 12u); } #ifdef PSX_COSIM cosim_instr(0x800337B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DCB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800337B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC0DCBC: 14800002 bne $a0, $zero, 0xBFC0DCC8 */ uint32_t psx_brA_BFC0DCBC = cpu->gpr[4]; uint32_t psx_brB_BFC0DCBC = cpu->gpr[0]; psx_taken_BFC0DCBC = (psx_brA_BFC0DCBC != psx_brB_BFC0DCBC); psx_delay_BFC0DCBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0DCC0: 0064001A div $v1, $a0 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0064001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[4]); #ifdef PSX_COSIM cosim_instr(0x800337C0u); #endif if (psx_delay_BFC0DCBC) { psx_delay_BFC0DCBC = 0; if (psx_taken_BFC0DCBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337C8u); goto label_BFC0DCC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337C4u); } label_BFC0DCC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0DCC4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800337C4u); return; #ifdef PSX_COSIM cosim_instr(0x800337C4u); #endif label_BFC0DCC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DCC8: 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(0x800337C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4004u); #endif /* 0xBFC0DCCC: A5C20004 sh $v0, 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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800337CCu); return; } g_debug_last_store_pc = 0x800337CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA5C20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800337CCu); #endif label_BFC0DCD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0DCD0: 256BFFFD addiu $t3, $t3, -3 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-3)); PGXP_ALU(0x256BFFFDu, cpu->gpr[11], _pgx1, 0xFFFFFFFDu); } #ifdef PSX_COSIM cosim_instr(0x800337D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0DCD4: 316B00FF andi $t3, $t3, 0xFF */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[11] & 0xFFu; PGXP_ALU(0x316B00FFu, cpu->gpr[11], _pgx1, 0x00FFu); } #ifdef PSX_COSIM cosim_instr(0x800337D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC0DCD8: 2D63000D sltiu $v1, $t3, 13 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)(cpu->gpr[11] < 0x0000000Du ? 1 : 0); PGXP_ALU(0x2D63000Du, cpu->gpr[3], _pgx1, 0x000Du); } #ifdef PSX_COSIM cosim_instr(0x800337D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DCDC: 10600015 beq $v1, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DCDC = cpu->gpr[3]; uint32_t psx_brB_BFC0DCDC = cpu->gpr[0]; psx_taken_BFC0DCDC = (psx_brA_BFC0DCDC == psx_brB_BFC0DCDC); psx_delay_BFC0DCDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC0DCE0: 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(0x800337E0u); #endif if (psx_delay_BFC0DCDC) { psx_delay_BFC0DCDC = 0; if (psx_taken_BFC0DCDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800337E4u); } label_BFC0DCE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DCE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DCE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337E4u); #endif /* 0xBFC0DCE4: 8FA20010 lw $v0, 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, 0x800337E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000000u); } PGXP_LOAD(0x8FA20010u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800337E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DCE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800337E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC0DCEC: 004B5821 addu $t3, $v0, $t3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[2] + cpu->gpr[11]; PGXP_ALU(0x004B5821u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800337ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800337F0u); #endif /* 0xBFC0DCF0: 8D630000 lw $v1, 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, 0x800337F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800u); } PGXP_LOAD(0x8D630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x800337F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DCF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800337F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DCF8: 00600008 jr $v1 */ psx_delay_BFC0DCF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DCFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800337FCu); #endif if (psx_delay_BFC0DCF8) { psx_delay_BFC0DCF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[3]); cpu->pc = cpu->gpr[3]; return; } } void OpenBIOS_func_1FC0DD00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DD00u); int psx_delay_BFC0DD00 = 0; int psx_taken_BFC0DD00 = 0; int psx_delay_BFC0DD0C = 0; int psx_taken_BFC0DD0C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DD08u: goto label_BFC0DD08; case 0xBFC0DD0Cu: goto label_BFC0DD0C; case 0xBFC0DD14u: goto label_BFC0DD14; default: break; } } label_BFC0DD00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0DD00: 11000002 beq $t0, $zero, 0xBFC0DD0C */ uint32_t psx_brA_BFC0DD00 = cpu->gpr[8]; uint32_t psx_brB_BFC0DD00 = cpu->gpr[0]; psx_taken_BFC0DD00 = (psx_brA_BFC0DD00 == psx_brB_BFC0DD00); psx_delay_BFC0DD00 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033804u); #endif if (psx_delay_BFC0DD00) { psx_delay_BFC0DD00 = 0; if (psx_taken_BFC0DD00) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003380Cu); goto label_BFC0DD0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033808u); } label_BFC0DD08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0DD08: A0E80006 sb $t0, 6($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033808u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (6)), (uint8_t)(cpu->gpr[8] & 0xFFu)); PGXP_STORE(0xA0E80006u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80033808u); #endif label_BFC0DD0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003380Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1001u); #endif /* 0xBFC0DD0C: 11800009 beq $t4, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DD0C = cpu->gpr[12]; uint32_t psx_brB_BFC0DD0C = cpu->gpr[0]; psx_taken_BFC0DD0C = (psx_brA_BFC0DD0C == psx_brB_BFC0DD0C); psx_delay_BFC0DD0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DD10: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033810u); #endif if (psx_delay_BFC0DD0C) { psx_delay_BFC0DD0C = 0; if (psx_taken_BFC0DD0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033814u); } label_BFC0DD14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD14u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033814u); #endif /* 0xBFC0DD14: 94E20000 lhu $v0, 0($a3) */ { uint32_t _pgxa = cpu->gpr[7]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (0)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033814u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x94E20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DD1C: 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(0x8003381Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DD20: 246337D4 addiu $v1, $v1, 14292 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14292)); PGXP_ALU(0x246337D4u, cpu->gpr[3], _pgx1, 0x000037D4u); } #ifdef PSX_COSIM cosim_instr(0x80033820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DD24: 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(0x80033824u); #endif /* 0xBFC0DD28: 94420000 lhu $v0, 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, 0x80033828u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x94420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003382Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0DD30: A4E20004 sh $v0, 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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x80033830u); return; } g_debug_last_store_pc = 0x80033830u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4E20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DD34(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DD34u); int psx_delay_BFC0DD40 = 0; int psx_taken_BFC0DD40 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DD38u: goto label_BFC0DD38; default: break; } } label_BFC0DD34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD34u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0DD34: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x80033834u); #endif label_BFC0DD38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC0DD38: 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(0x80033838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC0DD3C: 24E70010 addiu $a3, $a3, 16 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (16)); PGXP_ALU(0x24E70010u, cpu->gpr[7], _pgx1, 0x00000010u); } #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, 0x1u); #endif /* 0xBFC0DD40: 1000FF4D beq $zero, $zero, 0xBFC0DA78 */ uint32_t psx_brA_BFC0DD40 = cpu->gpr[0]; uint32_t psx_brB_BFC0DD40 = cpu->gpr[0]; psx_taken_BFC0DD40 = (psx_brA_BFC0DD40 == psx_brB_BFC0DD40); psx_delay_BFC0DD40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000u); #endif /* 0xBFC0DD44: 25CE0010 addiu $t6, $t6, 16 */ { uint32_t _pgx1 = cpu->gpr[14]; cpu->gpr[14] = (uint32_t)((int32_t)cpu->gpr[14] + (16)); PGXP_ALU(0x25CE0010u, cpu->gpr[14], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x80033844u); #endif if (psx_delay_BFC0DD40) { psx_delay_BFC0DD40 = 0; if (psx_taken_BFC0DD40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033578u); cpu->pc = 0x80033578u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033848u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033848u); cpu->pc = 0x80033848u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DD48(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DD48u); int psx_delay_BFC0DD48 = 0; int psx_taken_BFC0DD48 = 0; int psx_delay_BFC0DD64 = 0; int psx_taken_BFC0DD64 = 0; int psx_delay_BFC0DD7C = 0; int psx_taken_BFC0DD7C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DD50u: goto label_BFC0DD50; case 0xBFC0DD64u: goto label_BFC0DD64; case 0xBFC0DD6Cu: goto label_BFC0DD6C; default: break; } } label_BFC0DD48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC0DD48: 12A00006 beq $s5, $zero, 0xBFC0DD64 */ uint32_t psx_brA_BFC0DD48 = cpu->gpr[21]; uint32_t psx_brB_BFC0DD48 = cpu->gpr[0]; psx_taken_BFC0DD48 = (psx_brA_BFC0DD48 == psx_brB_BFC0DD48); psx_delay_BFC0DD48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003384Cu); #endif if (psx_delay_BFC0DD48) { psx_delay_BFC0DD48 = 0; if (psx_taken_BFC0DD48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033864u); goto label_BFC0DD64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033850u); } label_BFC0DD50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033850u); #endif /* 0xBFC0DD50: 90E3000B lbu $v1, 11($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 11; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (11)), 3, 0x80u); PGXP_LOAD(0x90E3000Bu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DD58: 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(0x80033858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000Cu); #endif /* 0xBFC0DD5C: 02A31025 or $v0, $s5, $v1 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[21] | cpu->gpr[3]; PGXP_ALU(0x02A31025u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x84u); #endif /* 0xBFC0DD60: A0E2000B sb $v0, 11($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 11; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033860u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (11)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0E2000Bu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033860u); #endif label_BFC0DD64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD64u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0DD64: 1140FFF3 beq $t2, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DD64 = cpu->gpr[10]; uint32_t psx_brB_BFC0DD64 = cpu->gpr[0]; psx_taken_BFC0DD64 = (psx_brA_BFC0DD64 == psx_brB_BFC0DD64); psx_delay_BFC0DD64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0DD68: 310800F0 andi $t0, $t0, 0xF0 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] & 0xF0u; PGXP_ALU(0x310800F0u, cpu->gpr[8], _pgx1, 0x00F0u); } #ifdef PSX_COSIM cosim_instr(0x80033868u); #endif if (psx_delay_BFC0DD64) { psx_delay_BFC0DD64 = 0; if (psx_taken_BFC0DD64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003386Cu); } label_BFC0DD6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD6Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003386Cu); #endif /* 0xBFC0DD6C: 90E2000B lbu $v0, 11($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 11; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (11)), 2, 0x80u); PGXP_LOAD(0x90E2000Bu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003386Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DD74: 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(0x80033874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0DD78: 00484025 or $t0, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[2] | cpu->gpr[8]; PGXP_ALU(0x00484025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD7C: 1000FFED beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DD7C = cpu->gpr[0]; uint32_t psx_brB_BFC0DD7C = cpu->gpr[0]; psx_taken_BFC0DD7C = (psx_brA_BFC0DD7C == psx_brB_BFC0DD7C); psx_delay_BFC0DD7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0DD80: A0E8000B sb $t0, 11($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 11; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033880u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (11)), (uint8_t)(cpu->gpr[8] & 0xFFu)); PGXP_STORE(0xA0E8000Bu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80033880u); #endif if (psx_delay_BFC0DD7C) { psx_delay_BFC0DD7C = 0; if (psx_taken_BFC0DD7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033884u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033884u); cpu->pc = 0x80033884u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DD84(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DD84u); int psx_delay_BFC0DD84 = 0; int psx_taken_BFC0DD84 = 0; int psx_delay_BFC0DDA0 = 0; int psx_taken_BFC0DDA0 = 0; int psx_delay_BFC0DDB8 = 0; int psx_taken_BFC0DDB8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DD8Cu: goto label_BFC0DD8C; case 0xBFC0DDA0u: goto label_BFC0DDA0; case 0xBFC0DDA8u: goto label_BFC0DDA8; default: break; } } label_BFC0DD84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200001u); #endif /* 0xBFC0DD84: 12A00006 beq $s5, $zero, 0xBFC0DDA0 */ uint32_t psx_brA_BFC0DD84 = cpu->gpr[21]; uint32_t psx_brB_BFC0DD84 = cpu->gpr[0]; psx_taken_BFC0DD84 = (psx_brA_BFC0DD84 == psx_brB_BFC0DD84); psx_delay_BFC0DD84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DD88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033888u); #endif if (psx_delay_BFC0DD84) { psx_delay_BFC0DD84 = 0; if (psx_taken_BFC0DD84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338A0u); goto label_BFC0DDA0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003388Cu); } label_BFC0DD8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DD8Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DD8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003388Cu); #endif /* 0xBFC0DD8C: 90E3000C lbu $v1, 12($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 12; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (12)), 3, 0x80u); PGXP_LOAD(0x90E3000Cu, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC0DD90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DD94: 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(0x80033894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000Cu); #endif /* 0xBFC0DD98: 02A31025 or $v0, $s5, $v1 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[2] = cpu->gpr[21] | cpu->gpr[3]; PGXP_ALU(0x02A31025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0DD9C: A0E2000C sb $v0, 12($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x8003389Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (12)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0E2000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x8003389Cu); #endif label_BFC0DDA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0DDA0: 1140FFE4 beq $t2, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDA0 = cpu->gpr[10]; uint32_t psx_brB_BFC0DDA0 = cpu->gpr[0]; psx_taken_BFC0DDA0 = (psx_brA_BFC0DDA0 == psx_brB_BFC0DDA0); psx_delay_BFC0DDA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0DDA4: 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(0x800338A4u); #endif if (psx_delay_BFC0DDA0) { psx_delay_BFC0DDA0 = 0; if (psx_taken_BFC0DDA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338A8u); } label_BFC0DDA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDA8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338A8u); #endif /* 0xBFC0DDA8: 90E2000C lbu $v0, 12($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 12; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (12)), 2, 0x80u); PGXP_LOAD(0x90E2000Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800338A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DDAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800338ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DDB0: 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(0x800338B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DDB4: 004A5025 or $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(0x004A5025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800338B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DDB8: 1000FFDE beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDB8 = cpu->gpr[0]; uint32_t psx_brB_BFC0DDB8 = cpu->gpr[0]; psx_taken_BFC0DDB8 = (psx_brA_BFC0DDB8 == psx_brB_BFC0DDB8); psx_delay_BFC0DDB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480u); #endif /* 0xBFC0DDBC: A0EA000C sb $t2, 12($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 12; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x800338BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (12)), (uint8_t)(cpu->gpr[10] & 0xFFu)); PGXP_STORE(0xA0EA000Cu, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x800338BCu); #endif if (psx_delay_BFC0DDB8) { psx_delay_BFC0DDB8 = 0; if (psx_taken_BFC0DDB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338C0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338C0u); cpu->pc = 0x800338C0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DDC0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DDC0u); int psx_delay_BFC0DDC0 = 0; int psx_taken_BFC0DDC0 = 0; int psx_delay_BFC0DDC8 = 0; int psx_taken_BFC0DDC8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DDC8u: goto label_BFC0DDC8; default: break; } } label_BFC0DDC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDC0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0DDC0: 1100FFDC beq $t0, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDC0 = cpu->gpr[8]; uint32_t psx_brB_BFC0DDC0 = cpu->gpr[0]; psx_taken_BFC0DDC0 = (psx_brA_BFC0DDC0 == psx_brB_BFC0DDC0); psx_delay_BFC0DDC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC0DDC4: 000841C0 sll $t0, $t0, 7 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 7u; PGXP_ALU(0x000841C0u, cpu->gpr[8], _pgx1, 7u); } #ifdef PSX_COSIM cosim_instr(0x800338C4u); #endif if (psx_delay_BFC0DDC0) { psx_delay_BFC0DDC0 = 0; if (psx_taken_BFC0DDC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338C8u); } label_BFC0DDC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DDC8: 1000FFDA beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDC8 = cpu->gpr[0]; uint32_t psx_brB_BFC0DDC8 = cpu->gpr[0]; psx_taken_BFC0DDC8 = (psx_brA_BFC0DDC8 == psx_brB_BFC0DDC8); psx_delay_BFC0DDC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0DDCC: A4E8000E sh $t0, 14($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 14; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (14)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800338CCu); return; } g_debug_last_store_pc = 0x800338CCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[8] & 0xFFFFu)); } PGXP_STORE(0xA4E8000Eu, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800338CCu); #endif if (psx_delay_BFC0DDC8) { psx_delay_BFC0DDC8 = 0; if (psx_taken_BFC0DDC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338D0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338D0u); cpu->pc = 0x800338D0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DDD0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DDD0u); int psx_delay_BFC0DDD8 = 0; int psx_taken_BFC0DDD8 = 0; int psx_delay_BFC0DDE8 = 0; int psx_taken_BFC0DDE8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DDE0u: goto label_BFC0DDE0; default: break; } } label_BFC0DDD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDD0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338D0u); #endif /* 0xBFC0DDD0: 8E823D5C lw $v0, 15708($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 15708; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } PGXP_LOAD(0x8E823D5Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800338D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DDD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800338D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DDD8: 1440FFD6 bne $v0, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDD8 = cpu->gpr[2]; uint32_t psx_brB_BFC0DDD8 = cpu->gpr[0]; psx_taken_BFC0DDD8 = (psx_brA_BFC0DDD8 != psx_brB_BFC0DDD8); psx_delay_BFC0DDD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DDDC: 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(0x800338DCu); #endif if (psx_delay_BFC0DDD8) { psx_delay_BFC0DDD8 = 0; if (psx_taken_BFC0DDD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338E0u); } label_BFC0DDE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100004u); #endif /* 0xBFC0DDE0: AE823D5C sw $v0, 15708($s4) */ { uint32_t _pgxa = cpu->gpr[20] + 15708; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[20] + (15708)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338E0u); return; } g_debug_last_store_pc = 0x800338E0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE823D5Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800338E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DDE4: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800338E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DDE8: 1000FFD2 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DDE8 = cpu->gpr[0]; uint32_t psx_brB_BFC0DDE8 = cpu->gpr[0]; psx_taken_BFC0DDE8 = (psx_brA_BFC0DDE8 == psx_brB_BFC0DDE8); psx_delay_BFC0DDE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0DDEC: AC483D58 sw $t0, 15704($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15704; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15704)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x800338ECu); return; } g_debug_last_store_pc = 0x800338ECu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC483D58u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x800338ECu); #endif if (psx_delay_BFC0DDE8) { psx_delay_BFC0DDE8 = 0; if (psx_taken_BFC0DDE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338F0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800338F0u); cpu->pc = 0x800338F0u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DDF0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DDF0u); int psx_delay_BFC0DDF8 = 0; int psx_taken_BFC0DDF8 = 0; int psx_delay_BFC0DE20 = 0; int psx_taken_BFC0DE20 = 0; int psx_delay_BFC0DE30 = 0; int psx_taken_BFC0DE30 = 0; int psx_delay_BFC0DE40 = 0; int psx_delay_BFC0DE48 = 0; int psx_taken_BFC0DE48 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DE0Cu: goto label_BFC0DE0C; case 0xBFC0DE00u: goto label_BFC0DE00; case 0xBFC0DE08u: goto label_BFC0DE08; case 0xBFC0DE28u: goto label_BFC0DE28; case 0xBFC0DE38u: goto label_BFC0DE38; case 0xBFC0DE40u: goto label_BFC0DE40; case 0xBFC0DE48u: goto label_BFC0DE48; default: break; } } label_BFC0DDF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DDF0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DDF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800338F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC0DDF0: 00083400 sll $a2, $t0, 16 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[6] = cpu->gpr[8] << 16u; PGXP_ALU(0x00083400u, cpu->gpr[6], _pgx1, 16u); } #ifdef PSX_COSIM cosim_instr(0x800338F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0DDF4: 29020041 slti $v0, $t0, 65 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[8] < (65) ? 1 : 0); PGXP_ALU(0x29020041u, cpu->gpr[2], _pgx1, 0x0041u); } #ifdef PSX_COSIM cosim_instr(0x800338F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DDF8: 14400003 bne $v0, $zero, 0xBFC0DE08 */ uint32_t psx_brA_BFC0DDF8 = cpu->gpr[2]; uint32_t psx_brB_BFC0DDF8 = cpu->gpr[0]; psx_taken_BFC0DDF8 = (psx_brA_BFC0DDF8 != psx_brB_BFC0DDF8); psx_delay_BFC0DDF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DDFC: 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(0x800338FCu); #endif if (psx_delay_BFC0DDF8) { psx_delay_BFC0DDF8 = 0; if (psx_taken_BFC0DDF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033908u); goto label_BFC0DE08; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033900u); } label_BFC0DE00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0DE00: 2408003F addiu $t0, $zero, 63 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (63)); PGXP_ALU(0x2408003Fu, cpu->gpr[8], _pgx1, 0x0000003Fu); } #ifdef PSX_COSIM cosim_instr(0x80033900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DE04: 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(0x80033904u); #endif label_BFC0DE08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE08u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180u); #endif /* 0xBFC0DE08: A0E80007 sb $t0, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033908u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[8] & 0xFFu)); PGXP_STORE(0xA0E80007u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80033908u); #endif label_BFC0DE0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE0Cu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x8003390Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DE0C: 00063200 sll $a2, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] << 8u; PGXP_ALU(0x00063200u, cpu->gpr[6], _pgx1, 8u); } #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, 0x4u); #endif /* 0xBFC0DE10: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DE14: 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(0x80033914u); #endif /* 0xBFC0DE18: 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, 0x80033918u); 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(0x80033918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC0DE1C: 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(0x8003391Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DE20: 10400007 beq $v0, $zero, 0xBFC0DE40 */ uint32_t psx_brA_BFC0DE20 = cpu->gpr[2]; uint32_t psx_brB_BFC0DE20 = cpu->gpr[0]; psx_taken_BFC0DE20 = (psx_brA_BFC0DE20 == psx_brB_BFC0DE20); psx_delay_BFC0DE20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0DE24: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033924u); #endif if (psx_delay_BFC0DE20) { psx_delay_BFC0DE20 = 0; if (psx_taken_BFC0DE20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033940u); goto label_BFC0DE40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033928u); } label_BFC0DE28: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE28u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC0DE28: 31230001 andi $v1, $t1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[3] = cpu->gpr[9] & 0x1u; PGXP_ALU(0x31230001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x80033928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC0DE2C: 00091042 srl $v0, $t1, 1 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[2] = cpu->gpr[9] >> 1u; PGXP_ALU(0x00091042u, cpu->gpr[2], _pgx1, 1u); } #ifdef PSX_COSIM cosim_instr(0x8003392Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DE30: 14620003 bne $v1, $v0, 0xBFC0DE40 */ uint32_t psx_brA_BFC0DE30 = cpu->gpr[3]; uint32_t psx_brB_BFC0DE30 = cpu->gpr[2]; psx_taken_BFC0DE30 = (psx_brA_BFC0DE30 != psx_brB_BFC0DE30); psx_delay_BFC0DE30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC0DE34: 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(0x80033934u); #endif if (psx_delay_BFC0DE30) { psx_delay_BFC0DE30 = 0; if (psx_taken_BFC0DE30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033940u); goto label_BFC0DE40; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033938u); } label_BFC0DE38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE38u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC0DE38: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DE3C: 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(0x8003393Cu); #endif label_BFC0DE40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE40u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0DE40: 0C00CA94 jal 0xB0032A50 */ cpu->gpr[31] = 0x80033948u; /* jal link before delay slot */ psx_delay_BFC0DE40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x211u); #endif /* 0xBFC0DE44: 01202025 or $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(0x01202025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033944u); #endif if (psx_delay_BFC0DE40) { psx_delay_BFC0DE40 = 0; cpu->gpr[31] = 0x80033948u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032A50u); cpu->pc = 0x80032A50u; return; } label_BFC0DE48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DE48: 1000FFBB beq $zero, $zero, 0xBFC0DD38 */ uint32_t psx_brA_BFC0DE48 = cpu->gpr[0]; uint32_t psx_brB_BFC0DE48 = cpu->gpr[0]; psx_taken_BFC0DE48 = (psx_brA_BFC0DE48 == psx_brB_BFC0DE48); psx_delay_BFC0DE48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0DE4C: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x8003394Cu); #endif if (psx_delay_BFC0DE48) { psx_delay_BFC0DE48 = 0; if (psx_taken_BFC0DE48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033838u); cpu->pc = 0x80033838u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033950u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033950u); cpu->pc = 0x80033950u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DE50(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DE50u); int psx_delay_BFC0DE58 = 0; int psx_taken_BFC0DE58 = 0; int psx_delay_BFC0DE68 = 0; int psx_taken_BFC0DE68 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DE60u: goto label_BFC0DE60; default: break; } } label_BFC0DE50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033950u); #endif /* 0xBFC0DE50: 8E023D64 lw $v0, 15716($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15716; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033950u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E023D64u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DE54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DE58: 1440FFB6 bne $v0, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DE58 = cpu->gpr[2]; uint32_t psx_brB_BFC0DE58 = cpu->gpr[0]; psx_taken_BFC0DE58 = (psx_brA_BFC0DE58 != psx_brB_BFC0DE58); psx_delay_BFC0DE58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DE5C: 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(0x8003395Cu); #endif if (psx_delay_BFC0DE58) { psx_delay_BFC0DE58 = 0; if (psx_taken_BFC0DE58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033960u); } label_BFC0DE60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC0DE60: AE023D64 sw $v0, 15716($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 15716; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (15716)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033960u); return; } g_debug_last_store_pc = 0x80033960u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE023D64u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DE64: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DE68: 1000FFB2 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DE68 = cpu->gpr[0]; uint32_t psx_brB_BFC0DE68 = cpu->gpr[0]; psx_taken_BFC0DE68 = (psx_brA_BFC0DE68 == psx_brB_BFC0DE68); psx_delay_BFC0DE68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0DE6C: AC483D60 sw $t0, 15712($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15712; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15712)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x8003396Cu); return; } g_debug_last_store_pc = 0x8003396Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC483D60u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x8003396Cu); #endif if (psx_delay_BFC0DE68) { psx_delay_BFC0DE68 = 0; if (psx_taken_BFC0DE68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033970u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033970u); cpu->pc = 0x80033970u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DE70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DE70u); int psx_delay_BFC0DE7C = 0; int psx_taken_BFC0DE7C = 0; int psx_delay_BFC0DE98 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DE84u: goto label_BFC0DE84; default: break; } } label_BFC0DE70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE70u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200004u); #endif /* 0xBFC0DE70: 26A2FFFF addiu $v0, $s5, -1 */ { uint32_t _pgx1 = cpu->gpr[21]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[21] + (-1)); PGXP_ALU(0x26A2FFFFu, cpu->gpr[2], _pgx1, 0xFFFFFFFFu); } #ifdef PSX_COSIM cosim_instr(0x80033970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DE74: 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(0x80033974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DE78: 2C43000E sltiu $v1, $v0, 14 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x0000000Eu ? 1 : 0); PGXP_ALU(0x2C43000Eu, cpu->gpr[3], _pgx1, 0x000Eu); } #ifdef PSX_COSIM cosim_instr(0x80033978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DE7C: 1060FFAD beq $v1, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DE7C = cpu->gpr[3]; uint32_t psx_brB_BFC0DE7C = cpu->gpr[0]; psx_taken_BFC0DE7C = (psx_brA_BFC0DE7C == psx_brB_BFC0DE7C); psx_delay_BFC0DE7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DE80: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033980u); #endif if (psx_delay_BFC0DE7C) { psx_delay_BFC0DE7C = 0; if (psx_taken_BFC0DE7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033984u); } label_BFC0DE84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DE84u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DE84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DE84: 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(0x80033984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DE88: 2463379C addiu $v1, $v1, 14236 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14236)); PGXP_ALU(0x2463379Cu, cpu->gpr[3], _pgx1, 0x0000379Cu); } #ifdef PSX_COSIM cosim_instr(0x80033988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DE8C: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x8003398Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033990u); #endif /* 0xBFC0DE90: 8C420000 lw $v0, 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, 0x80033990u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DE94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DE98: 00400008 jr $v0 */ psx_delay_BFC0DE98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DE9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x8003399Cu); #endif if (psx_delay_BFC0DE98) { psx_delay_BFC0DE98 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_1FC0DEA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DEA0u); int psx_delay_BFC0DEBC = 0; int psx_taken_BFC0DEBC = 0; int psx_delay_BFC0DED8 = 0; int psx_taken_BFC0DED8 = 0; int psx_delay_BFC0DEEC = 0; int psx_taken_BFC0DEEC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DEACu: goto label_BFC0DEAC; case 0xBFC0DEC4u: goto label_BFC0DEC4; case 0xBFC0DEC8u: goto label_BFC0DEC8; case 0xBFC0DEE0u: goto label_BFC0DEE0; case 0xBFC0DEE4u: goto label_BFC0DEE4; default: break; } } label_BFC0DEA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339A0u); #endif /* 0xBFC0DEA0: 84E20002 lh $v0, 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, 0x800339A0u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x84E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800339A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DEA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800339A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DEA8: 004A1023 subu $v0, $v0, $t2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[10]; PGXP_ALU(0x004A1023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800339A8u); #endif label_BFC0DEAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DEAC: 3C03006C lui $v1, 0x6C */ cpu->gpr[3] = 0x006C0000u; PGXP_ALU(0x3C03006Cu, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x800339ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0DEB0: A4E20002 sh $v0, 2($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 2; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (2)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800339B0u); return; } g_debug_last_store_pc = 0x800339B0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800339B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DEB4: 24633E1D addiu $v1, $v1, 15901 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15901)); PGXP_ALU(0x24633E1Du, cpu->gpr[3], _pgx1, 0x00003E1Du); } #ifdef PSX_COSIM cosim_instr(0x800339B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DEB8: 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(0x800339B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DEBC: 14400002 bne $v0, $zero, 0xBFC0DEC8 */ uint32_t psx_brA_BFC0DEBC = cpu->gpr[2]; uint32_t psx_brB_BFC0DEBC = cpu->gpr[0]; psx_taken_BFC0DEBC = (psx_brA_BFC0DEBC != psx_brB_BFC0DEBC); psx_delay_BFC0DEBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DEC0: 0062001A div $v1, $v0 */ { int32_t psx_n = (int32_t)cpu->gpr[3]; 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(0x0062001Au, cpu->hi, cpu->lo, cpu->gpr[3], cpu->gpr[2]); #ifdef PSX_COSIM cosim_instr(0x800339C0u); #endif if (psx_delay_BFC0DEBC) { psx_delay_BFC0DEBC = 0; if (psx_taken_BFC0DEBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339C8u); goto label_BFC0DEC8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339C4u); } label_BFC0DEC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEC4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0DEC4: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800339C4u); return; #ifdef PSX_COSIM cosim_instr(0x800339C4u); #endif label_BFC0DEC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEC8u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DEC8: 3403AC44 ori $v1, $zero, 0xAC44 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = cpu->gpr[0] | 0xAC44u; PGXP_ALU(0x3403AC44u, cpu->gpr[3], _pgx1, 0xAC44u); } #ifdef PSX_COSIM cosim_instr(0x800339C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DECC: 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(0x800339CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DED0: 00021300 sll $v0, $v0, 12 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] << 12u; PGXP_ALU(0x00021300u, cpu->gpr[2], _pgx1, 12u); } #ifdef PSX_COSIM cosim_instr(0x800339D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DED4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x800339D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0DED8: 14600002 bne $v1, $zero, 0xBFC0DEE4 */ uint32_t psx_brA_BFC0DED8 = cpu->gpr[3]; uint32_t psx_brB_BFC0DED8 = cpu->gpr[0]; psx_taken_BFC0DED8 = (psx_brA_BFC0DED8 != psx_brB_BFC0DED8); psx_delay_BFC0DED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DEDC: 0043001A div $v0, $v1 */ { int32_t psx_n = (int32_t)cpu->gpr[2]; 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(0x0043001Au, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[3]); #ifdef PSX_COSIM cosim_instr(0x800339DCu); #endif if (psx_delay_BFC0DED8) { psx_delay_BFC0DED8 = 0; if (psx_taken_BFC0DED8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339E4u); goto label_BFC0DEE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339E0u); } label_BFC0DEE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEE0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC0DEE0: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x800339E0u); return; #ifdef PSX_COSIM cosim_instr(0x800339E0u); #endif label_BFC0DEE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DEE4: 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(0x800339E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4004u); #endif /* 0xBFC0DEE8: A5C20004 sh $v0, 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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x800339E8u); return; } g_debug_last_store_pc = 0x800339E8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA5C20004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800339E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DEEC: 1000FF92 beq $zero, $zero, 0xBFC0DD38 */ uint32_t psx_brA_BFC0DEEC = cpu->gpr[0]; uint32_t psx_brB_BFC0DEEC = cpu->gpr[0]; psx_taken_BFC0DEEC = (psx_brA_BFC0DEEC == psx_brB_BFC0DEEC); psx_delay_BFC0DEEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0DEF0: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x800339F0u); #endif if (psx_delay_BFC0DEEC) { psx_delay_BFC0DEEC = 0; if (psx_taken_BFC0DEEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033838u); cpu->pc = 0x80033838u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339F4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339F4u); cpu->pc = 0x800339F4u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DEF4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DEF4u); int psx_delay_BFC0DEF8 = 0; int psx_taken_BFC0DEF8 = 0; label_BFC0DEF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DEF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DEF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x800339F4u); #endif /* 0xBFC0DEF4: 84E20002 lh $v0, 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, 0x800339F4u); return; } cpu->gpr[2] = (uint32_t)(int32_t)(int16_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x84E20002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x800339F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DEF8: 1000FFEC beq $zero, $zero, 0xBFC0DEAC */ uint32_t psx_brA_BFC0DEF8 = cpu->gpr[0]; uint32_t psx_brB_BFC0DEF8 = cpu->gpr[0]; psx_taken_BFC0DEF8 = (psx_brA_BFC0DEF8 == psx_brB_BFC0DEF8); psx_delay_BFC0DEF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DEFC: 01421021 addu $v0, $t2, $v0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[2]; PGXP_ALU(0x01421021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x800339FCu); #endif if (psx_delay_BFC0DEF8) { psx_delay_BFC0DEF8 = 0; if (psx_taken_BFC0DEF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800339ACu); cpu->pc = 0x800339ACu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A00u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A00u); cpu->pc = 0x80033A00u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DF00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DF00u); int psx_delay_BFC0DF10 = 0; int psx_taken_BFC0DF10 = 0; label_BFC0DF00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF00u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A00u); #endif /* 0xBFC0DF00: 90E2000D lbu $v0, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (13)), 2, 0x80u); PGXP_LOAD(0x90E2000Du, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF08: 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(0x80033A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DF0C: 01421025 or $v0, $t2, $v0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[10] | cpu->gpr[2]; PGXP_ALU(0x01421025u, cpu->gpr[2], _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, 0x1u); #endif /* 0xBFC0DF10: 1000FF88 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DF10 = cpu->gpr[0]; uint32_t psx_brB_BFC0DF10 = cpu->gpr[0]; psx_taken_BFC0DF10 = (psx_brA_BFC0DF10 == psx_brB_BFC0DF10); psx_delay_BFC0DF10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC0DF14: A0E2000D sb $v0, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033A14u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (13)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0E2000Du, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A14u); #endif if (psx_delay_BFC0DF10) { psx_delay_BFC0DF10 = 0; if (psx_taken_BFC0DF10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A18u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A18u); cpu->pc = 0x80033A18u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DF18(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DF18u); int psx_delay_BFC0DF28 = 0; int psx_taken_BFC0DF28 = 0; label_BFC0DF18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF18u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF18: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000000u); #endif /* 0xBFC0DF1C: 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(0x80033A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF20: 2442500C addiu $v0, $v0, 20492 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (20492)); PGXP_ALU(0x2442500Cu, cpu->gpr[2], _pgx1, 0x0000500Cu); } #ifdef PSX_COSIM cosim_instr(0x80033A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1000004u); #endif /* 0xBFC0DF24: 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(0x80033A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF28: 1000FF82 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DF28 = cpu->gpr[0]; uint32_t psx_brB_BFC0DF28 = cpu->gpr[0]; psx_taken_BFC0DF28 = (psx_brA_BFC0DF28 == psx_brB_BFC0DF28); psx_delay_BFC0DF28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DF2C: A04A0002 sb $t2, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033A2Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[10] & 0xFFu)); PGXP_STORE(0xA04A0002u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80033A2Cu); #endif if (psx_delay_BFC0DF28) { psx_delay_BFC0DF28 = 0; if (psx_taken_BFC0DF28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A30u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A30u); cpu->pc = 0x80033A30u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DF30(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DF30u); int psx_delay_BFC0DF3C = 0; int psx_taken_BFC0DF3C = 0; int psx_delay_BFC0DF48 = 0; int psx_taken_BFC0DF48 = 0; int psx_delay_BFC0DF58 = 0; int psx_taken_BFC0DF58 = 0; int psx_delay_BFC0DF60 = 0; int psx_taken_BFC0DF60 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DF44u: goto label_BFC0DF44; case 0xBFC0DF48u: goto label_BFC0DF48; case 0xBFC0DF50u: goto label_BFC0DF50; case 0xBFC0DF60u: goto label_BFC0DF60; default: break; } } label_BFC0DF30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF30u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0DF30: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033A30u); #endif /* 0xBFC0DF34: 8C623D4C lw $v0, 15692($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15692; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A34u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C623D4Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DF3C: 10400008 beq $v0, $zero, 0xBFC0DF60 */ uint32_t psx_brA_BFC0DF3C = cpu->gpr[2]; uint32_t psx_brB_BFC0DF3C = cpu->gpr[0]; psx_taken_BFC0DF3C = (psx_brA_BFC0DF3C == psx_brB_BFC0DF3C); psx_delay_BFC0DF3C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF40: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033A40u); #endif if (psx_delay_BFC0DF3C) { psx_delay_BFC0DF3C = 0; if (psx_taken_BFC0DF3C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A60u); goto label_BFC0DF60; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A44u); } label_BFC0DF44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF44u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF44: 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(0x80033A44u); #endif label_BFC0DF48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF48u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DF48: 1040FF7A beq $v0, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DF48 = cpu->gpr[2]; uint32_t psx_brB_BFC0DF48 = cpu->gpr[0]; psx_taken_BFC0DF48 = (psx_brA_BFC0DF48 == psx_brB_BFC0DF48); psx_delay_BFC0DF48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0DF4C: AC623D4C sw $v0, 15692($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15692; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15692)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A4Cu); return; } g_debug_last_store_pc = 0x80033A4Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC623D4Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A4Cu); #endif if (psx_delay_BFC0DF48) { psx_delay_BFC0DF48 = 0; if (psx_taken_BFC0DF48) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A50u); } label_BFC0DF50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF50u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF50: 3C028004 lui $v0, 0x8004 */ cpu->gpr[2] = 0x80040000u; PGXP_ALU(0x3C028004u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033A50u); #endif /* 0xBFC0DF54: 8C423D50 lw $v0, 15696($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 15696; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (15696)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A54u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C423D50u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF58: 1000FF76 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DF58 = cpu->gpr[0]; uint32_t psx_brB_BFC0DF58 = cpu->gpr[0]; psx_taken_BFC0DF58 = (psx_brA_BFC0DF58 == psx_brB_BFC0DF58); psx_delay_BFC0DF58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8004u); #endif /* 0xBFC0DF5C: ADE23D78 sw $v0, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033A5Cu); return; } g_debug_last_store_pc = 0x80033A5Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xADE23D78u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A5Cu); #endif if (psx_delay_BFC0DF58) { psx_delay_BFC0DF58 = 0; if (psx_taken_BFC0DF58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A60u); } label_BFC0DF60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF60u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF60: 1000FFF9 beq $zero, $zero, 0xBFC0DF48 */ uint32_t psx_brA_BFC0DF60 = cpu->gpr[0]; uint32_t psx_brB_BFC0DF60 = cpu->gpr[0]; psx_taken_BFC0DF60 = (psx_brA_BFC0DF60 == psx_brB_BFC0DF60); psx_delay_BFC0DF60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x405u); #endif /* 0xBFC0DF64: 01401025 or $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(0x01401025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033A64u); #endif if (psx_delay_BFC0DF60) { psx_delay_BFC0DF60 = 0; if (psx_taken_BFC0DF60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A48u); goto label_BFC0DF48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A68u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A68u); cpu->pc = 0x80033A68u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DF68(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DF68u); int psx_delay_BFC0DF78 = 0; int psx_taken_BFC0DF78 = 0; label_BFC0DF68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF68u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A68u); #endif /* 0xBFC0DF68: 90E2000D lbu $v0, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (13)), 2, 0x80u); PGXP_LOAD(0x90E2000Du, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400u); #endif /* 0xBFC0DF6C: 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(0x80033A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF70: 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(0x80033A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DF74: 004A5025 or $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(0x004A5025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF78: 1000FF6E beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DF78 = cpu->gpr[0]; uint32_t psx_brB_BFC0DF78 = cpu->gpr[0]; psx_taken_BFC0DF78 = (psx_brA_BFC0DF78 == psx_brB_BFC0DF78); psx_delay_BFC0DF78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x480u); #endif /* 0xBFC0DF7C: A0EA000D sb $t2, 13($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 13; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033A7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (13)), (uint8_t)(cpu->gpr[10] & 0xFFu)); PGXP_STORE(0xA0EA000Du, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80033A7Cu); #endif if (psx_delay_BFC0DF78) { psx_delay_BFC0DF78 = 0; if (psx_taken_BFC0DF78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A80u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033A80u); cpu->pc = 0x80033A80u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DF80(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DF80u); int psx_delay_BFC0DF98 = 0; int psx_taken_BFC0DF98 = 0; int psx_delay_BFC0DFA4 = 0; int psx_taken_BFC0DFA4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DFA4u: goto label_BFC0DFA4; case 0xBFC0DFA0u: goto label_BFC0DFA0; default: break; } } label_BFC0DF80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DF80u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DF80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A80u); #endif /* 0xBFC0DF80: 90E20007 lbu $v0, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 2, 0x80u); PGXP_LOAD(0x90E20007u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DF88: 01421021 addu $v0, $t2, $v0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[10] + cpu->gpr[2]; PGXP_ALU(0x01421021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0DF8C: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF90: 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(0x80033A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DF94: 2C420040 sltiu $v0, $v0, 64 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000040u ? 1 : 0); PGXP_ALU(0x2C420040u, cpu->gpr[2], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x80033A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DF98: 14400002 bne $v0, $zero, 0xBFC0DFA4 */ uint32_t psx_brA_BFC0DF98 = cpu->gpr[2]; uint32_t psx_brB_BFC0DF98 = cpu->gpr[0]; psx_taken_BFC0DF98 = (psx_brA_BFC0DF98 != psx_brB_BFC0DF98); psx_delay_BFC0DF98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DF9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033A9Cu); #endif if (psx_delay_BFC0DF98) { psx_delay_BFC0DF98 = 0; if (psx_taken_BFC0DF98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AA4u); goto label_BFC0DFA4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AA0u); } label_BFC0DFA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFA0u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DFA0: 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(0x80033AA0u); #endif label_BFC0DFA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFA4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFA4: 1000FF99 beq $zero, $zero, 0xBFC0DE0C */ uint32_t psx_brA_BFC0DFA4 = cpu->gpr[0]; uint32_t psx_brB_BFC0DFA4 = cpu->gpr[0]; psx_taken_BFC0DFA4 = (psx_brA_BFC0DFA4 == psx_brB_BFC0DFA4); psx_delay_BFC0DFA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC0DFA8: A0E60007 sb $a2, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033AA8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (7)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0E60007u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x80033AA8u); #endif if (psx_delay_BFC0DFA4) { psx_delay_BFC0DFA4 = 0; if (psx_taken_BFC0DFA4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x8003390Cu); cpu->pc = 0x8003390Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AACu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AACu); cpu->pc = 0x80033AACu; return; /* fallthrough */ } void OpenBIOS_func_1FC0DFAC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DFACu); int psx_delay_BFC0DFC4 = 0; int psx_taken_BFC0DFC4 = 0; int psx_delay_BFC0DFCC = 0; int psx_taken_BFC0DFCC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0DFCCu: goto label_BFC0DFCC; default: break; } } label_BFC0DFAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFACu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AACu); #endif /* 0xBFC0DFAC: 90E20007 lbu $v0, 7($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 7; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (7)), 2, 0x80u); PGXP_LOAD(0x90E20007u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC0DFB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x404u); #endif /* 0xBFC0DFB4: 004A1023 subu $v0, $v0, $t2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[2] = cpu->gpr[2] - cpu->gpr[10]; PGXP_ALU(0x004A1023u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x45u); #endif /* 0xBFC0DFB8: 00403025 or $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(0x00403025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DFBC: 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(0x80033ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DFC0: 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(0x80033AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0DFC4: 0441FFF7 bgez $v0, 0xBFC0DFA4 */ uint32_t psx_brA_BFC0DFC4 = cpu->gpr[2]; psx_taken_BFC0DFC4 = ((int32_t)psx_brA_BFC0DFC4 >= 0); psx_delay_BFC0DFC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033AC8u); #endif if (psx_delay_BFC0DFC4) { psx_delay_BFC0DFC4 = 0; if (psx_taken_BFC0DFC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AA4u); cpu->pc = 0x80033AA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033ACCu); } label_BFC0DFCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFCCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFCC: 1000FFF5 beq $zero, $zero, 0xBFC0DFA4 */ uint32_t psx_brA_BFC0DFCC = cpu->gpr[0]; uint32_t psx_brB_BFC0DFCC = cpu->gpr[0]; psx_taken_BFC0DFCC = (psx_brA_BFC0DFCC == psx_brB_BFC0DFCC); psx_delay_BFC0DFCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC0DFD0: 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(0x80033AD0u); #endif if (psx_delay_BFC0DFCC) { psx_delay_BFC0DFCC = 0; if (psx_taken_BFC0DFCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AA4u); cpu->pc = 0x80033AA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AD4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AD4u); cpu->pc = 0x80033AD4u; return; /* fallthrough */ } void OpenBIOS_func_1FC0DFD4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DFD4u); int psx_delay_BFC0DFD4 = 0; int psx_taken_BFC0DFD4 = 0; label_BFC0DFD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFD4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFD4: 1000FF57 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DFD4 = cpu->gpr[0]; uint32_t psx_brB_BFC0DFD4 = cpu->gpr[0]; psx_taken_BFC0DFD4 = (psx_brA_BFC0DFD4 == psx_brB_BFC0DFD4); psx_delay_BFC0DFD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000400u); #endif /* 0xBFC0DFD8: A32A3D54 sb $t2, 15700($t9) */ { uint32_t _pgxa = cpu->gpr[25] + 15700; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x80033AD8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[25] + (15700)), (uint8_t)(cpu->gpr[10] & 0xFFu)); PGXP_STORE(0xA32A3D54u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x80033AD8u); #endif if (psx_delay_BFC0DFD4) { psx_delay_BFC0DFD4 = 0; if (psx_taken_BFC0DFD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033ADCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033ADCu); cpu->pc = 0x80033ADCu; return; /* fallthrough */ } void OpenBIOS_func_1FC0DFDC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0DFDCu); int psx_delay_BFC0DFDC = 0; int psx_taken_BFC0DFDC = 0; int psx_delay_BFC0DFE4 = 0; int psx_taken_BFC0DFE4 = 0; int psx_delay_BFC0DFEC = 0; int psx_taken_BFC0DFEC = 0; int psx_delay_BFC0DFF4 = 0; int psx_delay_BFC0DFFC = 0; int psx_taken_BFC0DFFC = 0; int psx_delay_BFC0E018 = 0; int psx_taken_BFC0E018 = 0; int psx_delay_BFC0E038 = 0; int psx_taken_BFC0E038 = 0; int psx_delay_BFC0E040 = 0; int psx_taken_BFC0E040 = 0; int psx_delay_BFC0E048 = 0; int psx_taken_BFC0E048 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC0E004u: goto label_BFC0E004; case 0xBFC0E048u: goto label_BFC0E048; case 0xBFC0DFE4u: goto label_BFC0DFE4; case 0xBFC0DFECu: goto label_BFC0DFEC; case 0xBFC0DFF4u: goto label_BFC0DFF4; case 0xBFC0DFFCu: goto label_BFC0DFFC; case 0xBFC0E020u: goto label_BFC0E020; case 0xBFC0E024u: goto label_BFC0E024; case 0xBFC0E040u: goto label_BFC0E040; default: break; } } label_BFC0DFDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFDCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC0DFDC: 1100FF55 beq $t0, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DFDC = cpu->gpr[8]; uint32_t psx_brB_BFC0DFDC = cpu->gpr[0]; psx_taken_BFC0DFDC = (psx_brA_BFC0DFDC == psx_brB_BFC0DFDC); psx_delay_BFC0DFDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC0DFE0: 2D020020 sltiu $v0, $t0, 32 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[2] = (uint32_t)(cpu->gpr[8] < 0x00000020u ? 1 : 0); PGXP_ALU(0x2D020020u, cpu->gpr[2], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x80033AE0u); #endif if (psx_delay_BFC0DFDC) { psx_delay_BFC0DFDC = 0; if (psx_taken_BFC0DFDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AE4u); } label_BFC0DFE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFE4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0DFE4: 10400003 beq $v0, $zero, 0xBFC0DFF4 */ uint32_t psx_brA_BFC0DFE4 = cpu->gpr[2]; uint32_t psx_brB_BFC0DFE4 = cpu->gpr[0]; psx_taken_BFC0DFE4 = (psx_brA_BFC0DFE4 == psx_brB_BFC0DFE4); psx_delay_BFC0DFE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033AE8u); #endif if (psx_delay_BFC0DFE4) { psx_delay_BFC0DFE4 = 0; if (psx_taken_BFC0DFE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AF4u); goto label_BFC0DFF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AECu); } label_BFC0DFEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFECu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFEC: 1000FF51 beq $zero, $zero, 0xBFC0DD34 */ uint32_t psx_brA_BFC0DFEC = cpu->gpr[0]; uint32_t psx_brB_BFC0DFEC = cpu->gpr[0]; psx_taken_BFC0DFEC = (psx_brA_BFC0DFEC == psx_brB_BFC0DFEC); psx_delay_BFC0DFEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800100u); #endif /* 0xBFC0DFF0: AEE83D74 sw $t0, 15732($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 15732; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (15732)); 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[8]); } PGXP_STORE(0xAEE83D74u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x80033AF0u); #endif if (psx_delay_BFC0DFEC) { psx_delay_BFC0DFEC = 0; if (psx_taken_BFC0DFEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033834u); cpu->pc = 0x80033834u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033AF4u); } label_BFC0DFF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFF4u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC0DFF4: 0C00CAB0 jal 0xB0032AC0 */ cpu->gpr[31] = 0x80033AFCu; /* jal link before delay slot */ psx_delay_BFC0DFF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC0DFF8: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033AF8u); #endif if (psx_delay_BFC0DFF4) { psx_delay_BFC0DFF4 = 0; cpu->gpr[31] = 0x80033AFCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80032AC0u); cpu->pc = 0x80032AC0u; return; } label_BFC0DFFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0DFFCu); #endif #ifdef PSX_COSIM cosim_block(0x1FC0DFFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0DFFC: 1000FF4E beq $zero, $zero, 0xBFC0DD38 */ uint32_t psx_brA_BFC0DFFC = cpu->gpr[0]; uint32_t psx_brB_BFC0DFFC = cpu->gpr[0]; psx_taken_BFC0DFFC = (psx_brA_BFC0DFFC == psx_brB_BFC0DFFC); psx_delay_BFC0DFFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000u); #endif /* 0xBFC0E000: 25AD0004 addiu $t5, $t5, 4 */ { uint32_t _pgx1 = cpu->gpr[13]; cpu->gpr[13] = (uint32_t)((int32_t)cpu->gpr[13] + (4)); PGXP_ALU(0x25AD0004u, cpu->gpr[13], _pgx1, 0x00000004u); } #ifdef PSX_COSIM cosim_instr(0x80033B00u); #endif if (psx_delay_BFC0DFFC) { psx_delay_BFC0DFFC = 0; if (psx_taken_BFC0DFFC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033838u); cpu->pc = 0x80033838u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B04u); } label_BFC0E004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E004u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B04u); #endif /* 0xBFC0E004: 8C823D80 lw $v0, 15744($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15744; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C823D80u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC0E008: 3C038004 lui $v1, 0x8004 */ cpu->gpr[3] = 0x80040000u; PGXP_ALU(0x3C038004u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x80033B08u); #endif /* 0xBFC0E00C: 8C633D84 lw $v1, 15748($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 15748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (15748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B0Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C633D84u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC0E010: 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(0x80033B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0E014: 0043182B sltu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC0E018: 10600009 beq $v1, $zero, 0xBFC0E040 */ uint32_t psx_brA_BFC0E018 = cpu->gpr[3]; uint32_t psx_brB_BFC0E018 = cpu->gpr[0]; psx_taken_BFC0E018 = (psx_brA_BFC0E018 == psx_brB_BFC0E018); psx_delay_BFC0E018 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8001u); #endif /* 0xBFC0E01C: ADE03D78 sw $zero, 15736($t7) */ { uint32_t _pgxa = cpu->gpr[15] + 15736; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[15] + (15736)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B1Cu); return; } g_debug_last_store_pc = 0x80033B1Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xADE03D78u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x80033B1Cu); #endif if (psx_delay_BFC0E018) { psx_delay_BFC0E018 = 0; if (psx_taken_BFC0E018) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B40u); goto label_BFC0E040; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B20u); } label_BFC0E020: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E020u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC0E020: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033B20u); #endif label_BFC0E024: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E024u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC0E024: AC833D80 sw $v1, 15744($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 15744; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (15744)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B24u); return; } g_debug_last_store_pc = 0x80033B24u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC833D80u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033B24u); #endif /* 0xBFC0E028: 8E635008 lw $v1, 20488($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 20488; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[19] + (20488)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B28u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80000u); } PGXP_LOAD(0x8E635008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x80033B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0E02C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x80033B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC0E030: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x80033B30u); #endif /* 0xBFC0E034: 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(0x80033B34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0E038: 1000FE9C beq $zero, $zero, 0xBFC0DAAC */ uint32_t psx_brA_BFC0E038 = cpu->gpr[0]; uint32_t psx_brB_BFC0E038 = cpu->gpr[0]; psx_taken_BFC0E038 = (psx_brA_BFC0E038 == psx_brB_BFC0E038); psx_delay_BFC0E038 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC0E03C: AE423D7C sw $v0, 15740($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 15740; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (15740)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x80033B3Cu); return; } g_debug_last_store_pc = 0x80033B3Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE423D7Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x80033B3Cu); #endif if (psx_delay_BFC0E038) { psx_delay_BFC0E038 = 0; if (psx_taken_BFC0E038) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x800335ACu); cpu->pc = 0x800335ACu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B40u); } label_BFC0E040: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E040u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0E040: 1000FFF8 beq $zero, $zero, 0xBFC0E024 */ uint32_t psx_brA_BFC0E040 = cpu->gpr[0]; uint32_t psx_brB_BFC0E040 = cpu->gpr[0]; psx_taken_BFC0E040 = (psx_brA_BFC0E040 == psx_brB_BFC0E040); psx_delay_BFC0E040 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC0E044: 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(0x80033B44u); #endif if (psx_delay_BFC0E040) { psx_delay_BFC0E040 = 0; if (psx_taken_BFC0E040) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B24u); goto label_BFC0E024; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B48u); } label_BFC0E048: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E048u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC0E048: 1000FE33 beq $zero, $zero, 0xBFC0D918 */ uint32_t psx_brA_BFC0E048 = cpu->gpr[0]; uint32_t psx_brB_BFC0E048 = cpu->gpr[0]; psx_taken_BFC0E048 = (psx_brA_BFC0E048 == psx_brB_BFC0E048); psx_delay_BFC0E048 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC0E04C: 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(0x80033B4Cu); #endif if (psx_delay_BFC0E048) { psx_delay_BFC0E048 = 0; if (psx_taken_BFC0E048) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033418u); cpu->pc = 0x80033418u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B50u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x80033B50u); cpu->pc = 0x80033B50u; return; /* fallthrough */ } void OpenBIOS_func_1FC0E050(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x1FC0E050u); int psx_delay_BFC0E054 = 0; label_BFC0E050: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x1FC0E050u); #endif #ifdef PSX_COSIM cosim_block(0x1FC0E050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x80033B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0E050: 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(0x80033B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC0E054: 01400008 jr $t2 */ psx_delay_BFC0E054 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC0E058: 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(0x80033B58u); #endif if (psx_delay_BFC0E054) { psx_delay_BFC0E054 = 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 OpenBIOS_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_BFC1E514 = 0; int psx_taken_BFC1E514 = 0; int psx_delay_BFC1E520 = 0; int psx_taken_BFC1E520 = 0; int psx_delay_BFC1E534 = 0; int psx_taken_BFC1E534 = 0; int psx_delay_BFC1E53C = 0; int psx_delay_BFC1E574 = 0; uint32_t psx_jrt_BFC1E574 = 0; int psx_delay_BFC1E5A4 = 0; int psx_taken_BFC1E5A4 = 0; int psx_delay_BFC1E6AC = 0; int psx_taken_BFC1E6AC = 0; int psx_delay_BFC1E6B4 = 0; int psx_taken_BFC1E6B4 = 0; int psx_delay_BFC1E6BC = 0; int psx_taken_BFC1E6BC = 0; int psx_delay_BFC1E6C4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E51Cu: goto label_BFC1E51C; case 0xBFC1E528u: goto label_BFC1E528; case 0xBFC1E530u: goto label_BFC1E530; case 0xBFC1E53Cu: goto label_BFC1E53C; case 0xBFC1E540u: goto label_BFC1E540; case 0xBFC1E58Cu: goto label_BFC1E58C; case 0xBFC1E594u: goto label_BFC1E594; case 0xBFC1E59Cu: goto label_BFC1E59C; case 0xBFC1E5A4u: goto label_BFC1E5A4; case 0xBFC1E5A8u: goto label_BFC1E5A8; case 0xBFC1E5ACu: goto label_BFC1E5AC; case 0xBFC1E6B4u: goto label_BFC1E6B4; case 0xBFC1E6BCu: goto label_BFC1E6BC; case 0xBFC1E6C4u: goto label_BFC1E6C4; default: break; } } label_BFC1E514: #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, 0x41u); #endif /* 0xBFC1E514: 10C0006B beq $a2, $zero, 0xBFC1E6C4 */ uint32_t psx_brA_BFC1E514 = cpu->gpr[6]; uint32_t psx_brB_BFC1E514 = cpu->gpr[0]; psx_taken_BFC1E514 = (psx_brA_BFC1E514 == psx_brB_BFC1E514); psx_delay_BFC1E514 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC1E518: 00801025 or $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(0x00801025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000544u); #endif if (psx_delay_BFC1E514) { psx_delay_BFC1E514 = 0; if (psx_taken_BFC1E514) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006F0u); goto label_BFC1E6C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000548u); } label_BFC1E51C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000548u); #endif #ifdef PSX_COSIM cosim_block(0x00000548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1E51C: 2CC30020 sltiu $v1, $a2, 32 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < 0x00000020u ? 1 : 0); PGXP_ALU(0x2CC30020u, cpu->gpr[3], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x00000548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E520: 10600007 beq $v1, $zero, 0xBFC1E540 */ uint32_t psx_brA_BFC1E520 = cpu->gpr[3]; 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_icache_fetch(cpu, 0x00000550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x121u); #endif /* 0xBFC1E524: 00A04025 or $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(0x00A04025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000550u); #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, 0x0000056Cu); goto label_BFC1E540; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000554u); } label_BFC1E528: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1E528: 00C43021 addu $a2, $a2, $a0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[6] + cpu->gpr[4]; PGXP_ALU(0x00C43021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1E52C: 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(0x00000558u); #endif label_BFC1E530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000055Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E530: A0850000 sb $a1, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000055Cu; 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(0x0000055Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1E534: 1486FFFE bne $a0, $a2, 0xBFC1E530 */ uint32_t psx_brA_BFC1E534 = cpu->gpr[4]; uint32_t psx_brB_BFC1E534 = cpu->gpr[6]; psx_taken_BFC1E534 = (psx_brA_BFC1E534 != psx_brB_BFC1E534); psx_delay_BFC1E534 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E538: 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(0x00000564u); #endif if (psx_delay_BFC1E534) { psx_delay_BFC1E534 = 0; if (psx_taken_BFC1E534) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000055Cu); goto label_BFC1E530; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000568u); } label_BFC1E53C: #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, 0x80000001u); #endif /* 0xBFC1E53C: 03E00008 jr $ra */ psx_delay_BFC1E53C = 1; label_BFC1E540: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000056Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000056Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000056Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC1E540: 00084200 sll $t0, $t0, 8 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = cpu->gpr[8] << 8u; PGXP_ALU(0x00084200u, cpu->gpr[8], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x0000056Cu); #endif if (psx_delay_BFC1E53C) { psx_delay_BFC1E53C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC1E544: 01054025 or $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(0x01054025u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x121u); #endif /* 0xBFC1E548: 01002825 or $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(0x01002825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC1E54C: 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(0x00000578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC1E550: 00A82825 or $a1, $a1, $t0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[5] = cpu->gpr[5] | cpu->gpr[8]; PGXP_ALU(0x00A82825u, cpu->gpr[5], _pgx1, _pgx2); } #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, 0x18u); #endif /* 0xBFC1E554: 30830003 andi $v1, $a0, 0x3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x3u; PGXP_ALU(0x30830003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00000580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC1E558: 3C090000 lui $t1, 0x0 */ cpu->gpr[9] = 0x00000000u; PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC1E55C: 252905A8 addiu $t1, $t1, 1448 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (1448)); PGXP_ALU(0x252905A8u, cpu->gpr[9], _pgx1, 0x000005A8u); } #ifdef PSX_COSIM cosim_instr(0x00000588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC1E560: 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(0x0000058Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1E564: 00C33023 subu $a2, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = cpu->gpr[6] - cpu->gpr[3]; PGXP_ALU(0x00C33023u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC1E568: 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(0x00000594u); #endif /* 0xBFC1E56C: 8D490000 lw $t1, 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, 0x00000598u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x400u); } PGXP_LOAD(0x8D490000u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x00000598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC1E570: 00064202 srl $t0, $a2, 8 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[8] = cpu->gpr[6] >> 8u; PGXP_ALU(0x00064202u, cpu->gpr[8], _pgx1, 8u); } #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, 0x201u); #endif /* 0xBFC1E574: 01200008 jr $t1 */ psx_delay_BFC1E574 = 1; psx_jrt_BFC1E574 = cpu->gpr[9]; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x240u); #endif /* 0xBFC1E578: 30C900FF andi $t1, $a2, 0xFF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[9] = cpu->gpr[6] & 0xFFu; PGXP_ALU(0x30C900FFu, cpu->gpr[9], _pgx1, 0x00FFu); } #ifdef PSX_COSIM cosim_instr(0x000005A4u); #endif if (psx_delay_BFC1E574) { psx_delay_BFC1E574 = 0; /* jump table at 0x000005A8, 32 entries */ switch (psx_jrt_BFC1E574) { case 0x000005D0u: #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005D0u); goto label_BFC1E5A4; case 0x000005B8u: #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005B8u); goto label_BFC1E58C; case 0x000005C0u: #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005C0u); goto label_BFC1E594; case 0x000005C8u: #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005C8u); goto label_BFC1E59C; default: #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, psx_jrt_BFC1E574); cpu->pc = psx_jrt_BFC1E574; return; } } label_BFC1E58C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005B8u); #endif #ifdef PSX_COSIM cosim_block(0x000005B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E58C: A0850000 sb $a1, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000005B8u; 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(0x000005B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E590: 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(0x000005BCu); #endif label_BFC1E594: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005C0u); #endif #ifdef PSX_COSIM cosim_block(0x000005C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E594: A0850000 sb $a1, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000005C0u; 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(0x000005C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E598: 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(0x000005C4u); #endif label_BFC1E59C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005C8u); #endif #ifdef PSX_COSIM cosim_block(0x000005C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E59C: A0850000 sb $a1, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000005C8u; 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(0x000005C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E5A0: 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(0x000005CCu); #endif label_BFC1E5A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005D0u); #endif #ifdef PSX_COSIM cosim_block(0x000005D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC1E5A4: 11000043 beq $t0, $zero, 0xBFC1E6B4 */ uint32_t psx_brA_BFC1E5A4 = cpu->gpr[8]; uint32_t psx_brB_BFC1E5A4 = cpu->gpr[0]; psx_taken_BFC1E5A4 = (psx_brA_BFC1E5A4 == psx_brB_BFC1E5A4); psx_delay_BFC1E5A4 = 1; label_BFC1E5A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005D4u); #endif #ifdef PSX_COSIM cosim_block(0x000005D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC1E5A8: 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(0x000005D4u); #endif if (psx_delay_BFC1E5A4) { psx_delay_BFC1E5A4 = 0; if (psx_taken_BFC1E5A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006E0u); goto label_BFC1E6B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005D8u); } label_BFC1E5AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000005D8u); #endif #ifdef PSX_COSIM cosim_block(0x000005D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5AC: AC850000 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000005D8u); return; } g_debug_last_store_pc = 0x000005D8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5B0: AC850004 sw $a1, 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, 0x000005DCu); return; } g_debug_last_store_pc = 0x000005DCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5B4: 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, 0x000005E0u); return; } g_debug_last_store_pc = 0x000005E0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850008u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5B8: AC85000C sw $a1, 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, 0x000005E4u); return; } g_debug_last_store_pc = 0x000005E4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85000Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5BC: AC850010 sw $a1, 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, 0x000005E8u); return; } g_debug_last_store_pc = 0x000005E8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5C0: AC850014 sw $a1, 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, 0x000005ECu); return; } g_debug_last_store_pc = 0x000005ECu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000005F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5C4: AC850018 sw $a1, 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, 0x000005F0u); return; } g_debug_last_store_pc = 0x000005F0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850018u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5C8: AC85001C sw $a1, 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, 0x000005F4u); return; } g_debug_last_store_pc = 0x000005F4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5CC: AC850020 sw $a1, 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, 0x000005F8u); return; } g_debug_last_store_pc = 0x000005F8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850020u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5D0: AC850024 sw $a1, 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, 0x000005FCu); return; } g_debug_last_store_pc = 0x000005FCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000005FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5D4: AC850028 sw $a1, 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, 0x00000600u); return; } g_debug_last_store_pc = 0x00000600u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850028u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5D8: AC85002C sw $a1, 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, 0x00000604u); return; } g_debug_last_store_pc = 0x00000604u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85002Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5DC: AC850030 sw $a1, 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, 0x00000608u); return; } g_debug_last_store_pc = 0x00000608u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850030u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5E0: AC850034 sw $a1, 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, 0x0000060Cu); return; } g_debug_last_store_pc = 0x0000060Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850034u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000060Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5E4: AC850038 sw $a1, 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, 0x00000610u); return; } g_debug_last_store_pc = 0x00000610u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850038u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5E8: AC85003C sw $a1, 60($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 60; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000614u); return; } g_debug_last_store_pc = 0x00000614u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85003Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5EC: AC850040 sw $a1, 64($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 64; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000618u); return; } g_debug_last_store_pc = 0x00000618u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5F0: AC850044 sw $a1, 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, 0x0000061Cu); return; } g_debug_last_store_pc = 0x0000061Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850044u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000061Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5F4: AC850048 sw $a1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000620u); return; } g_debug_last_store_pc = 0x00000620u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850048u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5F8: AC85004C sw $a1, 76($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 76; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000624u); return; } g_debug_last_store_pc = 0x00000624u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85004Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E5FC: AC850050 sw $a1, 80($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 80; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000628u); return; } g_debug_last_store_pc = 0x00000628u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850050u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E600: AC850054 sw $a1, 84($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 84; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000062Cu); return; } g_debug_last_store_pc = 0x0000062Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850054u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000062Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E604: AC850058 sw $a1, 88($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 88; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000630u); return; } g_debug_last_store_pc = 0x00000630u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850058u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E608: AC85005C sw $a1, 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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000634u); return; } g_debug_last_store_pc = 0x00000634u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85005Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E60C: AC850060 sw $a1, 96($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 96; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000638u); return; } g_debug_last_store_pc = 0x00000638u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850060u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E610: AC850064 sw $a1, 100($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 100; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000063Cu); return; } g_debug_last_store_pc = 0x0000063Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850064u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000063Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E614: AC850068 sw $a1, 104($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 104; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (104)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000640u); return; } g_debug_last_store_pc = 0x00000640u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850068u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E618: 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, 0x00000644u); return; } g_debug_last_store_pc = 0x00000644u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85006Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E61C: AC850070 sw $a1, 112($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 112; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000648u); return; } g_debug_last_store_pc = 0x00000648u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850070u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E620: AC850074 sw $a1, 116($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 116; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000064Cu); return; } g_debug_last_store_pc = 0x0000064Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850074u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000064Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E624: AC850078 sw $a1, 120($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000650u); return; } g_debug_last_store_pc = 0x00000650u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850078u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E628: AC85007C sw $a1, 124($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 124; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000654u); return; } g_debug_last_store_pc = 0x00000654u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85007Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E62C: AC850080 sw $a1, 128($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000658u); return; } g_debug_last_store_pc = 0x00000658u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850080u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000658u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E630: AC850084 sw $a1, 132($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 132; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000065Cu); return; } g_debug_last_store_pc = 0x0000065Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850084u, _pgxa, cpu->gpr[5]); } #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, 0x30u); #endif /* 0xBFC1E634: AC850088 sw $a1, 136($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 136; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000660u); return; } g_debug_last_store_pc = 0x00000660u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850088u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E638: AC85008C sw $a1, 140($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 140; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000664u); return; } g_debug_last_store_pc = 0x00000664u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85008Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E63C: AC850090 sw $a1, 144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 144; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000668u); return; } g_debug_last_store_pc = 0x00000668u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850090u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E640: AC850094 sw $a1, 148($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 148; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (148)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000066Cu); return; } g_debug_last_store_pc = 0x0000066Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850094u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000066Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E644: AC850098 sw $a1, 152($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 152; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (152)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000670u); return; } g_debug_last_store_pc = 0x00000670u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850098u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E648: AC85009C sw $a1, 156($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 156; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (156)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000674u); return; } g_debug_last_store_pc = 0x00000674u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC85009Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E64C: AC8500A0 sw $a1, 160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 160; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (160)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000678u); return; } g_debug_last_store_pc = 0x00000678u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500A0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E650: AC8500A4 sw $a1, 164($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 164; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (164)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000067Cu); return; } g_debug_last_store_pc = 0x0000067Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500A4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000067Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E654: AC8500A8 sw $a1, 168($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (168)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000680u); return; } g_debug_last_store_pc = 0x00000680u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500A8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E658: AC8500AC sw $a1, 172($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 172; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (172)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000684u); return; } g_debug_last_store_pc = 0x00000684u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500ACu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E65C: AC8500B0 sw $a1, 176($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 176; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (176)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000688u); return; } g_debug_last_store_pc = 0x00000688u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500B0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E660: AC8500B4 sw $a1, 180($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 180; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (180)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000068Cu); return; } g_debug_last_store_pc = 0x0000068Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500B4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000068Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E664: AC8500B8 sw $a1, 184($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 184; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (184)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000690u); return; } g_debug_last_store_pc = 0x00000690u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500B8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E668: AC8500BC sw $a1, 188($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 188; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (188)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000694u); return; } g_debug_last_store_pc = 0x00000694u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500BCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E66C: AC8500C0 sw $a1, 192($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 192; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (192)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000698u); return; } g_debug_last_store_pc = 0x00000698u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500C0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E670: AC8500C4 sw $a1, 196($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 196; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (196)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000069Cu); return; } g_debug_last_store_pc = 0x0000069Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500C4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000069Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E674: AC8500C8 sw $a1, 200($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 200; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (200)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006A0u); return; } g_debug_last_store_pc = 0x000006A0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500C8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E678: AC8500CC sw $a1, 204($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 204; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (204)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006A4u); return; } g_debug_last_store_pc = 0x000006A4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500CCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E67C: AC8500D0 sw $a1, 208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006A8u); return; } g_debug_last_store_pc = 0x000006A8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500D0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E680: AC8500D4 sw $a1, 212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006ACu); return; } g_debug_last_store_pc = 0x000006ACu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500D4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E684: AC8500D8 sw $a1, 216($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 216; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (216)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006B0u); return; } g_debug_last_store_pc = 0x000006B0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500D8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E688: AC8500DC sw $a1, 220($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 220; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (220)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006B4u); return; } g_debug_last_store_pc = 0x000006B4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500DCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E68C: AC8500E0 sw $a1, 224($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 224; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (224)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006B8u); return; } g_debug_last_store_pc = 0x000006B8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500E0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E690: AC8500E4 sw $a1, 228($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 228; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (228)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006BCu); return; } g_debug_last_store_pc = 0x000006BCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500E4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E694: AC8500E8 sw $a1, 232($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 232; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (232)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006C0u); return; } g_debug_last_store_pc = 0x000006C0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500E8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E698: AC8500EC sw $a1, 236($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 236; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (236)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006C4u); return; } g_debug_last_store_pc = 0x000006C4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500ECu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E69C: AC8500F0 sw $a1, 240($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 240; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (240)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006C8u); return; } g_debug_last_store_pc = 0x000006C8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500F0u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E6A0: AC8500F4 sw $a1, 244($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 244; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (244)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006CCu); return; } g_debug_last_store_pc = 0x000006CCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500F4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E6A4: AC8500F8 sw $a1, 248($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 248; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (248)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006D0u); return; } g_debug_last_store_pc = 0x000006D0u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500F8u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E6A8: AC8500FC sw $a1, 252($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 252; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (252)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000006D4u); return; } g_debug_last_store_pc = 0x000006D4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC8500FCu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000006D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC1E6AC: 1500FFBE bne $t0, $zero, 0xBFC1E5A8 */ uint32_t psx_brA_BFC1E6AC = cpu->gpr[8]; uint32_t psx_brB_BFC1E6AC = cpu->gpr[0]; psx_taken_BFC1E6AC = (psx_brA_BFC1E6AC != psx_brB_BFC1E6AC); psx_delay_BFC1E6AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E6B0: 24840100 addiu $a0, $a0, 256 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (256)); PGXP_ALU(0x24840100u, cpu->gpr[4], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x000006DCu); #endif if (psx_delay_BFC1E6AC) { psx_delay_BFC1E6AC = 0; if (psx_taken_BFC1E6AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000005D4u); goto label_BFC1E5A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006E0u); } label_BFC1E6B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000006E0u); #endif #ifdef PSX_COSIM cosim_block(0x000006E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E6B4: 11200003 beq $t1, $zero, 0xBFC1E6C4 */ uint32_t psx_brA_BFC1E6B4 = cpu->gpr[9]; uint32_t psx_brB_BFC1E6B4 = cpu->gpr[0]; psx_taken_BFC1E6B4 = (psx_brA_BFC1E6B4 == psx_brB_BFC1E6B4); psx_delay_BFC1E6B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x250u); #endif /* 0xBFC1E6B8: 01243021 addu $a2, $t1, $a0 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[9] + cpu->gpr[4]; PGXP_ALU(0x01243021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000006E4u); #endif if (psx_delay_BFC1E6B4) { psx_delay_BFC1E6B4 = 0; if (psx_taken_BFC1E6B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006F0u); goto label_BFC1E6C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006E8u); } label_BFC1E6BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000006E8u); #endif #ifdef PSX_COSIM cosim_block(0x000006E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E6BC: 1000FF9C beq $zero, $zero, 0xBFC1E530 */ uint32_t psx_brA_BFC1E6BC = cpu->gpr[0]; uint32_t psx_brB_BFC1E6BC = cpu->gpr[0]; psx_taken_BFC1E6BC = (psx_brA_BFC1E6BC == psx_brB_BFC1E6BC); psx_delay_BFC1E6BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1E6C0: 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(0x000006ECu); #endif if (psx_delay_BFC1E6BC) { psx_delay_BFC1E6BC = 0; if (psx_taken_BFC1E6BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000055Cu); goto label_BFC1E530; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006F0u); } label_BFC1E6C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000006F0u); #endif #ifdef PSX_COSIM cosim_block(0x000006F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1E6C4: 03E00008 jr $ra */ psx_delay_BFC1E6C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E6C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000006F4u); #endif if (psx_delay_BFC1E6C4) { psx_delay_BFC1E6C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000006F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000006F8u); label_BFC1E6CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000006F8u); #endif #ifdef PSX_COSIM cosim_block(0x000006F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000006F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E6CC: 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(0x000006F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E6D0: 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(0x000006FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1E6D4: 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, 0x00000700u); return; } g_debug_last_store_pc = 0x00000700u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC1E6D8: 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, 0x00000704u); return; } g_debug_last_store_pc = 0x00000704u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00000704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1E6DC: 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, 0x00000708u); return; } g_debug_last_store_pc = 0x00000708u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00000708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000070Cu); cpu->pc = 0x0000070Cu; return; /* fallthrough */ } void OpenBIOS_func_0000070C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000070Cu); int psx_delay_BFC1E6EC = 0; int psx_delay_BFC1E6FC = 0; int psx_delay_BFC1E70C = 0; int psx_delay_BFC1E71C = 0; int psx_delay_BFC1E740 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E6F4u: goto label_BFC1E6F4; case 0xBFC1E704u: goto label_BFC1E704; case 0xBFC1E714u: goto label_BFC1E714; case 0xBFC1E724u: goto label_BFC1E724; default: break; } } label_BFC1E6E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000070Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000070Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000070Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC1E6E0: 3C11F000 lui $s1, 0xF000 */ cpu->gpr[17] = 0xF0000000u; PGXP_ALU(0x3C11F000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000070Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC1E6E4: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x00000710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E6E8: 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(0x00000714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E6EC: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x00000720u; /* jalr link before delay slot */ psx_delay_BFC1E6EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E6F0: 26240003 addiu $a0, $s1, 3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (3)); PGXP_ALU(0x26240003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x0000071Cu); #endif if (psx_delay_BFC1E6EC) { psx_delay_BFC1E6EC = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x00000720u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E6F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000720u); #endif #ifdef PSX_COSIM cosim_block(0x00000720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E6F4: 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(0x00000720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E6F8: 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(0x00000724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E6FC: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x00000730u; /* jalr link before delay slot */ psx_delay_BFC1E6FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E700: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x0000072Cu); #endif if (psx_delay_BFC1E6FC) { psx_delay_BFC1E6FC = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x00000730u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E704: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000730u); #endif #ifdef PSX_COSIM cosim_block(0x00000730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E704: 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(0x00000730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E708: 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(0x00000734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E70C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x00000740u; /* jalr link before delay slot */ psx_delay_BFC1E70C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E710: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x0000073Cu); #endif if (psx_delay_BFC1E70C) { psx_delay_BFC1E70C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x00000740u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000740u); #endif #ifdef PSX_COSIM cosim_block(0x00000740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E714: 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(0x00000740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E718: 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(0x00000744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E71C: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x00000750u; /* jalr link before delay slot */ psx_delay_BFC1E71C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E720: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x0000074Cu); #endif if (psx_delay_BFC1E71C) { psx_delay_BFC1E71C = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x00000750u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000750u); #endif #ifdef PSX_COSIM cosim_block(0x00000750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E724: 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(0x00000750u); #endif /* 0xBFC1E728: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000754u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E72C: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00000758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2010001u); #endif /* 0xBFC1E730: 0200C825 or $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(0x0200C825u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000075Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000760u); #endif /* 0xBFC1E734: 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, 0x00000760u); 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(0x00000760u); #endif /* 0xBFC1E738: 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, 0x00000764u); 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(0x00000764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E73C: 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(0x00000768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC1E740: 03200008 jr $t9 */ psx_delay_BFC1E740 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E744: 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(0x00000770u); #endif if (psx_delay_BFC1E740) { psx_delay_BFC1E740 = 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 OpenBIOS_func_00000774(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000774u); int psx_delay_BFC1E768 = 0; int psx_delay_BFC1E778 = 0; int psx_delay_BFC1E788 = 0; int psx_delay_BFC1E798 = 0; int psx_delay_BFC1E7A8 = 0; int psx_delay_BFC1E7B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E770u: goto label_BFC1E770; case 0xBFC1E780u: goto label_BFC1E780; case 0xBFC1E790u: goto label_BFC1E790; case 0xBFC1E7A0u: goto label_BFC1E7A0; case 0xBFC1E7B0u: goto label_BFC1E7B0; case 0xBFC1E7C0u: goto label_BFC1E7C0; default: break; } } label_BFC1E748: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000774u); #endif #ifdef PSX_COSIM cosim_block(0x00000774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E748: 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(0x00000774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E74C: 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(0x00000778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1E750: 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, 0x0000077Cu); return; } g_debug_last_store_pc = 0x0000077Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x0000077Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC1E754: 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, 0x00000780u); return; } g_debug_last_store_pc = 0x00000780u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00000780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1E758: 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, 0x00000784u); return; } g_debug_last_store_pc = 0x00000784u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00000784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC1E75C: 3C11F000 lui $s1, 0xF000 */ cpu->gpr[17] = 0xF0000000u; PGXP_ALU(0x3C11F000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC1E760: 241000B0 addiu $s0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241000B0u, cpu->gpr[16], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x0000078Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E764: 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(0x00000790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E768: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x0000079Cu; /* jalr link before delay slot */ psx_delay_BFC1E768 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E76C: 26240003 addiu $a0, $s1, 3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (3)); PGXP_ALU(0x26240003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00000798u); #endif if (psx_delay_BFC1E768) { psx_delay_BFC1E768 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x0000079Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E770: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000079Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E770: 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(0x0000079Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E774: 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(0x000007A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E778: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x000007ACu; /* jalr link before delay slot */ psx_delay_BFC1E778 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E77C: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007A8u); #endif if (psx_delay_BFC1E778) { psx_delay_BFC1E778 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x000007ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E780: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000007ACu); #endif #ifdef PSX_COSIM cosim_block(0x000007ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E780: 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(0x000007ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E784: 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(0x000007B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E788: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x000007BCu; /* jalr link before delay slot */ psx_delay_BFC1E788 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E78C: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007B8u); #endif if (psx_delay_BFC1E788) { psx_delay_BFC1E788 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x000007BCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E790: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000007BCu); #endif #ifdef PSX_COSIM cosim_block(0x000007BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E790: 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(0x000007BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E794: 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(0x000007C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E798: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x000007CCu; /* jalr link before delay slot */ psx_delay_BFC1E798 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E79C: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007C8u); #endif if (psx_delay_BFC1E798) { psx_delay_BFC1E798 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x000007CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E7A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000007CCu); #endif #ifdef PSX_COSIM cosim_block(0x000007CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E7A0: 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(0x000007CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E7A4: 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(0x000007D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E7A8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x000007DCu; /* jalr link before delay slot */ psx_delay_BFC1E7A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E7AC: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007D8u); #endif if (psx_delay_BFC1E7A8) { psx_delay_BFC1E7A8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x000007DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E7B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000007DCu); #endif #ifdef PSX_COSIM cosim_block(0x000007DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E7B0: 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(0x000007DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E7B4: 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(0x000007E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010000u); #endif /* 0xBFC1E7B8: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x000007ECu; /* jalr link before delay slot */ psx_delay_BFC1E7B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E7BC: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007E8u); #endif if (psx_delay_BFC1E7B8) { psx_delay_BFC1E7B8 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x000007ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E7C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000007ECu); #endif #ifdef PSX_COSIM cosim_block(0x000007ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E7C0: 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(0x000007ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000007F0u); #endif /* 0xBFC1E7C4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000007F0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000007F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC1E7C8: 36240003 ori $a0, $s1, 0x3 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = cpu->gpr[17] | 0x3u; PGXP_ALU(0x36240003u, cpu->gpr[4], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x000007F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2010001u); #endif /* 0xBFC1E7CC: 0200C825 or $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(0x0200C825u, cpu->gpr[25], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000007F8u); #endif /* 0xBFC1E7D0: 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, 0x000007FCu); 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(0x000007FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000800u); cpu->pc = 0x00000800u; return; /* fallthrough */ } void OpenBIOS_func_00000800(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000800u); label_BFC1E7D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000800u); #endif #ifdef PSX_COSIM cosim_block(0x00000800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000800u); #endif /* 0xBFC1E7D4: 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, 0x00000800u); 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(0x00000800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E7D8: 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(0x00000804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000808u); cpu->pc = 0x00000808u; return; /* fallthrough */ } void OpenBIOS_func_00000808(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000808u); int psx_delay_BFC1E7DC = 0; label_BFC1E7DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000808u); #endif #ifdef PSX_COSIM cosim_block(0x00000808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC1E7DC: 03200008 jr $t9 */ psx_delay_BFC1E7DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E7E0: 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(0x0000080Cu); #endif if (psx_delay_BFC1E7DC) { psx_delay_BFC1E7DC = 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 OpenBIOS_func_00000810(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000810u); label_BFC1E7E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000810u); #endif #ifdef PSX_COSIM cosim_block(0x00000810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E7E4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000814u); cpu->pc = 0x00000814u; return; /* fallthrough */ } void OpenBIOS_func_00000814(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000814u); label_BFC1E7E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000814u); #endif #ifdef PSX_COSIM cosim_block(0x00000814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000814u); #endif /* 0xBFC1E7E8: 8C625EFC lw $v0, 24316($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24316; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000814u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C625EFCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E7EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000081Cu); cpu->pc = 0x0000081Cu; return; /* fallthrough */ } void OpenBIOS_func_0000081C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000081Cu); int psx_delay_BFC1E7F0 = 0; int psx_taken_BFC1E7F0 = 0; label_BFC1E7F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000081Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000081Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000081Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E7F0: 14400002 bne $v0, $zero, 0xBFC1E7FC */ uint32_t psx_brA_BFC1E7F0 = cpu->gpr[2]; uint32_t psx_brB_BFC1E7F0 = cpu->gpr[0]; psx_taken_BFC1E7F0 = (psx_brA_BFC1E7F0 != psx_brB_BFC1E7F0); /* DELAY (orphaned) 0xBFC1E7F4: 2402FFFF addiu $v0, $zero, -1 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000820u); #endif #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_BFC1E7F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000828u); cpu->pc = 0x00000828u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000824u); cpu->pc = 0x00000824u; return; } void OpenBIOS_func_00000820(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000820u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E7F8u: goto label_BFC1E7F8; case 0xBFC1E7FCu: goto label_BFC1E7FC; default: break; } } label_BFC1E7F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000820u); #endif #ifdef PSX_COSIM cosim_block(0x00000820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E7F4: 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(0x00000820u); #endif label_BFC1E7F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000824u); #endif #ifdef PSX_COSIM cosim_block(0x00000824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E7F8: AC625EFC sw $v0, 24316($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24316; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000824u); return; } g_debug_last_store_pc = 0x00000824u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625EFCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000824u); #endif label_BFC1E7FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000828u); #endif #ifdef PSX_COSIM cosim_block(0x00000828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E7FC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E800: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000082Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000082Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000830u); #endif /* 0xBFC1E804: 90441800 lbu $a0, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6144)), 4, 0x4u); PGXP_LOAD(0x90441800u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E808: A0401803 sb $zero, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000834u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401803u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000838u); cpu->pc = 0x00000838u; return; /* fallthrough */ } void OpenBIOS_func_00000838(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000838u); label_BFC1E80C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000838u); #endif #ifdef PSX_COSIM cosim_block(0x00000838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000838u); #endif /* 0xBFC1E80C: 90441803 lbu $a0, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6147)), 4, 0x4u); PGXP_LOAD(0x90441803u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000083Cu); cpu->pc = 0x0000083Cu; return; /* fallthrough */ } void OpenBIOS_func_0000083C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000083Cu); label_BFC1E810: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000083Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000083Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000083Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1E810: 2404FF80 addiu $a0, $zero, -128 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (-128)); PGXP_ALU(0x2404FF80u, cpu->gpr[4], _pgx1, 0xFFFFFF80u); } #ifdef PSX_COSIM cosim_instr(0x0000083Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000840u); cpu->pc = 0x00000840u; return; /* fallthrough */ } void OpenBIOS_func_00000840(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000840u); label_BFC1E814: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000840u); #endif #ifdef PSX_COSIM cosim_block(0x00000840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E814: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000840u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E818: A0441803 sb $a0, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000844u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441803u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E81C: 3C040002 lui $a0, 0x2 */ cpu->gpr[4] = 0x00020000u; PGXP_ALU(0x3C040002u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E820: 24840943 addiu $a0, $a0, 2371 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (2371)); PGXP_ALU(0x24840943u, cpu->gpr[4], _pgx1, 0x00000943u); } #ifdef PSX_COSIM cosim_instr(0x0000084Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E824: AC441018 sw $a0, 4120($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4120; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000850u); return; } g_debug_last_store_pc = 0x00000850u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1E828: 2404132C addiu $a0, $zero, 4908 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (4908)); PGXP_ALU(0x2404132Cu, cpu->gpr[4], _pgx1, 0x0000132Cu); } #ifdef PSX_COSIM cosim_instr(0x00000854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E82C: AC441020 sw $a0, 4128($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4128; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000858u); return; } g_debug_last_store_pc = 0x00000858u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000858u); #endif /* 0xBFC1E830: 8C645EFC lw $a0, 24316($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24316; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000085Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C645EFCu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000085Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000860u); cpu->pc = 0x00000860u; return; /* fallthrough */ } void OpenBIOS_func_00000860(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000860u); label_BFC1E834: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000860u); #endif #ifdef PSX_COSIM cosim_block(0x00000860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC1E834: 3C0700FF lui $a3, 0xFF */ cpu->gpr[7] = 0x00FF0000u; PGXP_ALU(0x3C0700FFu, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E838: 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(0x00000864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1E83C: AC645EFC sw $a0, 24316($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24316; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000868u); return; } g_debug_last_store_pc = 0x00000868u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC645EFCu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000868u); #endif /* 0xBFC1E840: 8C4410F4 lw $a0, 4340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000086Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C4410F4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000086Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC1E844: 34E7FFFF ori $a3, $a3, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] | 0xFFFFu; PGXP_ALU(0x34E7FFFFu, cpu->gpr[7], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x00000870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000874u); cpu->pc = 0x00000874u; return; /* fallthrough */ } void OpenBIOS_func_00000874(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000874u); int psx_delay_BFC1E8A4 = 0; int psx_taken_BFC1E8A4 = 0; int psx_delay_BFC1E8C4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E8ACu: goto label_BFC1E8AC; case 0xBFC1E8C4u: goto label_BFC1E8C4; default: break; } } label_BFC1E848: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000874u); #endif #ifdef PSX_COSIM cosim_block(0x00000874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC1E848: 00872024 and $a0, $a0, $a3 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[7]; PGXP_ALU(0x00872024u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC1E84C: 3C070088 lui $a3, 0x88 */ cpu->gpr[7] = 0x00880000u; PGXP_ALU(0x3C070088u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1E850: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000087Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC1E854: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC1E858: 00872025 or $a0, $a0, $a3 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[4] = cpu->gpr[4] | cpu->gpr[7]; PGXP_ALU(0x00872025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000884u); #endif /* 0xBFC1E85C: 8D065F04 lw $a2, 24324($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 24324; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (24324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000888u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x100u); } PGXP_LOAD(0x8D065F04u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00000888u); #endif /* 0xBFC1E860: 8CA95EF4 lw $t1, 24308($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24308; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000088Cu); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x20u); } PGXP_LOAD(0x8CA95EF4u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x0000088Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E864: AC4410F4 sw $a0, 4340($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000890u); return; } g_debug_last_store_pc = 0x00000890u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC4410F4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000890u); #endif /* 0xBFC1E868: 8C4410F0 lw $a0, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000894u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C4410F0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E86C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E870: 34848000 ori $a0, $a0, 0x8000 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x8000u; PGXP_ALU(0x34848000u, cpu->gpr[4], _pgx1, 0x8000u); } #ifdef PSX_COSIM cosim_instr(0x0000089Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E874: AC4410F0 sw $a0, 4336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008A0u); return; } g_debug_last_store_pc = 0x000008A0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC4410F0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000008A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E878: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000008A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1E87C: 00C42025 or $a0, $a2, $a0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[6] | cpu->gpr[4]; PGXP_ALU(0x00C42025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000008A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x204u); #endif /* 0xBFC1E880: AC4910B0 sw $t1, 4272($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4272; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4272)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008ACu); return; } g_debug_last_store_pc = 0x000008ACu; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAC4910B0u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x000008ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E884: AC4410B4 sw $a0, 4276($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4276; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4276)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008B0u); return; } g_debug_last_store_pc = 0x000008B0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC4410B4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000008B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E888: 3C041100 lui $a0, 0x1100 */ cpu->gpr[4] = 0x11000000u; PGXP_ALU(0x3C041100u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000008B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E88C: AC4410B8 sw $a0, 4280($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008B8u); return; } g_debug_last_store_pc = 0x000008B8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC4410B8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000008B8u); #endif /* 0xBFC1E890: 8D065F04 lw $a2, 24324($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 24324; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[8] + (24324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008BCu); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x100u); } PGXP_LOAD(0x8D065F04u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x000008BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008C0u); #endif /* 0xBFC1E894: 8CA45EF4 lw $a0, 24308($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24308; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008C0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x20u); } PGXP_LOAD(0x8CA45EF4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000008C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1E898: 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(0x000008C4u); #endif /* 0xBFC1E89C: 8C635EFC lw $v1, 24316($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24316; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C635EFCu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000008C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1E8A0: 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(0x000008CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8A4: 14600007 bne $v1, $zero, 0xBFC1E8C4 */ uint32_t psx_brA_BFC1E8A4 = cpu->gpr[3]; uint32_t psx_brB_BFC1E8A4 = cpu->gpr[0]; psx_taken_BFC1E8A4 = (psx_brA_BFC1E8A4 != psx_brB_BFC1E8A4); psx_delay_BFC1E8A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1E8A8: ACA45EF4 sw $a0, 24308($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24308; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008D4u); return; } g_debug_last_store_pc = 0x000008D4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA45EF4u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000008D4u); #endif if (psx_delay_BFC1E8A4) { psx_delay_BFC1E8A4 = 0; if (psx_taken_BFC1E8A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000008F0u); goto label_BFC1E8C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000008D8u); } label_BFC1E8AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000008D8u); #endif #ifdef PSX_COSIM cosim_block(0x000008D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8AC: 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(0x000008D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E8B0: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000008DCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000008DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8B4: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000008E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000008E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E8B8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000008E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8BC: 24030FFF addiu $v1, $zero, 4095 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4095)); PGXP_ALU(0x24030FFFu, cpu->gpr[3], _pgx1, 0x00000FFFu); } #ifdef PSX_COSIM cosim_instr(0x000008E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8C0: AC435F10 sw $v1, 24336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000008ECu); return; } g_debug_last_store_pc = 0x000008ECu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000008ECu); #endif label_BFC1E8C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000008F0u); #endif #ifdef PSX_COSIM cosim_block(0x000008F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1E8C4: 03E00008 jr $ra */ psx_delay_BFC1E8C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E8C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000008F4u); #endif if (psx_delay_BFC1E8C4) { psx_delay_BFC1E8C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000008F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000008F8u); int psx_delay_BFC1E914 = 0; label_BFC1E8CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000008F8u); #endif #ifdef PSX_COSIM cosim_block(0x000008F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000008F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E8CC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000008F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8D0: 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(0x000008FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E8D4: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000900u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8D8: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000904u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E8DC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8E0: 24030DDD addiu $v1, $zero, 3549 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); PGXP_ALU(0x24030DDDu, cpu->gpr[3], _pgx1, 0x00000DDDu); } #ifdef PSX_COSIM cosim_instr(0x0000090Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8E4: AC435F10 sw $v1, 24336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000910u); return; } g_debug_last_store_pc = 0x00000910u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E8E8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8EC: 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(0x00000918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8F0: AC435F0C sw $v1, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000091Cu); return; } g_debug_last_store_pc = 0x0000091Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000091Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E8F4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E8F8: 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(0x00000924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E8FC: A0435EED sb $v1, 24301($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24301; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000928u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (24301)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0435EEDu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E900: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000092Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E904: 2403FF80 addiu $v1, $zero, -128 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-128)); PGXP_ALU(0x2403FF80u, cpu->gpr[3], _pgx1, 0xFFFFFF80u); } #ifdef PSX_COSIM cosim_instr(0x00000930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E908: A0435EEC sb $v1, 24300($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24300; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000934u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (24300)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0435EECu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E90C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E910: 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(0x0000093Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1E914: 03E00008 jr $ra */ psx_delay_BFC1E914 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E918: AC435EE8 sw $v1, 24296($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000944u); return; } g_debug_last_store_pc = 0x00000944u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435EE8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000944u); #endif if (psx_delay_BFC1E914) { psx_delay_BFC1E914 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00000948(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000948u); int psx_delay_BFC1E944 = 0; label_BFC1E91C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000948u); #endif #ifdef PSX_COSIM cosim_block(0x00000948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000948u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E91C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000948u); #endif /* 0xBFC1E920: 8C445F0C lw $a0, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000094Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C445F0Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000094Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E924: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1E928: AC645F10 sw $a0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000954u); return; } g_debug_last_store_pc = 0x00000954u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC645F10u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1E92C: 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(0x00000958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E930: AC435F0C sw $v1, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000095Cu); return; } g_debug_last_store_pc = 0x0000095Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000095Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E934: 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(0x00000960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E938: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E93C: 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(0x00000968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC1E940: 241900B0 addiu $t9, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x241900B0u, cpu->gpr[25], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x0000096Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC1E944: 03200008 jr $t9 */ psx_delay_BFC1E944 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E948: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00000974u); #endif if (psx_delay_BFC1E944) { psx_delay_BFC1E944 = 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 OpenBIOS_func_00000978(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000978u); int psx_delay_BFC1E95C = 0; int psx_taken_BFC1E95C = 0; int psx_delay_BFC1E970 = 0; int psx_taken_BFC1E970 = 0; int psx_delay_BFC1E9A4 = 0; int psx_taken_BFC1E9A4 = 0; int psx_delay_BFC1E9C4 = 0; int psx_delay_BFC1E9D4 = 0; int psx_delay_BFC1E9E0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E964u: goto label_BFC1E964; case 0xBFC1E978u: goto label_BFC1E978; case 0xBFC1E9ACu: goto label_BFC1E9AC; case 0xBFC1E9CCu: goto label_BFC1E9CC; case 0xBFC1E9DCu: goto label_BFC1E9DC; case 0xBFC1E9E0u: goto label_BFC1E9E0; default: break; } } label_BFC1E94C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000978u); #endif #ifdef PSX_COSIM cosim_block(0x00000978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E94C: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000978u); #endif /* 0xBFC1E950: 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, 0x0000097Cu); 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(0x0000097Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E954: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E958: 30420008 andi $v0, $v0, 0x8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u; PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00000984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E95C: 10400020 beq $v0, $zero, 0xBFC1E9E0 */ uint32_t psx_brA_BFC1E95C = cpu->gpr[2]; uint32_t psx_brB_BFC1E95C = cpu->gpr[0]; psx_taken_BFC1E95C = (psx_brA_BFC1E95C == psx_brB_BFC1E95C); psx_delay_BFC1E95C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E960: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000098Cu); #endif if (psx_delay_BFC1E95C) { psx_delay_BFC1E95C = 0; if (psx_taken_BFC1E95C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A0Cu); goto label_BFC1E9E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000990u); } label_BFC1E964: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000990u); #endif #ifdef PSX_COSIM cosim_block(0x00000990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000990u); #endif /* 0xBFC1E964: 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, 0x00000990u); 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(0x00000990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E968: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000994u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E96C: 30420008 andi $v0, $v0, 0x8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u; PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00000998u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E970: 1040001B beq $v0, $zero, 0xBFC1E9E0 */ uint32_t psx_brA_BFC1E970 = cpu->gpr[2]; uint32_t psx_brB_BFC1E970 = cpu->gpr[0]; psx_taken_BFC1E970 = (psx_brA_BFC1E970 == psx_brB_BFC1E970); psx_delay_BFC1E970 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E974: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000009A0u); #endif if (psx_delay_BFC1E970) { psx_delay_BFC1E970 = 0; if (psx_taken_BFC1E970) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A0Cu); goto label_BFC1E9E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000009A4u); } label_BFC1E978: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000009A4u); #endif #ifdef PSX_COSIM cosim_block(0x000009A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009A4u); #endif /* 0xBFC1E978: 8C8210F4 lw $v0, 4340($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C8210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000009A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E97C: 3C0300FF lui $v1, 0xFF */ cpu->gpr[3] = 0x00FF0000u; PGXP_ALU(0x3C0300FFu, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000009A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E980: 3463FFFF ori $v1, $v1, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0xFFFFu; PGXP_ALU(0x3463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x000009ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E984: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000009B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E988: 3C038800 lui $v1, 0x8800 */ cpu->gpr[3] = 0x88000000u; PGXP_ALU(0x3C038800u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000009B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E98C: 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(0x000009B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1E990: AC8210F4 sw $v0, 4340($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009BCu); return; } g_debug_last_store_pc = 0x000009BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC8210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000009BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1E994: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000009C0u); #endif /* 0xBFC1E998: 8C625EF8 lw $v0, 24312($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24312; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C625EF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000009C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E99C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000009C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E9A0: 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(0x000009CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E9A4: 1440000D bne $v0, $zero, 0xBFC1E9DC */ uint32_t psx_brA_BFC1E9A4 = cpu->gpr[2]; uint32_t psx_brB_BFC1E9A4 = cpu->gpr[0]; psx_taken_BFC1E9A4 = (psx_brA_BFC1E9A4 != psx_brB_BFC1E9A4); psx_delay_BFC1E9A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1E9A8: AC625EF8 sw $v0, 24312($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24312; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009D4u); return; } g_debug_last_store_pc = 0x000009D4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625EF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000009D4u); #endif if (psx_delay_BFC1E9A4) { psx_delay_BFC1E9A4 = 0; if (psx_taken_BFC1E9A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A08u); goto label_BFC1E9DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000009D8u); } label_BFC1E9AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000009D8u); #endif #ifdef PSX_COSIM cosim_block(0x000009D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E9AC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000009D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1E9B0: 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(0x000009DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1E9B4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009E0u); return; } g_debug_last_store_pc = 0x000009E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000009E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E9B8: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000009E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E9BC: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x000009E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1E9C0: 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(0x000009ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC1E9C4: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000009F8u; /* jalr link before delay slot */ psx_delay_BFC1E9C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1E9C8: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x000009F4u); #endif if (psx_delay_BFC1E9C4) { psx_delay_BFC1E9C4 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000009F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1E9CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000009F8u); #endif #ifdef PSX_COSIM cosim_block(0x000009F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000009F8u); #endif /* 0xBFC1E9CC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000009F8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000009F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E9D0: 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(0x000009FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1E9D4: 03E00008 jr $ra */ psx_delay_BFC1E9D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E9D8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00000A04u); #endif if (psx_delay_BFC1E9D4) { psx_delay_BFC1E9D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1E9DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A08u); #endif #ifdef PSX_COSIM cosim_block(0x00000A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E9DC: 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(0x00000A08u); #endif label_BFC1E9E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1E9E0: 03E00008 jr $ra */ psx_delay_BFC1E9E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E9E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A10u); #endif if (psx_delay_BFC1E9E0) { psx_delay_BFC1E9E0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00000A14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000A14u); int psx_delay_BFC1E9F4 = 0; int psx_taken_BFC1E9F4 = 0; int psx_delay_BFC1EA14 = 0; int psx_delay_BFC1EA1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1E9FCu: goto label_BFC1E9FC; case 0xBFC1EA1Cu: goto label_BFC1EA1C; default: break; } } label_BFC1E9E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A14u); #endif #ifdef PSX_COSIM cosim_block(0x00000A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E9E8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000A14u); #endif /* 0xBFC1E9EC: 8C425ED8 lw $v0, 24280($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24280; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A18u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425ED8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1E9F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1E9F4: 10400009 beq $v0, $zero, 0xBFC1EA1C */ uint32_t psx_brA_BFC1E9F4 = cpu->gpr[2]; uint32_t psx_brB_BFC1E9F4 = cpu->gpr[0]; psx_taken_BFC1E9F4 = (psx_brA_BFC1E9F4 == psx_brB_BFC1E9F4); psx_delay_BFC1E9F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1E9F8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000A24u); #endif if (psx_delay_BFC1E9F4) { psx_delay_BFC1E9F4 = 0; if (psx_taken_BFC1E9F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A48u); goto label_BFC1EA1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A28u); } label_BFC1E9FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A28u); #endif #ifdef PSX_COSIM cosim_block(0x00000A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1E9FC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00000A28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EA00: 2403FFFB addiu $v1, $zero, -5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); PGXP_ALU(0x2403FFFBu, cpu->gpr[3], _pgx1, 0xFFFFFFFBu); } #ifdef PSX_COSIM cosim_instr(0x00000A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EA04: 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(0x00000A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1EA08: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A34u); return; } g_debug_last_store_pc = 0x00000A34u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EA0C: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A38u); return; } g_debug_last_store_pc = 0x00000A38u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EA10: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x00000A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC1EA14: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00000A48u; /* jalr link before delay slot */ psx_delay_BFC1EA14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A44u); #endif if (psx_delay_BFC1EA14) { psx_delay_BFC1EA14 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00000A48u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1EA1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A48u); #endif #ifdef PSX_COSIM cosim_block(0x00000A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1EA1C: 03E00008 jr $ra */ psx_delay_BFC1EA1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A4Cu); #endif if (psx_delay_BFC1EA1C) { psx_delay_BFC1EA1C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00000A50(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000A50u); int psx_delay_BFC1EA30 = 0; int psx_taken_BFC1EA30 = 0; int psx_delay_BFC1EA50 = 0; int psx_delay_BFC1EA58 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EA38u: goto label_BFC1EA38; case 0xBFC1EA58u: goto label_BFC1EA58; default: break; } } label_BFC1EA24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A50u); #endif #ifdef PSX_COSIM cosim_block(0x00000A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EA24: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000A50u); #endif /* 0xBFC1EA28: 8C425EDC lw $v0, 24284($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24284; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24284)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A54u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425EDCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EA30: 10400009 beq $v0, $zero, 0xBFC1EA58 */ uint32_t psx_brA_BFC1EA30 = cpu->gpr[2]; uint32_t psx_brB_BFC1EA30 = cpu->gpr[0]; psx_taken_BFC1EA30 = (psx_brA_BFC1EA30 == psx_brB_BFC1EA30); psx_delay_BFC1EA30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EA34: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000A60u); #endif if (psx_delay_BFC1EA30) { psx_delay_BFC1EA30 = 0; if (psx_taken_BFC1EA30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A84u); goto label_BFC1EA58; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000A64u); } label_BFC1EA38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A64u); #endif #ifdef PSX_COSIM cosim_block(0x00000A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1EA38: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00000A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EA3C: 2403FFF7 addiu $v1, $zero, -9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); PGXP_ALU(0x2403FFF7u, cpu->gpr[3], _pgx1, 0xFFFFFFF7u); } #ifdef PSX_COSIM cosim_instr(0x00000A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EA40: 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(0x00000A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1EA44: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A70u); return; } g_debug_last_store_pc = 0x00000A70u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EA48: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000A74u); return; } g_debug_last_store_pc = 0x00000A74u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EA4C: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x00000A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC1EA50: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00000A84u; /* jalr link before delay slot */ psx_delay_BFC1EA50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A80u); #endif if (psx_delay_BFC1EA50) { psx_delay_BFC1EA50 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00000A84u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1EA58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A84u); #endif #ifdef PSX_COSIM cosim_block(0x00000A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1EA58: 03E00008 jr $ra */ psx_delay_BFC1EA58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A88u); #endif if (psx_delay_BFC1EA58) { psx_delay_BFC1EA58 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00000A8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000A8Cu); int psx_delay_BFC1EA70 = 0; int psx_taken_BFC1EA70 = 0; int psx_delay_BFC1EA84 = 0; int psx_taken_BFC1EA84 = 0; int psx_delay_BFC1EAA8 = 0; int psx_taken_BFC1EAA8 = 0; int psx_delay_BFC1EAD8 = 0; int psx_taken_BFC1EAD8 = 0; int psx_delay_BFC1EB24 = 0; int psx_taken_BFC1EB24 = 0; int psx_delay_BFC1EB48 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EA78u: goto label_BFC1EA78; case 0xBFC1EA8Cu: goto label_BFC1EA8C; case 0xBFC1EAB0u: goto label_BFC1EAB0; case 0xBFC1EACCu: goto label_BFC1EACC; case 0xBFC1EAE0u: goto label_BFC1EAE0; case 0xBFC1EB0Cu: goto label_BFC1EB0C; case 0xBFC1EB2Cu: goto label_BFC1EB2C; default: break; } } label_BFC1EA60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000A8Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EA60: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000A90u); #endif /* 0xBFC1EA64: 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, 0x00000A90u); 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(0x00000A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EA6C: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x00000A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EA70: 10400205 beq $v0, $zero, 0xBFC1F288 */ uint32_t psx_brA_BFC1EA70 = cpu->gpr[2]; 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_icache_fetch(cpu, 0x00000AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000AA0u); #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, 0x000012B4u); cpu->pc = 0x000012B4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000AA4u); } label_BFC1EA78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000AA4u); #endif #ifdef PSX_COSIM cosim_block(0x00000AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AA4u); #endif /* 0xBFC1EA78: 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, 0x00000AA4u); 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(0x00000AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EA80: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x00000AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EA84: 10400200 beq $v0, $zero, 0xBFC1F288 */ uint32_t psx_brA_BFC1EA84 = cpu->gpr[2]; uint32_t psx_brB_BFC1EA84 = cpu->gpr[0]; psx_taken_BFC1EA84 = (psx_brA_BFC1EA84 == psx_brB_BFC1EA84); psx_delay_BFC1EA84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EA88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000AB4u); #endif if (psx_delay_BFC1EA84) { psx_delay_BFC1EA84 = 0; if (psx_taken_BFC1EA84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012B4u); cpu->pc = 0x000012B4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000AB8u); } label_BFC1EA8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000AB8u); #endif #ifdef PSX_COSIM cosim_block(0x00000AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EA8C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EA90: 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(0x00000ABCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1EA94: A0651800 sb $a1, 6144($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000AC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (6144)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0651800u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000AC0u); #endif /* 0xBFC1EA98: 90641803 lbu $a0, 6147($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6147; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6147)), 4, 0x8u); PGXP_LOAD(0x90641803u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EA9C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EAA0: A0445EE0 sb $a0, 24288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24288; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000ACCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (24288)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0445EE0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EAA4: 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(0x00000AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EAA8: 10800008 beq $a0, $zero, 0xBFC1EACC */ uint32_t psx_brA_BFC1EAA8 = cpu->gpr[4]; 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, 0x11u); #endif /* 0xBFC1EAAC: 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(0x00000AD8u); #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, 0x00000AF8u); goto label_BFC1EACC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000ADCu); } label_BFC1EAB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000ADCu); #endif #ifdef PSX_COSIM cosim_block(0x00000ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1EAB0: A0651800 sb $a1, 6144($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000ADCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (6144)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0651800u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1EAB4: A0641803 sb $a0, 6147($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000AE0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (6147)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0641803u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EAB8: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EABC: 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, 0x00000AE8u); return; } g_debug_last_store_pc = 0x00000AE8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAC0: 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, 0x00000AECu); return; } g_debug_last_store_pc = 0x00000AECu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAC4: 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, 0x00000AF0u); return; } g_debug_last_store_pc = 0x00000AF0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAC8: 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, 0x00000AF4u); return; } g_debug_last_store_pc = 0x00000AF4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000AF4u); #endif label_BFC1EACC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000AF8u); #endif #ifdef PSX_COSIM cosim_block(0x00000AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000AF8u); #endif /* 0xBFC1EACC: 90435EE0 lbu $v1, 24288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24288; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (24288)), 3, 0x4u); PGXP_LOAD(0x90435EE0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EAD0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EAD4: 30630018 andi $v1, $v1, 0x18 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u; PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); } #ifdef PSX_COSIM cosim_instr(0x00000B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAD8: 1060000C beq $v1, $zero, 0xBFC1EB0C */ uint32_t psx_brA_BFC1EAD8 = cpu->gpr[3]; uint32_t psx_brB_BFC1EAD8 = cpu->gpr[0]; psx_taken_BFC1EAD8 = (psx_brA_BFC1EAD8 == psx_brB_BFC1EAD8); psx_delay_BFC1EAD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EADC: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000B08u); #endif if (psx_delay_BFC1EAD8) { psx_delay_BFC1EAD8 = 0; if (psx_taken_BFC1EAD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000B38u); goto label_BFC1EB0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000B0Cu); } label_BFC1EAE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000B0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAE0: 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(0x00000B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1EAE4: A0831800 sb $v1, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000B10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0831800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000B10u); #endif /* 0xBFC1EAE8: 90435EE0 lbu $v1, 24288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24288; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (24288)), 3, 0x4u); PGXP_LOAD(0x90435EE0u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EAEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000B18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EAF0: 30630018 andi $v1, $v1, 0x18 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x18u; PGXP_ALU(0x30630018u, cpu->gpr[3], _pgx1, 0x0018u); } #ifdef PSX_COSIM cosim_instr(0x00000B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1EAF4: A0831803 sb $v1, 6147($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000B20u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6147)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0831803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EAF8: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EAFC: 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, 0x00000B28u); return; } g_debug_last_store_pc = 0x00000B28u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EB00: 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, 0x00000B2Cu); return; } g_debug_last_store_pc = 0x00000B2Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EB04: 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, 0x00000B30u); return; } g_debug_last_store_pc = 0x00000B30u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EB08: 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, 0x00000B34u); return; } g_debug_last_store_pc = 0x00000B34u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC600000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000B34u); #endif label_BFC1EB0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000B38u); #endif #ifdef PSX_COSIM cosim_block(0x00000B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B38u); #endif /* 0xBFC1EB0C: 90425EE0 lbu $v0, 24288($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24288; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (24288)), 2, 0x4u); PGXP_LOAD(0x90425EE0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EB10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB14: 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(0x00000B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB18: 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(0x00000B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB1C: 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(0x00000B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EB20: 2C430005 sltiu $v1, $v0, 5 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)(cpu->gpr[2] < 0x00000005u ? 1 : 0); PGXP_ALU(0x2C430005u, cpu->gpr[3], _pgx1, 0x0005u); } #ifdef PSX_COSIM cosim_instr(0x00000B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EB24: 106001D7 beq $v1, $zero, 0xBFC1F284 */ uint32_t psx_brA_BFC1EB24 = cpu->gpr[3]; uint32_t psx_brB_BFC1EB24 = cpu->gpr[0]; psx_taken_BFC1EB24 = (psx_brA_BFC1EB24 == psx_brB_BFC1EB24); psx_delay_BFC1EB24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EB28: 3C03BFC1 lui $v1, 0xBFC1 */ cpu->gpr[3] = 0xBFC10000u; PGXP_ALU(0x3C03BFC1u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000B54u); #endif if (psx_delay_BFC1EB24) { psx_delay_BFC1EB24 = 0; if (psx_taken_BFC1EB24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012B0u); cpu->pc = 0x000012B0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000B58u); } label_BFC1EB2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000B58u); #endif #ifdef PSX_COSIM cosim_block(0x00000B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB2C: 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(0x00000B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EB30: 2463A070 addiu $v1, $v1, -24464 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-24464)); PGXP_ALU(0x2463A070u, cpu->gpr[3], _pgx1, 0xFFFFA070u); } #ifdef PSX_COSIM cosim_instr(0x00000B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EB34: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000B60u); #endif /* 0xBFC1EB38: 8C420000 lw $v0, 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, 0x00000B64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1EB3C: 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(0x00000B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1EB40: 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, 0x00000B6Cu); return; } g_debug_last_store_pc = 0x00000B6Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC1EB44: 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, 0x00000B70u); return; } g_debug_last_store_pc = 0x00000B70u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00000B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EB48: 00400008 jr $v0 */ psx_delay_BFC1EB48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1EB4C: 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, 0x00000B78u); return; } g_debug_last_store_pc = 0x00000B78u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00000B78u); #endif if (psx_delay_BFC1EB48) { psx_delay_BFC1EB48 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_00000B7C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000B7Cu); int psx_delay_BFC1EB64 = 0; int psx_taken_BFC1EB64 = 0; int psx_delay_BFC1EB6C = 0; int psx_taken_BFC1EB6C = 0; int psx_delay_BFC1EB74 = 0; int psx_taken_BFC1EB74 = 0; int psx_delay_BFC1EB7C = 0; int psx_taken_BFC1EB7C = 0; int psx_delay_BFC1EB90 = 0; int psx_taken_BFC1EB90 = 0; int psx_delay_BFC1EB98 = 0; int psx_taken_BFC1EB98 = 0; int psx_delay_BFC1EBA0 = 0; int psx_taken_BFC1EBA0 = 0; int psx_delay_BFC1EBAC = 0; int psx_taken_BFC1EBAC = 0; int psx_delay_BFC1EBB8 = 0; int psx_taken_BFC1EBB8 = 0; int psx_delay_BFC1EBC4 = 0; int psx_taken_BFC1EBC4 = 0; int psx_delay_BFC1EBCC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EBB4u: goto label_BFC1EBB4; case 0xBFC1EBB8u: goto label_BFC1EBB8; case 0xBFC1EBCCu: goto label_BFC1EBCC; case 0xBFC1EB6Cu: goto label_BFC1EB6C; case 0xBFC1EB74u: goto label_BFC1EB74; case 0xBFC1EB7Cu: goto label_BFC1EB7C; case 0xBFC1EB84u: goto label_BFC1EB84; case 0xBFC1EB88u: goto label_BFC1EB88; case 0xBFC1EB98u: goto label_BFC1EB98; case 0xBFC1EBA0u: goto label_BFC1EBA0; case 0xBFC1EBA8u: goto label_BFC1EBA8; case 0xBFC1EBC0u: goto label_BFC1EBC0; default: break; } } label_BFC1EB50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000B7Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB50: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B80u); #endif /* 0xBFC1EB54: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB58: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000B84u); #endif /* 0xBFC1EB5C: 8C425F0C lw $v0, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000B88u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB60: 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(0x00000B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB64: 10440019 beq $v0, $a0, 0xBFC1EBCC */ uint32_t psx_brA_BFC1EB64 = cpu->gpr[2]; uint32_t psx_brB_BFC1EB64 = cpu->gpr[4]; psx_taken_BFC1EB64 = (psx_brA_BFC1EB64 == psx_brB_BFC1EB64); psx_delay_BFC1EB64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB68: 2C4400F7 sltiu $a0, $v0, 247 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000F7u ? 1 : 0); PGXP_ALU(0x2C4400F7u, cpu->gpr[4], _pgx1, 0x00F7u); } #ifdef PSX_COSIM cosim_instr(0x00000B94u); #endif if (psx_delay_BFC1EB64) { psx_delay_BFC1EB64 = 0; if (psx_taken_BFC1EB64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BF8u); goto label_BFC1EBCC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000B98u); } label_BFC1EB6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000B98u); #endif #ifdef PSX_COSIM cosim_block(0x00000B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB6C: 10800014 beq $a0, $zero, 0xBFC1EBC0 */ uint32_t psx_brA_BFC1EB6C = cpu->gpr[4]; 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_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB70: 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(0x00000B9Cu); #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, 0x00000BECu); goto label_BFC1EBC0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BA0u); } label_BFC1EB74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BA0u); #endif #ifdef PSX_COSIM cosim_block(0x00000BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB74: 10440020 beq $v0, $a0, 0xBFC1EBF8 */ uint32_t psx_brA_BFC1EB74 = cpu->gpr[2]; uint32_t psx_brB_BFC1EB74 = cpu->gpr[4]; psx_taken_BFC1EB74 = (psx_brA_BFC1EB74 == psx_brB_BFC1EB74); psx_delay_BFC1EB74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB78: 240400EB addiu $a0, $zero, 235 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); PGXP_ALU(0x240400EBu, cpu->gpr[4], _pgx1, 0x000000EBu); } #ifdef PSX_COSIM cosim_instr(0x00000BA4u); #endif if (psx_delay_BFC1EB74) { psx_delay_BFC1EB74 = 0; if (psx_taken_BFC1EB74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C24u); cpu->pc = 0x00000C24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BA8u); } label_BFC1EB7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BA8u); #endif #ifdef PSX_COSIM cosim_block(0x00000BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB7C: 1044001F beq $v0, $a0, 0xBFC1EBFC */ uint32_t psx_brA_BFC1EB7C = cpu->gpr[2]; uint32_t psx_brB_BFC1EB7C = cpu->gpr[4]; psx_taken_BFC1EB7C = (psx_brA_BFC1EB7C == psx_brB_BFC1EB7C); psx_delay_BFC1EB7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EB80: 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(0x00000BACu); #endif if (psx_delay_BFC1EB7C) { psx_delay_BFC1EB7C = 0; if (psx_taken_BFC1EB7C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C28u); cpu->pc = 0x00000C28u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BB0u); } label_BFC1EB84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BB0u); #endif #ifdef PSX_COSIM cosim_block(0x00000BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EB84: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000BB0u); #endif label_BFC1EB88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BB4u); #endif #ifdef PSX_COSIM cosim_block(0x00000BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BB4u); #endif /* 0xBFC1EB88: 8C425F10 lw $v0, 24336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000BB4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB8C: 240400EB addiu $a0, $zero, 235 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); PGXP_ALU(0x240400EBu, cpu->gpr[4], _pgx1, 0x000000EBu); } #ifdef PSX_COSIM cosim_instr(0x00000BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB90: 10440019 beq $v0, $a0, 0xBFC1EBF8 */ uint32_t psx_brA_BFC1EB90 = cpu->gpr[2]; uint32_t psx_brB_BFC1EB90 = cpu->gpr[4]; psx_taken_BFC1EB90 = (psx_brA_BFC1EB90 == psx_brB_BFC1EB90); psx_delay_BFC1EB90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB94: 2C4400EC sltiu $a0, $v0, 236 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x000000ECu ? 1 : 0); PGXP_ALU(0x2C4400ECu, cpu->gpr[4], _pgx1, 0x00ECu); } #ifdef PSX_COSIM cosim_instr(0x00000BC0u); #endif if (psx_delay_BFC1EB90) { psx_delay_BFC1EB90 = 0; if (psx_taken_BFC1EB90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C24u); cpu->pc = 0x00000C24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BC4u); } label_BFC1EB98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BC4u); #endif #ifdef PSX_COSIM cosim_block(0x00000BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EB98: 1080001F beq $a0, $zero, 0xBFC1EC18 */ uint32_t psx_brA_BFC1EB98 = cpu->gpr[4]; uint32_t psx_brB_BFC1EB98 = cpu->gpr[0]; psx_taken_BFC1EB98 = (psx_brA_BFC1EB98 == psx_brB_BFC1EB98); psx_delay_BFC1EB98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EB9C: 2C440006 sltiu $a0, $v0, 6 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000006u ? 1 : 0); PGXP_ALU(0x2C440006u, cpu->gpr[4], _pgx1, 0x0006u); } #ifdef PSX_COSIM cosim_instr(0x00000BC8u); #endif if (psx_delay_BFC1EB98) { psx_delay_BFC1EB98 = 0; if (psx_taken_BFC1EB98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C44u); cpu->pc = 0x00000C44u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BCCu); } label_BFC1EBA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BCCu); #endif #ifdef PSX_COSIM cosim_block(0x00000BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EBA0: 10800012 beq $a0, $zero, 0xBFC1EBEC */ uint32_t psx_brA_BFC1EBA0 = cpu->gpr[4]; uint32_t psx_brB_BFC1EBA0 = cpu->gpr[0]; psx_taken_BFC1EBA0 = (psx_brA_BFC1EBA0 == psx_brB_BFC1EBA0); psx_delay_BFC1EBA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EBA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000BD0u); #endif if (psx_delay_BFC1EBA0) { psx_delay_BFC1EBA0 = 0; if (psx_taken_BFC1EBA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C18u); cpu->pc = 0x00000C18u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BD4u); } label_BFC1EBA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BD4u); #endif #ifdef PSX_COSIM cosim_block(0x00000BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EBA8: 2C420003 sltiu $v0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00000BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EBAC: 10400022 beq $v0, $zero, 0xBFC1EC38 */ uint32_t psx_brA_BFC1EBAC = cpu->gpr[2]; uint32_t psx_brB_BFC1EBAC = cpu->gpr[0]; psx_taken_BFC1EBAC = (psx_brA_BFC1EBAC == psx_brB_BFC1EBAC); psx_delay_BFC1EBAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EBB0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000BDCu); #endif if (psx_delay_BFC1EBAC) { psx_delay_BFC1EBAC = 0; if (psx_taken_BFC1EBAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C64u); cpu->pc = 0x00000C64u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE0u); } label_BFC1EBB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BE0u); #endif #ifdef PSX_COSIM cosim_block(0x00000BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EBB4: 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(0x00000BE0u); #endif label_BFC1EBB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BE4u); #endif #ifdef PSX_COSIM cosim_block(0x00000BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EBB8: 10000011 beq $zero, $zero, 0xBFC1EC00 */ uint32_t psx_brA_BFC1EBB8 = cpu->gpr[0]; uint32_t psx_brB_BFC1EBB8 = cpu->gpr[0]; psx_taken_BFC1EBB8 = (psx_brA_BFC1EBB8 == psx_brB_BFC1EBB8); psx_delay_BFC1EBB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EBBC: 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(0x00000BE8u); #endif if (psx_delay_BFC1EBB8) { psx_delay_BFC1EBB8 = 0; if (psx_taken_BFC1EBB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C2Cu); cpu->pc = 0x00000C2Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BECu); } label_BFC1EBC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BECu); #endif #ifdef PSX_COSIM cosim_block(0x00000BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EBC0: 240400FB addiu $a0, $zero, 251 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); PGXP_ALU(0x240400FBu, cpu->gpr[4], _pgx1, 0x000000FBu); } #ifdef PSX_COSIM cosim_instr(0x00000BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EBC4: 1444FFF0 bne $v0, $a0, 0xBFC1EB88 */ uint32_t psx_brA_BFC1EBC4 = cpu->gpr[2]; uint32_t psx_brB_BFC1EBC4 = cpu->gpr[4]; psx_taken_BFC1EBC4 = (psx_brA_BFC1EBC4 != psx_brB_BFC1EBC4); psx_delay_BFC1EBC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EBC8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000BF4u); #endif if (psx_delay_BFC1EBC4) { psx_delay_BFC1EBC4 = 0; if (psx_taken_BFC1EBC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BB4u); goto label_BFC1EB88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BF8u); } label_BFC1EBCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000BF8u); #endif #ifdef PSX_COSIM cosim_block(0x00000BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1EBCC: 0C000204 jal 0xB0000810 */ cpu->gpr[31] = 0x00000C00u; /* jal link before delay slot */ psx_delay_BFC1EBCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EBD0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000BFCu); #endif if (psx_delay_BFC1EBCC) { psx_delay_BFC1EBCC = 0; cpu->gpr[31] = 0x00000C00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000810u); cpu->pc = 0x00000810u; return; } } void OpenBIOS_func_00000C00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C00u); label_BFC1EBD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C00u); #endif #ifdef PSX_COSIM cosim_block(0x00000C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C00u); #endif /* 0xBFC1EBD4: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000C00u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00000C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C04u); cpu->pc = 0x00000C04u; return; /* fallthrough */ } void OpenBIOS_func_00000C04(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C04u); label_BFC1EBD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C04u); #endif #ifdef PSX_COSIM cosim_block(0x00000C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C04u); #endif /* 0xBFC1EBD8: 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, 0x00000C04u); 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(0x00000C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C08u); cpu->pc = 0x00000C08u; return; /* fallthrough */ } void OpenBIOS_func_00000C08(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C08u); int psx_delay_BFC1EBE4 = 0; label_BFC1EBDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C08u); #endif #ifdef PSX_COSIM cosim_block(0x00000C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C08u); #endif /* 0xBFC1EBDC: 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, 0x00000C08u); 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(0x00000C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EBE0: 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(0x00000C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1EBE4: 03E00008 jr $ra */ { uint32_t _t = cpu->gpr[31]; /* DELAY (orphaned) 0xBFC1EBE8: 27BD0020 addiu $sp, $sp, 32 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif { 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_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } /* CPS: publish $ra */ } void OpenBIOS_func_00000C14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C14u); label_BFC1EBE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C14u); #endif #ifdef PSX_COSIM cosim_block(0x00000C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1EBE8: 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(0x00000C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C18u); cpu->pc = 0x00000C18u; return; /* fallthrough */ } void OpenBIOS_func_00000C18(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C18u); label_BFC1EBEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C18u); #endif #ifdef PSX_COSIM cosim_block(0x00000C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EBEC: 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(0x00000C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C1Cu); cpu->pc = 0x00000C1Cu; return; /* fallthrough */ } void OpenBIOS_func_00000C1C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C1Cu); int psx_delay_BFC1EBF0 = 0; int psx_taken_BFC1EBF0 = 0; label_BFC1EBF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EBF0: 1443FFF1 bne $v0, $v1, 0xBFC1EBB8 */ uint32_t psx_brA_BFC1EBF0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EBF0 = cpu->gpr[3]; psx_taken_BFC1EBF0 = (psx_brA_BFC1EBF0 != psx_brB_BFC1EBF0); psx_delay_BFC1EBF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EBF4: 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(0x00000C20u); #endif if (psx_delay_BFC1EBF0) { psx_delay_BFC1EBF0 = 0; if (psx_taken_BFC1EBF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE4u); cpu->pc = 0x00000BE4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C24u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C24u); cpu->pc = 0x00000C24u; return; /* fallthrough */ } void OpenBIOS_func_00000C24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C24u); int psx_delay_BFC1EC08 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EBFCu: goto label_BFC1EBFC; case 0xBFC1EC00u: goto label_BFC1EC00; default: break; } } label_BFC1EBF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C24u); #endif #ifdef PSX_COSIM cosim_block(0x00000C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EBF8: 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(0x00000C24u); #endif label_BFC1EBFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C28u); #endif #ifdef PSX_COSIM cosim_block(0x00000C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EBFC: 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(0x00000C28u); #endif label_BFC1EC00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C2Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EC00: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EC04: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x00000C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC1EC08: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00000C3Cu; /* jalr link before delay slot */ { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00000C3Cu; /* jalr link before delay slot */ /* DELAY (orphaned) 0xBFC1EC0C: 24840003 addiu $a0, $a0, 3 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } void OpenBIOS_func_00000C38(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C38u); label_BFC1EC0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C38u); #endif #ifdef PSX_COSIM cosim_block(0x00000C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EC0C: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00000C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C3Cu); cpu->pc = 0x00000C3Cu; return; /* fallthrough */ } void OpenBIOS_func_00000C3C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C3Cu); int psx_delay_BFC1EC10 = 0; int psx_taken_BFC1EC10 = 0; label_BFC1EC10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC10: 1000FFF0 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EC10 = cpu->gpr[0]; uint32_t psx_brB_BFC1EC10 = cpu->gpr[0]; psx_taken_BFC1EC10 = (psx_brA_BFC1EC10 == psx_brB_BFC1EC10); /* DELAY (orphaned) 0xBFC1EC14: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC1EC10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C44u); cpu->pc = 0x00000C44u; return; } void OpenBIOS_func_00000C40(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C40u); int psx_delay_BFC1EC1C = 0; int psx_taken_BFC1EC1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EC18u: goto label_BFC1EC18; default: break; } } label_BFC1EC14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C40u); #endif #ifdef PSX_COSIM cosim_block(0x00000C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C40u); #endif label_BFC1EC18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C44u); #endif #ifdef PSX_COSIM cosim_block(0x00000C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EC18: 240300F6 addiu $v1, $zero, 246 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); PGXP_ALU(0x240300F6u, cpu->gpr[3], _pgx1, 0x000000F6u); } #ifdef PSX_COSIM cosim_instr(0x00000C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EC1C: 1043FFEB beq $v0, $v1, 0xBFC1EBCC */ uint32_t psx_brA_BFC1EC1C = cpu->gpr[2]; uint32_t psx_brB_BFC1EC1C = cpu->gpr[3]; psx_taken_BFC1EC1C = (psx_brA_BFC1EC1C == psx_brB_BFC1EC1C); /* DELAY (orphaned) 0xBFC1EC20: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC1EC1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BF8u); cpu->pc = 0x00000BF8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C50u); cpu->pc = 0x00000C50u; return; } void OpenBIOS_func_00000C4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C4Cu); int psx_delay_BFC1EC28 = 0; int psx_taken_BFC1EC28 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EC24u: goto label_BFC1EC24; default: break; } } label_BFC1EC20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C4Cu); #endif label_BFC1EC24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C50u); #endif #ifdef PSX_COSIM cosim_block(0x00000C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EC24: 240300FB addiu $v1, $zero, 251 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); PGXP_ALU(0x240300FBu, cpu->gpr[3], _pgx1, 0x000000FBu); } #ifdef PSX_COSIM cosim_instr(0x00000C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EC28: 1043FFE8 beq $v0, $v1, 0xBFC1EBCC */ uint32_t psx_brA_BFC1EC28 = cpu->gpr[2]; uint32_t psx_brB_BFC1EC28 = cpu->gpr[3]; psx_taken_BFC1EC28 = (psx_brA_BFC1EC28 == psx_brB_BFC1EC28); psx_delay_BFC1EC28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EC2C: 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(0x00000C58u); #endif if (psx_delay_BFC1EC28) { psx_delay_BFC1EC28 = 0; if (psx_taken_BFC1EC28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BF8u); cpu->pc = 0x00000BF8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C5Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C5Cu); cpu->pc = 0x00000C5Cu; return; /* fallthrough */ } void OpenBIOS_func_00000C5C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C5Cu); int psx_delay_BFC1EC30 = 0; int psx_taken_BFC1EC30 = 0; label_BFC1EC30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C5Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC30: 1000FFE1 beq $zero, $zero, 0xBFC1EBB8 */ uint32_t psx_brA_BFC1EC30 = cpu->gpr[0]; uint32_t psx_brB_BFC1EC30 = cpu->gpr[0]; psx_taken_BFC1EC30 = (psx_brA_BFC1EC30 == psx_brB_BFC1EC30); /* DELAY (orphaned) 0xBFC1EC34: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC1EC30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE4u); cpu->pc = 0x00000BE4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C64u); cpu->pc = 0x00000C64u; return; } void OpenBIOS_func_00000C60(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C60u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EC38u: goto label_BFC1EC38; default: break; } } label_BFC1EC34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C60u); #endif #ifdef PSX_COSIM cosim_block(0x00000C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C60u); #endif label_BFC1EC38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C64u); #endif #ifdef PSX_COSIM cosim_block(0x00000C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EC38: A0434BE8 sb $v1, 19432($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19432; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000C64u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (19432)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0434BE8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EC3C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000C68u); #endif /* 0xBFC1EC40: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C70u); cpu->pc = 0x00000C70u; return; /* fallthrough */ } void OpenBIOS_func_00000C70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000C70u); int psx_delay_BFC1EC8C = 0; int psx_taken_BFC1EC8C = 0; label_BFC1EC44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000C70u); #endif #ifdef PSX_COSIM cosim_block(0x00000C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EC44: 24424BE8 addiu $v0, $v0, 19432 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19432)); PGXP_ALU(0x24424BE8u, cpu->gpr[2], _pgx1, 0x00004BE8u); } #ifdef PSX_COSIM cosim_instr(0x00000C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC48: A0440001 sb $a0, 1($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000C74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (1)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440001u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C74u); #endif /* 0xBFC1EC4C: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC54: A0440002 sb $a0, 2($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000C80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (2)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440002u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C80u); #endif /* 0xBFC1EC58: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC60: A0440003 sb $a0, 3($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000C8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (3)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440003u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000C90u); #endif /* 0xBFC1EC64: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC6C: A0440004 sb $a0, 4($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000C98u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C98u); #endif /* 0xBFC1EC70: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC78: A0440005 sb $a0, 5($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 5; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000CA4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (5)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440005u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000CA4u); #endif /* 0xBFC1EC7C: 90641801 lbu $a0, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 4, 0x8u); PGXP_LOAD(0x90641801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC80: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EC84: A0440006 sb $a0, 6($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000CB0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440006u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000CB0u); #endif /* 0xBFC1EC88: 90631801 lbu $v1, 6145($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (6145)), 3, 0x8u); PGXP_LOAD(0x90631801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EC8C: 1000FFDA beq $zero, $zero, 0xBFC1EBF8 */ uint32_t psx_brA_BFC1EC8C = cpu->gpr[0]; uint32_t psx_brB_BFC1EC8C = cpu->gpr[0]; psx_taken_BFC1EC8C = (psx_brA_BFC1EC8C == psx_brB_BFC1EC8C); psx_delay_BFC1EC8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EC90: A0430007 sb $v1, 7($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 7; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000CBCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (7)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430007u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000CBCu); #endif if (psx_delay_BFC1EC8C) { psx_delay_BFC1EC8C = 0; if (psx_taken_BFC1EC8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C24u); cpu->pc = 0x00000C24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CC0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CC0u); cpu->pc = 0x00000CC0u; return; /* fallthrough */ } void OpenBIOS_func_00000CC0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000CC0u); label_BFC1EC94: #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, 0x10u); #endif /* 0xBFC1EC94: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EC98: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000CC4u); #endif /* 0xBFC1EC9C: 90821801 lbu $v0, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 2, 0x10u); PGXP_LOAD(0x90821801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CCCu); cpu->pc = 0x00000CCCu; return; /* fallthrough */ } void OpenBIOS_func_00000CCC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000CCCu); int psx_delay_BFC1ECA8 = 0; int psx_taken_BFC1ECA8 = 0; int psx_delay_BFC1ECB0 = 0; int psx_taken_BFC1ECB0 = 0; int psx_delay_BFC1ECB8 = 0; int psx_taken_BFC1ECB8 = 0; int psx_delay_BFC1ECC4 = 0; int psx_taken_BFC1ECC4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1ECD0u: goto label_BFC1ECD0; case 0xBFC1ECB0u: goto label_BFC1ECB0; case 0xBFC1ECB8u: goto label_BFC1ECB8; case 0xBFC1ECC0u: goto label_BFC1ECC0; case 0xBFC1ECCCu: goto label_BFC1ECCC; default: break; } } label_BFC1ECA0: #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 /* 0xBFC1ECA0: 8C625F10 lw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); 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(0x8C625F10u, _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, 0x21u); #endif /* 0xBFC1ECA4: 2405001A addiu $a1, $zero, 26 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); PGXP_ALU(0x2405001Au, cpu->gpr[5], _pgx1, 0x0000001Au); } #ifdef PSX_COSIM cosim_instr(0x00000CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ECA8: 1045003C beq $v0, $a1, 0xBFC1ED9C */ uint32_t psx_brA_BFC1ECA8 = cpu->gpr[2]; uint32_t psx_brB_BFC1ECA8 = cpu->gpr[5]; psx_taken_BFC1ECA8 = (psx_brA_BFC1ECA8 == psx_brB_BFC1ECA8); psx_delay_BFC1ECA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ECAC: 2C45001B sltiu $a1, $v0, 27 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x0000001Bu ? 1 : 0); PGXP_ALU(0x2C45001Bu, cpu->gpr[5], _pgx1, 0x001Bu); } #ifdef PSX_COSIM cosim_instr(0x00000CD8u); #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, 0x00000DC8u); cpu->pc = 0x00000DC8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CDCu); } label_BFC1ECB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000CDCu); #endif #ifdef PSX_COSIM cosim_block(0x00000CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ECB0: 10A00011 beq $a1, $zero, 0xBFC1ECF8 */ uint32_t psx_brA_BFC1ECB0 = cpu->gpr[5]; uint32_t psx_brB_BFC1ECB0 = cpu->gpr[0]; psx_taken_BFC1ECB0 = (psx_brA_BFC1ECB0 == psx_brB_BFC1ECB0); psx_delay_BFC1ECB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ECB4: 24050012 addiu $a1, $zero, 18 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (18)); PGXP_ALU(0x24050012u, cpu->gpr[5], _pgx1, 0x00000012u); } #ifdef PSX_COSIM cosim_instr(0x00000CE0u); #endif if (psx_delay_BFC1ECB0) { psx_delay_BFC1ECB0 = 0; if (psx_taken_BFC1ECB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D24u); cpu->pc = 0x00000D24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CE4u); } label_BFC1ECB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000CE4u); #endif #ifdef PSX_COSIM cosim_block(0x00000CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ECB8: 1045001A beq $v0, $a1, 0xBFC1ED24 */ uint32_t psx_brA_BFC1ECB8 = cpu->gpr[2]; uint32_t psx_brB_BFC1ECB8 = cpu->gpr[5]; psx_taken_BFC1ECB8 = (psx_brA_BFC1ECB8 == psx_brB_BFC1ECB8); psx_delay_BFC1ECB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ECBC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000CE8u); #endif if (psx_delay_BFC1ECB8) { psx_delay_BFC1ECB8 = 0; if (psx_taken_BFC1ECB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D50u); cpu->pc = 0x00000D50u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CECu); } label_BFC1ECC0: #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, 0x14u); #endif /* 0xBFC1ECC0: 2C440013 sltiu $a0, $v0, 19 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000013u ? 1 : 0); PGXP_ALU(0x2C440013u, cpu->gpr[4], _pgx1, 0x0013u); } #ifdef PSX_COSIM cosim_instr(0x00000CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1ECC4: 1080000A beq $a0, $zero, 0xBFC1ECF0 */ uint32_t psx_brA_BFC1ECC4 = cpu->gpr[4]; uint32_t psx_brB_BFC1ECC4 = cpu->gpr[0]; psx_taken_BFC1ECC4 = (psx_brA_BFC1ECC4 == psx_brB_BFC1ECC4); psx_delay_BFC1ECC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ECC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000CF4u); #endif if (psx_delay_BFC1ECC4) { psx_delay_BFC1ECC4 = 0; if (psx_taken_BFC1ECC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D1Cu); cpu->pc = 0x00000D1Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CF8u); } label_BFC1ECCC: #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, 0x4u); #endif /* 0xBFC1ECCC: 2442FFF8 addiu $v0, $v0, -8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-8)); PGXP_ALU(0x2442FFF8u, cpu->gpr[2], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00000CF8u); #endif label_BFC1ECD0: #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, 0x4u); #endif /* 0xBFC1ECD0: 2C420002 sltiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); } #ifdef PSX_COSIM cosim_instr(0x00000CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D00u); cpu->pc = 0x00000D00u; return; /* fallthrough */ } void OpenBIOS_func_00000D00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000D00u); int psx_delay_BFC1ECD4 = 0; int psx_taken_BFC1ECD4 = 0; label_BFC1ECD4: #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, 0x5u); #endif /* 0xBFC1ECD4: 1440001F bne $v0, $zero, 0xBFC1ED54 */ uint32_t psx_brA_BFC1ECD4 = cpu->gpr[2]; uint32_t psx_brB_BFC1ECD4 = cpu->gpr[0]; psx_taken_BFC1ECD4 = (psx_brA_BFC1ECD4 != psx_brB_BFC1ECD4); psx_delay_BFC1ECD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1ECD8: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000D04u); #endif if (psx_delay_BFC1ECD4) { psx_delay_BFC1ECD4 = 0; if (psx_taken_BFC1ECD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D80u); cpu->pc = 0x00000D80u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); cpu->pc = 0x00000D08u; return; /* fallthrough */ } void OpenBIOS_func_00000D08(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000D08u); int psx_delay_BFC1ECE8 = 0; int psx_taken_BFC1ECE8 = 0; int psx_delay_BFC1ECF0 = 0; int psx_taken_BFC1ECF0 = 0; int psx_delay_BFC1ECFC = 0; int psx_taken_BFC1ECFC = 0; int psx_delay_BFC1ED04 = 0; int psx_taken_BFC1ED04 = 0; int psx_delay_BFC1ED0C = 0; int psx_taken_BFC1ED0C = 0; int psx_delay_BFC1ED1C = 0; int psx_taken_BFC1ED1C = 0; int psx_delay_BFC1ED30 = 0; int psx_taken_BFC1ED30 = 0; int psx_delay_BFC1ED4C = 0; int psx_taken_BFC1ED4C = 0; int psx_delay_BFC1ED5C = 0; int psx_taken_BFC1ED5C = 0; int psx_delay_BFC1ED64 = 0; int psx_taken_BFC1ED64 = 0; int psx_delay_BFC1ED74 = 0; int psx_taken_BFC1ED74 = 0; int psx_delay_BFC1ED80 = 0; int psx_taken_BFC1ED80 = 0; int psx_delay_BFC1ED8C = 0; int psx_taken_BFC1ED8C = 0; int psx_delay_BFC1ED94 = 0; int psx_taken_BFC1ED94 = 0; int psx_delay_BFC1EDBC = 0; int psx_taken_BFC1EDBC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1ECE4u: goto label_BFC1ECE4; case 0xBFC1ECF0u: goto label_BFC1ECF0; case 0xBFC1ECF8u: goto label_BFC1ECF8; case 0xBFC1ED1Cu: goto label_BFC1ED1C; case 0xBFC1ED24u: goto label_BFC1ED24; case 0xBFC1ED48u: goto label_BFC1ED48; case 0xBFC1ED54u: goto label_BFC1ED54; case 0xBFC1ED9Cu: goto label_BFC1ED9C; case 0xBFC1EDB4u: goto label_BFC1EDB4; case 0xBFC1ECE0u: goto label_BFC1ECE0; case 0xBFC1ED04u: goto label_BFC1ED04; case 0xBFC1ED0Cu: goto label_BFC1ED0C; case 0xBFC1ED14u: goto label_BFC1ED14; case 0xBFC1ED38u: goto label_BFC1ED38; case 0xBFC1ED64u: goto label_BFC1ED64; case 0xBFC1ED6Cu: goto label_BFC1ED6C; case 0xBFC1ED7Cu: goto label_BFC1ED7C; case 0xBFC1ED88u: goto label_BFC1ED88; case 0xBFC1ED94u: goto label_BFC1ED94; case 0xBFC1EDA8u: goto label_BFC1EDA8; default: break; } } label_BFC1ECDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D08u); #endif #ifdef PSX_COSIM cosim_block(0x00000D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ECDC: 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(0x00000D08u); #endif label_BFC1ECE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1ECE0: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D0Cu); return; } g_debug_last_store_pc = 0x00000D0Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000D0Cu); #endif label_BFC1ECE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D10u); #endif #ifdef PSX_COSIM cosim_block(0x00000D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1ECE4: 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(0x00000D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ECE8: 1000FFC5 beq $zero, $zero, 0xBFC1EC00 */ uint32_t psx_brA_BFC1ECE8 = cpu->gpr[0]; uint32_t psx_brB_BFC1ECE8 = cpu->gpr[0]; psx_taken_BFC1ECE8 = (psx_brA_BFC1ECE8 == psx_brB_BFC1ECE8); psx_delay_BFC1ECE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ECEC: 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(0x00000D18u); #endif if (psx_delay_BFC1ECE8) { psx_delay_BFC1ECE8 = 0; if (psx_taken_BFC1ECE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C2Cu); cpu->pc = 0x00000C2Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D1Cu); } label_BFC1ECF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ECF0: 1000FFF7 beq $zero, $zero, 0xBFC1ECD0 */ uint32_t psx_brA_BFC1ECF0 = cpu->gpr[0]; uint32_t psx_brB_BFC1ECF0 = cpu->gpr[0]; psx_taken_BFC1ECF0 = (psx_brA_BFC1ECF0 == psx_brB_BFC1ECF0); psx_delay_BFC1ECF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1ECF4: 2442FFEB addiu $v0, $v0, -21 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-21)); PGXP_ALU(0x2442FFEBu, cpu->gpr[2], _pgx1, 0xFFFFFFEBu); } #ifdef PSX_COSIM cosim_instr(0x00000D20u); #endif if (psx_delay_BFC1ECF0) { psx_delay_BFC1ECF0 = 0; if (psx_taken_BFC1ECF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000CFCu); cpu->pc = 0x00000CFCu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D24u); } label_BFC1ECF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D24u); #endif #ifdef PSX_COSIM cosim_block(0x00000D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1ECF8: 24040DDD addiu $a0, $zero, 3549 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (3549)); PGXP_ALU(0x24040DDDu, cpu->gpr[4], _pgx1, 0x00000DDDu); } #ifdef PSX_COSIM cosim_instr(0x00000D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1ECFC: 1044002A beq $v0, $a0, 0xBFC1EDA8 */ uint32_t psx_brA_BFC1ECFC = cpu->gpr[2]; uint32_t psx_brB_BFC1ECFC = cpu->gpr[4]; psx_taken_BFC1ECFC = (psx_brA_BFC1ECFC == psx_brB_BFC1ECFC); psx_delay_BFC1ECFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1ED00: 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(0x00000D2Cu); #endif if (psx_delay_BFC1ECFC) { psx_delay_BFC1ECFC = 0; if (psx_taken_BFC1ECFC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DD4u); goto label_BFC1EDA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D30u); } label_BFC1ED04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D30u); #endif #ifdef PSX_COSIM cosim_block(0x00000D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1ED04: 1044FFAB beq $v0, $a0, 0xBFC1EBB4 */ uint32_t psx_brA_BFC1ED04 = cpu->gpr[2]; uint32_t psx_brB_BFC1ED04 = cpu->gpr[4]; psx_taken_BFC1ED04 = (psx_brA_BFC1ED04 == psx_brB_BFC1ED04); psx_delay_BFC1ED04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ED08: 24050CCC addiu $a1, $zero, 3276 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); PGXP_ALU(0x24050CCCu, cpu->gpr[5], _pgx1, 0x00000CCCu); } #ifdef PSX_COSIM cosim_instr(0x00000D34u); #endif if (psx_delay_BFC1ED04) { psx_delay_BFC1ED04 = 0; if (psx_taken_BFC1ED04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE0u); cpu->pc = 0x00000BE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D38u); } label_BFC1ED0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D38u); #endif #ifdef PSX_COSIM cosim_block(0x00000D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ED0C: 1445FFF3 bne $v0, $a1, 0xBFC1ECDC */ uint32_t psx_brA_BFC1ED0C = cpu->gpr[2]; uint32_t psx_brB_BFC1ED0C = cpu->gpr[5]; psx_taken_BFC1ED0C = (psx_brA_BFC1ED0C != psx_brB_BFC1ED0C); psx_delay_BFC1ED0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1ED10: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000D3Cu); #endif if (psx_delay_BFC1ED0C) { psx_delay_BFC1ED0C = 0; if (psx_taken_BFC1ED0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); goto label_BFC1ECDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D40u); } label_BFC1ED14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D40u); #endif #ifdef PSX_COSIM cosim_block(0x00000D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1ED14: AC645F10 sw $a0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D40u); return; } g_debug_last_store_pc = 0x00000D40u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC645F10u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00000D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1ED18: 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(0x00000D44u); #endif label_BFC1ED1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D48u); #endif #ifdef PSX_COSIM cosim_block(0x00000D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED1C: 1000FFAD beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1ED1C = cpu->gpr[0]; uint32_t psx_brB_BFC1ED1C = cpu->gpr[0]; psx_taken_BFC1ED1C = (psx_brA_BFC1ED1C == psx_brB_BFC1ED1C); psx_delay_BFC1ED1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1ED20: AC435EE4 sw $v1, 24292($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D4Cu); return; } g_debug_last_store_pc = 0x00000D4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435EE4u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000D4Cu); #endif if (psx_delay_BFC1ED1C) { psx_delay_BFC1ED1C = 0; if (psx_taken_BFC1ED1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D50u); } label_BFC1ED24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D50u); #endif #ifdef PSX_COSIM cosim_block(0x00000D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D50u); #endif /* 0xBFC1ED24: 90821800 lbu $v0, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6144)), 2, 0x10u); PGXP_LOAD(0x90821800u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1ED2C: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00000D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED30: 104000C4 beq $v0, $zero, 0xBFC1F044 */ uint32_t psx_brA_BFC1ED30 = cpu->gpr[2]; uint32_t psx_brB_BFC1ED30 = cpu->gpr[0]; psx_taken_BFC1ED30 = (psx_brA_BFC1ED30 == psx_brB_BFC1ED30); psx_delay_BFC1ED30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED34: 24020F14 addiu $v0, $zero, 3860 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); PGXP_ALU(0x24020F14u, cpu->gpr[2], _pgx1, 0x00000F14u); } #ifdef PSX_COSIM cosim_instr(0x00000D60u); #endif if (psx_delay_BFC1ED30) { psx_delay_BFC1ED30 = 0; if (psx_taken_BFC1ED30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001070u); cpu->pc = 0x00001070u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D64u); } label_BFC1ED38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D64u); #endif #ifdef PSX_COSIM cosim_block(0x00000D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1ED38: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); 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[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1ED3C: A0801800 sb $zero, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000D68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED40: 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(0x00000D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1ED44: A0801802 sb $zero, 6146($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000D70u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6146)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801802u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000D70u); #endif label_BFC1ED48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D74u); #endif #ifdef PSX_COSIM cosim_block(0x00000D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1ED48: A0821801 sb $v0, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000D74u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6145)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000D74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED4C: 1000FFA1 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1ED4C = cpu->gpr[0]; uint32_t psx_brB_BFC1ED4C = cpu->gpr[0]; psx_taken_BFC1ED4C = (psx_brA_BFC1ED4C == psx_brB_BFC1ED4C); psx_delay_BFC1ED4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000D7Cu); #endif if (psx_delay_BFC1ED4C) { psx_delay_BFC1ED4C = 0; if (psx_taken_BFC1ED4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D80u); } label_BFC1ED54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D80u); #endif #ifdef PSX_COSIM cosim_block(0x00000D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D80u); #endif /* 0xBFC1ED54: 8C825F0C lw $v0, 24332($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000D80u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C825F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ED58: 240500E6 addiu $a1, $zero, 230 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (230)); PGXP_ALU(0x240500E6u, cpu->gpr[5], _pgx1, 0x000000E6u); } #ifdef PSX_COSIM cosim_instr(0x00000D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ED5C: 10450007 beq $v0, $a1, 0xBFC1ED7C */ uint32_t psx_brA_BFC1ED5C = cpu->gpr[2]; uint32_t psx_brB_BFC1ED5C = cpu->gpr[5]; psx_taken_BFC1ED5C = (psx_brA_BFC1ED5C == psx_brB_BFC1ED5C); psx_delay_BFC1ED5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ED60: 2C4500E7 sltiu $a1, $v0, 231 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E7u ? 1 : 0); PGXP_ALU(0x2C4500E7u, cpu->gpr[5], _pgx1, 0x00E7u); } #ifdef PSX_COSIM cosim_instr(0x00000D8Cu); #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, 0x00000DA8u); goto label_BFC1ED7C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D90u); } label_BFC1ED64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D90u); #endif #ifdef PSX_COSIM cosim_block(0x00000D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ED64: 10A00008 beq $a1, $zero, 0xBFC1ED88 */ uint32_t psx_brA_BFC1ED64 = cpu->gpr[5]; uint32_t psx_brB_BFC1ED64 = cpu->gpr[0]; psx_taken_BFC1ED64 = (psx_brA_BFC1ED64 == psx_brB_BFC1ED64); psx_delay_BFC1ED64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000D94u); #endif if (psx_delay_BFC1ED64) { psx_delay_BFC1ED64 = 0; if (psx_taken_BFC1ED64) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DB4u); goto label_BFC1ED88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D98u); } label_BFC1ED6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000D98u); #endif #ifdef PSX_COSIM cosim_block(0x00000D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1ED6C: 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(0x00000D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1ED70: 2C420003 sltiu $v0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); } #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, 0x5u); #endif /* 0xBFC1ED74: 1040FFDA beq $v0, $zero, 0xBFC1ECE0 */ uint32_t psx_brA_BFC1ED74 = cpu->gpr[2]; uint32_t psx_brB_BFC1ED74 = cpu->gpr[0]; psx_taken_BFC1ED74 = (psx_brA_BFC1ED74 == psx_brB_BFC1ED74); psx_delay_BFC1ED74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED78: 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(0x00000DA4u); #endif if (psx_delay_BFC1ED74) { psx_delay_BFC1ED74 = 0; if (psx_taken_BFC1ED74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D0Cu); goto label_BFC1ECE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DA8u); } label_BFC1ED7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DA8u); #endif #ifdef PSX_COSIM cosim_block(0x00000DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED7C: 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(0x00000DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED80: 1000FFD7 beq $zero, $zero, 0xBFC1ECE0 */ 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_icache_fetch(cpu, 0x00000DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1ED84: AC825F0C sw $v0, 24332($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DB0u); return; } g_debug_last_store_pc = 0x00000DB0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC825F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000DB0u); #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, 0x00000D0Cu); goto label_BFC1ECE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DB4u); } label_BFC1ED88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DB4u); #endif #ifdef PSX_COSIM cosim_block(0x00000DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1ED88: 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(0x00000DB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1ED8C: 1445FFD3 bne $v0, $a1, 0xBFC1ECDC */ uint32_t psx_brA_BFC1ED8C = cpu->gpr[2]; uint32_t psx_brB_BFC1ED8C = cpu->gpr[5]; psx_taken_BFC1ED8C = (psx_brA_BFC1ED8C != psx_brB_BFC1ED8C); psx_delay_BFC1ED8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1ED90: 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(0x00000DBCu); #endif if (psx_delay_BFC1ED8C) { psx_delay_BFC1ED8C = 0; if (psx_taken_BFC1ED8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); goto label_BFC1ECDC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DC0u); } label_BFC1ED94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DC0u); #endif #ifdef PSX_COSIM cosim_block(0x00000DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1ED94: 1000FFD2 beq $zero, $zero, 0xBFC1ECE0 */ uint32_t psx_brA_BFC1ED94 = cpu->gpr[0]; uint32_t psx_brB_BFC1ED94 = cpu->gpr[0]; psx_taken_BFC1ED94 = (psx_brA_BFC1ED94 == psx_brB_BFC1ED94); psx_delay_BFC1ED94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1ED98: AC825F0C sw $v0, 24332($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24332)); 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[2]); } PGXP_STORE(0xAC825F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000DC4u); #endif if (psx_delay_BFC1ED94) { psx_delay_BFC1ED94 = 0; if (psx_taken_BFC1ED94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D0Cu); goto label_BFC1ECE0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DC8u); } label_BFC1ED9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DC8u); #endif #ifdef PSX_COSIM cosim_block(0x00000DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DC8u); #endif /* 0xBFC1ED9C: 90821801 lbu $v0, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 2, 0x10u); PGXP_LOAD(0x90821801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EDA0: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000DCCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EDA4: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00000DD0u); return; #ifdef PSX_COSIM cosim_instr(0x00000DD0u); #endif label_BFC1EDA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DD4u); #endif #ifdef PSX_COSIM cosim_block(0x00000DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EDA8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EDAC: AC405EE8 sw $zero, 24296($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DD8u); return; } g_debug_last_store_pc = 0x00000DD8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC405EE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EDB0: 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(0x00000DDCu); #endif label_BFC1EDB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DE0u); #endif #ifdef PSX_COSIM cosim_block(0x00000DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EDB4: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DE0u); return; } g_debug_last_store_pc = 0x00000DE0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EDB8: 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(0x00000DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EDBC: 1000FF90 beq $zero, $zero, 0xBFC1EC00 */ uint32_t psx_brA_BFC1EDBC = cpu->gpr[0]; uint32_t psx_brB_BFC1EDBC = cpu->gpr[0]; psx_taken_BFC1EDBC = (psx_brA_BFC1EDBC == psx_brB_BFC1EDBC); psx_delay_BFC1EDBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EDC0: 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(0x00000DECu); #endif if (psx_delay_BFC1EDBC) { psx_delay_BFC1EDBC = 0; if (psx_taken_BFC1EDBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C2Cu); cpu->pc = 0x00000C2Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DF0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DF0u); cpu->pc = 0x00000DF0u; return; /* fallthrough */ } void OpenBIOS_func_00000DF0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000DF0u); int psx_delay_BFC1EDD0 = 0; int psx_taken_BFC1EDD0 = 0; int psx_delay_BFC1EDD8 = 0; int psx_taken_BFC1EDD8 = 0; int psx_delay_BFC1EDE8 = 0; int psx_taken_BFC1EDE8 = 0; int psx_delay_BFC1EDF0 = 0; int psx_taken_BFC1EDF0 = 0; int psx_delay_BFC1EE00 = 0; int psx_taken_BFC1EE00 = 0; int psx_delay_BFC1EE1C = 0; int psx_delay_BFC1EE78 = 0; int psx_taken_BFC1EE78 = 0; int psx_delay_BFC1EE88 = 0; int psx_taken_BFC1EE88 = 0; int psx_delay_BFC1EE90 = 0; int psx_taken_BFC1EE90 = 0; int psx_delay_BFC1EE98 = 0; int psx_taken_BFC1EE98 = 0; int psx_delay_BFC1EEA4 = 0; int psx_taken_BFC1EEA4 = 0; int psx_delay_BFC1EEAC = 0; int psx_taken_BFC1EEAC = 0; int psx_delay_BFC1EEB8 = 0; int psx_taken_BFC1EEB8 = 0; int psx_delay_BFC1EEC0 = 0; int psx_taken_BFC1EEC0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EDD8u: goto label_BFC1EDD8; case 0xBFC1EDE0u: goto label_BFC1EDE0; case 0xBFC1EDF0u: goto label_BFC1EDF0; case 0xBFC1EDF8u: goto label_BFC1EDF8; case 0xBFC1EE08u: goto label_BFC1EE08; case 0xBFC1EE24u: goto label_BFC1EE24; case 0xBFC1EE34u: goto label_BFC1EE34; case 0xBFC1EE64u: goto label_BFC1EE64; case 0xBFC1EE80u: goto label_BFC1EE80; case 0xBFC1EE90u: goto label_BFC1EE90; case 0xBFC1EE98u: goto label_BFC1EE98; case 0xBFC1EEA0u: goto label_BFC1EEA0; case 0xBFC1EEACu: goto label_BFC1EEAC; case 0xBFC1EEB4u: goto label_BFC1EEB4; case 0xBFC1EEC0u: goto label_BFC1EEC0; case 0xBFC1EEC8u: goto label_BFC1EEC8; case 0xBFC1EECCu: goto label_BFC1EECC; default: break; } } label_BFC1EDC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000DF0u); #endif #ifdef PSX_COSIM cosim_block(0x00000DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1EDC4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000DF0u); #endif /* 0xBFC1EDC8: 8C625F10 lw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000DF4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EDCC: 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(0x00000DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EDD0: 10440014 beq $v0, $a0, 0xBFC1EE24 */ uint32_t psx_brA_BFC1EDD0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EDD0 = cpu->gpr[4]; psx_taken_BFC1EDD0 = (psx_brA_BFC1EDD0 == psx_brB_BFC1EDD0); psx_delay_BFC1EDD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EDD4: 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(0x00000E00u); #endif if (psx_delay_BFC1EDD0) { psx_delay_BFC1EDD0 = 0; if (psx_taken_BFC1EDD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E50u); goto label_BFC1EE24; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E04u); } label_BFC1EDD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E04u); #endif #ifdef PSX_COSIM cosim_block(0x00000E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EDD8: 10440016 beq $v0, $a0, 0xBFC1EE34 */ uint32_t psx_brA_BFC1EDD8 = cpu->gpr[2]; uint32_t psx_brB_BFC1EDD8 = cpu->gpr[4]; psx_taken_BFC1EDD8 = (psx_brA_BFC1EDD8 == psx_brB_BFC1EDD8); psx_delay_BFC1EDD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EDDC: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E08u); #endif if (psx_delay_BFC1EDD8) { psx_delay_BFC1EDD8 = 0; if (psx_taken_BFC1EDD8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E60u); goto label_BFC1EE34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E0Cu); } label_BFC1EDE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1EDE0: 2C46001A sltiu $a2, $v0, 26 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < 0x0000001Au ? 1 : 0); PGXP_ALU(0x2C46001Au, cpu->gpr[6], _pgx1, 0x001Au); } #ifdef PSX_COSIM cosim_instr(0x00000E0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E10u); #endif /* 0xBFC1EDE4: 90851801 lbu $a1, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 5, 0x10u); PGXP_LOAD(0x90851801u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1EDE8: 10C0002D beq $a2, $zero, 0xBFC1EEA0 */ uint32_t psx_brA_BFC1EDE8 = cpu->gpr[6]; uint32_t psx_brB_BFC1EDE8 = cpu->gpr[0]; psx_taken_BFC1EDE8 = (psx_brA_BFC1EDE8 == psx_brB_BFC1EDE8); psx_delay_BFC1EDE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EDEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000E18u); #endif if (psx_delay_BFC1EDE8) { psx_delay_BFC1EDE8 = 0; if (psx_taken_BFC1EDE8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000ECCu); goto label_BFC1EEA0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E1Cu); } label_BFC1EDF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EDF0: 1040FF78 beq $v0, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EDF0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EDF0 = cpu->gpr[0]; psx_taken_BFC1EDF0 = (psx_brA_BFC1EDF0 == psx_brB_BFC1EDF0); psx_delay_BFC1EDF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EDF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000E20u); #endif if (psx_delay_BFC1EDF0) { psx_delay_BFC1EDF0 = 0; if (psx_taken_BFC1EDF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E24u); } label_BFC1EDF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E24u); #endif #ifdef PSX_COSIM cosim_block(0x00000E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EDF8: 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(0x00000E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EDFC: 2C440019 sltiu $a0, $v0, 25 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < 0x00000019u ? 1 : 0); PGXP_ALU(0x2C440019u, cpu->gpr[4], _pgx1, 0x0019u); } #ifdef PSX_COSIM cosim_instr(0x00000E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EE00: 1080FF74 beq $a0, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EE00 = cpu->gpr[4]; 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_icache_fetch(cpu, 0x00000E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EE04: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E30u); #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, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E34u); } label_BFC1EE08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E34u); #endif #ifdef PSX_COSIM cosim_block(0x00000E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EE08: 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(0x00000E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EE0C: 2484A084 addiu $a0, $a0, -24444 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-24444)); PGXP_ALU(0x2484A084u, cpu->gpr[4], _pgx1, 0xFFFFA084u); } #ifdef PSX_COSIM cosim_instr(0x00000E38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EE10: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E40u); #endif /* 0xBFC1EE14: 8C420000 lw $v0, 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, 0x00000E40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EE1C: 00400008 jr $v0 */ psx_delay_BFC1EE1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000E4Cu); #endif if (psx_delay_BFC1EE1C) { psx_delay_BFC1EE1C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } label_BFC1EE24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E50u); #endif #ifdef PSX_COSIM cosim_block(0x00000E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EE24: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E50u); #endif /* 0xBFC1EE28: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE2C: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000E58u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EE30: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00000E5Cu); return; #ifdef PSX_COSIM cosim_instr(0x00000E5Cu); #endif label_BFC1EE34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E60u); #endif #ifdef PSX_COSIM cosim_block(0x00000E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EE34: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E60u); #endif /* 0xBFC1EE38: 8C425F0C lw $v0, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EE40: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000E6Cu); return; } g_debug_last_store_pc = 0x00000E6Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EE44: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E70u); #endif /* 0xBFC1EE48: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000E74u); #endif /* 0xBFC1EE4C: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000E78u); #endif /* 0xBFC1EE50: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E80u); #endif /* 0xBFC1EE54: 90431801 lbu $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 3, 0x4u); PGXP_LOAD(0x90431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000E80u); #endif /* 0xBFC1EE58: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000E84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE5C: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000E88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EE60: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00000E8Cu); return; #ifdef PSX_COSIM cosim_instr(0x00000E8Cu); #endif label_BFC1EE64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000E90u); #endif #ifdef PSX_COSIM cosim_block(0x00000E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EE64: 2445FF1A addiu $a1, $v0, -230 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (-230)); PGXP_ALU(0x2445FF1Au, cpu->gpr[5], _pgx1, 0xFFFFFF1Au); } #ifdef PSX_COSIM cosim_instr(0x00000E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1EE68: 3C060021 lui $a2, 0x21 */ cpu->gpr[6] = 0x00210000u; PGXP_ALU(0x3C060021u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC1EE6C: 00A72804 sllv $a1, $a3, $a1 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[7] << (cpu->gpr[5] & 0x1Fu); PGXP_ALU(0x00A72804u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1EE70: 24C60021 addiu $a2, $a2, 33 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (33)); PGXP_ALU(0x24C60021u, cpu->gpr[6], _pgx1, 0x00000021u); } #ifdef PSX_COSIM cosim_instr(0x00000E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC1EE74: 00A63024 and $a2, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[5] & cpu->gpr[6]; PGXP_ALU(0x00A63024u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1EE78: 14C00084 bne $a2, $zero, 0xBFC1F08C */ uint32_t psx_brA_BFC1EE78 = cpu->gpr[6]; uint32_t psx_brB_BFC1EE78 = cpu->gpr[0]; psx_taken_BFC1EE78 = (psx_brA_BFC1EE78 != psx_brB_BFC1EE78); psx_delay_BFC1EE78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1EE7C: 3C060100 lui $a2, 0x100 */ cpu->gpr[6] = 0x01000000u; PGXP_ALU(0x3C060100u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000EA8u); #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, 0x000010B8u); cpu->pc = 0x000010B8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EACu); } label_BFC1EE80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EACu); #endif #ifdef PSX_COSIM cosim_block(0x00000EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1EE80: 24C60100 addiu $a2, $a2, 256 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (256)); PGXP_ALU(0x24C60100u, cpu->gpr[6], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x00000EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC1EE84: 00A62824 and $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6]; PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EE88: 14A00083 bne $a1, $zero, 0xBFC1F098 */ uint32_t psx_brA_BFC1EE88 = cpu->gpr[5]; uint32_t psx_brB_BFC1EE88 = cpu->gpr[0]; psx_taken_BFC1EE88 = (psx_brA_BFC1EE88 != psx_brB_BFC1EE88); psx_delay_BFC1EE88 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EE8C: 240500F2 addiu $a1, $zero, 242 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); PGXP_ALU(0x240500F2u, cpu->gpr[5], _pgx1, 0x000000F2u); } #ifdef PSX_COSIM cosim_instr(0x00000EB8u); #endif if (psx_delay_BFC1EE88) { psx_delay_BFC1EE88 = 0; if (psx_taken_BFC1EE88) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010C4u); cpu->pc = 0x000010C4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EBCu); } label_BFC1EE90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EBCu); #endif #ifdef PSX_COSIM cosim_block(0x00000EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EE90: 1445FF50 bne $v0, $a1, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EE90 = cpu->gpr[2]; uint32_t psx_brB_BFC1EE90 = cpu->gpr[5]; psx_taken_BFC1EE90 = (psx_brA_BFC1EE90 != psx_brB_BFC1EE90); psx_delay_BFC1EE90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000EC0u); #endif if (psx_delay_BFC1EE90) { psx_delay_BFC1EE90 = 0; if (psx_taken_BFC1EE90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EC4u); } label_BFC1EE98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EC4u); #endif #ifdef PSX_COSIM cosim_block(0x00000EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EE98: 1000000C beq $zero, $zero, 0xBFC1EECC */ uint32_t psx_brA_BFC1EE98 = cpu->gpr[0]; uint32_t psx_brB_BFC1EE98 = cpu->gpr[0]; psx_taken_BFC1EE98 = (psx_brA_BFC1EE98 == psx_brB_BFC1EE98); psx_delay_BFC1EE98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EE9C: 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(0x00000EC8u); #endif if (psx_delay_BFC1EE98) { psx_delay_BFC1EE98 = 0; if (psx_taken_BFC1EE98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EF8u); goto label_BFC1EECC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000ECCu); } label_BFC1EEA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000ECCu); #endif #ifdef PSX_COSIM cosim_block(0x00000ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000ECCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EEA0: 2C4500FF sltiu $a1, $v0, 255 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000FFu ? 1 : 0); PGXP_ALU(0x2C4500FFu, cpu->gpr[5], _pgx1, 0x00FFu); } #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, 0x21u); #endif /* 0xBFC1EEA4: 10A0000E beq $a1, $zero, 0xBFC1EEE0 */ uint32_t psx_brA_BFC1EEA4 = cpu->gpr[5]; uint32_t psx_brB_BFC1EEA4 = cpu->gpr[0]; psx_taken_BFC1EEA4 = (psx_brA_BFC1EEA4 == psx_brB_BFC1EEA4); psx_delay_BFC1EEA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EEA8: 2C4500E6 sltiu $a1, $v0, 230 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[2] < 0x000000E6u ? 1 : 0); PGXP_ALU(0x2C4500E6u, cpu->gpr[5], _pgx1, 0x00E6u); } #ifdef PSX_COSIM cosim_instr(0x00000ED4u); #endif if (psx_delay_BFC1EEA4) { psx_delay_BFC1EEA4 = 0; if (psx_taken_BFC1EEA4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F0Cu); cpu->pc = 0x00000F0Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000ED8u); } label_BFC1EEAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000ED8u); #endif #ifdef PSX_COSIM cosim_block(0x00000ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EEAC: 10A0FFED beq $a1, $zero, 0xBFC1EE64 */ uint32_t psx_brA_BFC1EEAC = cpu->gpr[5]; uint32_t psx_brB_BFC1EEAC = cpu->gpr[0]; psx_taken_BFC1EEAC = (psx_brA_BFC1EEAC == psx_brB_BFC1EEAC); psx_delay_BFC1EEAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC1EEB0: 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(0x00000EDCu); #endif if (psx_delay_BFC1EEAC) { psx_delay_BFC1EEAC = 0; if (psx_taken_BFC1EEAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000E90u); goto label_BFC1EE64; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EE0u); } label_BFC1EEB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EE0u); #endif #ifdef PSX_COSIM cosim_block(0x00000EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EEB4: 24050050 addiu $a1, $zero, 80 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (80)); PGXP_ALU(0x24050050u, cpu->gpr[5], _pgx1, 0x00000050u); } #ifdef PSX_COSIM cosim_instr(0x00000EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EEB8: 10450070 beq $v0, $a1, 0xBFC1F07C */ uint32_t psx_brA_BFC1EEB8 = cpu->gpr[2]; uint32_t psx_brB_BFC1EEB8 = cpu->gpr[5]; psx_taken_BFC1EEB8 = (psx_brA_BFC1EEB8 == psx_brB_BFC1EEB8); psx_delay_BFC1EEB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EEBC: 240500E2 addiu $a1, $zero, 226 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (226)); PGXP_ALU(0x240500E2u, cpu->gpr[5], _pgx1, 0x000000E2u); } #ifdef PSX_COSIM cosim_instr(0x00000EE8u); #endif if (psx_delay_BFC1EEB8) { psx_delay_BFC1EEB8 = 0; if (psx_taken_BFC1EEB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010A8u); cpu->pc = 0x000010A8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EECu); } label_BFC1EEC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EECu); #endif #ifdef PSX_COSIM cosim_block(0x00000EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EEC0: 1445FF44 bne $v0, $a1, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EEC0 = cpu->gpr[2]; uint32_t psx_brB_BFC1EEC0 = cpu->gpr[5]; psx_taken_BFC1EEC0 = (psx_brA_BFC1EEC0 != psx_brB_BFC1EEC0); psx_delay_BFC1EEC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EEC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000EF0u); #endif if (psx_delay_BFC1EEC0) { psx_delay_BFC1EEC0 = 0; if (psx_taken_BFC1EEC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000EF4u); } label_BFC1EEC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EF4u); #endif #ifdef PSX_COSIM cosim_block(0x00000EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EEC8: 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(0x00000EF4u); #endif label_BFC1EECC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000EF8u); #endif #ifdef PSX_COSIM cosim_block(0x00000EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EECC: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000EF8u); return; } g_debug_last_store_pc = 0x00000EF8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EED0: A0801800 sb $zero, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000EFCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F00u); cpu->pc = 0x00000F00u; return; /* fallthrough */ } void OpenBIOS_func_00000F00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F00u); int psx_delay_BFC1EED8 = 0; int psx_taken_BFC1EED8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EEE0u: goto label_BFC1EEE0; default: break; } } label_BFC1EED4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F00u); #endif #ifdef PSX_COSIM cosim_block(0x00000F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F00u); #endif /* 0xBFC1EED4: 8C625F10 lw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EED8: 1000FF9B beq $zero, $zero, 0xBFC1ED48 */ uint32_t psx_brA_BFC1EED8 = cpu->gpr[0]; uint32_t psx_brB_BFC1EED8 = cpu->gpr[0]; psx_taken_BFC1EED8 = (psx_brA_BFC1EED8 == psx_brB_BFC1EED8); psx_delay_BFC1EED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EEDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F08u); #endif if (psx_delay_BFC1EED8) { psx_delay_BFC1EED8 = 0; if (psx_taken_BFC1EED8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D74u); cpu->pc = 0x00000D74u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F0Cu); } label_BFC1EEE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00000F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EEE0: 24030F14 addiu $v1, $zero, 3860 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3860)); PGXP_ALU(0x24030F14u, cpu->gpr[3], _pgx1, 0x00000F14u); } #ifdef PSX_COSIM cosim_instr(0x00000F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F10u); cpu->pc = 0x00000F10u; return; /* fallthrough */ } void OpenBIOS_func_00000F10(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F10u); int psx_delay_BFC1EEE4 = 0; int psx_taken_BFC1EEE4 = 0; int psx_delay_BFC1EEEC = 0; int psx_taken_BFC1EEEC = 0; int psx_delay_BFC1EEF4 = 0; int psx_taken_BFC1EEF4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EEECu: goto label_BFC1EEEC; case 0xBFC1EEF4u: goto label_BFC1EEF4; default: break; } } label_BFC1EEE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F10u); #endif #ifdef PSX_COSIM cosim_block(0x00000F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EEE4: 10430082 beq $v0, $v1, 0xBFC1F0F0 */ uint32_t psx_brA_BFC1EEE4 = cpu->gpr[2]; uint32_t psx_brB_BFC1EEE4 = cpu->gpr[3]; psx_taken_BFC1EEE4 = (psx_brA_BFC1EEE4 == psx_brB_BFC1EEE4); psx_delay_BFC1EEE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EEE8: 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(0x00000F14u); #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, 0x0000111Cu); cpu->pc = 0x0000111Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F18u); } label_BFC1EEEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F18u); #endif #ifdef PSX_COSIM cosim_block(0x00000F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EEEC: 1043FF32 beq $v0, $v1, 0xBFC1EBB8 */ uint32_t psx_brA_BFC1EEEC = cpu->gpr[2]; uint32_t psx_brB_BFC1EEEC = cpu->gpr[3]; psx_taken_BFC1EEEC = (psx_brA_BFC1EEEC == psx_brB_BFC1EEEC); psx_delay_BFC1EEEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1EEF0: 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(0x00000F1Cu); #endif if (psx_delay_BFC1EEEC) { psx_delay_BFC1EEEC = 0; if (psx_taken_BFC1EEEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE4u); cpu->pc = 0x00000BE4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F20u); } label_BFC1EEF4: #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, 0x1u); #endif /* 0xBFC1EEF4: 1000FF37 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1EEF4 = cpu->gpr[0]; uint32_t psx_brB_BFC1EEF4 = cpu->gpr[0]; psx_taken_BFC1EEF4 = (psx_brA_BFC1EEF4 == psx_brB_BFC1EEF4); psx_delay_BFC1EEF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EEF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F24u); #endif if (psx_delay_BFC1EEF4) { psx_delay_BFC1EEF4 = 0; if (psx_taken_BFC1EEF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F28u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F28u); cpu->pc = 0x00000F28u; return; /* fallthrough */ } void OpenBIOS_func_00000F28(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F28u); label_BFC1EEFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F28u); #endif #ifdef PSX_COSIM cosim_block(0x00000F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F28u); #endif /* 0xBFC1EEFC: 90020001 lbu $v0, 1($zero) */ { uint32_t _pgxa = cpu->gpr[0] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[0] + (1)), 2, 0x1u); PGXP_LOAD(0x90020001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EF00: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00000F2Cu); return; #ifdef PSX_COSIM cosim_instr(0x00000F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F30u); cpu->pc = 0x00000F30u; return; /* fallthrough */ } void OpenBIOS_func_00000F30(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F30u); int psx_delay_BFC1EF0C = 0; int psx_taken_BFC1EF0C = 0; label_BFC1EF04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F30u); #endif #ifdef PSX_COSIM cosim_block(0x00000F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EF04: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1EF08: 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(0x00000F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF0C: 1000FF75 beq $zero, $zero, 0xBFC1ECE4 */ uint32_t psx_brA_BFC1EF0C = cpu->gpr[0]; uint32_t psx_brB_BFC1EF0C = cpu->gpr[0]; psx_taken_BFC1EF0C = (psx_brA_BFC1EF0C == psx_brB_BFC1EF0C); psx_delay_BFC1EF0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EF10: AC435F08 sw $v1, 24328($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24328)); 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[3]); } PGXP_STORE(0xAC435F08u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00000F3Cu); #endif if (psx_delay_BFC1EF0C) { psx_delay_BFC1EF0C = 0; if (psx_taken_BFC1EF0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D10u); cpu->pc = 0x00000D10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F40u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F40u); cpu->pc = 0x00000F40u; return; /* fallthrough */ } void OpenBIOS_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_BFC1EF1C = 0; int psx_taken_BFC1EF1C = 0; label_BFC1EF14: #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, 0x4u); #endif /* 0xBFC1EF14: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000F40u); #endif /* 0xBFC1EF18: 8C425F00 lw $v0, 24320($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24320; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000F44u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F00u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF1C: 1000FF6F beq $zero, $zero, 0xBFC1ECDC */ uint32_t psx_brA_BFC1EF1C = cpu->gpr[0]; uint32_t psx_brB_BFC1EF1C = cpu->gpr[0]; psx_taken_BFC1EF1C = (psx_brA_BFC1EF1C == psx_brB_BFC1EF1C); psx_delay_BFC1EF1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EF20: A0450000 sb $a1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000F4Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000F4Cu); #endif if (psx_delay_BFC1EF1C) { psx_delay_BFC1EF1C = 0; if (psx_taken_BFC1EF1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); cpu->pc = 0x00000D08u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F50u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F50u); cpu->pc = 0x00000F50u; return; /* fallthrough */ } void OpenBIOS_func_00000F50(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F50u); int psx_delay_BFC1EF24 = 0; int psx_delay_BFC1EF2C = 0; int psx_taken_BFC1EF2C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EF2Cu: goto label_BFC1EF2C; default: break; } } label_BFC1EF24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F50u); #endif #ifdef PSX_COSIM cosim_block(0x00000F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1EF24: 0C000252 jal 0xB0000948 */ cpu->gpr[31] = 0x00000F58u; /* jal link before delay slot */ psx_delay_BFC1EF24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F54u); #endif if (psx_delay_BFC1EF24) { psx_delay_BFC1EF24 = 0; cpu->gpr[31] = 0x00000F58u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000948u); cpu->pc = 0x00000948u; return; } label_BFC1EF2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F58u); #endif #ifdef PSX_COSIM cosim_block(0x00000F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF2C: 1000FF29 beq $zero, $zero, 0xBFC1EBD4 */ 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_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF30: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F5Cu); #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, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F60u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000F60u); cpu->pc = 0x00000F60u; return; /* fallthrough */ } void OpenBIOS_func_00000F60(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000F60u); int psx_delay_BFC1EF6C = 0; int psx_taken_BFC1EF6C = 0; int psx_delay_BFC1EF80 = 0; int psx_taken_BFC1EF80 = 0; int psx_delay_BFC1EFA0 = 0; int psx_taken_BFC1EFA0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1EF74u: goto label_BFC1EF74; case 0xBFC1EF88u: goto label_BFC1EF88; case 0xBFC1EFA8u: goto label_BFC1EFA8; case 0xBFC1EFACu: goto label_BFC1EFAC; default: break; } } label_BFC1EF34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000F60u); #endif #ifdef PSX_COSIM cosim_block(0x00000F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1EF34: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000F60u); #endif /* 0xBFC1EF38: 90C25EE3 lbu $v0, 24291($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24291; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (24291)), 2, 0x40u); PGXP_LOAD(0x90C25EE3u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1EF3C: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000F68u); #endif /* 0xBFC1EF40: 90871801 lbu $a3, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 7, 0x10u); PGXP_LOAD(0x90871801u, _pgxa, cpu->gpr[7]); } #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, 0x24u); #endif /* 0xBFC1EF44: 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(0x00000F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EF48: 00A22821 addu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A22821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC1EF4C: A0A7FFFD sb $a3, -3($a1) */ { uint32_t _pgxa = cpu->gpr[5] + -3; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000F78u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-3)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0A7FFFDu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00000F78u); #endif /* 0xBFC1EF50: 90871801 lbu $a3, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 7, 0x10u); PGXP_LOAD(0x90871801u, _pgxa, cpu->gpr[7]); } #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, 0x1u); #endif /* 0xBFC1EF54: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC1EF58: A0A7FFFE sb $a3, -2($a1) */ { uint32_t _pgxa = cpu->gpr[5] + -2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000F84u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (-2)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0A7FFFEu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00000F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EF5C: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000F88u); #endif /* 0xBFC1EF60: 90A55EE2 lbu $a1, 24290($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24290; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (24290)), 5, 0x20u); PGXP_LOAD(0x90A55EE2u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EF68: 00A2282B sltu $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)(cpu->gpr[5] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x00A2282Bu, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EF6C: 14A0FF5B bne $a1, $zero, 0xBFC1ECDC */ uint32_t psx_brA_BFC1EF6C = cpu->gpr[5]; uint32_t psx_brB_BFC1EF6C = cpu->gpr[0]; psx_taken_BFC1EF6C = (psx_brA_BFC1EF6C != psx_brB_BFC1EF6C); psx_delay_BFC1EF6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000F9Cu); #endif if (psx_delay_BFC1EF6C) { psx_delay_BFC1EF6C = 0; if (psx_taken_BFC1EF6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D08u); cpu->pc = 0x00000D08u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FA0u); } label_BFC1EF74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FA0u); #endif #ifdef PSX_COSIM cosim_block(0x00000FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FA0u); #endif /* 0xBFC1EF74: 90851800 lbu $a1, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6144)), 5, 0x10u); PGXP_LOAD(0x90851800u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF78: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EF7C: 30A50010 andi $a1, $a1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x10u; PGXP_ALU(0x30A50010u, cpu->gpr[5], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00000FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EF80: 10A00030 beq $a1, $zero, 0xBFC1F044 */ uint32_t psx_brA_BFC1EF80 = cpu->gpr[5]; uint32_t psx_brB_BFC1EF80 = cpu->gpr[0]; psx_taken_BFC1EF80 = (psx_brA_BFC1EF80 == psx_brB_BFC1EF80); psx_delay_BFC1EF80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000FB0u); #endif if (psx_delay_BFC1EF80) { psx_delay_BFC1EF80 = 0; if (psx_taken_BFC1EF80) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001070u); cpu->pc = 0x00001070u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FB4u); } label_BFC1EF88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FB4u); #endif #ifdef PSX_COSIM cosim_block(0x00000FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1EF88: A0801800 sb $zero, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000FB4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00000FB4u); #endif /* 0xBFC1EF8C: 90C55EE3 lbu $a1, 24291($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24291; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[6] + (24291)), 5, 0x40u); PGXP_LOAD(0x90C55EE3u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EF90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00000FBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EF94: 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(0x00000FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC1EF98: A0C55EE3 sb $a1, 24291($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24291; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000FC4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (24291)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0C55EE3u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00000FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EF9C: 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(0x00000FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1EFA0: 14A00002 bne $a1, $zero, 0xBFC1EFAC */ uint32_t psx_brA_BFC1EFA0 = cpu->gpr[5]; uint32_t psx_brB_BFC1EFA0 = cpu->gpr[0]; psx_taken_BFC1EFA0 = (psx_brA_BFC1EFA0 != psx_brB_BFC1EFA0); psx_delay_BFC1EFA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EFA4: 0045001B divu $v0, $a1 */ { uint32_t psx_n = cpu->gpr[2]; 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(0x0045001Bu, cpu->hi, cpu->lo, cpu->gpr[2], cpu->gpr[5]); #ifdef PSX_COSIM cosim_instr(0x00000FD0u); #endif if (psx_delay_BFC1EFA0) { psx_delay_BFC1EFA0 = 0; if (psx_taken_BFC1EFA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FD8u); goto label_BFC1EFAC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FD4u); } label_BFC1EFA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FD4u); #endif #ifdef PSX_COSIM cosim_block(0x00000FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EFA8: 0007000D break 0x1C00 */ psx_break(cpu, 0x01C00u, 0x00000FD4u); return; #ifdef PSX_COSIM cosim_instr(0x00000FD4u); #endif label_BFC1EFAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FD8u); #endif #ifdef PSX_COSIM cosim_block(0x00000FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EFAC: 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(0x00000FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EFB0: 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(0x00000FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EFB4: 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(0x00000FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1EFB8: 00A21021 addu $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00000FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EFBC: A0821802 sb $v0, 6146($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00000FE8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6146)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821802u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1EFC0: 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(0x00000FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FF0u); cpu->pc = 0x00000FF0u; return; /* fallthrough */ } void OpenBIOS_func_00000FF0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000FF0u); int psx_delay_BFC1EFC4 = 0; int psx_taken_BFC1EFC4 = 0; label_BFC1EFC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FF0u); #endif #ifdef PSX_COSIM cosim_block(0x00000FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EFC4: 1000FF60 beq $zero, $zero, 0xBFC1ED48 */ uint32_t psx_brA_BFC1EFC4 = cpu->gpr[0]; uint32_t psx_brB_BFC1EFC4 = cpu->gpr[0]; psx_taken_BFC1EFC4 = (psx_brA_BFC1EFC4 == psx_brB_BFC1EFC4); psx_delay_BFC1EFC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1EFC8: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00000FF4u); return; } g_debug_last_store_pc = 0x00000FF4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000FF4u); #endif if (psx_delay_BFC1EFC4) { psx_delay_BFC1EFC4 = 0; if (psx_taken_BFC1EFC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D74u); cpu->pc = 0x00000D74u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FF8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000FF8u); cpu->pc = 0x00000FF8u; return; /* fallthrough */ } void OpenBIOS_func_00000FF8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00000FF8u); label_BFC1EFCC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00000FF8u); #endif #ifdef PSX_COSIM cosim_block(0x00000FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00000FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EFCC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00000FF8u); #endif /* 0xBFC1EFD0: 90421801 lbu $v0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 2, 0x4u); PGXP_LOAD(0x90421801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00000FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001000u); cpu->pc = 0x00001000u; return; /* fallthrough */ } void OpenBIOS_func_00001000(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001000u); label_BFC1EFD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001000u); #endif #ifdef PSX_COSIM cosim_block(0x00001000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1EFD4: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001000u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001004u); cpu->pc = 0x00001004u; return; /* fallthrough */ } void OpenBIOS_func_00001004(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001004u); label_BFC1EFD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001004u); #endif #ifdef PSX_COSIM cosim_block(0x00001004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1EFD8: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00001004u); return; #ifdef PSX_COSIM cosim_instr(0x00001004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001008u); cpu->pc = 0x00001008u; return; /* fallthrough */ } void OpenBIOS_func_00001008(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001008u); label_BFC1EFDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001008u); #endif #ifdef PSX_COSIM cosim_block(0x00001008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1EFDC: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001008u); #endif /* 0xBFC1EFE0: 90A71801 lbu $a3, 6145($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6145; cpu->gpr[7] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (6145)), 7, 0x20u); PGXP_LOAD(0x90A71801u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x0000100Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001010u); cpu->pc = 0x00001010u; return; /* fallthrough */ } void OpenBIOS_func_00001010(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001010u); label_BFC1EFE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001010u); #endif #ifdef PSX_COSIM cosim_block(0x00001010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC1EFE4: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC1EFE8: 00071102 srl $v0, $a3, 4 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[2] = cpu->gpr[7] >> 4u; PGXP_ALU(0x00071102u, cpu->gpr[2], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x00001014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001018u); cpu->pc = 0x00001018u; return; /* fallthrough */ } void OpenBIOS_func_00001018(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001018u); label_BFC1EFEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001018u); #endif #ifdef PSX_COSIM cosim_block(0x00001018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EFEC: 00022080 sll $a0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 2u; PGXP_ALU(0x00022080u, cpu->gpr[4], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00001018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000101Cu); cpu->pc = 0x0000101Cu; return; /* fallthrough */ } void OpenBIOS_func_0000101C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000101Cu); label_BFC1EFF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000101Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000101Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000101Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EFF0: 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(0x0000101Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001020u); cpu->pc = 0x00001020u; return; /* fallthrough */ } void OpenBIOS_func_00001020(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001020u); label_BFC1EFF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001020u); #endif #ifdef PSX_COSIM cosim_block(0x00001020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1EFF4: 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(0x00001020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC1EFF8: 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(0x00001024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1EFFC: 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(0x00001028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC1F000: A1025EE1 sb $v0, 24289($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 24289; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000102Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[8] + (24289)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA1025EE1u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000102Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001030u); cpu->pc = 0x00001030u; return; /* fallthrough */ } void OpenBIOS_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); label_BFC1F004: #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 /* 0xBFC1F004: 90A61801 lbu $a2, 6145($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6145; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (6145)), 6, 0x20u); PGXP_LOAD(0x90A61801u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00001030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F008: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1F00C: 00062102 srl $a0, $a2, 4 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[6] >> 4u; PGXP_ALU(0x00062102u, cpu->gpr[4], _pgx1, 4u); } #ifdef PSX_COSIM cosim_instr(0x00001038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000103Cu); cpu->pc = 0x0000103Cu; return; /* fallthrough */ } void OpenBIOS_func_0000103C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000103Cu); label_BFC1F010: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000103Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000103Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000103Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210u); #endif /* 0xBFC1F010: 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(0x0000103Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001040u); cpu->pc = 0x00001040u; return; /* fallthrough */ } void OpenBIOS_func_00001040(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001040u); label_BFC1F014: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001040u); #endif #ifdef PSX_COSIM cosim_block(0x00001040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210u); #endif /* 0xBFC1F014: 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(0x00001040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1F018: 30C6000F andi $a2, $a2, 0xF */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0xFu; PGXP_ALU(0x30C6000Fu, cpu->gpr[6], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x00001044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F01C: 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(0x00001048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1F020: 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(0x0000104Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1F024: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1F028: A0C45EE2 sb $a0, 24290($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24290; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001054u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (24290)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0C45EE2u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001054u); #endif /* 0xBFC1F02C: 90A41800 lbu $a0, 6144($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6144; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (6144)), 4, 0x20u); PGXP_LOAD(0x90A41800u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F030: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000105Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001060u); cpu->pc = 0x00001060u; return; /* fallthrough */ } void OpenBIOS_func_00001060(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001060u); int psx_delay_BFC1F038 = 0; int psx_taken_BFC1F038 = 0; int psx_delay_BFC1F044 = 0; int psx_delay_BFC1F04C = 0; int psx_taken_BFC1F04C = 0; int psx_delay_BFC1F074 = 0; int psx_taken_BFC1F074 = 0; int psx_delay_BFC1F07C = 0; int psx_delay_BFC1F084 = 0; int psx_taken_BFC1F084 = 0; int psx_delay_BFC1F090 = 0; int psx_taken_BFC1F090 = 0; int psx_delay_BFC1F0AC = 0; int psx_taken_BFC1F0AC = 0; int psx_delay_BFC1F0B4 = 0; int psx_taken_BFC1F0B4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F044u: goto label_BFC1F044; case 0xBFC1F07Cu: goto label_BFC1F07C; case 0xBFC1F08Cu: goto label_BFC1F08C; case 0xBFC1F098u: goto label_BFC1F098; case 0xBFC1F040u: goto label_BFC1F040; case 0xBFC1F04Cu: goto label_BFC1F04C; case 0xBFC1F054u: goto label_BFC1F054; case 0xBFC1F084u: goto label_BFC1F084; case 0xBFC1F0B4u: goto label_BFC1F0B4; case 0xBFC1F0BCu: goto label_BFC1F0BC; case 0xBFC1F0C0u: goto label_BFC1F0C0; default: break; } } label_BFC1F034: #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, 0x10u); #endif /* 0xBFC1F034: 30840010 andi $a0, $a0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x10u; PGXP_ALU(0x30840010u, cpu->gpr[4], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F038: 14800006 bne $a0, $zero, 0xBFC1F054 */ uint32_t psx_brA_BFC1F038 = cpu->gpr[4]; uint32_t psx_brB_BFC1F038 = cpu->gpr[0]; psx_taken_BFC1F038 = (psx_brA_BFC1F038 != psx_brB_BFC1F038); psx_delay_BFC1F038 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1F03C: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001068u); #endif if (psx_delay_BFC1F038) { psx_delay_BFC1F038 = 0; if (psx_taken_BFC1F038) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001080u); goto label_BFC1F054; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000106Cu); } label_BFC1F040: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000106Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000106Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000106Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F040: A0C25EE3 sb $v0, 24291($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24291; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000106Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (24291)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0C25EE3u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000106Cu); #endif label_BFC1F044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001070u); #endif #ifdef PSX_COSIM cosim_block(0x00001070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F044: 0C00023E jal 0xB00008F8 */ cpu->gpr[31] = 0x00001078u; /* jal link before delay slot */ psx_delay_BFC1F044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F048: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001074u); #endif if (psx_delay_BFC1F044) { psx_delay_BFC1F044 = 0; cpu->gpr[31] = 0x00001078u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000008F8u); cpu->pc = 0x000008F8u; return; } label_BFC1F04C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001078u); #endif #ifdef PSX_COSIM cosim_block(0x00001078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F04C: 1000FEE1 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F04C = cpu->gpr[0]; uint32_t psx_brB_BFC1F04C = cpu->gpr[0]; psx_taken_BFC1F04C = (psx_brA_BFC1F04C == psx_brB_BFC1F04C); psx_delay_BFC1F04C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F050: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000107Cu); #endif if (psx_delay_BFC1F04C) { psx_delay_BFC1F04C = 0; if (psx_taken_BFC1F04C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001080u); } label_BFC1F054: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001080u); #endif #ifdef PSX_COSIM cosim_block(0x00001080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F054: A0A01800 sb $zero, 6144($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001080u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0A01800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001080u); #endif /* 0xBFC1F058: 91025EE1 lbu $v0, 24289($t0) */ { uint32_t _pgxa = cpu->gpr[8] + 24289; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[8] + (24289)), 2, 0x100u); PGXP_LOAD(0x91025EE1u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F05C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F060: 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(0x0000108Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F064: A0C25EE3 sb $v0, 24291($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 24291; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001090u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (24291)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0C25EE3u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F068: 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(0x00001094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC1F06C: A0A71802 sb $a3, 6146($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001098u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (6146)), (uint8_t)(cpu->gpr[7] & 0xFFu)); PGXP_STORE(0xA0A71802u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00001098u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F070: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000109Cu); return; } g_debug_last_store_pc = 0x0000109Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000109Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F074: 1000FED7 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F074 = cpu->gpr[0]; uint32_t psx_brB_BFC1F074 = cpu->gpr[0]; psx_taken_BFC1F074 = (psx_brA_BFC1F074 == psx_brB_BFC1F074); psx_delay_BFC1F074 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F078: A0A21801 sb $v0, 6145($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000010A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (6145)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0A21801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000010A4u); #endif if (psx_delay_BFC1F074) { psx_delay_BFC1F074 = 0; if (psx_taken_BFC1F074) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010A8u); } label_BFC1F07C: #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, 0x80000000u); #endif /* 0xBFC1F07C: 0C000252 jal 0xB0000948 */ cpu->gpr[31] = 0x000010B0u; /* jal link before delay slot */ psx_delay_BFC1F07C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F080: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000010ACu); #endif if (psx_delay_BFC1F07C) { psx_delay_BFC1F07C = 0; cpu->gpr[31] = 0x000010B0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000948u); cpu->pc = 0x00000948u; return; } label_BFC1F084: #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, 0x1u); #endif /* 0xBFC1F084: 1000FED3 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F084 = cpu->gpr[0]; uint32_t psx_brB_BFC1F084 = cpu->gpr[0]; 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(0x000010B4u); #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, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010B8u); } label_BFC1F08C: #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, 0x4u); #endif /* 0xBFC1F08C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000010B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F090: 1000FED0 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F090 = cpu->gpr[0]; uint32_t psx_brB_BFC1F090 = cpu->gpr[0]; psx_taken_BFC1F090 = (psx_brA_BFC1F090 == psx_brB_BFC1F090); psx_delay_BFC1F090 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC1F094: AC475F08 sw $a3, 24328($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010C0u); return; } g_debug_last_store_pc = 0x000010C0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC475F08u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000010C0u); #endif if (psx_delay_BFC1F090) { psx_delay_BFC1F090 = 0; if (psx_taken_BFC1F090) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010C4u); } label_BFC1F098: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000010C4u); #endif #ifdef PSX_COSIM cosim_block(0x000010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F098: A0801800 sb $zero, 6144($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000010C4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000010C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F09C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000010C8u); #endif /* 0xBFC1F0A0: 8C425EF0 lw $v0, 24304($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24304; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010CCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425EF0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000010CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010D0u); #endif /* 0xBFC1F0A4: 8C645F10 lw $a0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010D0u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C645F10u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000010D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F0A8: 30420100 andi $v0, $v0, 0x100 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x100u; PGXP_ALU(0x30420100u, cpu->gpr[2], _pgx1, 0x0100u); } #ifdef PSX_COSIM cosim_instr(0x000010D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F0AC: 14400009 bne $v0, $zero, 0xBFC1F0D4 */ uint32_t psx_brA_BFC1F0AC = cpu->gpr[2]; uint32_t psx_brB_BFC1F0AC = cpu->gpr[0]; psx_taken_BFC1F0AC = (psx_brA_BFC1F0AC != psx_brB_BFC1F0AC); psx_delay_BFC1F0AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F0B0: 240500FE addiu $a1, $zero, 254 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); PGXP_ALU(0x240500FEu, cpu->gpr[5], _pgx1, 0x000000FEu); } #ifdef PSX_COSIM cosim_instr(0x000010DCu); #endif if (psx_delay_BFC1F0AC) { psx_delay_BFC1F0AC = 0; if (psx_taken_BFC1F0AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001100u); cpu->pc = 0x00001100u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010E0u); } label_BFC1F0B4: #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, 0x30u); #endif /* 0xBFC1F0B4: 14850002 bne $a0, $a1, 0xBFC1F0C0 */ uint32_t psx_brA_BFC1F0B4 = cpu->gpr[4]; uint32_t psx_brB_BFC1F0B4 = cpu->gpr[5]; psx_taken_BFC1F0B4 = (psx_brA_BFC1F0B4 != psx_brB_BFC1F0B4); psx_delay_BFC1F0B4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F0B8: 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(0x000010E4u); #endif if (psx_delay_BFC1F0B4) { psx_delay_BFC1F0B4 = 0; if (psx_taken_BFC1F0B4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010ECu); goto label_BFC1F0C0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010E8u); } label_BFC1F0BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000010E8u); #endif #ifdef PSX_COSIM cosim_block(0x000010E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F0BC: 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(0x000010E8u); #endif label_BFC1F0C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000010ECu); #endif #ifdef PSX_COSIM cosim_block(0x000010ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F0C0: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000010ECu); return; } g_debug_last_store_pc = 0x000010ECu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000010ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010F0u); cpu->pc = 0x000010F0u; return; /* fallthrough */ } void OpenBIOS_func_000010F0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000010F0u); int psx_delay_BFC1F0CC = 0; int psx_taken_BFC1F0CC = 0; int psx_delay_BFC1F0D4 = 0; int psx_taken_BFC1F0D4 = 0; int psx_delay_BFC1F0E8 = 0; int psx_taken_BFC1F0E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F0D4u: goto label_BFC1F0D4; case 0xBFC1F0F0u: goto label_BFC1F0F0; case 0xBFC1F0CCu: goto label_BFC1F0CC; case 0xBFC1F0DCu: goto label_BFC1F0DC; case 0xBFC1F0E0u: goto label_BFC1F0E0; default: break; } } label_BFC1F0C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000010F0u); #endif #ifdef PSX_COSIM cosim_block(0x000010F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F0C4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000010F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F0C8: 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(0x000010F4u); #endif label_BFC1F0CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000010F8u); #endif #ifdef PSX_COSIM cosim_block(0x000010F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000010F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F0CC: 1000FEC1 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F0CC = cpu->gpr[0]; uint32_t psx_brB_BFC1F0CC = cpu->gpr[0]; psx_taken_BFC1F0CC = (psx_brA_BFC1F0CC == psx_brB_BFC1F0CC); psx_delay_BFC1F0CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F0D0: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000010FCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000010FCu); #endif if (psx_delay_BFC1F0CC) { psx_delay_BFC1F0CC = 0; if (psx_taken_BFC1F0CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001100u); } label_BFC1F0D4: #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, 0x30u); #endif /* 0xBFC1F0D4: 14850002 bne $a0, $a1, 0xBFC1F0E0 */ uint32_t psx_brA_BFC1F0D4 = cpu->gpr[4]; uint32_t psx_brB_BFC1F0D4 = cpu->gpr[5]; psx_taken_BFC1F0D4 = (psx_brA_BFC1F0D4 != psx_brB_BFC1F0D4); psx_delay_BFC1F0D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F0D8: 240200EB addiu $v0, $zero, 235 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); PGXP_ALU(0x240200EBu, cpu->gpr[2], _pgx1, 0x000000EBu); } #ifdef PSX_COSIM cosim_instr(0x00001104u); #endif if (psx_delay_BFC1F0D4) { psx_delay_BFC1F0D4 = 0; if (psx_taken_BFC1F0D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000110Cu); goto label_BFC1F0E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001108u); } label_BFC1F0DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001108u); #endif #ifdef PSX_COSIM cosim_block(0x00001108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F0DC: 240200FB addiu $v0, $zero, 251 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); PGXP_ALU(0x240200FBu, cpu->gpr[2], _pgx1, 0x000000FBu); } #ifdef PSX_COSIM cosim_instr(0x00001108u); #endif label_BFC1F0E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000110Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000110Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000110Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F0E0: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); 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[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #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, 0x4u); #endif /* 0xBFC1F0E4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F0E8: 1000FFF8 beq $zero, $zero, 0xBFC1F0CC */ uint32_t psx_brA_BFC1F0E8 = cpu->gpr[0]; uint32_t psx_brB_BFC1F0E8 = cpu->gpr[0]; psx_taken_BFC1F0E8 = (psx_brA_BFC1F0E8 == psx_brB_BFC1F0E8); psx_delay_BFC1F0E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F0EC: 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(0x00001118u); #endif if (psx_delay_BFC1F0E8) { psx_delay_BFC1F0E8 = 0; if (psx_taken_BFC1F0E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000010F8u); goto label_BFC1F0CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000111Cu); } label_BFC1F0F0: #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 /* 0xBFC1F0F0: 90821801 lbu $v0, 6145($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 6145; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (6145)), 2, 0x10u); PGXP_LOAD(0x90821801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000111Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F0F4: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001120u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1F0F8: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00001124u); return; #ifdef PSX_COSIM cosim_instr(0x00001124u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001128u); cpu->pc = 0x00001128u; return; /* fallthrough */ } void OpenBIOS_func_00001128(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001128u); int psx_delay_BFC1F108 = 0; int psx_taken_BFC1F108 = 0; int psx_delay_BFC1F114 = 0; int psx_taken_BFC1F114 = 0; int psx_delay_BFC1F124 = 0; int psx_taken_BFC1F124 = 0; int psx_delay_BFC1F12C = 0; int psx_taken_BFC1F12C = 0; int psx_delay_BFC1F140 = 0; int psx_taken_BFC1F140 = 0; int psx_delay_BFC1F154 = 0; int psx_delay_BFC1F164 = 0; int psx_taken_BFC1F164 = 0; int psx_delay_BFC1F16C = 0; int psx_taken_BFC1F16C = 0; int psx_delay_BFC1F184 = 0; int psx_taken_BFC1F184 = 0; int psx_delay_BFC1F18C = 0; int psx_taken_BFC1F18C = 0; int psx_delay_BFC1F1A4 = 0; int psx_taken_BFC1F1A4 = 0; int psx_delay_BFC1F1B8 = 0; int psx_delay_BFC1F1C4 = 0; int psx_taken_BFC1F1C4 = 0; int psx_delay_BFC1F1D4 = 0; int psx_taken_BFC1F1D4 = 0; int psx_delay_BFC1F1DC = 0; int psx_taken_BFC1F1DC = 0; int psx_delay_BFC1F1E8 = 0; int psx_taken_BFC1F1E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F110u: goto label_BFC1F110; case 0xBFC1F11Cu: goto label_BFC1F11C; case 0xBFC1F12Cu: goto label_BFC1F12C; case 0xBFC1F134u: goto label_BFC1F134; case 0xBFC1F148u: goto label_BFC1F148; case 0xBFC1F15Cu: goto label_BFC1F15C; case 0xBFC1F16Cu: goto label_BFC1F16C; case 0xBFC1F174u: goto label_BFC1F174; case 0xBFC1F17Cu: goto label_BFC1F17C; case 0xBFC1F18Cu: goto label_BFC1F18C; case 0xBFC1F194u: goto label_BFC1F194; case 0xBFC1F19Cu: goto label_BFC1F19C; case 0xBFC1F1ACu: goto label_BFC1F1AC; case 0xBFC1F1C0u: goto label_BFC1F1C0; case 0xBFC1F1CCu: goto label_BFC1F1CC; case 0xBFC1F1D4u: goto label_BFC1F1D4; case 0xBFC1F1DCu: goto label_BFC1F1DC; case 0xBFC1F1E4u: goto label_BFC1F1E4; default: break; } } label_BFC1F0FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001128u); #endif #ifdef PSX_COSIM cosim_block(0x00001128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC1F0FC: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001128u); #endif /* 0xBFC1F100: 8E225F0C lw $v0, 24332($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000112Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E225F0Cu, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC1F104: 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(0x00001130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F108: 1044000A beq $v0, $a0, 0xBFC1F134 */ uint32_t psx_brA_BFC1F108 = cpu->gpr[2]; uint32_t psx_brB_BFC1F108 = cpu->gpr[4]; psx_taken_BFC1F108 = (psx_brA_BFC1F108 == psx_brB_BFC1F108); psx_delay_BFC1F108 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F10C: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001138u); #endif if (psx_delay_BFC1F108) { psx_delay_BFC1F108 = 0; if (psx_taken_BFC1F108) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001160u); goto label_BFC1F134; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000113Cu); } label_BFC1F110: #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, 0x9u); #endif /* 0xBFC1F110: 240300FB addiu $v1, $zero, 251 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); PGXP_ALU(0x240300FBu, cpu->gpr[3], _pgx1, 0x000000FBu); } #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, 0xCu); #endif /* 0xBFC1F114: 10430007 beq $v0, $v1, 0xBFC1F134 */ uint32_t psx_brA_BFC1F114 = cpu->gpr[2]; uint32_t psx_brB_BFC1F114 = cpu->gpr[3]; psx_taken_BFC1F114 = (psx_brA_BFC1F114 == psx_brB_BFC1F114); psx_delay_BFC1F114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F118: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001144u); #endif if (psx_delay_BFC1F114) { psx_delay_BFC1F114 = 0; if (psx_taken_BFC1F114) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001160u); goto label_BFC1F134; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001148u); } label_BFC1F11C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001148u); #endif #ifdef PSX_COSIM cosim_block(0x00001148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001148u); #endif /* 0xBFC1F11C: 8E025F10 lw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001148u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F120: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC1F124: 10440003 beq $v0, $a0, 0xBFC1F134 */ uint32_t psx_brA_BFC1F124 = cpu->gpr[2]; uint32_t psx_brB_BFC1F124 = cpu->gpr[4]; psx_taken_BFC1F124 = (psx_brA_BFC1F124 == psx_brB_BFC1F124); psx_delay_BFC1F124 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F128: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001154u); #endif if (psx_delay_BFC1F124) { psx_delay_BFC1F124 = 0; if (psx_taken_BFC1F124) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001160u); goto label_BFC1F134; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001158u); } label_BFC1F12C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001158u); #endif #ifdef PSX_COSIM cosim_block(0x00001158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F12C: 14430029 bne $v0, $v1, 0xBFC1F1D4 */ uint32_t psx_brA_BFC1F12C = cpu->gpr[2]; uint32_t psx_brB_BFC1F12C = cpu->gpr[3]; psx_taken_BFC1F12C = (psx_brA_BFC1F12C != psx_brB_BFC1F12C); psx_delay_BFC1F12C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F130: 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(0x0000115Cu); #endif if (psx_delay_BFC1F12C) { psx_delay_BFC1F12C = 0; if (psx_taken_BFC1F12C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001200u); goto label_BFC1F1D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001160u); } label_BFC1F134: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001160u); #endif #ifdef PSX_COSIM cosim_block(0x00001160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F134: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001160u); #endif /* 0xBFC1F138: 8C425EF8 lw $v0, 24312($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24312; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24312)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001164u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425EF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F13C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F140: 18400006 blez $v0, 0xBFC1F15C */ uint32_t psx_brA_BFC1F140 = cpu->gpr[2]; psx_taken_BFC1F140 = ((int32_t)psx_brA_BFC1F140 <= 0); psx_delay_BFC1F140 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1F144: 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(0x00001170u); #endif if (psx_delay_BFC1F140) { psx_delay_BFC1F140 = 0; if (psx_taken_BFC1F140) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001188u); goto label_BFC1F15C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001174u); } label_BFC1F148: #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, 0x10u); #endif /* 0xBFC1F148: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F14C: 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(0x00001178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F150: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #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, 0x80000004u); #endif /* 0xBFC1F154: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00001188u; /* jalr link before delay slot */ psx_delay_BFC1F154 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F158: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00001184u); #endif if (psx_delay_BFC1F154) { psx_delay_BFC1F154 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00001188u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1F15C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001188u); #endif #ifdef PSX_COSIM cosim_block(0x00001188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001188u); #endif /* 0xBFC1F15C: 8E025F10 lw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001188u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F160: 240300F6 addiu $v1, $zero, 246 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (246)); PGXP_ALU(0x240300F6u, cpu->gpr[3], _pgx1, 0x000000F6u); } #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, 0xCu); #endif /* 0xBFC1F164: 10430003 beq $v0, $v1, 0xBFC1F174 */ uint32_t psx_brA_BFC1F164 = cpu->gpr[2]; uint32_t psx_brB_BFC1F164 = cpu->gpr[3]; psx_taken_BFC1F164 = (psx_brA_BFC1F164 == psx_brB_BFC1F164); psx_delay_BFC1F164 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F168: 240300FB addiu $v1, $zero, 251 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (251)); PGXP_ALU(0x240300FBu, cpu->gpr[3], _pgx1, 0x000000FBu); } #ifdef PSX_COSIM cosim_instr(0x00001194u); #endif if (psx_delay_BFC1F164) { psx_delay_BFC1F164 = 0; if (psx_taken_BFC1F164) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011A0u); goto label_BFC1F174; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001198u); } label_BFC1F16C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001198u); #endif #ifdef PSX_COSIM cosim_block(0x00001198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F16C: 14430017 bne $v0, $v1, 0xBFC1F1CC */ uint32_t psx_brA_BFC1F16C = cpu->gpr[2]; uint32_t psx_brB_BFC1F16C = cpu->gpr[3]; psx_taken_BFC1F16C = (psx_brA_BFC1F16C != psx_brB_BFC1F16C); psx_delay_BFC1F16C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F170: 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(0x0000119Cu); #endif if (psx_delay_BFC1F16C) { psx_delay_BFC1F16C = 0; if (psx_taken_BFC1F16C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011F8u); goto label_BFC1F1CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011A0u); } label_BFC1F174: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011A0u); #endif #ifdef PSX_COSIM cosim_block(0x000011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F174: 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(0x000011A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F178: AE025F10 sw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011A4u); return; } g_debug_last_store_pc = 0x000011A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000011A4u); #endif label_BFC1F17C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011A8u); #endif #ifdef PSX_COSIM cosim_block(0x000011A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011A8u); #endif /* 0xBFC1F17C: 8E235F0C lw $v1, 24332($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011A8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x20000u); } PGXP_LOAD(0x8E235F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000011A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F180: 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(0x000011ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1F184: 10640003 beq $v1, $a0, 0xBFC1F194 */ uint32_t psx_brA_BFC1F184 = cpu->gpr[3]; uint32_t psx_brB_BFC1F184 = cpu->gpr[4]; psx_taken_BFC1F184 = (psx_brA_BFC1F184 == psx_brB_BFC1F184); psx_delay_BFC1F184 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F188: 240400EB addiu $a0, $zero, 235 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (235)); PGXP_ALU(0x240400EBu, cpu->gpr[4], _pgx1, 0x000000EBu); } #ifdef PSX_COSIM cosim_instr(0x000011B4u); #endif if (psx_delay_BFC1F184) { psx_delay_BFC1F184 = 0; if (psx_taken_BFC1F184) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011C0u); goto label_BFC1F194; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011B8u); } label_BFC1F18C: #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, 0x18u); #endif /* 0xBFC1F18C: 14640003 bne $v1, $a0, 0xBFC1F19C */ uint32_t psx_brA_BFC1F18C = cpu->gpr[3]; uint32_t psx_brB_BFC1F18C = cpu->gpr[4]; psx_taken_BFC1F18C = (psx_brA_BFC1F18C != psx_brB_BFC1F18C); psx_delay_BFC1F18C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F190: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000011BCu); #endif if (psx_delay_BFC1F18C) { psx_delay_BFC1F18C = 0; if (psx_taken_BFC1F18C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011C8u); goto label_BFC1F19C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011C0u); } label_BFC1F194: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011C0u); #endif #ifdef PSX_COSIM cosim_block(0x000011C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F194: 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(0x000011C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC1F198: AE235F0C sw $v1, 24332($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011C4u); return; } g_debug_last_store_pc = 0x000011C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE235F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000011C4u); #endif label_BFC1F19C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011C8u); #endif #ifdef PSX_COSIM cosim_block(0x000011C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F19C: 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(0x000011C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F1A0: 2C420003 sltiu $v0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); } #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, 0x5u); #endif /* 0xBFC1F1A4: 1040FE83 beq $v0, $zero, 0xBFC1EBB4 */ uint32_t psx_brA_BFC1F1A4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F1A4 = cpu->gpr[0]; psx_taken_BFC1F1A4 = (psx_brA_BFC1F1A4 == psx_brB_BFC1F1A4); psx_delay_BFC1F1A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC1F1A8: 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(0x000011D4u); #endif if (psx_delay_BFC1F1A4) { psx_delay_BFC1F1A4 = 0; if (psx_taken_BFC1F1A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE0u); cpu->pc = 0x00000BE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011D8u); } label_BFC1F1AC: #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, 0x10u); #endif /* 0xBFC1F1AC: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000011D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F1B0: 240200B0 addiu $v0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240200B0u, cpu->gpr[2], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x000011DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F1B4: 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(0x000011E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC1F1B8: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000011ECu; /* jalr link before delay slot */ psx_delay_BFC1F1B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F1BC: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x000011E8u); #endif if (psx_delay_BFC1F1B8) { psx_delay_BFC1F1B8 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000011ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC1F1C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011ECu); #endif #ifdef PSX_COSIM cosim_block(0x000011ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F1C0: 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(0x000011ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F1C4: 1000FE83 beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F1C4 = cpu->gpr[0]; uint32_t psx_brB_BFC1F1C4 = cpu->gpr[0]; psx_taken_BFC1F1C4 = (psx_brA_BFC1F1C4 == psx_brB_BFC1F1C4); psx_delay_BFC1F1C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F1C8: AE025F10 sw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000011F4u); return; } g_debug_last_store_pc = 0x000011F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000011F4u); #endif if (psx_delay_BFC1F1C4) { psx_delay_BFC1F1C4 = 0; if (psx_taken_BFC1F1C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011F8u); } label_BFC1F1CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000011F8u); #endif #ifdef PSX_COSIM cosim_block(0x000011F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000011F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20008u); #endif /* 0xBFC1F1CC: AE235F0C sw $v1, 24332($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (24332)); 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[3]); } PGXP_STORE(0xAE235F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000011F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F1D0: 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(0x000011FCu); #endif label_BFC1F1D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001200u); #endif #ifdef PSX_COSIM cosim_block(0x00001200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F1D4: 10430003 beq $v0, $v1, 0xBFC1F1E4 */ uint32_t psx_brA_BFC1F1D4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F1D4 = cpu->gpr[3]; psx_taken_BFC1F1D4 = (psx_brA_BFC1F1D4 == psx_brB_BFC1F1D4); psx_delay_BFC1F1D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F1D8: 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(0x00001204u); #endif if (psx_delay_BFC1F1D4) { psx_delay_BFC1F1D4 = 0; if (psx_taken_BFC1F1D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001210u); goto label_BFC1F1E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001208u); } label_BFC1F1DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001208u); #endif #ifdef PSX_COSIM cosim_block(0x00001208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F1DC: 1443FFE7 bne $v0, $v1, 0xBFC1F17C */ uint32_t psx_brA_BFC1F1DC = cpu->gpr[2]; uint32_t psx_brB_BFC1F1DC = cpu->gpr[3]; psx_taken_BFC1F1DC = (psx_brA_BFC1F1DC != psx_brB_BFC1F1DC); psx_delay_BFC1F1DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F1E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000120Cu); #endif if (psx_delay_BFC1F1DC) { psx_delay_BFC1F1DC = 0; if (psx_taken_BFC1F1DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000011A8u); goto label_BFC1F17C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001210u); } label_BFC1F1E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001210u); #endif #ifdef PSX_COSIM cosim_block(0x00001210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F1E4: 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(0x00001210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F1E8: 1000FE72 beq $zero, $zero, 0xBFC1EBB4 */ uint32_t psx_brA_BFC1F1E8 = cpu->gpr[0]; uint32_t psx_brB_BFC1F1E8 = cpu->gpr[0]; psx_taken_BFC1F1E8 = (psx_brA_BFC1F1E8 == psx_brB_BFC1F1E8); psx_delay_BFC1F1E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F1EC: AE025F10 sw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001218u); return; } g_debug_last_store_pc = 0x00001218u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001218u); #endif if (psx_delay_BFC1F1E8) { psx_delay_BFC1F1E8 = 0; if (psx_taken_BFC1F1E8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000BE0u); cpu->pc = 0x00000BE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000121Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000121Cu); cpu->pc = 0x0000121Cu; return; /* fallthrough */ } void OpenBIOS_func_0000121C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000121Cu); int psx_delay_BFC1F218 = 0; int psx_taken_BFC1F218 = 0; int psx_delay_BFC1F220 = 0; int psx_taken_BFC1F220 = 0; int psx_delay_BFC1F230 = 0; int psx_taken_BFC1F230 = 0; int psx_delay_BFC1F258 = 0; int psx_taken_BFC1F258 = 0; int psx_delay_BFC1F26C = 0; int psx_taken_BFC1F26C = 0; int psx_delay_BFC1F27C = 0; int psx_taken_BFC1F27C = 0; int psx_delay_BFC1F288 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F284u: goto label_BFC1F284; case 0xBFC1F288u: goto label_BFC1F288; case 0xBFC1F220u: goto label_BFC1F220; case 0xBFC1F228u: goto label_BFC1F228; case 0xBFC1F238u: goto label_BFC1F238; case 0xBFC1F260u: goto label_BFC1F260; case 0xBFC1F268u: goto label_BFC1F268; case 0xBFC1F274u: goto label_BFC1F274; default: break; } } label_BFC1F1F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000121Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000121Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000121Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F1F0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000121Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001220u); #endif /* 0xBFC1F1F4: 90441801 lbu $a0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 4, 0x4u); PGXP_LOAD(0x90441801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F1F8: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1F1FC: A0645EED sb $a0, 24301($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24301; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001228u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (24301)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0645EEDu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001228u); #endif /* 0xBFC1F200: 90441801 lbu $a0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6145)), 4, 0x4u); PGXP_LOAD(0x90441801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000122Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F204: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1F208: A0645EEC sb $a0, 24300($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24300; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001234u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (24300)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0645EECu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F20C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001238u); #endif /* 0xBFC1F210: 8C645F10 lw $a0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000123Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C645F10u, _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, 0x21u); #endif /* 0xBFC1F214: 2405001A addiu $a1, $zero, 26 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (26)); PGXP_ALU(0x2405001Au, cpu->gpr[5], _pgx1, 0x0000001Au); } #ifdef PSX_COSIM cosim_instr(0x00001240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1F218: 10850011 beq $a0, $a1, 0xBFC1F260 */ uint32_t psx_brA_BFC1F218 = cpu->gpr[4]; uint32_t psx_brB_BFC1F218 = cpu->gpr[5]; psx_taken_BFC1F218 = (psx_brA_BFC1F218 == psx_brB_BFC1F218); psx_delay_BFC1F218 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F21C: 24050CCC addiu $a1, $zero, 3276 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); PGXP_ALU(0x24050CCCu, cpu->gpr[5], _pgx1, 0x00000CCCu); } #ifdef PSX_COSIM cosim_instr(0x00001248u); #endif if (psx_delay_BFC1F218) { psx_delay_BFC1F218 = 0; if (psx_taken_BFC1F218) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000128Cu); goto label_BFC1F260; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000124Cu); } label_BFC1F220: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000124Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000124Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000124Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1F220: 10850011 beq $a0, $a1, 0xBFC1F268 */ uint32_t psx_brA_BFC1F220 = cpu->gpr[4]; uint32_t psx_brB_BFC1F220 = cpu->gpr[5]; psx_taken_BFC1F220 = (psx_brA_BFC1F220 == psx_brB_BFC1F220); psx_delay_BFC1F220 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F224: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001250u); #endif if (psx_delay_BFC1F220) { psx_delay_BFC1F220 = 0; if (psx_taken_BFC1F220) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001294u); goto label_BFC1F268; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001254u); } label_BFC1F228: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001254u); #endif #ifdef PSX_COSIM cosim_block(0x00001254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001254u); #endif /* 0xBFC1F228: 8C865EE8 lw $a2, 24296($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24296; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001254u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } PGXP_LOAD(0x8C865EE8u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00001254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F22C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001258u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1F230: 14C00010 bne $a2, $zero, 0xBFC1F274 */ uint32_t psx_brA_BFC1F230 = cpu->gpr[6]; uint32_t psx_brB_BFC1F230 = cpu->gpr[0]; psx_taken_BFC1F230 = (psx_brA_BFC1F230 != psx_brB_BFC1F230); psx_delay_BFC1F230 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1F234: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001260u); #endif if (psx_delay_BFC1F230) { psx_delay_BFC1F230 = 0; if (psx_taken_BFC1F230) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012A0u); goto label_BFC1F274; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001264u); } label_BFC1F238: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001264u); #endif #ifdef PSX_COSIM cosim_block(0x00001264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1F238: 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(0x00001264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC1F23C: AC865EE8 sw $a2, 24296($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001268u); return; } g_debug_last_store_pc = 0x00001268u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC865EE8u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00001268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F240: 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(0x0000126Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1F244: ACA45F0C sw $a0, 24332($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001270u); return; } g_debug_last_store_pc = 0x00001270u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA45F0Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F248: 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(0x00001274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F24C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001278u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F250: A0441801 sb $a0, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000127Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441801u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000127Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F254: 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(0x00001280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F258: 1000FE5E beq $zero, $zero, 0xBFC1EBD4 */ uint32_t psx_brA_BFC1F258 = cpu->gpr[0]; uint32_t psx_brB_BFC1F258 = cpu->gpr[0]; psx_taken_BFC1F258 = (psx_brA_BFC1F258 == psx_brB_BFC1F258); psx_delay_BFC1F258 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F25C: AC625F10 sw $v0, 24336($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001288u); return; } g_debug_last_store_pc = 0x00001288u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001288u); #endif if (psx_delay_BFC1F258) { psx_delay_BFC1F258 = 0; if (psx_taken_BFC1F258) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000C00u); cpu->pc = 0x00000C00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000128Cu); } label_BFC1F260: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000128Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000128Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000128Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F260: A0000000 sb $zero, 0($zero) */ { uint32_t _pgxa = cpu->gpr[0]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000128Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[0] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0000000u, _pgxa, cpu->gpr[0]); } #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, 0x0u); #endif /* 0xBFC1F264: 0000000D break 0x0 */ psx_break(cpu, 0x00000u, 0x00001290u); return; #ifdef PSX_COSIM cosim_instr(0x00001290u); #endif label_BFC1F268: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001294u); #endif #ifdef PSX_COSIM cosim_block(0x00001294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F268: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F26C: 1000FEAB beq $zero, $zero, 0xBFC1ED1C */ uint32_t psx_brA_BFC1F26C = cpu->gpr[0]; uint32_t psx_brB_BFC1F26C = cpu->gpr[0]; psx_taken_BFC1F26C = (psx_brA_BFC1F26C == psx_brB_BFC1F26C); psx_delay_BFC1F26C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F270: 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(0x0000129Cu); #endif if (psx_delay_BFC1F26C) { psx_delay_BFC1F26C = 0; if (psx_taken_BFC1F26C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000D48u); cpu->pc = 0x00000D48u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012A0u); } label_BFC1F274: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012A0u); #endif #ifdef PSX_COSIM cosim_block(0x000012A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F274: 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(0x000012A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F278: AC805EE8 sw $zero, 24296($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 24296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012A4u); return; } g_debug_last_store_pc = 0x000012A4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC805EE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000012A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F27C: 1000FECD beq $zero, $zero, 0xBFC1EDB4 */ uint32_t psx_brA_BFC1F27C = cpu->gpr[0]; uint32_t psx_brB_BFC1F27C = cpu->gpr[0]; psx_taken_BFC1F27C = (psx_brA_BFC1F27C == psx_brB_BFC1F27C); psx_delay_BFC1F27C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F280: ACA25F0C sw $v0, 24332($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012ACu); return; } g_debug_last_store_pc = 0x000012ACu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA25F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000012ACu); #endif if (psx_delay_BFC1F27C) { psx_delay_BFC1F27C = 0; if (psx_taken_BFC1F27C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000DE0u); cpu->pc = 0x00000DE0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012B0u); } label_BFC1F284: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012B0u); #endif #ifdef PSX_COSIM cosim_block(0x000012B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F284: 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(0x000012B0u); #endif label_BFC1F288: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012B4u); #endif #ifdef PSX_COSIM cosim_block(0x000012B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F288: 03E00008 jr $ra */ psx_delay_BFC1F288 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F28C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000012B8u); #endif if (psx_delay_BFC1F288) { psx_delay_BFC1F288 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000012BC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000012BCu); int psx_delay_BFC1F2A4 = 0; int psx_taken_BFC1F2A4 = 0; int psx_delay_BFC1F2B0 = 0; int psx_taken_BFC1F2B0 = 0; int psx_delay_BFC1F2C4 = 0; int psx_taken_BFC1F2C4 = 0; int psx_delay_BFC1F2D8 = 0; int psx_delay_BFC1F2E0 = 0; int psx_taken_BFC1F2E0 = 0; int psx_delay_BFC1F2F4 = 0; int psx_taken_BFC1F2F4 = 0; int psx_delay_BFC1F2FC = 0; int psx_delay_BFC1F310 = 0; int psx_taken_BFC1F310 = 0; int psx_delay_BFC1F318 = 0; int psx_taken_BFC1F318 = 0; int psx_delay_BFC1F364 = 0; int psx_taken_BFC1F364 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F2ACu: goto label_BFC1F2AC; case 0xBFC1F2B8u: goto label_BFC1F2B8; case 0xBFC1F2CCu: goto label_BFC1F2CC; case 0xBFC1F2D0u: goto label_BFC1F2D0; case 0xBFC1F2E0u: goto label_BFC1F2E0; case 0xBFC1F2E8u: goto label_BFC1F2E8; case 0xBFC1F2FCu: goto label_BFC1F2FC; case 0xBFC1F304u: goto label_BFC1F304; case 0xBFC1F318u: goto label_BFC1F318; case 0xBFC1F320u: goto label_BFC1F320; case 0xBFC1F328u: goto label_BFC1F328; default: break; } } label_BFC1F290: #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, 0x20000000u); #endif /* 0xBFC1F290: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000012BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1F294: 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, 0x000012C0u); return; } g_debug_last_store_pc = 0x000012C0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000012C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F298: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000012C4u); #endif /* 0xBFC1F29C: 8E025F10 lw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000012C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F2A0: 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(0x000012CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F2A4: 10430004 beq $v0, $v1, 0xBFC1F2B8 */ uint32_t psx_brA_BFC1F2A4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F2A4 = cpu->gpr[3]; psx_taken_BFC1F2A4 = (psx_brA_BFC1F2A4 == psx_brB_BFC1F2A4); psx_delay_BFC1F2A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F2A8: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012D4u); return; } g_debug_last_store_pc = 0x000012D4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000012D4u); #endif if (psx_delay_BFC1F2A4) { psx_delay_BFC1F2A4 = 0; if (psx_taken_BFC1F2A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012E4u); goto label_BFC1F2B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012D8u); } label_BFC1F2AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012D8u); #endif #ifdef PSX_COSIM cosim_block(0x000012D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F2AC: 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(0x000012D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F2B0: 1443000B bne $v0, $v1, 0xBFC1F2E0 */ uint32_t psx_brA_BFC1F2B0 = cpu->gpr[2]; uint32_t psx_brB_BFC1F2B0 = cpu->gpr[3]; psx_taken_BFC1F2B0 = (psx_brA_BFC1F2B0 != psx_brB_BFC1F2B0); psx_delay_BFC1F2B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F2B4: 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(0x000012E0u); #endif if (psx_delay_BFC1F2B0) { psx_delay_BFC1F2B0 = 0; if (psx_taken_BFC1F2B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000130Cu); goto label_BFC1F2E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012E4u); } label_BFC1F2B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012E4u); #endif #ifdef PSX_COSIM cosim_block(0x000012E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F2B8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000012E4u); #endif /* 0xBFC1F2BC: 8C425F08 lw $v0, 24328($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24328; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C425F08u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000012E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F2C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000012ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F2C4: 14400008 bne $v0, $zero, 0xBFC1F2E8 */ uint32_t psx_brA_BFC1F2C4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F2C4 = cpu->gpr[0]; psx_taken_BFC1F2C4 = (psx_brA_BFC1F2C4 != psx_brB_BFC1F2C4); psx_delay_BFC1F2C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F2C8: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000012F4u); #endif if (psx_delay_BFC1F2C4) { psx_delay_BFC1F2C4 = 0; if (psx_taken_BFC1F2C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001314u); goto label_BFC1F2E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012F8u); } label_BFC1F2CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000012F8u); #endif #ifdef PSX_COSIM cosim_block(0x000012F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000012F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F2CC: 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(0x000012F8u); #endif label_BFC1F2D0: #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 /* 0xBFC1F2D0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000012FCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000012FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001300u); #endif /* 0xBFC1F2D4: 8FB00010 lw $s0, 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, 0x00001300u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00001300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F2D8: 03E00008 jr $ra */ psx_delay_BFC1F2D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F2DC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001308u); #endif if (psx_delay_BFC1F2D8) { psx_delay_BFC1F2D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1F2E0: #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, 0xCu); #endif /* 0xBFC1F2E0: 1443FFFA bne $v0, $v1, 0xBFC1F2CC */ uint32_t psx_brA_BFC1F2E0 = cpu->gpr[2]; uint32_t psx_brB_BFC1F2E0 = cpu->gpr[3]; psx_taken_BFC1F2E0 = (psx_brA_BFC1F2E0 != psx_brB_BFC1F2E0); psx_delay_BFC1F2E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F2E4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001310u); #endif if (psx_delay_BFC1F2E0) { psx_delay_BFC1F2E0 = 0; if (psx_taken_BFC1F2E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012F8u); goto label_BFC1F2CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001314u); } label_BFC1F2E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001314u); #endif #ifdef PSX_COSIM cosim_block(0x00001314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001314u); #endif /* 0xBFC1F2E8: 90421800 lbu $v0, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6144)), 2, 0x4u); PGXP_LOAD(0x90421800u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F2EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F2F0: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x0000131Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F2F4: 1040FFF5 beq $v0, $zero, 0xBFC1F2CC */ uint32_t psx_brA_BFC1F2F4 = cpu->gpr[2]; uint32_t psx_brB_BFC1F2F4 = cpu->gpr[0]; psx_taken_BFC1F2F4 = (psx_brA_BFC1F2F4 == psx_brB_BFC1F2F4); psx_delay_BFC1F2F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F2F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001324u); #endif if (psx_delay_BFC1F2F4) { psx_delay_BFC1F2F4 = 0; if (psx_taken_BFC1F2F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012F8u); goto label_BFC1F2CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001328u); } label_BFC1F2FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001328u); #endif #ifdef PSX_COSIM cosim_block(0x00001328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F2FC: 0C0001BE jal 0xB00006F8 */ cpu->gpr[31] = 0x00001330u; /* jal link before delay slot */ psx_delay_BFC1F2FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC1F300: 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, 0x0000132Cu); return; } g_debug_last_store_pc = 0x0000132Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000132Cu); #endif if (psx_delay_BFC1F2FC) { psx_delay_BFC1F2FC = 0; cpu->gpr[31] = 0x00001330u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000006F8u); cpu->pc = 0x000006F8u; return; } label_BFC1F304: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001330u); #endif #ifdef PSX_COSIM cosim_block(0x00001330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001330u); #endif /* 0xBFC1F304: 8E025F10 lw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001330u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F308: 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(0x00001334u); #endif /* 0xBFC1F30C: 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, 0x00001338u); 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(0x00001338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F310: 10430003 beq $v0, $v1, 0xBFC1F320 */ uint32_t psx_brA_BFC1F310 = cpu->gpr[2]; uint32_t psx_brB_BFC1F310 = cpu->gpr[3]; psx_taken_BFC1F310 = (psx_brA_BFC1F310 == psx_brB_BFC1F310); psx_delay_BFC1F310 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F314: 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(0x00001340u); #endif if (psx_delay_BFC1F310) { psx_delay_BFC1F310 = 0; if (psx_taken_BFC1F310) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000134Cu); goto label_BFC1F320; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001344u); } label_BFC1F318: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001344u); #endif #ifdef PSX_COSIM cosim_block(0x00001344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F318: 14430003 bne $v0, $v1, 0xBFC1F328 */ uint32_t psx_brA_BFC1F318 = cpu->gpr[2]; uint32_t psx_brB_BFC1F318 = cpu->gpr[3]; psx_taken_BFC1F318 = (psx_brA_BFC1F318 != psx_brB_BFC1F318); psx_delay_BFC1F318 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F31C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001348u); #endif if (psx_delay_BFC1F318) { psx_delay_BFC1F318 = 0; if (psx_taken_BFC1F318) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001354u); goto label_BFC1F328; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000134Cu); } label_BFC1F320: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000134Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000134Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000134Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F320: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000134Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F324: AC625F0C sw $v0, 24332($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001350u); return; } g_debug_last_store_pc = 0x00001350u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F0Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001350u); #endif label_BFC1F328: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001354u); #endif #ifdef PSX_COSIM cosim_block(0x00001354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F328: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001354u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F32C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001358u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001358u); #endif /* 0xBFC1F330: 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(0x0000135Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F334: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F338: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001364u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001364u); #endif /* 0xBFC1F33C: 90830001 lbu $v1, 1($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 1; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (1)), 3, 0x10u); PGXP_LOAD(0x90830001u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F340: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000136Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F344: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001370u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001370u); #endif /* 0xBFC1F348: 90830002 lbu $v1, 2($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 2; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (2)), 3, 0x10u); PGXP_LOAD(0x90830002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F34C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F350: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000137Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #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, 0x9u); #endif /* 0xBFC1F354: 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(0x00001380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F358: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001384u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F35C: 240200F2 addiu $v0, $zero, 242 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (242)); PGXP_ALU(0x240200F2u, cpu->gpr[2], _pgx1, 0x000000F2u); } #ifdef PSX_COSIM cosim_instr(0x00001388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F360: AE025F10 sw $v0, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000138Cu); return; } g_debug_last_store_pc = 0x0000138Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE025F10u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000138Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F364: 1000FFDA beq $zero, $zero, 0xBFC1F2D0 */ uint32_t psx_brA_BFC1F364 = cpu->gpr[0]; uint32_t psx_brB_BFC1F364 = cpu->gpr[0]; psx_taken_BFC1F364 = (psx_brA_BFC1F364 == psx_brB_BFC1F364); psx_delay_BFC1F364 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F368: 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(0x00001394u); #endif if (psx_delay_BFC1F364) { psx_delay_BFC1F364 = 0; if (psx_taken_BFC1F364) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000012FCu); goto label_BFC1F2D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001398u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001398u); cpu->pc = 0x00001398u; return; /* fallthrough */ } void OpenBIOS_func_00001398(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001398u); int psx_delay_BFC1F384 = 0; int psx_taken_BFC1F384 = 0; int psx_delay_BFC1F38C = 0; int psx_delay_BFC1F3C0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F38Cu: goto label_BFC1F38C; case 0xBFC1F394u: goto label_BFC1F394; case 0xBFC1F3B8u: goto label_BFC1F3B8; default: break; } } label_BFC1F36C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001398u); #endif #ifdef PSX_COSIM cosim_block(0x00001398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F36C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1F370: 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, 0x0000139Cu); return; } g_debug_last_store_pc = 0x0000139Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x0000139Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F374: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000013A0u); #endif /* 0xBFC1F378: 8E055F10 lw $a1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013A4u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10000u); } PGXP_LOAD(0x8E055F10u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000013A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F37C: 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(0x000013A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F380: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013ACu); return; } g_debug_last_store_pc = 0x000013ACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000013ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1F384: 14A3000C bne $a1, $v1, 0xBFC1F3B8 */ uint32_t psx_brA_BFC1F384 = cpu->gpr[5]; uint32_t psx_brB_BFC1F384 = cpu->gpr[3]; psx_taken_BFC1F384 = (psx_brA_BFC1F384 != psx_brB_BFC1F384); psx_delay_BFC1F384 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F388: 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(0x000013B4u); #endif if (psx_delay_BFC1F384) { psx_delay_BFC1F384 = 0; if (psx_taken_BFC1F384) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000013E4u); goto label_BFC1F3B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000013B8u); } label_BFC1F38C: #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, 0x80000000u); #endif /* 0xBFC1F38C: 0C0001DD jal 0xB0000774 */ cpu->gpr[31] = 0x000013C0u; /* jal link before delay slot */ psx_delay_BFC1F38C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC1F390: 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, 0x000013BCu); return; } g_debug_last_store_pc = 0x000013BCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000013BCu); #endif if (psx_delay_BFC1F38C) { psx_delay_BFC1F38C = 0; cpu->gpr[31] = 0x000013C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000774u); cpu->pc = 0x00000774u; return; } label_BFC1F394: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000013C0u); #endif #ifdef PSX_COSIM cosim_block(0x000013C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F394: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000013C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F398: 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(0x000013C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F39C: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000013C8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000013C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC1F3A0: AE035F10 sw $v1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013CCu); return; } g_debug_last_store_pc = 0x000013CCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE035F10u, _pgxa, cpu->gpr[3]); } #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, 0xCu); #endif /* 0xBFC1F3A4: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000013D0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000013D0u); #endif /* 0xBFC1F3A8: 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, 0x000013D4u); 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(0x000013D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F3AC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000013D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F3B0: AC445F00 sw $a0, 24320($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24320; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24320)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013DCu); return; } g_debug_last_store_pc = 0x000013DCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC445F00u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000013DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F3B4: 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(0x000013E0u); #endif label_BFC1F3B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000013E4u); #endif #ifdef PSX_COSIM cosim_block(0x000013E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013E4u); #endif /* 0xBFC1F3B8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000013E4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000013E4u); #endif /* 0xBFC1F3BC: 8FB00010 lw $s0, 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, 0x000013E8u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000013E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F3C0: 03E00008 jr $ra */ psx_delay_BFC1F3C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F3C4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000013F0u); #endif if (psx_delay_BFC1F3C0) { psx_delay_BFC1F3C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000013F4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000013F4u); int psx_delay_BFC1F3DC = 0; int psx_taken_BFC1F3DC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F3E4u: goto label_BFC1F3E4; case 0xBFC1F3E8u: goto label_BFC1F3E8; default: break; } } label_BFC1F3C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000013F4u); #endif #ifdef PSX_COSIM cosim_block(0x000013F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000013F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F3C8: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000013F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1F3CC: 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, 0x000013F8u); return; } g_debug_last_store_pc = 0x000013F8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000013F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F3D0: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000013FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001400u); #endif /* 0xBFC1F3D4: 8E035F10 lw $v1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001400u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E035F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F3D8: 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(0x00001404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F3DC: 10620006 beq $v1, $v0, 0xBFC1F3F8 */ uint32_t psx_brA_BFC1F3DC = cpu->gpr[3]; uint32_t psx_brB_BFC1F3DC = cpu->gpr[2]; psx_taken_BFC1F3DC = (psx_brA_BFC1F3DC == psx_brB_BFC1F3DC); psx_delay_BFC1F3DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F3E0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000140Cu); return; } g_debug_last_store_pc = 0x0000140Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x0000140Cu); #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, 0x00001424u); cpu->pc = 0x00001424u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001410u); } label_BFC1F3E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001410u); #endif #ifdef PSX_COSIM cosim_block(0x00001410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F3E4: 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(0x00001410u); #endif label_BFC1F3E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001414u); #endif #ifdef PSX_COSIM cosim_block(0x00001414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001414u); #endif /* 0xBFC1F3E8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001414u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001414u); #endif /* 0xBFC1F3EC: 8FB00010 lw $s0, 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, 0x00001418u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00001418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000141Cu); cpu->pc = 0x0000141Cu; return; /* fallthrough */ } void OpenBIOS_func_0000141C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000141Cu); int psx_delay_BFC1F3F0 = 0; label_BFC1F3F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000141Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000141Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000141Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F3F0: 03E00008 jr $ra */ psx_delay_BFC1F3F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F3F4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001420u); #endif if (psx_delay_BFC1F3F0) { psx_delay_BFC1F3F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001424(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001424u); int psx_delay_BFC1F3F8 = 0; int psx_taken_BFC1F3F8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F400u: goto label_BFC1F400; default: break; } } label_BFC1F3F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001424u); #endif #ifdef PSX_COSIM cosim_block(0x00001424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F3F8: 1880FFFB blez $a0, 0xBFC1F3E8 */ uint32_t psx_brA_BFC1F3F8 = cpu->gpr[4]; psx_taken_BFC1F3F8 = ((int32_t)psx_brA_BFC1F3F8 <= 0); psx_delay_BFC1F3F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F3FC: 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(0x00001428u); #endif if (psx_delay_BFC1F3F8) { psx_delay_BFC1F3F8 = 0; if (psx_taken_BFC1F3F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001414u); cpu->pc = 0x00001414u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000142Cu); } label_BFC1F400: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000142Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000142Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000142Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC1F400: 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, 0x0000142Cu); return; } g_debug_last_store_pc = 0x0000142Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000142Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC1F404: 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, 0x00001430u); return; } g_debug_last_store_pc = 0x00001430u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA5001Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001434u); cpu->pc = 0x00001434u; return; /* fallthrough */ } void OpenBIOS_func_00001434(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001434u); int psx_delay_BFC1F408 = 0; int psx_delay_BFC1F420 = 0; int psx_taken_BFC1F420 = 0; int psx_delay_BFC1F42C = 0; int psx_taken_BFC1F42C = 0; int psx_delay_BFC1F478 = 0; int psx_taken_BFC1F478 = 0; int psx_delay_BFC1F494 = 0; int psx_taken_BFC1F494 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F410u: goto label_BFC1F410; case 0xBFC1F428u: goto label_BFC1F428; case 0xBFC1F434u: goto label_BFC1F434; case 0xBFC1F438u: goto label_BFC1F438; case 0xBFC1F480u: goto label_BFC1F480; default: break; } } label_BFC1F408: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001434u); #endif #ifdef PSX_COSIM cosim_block(0x00001434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F408: 0C0001DD jal 0xB0000774 */ cpu->gpr[31] = 0x0000143Cu; /* jal link before delay slot */ psx_delay_BFC1F408 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC1F40C: 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, 0x00001438u); return; } g_debug_last_store_pc = 0x00001438u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60020u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00001438u); #endif if (psx_delay_BFC1F408) { psx_delay_BFC1F408 = 0; cpu->gpr[31] = 0x0000143Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000774u); cpu->pc = 0x00000774u; return; } label_BFC1F410: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000143Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000143Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000143Cu); #endif /* 0xBFC1F410: 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, 0x0000143Cu); 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(0x0000143Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001440u); #endif /* 0xBFC1F414: 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, 0x00001440u); 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(0x00001440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1F418: 30C30010 andi $v1, $a2, 0x10 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x10u; PGXP_ALU(0x30C30010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001444u); #endif /* 0xBFC1F41C: 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, 0x00001448u); 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(0x00001448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F420: 14600005 bne $v1, $zero, 0xBFC1F438 */ uint32_t psx_brA_BFC1F420 = cpu->gpr[3]; uint32_t psx_brB_BFC1F420 = cpu->gpr[0]; psx_taken_BFC1F420 = (psx_brA_BFC1F420 != psx_brB_BFC1F420); psx_delay_BFC1F420 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F424: 24020246 addiu $v0, $zero, 582 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (582)); PGXP_ALU(0x24020246u, cpu->gpr[2], _pgx1, 0x00000246u); } #ifdef PSX_COSIM cosim_instr(0x00001450u); #endif if (psx_delay_BFC1F420) { psx_delay_BFC1F420 = 0; if (psx_taken_BFC1F420) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001464u); goto label_BFC1F438; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001454u); } label_BFC1F428: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001454u); #endif #ifdef PSX_COSIM cosim_block(0x00001454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1F428: 30C30020 andi $v1, $a2, 0x20 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x20u; PGXP_ALU(0x30C30020u, cpu->gpr[3], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x00001454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F42C: 10600002 beq $v1, $zero, 0xBFC1F438 */ uint32_t psx_brA_BFC1F42C = cpu->gpr[3]; uint32_t psx_brB_BFC1F42C = cpu->gpr[0]; psx_taken_BFC1F42C = (psx_brA_BFC1F42C == psx_brB_BFC1F42C); psx_delay_BFC1F42C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F430: 24020200 addiu $v0, $zero, 512 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (512)); PGXP_ALU(0x24020200u, cpu->gpr[2], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0x0000145Cu); #endif if (psx_delay_BFC1F42C) { psx_delay_BFC1F42C = 0; if (psx_taken_BFC1F42C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001464u); goto label_BFC1F438; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001460u); } label_BFC1F434: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001460u); #endif #ifdef PSX_COSIM cosim_block(0x00001460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F434: 24020249 addiu $v0, $zero, 585 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (585)); PGXP_ALU(0x24020249u, cpu->gpr[2], _pgx1, 0x00000249u); } #ifdef PSX_COSIM cosim_instr(0x00001460u); #endif label_BFC1F438: #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, 0x8u); #endif /* 0xBFC1F438: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F43C: AC605F08 sw $zero, 24328($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001468u); return; } g_debug_last_store_pc = 0x00001468u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC605F08u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F440: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000146Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F444: AC625F04 sw $v0, 24324($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 24324; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (24324)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001470u); return; } g_debug_last_store_pc = 0x00001470u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC625F04u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F448: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F44C: AC445EFC sw $a0, 24316($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24316; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24316)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001478u); return; } g_debug_last_store_pc = 0x00001478u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC445EFCu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F450: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000147Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F454: AC445EF8 sw $a0, 24312($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24312; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24312)); 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[4]); } PGXP_STORE(0xAC445EF8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F458: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F45C: AC455EF4 sw $a1, 24308($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24308; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24308)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001488u); return; } g_debug_last_store_pc = 0x00001488u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC455EF4u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F460: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000148Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F464: AC465EF0 sw $a2, 24304($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001490u); return; } g_debug_last_store_pc = 0x00001490u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC465EF0u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00001490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F468: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001494u); #endif /* 0xBFC1F46C: 90431800 lbu $v1, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6144)), 3, 0x4u); PGXP_LOAD(0x90431800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F470: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000149Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F474: 30630010 andi $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u; PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x000014A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F478: 1060FFDA beq $v1, $zero, 0xBFC1F3E4 */ uint32_t psx_brA_BFC1F478 = cpu->gpr[3]; uint32_t psx_brB_BFC1F478 = cpu->gpr[0]; psx_taken_BFC1F478 = (psx_brA_BFC1F478 == psx_brB_BFC1F478); psx_delay_BFC1F478 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F47C: 240300FE addiu $v1, $zero, 254 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (254)); PGXP_ALU(0x240300FEu, cpu->gpr[3], _pgx1, 0x000000FEu); } #ifdef PSX_COSIM cosim_instr(0x000014A8u); #endif if (psx_delay_BFC1F478) { psx_delay_BFC1F478 = 0; if (psx_taken_BFC1F478) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001410u); cpu->pc = 0x00001410u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014ACu); } label_BFC1F480: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000014ACu); #endif #ifdef PSX_COSIM cosim_block(0x000014ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC1F480: AE035F10 sw $v1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014ACu); return; } g_debug_last_store_pc = 0x000014ACu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE035F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000014ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F484: 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(0x000014B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F488: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000014B4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000014B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F48C: A0461802 sb $a2, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000014B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[6] & 0xFFu)); PGXP_STORE(0xA0461802u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x000014B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F490: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000014BCu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000014BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F494: 1000FFD4 beq $zero, $zero, 0xBFC1F3E8 */ uint32_t psx_brA_BFC1F494 = cpu->gpr[0]; uint32_t psx_brB_BFC1F494 = cpu->gpr[0]; psx_taken_BFC1F494 = (psx_brA_BFC1F494 == psx_brB_BFC1F494); psx_delay_BFC1F494 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F498: 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(0x000014C4u); #endif if (psx_delay_BFC1F494) { psx_delay_BFC1F494 = 0; if (psx_taken_BFC1F494) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001414u); cpu->pc = 0x00001414u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014C8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014C8u); cpu->pc = 0x000014C8u; return; /* fallthrough */ } void OpenBIOS_func_000014C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000014C8u); int psx_delay_BFC1F4B0 = 0; int psx_taken_BFC1F4B0 = 0; int psx_delay_BFC1F4C4 = 0; int psx_delay_BFC1F4CC = 0; int psx_delay_BFC1F4F0 = 0; int psx_taken_BFC1F4F0 = 0; int psx_delay_BFC1F508 = 0; int psx_taken_BFC1F508 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F4B8u: goto label_BFC1F4B8; case 0xBFC1F4BCu: goto label_BFC1F4BC; case 0xBFC1F4CCu: goto label_BFC1F4CC; case 0xBFC1F4D4u: goto label_BFC1F4D4; case 0xBFC1F4F8u: goto label_BFC1F4F8; default: break; } } label_BFC1F49C: #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, 0x20000000u); #endif /* 0xBFC1F49C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000014C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1F4A0: 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, 0x000014CCu); return; } g_debug_last_store_pc = 0x000014CCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000014CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F4A4: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000014D0u); #endif /* 0xBFC1F4A8: 8E035F10 lw $v1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014D4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E035F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000014D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F4AC: 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(0x000014D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F4B0: 10620006 beq $v1, $v0, 0xBFC1F4CC */ uint32_t psx_brA_BFC1F4B0 = cpu->gpr[3]; uint32_t psx_brB_BFC1F4B0 = cpu->gpr[2]; psx_taken_BFC1F4B0 = (psx_brA_BFC1F4B0 == psx_brB_BFC1F4B0); psx_delay_BFC1F4B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F4B4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014E0u); return; } g_debug_last_store_pc = 0x000014E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000014E0u); #endif if (psx_delay_BFC1F4B0) { psx_delay_BFC1F4B0 = 0; if (psx_taken_BFC1F4B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014F8u); goto label_BFC1F4CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014E4u); } label_BFC1F4B8: #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, 0x5u); #endif /* 0xBFC1F4B8: 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(0x000014E4u); #endif label_BFC1F4BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000014E8u); #endif #ifdef PSX_COSIM cosim_block(0x000014E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014E8u); #endif /* 0xBFC1F4BC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000014E8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000014E8u); #endif /* 0xBFC1F4C0: 8FB00010 lw $s0, 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, 0x000014ECu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC1F4C4: 03E00008 jr $ra */ psx_delay_BFC1F4C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F4C8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000014F4u); #endif if (psx_delay_BFC1F4C4) { psx_delay_BFC1F4C4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1F4CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000014F8u); #endif #ifdef PSX_COSIM cosim_block(0x000014F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000014F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F4CC: 0C0001DD jal 0xB0000774 */ cpu->gpr[31] = 0x00001500u; /* jal link before delay slot */ psx_delay_BFC1F4CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC1F4D0: 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, 0x000014FCu); return; } g_debug_last_store_pc = 0x000014FCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40018u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000014FCu); #endif if (psx_delay_BFC1F4CC) { psx_delay_BFC1F4CC = 0; cpu->gpr[31] = 0x00001500u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000774u); cpu->pc = 0x00000774u; return; } label_BFC1F4D4: #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 /* 0xBFC1F4D4: 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, 0x00001500u); 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(0x00001500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F4D8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F4DC: AC445EF0 sw $a0, 24304($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24304; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24304)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001508u); return; } g_debug_last_store_pc = 0x00001508u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC445EF0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F4E0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000150Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001510u); #endif /* 0xBFC1F4E4: 90431800 lbu $v1, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (6144)), 3, 0x4u); PGXP_LOAD(0x90431800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F4E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001514u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F4EC: 30630010 andi $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x10u; PGXP_ALU(0x30630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F4F0: 1060FFF1 beq $v1, $zero, 0xBFC1F4B8 */ uint32_t psx_brA_BFC1F4F0 = cpu->gpr[3]; uint32_t psx_brB_BFC1F4F0 = cpu->gpr[0]; psx_taken_BFC1F4F0 = (psx_brA_BFC1F4F0 == psx_brB_BFC1F4F0); psx_delay_BFC1F4F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F4F4: 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(0x00001520u); #endif if (psx_delay_BFC1F4F0) { psx_delay_BFC1F4F0 = 0; if (psx_taken_BFC1F4F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014E4u); goto label_BFC1F4B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001524u); } label_BFC1F4F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001524u); #endif #ifdef PSX_COSIM cosim_block(0x00001524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F4F8: A0401800 sb $zero, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001524u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401800u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F4FC: A0441802 sb $a0, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001528u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441802u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC1F500: AE035F10 sw $v1, 24336($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (24336)); 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[3]); } PGXP_STORE(0xAE035F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000152Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F504: A0431801 sb $v1, 6145($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001530u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6145)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431801u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F508: 1000FFEC beq $zero, $zero, 0xBFC1F4BC */ uint32_t psx_brA_BFC1F508 = cpu->gpr[0]; uint32_t psx_brB_BFC1F508 = cpu->gpr[0]; psx_taken_BFC1F508 = (psx_brA_BFC1F508 == psx_brB_BFC1F508); psx_delay_BFC1F508 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F50C: 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(0x00001538u); #endif if (psx_delay_BFC1F508) { psx_delay_BFC1F508 = 0; if (psx_taken_BFC1F508) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000014E8u); goto label_BFC1F4BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000153Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000153Cu); cpu->pc = 0x0000153Cu; return; /* fallthrough */ } void OpenBIOS_func_0000153C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000153Cu); int psx_delay_BFC1F544 = 0; label_BFC1F510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000153Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000153Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000153Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F510: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC1F514: 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(0x00001540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F518: A0431800 sb $v1, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001544u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F51C: 2403001F addiu $v1, $zero, 31 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); PGXP_ALU(0x2403001Fu, cpu->gpr[3], _pgx1, 0x0000001Fu); } #ifdef PSX_COSIM cosim_instr(0x00001548u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F520: A0431803 sb $v1, 6147($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6147; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000154Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6147)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431803u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000154Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F524: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F528: 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(0x00001554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F52C: 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, 0x00001558u); return; } g_debug_last_store_pc = 0x00001558u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F530: 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, 0x0000155Cu); return; } g_debug_last_store_pc = 0x0000155Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #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, 0x9u); #endif /* 0xBFC1F534: 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(0x00001560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F538: 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, 0x00001564u); return; } g_debug_last_store_pc = 0x00001564u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001564u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F53C: 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(0x00001568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F540: 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, 0x0000156Cu); return; } g_debug_last_store_pc = 0x0000156Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000156Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F544: 03E00008 jr $ra */ psx_delay_BFC1F544 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F548: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001574u); #endif if (psx_delay_BFC1F544) { psx_delay_BFC1F544 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001578(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001578u); int psx_delay_BFC1F560 = 0; label_BFC1F54C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001578u); #endif #ifdef PSX_COSIM cosim_block(0x00001578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F54C: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F550: 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(0x0000157Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F554: A0431800 sb $v1, 6144($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001580u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6144)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431800u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F558: 2403001F addiu $v1, $zero, 31 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (31)); PGXP_ALU(0x2403001Fu, cpu->gpr[3], _pgx1, 0x0000001Fu); } #ifdef PSX_COSIM cosim_instr(0x00001584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F55C: A0431802 sb $v1, 6146($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 6146; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001588u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (6146)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431802u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F560: 03E00008 jr $ra */ psx_delay_BFC1F560 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F564: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001590u); #endif if (psx_delay_BFC1F560) { psx_delay_BFC1F560 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001594(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001594u); int psx_delay_BFC1F624 = 0; int psx_delay_BFC1F62C = 0; int psx_delay_BFC1F688 = 0; int psx_taken_BFC1F688 = 0; int psx_delay_BFC1F690 = 0; int psx_taken_BFC1F690 = 0; int psx_delay_BFC1F69C = 0; int psx_taken_BFC1F69C = 0; int psx_delay_BFC1F6B0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F62Cu: goto label_BFC1F62C; case 0xBFC1F634u: goto label_BFC1F634; case 0xBFC1F680u: goto label_BFC1F680; case 0xBFC1F690u: goto label_BFC1F690; case 0xBFC1F698u: goto label_BFC1F698; case 0xBFC1F6A4u: goto label_BFC1F6A4; case 0xBFC1F6A8u: goto label_BFC1F6A8; default: break; } } label_BFC1F568: #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, 0x20000000u); #endif /* 0xBFC1F568: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC1F56C: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F570: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x81u); #endif /* 0xBFC1F574: ACE05EE4 sw $zero, 24292($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 24292; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015A0u); return; } g_debug_last_store_pc = 0x000015A0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xACE05EE4u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000015A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F578: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015A4u); return; } g_debug_last_store_pc = 0x000015A4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000015A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F57C: AC405EE8 sw $zero, 24296($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24296; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24296)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015A8u); return; } g_debug_last_store_pc = 0x000015A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC405EE8u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000015A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F580: 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(0x000015ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000015B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1F584: 0000000C syscall */ cpu->pc = 0x000015B0u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x000015B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F588: 3C04BF80 lui $a0, 0xBF80 */ cpu->gpr[4] = 0xBF800000u; PGXP_ALU(0x3C04BF80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000015B4u); #endif /* 0xBFC1F58C: 8C821074 lw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015B8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1F590: 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(0x000015BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000015C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F594: 00461024 and $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(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000015C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F598: AC821074 sw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015C4u); return; } g_debug_last_store_pc = 0x000015C4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015C4u); #endif /* 0xBFC1F59C: 8C821074 lw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F5A0: 2403FFF7 addiu $v1, $zero, -9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); PGXP_ALU(0x2403FFF7u, cpu->gpr[3], _pgx1, 0xFFFFFFF7u); } #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, 0xCu); #endif /* 0xBFC1F5A4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000015D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F5A8: AC821074 sw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015D4u); return; } g_debug_last_store_pc = 0x000015D4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015D4u); #endif /* 0xBFC1F5AC: 8C821070 lw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015D8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F5B0: 00000000 nop */ /* nop */ #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, 0x44u); #endif /* 0xBFC1F5B4: 00461024 and $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(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000015E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F5B8: AC821070 sw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015E4u); return; } g_debug_last_store_pc = 0x000015E4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015E4u); #endif /* 0xBFC1F5BC: 8C821070 lw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F5C0: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC1F5C4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000015F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F5C8: AC821070 sw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000015F4u); return; } g_debug_last_store_pc = 0x000015F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000015F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F5CC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000015F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F5D0: 24455ED8 addiu $a1, $v0, 24280 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] + (24280)); PGXP_ALU(0x24455ED8u, cpu->gpr[5], _pgx1, 0x00005ED8u); } #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, 0x9u); #endif /* 0xBFC1F5D4: 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(0x00001600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F5D8: AC435ED8 sw $v1, 24280($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24280; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24280)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001604u); return; } g_debug_last_store_pc = 0x00001604u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435ED8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1F5DC: ACA30004 sw $v1, 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, 0x00001608u); return; } g_debug_last_store_pc = 0x00001608u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F5E0: 34029099 ori $v0, $zero, 0x9099 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = cpu->gpr[0] | 0x9099u; PGXP_ALU(0x34029099u, cpu->gpr[2], _pgx1, 0x9099u); } #ifdef PSX_COSIM cosim_instr(0x0000160Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1F5E4: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F5E8: ACA210F0 sw $v0, 4336($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001614u); return; } g_debug_last_store_pc = 0x00001614u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA210F0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001614u); #endif /* 0xBFC1F5EC: 8CA210F4 lw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001618u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F5F0: 3C0300FF lui $v1, 0xFF */ cpu->gpr[3] = 0x00FF0000u; PGXP_ALU(0x3C0300FFu, cpu->gpr[3], 0u, 0u); #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, 0x8u); #endif /* 0xBFC1F5F4: 3463FFFF ori $v1, $v1, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0xFFFFu; PGXP_ALU(0x3463FFFFu, cpu->gpr[3], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x00001620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F5F8: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1F5FC: 3C038800 lui $v1, 0x8800 */ cpu->gpr[3] = 0x88000000u; PGXP_ALU(0x3C038800u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F600: 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(0x0000162Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F604: ACA210F4 sw $v0, 4340($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4340; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4340)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001630u); return; } g_debug_last_store_pc = 0x00001630u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA210F4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F608: 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(0x00001634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F60C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F610: AC435F0C sw $v1, 24332($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24332; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000163Cu); return; } g_debug_last_store_pc = 0x0000163Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F0Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000163Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F614: 24030CCC addiu $v1, $zero, 3276 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (3276)); PGXP_ALU(0x24030CCCu, cpu->gpr[3], _pgx1, 0x00000CCCu); } #ifdef PSX_COSIM cosim_instr(0x00001640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F618: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F61C: AC435F10 sw $v1, 24336($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24336; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24336)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001648u); return; } g_debug_last_store_pc = 0x00001648u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC435F10u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F620: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x80000000u); #endif /* 0xBFC1F624: 0C00054F jal 0xB000153C */ cpu->gpr[31] = 0x00001658u; /* jal link before delay slot */ psx_delay_BFC1F624 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F628: AC405F08 sw $zero, 24328($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 24328; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (24328)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001654u); return; } g_debug_last_store_pc = 0x00001654u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC405F08u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001654u); #endif if (psx_delay_BFC1F624) { psx_delay_BFC1F624 = 0; cpu->gpr[31] = 0x00001658u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000153Cu); cpu->pc = 0x0000153Cu; return; } label_BFC1F62C: #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, 0x80000000u); #endif /* 0xBFC1F62C: 0C00055E jal 0xB0001578 */ cpu->gpr[31] = 0x00001660u; /* jal link before delay slot */ psx_delay_BFC1F62C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F630: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000165Cu); #endif if (psx_delay_BFC1F62C) { psx_delay_BFC1F62C = 0; cpu->gpr[31] = 0x00001660u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001578u); cpu->pc = 0x00001578u; return; } label_BFC1F634: #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 /* 0xBFC1F634: 8C821070 lw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001660u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F638: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1F63C: 00461024 and $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(0x00461024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F640: AC821070 sw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000166Cu); return; } g_debug_last_store_pc = 0x0000166Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000166Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001670u); #endif /* 0xBFC1F644: 8C821074 lw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001670u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F648: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F64C: 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(0x00001678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F650: AC821074 sw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000167Cu); return; } g_debug_last_store_pc = 0x0000167Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000167Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001680u); #endif /* 0xBFC1F654: 8C821074 lw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001680u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F658: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F65C: 34420008 ori $v0, $v0, 0x8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x8u; PGXP_ALU(0x34420008u, cpu->gpr[2], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00001688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F660: AC821074 sw $v0, 4212($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000168Cu); return; } g_debug_last_store_pc = 0x0000168Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC821074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000168Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1F664: 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(0x00001690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1F668: 0000000C syscall */ cpu->pc = 0x00001694u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00001694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F66C: 2402000A addiu $v0, $zero, 10 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (10)); PGXP_ALU(0x2402000Au, cpu->gpr[2], _pgx1, 0x0000000Au); } #ifdef PSX_COSIM cosim_instr(0x00001698u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F670: A0A01800 sb $zero, 6144($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6144; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000169Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (6144)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0A01800u, _pgxa, cpu->gpr[0]); } #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, 0x9u); #endif /* 0xBFC1F674: 24037530 addiu $v1, $zero, 30000 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (30000)); PGXP_ALU(0x24037530u, cpu->gpr[3], _pgx1, 0x00007530u); } #ifdef PSX_COSIM cosim_instr(0x000016A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1F678: A0A21801 sb $v0, 6145($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6145; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000016A4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (6145)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0A21801u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000016A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F67C: 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(0x000016A8u); #endif label_BFC1F680: #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 /* 0xBFC1F680: 8CE25EE4 lw $v0, 24292($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 24292; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (24292)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016ACu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x8CE25EE4u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC1F684: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1F688: 10440006 beq $v0, $a0, 0xBFC1F6A4 */ uint32_t psx_brA_BFC1F688 = cpu->gpr[2]; uint32_t psx_brB_BFC1F688 = cpu->gpr[4]; psx_taken_BFC1F688 = (psx_brA_BFC1F688 == psx_brB_BFC1F688); psx_delay_BFC1F688 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F68C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016B8u); #endif if (psx_delay_BFC1F688) { psx_delay_BFC1F688 = 0; if (psx_taken_BFC1F688) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016D0u); goto label_BFC1F6A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016BCu); } label_BFC1F690: #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, 0x24u); #endif /* 0xBFC1F690: 10450005 beq $v0, $a1, 0xBFC1F6A8 */ uint32_t psx_brA_BFC1F690 = cpu->gpr[2]; uint32_t psx_brB_BFC1F690 = cpu->gpr[5]; psx_taken_BFC1F690 = (psx_brA_BFC1F690 == psx_brB_BFC1F690); psx_delay_BFC1F690 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000016C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F694: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016C0u); #endif if (psx_delay_BFC1F690) { psx_delay_BFC1F690 = 0; if (psx_taken_BFC1F690) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016D4u); goto label_BFC1F6A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016C4u); } label_BFC1F698: #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, 0x8u); #endif /* 0xBFC1F698: 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(0x000016C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F69C: 1460FFF8 bne $v1, $zero, 0xBFC1F680 */ uint32_t psx_brA_BFC1F69C = cpu->gpr[3]; uint32_t psx_brB_BFC1F69C = cpu->gpr[0]; psx_taken_BFC1F69C = (psx_brA_BFC1F69C != psx_brB_BFC1F69C); psx_delay_BFC1F69C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F6A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016CCu); #endif if (psx_delay_BFC1F69C) { psx_delay_BFC1F69C = 0; if (psx_taken_BFC1F69C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016ACu); goto label_BFC1F680; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000016D0u); } label_BFC1F6A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000016D0u); #endif #ifdef PSX_COSIM cosim_block(0x000016D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000016D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F6A4: 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(0x000016D0u); #endif label_BFC1F6A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000016D4u); #endif #ifdef PSX_COSIM cosim_block(0x000016D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000016D4u); #endif /* 0xBFC1F6A8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016D4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000016D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F6AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1F6B0: 03E00008 jr $ra */ psx_delay_BFC1F6B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000016E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1F6B4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000016E0u); #endif if (psx_delay_BFC1F6B0) { psx_delay_BFC1F6B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_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_BFC1F6DC = 0; int psx_taken_BFC1F6DC = 0; int psx_delay_BFC1F6E8 = 0; int psx_delay_BFC1F6FC = 0; int psx_taken_BFC1F6FC = 0; int psx_delay_BFC1F72C = 0; int psx_taken_BFC1F72C = 0; int psx_delay_BFC1F738 = 0; int psx_delay_BFC1F74C = 0; int psx_taken_BFC1F74C = 0; int psx_delay_BFC1F77C = 0; int psx_taken_BFC1F77C = 0; int psx_delay_BFC1F788 = 0; int psx_delay_BFC1F79C = 0; int psx_taken_BFC1F79C = 0; int psx_delay_BFC1F7CC = 0; int psx_taken_BFC1F7CC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F6E4u: goto label_BFC1F6E4; case 0xBFC1F6F0u: goto label_BFC1F6F0; case 0xBFC1F704u: goto label_BFC1F704; case 0xBFC1F714u: goto label_BFC1F714; case 0xBFC1F718u: goto label_BFC1F718; case 0xBFC1F734u: goto label_BFC1F734; case 0xBFC1F740u: goto label_BFC1F740; case 0xBFC1F754u: goto label_BFC1F754; case 0xBFC1F764u: goto label_BFC1F764; case 0xBFC1F784u: goto label_BFC1F784; case 0xBFC1F790u: goto label_BFC1F790; case 0xBFC1F7A4u: goto label_BFC1F7A4; case 0xBFC1F7B4u: goto label_BFC1F7B4; case 0xBFC1F7B8u: goto label_BFC1F7B8; default: break; } } label_BFC1F6B8: #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, 0x20000000u); #endif /* 0xBFC1F6B8: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000016E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC1F6BC: 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, 0x000016E8u); return; } g_debug_last_store_pc = 0x000016E8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000016E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1F6C0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016ECu); return; } g_debug_last_store_pc = 0x000016ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x10000u); #endif /* 0xBFC1F6C4: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000016F0u); #endif /* 0xBFC1F6C8: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016F4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000016F4u); #endif /* 0xBFC1F6CC: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000016F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000016F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F6D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000016FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F6D4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F6D8: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x00001704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F6DC: 1040000E beq $v0, $zero, 0xBFC1F718 */ uint32_t psx_brA_BFC1F6DC = cpu->gpr[2]; uint32_t psx_brB_BFC1F6DC = cpu->gpr[0]; psx_taken_BFC1F6DC = (psx_brA_BFC1F6DC == psx_brB_BFC1F6DC); psx_delay_BFC1F6DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F6E0: 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(0x0000170Cu); #endif if (psx_delay_BFC1F6DC) { psx_delay_BFC1F6DC = 0; if (psx_taken_BFC1F6DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001744u); goto label_BFC1F718; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001710u); } label_BFC1F6E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001710u); #endif #ifdef PSX_COSIM cosim_block(0x00001710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F6E4: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F6E8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000171Cu; /* jal link before delay slot */ psx_delay_BFC1F6E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F6EC: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00001718u); #endif if (psx_delay_BFC1F6E8) { psx_delay_BFC1F6E8 = 0; cpu->gpr[31] = 0x0000171Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F6F0: #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, 0x4u); #endif /* 0xBFC1F6F0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000171Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001720u); #endif /* 0xBFC1F6F4: 8C426514 lw $v0, 25876($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25876; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25876)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001720u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426514u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F6F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F6FC: 10400005 beq $v0, $zero, 0xBFC1F714 */ uint32_t psx_brA_BFC1F6FC = cpu->gpr[2]; uint32_t psx_brB_BFC1F6FC = cpu->gpr[0]; psx_taken_BFC1F6FC = (psx_brA_BFC1F6FC == psx_brB_BFC1F6FC); psx_delay_BFC1F6FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F700: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000172Cu); #endif if (psx_delay_BFC1F6FC) { psx_delay_BFC1F6FC = 0; if (psx_taken_BFC1F6FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001740u); goto label_BFC1F714; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001730u); } label_BFC1F704: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001730u); #endif #ifdef PSX_COSIM cosim_block(0x00001730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001730u); #endif /* 0xBFC1F704: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001730u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F708: 2403FFFB addiu $v1, $zero, -5 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-5)); PGXP_ALU(0x2403FFFBu, cpu->gpr[3], _pgx1, 0xFFFFFFFBu); } #ifdef PSX_COSIM cosim_instr(0x00001734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F70C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F710: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000173Cu); return; } g_debug_last_store_pc = 0x0000173Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000173Cu); #endif label_BFC1F714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001740u); #endif #ifdef PSX_COSIM cosim_block(0x00001740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F714: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001740u); #endif label_BFC1F718: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001744u); #endif #ifdef PSX_COSIM cosim_block(0x00001744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001744u); #endif /* 0xBFC1F718: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001744u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001744u); #endif /* 0xBFC1F71C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001748u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F720: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC1F724: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F728: 30420200 andi $v0, $v0, 0x200 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x200u; PGXP_ALU(0x30420200u, cpu->gpr[2], _pgx1, 0x0200u); } #ifdef PSX_COSIM cosim_instr(0x00001754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F72C: 1040000D beq $v0, $zero, 0xBFC1F764 */ uint32_t psx_brA_BFC1F72C = cpu->gpr[2]; uint32_t psx_brB_BFC1F72C = cpu->gpr[0]; psx_taken_BFC1F72C = (psx_brA_BFC1F72C == psx_brB_BFC1F72C); psx_delay_BFC1F72C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F730: 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(0x0000175Cu); #endif if (psx_delay_BFC1F72C) { psx_delay_BFC1F72C = 0; if (psx_taken_BFC1F72C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001790u); goto label_BFC1F764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001760u); } label_BFC1F734: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001760u); #endif #ifdef PSX_COSIM cosim_block(0x00001760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F734: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F738: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000176Cu; /* jal link before delay slot */ psx_delay_BFC1F738 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F73C: 24840009 addiu $a0, $a0, 9 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (9)); PGXP_ALU(0x24840009u, cpu->gpr[4], _pgx1, 0x00000009u); } #ifdef PSX_COSIM cosim_instr(0x00001768u); #endif if (psx_delay_BFC1F738) { psx_delay_BFC1F738 = 0; cpu->gpr[31] = 0x0000176Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F740: #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, 0x4u); #endif /* 0xBFC1F740: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000176Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001770u); #endif /* 0xBFC1F744: 8C426530 lw $v0, 25904($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25904; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25904)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001770u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426530u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F748: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001774u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F74C: 10400005 beq $v0, $zero, 0xBFC1F764 */ uint32_t psx_brA_BFC1F74C = cpu->gpr[2]; uint32_t psx_brB_BFC1F74C = cpu->gpr[0]; psx_taken_BFC1F74C = (psx_brA_BFC1F74C == psx_brB_BFC1F74C); psx_delay_BFC1F74C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F750: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000177Cu); #endif if (psx_delay_BFC1F74C) { psx_delay_BFC1F74C = 0; if (psx_taken_BFC1F74C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001790u); goto label_BFC1F764; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001780u); } label_BFC1F754: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001780u); #endif #ifdef PSX_COSIM cosim_block(0x00001780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001780u); #endif /* 0xBFC1F754: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001780u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F758: 2403FDFF addiu $v1, $zero, -513 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-513)); PGXP_ALU(0x2403FDFFu, cpu->gpr[3], _pgx1, 0xFFFFFDFFu); } #ifdef PSX_COSIM cosim_instr(0x00001784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F75C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F760: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000178Cu); return; } g_debug_last_store_pc = 0x0000178Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000178Cu); #endif label_BFC1F764: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001790u); #endif #ifdef PSX_COSIM cosim_block(0x00001790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F764: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001790u); #endif /* 0xBFC1F768: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001794u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001794u); #endif /* 0xBFC1F76C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001798u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F770: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC1F774: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000017A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F778: 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(0x000017A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F77C: 1040000E beq $v0, $zero, 0xBFC1F7B8 */ uint32_t psx_brA_BFC1F77C = cpu->gpr[2]; uint32_t psx_brB_BFC1F77C = cpu->gpr[0]; psx_taken_BFC1F77C = (psx_brA_BFC1F77C == psx_brB_BFC1F77C); psx_delay_BFC1F77C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F780: 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(0x000017ACu); #endif if (psx_delay_BFC1F77C) { psx_delay_BFC1F77C = 0; if (psx_taken_BFC1F77C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000017E4u); goto label_BFC1F7B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000017B0u); } label_BFC1F784: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000017B0u); #endif #ifdef PSX_COSIM cosim_block(0x000017B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000017B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F784: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000017B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F788: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000017BCu; /* jal link before delay slot */ psx_delay_BFC1F788 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F78C: 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(0x000017B8u); #endif if (psx_delay_BFC1F788) { psx_delay_BFC1F788 = 0; cpu->gpr[31] = 0x000017BCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F790: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000017BCu); #endif #ifdef PSX_COSIM cosim_block(0x000017BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000017BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F790: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000017BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000017C0u); #endif /* 0xBFC1F794: 8C426510 lw $v0, 25872($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25872; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25872)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426510u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000017C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F798: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000017C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F79C: 10400005 beq $v0, $zero, 0xBFC1F7B4 */ uint32_t psx_brA_BFC1F79C = cpu->gpr[2]; uint32_t psx_brB_BFC1F79C = cpu->gpr[0]; psx_taken_BFC1F79C = (psx_brA_BFC1F79C == psx_brB_BFC1F79C); psx_delay_BFC1F79C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F7A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000017CCu); #endif if (psx_delay_BFC1F79C) { psx_delay_BFC1F79C = 0; if (psx_taken_BFC1F79C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000017E0u); goto label_BFC1F7B4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000017D0u); } label_BFC1F7A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000017D0u); #endif #ifdef PSX_COSIM cosim_block(0x000017D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000017D0u); #endif /* 0xBFC1F7A4: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000017D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F7A8: 2403FFFD addiu $v1, $zero, -3 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-3)); PGXP_ALU(0x2403FFFDu, cpu->gpr[3], _pgx1, 0xFFFFFFFDu); } #ifdef PSX_COSIM cosim_instr(0x000017D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F7AC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000017D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F7B0: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017DCu); return; } g_debug_last_store_pc = 0x000017DCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000017DCu); #endif label_BFC1F7B4: #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, 0x10000u); #endif /* 0xBFC1F7B4: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000017E0u); #endif label_BFC1F7B8: #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 /* 0xBFC1F7B8: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017E4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000017E4u); #endif /* 0xBFC1F7BC: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000017E8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000017E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F7C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000017ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000017F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F7C4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000017F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F7C8: 30420400 andi $v0, $v0, 0x400 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x400u; PGXP_ALU(0x30420400u, cpu->gpr[2], _pgx1, 0x0400u); } #ifdef PSX_COSIM cosim_instr(0x000017F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F7CC: 1040000D beq $v0, $zero, 0xBFC1F804 */ uint32_t psx_brA_BFC1F7CC = cpu->gpr[2]; uint32_t psx_brB_BFC1F7CC = cpu->gpr[0]; psx_taken_BFC1F7CC = (psx_brA_BFC1F7CC == psx_brB_BFC1F7CC); psx_delay_BFC1F7CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F7D0: 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(0x000017FCu); #endif if (psx_delay_BFC1F7CC) { psx_delay_BFC1F7CC = 0; if (psx_taken_BFC1F7CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001830u); cpu->pc = 0x00001830u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001800u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001800u); cpu->pc = 0x00001800u; return; /* fallthrough */ } void OpenBIOS_func_00001800(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001800u); label_BFC1F7D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001800u); #endif #ifdef PSX_COSIM cosim_block(0x00001800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F7D4: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001804u); cpu->pc = 0x00001804u; return; /* fallthrough */ } void OpenBIOS_func_00001804(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001804u); int psx_delay_BFC1F7D8 = 0; label_BFC1F7D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001804u); #endif #ifdef PSX_COSIM cosim_block(0x00001804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F7D8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000180Cu; /* jal link before delay slot */ cpu->gpr[31] = 0x0000180Cu; /* jal link before delay slot */ /* DELAY (orphaned) 0xBFC1F7DC: 2484000A addiu $a0, $a0, 10 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif { 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_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } void OpenBIOS_func_00001808(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001808u); label_BFC1F7DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001808u); #endif #ifdef PSX_COSIM cosim_block(0x00001808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F7DC: 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(0x00001808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000180Cu); cpu->pc = 0x0000180Cu; return; /* fallthrough */ } void OpenBIOS_func_0000180C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000180Cu); label_BFC1F7E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000180Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000180Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000180Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F7E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000180Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001810u); cpu->pc = 0x00001810u; return; /* fallthrough */ } void OpenBIOS_func_00001810(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001810u); label_BFC1F7E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001810u); #endif #ifdef PSX_COSIM cosim_block(0x00001810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001810u); #endif /* 0xBFC1F7E4: 8C426534 lw $v0, 25908($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25908; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25908)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001810u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426534u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001814u); cpu->pc = 0x00001814u; return; /* fallthrough */ } void OpenBIOS_func_00001814(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001814u); label_BFC1F7E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001814u); #endif #ifdef PSX_COSIM cosim_block(0x00001814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F7E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001818u); cpu->pc = 0x00001818u; return; /* fallthrough */ } void OpenBIOS_func_00001818(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001818u); int psx_delay_BFC1F7EC = 0; int psx_taken_BFC1F7EC = 0; label_BFC1F7EC: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F7EC: 10400005 beq $v0, $zero, 0xBFC1F804 */ uint32_t psx_brA_BFC1F7EC = cpu->gpr[2]; uint32_t psx_brB_BFC1F7EC = cpu->gpr[0]; psx_taken_BFC1F7EC = (psx_brA_BFC1F7EC == psx_brB_BFC1F7EC); psx_delay_BFC1F7EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F7F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000181Cu); #endif if (psx_delay_BFC1F7EC) { psx_delay_BFC1F7EC = 0; if (psx_taken_BFC1F7EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001830u); cpu->pc = 0x00001830u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001820u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001820u); cpu->pc = 0x00001820u; return; /* fallthrough */ } void OpenBIOS_func_00001820(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001820u); label_BFC1F7F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001820u); #endif #ifdef PSX_COSIM cosim_block(0x00001820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001820u); #endif /* 0xBFC1F7F4: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001820u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F7F8: 2403FBFF addiu $v1, $zero, -1025 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1025)); PGXP_ALU(0x2403FBFFu, cpu->gpr[3], _pgx1, 0xFFFFFBFFu); } #ifdef PSX_COSIM cosim_instr(0x00001824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F7FC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F800: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000182Cu); return; } g_debug_last_store_pc = 0x0000182Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000182Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001830u); cpu->pc = 0x00001830u; return; /* fallthrough */ } void OpenBIOS_func_00001830(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001830u); label_BFC1F804: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001830u); #endif #ifdef PSX_COSIM cosim_block(0x00001830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F804: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001834u); cpu->pc = 0x00001834u; return; /* fallthrough */ } void OpenBIOS_func_00001834(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001834u); label_BFC1F808: #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 /* 0xBFC1F808: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001834u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001838u); cpu->pc = 0x00001838u; return; /* fallthrough */ } void OpenBIOS_func_00001838(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001838u); label_BFC1F80C: #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 /* 0xBFC1F80C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001838u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F810: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000183Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001840u); cpu->pc = 0x00001840u; return; /* fallthrough */ } void OpenBIOS_func_00001840(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001840u); label_BFC1F814: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001840u); #endif #ifdef PSX_COSIM cosim_block(0x00001840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F814: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001844u); cpu->pc = 0x00001844u; return; /* fallthrough */ } void OpenBIOS_func_00001844(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001844u); label_BFC1F818: #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, 0x4u); #endif /* 0xBFC1F818: 30420100 andi $v0, $v0, 0x100 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x100u; PGXP_ALU(0x30420100u, cpu->gpr[2], _pgx1, 0x0100u); } #ifdef PSX_COSIM cosim_instr(0x00001844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001848u); cpu->pc = 0x00001848u; return; /* fallthrough */ } void OpenBIOS_func_00001848(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001848u); int psx_delay_BFC1F81C = 0; int psx_taken_BFC1F81C = 0; label_BFC1F81C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F81C: 1040000E beq $v0, $zero, 0xBFC1F858 */ uint32_t psx_brA_BFC1F81C = cpu->gpr[2]; uint32_t psx_brB_BFC1F81C = cpu->gpr[0]; psx_taken_BFC1F81C = (psx_brA_BFC1F81C == psx_brB_BFC1F81C); psx_delay_BFC1F81C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F820: 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(0x0000184Cu); #endif if (psx_delay_BFC1F81C) { psx_delay_BFC1F81C = 0; if (psx_taken_BFC1F81C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001884u); cpu->pc = 0x00001884u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001850u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001850u); cpu->pc = 0x00001850u; return; /* fallthrough */ } void OpenBIOS_func_00001850(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001850u); int psx_delay_BFC1F828 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F830u: goto label_BFC1F830; default: break; } } label_BFC1F824: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001850u); #endif #ifdef PSX_COSIM cosim_block(0x00001850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F824: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F828: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000185Cu; /* jal link before delay slot */ psx_delay_BFC1F828 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F82C: 2484000B addiu $a0, $a0, 11 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (11)); PGXP_ALU(0x2484000Bu, cpu->gpr[4], _pgx1, 0x0000000Bu); } #ifdef PSX_COSIM cosim_instr(0x00001858u); #endif if (psx_delay_BFC1F828) { psx_delay_BFC1F828 = 0; cpu->gpr[31] = 0x0000185Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F830: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000185Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F830: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000185Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001860u); cpu->pc = 0x00001860u; return; /* fallthrough */ } void OpenBIOS_func_00001860(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001860u); int psx_delay_BFC1F83C = 0; int psx_taken_BFC1F83C = 0; label_BFC1F834: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001860u); #endif #ifdef PSX_COSIM cosim_block(0x00001860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001860u); #endif /* 0xBFC1F834: 8C42652C lw $v0, 25900($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25900; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25900)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001860u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42652Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F838: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F83C: 10400005 beq $v0, $zero, 0xBFC1F854 */ uint32_t psx_brA_BFC1F83C = cpu->gpr[2]; uint32_t psx_brB_BFC1F83C = cpu->gpr[0]; psx_taken_BFC1F83C = (psx_brA_BFC1F83C == psx_brB_BFC1F83C); psx_delay_BFC1F83C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F840: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000186Cu); #endif if (psx_delay_BFC1F83C) { psx_delay_BFC1F83C = 0; if (psx_taken_BFC1F83C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001880u); cpu->pc = 0x00001880u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001870u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001870u); cpu->pc = 0x00001870u; return; /* fallthrough */ } void OpenBIOS_func_00001870(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001870u); label_BFC1F844: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001870u); #endif #ifdef PSX_COSIM cosim_block(0x00001870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001870u); #endif /* 0xBFC1F844: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001870u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F848: 2403FEFF addiu $v1, $zero, -257 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-257)); PGXP_ALU(0x2403FEFFu, cpu->gpr[3], _pgx1, 0xFFFFFEFFu); } #ifdef PSX_COSIM cosim_instr(0x00001874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001878u); cpu->pc = 0x00001878u; return; /* fallthrough */ } void OpenBIOS_func_00001878(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001878u); label_BFC1F84C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001878u); #endif #ifdef PSX_COSIM cosim_block(0x00001878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F84C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F850: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000187Cu); return; } g_debug_last_store_pc = 0x0000187Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000187Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001880u); cpu->pc = 0x00001880u; return; /* fallthrough */ } void OpenBIOS_func_00001880(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001880u); int psx_delay_BFC1F86C = 0; int psx_taken_BFC1F86C = 0; int psx_delay_BFC1F878 = 0; int psx_delay_BFC1F88C = 0; int psx_taken_BFC1F88C = 0; int psx_delay_BFC1F8BC = 0; int psx_taken_BFC1F8BC = 0; int psx_delay_BFC1F8C8 = 0; int psx_delay_BFC1F8DC = 0; int psx_taken_BFC1F8DC = 0; int psx_delay_BFC1F90C = 0; int psx_taken_BFC1F90C = 0; int psx_delay_BFC1F918 = 0; int psx_delay_BFC1F92C = 0; int psx_taken_BFC1F92C = 0; int psx_delay_BFC1F95C = 0; int psx_taken_BFC1F95C = 0; int psx_delay_BFC1F968 = 0; int psx_delay_BFC1F97C = 0; int psx_taken_BFC1F97C = 0; int psx_delay_BFC1F9AC = 0; int psx_taken_BFC1F9AC = 0; int psx_delay_BFC1F9B8 = 0; int psx_delay_BFC1F9CC = 0; int psx_taken_BFC1F9CC = 0; int psx_delay_BFC1F9FC = 0; int psx_taken_BFC1F9FC = 0; int psx_delay_BFC1FA08 = 0; int psx_delay_BFC1FA1C = 0; int psx_taken_BFC1FA1C = 0; int psx_delay_BFC1FA40 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1F858u: goto label_BFC1F858; case 0xBFC1F874u: goto label_BFC1F874; case 0xBFC1F880u: goto label_BFC1F880; case 0xBFC1F894u: goto label_BFC1F894; case 0xBFC1F8A4u: goto label_BFC1F8A4; case 0xBFC1F8C4u: goto label_BFC1F8C4; case 0xBFC1F8D0u: goto label_BFC1F8D0; case 0xBFC1F8E4u: goto label_BFC1F8E4; case 0xBFC1F8F4u: goto label_BFC1F8F4; case 0xBFC1F8F8u: goto label_BFC1F8F8; case 0xBFC1F914u: goto label_BFC1F914; case 0xBFC1F920u: goto label_BFC1F920; case 0xBFC1F934u: goto label_BFC1F934; case 0xBFC1F944u: goto label_BFC1F944; case 0xBFC1F964u: goto label_BFC1F964; case 0xBFC1F970u: goto label_BFC1F970; case 0xBFC1F984u: goto label_BFC1F984; case 0xBFC1F994u: goto label_BFC1F994; case 0xBFC1F998u: goto label_BFC1F998; case 0xBFC1F9B4u: goto label_BFC1F9B4; case 0xBFC1F9C0u: goto label_BFC1F9C0; case 0xBFC1F9D4u: goto label_BFC1F9D4; case 0xBFC1F9E4u: goto label_BFC1F9E4; case 0xBFC1FA04u: goto label_BFC1FA04; case 0xBFC1FA10u: goto label_BFC1FA10; case 0xBFC1FA24u: goto label_BFC1FA24; case 0xBFC1FA34u: goto label_BFC1FA34; default: break; } } label_BFC1F854: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001880u); #endif #ifdef PSX_COSIM cosim_block(0x00001880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F854: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001880u); #endif label_BFC1F858: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001884u); #endif #ifdef PSX_COSIM cosim_block(0x00001884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001884u); #endif /* 0xBFC1F858: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001884u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001884u); #endif /* 0xBFC1F85C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001888u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F860: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000188Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F864: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F868: 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(0x00001894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F86C: 1040000D beq $v0, $zero, 0xBFC1F8A4 */ uint32_t psx_brA_BFC1F86C = cpu->gpr[2]; uint32_t psx_brB_BFC1F86C = cpu->gpr[0]; psx_taken_BFC1F86C = (psx_brA_BFC1F86C == psx_brB_BFC1F86C); psx_delay_BFC1F86C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F870: 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(0x0000189Cu); #endif if (psx_delay_BFC1F86C) { psx_delay_BFC1F86C = 0; if (psx_taken_BFC1F86C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000018D0u); goto label_BFC1F8A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000018A0u); } label_BFC1F874: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000018A0u); #endif #ifdef PSX_COSIM cosim_block(0x000018A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F874: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000018A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F878: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000018ACu; /* jal link before delay slot */ psx_delay_BFC1F878 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F87C: 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(0x000018A8u); #endif if (psx_delay_BFC1F878) { psx_delay_BFC1F878 = 0; cpu->gpr[31] = 0x000018ACu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F880: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F880: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000018ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018B0u); #endif /* 0xBFC1F884: 8C42650C lw $v0, 25868($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25868; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25868)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42650Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000018B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F888: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000018B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F88C: 10400005 beq $v0, $zero, 0xBFC1F8A4 */ uint32_t psx_brA_BFC1F88C = cpu->gpr[2]; uint32_t psx_brB_BFC1F88C = cpu->gpr[0]; psx_taken_BFC1F88C = (psx_brA_BFC1F88C == psx_brB_BFC1F88C); psx_delay_BFC1F88C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F890: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000018BCu); #endif if (psx_delay_BFC1F88C) { psx_delay_BFC1F88C = 0; if (psx_taken_BFC1F88C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000018D0u); goto label_BFC1F8A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000018C0u); } label_BFC1F894: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000018C0u); #endif #ifdef PSX_COSIM cosim_block(0x000018C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018C0u); #endif /* 0xBFC1F894: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018C0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000018C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F898: 2403FFFE addiu $v1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2403FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0x000018C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F89C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000018C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F8A0: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018CCu); return; } g_debug_last_store_pc = 0x000018CCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000018CCu); #endif label_BFC1F8A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000018D0u); #endif #ifdef PSX_COSIM cosim_block(0x000018D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F8A4: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000018D0u); #endif /* 0xBFC1F8A8: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000018D4u); #endif /* 0xBFC1F8AC: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000018D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000018D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F8B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000018DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F8B4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000018E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F8B8: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x000018E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F8BC: 1040000E beq $v0, $zero, 0xBFC1F8F8 */ uint32_t psx_brA_BFC1F8BC = cpu->gpr[2]; uint32_t psx_brB_BFC1F8BC = cpu->gpr[0]; psx_taken_BFC1F8BC = (psx_brA_BFC1F8BC == psx_brB_BFC1F8BC); psx_delay_BFC1F8BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F8C0: 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(0x000018ECu); #endif if (psx_delay_BFC1F8BC) { psx_delay_BFC1F8BC = 0; if (psx_taken_BFC1F8BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001924u); goto label_BFC1F8F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000018F0u); } label_BFC1F8C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000018F0u); #endif #ifdef PSX_COSIM cosim_block(0x000018F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000018F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F8C4: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000018F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F8C8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000018FCu; /* jal link before delay slot */ psx_delay_BFC1F8C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F8CC: 24840005 addiu $a0, $a0, 5 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (5)); PGXP_ALU(0x24840005u, cpu->gpr[4], _pgx1, 0x00000005u); } #ifdef PSX_COSIM cosim_instr(0x000018F8u); #endif if (psx_delay_BFC1F8C8) { psx_delay_BFC1F8C8 = 0; cpu->gpr[31] = 0x000018FCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F8D0: #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, 0x4u); #endif /* 0xBFC1F8D0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000018FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001900u); #endif /* 0xBFC1F8D4: 8C42651C lw $v0, 25884($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25884; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25884)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001900u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42651Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F8D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F8DC: 10400005 beq $v0, $zero, 0xBFC1F8F4 */ uint32_t psx_brA_BFC1F8DC = cpu->gpr[2]; uint32_t psx_brB_BFC1F8DC = cpu->gpr[0]; psx_taken_BFC1F8DC = (psx_brA_BFC1F8DC == psx_brB_BFC1F8DC); psx_delay_BFC1F8DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F8E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000190Cu); #endif if (psx_delay_BFC1F8DC) { psx_delay_BFC1F8DC = 0; if (psx_taken_BFC1F8DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001920u); goto label_BFC1F8F4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001910u); } label_BFC1F8E4: #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 /* 0xBFC1F8E4: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001910u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F8E8: 2403FFEF addiu $v1, $zero, -17 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-17)); PGXP_ALU(0x2403FFEFu, cpu->gpr[3], _pgx1, 0xFFFFFFEFu); } #ifdef PSX_COSIM cosim_instr(0x00001914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F8EC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F8F0: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000191Cu); return; } g_debug_last_store_pc = 0x0000191Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000191Cu); #endif label_BFC1F8F4: #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, 0x10000u); #endif /* 0xBFC1F8F4: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001920u); #endif label_BFC1F8F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001924u); #endif #ifdef PSX_COSIM cosim_block(0x00001924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001924u); #endif /* 0xBFC1F8F8: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001924u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001924u); #endif /* 0xBFC1F8FC: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001928u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F900: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000192Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F904: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F908: 30420020 andi $v0, $v0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u; PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x00001934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F90C: 1040000D beq $v0, $zero, 0xBFC1F944 */ uint32_t psx_brA_BFC1F90C = cpu->gpr[2]; uint32_t psx_brB_BFC1F90C = cpu->gpr[0]; psx_taken_BFC1F90C = (psx_brA_BFC1F90C == psx_brB_BFC1F90C); psx_delay_BFC1F90C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F910: 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(0x0000193Cu); #endif if (psx_delay_BFC1F90C) { psx_delay_BFC1F90C = 0; if (psx_taken_BFC1F90C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001970u); goto label_BFC1F944; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001940u); } label_BFC1F914: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001940u); #endif #ifdef PSX_COSIM cosim_block(0x00001940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F914: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F918: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000194Cu; /* jal link before delay slot */ psx_delay_BFC1F918 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F91C: 24840006 addiu $a0, $a0, 6 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (6)); PGXP_ALU(0x24840006u, cpu->gpr[4], _pgx1, 0x00000006u); } #ifdef PSX_COSIM cosim_instr(0x00001948u); #endif if (psx_delay_BFC1F918) { psx_delay_BFC1F918 = 0; cpu->gpr[31] = 0x0000194Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F920: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000194Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000194Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000194Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F920: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000194Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001950u); #endif /* 0xBFC1F924: 8C426520 lw $v0, 25888($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25888; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25888)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001950u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426520u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F928: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F92C: 10400005 beq $v0, $zero, 0xBFC1F944 */ uint32_t psx_brA_BFC1F92C = cpu->gpr[2]; uint32_t psx_brB_BFC1F92C = cpu->gpr[0]; psx_taken_BFC1F92C = (psx_brA_BFC1F92C == psx_brB_BFC1F92C); psx_delay_BFC1F92C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F930: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000195Cu); #endif if (psx_delay_BFC1F92C) { psx_delay_BFC1F92C = 0; if (psx_taken_BFC1F92C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001970u); goto label_BFC1F944; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001960u); } label_BFC1F934: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001960u); #endif #ifdef PSX_COSIM cosim_block(0x00001960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001960u); #endif /* 0xBFC1F934: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001960u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F938: 2403FFDF addiu $v1, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2403FFDFu, cpu->gpr[3], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0x00001964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F93C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F940: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000196Cu); return; } g_debug_last_store_pc = 0x0000196Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000196Cu); #endif label_BFC1F944: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001970u); #endif #ifdef PSX_COSIM cosim_block(0x00001970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F944: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001970u); #endif /* 0xBFC1F948: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001974u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001974u); #endif /* 0xBFC1F94C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001978u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001978u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F950: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000197Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F954: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F958: 30420040 andi $v0, $v0, 0x40 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u; PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x00001984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F95C: 1040000E beq $v0, $zero, 0xBFC1F998 */ uint32_t psx_brA_BFC1F95C = cpu->gpr[2]; uint32_t psx_brB_BFC1F95C = cpu->gpr[0]; psx_taken_BFC1F95C = (psx_brA_BFC1F95C == psx_brB_BFC1F95C); psx_delay_BFC1F95C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F960: 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(0x0000198Cu); #endif if (psx_delay_BFC1F95C) { psx_delay_BFC1F95C = 0; if (psx_taken_BFC1F95C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000019C4u); goto label_BFC1F998; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001990u); } label_BFC1F964: #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, 0x10u); #endif /* 0xBFC1F964: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001990u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F968: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000199Cu; /* jal link before delay slot */ psx_delay_BFC1F968 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F96C: 24840006 addiu $a0, $a0, 6 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (6)); PGXP_ALU(0x24840006u, cpu->gpr[4], _pgx1, 0x00000006u); } #ifdef PSX_COSIM cosim_instr(0x00001998u); #endif if (psx_delay_BFC1F968) { psx_delay_BFC1F968 = 0; cpu->gpr[31] = 0x0000199Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F970: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000199Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000199Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000199Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F970: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000199Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019A0u); #endif /* 0xBFC1F974: 8C426524 lw $v0, 25892($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25892; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25892)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019A0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426524u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000019A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F978: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000019A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F97C: 10400005 beq $v0, $zero, 0xBFC1F994 */ uint32_t psx_brA_BFC1F97C = cpu->gpr[2]; uint32_t psx_brB_BFC1F97C = cpu->gpr[0]; psx_taken_BFC1F97C = (psx_brA_BFC1F97C == psx_brB_BFC1F97C); psx_delay_BFC1F97C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F980: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000019ACu); #endif if (psx_delay_BFC1F97C) { psx_delay_BFC1F97C = 0; if (psx_taken_BFC1F97C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000019C0u); goto label_BFC1F994; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000019B0u); } label_BFC1F984: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000019B0u); #endif #ifdef PSX_COSIM cosim_block(0x000019B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019B0u); #endif /* 0xBFC1F984: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000019B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F988: 2403FFBF addiu $v1, $zero, -65 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-65)); PGXP_ALU(0x2403FFBFu, cpu->gpr[3], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0x000019B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F98C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000019B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F990: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019BCu); return; } g_debug_last_store_pc = 0x000019BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000019BCu); #endif label_BFC1F994: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000019C0u); #endif #ifdef PSX_COSIM cosim_block(0x000019C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F994: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000019C0u); #endif label_BFC1F998: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000019C4u); #endif #ifdef PSX_COSIM cosim_block(0x000019C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019C4u); #endif /* 0xBFC1F998: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019C4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000019C4u); #endif /* 0xBFC1F99C: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019C8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000019C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F9A0: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC1F9A4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000019D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F9A8: 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(0x000019D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F9AC: 1040000D beq $v0, $zero, 0xBFC1F9E4 */ uint32_t psx_brA_BFC1F9AC = cpu->gpr[2]; uint32_t psx_brB_BFC1F9AC = cpu->gpr[0]; psx_taken_BFC1F9AC = (psx_brA_BFC1F9AC == psx_brB_BFC1F9AC); psx_delay_BFC1F9AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1F9B0: 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(0x000019DCu); #endif if (psx_delay_BFC1F9AC) { psx_delay_BFC1F9AC = 0; if (psx_taken_BFC1F9AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A10u); goto label_BFC1F9E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000019E0u); } label_BFC1F9B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000019E0u); #endif #ifdef PSX_COSIM cosim_block(0x000019E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F9B4: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000019E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1F9B8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000019ECu; /* jal link before delay slot */ psx_delay_BFC1F9B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1F9BC: 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(0x000019E8u); #endif if (psx_delay_BFC1F9B8) { psx_delay_BFC1F9B8 = 0; cpu->gpr[31] = 0x000019ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1F9C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000019ECu); #endif #ifdef PSX_COSIM cosim_block(0x000019ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F9C0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000019ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000019F0u); #endif /* 0xBFC1F9C4: 8C426528 lw $v0, 25896($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25896; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25896)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000019F0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426528u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000019F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F9C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000019F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F9CC: 10400005 beq $v0, $zero, 0xBFC1F9E4 */ uint32_t psx_brA_BFC1F9CC = cpu->gpr[2]; uint32_t psx_brB_BFC1F9CC = cpu->gpr[0]; psx_taken_BFC1F9CC = (psx_brA_BFC1F9CC == psx_brB_BFC1F9CC); psx_delay_BFC1F9CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F9D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000019FCu); #endif if (psx_delay_BFC1F9CC) { psx_delay_BFC1F9CC = 0; if (psx_taken_BFC1F9CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A10u); goto label_BFC1F9E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A00u); } label_BFC1F9D4: #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 /* 0xBFC1F9D4: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A00u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1F9D8: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00001A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F9DC: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1F9E0: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); 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[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A0Cu); #endif label_BFC1F9E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001A10u); #endif #ifdef PSX_COSIM cosim_block(0x00001A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1F9E4: 3C10BF80 lui $s0, 0xBF80 */ cpu->gpr[16] = 0xBF800000u; PGXP_ALU(0x3C10BF80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001A10u); #endif /* 0xBFC1F9E8: 8E021074 lw $v0, 4212($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A14u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A14u); #endif /* 0xBFC1F9EC: 8E031070 lw $v1, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A18u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E031070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001A18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1F9F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1F9F4: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1F9F8: 30420008 andi $v0, $v0, 0x8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x8u; PGXP_ALU(0x30420008u, cpu->gpr[2], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00001A24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1F9FC: 1040000D beq $v0, $zero, 0xBFC1FA34 */ uint32_t psx_brA_BFC1F9FC = cpu->gpr[2]; uint32_t psx_brB_BFC1F9FC = cpu->gpr[0]; psx_taken_BFC1F9FC = (psx_brA_BFC1F9FC == psx_brB_BFC1F9FC); psx_delay_BFC1F9FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FA00: 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(0x00001A2Cu); #endif if (psx_delay_BFC1F9FC) { psx_delay_BFC1F9FC = 0; if (psx_taken_BFC1F9FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A60u); goto label_BFC1FA34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A30u); } label_BFC1FA04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001A30u); #endif #ifdef PSX_COSIM cosim_block(0x00001A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FA04: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FA08: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001A3Cu; /* jal link before delay slot */ psx_delay_BFC1FA08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FA0C: 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(0x00001A38u); #endif if (psx_delay_BFC1FA08) { psx_delay_BFC1FA08 = 0; cpu->gpr[31] = 0x00001A3Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FA10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001A3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FA10: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A40u); #endif /* 0xBFC1FA14: 8C426518 lw $v0, 25880($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25880; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25880)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A40u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426518u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FA1C: 10400005 beq $v0, $zero, 0xBFC1FA34 */ uint32_t psx_brA_BFC1FA1C = cpu->gpr[2]; 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_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A4Cu); #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, 0x00001A60u); goto label_BFC1FA34; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A50u); } label_BFC1FA24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001A50u); #endif #ifdef PSX_COSIM cosim_block(0x00001A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A50u); #endif /* 0xBFC1FA24: 8E021070 lw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A50u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x8E021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FA28: 2403FFF7 addiu $v1, $zero, -9 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-9)); PGXP_ALU(0x2403FFF7u, cpu->gpr[3], _pgx1, 0xFFFFFFF7u); } #ifdef PSX_COSIM cosim_instr(0x00001A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FA2C: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC1FA30: AE021070 sw $v0, 4208($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A5Cu); return; } g_debug_last_store_pc = 0x00001A5Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE021070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001A5Cu); #endif label_BFC1FA34: #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 /* 0xBFC1FA34: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001A60u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001A60u); #endif /* 0xBFC1FA38: 8FB00010 lw $s0, 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, 0x00001A64u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00001A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FA3C: 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(0x00001A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FA40: 03E00008 jr $ra */ psx_delay_BFC1FA40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FA44: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001A70u); #endif if (psx_delay_BFC1FA40) { psx_delay_BFC1FA40 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001A74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001A74u); int psx_delay_BFC1FA58 = 0; int psx_taken_BFC1FA58 = 0; int psx_delay_BFC1FA6C = 0; int psx_taken_BFC1FA6C = 0; int psx_delay_BFC1FA80 = 0; int psx_delay_BFC1FA90 = 0; int psx_delay_BFC1FA98 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FA60u: goto label_BFC1FA60; case 0xBFC1FA74u: goto label_BFC1FA74; case 0xBFC1FA88u: goto label_BFC1FA88; case 0xBFC1FA98u: goto label_BFC1FA98; default: break; } } label_BFC1FA48: #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, 0x8u); #endif /* 0xBFC1FA48: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001A74u); #endif /* 0xBFC1FA4C: 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, 0x00001A78u); 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(0x00001A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FA54: 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(0x00001A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FA58: 1040000F beq $v0, $zero, 0xBFC1FA98 */ uint32_t psx_brA_BFC1FA58 = cpu->gpr[2]; uint32_t psx_brB_BFC1FA58 = cpu->gpr[0]; psx_taken_BFC1FA58 = (psx_brA_BFC1FA58 == psx_brB_BFC1FA58); psx_delay_BFC1FA58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA5C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A88u); #endif if (psx_delay_BFC1FA58) { psx_delay_BFC1FA58 = 0; if (psx_taken_BFC1FA58) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001AC4u); goto label_BFC1FA98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001A8Cu); } label_BFC1FA60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001A8Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A8Cu); #endif /* 0xBFC1FA60: 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, 0x00001A8Cu); 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(0x00001A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FA68: 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(0x00001A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FA6C: 1040000A beq $v0, $zero, 0xBFC1FA98 */ uint32_t psx_brA_BFC1FA6C = cpu->gpr[2]; uint32_t psx_brB_BFC1FA6C = cpu->gpr[0]; psx_taken_BFC1FA6C = (psx_brA_BFC1FA6C == psx_brB_BFC1FA6C); psx_delay_BFC1FA6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FA70: 3C04F200 lui $a0, 0xF200 */ cpu->gpr[4] = 0xF2000000u; PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001A9Cu); #endif if (psx_delay_BFC1FA6C) { psx_delay_BFC1FA6C = 0; if (psx_taken_BFC1FA6C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001AC4u); goto label_BFC1FA98; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001AA0u); } label_BFC1FA74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001AA0u); #endif #ifdef PSX_COSIM cosim_block(0x00001AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FA74: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FA78: 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(0x00001AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FA7C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FA80: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001AB4u; /* jal link before delay slot */ psx_delay_BFC1FA80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FA84: 24840003 addiu $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (3)); PGXP_ALU(0x24840003u, cpu->gpr[4], _pgx1, 0x00000003u); } #ifdef PSX_COSIM cosim_instr(0x00001AB0u); #endif if (psx_delay_BFC1FA80) { psx_delay_BFC1FA80 = 0; cpu->gpr[31] = 0x00001AB4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FA88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001AB4u); #endif #ifdef PSX_COSIM cosim_block(0x00001AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AB4u); #endif /* 0xBFC1FA88: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001AB4u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FA8C: 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(0x00001AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FA90: 03E00008 jr $ra */ psx_delay_BFC1FA90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FA94: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001AC0u); #endif if (psx_delay_BFC1FA90) { psx_delay_BFC1FA90 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FA98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001AC4u); #endif #ifdef PSX_COSIM cosim_block(0x00001AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FA98: 03E00008 jr $ra */ psx_delay_BFC1FA98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FA9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001AC8u); #endif if (psx_delay_BFC1FA98) { psx_delay_BFC1FA98 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001ACC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001ACCu); int psx_delay_BFC1FAB0 = 0; int psx_taken_BFC1FAB0 = 0; int psx_delay_BFC1FAC4 = 0; int psx_taken_BFC1FAC4 = 0; int psx_delay_BFC1FAD8 = 0; int psx_delay_BFC1FAE8 = 0; int psx_delay_BFC1FAF0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FAB8u: goto label_BFC1FAB8; case 0xBFC1FACCu: goto label_BFC1FACC; case 0xBFC1FAE0u: goto label_BFC1FAE0; case 0xBFC1FAF0u: goto label_BFC1FAF0; default: break; } } label_BFC1FAA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001ACCu); #endif #ifdef PSX_COSIM cosim_block(0x00001ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FAA0: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AD0u); #endif /* 0xBFC1FAA4: 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, 0x00001AD0u); 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(0x00001AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FAA8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FAAC: 30420040 andi $v0, $v0, 0x40 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u; PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x00001AD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FAB0: 1040000F beq $v0, $zero, 0xBFC1FAF0 */ uint32_t psx_brA_BFC1FAB0 = cpu->gpr[2]; uint32_t psx_brB_BFC1FAB0 = cpu->gpr[0]; psx_taken_BFC1FAB0 = (psx_brA_BFC1FAB0 == psx_brB_BFC1FAB0); psx_delay_BFC1FAB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FAB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001AE0u); #endif if (psx_delay_BFC1FAB0) { psx_delay_BFC1FAB0 = 0; if (psx_taken_BFC1FAB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B1Cu); goto label_BFC1FAF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001AE4u); } label_BFC1FAB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001AE4u); #endif #ifdef PSX_COSIM cosim_block(0x00001AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AE4u); #endif /* 0xBFC1FAB8: 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, 0x00001AE4u); 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(0x00001AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FABC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FAC0: 30420040 andi $v0, $v0, 0x40 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x40u; PGXP_ALU(0x30420040u, cpu->gpr[2], _pgx1, 0x0040u); } #ifdef PSX_COSIM cosim_instr(0x00001AECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FAC4: 1040000A beq $v0, $zero, 0xBFC1FAF0 */ uint32_t psx_brA_BFC1FAC4 = cpu->gpr[2]; uint32_t psx_brB_BFC1FAC4 = cpu->gpr[0]; psx_taken_BFC1FAC4 = (psx_brA_BFC1FAC4 == psx_brB_BFC1FAC4); psx_delay_BFC1FAC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FAC8: 3C04F200 lui $a0, 0xF200 */ cpu->gpr[4] = 0xF2000000u; PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001AF4u); #endif if (psx_delay_BFC1FAC4) { psx_delay_BFC1FAC4 = 0; if (psx_taken_BFC1FAC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B1Cu); goto label_BFC1FAF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001AF8u); } label_BFC1FACC: #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, 0x20000000u); #endif /* 0xBFC1FACC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FAD0: 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(0x00001AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FAD4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B00u); return; } g_debug_last_store_pc = 0x00001B00u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FAD8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001B0Cu; /* jal link before delay slot */ psx_delay_BFC1FAD8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FADC: 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(0x00001B08u); #endif if (psx_delay_BFC1FAD8) { psx_delay_BFC1FAD8 = 0; cpu->gpr[31] = 0x00001B0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FAE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B0Cu); #endif /* 0xBFC1FAE0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B0Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001B0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FAE4: 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(0x00001B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FAE8: 03E00008 jr $ra */ psx_delay_BFC1FAE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FAEC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001B18u); #endif if (psx_delay_BFC1FAE8) { psx_delay_BFC1FAE8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FAF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FAF0: 03E00008 jr $ra */ psx_delay_BFC1FAF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FAF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B20u); #endif if (psx_delay_BFC1FAF0) { psx_delay_BFC1FAF0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001B24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001B24u); int psx_delay_BFC1FB08 = 0; int psx_taken_BFC1FB08 = 0; int psx_delay_BFC1FB1C = 0; int psx_taken_BFC1FB1C = 0; int psx_delay_BFC1FB30 = 0; int psx_delay_BFC1FB40 = 0; int psx_delay_BFC1FB48 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FB10u: goto label_BFC1FB10; case 0xBFC1FB24u: goto label_BFC1FB24; case 0xBFC1FB38u: goto label_BFC1FB38; case 0xBFC1FB48u: goto label_BFC1FB48; default: break; } } label_BFC1FAF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B24u); #endif #ifdef PSX_COSIM cosim_block(0x00001B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FAF8: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001B24u); #endif /* 0xBFC1FAFC: 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, 0x00001B28u); 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(0x00001B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FB04: 30420020 andi $v0, $v0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u; PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x00001B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB08: 1040000F beq $v0, $zero, 0xBFC1FB48 */ uint32_t psx_brA_BFC1FB08 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB08 = cpu->gpr[0]; 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(0x00001B38u); #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, 0x00001B74u); goto label_BFC1FB48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B3Cu); } label_BFC1FB10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B3Cu); #endif /* 0xBFC1FB10: 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, 0x00001B3Cu); 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(0x00001B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FB18: 30420020 andi $v0, $v0, 0x20 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x20u; PGXP_ALU(0x30420020u, cpu->gpr[2], _pgx1, 0x0020u); } #ifdef PSX_COSIM cosim_instr(0x00001B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB1C: 1040000A beq $v0, $zero, 0xBFC1FB48 */ uint32_t psx_brA_BFC1FB1C = cpu->gpr[2]; uint32_t psx_brB_BFC1FB1C = cpu->gpr[0]; psx_taken_BFC1FB1C = (psx_brA_BFC1FB1C == psx_brB_BFC1FB1C); psx_delay_BFC1FB1C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FB20: 3C04F200 lui $a0, 0xF200 */ cpu->gpr[4] = 0xF2000000u; PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001B4Cu); #endif if (psx_delay_BFC1FB1C) { psx_delay_BFC1FB1C = 0; if (psx_taken_BFC1FB1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B74u); goto label_BFC1FB48; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B50u); } label_BFC1FB24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B50u); #endif #ifdef PSX_COSIM cosim_block(0x00001B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FB24: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FB28: 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(0x00001B54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FB2C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B58u); return; } g_debug_last_store_pc = 0x00001B58u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001B58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FB30: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001B64u; /* jal link before delay slot */ psx_delay_BFC1FB30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FB34: 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(0x00001B60u); #endif if (psx_delay_BFC1FB30) { psx_delay_BFC1FB30 = 0; cpu->gpr[31] = 0x00001B64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FB38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B64u); #endif #ifdef PSX_COSIM cosim_block(0x00001B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B64u); #endif /* 0xBFC1FB38: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001B64u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB3C: 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(0x00001B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FB40: 03E00008 jr $ra */ psx_delay_BFC1FB40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FB44: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001B70u); #endif if (psx_delay_BFC1FB40) { psx_delay_BFC1FB40 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FB48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B74u); #endif #ifdef PSX_COSIM cosim_block(0x00001B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FB48: 03E00008 jr $ra */ psx_delay_BFC1FB48 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B78u); #endif if (psx_delay_BFC1FB48) { psx_delay_BFC1FB48 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001B7C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001B7Cu); int psx_delay_BFC1FB60 = 0; int psx_taken_BFC1FB60 = 0; int psx_delay_BFC1FB74 = 0; int psx_taken_BFC1FB74 = 0; int psx_delay_BFC1FB84 = 0; int psx_delay_BFC1FB94 = 0; int psx_delay_BFC1FB9C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FB68u: goto label_BFC1FB68; case 0xBFC1FB7Cu: goto label_BFC1FB7C; case 0xBFC1FB8Cu: goto label_BFC1FB8C; case 0xBFC1FB9Cu: goto label_BFC1FB9C; default: break; } } label_BFC1FB50: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B7Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FB50: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001B7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B80u); #endif /* 0xBFC1FB54: 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, 0x00001B80u); 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(0x00001B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FB5C: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001B88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB60: 1040000E beq $v0, $zero, 0xBFC1FB9C */ uint32_t psx_brA_BFC1FB60 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB60 = cpu->gpr[0]; psx_taken_BFC1FB60 = (psx_brA_BFC1FB60 == psx_brB_BFC1FB60); psx_delay_BFC1FB60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B90u); #endif if (psx_delay_BFC1FB60) { psx_delay_BFC1FB60 = 0; if (psx_taken_BFC1FB60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001BC8u); goto label_BFC1FB9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001B94u); } label_BFC1FB68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001B94u); #endif #ifdef PSX_COSIM cosim_block(0x00001B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001B94u); #endif /* 0xBFC1FB68: 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, 0x00001B94u); 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(0x00001B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FB6C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FB70: 30420010 andi $v0, $v0, 0x10 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x10u; PGXP_ALU(0x30420010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB74: 10400009 beq $v0, $zero, 0xBFC1FB9C */ uint32_t psx_brA_BFC1FB74 = cpu->gpr[2]; uint32_t psx_brB_BFC1FB74 = cpu->gpr[0]; psx_taken_BFC1FB74 = (psx_brA_BFC1FB74 == psx_brB_BFC1FB74); psx_delay_BFC1FB74 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FB78: 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(0x00001BA4u); #endif if (psx_delay_BFC1FB74) { psx_delay_BFC1FB74 = 0; if (psx_taken_BFC1FB74) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001BC8u); goto label_BFC1FB9C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001BA8u); } label_BFC1FB7C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001BA8u); #endif #ifdef PSX_COSIM cosim_block(0x00001BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FB7C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FB80: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BACu); return; } g_debug_last_store_pc = 0x00001BACu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC1FB84: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001BB8u; /* jal link before delay slot */ psx_delay_BFC1FB84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FB88: 3C04F200 lui $a0, 0xF200 */ cpu->gpr[4] = 0xF2000000u; PGXP_ALU(0x3C04F200u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001BB4u); #endif if (psx_delay_BFC1FB84) { psx_delay_BFC1FB84 = 0; cpu->gpr[31] = 0x00001BB8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FB8C: #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 /* 0xBFC1FB8C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BB8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FB90: 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(0x00001BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FB94: 03E00008 jr $ra */ psx_delay_BFC1FB94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FB98: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00001BC4u); #endif if (psx_delay_BFC1FB94) { psx_delay_BFC1FB94 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FB9C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FB9C: 03E00008 jr $ra */ psx_delay_BFC1FB9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FBA0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001BCCu); #endif if (psx_delay_BFC1FB9C) { psx_delay_BFC1FB9C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001BD0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001BD0u); int psx_delay_BFC1FBB0 = 0; int psx_taken_BFC1FBB0 = 0; int psx_delay_BFC1FBC8 = 0; int psx_delay_BFC1FBD0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FBB8u: goto label_BFC1FBB8; case 0xBFC1FBD0u: goto label_BFC1FBD0; default: break; } } label_BFC1FBA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001BD0u); #endif #ifdef PSX_COSIM cosim_block(0x00001BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FBA4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001BD0u); #endif /* 0xBFC1FBA8: 8C426508 lw $v0, 25864($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25864; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25864)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BD4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426508u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FBAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FBB0: 10400007 beq $v0, $zero, 0xBFC1FBD0 */ uint32_t psx_brA_BFC1FBB0 = cpu->gpr[2]; uint32_t psx_brB_BFC1FBB0 = cpu->gpr[0]; psx_taken_BFC1FBB0 = (psx_brA_BFC1FBB0 == psx_brB_BFC1FBB0); psx_delay_BFC1FBB0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FBB4: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001BE0u); #endif if (psx_delay_BFC1FBB0) { psx_delay_BFC1FBB0 = 0; if (psx_taken_BFC1FBB0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001BFCu); goto label_BFC1FBD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001BE4u); } label_BFC1FBB8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001BE4u); #endif #ifdef PSX_COSIM cosim_block(0x00001BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FBB8: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001BE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FBBC: 2403FFFE addiu $v1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2403FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0x00001BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FBC0: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BECu); return; } g_debug_last_store_pc = 0x00001BECu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0xCu); #endif /* 0xBFC1FBC4: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001BF0u); return; } g_debug_last_store_pc = 0x00001BF0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FBC8: 0C000A73 jal 0xB00029CC */ cpu->gpr[31] = 0x00001BFCu; /* jal link before delay slot */ psx_delay_BFC1FBC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FBCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001BF8u); #endif if (psx_delay_BFC1FBC8) { psx_delay_BFC1FBC8 = 0; cpu->gpr[31] = 0x00001BFCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000029CCu); cpu->pc = 0x000029CCu; return; } label_BFC1FBD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001BFCu); #endif #ifdef PSX_COSIM cosim_block(0x00001BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FBD0: 03E00008 jr $ra */ { uint32_t _t = cpu->gpr[31]; /* DELAY (orphaned) 0xBFC1FBD4: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } /* CPS: publish $ra */ } void OpenBIOS_func_00001C00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C00u); label_BFC1FBD4: #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, 0x1u); #endif /* 0xBFC1FBD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C04u); cpu->pc = 0x00001C04u; return; /* fallthrough */ } void OpenBIOS_func_00001C04(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C04u); int psx_delay_BFC1FBE4 = 0; int psx_taken_BFC1FBE4 = 0; label_BFC1FBD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C04u); #endif #ifdef PSX_COSIM cosim_block(0x00001C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FBD8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C04u); #endif /* 0xBFC1FBDC: 8C426504 lw $v0, 25860($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25860; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25860)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C08u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426504u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FBE0: 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 /* 0xBFC1FBE4: 10400007 beq $v0, $zero, 0xBFC1FC04 */ uint32_t psx_brA_BFC1FBE4 = cpu->gpr[2]; uint32_t psx_brB_BFC1FBE4 = cpu->gpr[0]; psx_taken_BFC1FBE4 = (psx_brA_BFC1FBE4 == psx_brB_BFC1FBE4); /* DELAY (orphaned) 0xBFC1FBE8: 3C02BF80 lui $v0, 0xBF80 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); if (psx_taken_BFC1FBE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C30u); cpu->pc = 0x00001C30u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C18u); cpu->pc = 0x00001C18u; return; } void OpenBIOS_func_00001C14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C14u); label_BFC1FBE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C14u); #endif #ifdef PSX_COSIM cosim_block(0x00001C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FBE8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C18u); cpu->pc = 0x00001C18u; return; /* fallthrough */ } void OpenBIOS_func_00001C18(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C18u); label_BFC1FBEC: #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, 0x20000000u); #endif /* 0xBFC1FBEC: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C1Cu); cpu->pc = 0x00001C1Cu; return; /* fallthrough */ } void OpenBIOS_func_00001C1C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C1Cu); int psx_delay_BFC1FBFC = 0; int psx_delay_BFC1FC04 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FC04u: goto label_BFC1FC04; default: break; } } label_BFC1FBF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FBF0: 2403FFBF addiu $v1, $zero, -65 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-65)); PGXP_ALU(0x2403FFBFu, cpu->gpr[3], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0x00001C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FBF4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C20u); return; } g_debug_last_store_pc = 0x00001C20u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FBF8: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C24u); return; } g_debug_last_store_pc = 0x00001C24u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001C24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FBFC: 0C000A73 jal 0xB00029CC */ cpu->gpr[31] = 0x00001C30u; /* jal link before delay slot */ psx_delay_BFC1FBFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC00: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C2Cu); #endif if (psx_delay_BFC1FBFC) { psx_delay_BFC1FBFC = 0; cpu->gpr[31] = 0x00001C30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000029CCu); cpu->pc = 0x000029CCu; return; } label_BFC1FC04: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FC04: 03E00008 jr $ra */ { uint32_t _t = cpu->gpr[31]; /* DELAY (orphaned) 0xBFC1FC08: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } /* CPS: publish $ra */ } void OpenBIOS_func_00001C34(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C34u); label_BFC1FC08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C34u); #endif #ifdef PSX_COSIM cosim_block(0x00001C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC08: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C38u); cpu->pc = 0x00001C38u; return; /* fallthrough */ } void OpenBIOS_func_00001C38(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C38u); label_BFC1FC0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C38u); #endif #ifdef PSX_COSIM cosim_block(0x00001C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC0C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C38u); #endif /* 0xBFC1FC10: 8C426500 lw $v0, 25856($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25856; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25856)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C3Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C426500u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C44u); cpu->pc = 0x00001C44u; return; /* fallthrough */ } void OpenBIOS_func_00001C44(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C44u); int psx_delay_BFC1FC18 = 0; int psx_taken_BFC1FC18 = 0; label_BFC1FC18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C44u); #endif #ifdef PSX_COSIM cosim_block(0x00001C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FC18: 10400007 beq $v0, $zero, 0xBFC1FC38 */ uint32_t psx_brA_BFC1FC18 = cpu->gpr[2]; uint32_t psx_brB_BFC1FC18 = cpu->gpr[0]; psx_taken_BFC1FC18 = (psx_brA_BFC1FC18 == psx_brB_BFC1FC18); /* DELAY (orphaned) 0xBFC1FC1C: 3C02BF80 lui $v0, 0xBF80 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); if (psx_taken_BFC1FC18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C64u); cpu->pc = 0x00001C64u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C4Cu); cpu->pc = 0x00001C4Cu; return; } void OpenBIOS_func_00001C48(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C48u); label_BFC1FC1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C48u); #endif #ifdef PSX_COSIM cosim_block(0x00001C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC1C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C4Cu); cpu->pc = 0x00001C4Cu; return; /* fallthrough */ } void OpenBIOS_func_00001C4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C4Cu); label_BFC1FC20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FC20: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FC24: 2403FFDF addiu $v1, $zero, -33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-33)); PGXP_ALU(0x2403FFDFu, cpu->gpr[3], _pgx1, 0xFFFFFFDFu); } #ifdef PSX_COSIM cosim_instr(0x00001C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FC28: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C54u); return; } g_debug_last_store_pc = 0x00001C54u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001C54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C58u); cpu->pc = 0x00001C58u; return; /* fallthrough */ } void OpenBIOS_func_00001C58(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C58u); int psx_delay_BFC1FC30 = 0; int psx_delay_BFC1FC38 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FC38u: goto label_BFC1FC38; default: break; } } label_BFC1FC2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C58u); #endif #ifdef PSX_COSIM cosim_block(0x00001C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FC2C: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C58u); return; } g_debug_last_store_pc = 0x00001C58u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FC30: 0C000A73 jal 0xB00029CC */ cpu->gpr[31] = 0x00001C64u; /* jal link before delay slot */ psx_delay_BFC1FC30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C60u); #endif if (psx_delay_BFC1FC30) { psx_delay_BFC1FC30 = 0; cpu->gpr[31] = 0x00001C64u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000029CCu); cpu->pc = 0x000029CCu; return; } label_BFC1FC38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C64u); #endif #ifdef PSX_COSIM cosim_block(0x00001C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FC38: 03E00008 jr $ra */ psx_delay_BFC1FC38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C68u); #endif if (psx_delay_BFC1FC38) { psx_delay_BFC1FC38 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001C6C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C6Cu); label_BFC1FC40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C6Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC40: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C70u); cpu->pc = 0x00001C70u; return; /* fallthrough */ } void OpenBIOS_func_00001C70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C70u); label_BFC1FC44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C70u); #endif #ifdef PSX_COSIM cosim_block(0x00001C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C70u); #endif /* 0xBFC1FC44: 8C4264FC lw $v0, 25852($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25852; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25852)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C70u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C4264FCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C78u); cpu->pc = 0x00001C78u; return; /* fallthrough */ } void OpenBIOS_func_00001C78(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001C78u); int psx_delay_BFC1FC4C = 0; int psx_taken_BFC1FC4C = 0; int psx_delay_BFC1FC64 = 0; int psx_delay_BFC1FC6C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FC54u: goto label_BFC1FC54; case 0xBFC1FC6Cu: goto label_BFC1FC6C; default: break; } } label_BFC1FC4C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C78u); #endif #ifdef PSX_COSIM cosim_block(0x00001C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FC4C: 10400007 beq $v0, $zero, 0xBFC1FC6C */ uint32_t psx_brA_BFC1FC4C = cpu->gpr[2]; uint32_t psx_brB_BFC1FC4C = cpu->gpr[0]; psx_taken_BFC1FC4C = (psx_brA_BFC1FC4C == psx_brB_BFC1FC4C); psx_delay_BFC1FC4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC50: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001C7Cu); #endif if (psx_delay_BFC1FC4C) { psx_delay_BFC1FC4C = 0; if (psx_taken_BFC1FC4C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C98u); goto label_BFC1FC6C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001C80u); } label_BFC1FC54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C80u); #endif #ifdef PSX_COSIM cosim_block(0x00001C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FC54: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FC58: 2403FFEF addiu $v1, $zero, -17 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-17)); PGXP_ALU(0x2403FFEFu, cpu->gpr[3], _pgx1, 0xFFFFFFEFu); } #ifdef PSX_COSIM cosim_instr(0x00001C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FC5C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C88u); return; } g_debug_last_store_pc = 0x00001C88u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FC60: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001C8Cu); return; } g_debug_last_store_pc = 0x00001C8Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #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, 0x80000000u); #endif /* 0xBFC1FC64: 0C000A73 jal 0xB00029CC */ cpu->gpr[31] = 0x00001C98u; /* jal link before delay slot */ psx_delay_BFC1FC64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C94u); #endif if (psx_delay_BFC1FC64) { psx_delay_BFC1FC64 = 0; cpu->gpr[31] = 0x00001C98u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000029CCu); cpu->pc = 0x000029CCu; return; } label_BFC1FC6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001C98u); #endif #ifdef PSX_COSIM cosim_block(0x00001C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FC6C: 03E00008 jr $ra */ psx_delay_BFC1FC6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FC70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001C9Cu); #endif if (psx_delay_BFC1FC6C) { psx_delay_BFC1FC6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001CA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001CA0u); int psx_delay_BFC1FC8C = 0; int psx_taken_BFC1FC8C = 0; int psx_delay_BFC1FC94 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FC84u: goto label_BFC1FC84; case 0xBFC1FC94u: goto label_BFC1FC94; default: break; } } label_BFC1FC74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001CA0u); #endif #ifdef PSX_COSIM cosim_block(0x00001CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC74: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FC78: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC7C: 2442650C addiu $v0, $v0, 25868 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25868)); PGXP_ALU(0x2442650Cu, cpu->gpr[2], _pgx1, 0x0000650Cu); } #ifdef PSX_COSIM cosim_instr(0x00001CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FC80: 24636538 addiu $v1, $v1, 25912 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (25912)); PGXP_ALU(0x24636538u, cpu->gpr[3], _pgx1, 0x00006538u); } #ifdef PSX_COSIM cosim_instr(0x00001CACu); #endif label_BFC1FC84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001CB0u); #endif #ifdef PSX_COSIM cosim_block(0x00001CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FC84: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00001CB0u; 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(0x00001CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC88: 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(0x00001CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FC8C: 1443FFFD bne $v0, $v1, 0xBFC1FC84 */ uint32_t psx_brA_BFC1FC8C = cpu->gpr[2]; uint32_t psx_brB_BFC1FC8C = cpu->gpr[3]; psx_taken_BFC1FC8C = (psx_brA_BFC1FC8C != psx_brB_BFC1FC8C); psx_delay_BFC1FC8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FC90: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001CBCu); #endif if (psx_delay_BFC1FC8C) { psx_delay_BFC1FC8C = 0; if (psx_taken_BFC1FC8C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001CB0u); goto label_BFC1FC84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001CC0u); } label_BFC1FC94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001CC0u); #endif #ifdef PSX_COSIM cosim_block(0x00001CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC1FC94: 080007AE j 0xB0001EB8 */ psx_delay_BFC1FC94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FC98: 24A5462C addiu $a1, $a1, 17964 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17964)); PGXP_ALU(0x24A5462Cu, cpu->gpr[5], _pgx1, 0x0000462Cu); } #ifdef PSX_COSIM cosim_instr(0x00001CC4u); #endif if (psx_delay_BFC1FC94) { psx_delay_BFC1FC94 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } } void OpenBIOS_func_00001CC8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001CC8u); int psx_delay_BFC1FCAC = 0; label_BFC1FC9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001CC8u); #endif #ifdef PSX_COSIM cosim_block(0x00001CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FC9C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FCA0: 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(0x00001CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FCA4: 2442650C addiu $v0, $v0, 25868 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25868)); PGXP_ALU(0x2442650Cu, cpu->gpr[2], _pgx1, 0x0000650Cu); } #ifdef PSX_COSIM cosim_instr(0x00001CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FCA8: 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(0x00001CD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FCAC: 03E00008 jr $ra */ psx_delay_BFC1FCAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1FCB0: AC850000 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001CDCu); return; } g_debug_last_store_pc = 0x00001CDCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001CDCu); #endif if (psx_delay_BFC1FCAC) { psx_delay_BFC1FCAC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001CE0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001CE0u); int psx_delay_BFC1FCFC = 0; int psx_delay_BFC1FD10 = 0; int psx_taken_BFC1FD10 = 0; int psx_delay_BFC1FD50 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FCF4u: goto label_BFC1FCF4; case 0xBFC1FD04u: goto label_BFC1FD04; case 0xBFC1FD18u: goto label_BFC1FD18; default: break; } } label_BFC1FCB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001CE0u); #endif #ifdef PSX_COSIM cosim_block(0x00001CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FCB4: 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(0x00001CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FCB8: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC1FCBC: 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, 0x00001CE8u); return; } g_debug_last_store_pc = 0x00001CE8u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00001CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC1FCC0: 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, 0x00001CECu); return; } g_debug_last_store_pc = 0x00001CECu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #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, 0x20010000u); #endif /* 0xBFC1FCC4: 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, 0x00001CF0u); return; } g_debug_last_store_pc = 0x00001CF0u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00001CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FCC8: 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, 0x00001CF4u); return; } g_debug_last_store_pc = 0x00001CF4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001CF4u); #endif /* 0xBFC1FCCC: 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, 0x00001CF8u); 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(0x00001CF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FCD0: 2405FF8E addiu $a1, $zero, -114 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-114)); PGXP_ALU(0x2405FF8Eu, cpu->gpr[5], _pgx1, 0xFFFFFF8Eu); } #ifdef PSX_COSIM cosim_instr(0x00001CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1FCD4: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1FCD8: 00451024 and $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5]; PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1FCDC: 261064FC addiu $s0, $s0, 25852 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[16] + (25852)); PGXP_ALU(0x261064FCu, cpu->gpr[16], _pgx1, 0x000064FCu); } #ifdef PSX_COSIM cosim_instr(0x00001D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FCE0: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0xCu); #endif /* 0xBFC1FCE4: AC621074 sw $v0, 4212($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D10u); return; } g_debug_last_store_pc = 0x00001D10u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FCE8: 24A545EC addiu $a1, $a1, 17900 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17900)); PGXP_ALU(0x24A545ECu, cpu->gpr[5], _pgx1, 0x000045ECu); } #ifdef PSX_COSIM cosim_instr(0x00001D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC1FCEC: 26110010 addiu $s1, $s0, 16 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[17] = (uint32_t)((int32_t)cpu->gpr[16] + (16)); PGXP_ALU(0x26110010u, cpu->gpr[17], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x00001D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC1FCF0: 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(0x00001D1Cu); #endif label_BFC1FCF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001D20u); #endif #ifdef PSX_COSIM cosim_block(0x00001D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC1FCF4: 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, 0x00001D20u); return; } g_debug_last_store_pc = 0x00001D20u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAE120000u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00001D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC1FCF8: AFA50010 sw $a1, 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, 0x00001D24u); return; } g_debug_last_store_pc = 0x00001D24u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FCFC: 0C0007AE jal 0xB0001EB8 */ cpu->gpr[31] = 0x00001D30u; /* jal link before delay slot */ psx_delay_BFC1FCFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC1FD00: 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, 0x00001D2Cu); return; } g_debug_last_store_pc = 0x00001D2Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40028u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001D2Cu); #endif if (psx_delay_BFC1FCFC) { psx_delay_BFC1FCFC = 0; cpu->gpr[31] = 0x00001D30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } label_BFC1FD04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001D30u); #endif #ifdef PSX_COSIM cosim_block(0x00001D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D30u); #endif /* 0xBFC1FD04: 8FA50010 lw $a1, 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, 0x00001D30u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001D30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC1FD08: 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(0x00001D34u); #endif /* 0xBFC1FD0C: 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, 0x00001D38u); 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(0x00001D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC1FD10: 1611FFF8 bne $s0, $s1, 0xBFC1FCF4 */ uint32_t psx_brA_BFC1FD10 = cpu->gpr[16]; uint32_t psx_brB_BFC1FD10 = cpu->gpr[17]; psx_taken_BFC1FD10 = (psx_brA_BFC1FD10 != psx_brB_BFC1FD10); psx_delay_BFC1FD10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FD14: 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(0x00001D40u); #endif if (psx_delay_BFC1FD10) { psx_delay_BFC1FD10 = 0; if (psx_taken_BFC1FD10) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D20u); goto label_BFC1FCF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D44u); } label_BFC1FD18: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001D44u); #endif #ifdef PSX_COSIM cosim_block(0x00001D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FD18: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD1C: A4601104 sh $zero, 4356($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4356; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4356)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D48u); return; } g_debug_last_store_pc = 0x00001D48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601104u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD20: A4601108 sh $zero, 4360($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4360; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4360)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D4Cu); return; } g_debug_last_store_pc = 0x00001D4Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601108u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD24: A4601100 sh $zero, 4352($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4352; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4352)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D50u); return; } g_debug_last_store_pc = 0x00001D50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601100u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD28: A4601114 sh $zero, 4372($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4372; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4372)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D54u); return; } g_debug_last_store_pc = 0x00001D54u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601114u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD2C: A4601118 sh $zero, 4376($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4376; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4376)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D58u); return; } g_debug_last_store_pc = 0x00001D58u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601118u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD30: A4601110 sh $zero, 4368($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4368; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4368)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D5Cu); return; } g_debug_last_store_pc = 0x00001D5Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601110u, _pgxa, cpu->gpr[0]); } #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, 0x9u); #endif /* 0xBFC1FD34: A4601124 sh $zero, 4388($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4388; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4388)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D60u); return; } g_debug_last_store_pc = 0x00001D60u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601124u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD38: A4601128 sh $zero, 4392($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4392; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4392)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D64u); return; } g_debug_last_store_pc = 0x00001D64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601128u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD3C: A4601120 sh $zero, 4384($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4384; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4384)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001D68u); return; } g_debug_last_store_pc = 0x00001D68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4601120u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001D68u); #endif /* 0xBFC1FD40: 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, 0x00001D6Cu); 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(0x00001D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D70u); #endif /* 0xBFC1FD44: 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, 0x00001D70u); 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(0x00001D70u); #endif /* 0xBFC1FD48: 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, 0x00001D74u); 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(0x00001D74u); #endif /* 0xBFC1FD4C: 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, 0x00001D78u); 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(0x00001D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FD50: 03E00008 jr $ra */ psx_delay_BFC1FD50 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FD54: 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(0x00001D80u); #endif if (psx_delay_BFC1FD50) { psx_delay_BFC1FD50 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001D84(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001D84u); int psx_delay_BFC1FD6C = 0; label_BFC1FD58: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001D84u); #endif #ifdef PSX_COSIM cosim_block(0x00001D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FD58: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001D84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FD5C: 244264FC addiu $v0, $v0, 25852 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25852)); PGXP_ALU(0x244264FCu, cpu->gpr[2], _pgx1, 0x000064FCu); } #ifdef PSX_COSIM cosim_instr(0x00001D88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FD60: 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(0x00001D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FD64: 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(0x00001D90u); #endif /* 0xBFC1FD68: 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, 0x00001D94u); 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(0x00001D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FD6C: 03E00008 jr $ra */ psx_delay_BFC1FD6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1FD70: AC850000 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001D9Cu); return; } g_debug_last_store_pc = 0x00001D9Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001D9Cu); #endif if (psx_delay_BFC1FD6C) { psx_delay_BFC1FD6C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001DA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001DA0u); int psx_delay_BFC1FD78 = 0; int psx_taken_BFC1FD78 = 0; int psx_delay_BFC1FD90 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FD80u: goto label_BFC1FD80; case 0xBFC1FD90u: goto label_BFC1FD90; default: break; } } label_BFC1FD74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001DA0u); #endif #ifdef PSX_COSIM cosim_block(0x00001DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FD74: 2C830003 sltiu $v1, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00001DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FD78: 10600005 beq $v1, $zero, 0xBFC1FD90 */ uint32_t psx_brA_BFC1FD78 = cpu->gpr[3]; uint32_t psx_brB_BFC1FD78 = cpu->gpr[0]; psx_taken_BFC1FD78 = (psx_brA_BFC1FD78 == psx_brB_BFC1FD78); psx_delay_BFC1FD78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FD7C: 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(0x00001DA8u); #endif if (psx_delay_BFC1FD78) { psx_delay_BFC1FD78 = 0; if (psx_taken_BFC1FD78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001DBCu); goto label_BFC1FD90; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001DACu); } label_BFC1FD80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001DACu); #endif #ifdef PSX_COSIM cosim_block(0x00001DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FD80: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FD84: 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(0x00001DB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FD88: 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(0x00001DB4u); #endif /* 0xBFC1FD8C: 94821100 lhu $v0, 4352($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4352; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4352)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001DB8u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x94821100u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001DB8u); #endif label_BFC1FD90: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001DBCu); #endif #ifdef PSX_COSIM cosim_block(0x00001DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FD90: 03E00008 jr $ra */ psx_delay_BFC1FD90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FD94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001DC0u); #endif if (psx_delay_BFC1FD90) { psx_delay_BFC1FD90 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001DC4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001DC4u); int psx_delay_BFC1FDA0 = 0; int psx_taken_BFC1FDA0 = 0; int psx_delay_BFC1FDDC = 0; int psx_taken_BFC1FDDC = 0; int psx_delay_BFC1FDF0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FDA8u: goto label_BFC1FDA8; case 0xBFC1FDE4u: goto label_BFC1FDE4; case 0xBFC1FDE8u: goto label_BFC1FDE8; case 0xBFC1FDF0u: goto label_BFC1FDF0; default: break; } } label_BFC1FD98: #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, 0x10u); #endif /* 0xBFC1FD98: 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(0x00001DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FD9C: 2C830003 sltiu $v1, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00001DC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FDA0: 10600013 beq $v1, $zero, 0xBFC1FDF0 */ uint32_t psx_brA_BFC1FDA0 = cpu->gpr[3]; uint32_t psx_brB_BFC1FDA0 = cpu->gpr[0]; psx_taken_BFC1FDA0 = (psx_brA_BFC1FDA0 == psx_brB_BFC1FDA0); psx_delay_BFC1FDA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FDA4: 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(0x00001DD0u); #endif if (psx_delay_BFC1FDA0) { psx_delay_BFC1FDA0 = 0; if (psx_taken_BFC1FDA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001E1Cu); goto label_BFC1FDF0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001DD4u); } label_BFC1FDA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001DD4u); #endif #ifdef PSX_COSIM cosim_block(0x00001DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FDA8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001DD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FDAC: 24421100 addiu $v0, $v0, 4352 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (4352)); PGXP_ALU(0x24421100u, cpu->gpr[2], _pgx1, 0x00001100u); } #ifdef PSX_COSIM cosim_instr(0x00001DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FDB0: 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(0x00001DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FDB4: 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(0x00001DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC1FDB8: 30C20010 andi $v0, $a2, 0x10 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] & 0x10u; PGXP_ALU(0x30C20010u, cpu->gpr[2], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00001DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1FDBC: 30C30001 andi $v1, $a2, 0x1 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[6] & 0x1u; PGXP_ALU(0x30C30001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x00001DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FDC0: 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(0x00001DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FDC4: 24420048 addiu $v0, $v0, 72 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (72)); PGXP_ALU(0x24420048u, cpu->gpr[2], _pgx1, 0x00000048u); } #ifdef PSX_COSIM cosim_instr(0x00001DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FDC8: 00031A00 sll $v1, $v1, 8 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 8u; PGXP_ALU(0x00031A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x00001DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1FDCC: 30C61000 andi $a2, $a2, 0x1000 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[6] & 0x1000u; PGXP_ALU(0x30C61000u, cpu->gpr[6], _pgx1, 0x1000u); } #ifdef PSX_COSIM cosim_instr(0x00001DF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1FDD0: A4800004 sh $zero, 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, 0x00001DFCu); return; } g_debug_last_store_pc = 0x00001DFCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4800004u, _pgxa, cpu->gpr[0]); } #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, 0xCu); #endif /* 0xBFC1FDD4: 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(0x00001E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1FDD8: A4850008 sh $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 & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001E04u); return; } g_debug_last_store_pc = 0x00001E04u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } PGXP_STORE(0xA4850008u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC1FDDC: 10C00002 beq $a2, $zero, 0xBFC1FDE8 */ uint32_t psx_brA_BFC1FDDC = cpu->gpr[6]; uint32_t psx_brB_BFC1FDDC = cpu->gpr[0]; psx_taken_BFC1FDDC = (psx_brA_BFC1FDDC == psx_brB_BFC1FDDC); psx_delay_BFC1FDDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FDE0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001E0Cu); #endif if (psx_delay_BFC1FDDC) { psx_delay_BFC1FDDC = 0; if (psx_taken_BFC1FDDC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001E14u); goto label_BFC1FDE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001E10u); } label_BFC1FDE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E10u); #endif #ifdef PSX_COSIM cosim_block(0x00001E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FDE4: 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(0x00001E10u); #endif label_BFC1FDE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E14u); #endif #ifdef PSX_COSIM cosim_block(0x00001E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FDE8: A4820004 sh $v0, 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, 0x00001E14u); return; } g_debug_last_store_pc = 0x00001E14u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FDEC: 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(0x00001E18u); #endif label_BFC1FDF0: #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, 0x80000001u); #endif /* 0xBFC1FDF0: 03E00008 jr $ra */ psx_delay_BFC1FDF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FDF4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001E20u); #endif if (psx_delay_BFC1FDF0) { psx_delay_BFC1FDF0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001E24(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001E24u); int psx_delay_BFC1FE24 = 0; label_BFC1FDF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E24u); #endif #ifdef PSX_COSIM cosim_block(0x00001E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FDF8: 3082FFFF andi $v0, $a0, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] & 0xFFFFu; PGXP_ALU(0x3082FFFFu, cpu->gpr[2], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x00001E24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC1FDFC: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FE00: 00022080 sll $a0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = cpu->gpr[2] << 2u; PGXP_ALU(0x00022080u, cpu->gpr[4], _pgx1, 2u); } #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, 0x20u); #endif /* 0xBFC1FE04: 24A5A2CC addiu $a1, $a1, -23860 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23860)); PGXP_ALU(0x24A5A2CCu, cpu->gpr[5], _pgx1, 0xFFFFA2CCu); } #ifdef PSX_COSIM cosim_instr(0x00001E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC1FE08: 3C06BF80 lui $a2, 0xBF80 */ cpu->gpr[6] = 0xBF800000u; PGXP_ALU(0x3C06BF80u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC1FE0C: 00852021 addu $a0, $a0, $a1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[5]; PGXP_ALU(0x00852021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001E38u); #endif /* 0xBFC1FE10: 8CC31074 lw $v1, 4212($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E3Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } PGXP_LOAD(0x8CC31074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E40u); #endif /* 0xBFC1FE14: 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, 0x00001E40u); 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(0x00001E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FE18: 2C420003 sltiu $v0, $v0, 3 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C420003u, cpu->gpr[2], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00001E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FE1C: 00641825 or $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(0x00641825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC1FE20: ACC31074 sw $v1, 4212($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E4Cu); return; } g_debug_last_store_pc = 0x00001E4Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC31074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FE24: 03E00008 jr $ra */ psx_delay_BFC1FE24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FE28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001E54u); #endif if (psx_delay_BFC1FE24) { psx_delay_BFC1FE24 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001E58(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001E58u); int psx_delay_BFC1FE58 = 0; label_BFC1FE2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E58u); #endif #ifdef PSX_COSIM cosim_block(0x00001E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FE2C: 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(0x00001E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FE30: 3C02BFC1 lui $v0, 0xBFC1 */ cpu->gpr[2] = 0xBFC10000u; PGXP_ALU(0x3C02BFC1u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FE34: 2442A2CC addiu $v0, $v0, -23860 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-23860)); PGXP_ALU(0x2442A2CCu, cpu->gpr[2], _pgx1, 0xFFFFA2CCu); } #ifdef PSX_COSIM cosim_instr(0x00001E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FE38: 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(0x00001E64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FE3C: 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(0x00001E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FE40: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E70u); #endif /* 0xBFC1FE44: 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, 0x00001E70u); 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(0x00001E70u); #endif /* 0xBFC1FE48: 8C651074 lw $a1, 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, 0x00001E74u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C651074u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00001E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FE4C: 00021027 nor $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(0x00021027u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1FE50: 00451024 and $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] & cpu->gpr[5]; PGXP_ALU(0x00451024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FE54: AC621074 sw $v0, 4212($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001E80u); return; } g_debug_last_store_pc = 0x00001E80u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00001E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FE58: 03E00008 jr $ra */ psx_delay_BFC1FE58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FE5C: 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(0x00001E88u); #endif if (psx_delay_BFC1FE58) { psx_delay_BFC1FE58 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001E8C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001E8Cu); int psx_delay_BFC1FE68 = 0; int psx_taken_BFC1FE68 = 0; int psx_delay_BFC1FE84 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FE70u: goto label_BFC1FE70; case 0xBFC1FE84u: goto label_BFC1FE84; default: break; } } label_BFC1FE60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E8Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FE60: 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(0x00001E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FE64: 2C830003 sltiu $v1, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[4] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C830003u, cpu->gpr[3], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00001E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FE68: 10600006 beq $v1, $zero, 0xBFC1FE84 */ uint32_t psx_brA_BFC1FE68 = cpu->gpr[3]; uint32_t psx_brB_BFC1FE68 = cpu->gpr[0]; psx_taken_BFC1FE68 = (psx_brA_BFC1FE68 == psx_brB_BFC1FE68); psx_delay_BFC1FE68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FE6C: 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(0x00001E98u); #endif if (psx_delay_BFC1FE68) { psx_delay_BFC1FE68 = 0; if (psx_taken_BFC1FE68) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB0u); goto label_BFC1FE84; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001E9Cu); } label_BFC1FE70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001E9Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001E9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FE70: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0x10u); #endif /* 0xBFC1FE74: 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(0x00001EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FE78: 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(0x00001EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1FE7C: A4801100 sh $zero, 4352($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4352; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4352)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00001EA8u); return; } g_debug_last_store_pc = 0x00001EA8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA4801100u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00001EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FE80: 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(0x00001EACu); #endif label_BFC1FE84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001EB0u); #endif #ifdef PSX_COSIM cosim_block(0x00001EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FE84: 03E00008 jr $ra */ psx_delay_BFC1FE84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FE88: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001EB4u); #endif if (psx_delay_BFC1FE84) { psx_delay_BFC1FE84 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001EB8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001EB8u); int psx_delay_BFC1FEA8 = 0; label_BFC1FE8C: #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, 0x4u); #endif /* 0xBFC1FE8C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001EB8u); #endif /* 0xBFC1FE90: 8C420100 lw $v0, 256($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EBCu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420100u, _pgxa, cpu->gpr[2]); } #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, 0x10u); #endif /* 0xBFC1FE94: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x00001EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FE98: 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(0x00001EC4u); #endif /* 0xBFC1FE9C: 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, 0x00001EC8u); 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(0x00001EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1FEA0: 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, 0x00001ECCu); return; } g_debug_last_store_pc = 0x00001ECCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC450000u, _pgxa, cpu->gpr[5]); } #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, 0x28u); #endif /* 0xBFC1FEA4: ACA30000 sw $v1, 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, 0x00001ED0u); return; } g_debug_last_store_pc = 0x00001ED0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FEA8: 03E00008 jr $ra */ psx_delay_BFC1FEA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FEAC: 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(0x00001ED8u); #endif if (psx_delay_BFC1FEA8) { psx_delay_BFC1FEA8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00001EDC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001EDCu); int psx_delay_BFC1FEC8 = 0; int psx_taken_BFC1FEC8 = 0; int psx_delay_BFC1FED0 = 0; int psx_taken_BFC1FED0 = 0; int psx_delay_BFC1FEDC = 0; int psx_delay_BFC1FEEC = 0; int psx_taken_BFC1FEEC = 0; int psx_delay_BFC1FEF8 = 0; int psx_delay_BFC1FF08 = 0; int psx_taken_BFC1FF08 = 0; int psx_delay_BFC1FF14 = 0; int psx_taken_BFC1FF14 = 0; int psx_delay_BFC1FF28 = 0; int psx_delay_BFC1FF30 = 0; int psx_taken_BFC1FF30 = 0; int psx_delay_BFC1FF38 = 0; int psx_taken_BFC1FF38 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FED0u: goto label_BFC1FED0; case 0xBFC1FED8u: goto label_BFC1FED8; case 0xBFC1FEE4u: goto label_BFC1FEE4; case 0xBFC1FEF4u: goto label_BFC1FEF4; case 0xBFC1FEF8u: goto label_BFC1FEF8; case 0xBFC1FF00u: goto label_BFC1FF00; case 0xBFC1FF10u: goto label_BFC1FF10; case 0xBFC1FF14u: goto label_BFC1FF14; case 0xBFC1FF1Cu: goto label_BFC1FF1C; case 0xBFC1FF30u: goto label_BFC1FF30; case 0xBFC1FF38u: goto label_BFC1FF38; default: break; } } label_BFC1FEB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001EDCu); #endif #ifdef PSX_COSIM cosim_block(0x00001EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FEB0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001EDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001EE0u); #endif /* 0xBFC1FEB4: 8C430100 lw $v1, 256($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 256; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (256)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001EE0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430100u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FEB8: 000420C0 sll $a0, $a0, 3 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 3u; PGXP_ALU(0x000420C0u, cpu->gpr[4], _pgx1, 3u); } #ifdef PSX_COSIM cosim_instr(0x00001EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FEBC: 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(0x00001EE8u); #endif /* 0xBFC1FEC0: 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, 0x00001EECu); 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(0x00001EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FEC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FEC8: 1040000B beq $v0, $zero, 0xBFC1FEF8 */ uint32_t psx_brA_BFC1FEC8 = cpu->gpr[2]; uint32_t psx_brB_BFC1FEC8 = cpu->gpr[0]; psx_taken_BFC1FEC8 = (psx_brA_BFC1FEC8 == psx_brB_BFC1FEC8); psx_delay_BFC1FEC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FECC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001EF8u); #endif if (psx_delay_BFC1FEC8) { psx_delay_BFC1FEC8 = 0; if (psx_taken_BFC1FEC8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F24u); goto label_BFC1FEF8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EFCu); } label_BFC1FED0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001EFCu); #endif #ifdef PSX_COSIM cosim_block(0x00001EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001EFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC1FED0: 14450004 bne $v0, $a1, 0xBFC1FEE4 */ uint32_t psx_brA_BFC1FED0 = cpu->gpr[2]; uint32_t psx_brB_BFC1FED0 = cpu->gpr[5]; psx_taken_BFC1FED0 = (psx_brA_BFC1FED0 != psx_brB_BFC1FED0); psx_delay_BFC1FED0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FED4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F00u); #endif if (psx_delay_BFC1FED0) { psx_delay_BFC1FED0 = 0; if (psx_taken_BFC1FED0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F10u); goto label_BFC1FEE4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F04u); } label_BFC1FED8: #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 /* 0xBFC1FED8: 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, 0x00001F04u); 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(0x00001F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FEDC: 03E00008 jr $ra */ psx_delay_BFC1FEDC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FEE0: 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, 0x00001F0Cu); return; } g_debug_last_store_pc = 0x00001F0Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001F0Cu); #endif if (psx_delay_BFC1FEDC) { psx_delay_BFC1FEDC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FEE4: #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 /* 0xBFC1FEE4: 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, 0x00001F10u); 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(0x00001F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FEE8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FEEC: 14600009 bne $v1, $zero, 0xBFC1FF14 */ uint32_t psx_brA_BFC1FEEC = cpu->gpr[3]; uint32_t psx_brB_BFC1FEEC = cpu->gpr[0]; psx_taken_BFC1FEEC = (psx_brA_BFC1FEEC != psx_brB_BFC1FEEC); psx_delay_BFC1FEEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FEF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F1Cu); #endif if (psx_delay_BFC1FEEC) { psx_delay_BFC1FEEC = 0; if (psx_taken_BFC1FEEC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F40u); goto label_BFC1FF14; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F20u); } label_BFC1FEF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F20u); #endif #ifdef PSX_COSIM cosim_block(0x00001F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC1FEF4: 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(0x00001F20u); #endif label_BFC1FEF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F24u); #endif #ifdef PSX_COSIM cosim_block(0x00001F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FEF8: 03E00008 jr $ra */ psx_delay_BFC1FEF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FEFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F28u); #endif if (psx_delay_BFC1FEF8) { psx_delay_BFC1FEF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FF00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F2Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F2Cu); #endif /* 0xBFC1FF00: 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, 0x00001F2Cu); 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(0x00001F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC1FF08: 10800009 beq $a0, $zero, 0xBFC1FF30 */ uint32_t psx_brA_BFC1FF08 = cpu->gpr[4]; uint32_t psx_brB_BFC1FF08 = cpu->gpr[0]; psx_taken_BFC1FF08 = (psx_brA_BFC1FF08 == psx_brB_BFC1FF08); psx_delay_BFC1FF08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC1FF0C: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001F38u); #endif if (psx_delay_BFC1FF08) { psx_delay_BFC1FF08 = 0; if (psx_taken_BFC1FF08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F5Cu); goto label_BFC1FF30; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F3Cu); } label_BFC1FF10: #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, 0x19u); #endif /* 0xBFC1FF10: 00801825 or $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(0x00801825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001F3Cu); #endif label_BFC1FF14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F40u); #endif #ifdef PSX_COSIM cosim_block(0x00001F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1FF14: 14A3FFFA bne $a1, $v1, 0xBFC1FF00 */ uint32_t psx_brA_BFC1FF14 = cpu->gpr[5]; uint32_t psx_brB_BFC1FF14 = cpu->gpr[3]; psx_taken_BFC1FF14 = (psx_brA_BFC1FF14 != psx_brB_BFC1FF14); psx_delay_BFC1FF14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F44u); #endif if (psx_delay_BFC1FF14) { psx_delay_BFC1FF14 = 0; if (psx_taken_BFC1FF14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F2Cu); goto label_BFC1FF00; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F48u); } label_BFC1FF1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F48u); #endif #ifdef PSX_COSIM cosim_block(0x00001F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F48u); #endif /* 0xBFC1FF1C: 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, 0x00001F48u); 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(0x00001F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF20: 00000000 nop */ /* nop */ #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, 0x14u); #endif /* 0xBFC1FF24: 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, 0x00001F50u); return; } g_debug_last_store_pc = 0x00001F50u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC1FF28: 03E00008 jr $ra */ psx_delay_BFC1FF28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC1FF2C: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00001F58u); #endif if (psx_delay_BFC1FF28) { psx_delay_BFC1FF28 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC1FF30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F5Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FF30: 14A0FFF0 bne $a1, $zero, 0xBFC1FEF4 */ uint32_t psx_brA_BFC1FF30 = cpu->gpr[5]; uint32_t psx_brB_BFC1FF30 = cpu->gpr[0]; psx_taken_BFC1FF30 = (psx_brA_BFC1FF30 != psx_brB_BFC1FF30); psx_delay_BFC1FF30 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F60u); #endif if (psx_delay_BFC1FF30) { psx_delay_BFC1FF30 = 0; if (psx_taken_BFC1FF30) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F20u); goto label_BFC1FEF4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F64u); } label_BFC1FF38: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F64u); #endif #ifdef PSX_COSIM cosim_block(0x00001F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF38: 1000FFF8 beq $zero, $zero, 0xBFC1FF1C */ uint32_t psx_brA_BFC1FF38 = cpu->gpr[0]; uint32_t psx_brB_BFC1FF38 = cpu->gpr[0]; psx_taken_BFC1FF38 = (psx_brA_BFC1FF38 == psx_brB_BFC1FF38); psx_delay_BFC1FF38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FF3C: 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(0x00001F68u); #endif if (psx_delay_BFC1FF38) { psx_delay_BFC1FF38 = 0; if (psx_taken_BFC1FF38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F48u); goto label_BFC1FF1C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F6Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F6Cu); cpu->pc = 0x00001F6Cu; return; /* fallthrough */ } void OpenBIOS_func_00001F6C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00001F6Cu); int psx_delay_BFC1FF60 = 0; int psx_taken_BFC1FF60 = 0; int psx_delay_BFC1FF70 = 0; int psx_taken_BFC1FF70 = 0; int psx_delay_BFC1FF90 = 0; int psx_taken_BFC1FF90 = 0; int psx_delay_BFC1FF98 = 0; int psx_taken_BFC1FF98 = 0; int psx_delay_BFC1FFA0 = 0; int psx_taken_BFC1FFA0 = 0; int psx_delay_BFC1FFA8 = 0; int psx_delay_BFC1FFB4 = 0; int psx_taken_BFC1FFB4 = 0; int psx_delay_BFC1FFC0 = 0; int psx_delay_BFC1FFC8 = 0; int psx_taken_BFC1FFC8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FFA8u: goto label_BFC1FFA8; case 0xBFC1FF68u: goto label_BFC1FF68; case 0xBFC1FF78u: goto label_BFC1FF78; case 0xBFC1FF98u: goto label_BFC1FF98; case 0xBFC1FFA0u: goto label_BFC1FFA0; case 0xBFC1FFB0u: goto label_BFC1FFB0; case 0xBFC1FFBCu: goto label_BFC1FFBC; case 0xBFC1FFC8u: goto label_BFC1FFC8; case 0xBFC1FFD0u: goto label_BFC1FFD0; default: break; } } label_BFC1FF40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F6Cu); #endif #ifdef PSX_COSIM cosim_block(0x00001F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC1FF40: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F70u); #endif /* 0xBFC1FF44: 8C440108 lw $a0, 264($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 264; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (264)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001F70u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C440108u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F74u); #endif /* 0xBFC1FF4C: 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, 0x00001F78u); 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(0x00001F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF50: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F80u); #endif /* 0xBFC1FF54: 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, 0x00001F80u); 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(0x00001F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FF5C: 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(0x00001F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FF60: 10600039 beq $v1, $zero, 0xBFC20048 */ uint32_t psx_brA_BFC1FF60 = cpu->gpr[3]; uint32_t psx_brB_BFC1FF60 = cpu->gpr[0]; psx_taken_BFC1FF60 = (psx_brA_BFC1FF60 == psx_brB_BFC1FF60); psx_delay_BFC1FF60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001F90u); #endif if (psx_delay_BFC1FF60) { psx_delay_BFC1FF60 = 0; if (psx_taken_BFC1FF60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002074u); cpu->pc = 0x00002074u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001F94u); } label_BFC1FF68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001F94u); #endif #ifdef PSX_COSIM cosim_block(0x00001F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC1FF68: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00001F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FF6C: 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(0x00001F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1FF70: 1465002C bne $v1, $a1, 0xBFC20024 */ uint32_t psx_brA_BFC1FF70 = cpu->gpr[3]; uint32_t psx_brB_BFC1FF70 = cpu->gpr[5]; psx_taken_BFC1FF70 = (psx_brA_BFC1FF70 != psx_brB_BFC1FF70); psx_delay_BFC1FF70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC1FF74: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00001FA0u); return; } g_debug_last_store_pc = 0x00001FA0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00001FA0u); #endif if (psx_delay_BFC1FF70) { psx_delay_BFC1FF70 = 0; if (psx_taken_BFC1FF70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002050u); cpu->pc = 0x00002050u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FA4u); } label_BFC1FF78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001FA4u); #endif #ifdef PSX_COSIM cosim_block(0x00001FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FA4u); #endif /* 0xBFC1FF78: 8C430088 lw $v1, 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, 0x00001FA4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430088u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FF7C: 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(0x00001FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FF80: 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(0x00001FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FF84: AC430088 sw $v1, 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, 0x00001FB0u); return; } g_debug_last_store_pc = 0x00001FB0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430088u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00001FB0u); #endif /* 0xBFC1FF88: 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, 0x00001FB4u); 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(0x00001FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1FF90: 10650019 beq $v1, $a1, 0xBFC1FFF8 */ uint32_t psx_brA_BFC1FF90 = cpu->gpr[3]; uint32_t psx_brB_BFC1FF90 = cpu->gpr[5]; psx_taken_BFC1FF90 = (psx_brA_BFC1FF90 == psx_brB_BFC1FF90); psx_delay_BFC1FF90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1FF94: 2C650003 sltiu $a1, $v1, 3 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x00000003u ? 1 : 0); PGXP_ALU(0x2C650003u, cpu->gpr[5], _pgx1, 0x0003u); } #ifdef PSX_COSIM cosim_instr(0x00001FC0u); #endif if (psx_delay_BFC1FF90) { psx_delay_BFC1FF90 = 0; if (psx_taken_BFC1FF90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002024u); cpu->pc = 0x00002024u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FC4u); } label_BFC1FF98: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001FC4u); #endif #ifdef PSX_COSIM cosim_block(0x00001FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FF98: 10A00005 beq $a1, $zero, 0xBFC1FFB0 */ uint32_t psx_brA_BFC1FF98 = cpu->gpr[5]; uint32_t psx_brB_BFC1FF98 = cpu->gpr[0]; psx_taken_BFC1FF98 = (psx_brA_BFC1FF98 == psx_brB_BFC1FF98); psx_delay_BFC1FF98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FF9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001FC8u); #endif if (psx_delay_BFC1FF98) { psx_delay_BFC1FF98 = 0; if (psx_taken_BFC1FF98) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FDCu); goto label_BFC1FFB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FCCu); } label_BFC1FFA0: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FFA0: 1460000B bne $v1, $zero, 0xBFC1FFD0 */ uint32_t psx_brA_BFC1FFA0 = cpu->gpr[3]; uint32_t psx_brB_BFC1FFA0 = cpu->gpr[0]; psx_taken_BFC1FFA0 = (psx_brA_BFC1FFA0 != psx_brB_BFC1FFA0); psx_delay_BFC1FFA0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFA4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001FD0u); #endif if (psx_delay_BFC1FFA0) { psx_delay_BFC1FFA0 = 0; if (psx_taken_BFC1FFA0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FFCu); goto label_BFC1FFD0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FD4u); } label_BFC1FFA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001FD4u); #endif #ifdef PSX_COSIM cosim_block(0x00001FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FFA8: 0C000A73 jal 0xB00029CC */ cpu->gpr[31] = 0x00001FDCu; /* jal link before delay slot */ psx_delay_BFC1FFA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFAC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001FD8u); #endif if (psx_delay_BFC1FFA8) { psx_delay_BFC1FFA8 = 0; cpu->gpr[31] = 0x00001FDCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000029CCu); cpu->pc = 0x000029CCu; return; } label_BFC1FFB0: #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, 0x21u); #endif /* 0xBFC1FFB0: 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(0x00001FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC1FFB4: 10650015 beq $v1, $a1, 0xBFC2000C */ uint32_t psx_brA_BFC1FFB4 = cpu->gpr[3]; uint32_t psx_brB_BFC1FFB4 = cpu->gpr[5]; psx_taken_BFC1FFB4 = (psx_brA_BFC1FFB4 == psx_brB_BFC1FFB4); psx_delay_BFC1FFB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC1FFB8: 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(0x00001FE4u); #endif if (psx_delay_BFC1FFB4) { psx_delay_BFC1FFB4 = 0; if (psx_taken_BFC1FFB4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002038u); cpu->pc = 0x00002038u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FE8u); } label_BFC1FFBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001FE8u); #endif #ifdef PSX_COSIM cosim_block(0x00001FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FFBC: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00001FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC1FFC0: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00001FF4u; /* jal link before delay slot */ psx_delay_BFC1FFC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC1FFC4: 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(0x00001FF0u); #endif if (psx_delay_BFC1FFC0) { psx_delay_BFC1FFC0 = 0; cpu->gpr[31] = 0x00001FF4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC1FFC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00001FF4u); #endif #ifdef PSX_COSIM cosim_block(0x00001FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00001FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFC8: 1000FFF7 beq $zero, $zero, 0xBFC1FFA8 */ 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, 0x1u); #endif /* 0xBFC1FFCC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00001FF8u); #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, 0x00001FD4u); goto label_BFC1FFA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FFCu); } label_BFC1FFD0: #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 /* 0xBFC1FFD0: 8C440094 lw $a0, 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, 0x00001FFCu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x4u); } PGXP_LOAD(0x8C440094u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00001FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002000u); cpu->pc = 0x00002000u; return; /* fallthrough */ } void OpenBIOS_func_00002000(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002000u); label_BFC1FFD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002000u); #endif #ifdef PSX_COSIM cosim_block(0x00002000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFD4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002004u); cpu->pc = 0x00002004u; return; /* fallthrough */ } void OpenBIOS_func_00002004(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002004u); label_BFC1FFD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002004u); #endif #ifdef PSX_COSIM cosim_block(0x00002004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FFD8: 30830404 andi $v1, $a0, 0x404 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = cpu->gpr[4] & 0x404u; PGXP_ALU(0x30830404u, cpu->gpr[3], _pgx1, 0x0404u); } #ifdef PSX_COSIM cosim_instr(0x00002004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002008u); cpu->pc = 0x00002008u; return; /* fallthrough */ } void OpenBIOS_func_00002008(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002008u); label_BFC1FFDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002008u); #endif #ifdef PSX_COSIM cosim_block(0x00002008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC1FFDC: 38630404 xori $v1, $v1, 0x404 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] ^ 0x404u; PGXP_ALU(0x38630404u, cpu->gpr[3], _pgx1, 0x0404u); } #ifdef PSX_COSIM cosim_instr(0x00002008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000200Cu); cpu->pc = 0x0000200Cu; return; /* fallthrough */ } void OpenBIOS_func_0000200C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000200Cu); label_BFC1FFE0: #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, 0x8u); #endif /* 0xBFC1FFE0: 2C630001 sltiu $v1, $v1, 1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000001u ? 1 : 0); PGXP_ALU(0x2C630001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x0000200Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002010u); cpu->pc = 0x00002010u; return; /* fallthrough */ } void OpenBIOS_func_00002010(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002010u); label_BFC1FFE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002010u); #endif #ifdef PSX_COSIM cosim_block(0x00002010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC1FFE4: AC430010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002010u); return; } g_debug_last_store_pc = 0x00002010u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002014u); cpu->pc = 0x00002014u; return; /* fallthrough */ } void OpenBIOS_func_00002014(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002014u); int psx_delay_BFC1FFF0 = 0; int psx_taken_BFC1FFF0 = 0; label_BFC1FFE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002014u); #endif #ifdef PSX_COSIM cosim_block(0x00002014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC1FFE8: 2403FBFB addiu $v1, $zero, -1029 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-1029)); PGXP_ALU(0x2403FBFBu, cpu->gpr[3], _pgx1, 0xFFFFFBFBu); } #ifdef PSX_COSIM cosim_instr(0x00002014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC1FFEC: 00832024 and $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3]; PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFF0: 1000FFED beq $zero, $zero, 0xBFC1FFA8 */ uint32_t psx_brA_BFC1FFF0 = cpu->gpr[0]; uint32_t psx_brB_BFC1FFF0 = cpu->gpr[0]; psx_taken_BFC1FFF0 = (psx_brA_BFC1FFF0 == psx_brB_BFC1FFF0); /* DELAY (orphaned) 0xBFC1FFF4: AC440094 sw $a0, 148($v0) */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif { 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, 0x00002020u); return; } g_debug_last_store_pc = 0x00002020u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440094u, _pgxa, cpu->gpr[4]); } if (psx_taken_BFC1FFF0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FD4u); cpu->pc = 0x00001FD4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002024u); cpu->pc = 0x00002024u; return; } void OpenBIOS_func_00002020(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002020u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC1FFF8u: goto label_BFC1FFF8; default: break; } } label_BFC1FFF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002020u); #endif #ifdef PSX_COSIM cosim_block(0x00002020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC1FFF4: AC440094 sw $a0, 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, 0x00002020u); return; } g_debug_last_store_pc = 0x00002020u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440094u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002020u); #endif label_BFC1FFF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002024u); #endif #ifdef PSX_COSIM cosim_block(0x00002024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002024u); #endif /* 0xBFC1FFF8: 8C430094 lw $v1, 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, 0x00002024u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C430094u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC1FFFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20000: 34630404 ori $v1, $v1, 0x404 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x404u; PGXP_ALU(0x34630404u, cpu->gpr[3], _pgx1, 0x0404u); } #ifdef PSX_COSIM cosim_instr(0x0000202Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002030u); cpu->pc = 0x00002030u; return; /* fallthrough */ } void OpenBIOS_func_00002030(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002030u); int psx_delay_BFC20004 = 0; int psx_taken_BFC20004 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2000Cu: goto label_BFC2000C; default: break; } } label_BFC20004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002030u); #endif #ifdef PSX_COSIM cosim_block(0x00002030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20004: 1000FFE8 beq $zero, $zero, 0xBFC1FFA8 */ uint32_t psx_brA_BFC20004 = cpu->gpr[0]; uint32_t psx_brB_BFC20004 = cpu->gpr[0]; psx_taken_BFC20004 = (psx_brA_BFC20004 == psx_brB_BFC20004); psx_delay_BFC20004 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20008: AC430094 sw $v1, 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, 0x00002034u); return; } g_debug_last_store_pc = 0x00002034u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430094u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002034u); #endif if (psx_delay_BFC20004) { psx_delay_BFC20004 = 0; if (psx_taken_BFC20004) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FD4u); cpu->pc = 0x00001FD4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002038u); } label_BFC2000C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002038u); #endif #ifdef PSX_COSIM cosim_block(0x00002038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002038u); #endif /* 0xBFC2000C: 8C43001C lw $v1, 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, 0x00002038u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C43001Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000203Cu); cpu->pc = 0x0000203Cu; return; /* fallthrough */ } void OpenBIOS_func_0000203C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000203Cu); label_BFC20010: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20010: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000203Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002040u); cpu->pc = 0x00002040u; return; /* fallthrough */ } void OpenBIOS_func_00002040(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002040u); label_BFC20014: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002040u); #endif #ifdef PSX_COSIM cosim_block(0x00002040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20014: AC830000 sw $v1, 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, 0x00002040u); return; } g_debug_last_store_pc = 0x00002040u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002044u); cpu->pc = 0x00002044u; return; /* fallthrough */ } void OpenBIOS_func_00002044(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002044u); int psx_delay_BFC2001C = 0; int psx_taken_BFC2001C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20024u: goto label_BFC20024; default: break; } } label_BFC20018: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002044u); #endif #ifdef PSX_COSIM cosim_block(0x00002044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20018: 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(0x00002044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2001C: 1000FFE2 beq $zero, $zero, 0xBFC1FFA8 */ uint32_t psx_brA_BFC2001C = cpu->gpr[0]; uint32_t psx_brB_BFC2001C = cpu->gpr[0]; psx_taken_BFC2001C = (psx_brA_BFC2001C == psx_brB_BFC2001C); psx_delay_BFC2001C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20020: AC430010 sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000204Cu); return; } g_debug_last_store_pc = 0x0000204Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430010u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000204Cu); #endif if (psx_delay_BFC2001C) { psx_delay_BFC2001C = 0; if (psx_taken_BFC2001C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001FD4u); cpu->pc = 0x00001FD4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002050u); } label_BFC20024: #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, 0x10u); #endif /* 0xBFC20024: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20028: 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(0x00002054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002058u); cpu->pc = 0x00002058u; return; /* fallthrough */ } void OpenBIOS_func_00002058(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002058u); int psx_delay_BFC2002C = 0; label_BFC2002C: #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, 0x80000000u); #endif /* 0xBFC2002C: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00002060u; /* jal link before delay slot */ psx_delay_BFC2002C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20030: 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(0x0000205Cu); #endif if (psx_delay_BFC2002C) { psx_delay_BFC2002C = 0; cpu->gpr[31] = 0x00002060u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } } void OpenBIOS_func_00002060(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002060u); int psx_delay_BFC20040 = 0; label_BFC20034: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002060u); #endif #ifdef PSX_COSIM cosim_block(0x00002060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC20034: 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(0x00002060u); #endif /* 0xBFC20038: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002064u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC2003C: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0x00002068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC20040: 03200008 jr $t9 */ { uint32_t _t = cpu->gpr[25]; /* DELAY (orphaned) 0xBFC20044: 27BD0018 addiu $sp, $sp, 24 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } void OpenBIOS_func_00002070(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002070u); int psx_delay_BFC20048 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20048u: goto label_BFC20048; default: break; } } label_BFC20044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002070u); #endif #ifdef PSX_COSIM cosim_block(0x00002070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20044: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00002070u); #endif label_BFC20048: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002074u); #endif #ifdef PSX_COSIM cosim_block(0x00002074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20048: 03E00008 jr $ra */ psx_delay_BFC20048 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2004C: 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(0x00002078u); #endif if (psx_delay_BFC20048) { psx_delay_BFC20048 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_0000207C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000207Cu); int psx_delay_BFC20054 = 0; label_BFC20050: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000207Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000207Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000207Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20050: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #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, 0x0u); #endif /* 0xBFC20054: 080007AE j 0xB0001EB8 */ psx_delay_BFC20054 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20058: 24A5463C addiu $a1, $a1, 17980 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (17980)); PGXP_ALU(0x24A5463Cu, cpu->gpr[5], _pgx1, 0x0000463Cu); } #ifdef PSX_COSIM cosim_instr(0x00002084u); #endif if (psx_delay_BFC20054) { psx_delay_BFC20054 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } } void OpenBIOS_func_00002088(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002088u); int psx_delay_BFC2005C = 0; int psx_taken_BFC2005C = 0; int psx_delay_BFC20090 = 0; int psx_taken_BFC20090 = 0; int psx_delay_BFC20098 = 0; int psx_taken_BFC20098 = 0; int psx_delay_BFC200A0 = 0; int psx_taken_BFC200A0 = 0; int psx_delay_BFC200B0 = 0; int psx_taken_BFC200B0 = 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_delay_BFC200E0 = 0; int psx_taken_BFC200E0 = 0; int psx_delay_BFC200F4 = 0; int psx_taken_BFC200F4 = 0; int psx_delay_BFC200FC = 0; int psx_taken_BFC200FC = 0; int psx_delay_BFC20110 = 0; int psx_taken_BFC20110 = 0; int psx_delay_BFC20128 = 0; int psx_taken_BFC20128 = 0; int psx_delay_BFC20130 = 0; int psx_taken_BFC20130 = 0; int psx_delay_BFC2013C = 0; int psx_taken_BFC2013C = 0; int psx_delay_BFC20144 = 0; int psx_taken_BFC20144 = 0; int psx_delay_BFC20158 = 0; int psx_taken_BFC20158 = 0; int psx_delay_BFC20160 = 0; int psx_taken_BFC20160 = 0; int psx_delay_BFC20168 = 0; int psx_taken_BFC20168 = 0; int psx_delay_BFC20174 = 0; int psx_taken_BFC20174 = 0; int psx_delay_BFC2017C = 0; int psx_taken_BFC2017C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20064u: goto label_BFC20064; case 0xBFC20070u: goto label_BFC20070; case 0xBFC20090u: goto label_BFC20090; case 0xBFC20098u: goto label_BFC20098; case 0xBFC200A0u: goto label_BFC200A0; case 0xBFC200A8u: goto label_BFC200A8; case 0xBFC200B8u: goto label_BFC200B8; case 0xBFC200C0u: goto label_BFC200C0; case 0xBFC200C8u: goto label_BFC200C8; case 0xBFC200CCu: goto label_BFC200CC; case 0xBFC200D4u: goto label_BFC200D4; case 0xBFC200DCu: goto label_BFC200DC; case 0xBFC200E8u: goto label_BFC200E8; case 0xBFC200FCu: goto label_BFC200FC; case 0xBFC20104u: goto label_BFC20104; case 0xBFC20118u: goto label_BFC20118; case 0xBFC2011Cu: goto label_BFC2011C; case 0xBFC20130u: goto label_BFC20130; case 0xBFC20138u: goto label_BFC20138; case 0xBFC20144u: goto label_BFC20144; case 0xBFC2014Cu: goto label_BFC2014C; case 0xBFC20160u: goto label_BFC20160; case 0xBFC20168u: goto label_BFC20168; case 0xBFC20170u: goto label_BFC20170; case 0xBFC2017Cu: goto label_BFC2017C; default: break; } } label_BFC2005C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002088u); #endif #ifdef PSX_COSIM cosim_block(0x00002088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC2005C: 14A0001F bne $a1, $zero, 0xBFC200DC */ uint32_t psx_brA_BFC2005C = cpu->gpr[5]; uint32_t psx_brB_BFC2005C = cpu->gpr[0]; psx_taken_BFC2005C = (psx_brA_BFC2005C != psx_brB_BFC2005C); psx_delay_BFC2005C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20060: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000208Cu); #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, 0x00002108u); goto label_BFC200DC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002090u); } label_BFC20064: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002090u); #endif #ifdef PSX_COSIM cosim_block(0x00002090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20064: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002090u); #endif /* 0xBFC20068: 8C436544 lw $v1, 25924($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002094u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C436544u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2006C: 2402FFF8 addiu $v0, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2402FFF8u, cpu->gpr[2], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00002098u); #endif label_BFC20070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000209Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000209Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000209Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20070: 2484000F addiu $a0, $a0, 15 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (15)); PGXP_ALU(0x2484000Fu, cpu->gpr[4], _pgx1, 0x0000000Fu); } #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, 0x200u); #endif /* 0xBFC20074: 3C090000 lui $t1, 0x0 */ cpu->gpr[9] = 0x00000000u; PGXP_ALU(0x3C090000u, cpu->gpr[9], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000020A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20078: 00822024 and $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(0x00822024u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000020A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC2007C: 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(0x000020A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC20080: 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(0x000020ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20084: 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(0x000020B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC20088: 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(0x000020B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200u); #endif /* 0xBFC2008C: 25296538 addiu $t1, $t1, 25912 */ { uint32_t _pgx1 = cpu->gpr[9]; cpu->gpr[9] = (uint32_t)((int32_t)cpu->gpr[9] + (25912)); PGXP_ALU(0x25296538u, cpu->gpr[9], _pgx1, 0x00006538u); } #ifdef PSX_COSIM cosim_instr(0x000020B8u); #endif label_BFC20090: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020BCu); #endif #ifdef PSX_COSIM cosim_block(0x000020BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x110u); #endif /* 0xBFC20090: 11040003 beq $t0, $a0, 0xBFC200A0 */ uint32_t psx_brA_BFC20090 = cpu->gpr[8]; uint32_t psx_brB_BFC20090 = cpu->gpr[4]; psx_taken_BFC20090 = (psx_brA_BFC20090 == psx_brB_BFC20090); psx_delay_BFC20090 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20094: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000020C0u); #endif if (psx_delay_BFC20090) { psx_delay_BFC20090 = 0; if (psx_taken_BFC20090) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020CCu); goto label_BFC200A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020C4u); } label_BFC20098: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020C4u); #endif #ifdef PSX_COSIM cosim_block(0x000020C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x208u); #endif /* 0xBFC20098: 14690013 bne $v1, $t1, 0xBFC200E8 */ uint32_t psx_brA_BFC20098 = cpu->gpr[3]; uint32_t psx_brB_BFC20098 = cpu->gpr[9]; psx_taken_BFC20098 = (psx_brA_BFC20098 != psx_brB_BFC20098); psx_delay_BFC20098 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2009C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000020C8u); #endif if (psx_delay_BFC20098) { psx_delay_BFC20098 = 0; if (psx_taken_BFC20098) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002114u); goto label_BFC200E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020CCu); } label_BFC200A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020CCu); #endif #ifdef PSX_COSIM cosim_block(0x000020CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC200A0: 1040000C beq $v0, $zero, 0xBFC200D4 */ uint32_t psx_brA_BFC200A0 = cpu->gpr[2]; uint32_t psx_brB_BFC200A0 = cpu->gpr[0]; psx_taken_BFC200A0 = (psx_brA_BFC200A0 == psx_brB_BFC200A0); psx_delay_BFC200A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC200A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000020D0u); #endif if (psx_delay_BFC200A0) { psx_delay_BFC200A0 = 0; if (psx_taken_BFC200A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002100u); goto label_BFC200D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020D4u); } label_BFC200A8: #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 /* 0xBFC200A8: 8C470004 lw $a3, 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, 0x000020D4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x4u); } PGXP_LOAD(0x8C470004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000020D4u); #endif /* 0xBFC200AC: 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, 0x000020D8u); 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(0x000020D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC200B0: 14870026 bne $a0, $a3, 0xBFC2014C */ uint32_t psx_brA_BFC200B0 = cpu->gpr[4]; uint32_t psx_brB_BFC200B0 = cpu->gpr[7]; psx_taken_BFC200B0 = (psx_brA_BFC200B0 != psx_brB_BFC200B0); psx_delay_BFC200B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC200B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000020E0u); #endif if (psx_delay_BFC200B0) { psx_delay_BFC200B0 = 0; if (psx_taken_BFC200B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002178u); goto label_BFC2014C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020E4u); } label_BFC200B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020E4u); #endif #ifdef PSX_COSIM cosim_block(0x000020E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC200B8: 14C00022 bne $a2, $zero, 0xBFC20144 */ uint32_t psx_brA_BFC200B8 = cpu->gpr[6]; 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, 0x1u); #endif /* 0xBFC200BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000020E8u); #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, 0x00002170u); goto label_BFC20144; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020ECu); } label_BFC200C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020ECu); #endif #ifdef PSX_COSIM cosim_block(0x000020ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC200C0: 14A0001D bne $a1, $zero, 0xBFC20138 */ uint32_t psx_brA_BFC200C0 = cpu->gpr[5]; uint32_t psx_brB_BFC200C0 = cpu->gpr[0]; psx_taken_BFC200C0 = (psx_brA_BFC200C0 != psx_brB_BFC200C0); psx_delay_BFC200C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC200C4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000020F0u); #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, 0x00002164u); goto label_BFC20138; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F4u); } label_BFC200C8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020F4u); #endif #ifdef PSX_COSIM cosim_block(0x000020F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC200C8: AC686544 sw $t0, 25924($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000020F4u); return; } g_debug_last_store_pc = 0x000020F4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC686544u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x000020F4u); #endif label_BFC200CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000020F8u); #endif #ifdef PSX_COSIM cosim_block(0x000020F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000020F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC200CC: 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, 0x000020F8u); return; } g_debug_last_store_pc = 0x000020F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC440004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000020F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC200D0: 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(0x000020FCu); #endif label_BFC200D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002100u); #endif #ifdef PSX_COSIM cosim_block(0x00002100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC200D4: 03E00008 jr $ra */ psx_delay_BFC200D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC200D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002104u); #endif if (psx_delay_BFC200D4) { psx_delay_BFC200D4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC200DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002108u); #endif #ifdef PSX_COSIM cosim_block(0x00002108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002108u); #endif /* 0xBFC200DC: 8C436540 lw $v1, 25920($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25920; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002108u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C436540u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC200E0: 1000FFE3 beq $zero, $zero, 0xBFC20070 */ uint32_t psx_brA_BFC200E0 = cpu->gpr[0]; uint32_t psx_brB_BFC200E0 = cpu->gpr[0]; psx_taken_BFC200E0 = (psx_brA_BFC200E0 == psx_brB_BFC200E0); psx_delay_BFC200E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC200E4: 2402FFF8 addiu $v0, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2402FFF8u, cpu->gpr[2], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00002110u); #endif if (psx_delay_BFC200E0) { psx_delay_BFC200E0 = 0; if (psx_taken_BFC200E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000209Cu); goto label_BFC20070; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002114u); } label_BFC200E8: #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 /* 0xBFC200E8: 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, 0x00002114u); 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(0x00002114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC200EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x510u); #endif /* 0xBFC200F0: 0104502B sltu $t2, $t0, $a0 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0104502Bu, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000211Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC200F4: 15400008 bne $t2, $zero, 0xBFC20118 */ uint32_t psx_brA_BFC200F4 = cpu->gpr[10]; 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, 0x1u); #endif /* 0xBFC200F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002124u); #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, 0x00002144u); goto label_BFC20118; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002128u); } label_BFC200FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002128u); #endif #ifdef PSX_COSIM cosim_block(0x00002128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC200FC: 1040000C beq $v0, $zero, 0xBFC20130 */ uint32_t psx_brA_BFC200FC = cpu->gpr[2]; uint32_t psx_brB_BFC200FC = cpu->gpr[0]; psx_taken_BFC200FC = (psx_brA_BFC200FC == psx_brB_BFC200FC); psx_delay_BFC200FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20100: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000212Cu); #endif if (psx_delay_BFC200FC) { psx_delay_BFC200FC = 0; if (psx_taken_BFC200FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000215Cu); goto label_BFC20130; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002130u); } label_BFC20104: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002130u); #endif #ifdef PSX_COSIM cosim_block(0x00002130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002130u); #endif /* 0xBFC20104: 8C4A0004 lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002130u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x4u); } PGXP_LOAD(0x8C4A0004u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x00002130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20108: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC2010C: 010A502B sltu $t2, $t0, $t2 */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[10]; cpu->gpr[10] = (uint32_t)(cpu->gpr[8] < cpu->gpr[10] ? 1 : 0); PGXP_ALU(0x010A502Bu, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20110: 15400007 bne $t2, $zero, 0xBFC20130 */ uint32_t psx_brA_BFC20110 = cpu->gpr[10]; uint32_t psx_brB_BFC20110 = cpu->gpr[0]; psx_taken_BFC20110 = (psx_brA_BFC20110 != psx_brB_BFC20110); psx_delay_BFC20110 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20114: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002140u); #endif if (psx_delay_BFC20110) { psx_delay_BFC20110 = 0; if (psx_taken_BFC20110) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000215Cu); goto label_BFC20130; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002144u); } label_BFC20118: #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, 0xC1u); #endif /* 0xBFC20118: 00C03825 or $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(0x00C03825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002144u); #endif label_BFC2011C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002148u); #endif #ifdef PSX_COSIM cosim_block(0x00002148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC1u); #endif /* 0xBFC2011C: 00E03025 or $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(0x00E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x89u); #endif /* 0xBFC20120: 00603825 or $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(0x00603825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000214Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002150u); #endif /* 0xBFC20124: 8C630000 lw $v1, 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, 0x00002150u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20128: 1000FFD9 beq $zero, $zero, 0xBFC20090 */ uint32_t psx_brA_BFC20128 = cpu->gpr[0]; uint32_t psx_brB_BFC20128 = cpu->gpr[0]; psx_taken_BFC20128 = (psx_brA_BFC20128 == psx_brB_BFC20128); psx_delay_BFC20128 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2012C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002158u); #endif if (psx_delay_BFC20128) { psx_delay_BFC20128 = 0; if (psx_taken_BFC20128) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020BCu); goto label_BFC20090; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000215Cu); } label_BFC20130: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000215Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000215Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000215Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20130: 1000FFFA beq $zero, $zero, 0xBFC2011C */ uint32_t psx_brA_BFC20130 = cpu->gpr[0]; uint32_t psx_brB_BFC20130 = cpu->gpr[0]; psx_taken_BFC20130 = (psx_brA_BFC20130 == psx_brB_BFC20130); psx_delay_BFC20130 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC20134: 00601025 or $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(0x00601025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002160u); #endif if (psx_delay_BFC20130) { psx_delay_BFC20130 = 0; if (psx_taken_BFC20130) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002148u); goto label_BFC2011C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002164u); } label_BFC20138: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002164u); #endif #ifdef PSX_COSIM cosim_block(0x00002164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20138: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002164u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2013C: 1000FFE3 beq $zero, $zero, 0xBFC200CC */ uint32_t psx_brA_BFC2013C = cpu->gpr[0]; uint32_t psx_brB_BFC2013C = cpu->gpr[0]; psx_taken_BFC2013C = (psx_brA_BFC2013C == psx_brB_BFC2013C); psx_delay_BFC2013C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC20140: AC686540 sw $t0, 25920($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000216Cu); return; } g_debug_last_store_pc = 0x0000216Cu; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC686540u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x0000216Cu); #endif if (psx_delay_BFC2013C) { psx_delay_BFC2013C = 0; if (psx_taken_BFC2013C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F8u); goto label_BFC200CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002170u); } label_BFC20144: #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, 0x1u); #endif /* 0xBFC20144: 1000FFE1 beq $zero, $zero, 0xBFC200CC */ uint32_t psx_brA_BFC20144 = cpu->gpr[0]; uint32_t psx_brB_BFC20144 = cpu->gpr[0]; psx_taken_BFC20144 = (psx_brA_BFC20144 == psx_brB_BFC20144); psx_delay_BFC20144 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC20148: 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, 0x00002174u); return; } g_debug_last_store_pc = 0x00002174u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACC80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002174u); #endif if (psx_delay_BFC20144) { psx_delay_BFC20144 = 0; if (psx_taken_BFC20144) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F8u); goto label_BFC200CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002178u); } label_BFC2014C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002178u); #endif #ifdef PSX_COSIM cosim_block(0x00002178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1Cu); #endif /* 0xBFC2014C: 00441821 addu $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(0x00441821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC20150: 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(0x0000217Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC20154: AC680000 sw $t0, 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, 0x00002180u); return; } g_debug_last_store_pc = 0x00002180u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC680000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC20158: 14C00008 bne $a2, $zero, 0xBFC2017C */ uint32_t psx_brA_BFC20158 = cpu->gpr[6]; uint32_t psx_brB_BFC20158 = cpu->gpr[0]; psx_taken_BFC20158 = (psx_brA_BFC20158 != psx_brB_BFC20158); psx_delay_BFC20158 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC2015C: 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, 0x00002188u); return; } g_debug_last_store_pc = 0x00002188u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC670004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002188u); #endif if (psx_delay_BFC20158) { psx_delay_BFC20158 = 0; if (psx_taken_BFC20158) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021A8u); goto label_BFC2017C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000218Cu); } label_BFC20160: #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, 0x21u); #endif /* 0xBFC20160: 14A00003 bne $a1, $zero, 0xBFC20170 */ uint32_t psx_brA_BFC20160 = cpu->gpr[5]; uint32_t psx_brB_BFC20160 = cpu->gpr[0]; psx_taken_BFC20160 = (psx_brA_BFC20160 != psx_brB_BFC20160); psx_delay_BFC20160 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20164: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002190u); #endif if (psx_delay_BFC20160) { psx_delay_BFC20160 = 0; if (psx_taken_BFC20160) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000219Cu); goto label_BFC20170; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002194u); } label_BFC20168: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002194u); #endif #ifdef PSX_COSIM cosim_block(0x00002194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20168: 1000FFD8 beq $zero, $zero, 0xBFC200CC */ uint32_t psx_brA_BFC20168 = cpu->gpr[0]; uint32_t psx_brB_BFC20168 = cpu->gpr[0]; psx_taken_BFC20168 = (psx_brA_BFC20168 == psx_brB_BFC20168); psx_delay_BFC20168 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC2016C: ACA36544 sw $v1, 25924($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (25924)); 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[3]); } PGXP_STORE(0xACA36544u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002198u); #endif if (psx_delay_BFC20168) { psx_delay_BFC20168 = 0; if (psx_taken_BFC20168) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F8u); goto label_BFC200CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000219Cu); } label_BFC20170: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000219Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20170: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000219Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20174: 1000FFD5 beq $zero, $zero, 0xBFC200CC */ uint32_t psx_brA_BFC20174 = cpu->gpr[0]; uint32_t psx_brB_BFC20174 = cpu->gpr[0]; psx_taken_BFC20174 = (psx_brA_BFC20174 == psx_brB_BFC20174); psx_delay_BFC20174 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20178: ACA36540 sw $v1, 25920($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021A4u); return; } g_debug_last_store_pc = 0x000021A4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA36540u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000021A4u); #endif if (psx_delay_BFC20174) { psx_delay_BFC20174 = 0; if (psx_taken_BFC20174) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F8u); goto label_BFC200CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021A8u); } label_BFC2017C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021A8u); #endif #ifdef PSX_COSIM cosim_block(0x000021A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2017C: 1000FFD3 beq $zero, $zero, 0xBFC200CC */ uint32_t psx_brA_BFC2017C = cpu->gpr[0]; uint32_t psx_brB_BFC2017C = cpu->gpr[0]; psx_taken_BFC2017C = (psx_brA_BFC2017C == psx_brB_BFC2017C); psx_delay_BFC2017C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC20180: 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, 0x000021ACu); return; } g_debug_last_store_pc = 0x000021ACu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000021ACu); #endif if (psx_delay_BFC2017C) { psx_delay_BFC2017C = 0; if (psx_taken_BFC2017C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000020F8u); goto label_BFC200CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); cpu->pc = 0x000021B0u; return; /* fallthrough */ } void OpenBIOS_func_000021B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000021B0u); int psx_delay_BFC20184 = 0; int psx_taken_BFC20184 = 0; int psx_delay_BFC20190 = 0; int psx_taken_BFC20190 = 0; int psx_delay_BFC201A4 = 0; int psx_taken_BFC201A4 = 0; int psx_delay_BFC201B0 = 0; int psx_delay_BFC201C4 = 0; int psx_taken_BFC201C4 = 0; int psx_delay_BFC201CC = 0; int psx_taken_BFC201CC = 0; int psx_delay_BFC201D4 = 0; int psx_taken_BFC201D4 = 0; int psx_delay_BFC201E0 = 0; int psx_taken_BFC201E0 = 0; int psx_delay_BFC201EC = 0; int psx_taken_BFC201EC = 0; int psx_delay_BFC20208 = 0; int psx_taken_BFC20208 = 0; int psx_delay_BFC20214 = 0; int psx_delay_BFC20220 = 0; int psx_delay_BFC20228 = 0; int psx_taken_BFC20228 = 0; int psx_delay_BFC2023C = 0; int psx_taken_BFC2023C = 0; int psx_delay_BFC2024C = 0; int psx_taken_BFC2024C = 0; int psx_delay_BFC20268 = 0; int psx_delay_BFC20274 = 0; int psx_taken_BFC20274 = 0; int psx_delay_BFC2029C = 0; int psx_delay_BFC202B0 = 0; int psx_taken_BFC202B0 = 0; int psx_delay_BFC202C4 = 0; int psx_taken_BFC202C4 = 0; int psx_delay_BFC202CC = 0; int psx_delay_BFC202D4 = 0; int psx_taken_BFC202D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2018Cu: goto label_BFC2018C; case 0xBFC20198u: goto label_BFC20198; case 0xBFC201ACu: goto label_BFC201AC; case 0xBFC201B0u: goto label_BFC201B0; case 0xBFC201B8u: goto label_BFC201B8; case 0xBFC201CCu: goto label_BFC201CC; case 0xBFC201D4u: goto label_BFC201D4; case 0xBFC201DCu: goto label_BFC201DC; case 0xBFC201E8u: goto label_BFC201E8; case 0xBFC201F4u: goto label_BFC201F4; case 0xBFC20208u: goto label_BFC20208; case 0xBFC20210u: goto label_BFC20210; case 0xBFC2021Cu: goto label_BFC2021C; case 0xBFC20228u: goto label_BFC20228; case 0xBFC20230u: goto label_BFC20230; case 0xBFC20244u: goto label_BFC20244; case 0xBFC20254u: goto label_BFC20254; case 0xBFC20270u: goto label_BFC20270; case 0xBFC2027Cu: goto label_BFC2027C; case 0xBFC20298u: goto label_BFC20298; case 0xBFC2029Cu: goto label_BFC2029C; case 0xBFC202A4u: goto label_BFC202A4; case 0xBFC202B8u: goto label_BFC202B8; case 0xBFC202CCu: goto label_BFC202CC; case 0xBFC202D4u: goto label_BFC202D4; default: break; } } label_BFC20184: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021B0u); #endif #ifdef PSX_COSIM cosim_block(0x000021B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20184: 10800045 beq $a0, $zero, 0xBFC2029C */ uint32_t psx_brA_BFC20184 = cpu->gpr[4]; uint32_t psx_brB_BFC20184 = cpu->gpr[0]; psx_taken_BFC20184 = (psx_brA_BFC20184 == psx_brB_BFC20184); psx_delay_BFC20184 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC20188: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000021B4u); #endif if (psx_delay_BFC20184) { psx_delay_BFC20184 = 0; if (psx_taken_BFC20184) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022C8u); goto label_BFC2029C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B8u); } label_BFC2018C: #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, 0x18u); #endif /* 0xBFC2018C: 2483FFF8 addiu $v1, $a0, -8 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[4] + (-8)); PGXP_ALU(0x2483FFF8u, cpu->gpr[3], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x000021B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20190: 14A00009 bne $a1, $zero, 0xBFC201B8 */ uint32_t psx_brA_BFC20190 = cpu->gpr[5]; uint32_t psx_brB_BFC20190 = cpu->gpr[0]; psx_taken_BFC20190 = (psx_brA_BFC20190 != psx_brB_BFC20190); psx_delay_BFC20190 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC20194: 24E76538 addiu $a3, $a3, 25912 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[7] + (25912)); PGXP_ALU(0x24E76538u, cpu->gpr[7], _pgx1, 0x00006538u); } #ifdef PSX_COSIM cosim_instr(0x000021C0u); #endif if (psx_delay_BFC20190) { psx_delay_BFC20190 = 0; if (psx_taken_BFC20190) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021E4u); goto label_BFC201B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021C4u); } label_BFC20198: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021C4u); #endif #ifdef PSX_COSIM cosim_block(0x000021C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC20198: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000021C4u); #endif /* 0xBFC2019C: 8CC26544 lw $v0, 25924($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 25924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021C8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } PGXP_LOAD(0x8CC26544u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000021C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201A0: 00000000 nop */ /* nop */ #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, 0x84u); #endif /* 0xBFC201A4: 1447000B bne $v0, $a3, 0xBFC201D4 */ uint32_t psx_brA_BFC201A4 = cpu->gpr[2]; uint32_t psx_brB_BFC201A4 = cpu->gpr[7]; psx_taken_BFC201A4 = (psx_brA_BFC201A4 != psx_brB_BFC201A4); psx_delay_BFC201A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000021D4u); #endif if (psx_delay_BFC201A4) { psx_delay_BFC201A4 = 0; if (psx_taken_BFC201A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002200u); goto label_BFC201D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021D8u); } label_BFC201AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021D8u); #endif #ifdef PSX_COSIM cosim_block(0x000021D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC201AC: ACC36544 sw $v1, 25924($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021D8u); return; } g_debug_last_store_pc = 0x000021D8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC36544u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000021D8u); #endif label_BFC201B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021DCu); #endif #ifdef PSX_COSIM cosim_block(0x000021DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC201B0: 03E00008 jr $ra */ psx_delay_BFC201B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC201B4: AC87FFF8 sw $a3, -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, 0x000021E0u); return; } g_debug_last_store_pc = 0x000021E0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC87FFF8u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000021E0u); #endif if (psx_delay_BFC201B0) { psx_delay_BFC201B0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC201B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021E4u); #endif #ifdef PSX_COSIM cosim_block(0x000021E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC201B8: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000021E4u); #endif /* 0xBFC201BC: 8CC26540 lw $v0, 25920($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 25920; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40u); } PGXP_LOAD(0x8CC26540u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000021E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000021ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC201C4: 14470003 bne $v0, $a3, 0xBFC201D4 */ uint32_t psx_brA_BFC201C4 = cpu->gpr[2]; uint32_t psx_brB_BFC201C4 = cpu->gpr[7]; psx_taken_BFC201C4 = (psx_brA_BFC201C4 != psx_brB_BFC201C4); psx_delay_BFC201C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000021F4u); #endif if (psx_delay_BFC201C4) { psx_delay_BFC201C4 = 0; if (psx_taken_BFC201C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002200u); goto label_BFC201D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021F8u); } label_BFC201CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000021F8u); #endif #ifdef PSX_COSIM cosim_block(0x000021F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000021F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201CC: 1000FFF8 beq $zero, $zero, 0xBFC201B0 */ uint32_t psx_brA_BFC201CC = cpu->gpr[0]; uint32_t psx_brB_BFC201CC = cpu->gpr[0]; psx_taken_BFC201CC = (psx_brA_BFC201CC == psx_brB_BFC201CC); psx_delay_BFC201CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC201D0: ACC36540 sw $v1, 25920($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000021FCu); return; } g_debug_last_store_pc = 0x000021FCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACC36540u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000021FCu); #endif if (psx_delay_BFC201CC) { psx_delay_BFC201CC = 0; if (psx_taken_BFC201CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021DCu); goto label_BFC201B0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002200u); } label_BFC201D4: #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, 0x5u); #endif /* 0xBFC201D4: 10400031 beq $v0, $zero, 0xBFC2029C */ uint32_t psx_brA_BFC201D4 = cpu->gpr[2]; uint32_t psx_brB_BFC201D4 = cpu->gpr[0]; psx_taken_BFC201D4 = (psx_brA_BFC201D4 == psx_brB_BFC201D4); psx_delay_BFC201D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10Cu); #endif /* 0xBFC201D8: 0062402B sltu $t0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0062402Bu, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002204u); #endif if (psx_delay_BFC201D4) { psx_delay_BFC201D4 = 0; if (psx_taken_BFC201D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022C8u); goto label_BFC2029C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002208u); } label_BFC201DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002208u); #endif #ifdef PSX_COSIM cosim_block(0x00002208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002208u); #endif /* 0xBFC201DC: 8C86FFFC lw $a2, -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, 0x00002208u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x10u); } PGXP_LOAD(0x8C86FFFCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC201E0: 11000030 beq $t0, $zero, 0xBFC202A4 */ uint32_t psx_brA_BFC201E0 = cpu->gpr[8]; uint32_t psx_brB_BFC201E0 = cpu->gpr[0]; psx_taken_BFC201E0 = (psx_brA_BFC201E0 == psx_brB_BFC201E0); psx_delay_BFC201E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002210u); #endif if (psx_delay_BFC201E0) { psx_delay_BFC201E0 = 0; if (psx_taken_BFC201E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022D0u); goto label_BFC202A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002214u); } label_BFC201E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002214u); #endif #ifdef PSX_COSIM cosim_block(0x00002214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC8u); #endif /* 0xBFC201E8: 00663821 addu $a3, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00663821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC201EC: 14470006 bne $v0, $a3, 0xBFC20208 */ uint32_t psx_brA_BFC201EC = cpu->gpr[2]; uint32_t psx_brB_BFC201EC = cpu->gpr[7]; psx_taken_BFC201EC = (psx_brA_BFC201EC != psx_brB_BFC201EC); psx_delay_BFC201EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000221Cu); #endif if (psx_delay_BFC201EC) { psx_delay_BFC201EC = 0; if (psx_taken_BFC201EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002234u); goto label_BFC20208; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002220u); } label_BFC201F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002220u); #endif #ifdef PSX_COSIM cosim_block(0x00002220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002220u); #endif /* 0xBFC201F4: 8C470004 lw $a3, 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, 0x00002220u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x4u); } PGXP_LOAD(0x8C470004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC201F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002224u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC201FC: 00E63021 addu $a2, $a3, $a2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[6] = cpu->gpr[7] + cpu->gpr[6]; PGXP_ALU(0x00E63021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC20200: AC86FFFC sw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000222Cu); return; } g_debug_last_store_pc = 0x0000222Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC86FFFCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x0000222Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002230u); #endif /* 0xBFC20204: 8C420000 lw $v0, 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, 0x00002230u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002230u); #endif label_BFC20208: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002234u); #endif #ifdef PSX_COSIM cosim_block(0x00002234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20208: 14A00004 bne $a1, $zero, 0xBFC2021C */ uint32_t psx_brA_BFC20208 = cpu->gpr[5]; uint32_t psx_brB_BFC20208 = cpu->gpr[0]; psx_taken_BFC20208 = (psx_brA_BFC20208 != psx_brB_BFC20208); psx_delay_BFC20208 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2020C: AC82FFF8 sw $v0, -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, 0x00002238u); return; } g_debug_last_store_pc = 0x00002238u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC82FFF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002238u); #endif if (psx_delay_BFC20208) { psx_delay_BFC20208 = 0; if (psx_taken_BFC20208) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002248u); goto label_BFC2021C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000223Cu); } label_BFC20210: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000223Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000223Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000223Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20210: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x80000001u); #endif /* 0xBFC20214: 03E00008 jr $ra */ psx_delay_BFC20214 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20218: AC436544 sw $v1, 25924($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002244u); return; } g_debug_last_store_pc = 0x00002244u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC436544u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002244u); #endif if (psx_delay_BFC20214) { psx_delay_BFC20214 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC2021C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002248u); #endif #ifdef PSX_COSIM cosim_block(0x00002248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2021C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20220: 03E00008 jr $ra */ psx_delay_BFC20220 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20224: AC436540 sw $v1, 25920($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002250u); return; } g_debug_last_store_pc = 0x00002250u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC436540u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002250u); #endif if (psx_delay_BFC20220) { psx_delay_BFC20220 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC20228: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002254u); #endif #ifdef PSX_COSIM cosim_block(0x00002254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20228: 1100001E beq $t0, $zero, 0xBFC202A4 */ uint32_t psx_brA_BFC20228 = cpu->gpr[8]; uint32_t psx_brB_BFC20228 = cpu->gpr[0]; psx_taken_BFC20228 = (psx_brA_BFC20228 == psx_brB_BFC20228); psx_delay_BFC20228 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2022C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002258u); #endif if (psx_delay_BFC20228) { psx_delay_BFC20228 = 0; if (psx_taken_BFC20228) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022D0u); goto label_BFC202A4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000225Cu); } label_BFC20230: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000225Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000225Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000225Cu); #endif /* 0xBFC20230: 8CA70004 lw $a3, 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, 0x0000225Cu); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x0000225Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20234: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1A0u); #endif /* 0xBFC20238: 00A74021 addu $t0, $a1, $a3 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[7]; PGXP_ALU(0x00A74021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC2023C: 1468000C bne $v1, $t0, 0xBFC20270 */ uint32_t psx_brA_BFC2023C = cpu->gpr[3]; uint32_t psx_brB_BFC2023C = cpu->gpr[8]; psx_taken_BFC2023C = (psx_brA_BFC2023C != psx_brB_BFC2023C); psx_delay_BFC2023C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20240: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000226Cu); #endif if (psx_delay_BFC2023C) { psx_delay_BFC2023C = 0; if (psx_taken_BFC2023C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000229Cu); goto label_BFC20270; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002270u); } label_BFC20244: #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, 0xC8u); #endif /* 0xBFC20244: 00E61821 addu $v1, $a3, $a2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[7] + cpu->gpr[6]; PGXP_ALU(0x00E61821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x38u); #endif /* 0xBFC20248: 00A32021 addu $a0, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A32021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2024C: 14440013 bne $v0, $a0, 0xBFC2029C */ uint32_t psx_brA_BFC2024C = cpu->gpr[2]; uint32_t psx_brB_BFC2024C = cpu->gpr[4]; psx_taken_BFC2024C = (psx_brA_BFC2024C != psx_brB_BFC2024C); psx_delay_BFC2024C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20250: ACA30004 sw $v1, 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, 0x0000227Cu); return; } g_debug_last_store_pc = 0x0000227Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000227Cu); #endif if (psx_delay_BFC2024C) { psx_delay_BFC2024C = 0; if (psx_taken_BFC2024C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022C8u); goto label_BFC2029C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002280u); } label_BFC20254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002280u); #endif #ifdef PSX_COSIM cosim_block(0x00002280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002280u); #endif /* 0xBFC20254: 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, 0x00002280u); 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(0x00002280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20258: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC2025C: 00831821 addu $v1, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00831821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20260: ACA30004 sw $v1, 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, 0x0000228Cu); return; } g_debug_last_store_pc = 0x0000228Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000228Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002290u); #endif /* 0xBFC20264: 8C420000 lw $v0, 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, 0x00002290u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20268: 03E00008 jr $ra */ psx_delay_BFC20268 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC2026C: 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, 0x00002298u); return; } g_debug_last_store_pc = 0x00002298u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002298u); #endif if (psx_delay_BFC20268) { psx_delay_BFC20268 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC20270: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000229Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000229Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000229Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC8u); #endif /* 0xBFC20270: 00663821 addu $a3, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00663821u, cpu->gpr[7], _pgx1, _pgx2); } #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, 0x84u); #endif /* 0xBFC20274: 14470017 bne $v0, $a3, 0xBFC202D4 */ uint32_t psx_brA_BFC20274 = cpu->gpr[2]; uint32_t psx_brB_BFC20274 = cpu->gpr[7]; psx_taken_BFC20274 = (psx_brA_BFC20274 != psx_brB_BFC20274); psx_delay_BFC20274 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20278: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000022A4u); #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, 0x00002300u); goto label_BFC202D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022A8u); } label_BFC2027C: #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 /* 0xBFC2027C: 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, 0x000022A8u); 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(0x000022A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20280: 00000000 nop */ /* nop */ #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, 0x90u); #endif /* 0xBFC20284: AC87FFF8 sw $a3, -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, 0x000022B0u); return; } g_debug_last_store_pc = 0x000022B0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC87FFF8u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000022B0u); #endif /* 0xBFC20288: 8C420004 lw $v0, 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, 0x000022B4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000022B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2028C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000022B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20290: 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(0x000022BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20294: AC82FFFC sw $v0, -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, 0x000022C0u); return; } g_debug_last_store_pc = 0x000022C0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC82FFFCu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000022C0u); #endif label_BFC20298: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000022C4u); #endif #ifdef PSX_COSIM cosim_block(0x000022C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20298: ACA30000 sw $v1, 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, 0x000022C4u); return; } g_debug_last_store_pc = 0x000022C4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xACA30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000022C4u); #endif label_BFC2029C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000022C8u); #endif #ifdef PSX_COSIM cosim_block(0x000022C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC2029C: 03E00008 jr $ra */ psx_delay_BFC2029C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC202A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000022CCu); #endif if (psx_delay_BFC2029C) { psx_delay_BFC2029C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC202A4: #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, 0x25u); #endif /* 0xBFC202A4: 00402825 or $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(0x00402825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000022D0u); #endif /* 0xBFC202A8: 8C420000 lw $v0, 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, 0x000022D4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000022D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC202AC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000022D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC202B0: 1447FFDD bne $v0, $a3, 0xBFC20228 */ uint32_t psx_brA_BFC202B0 = cpu->gpr[2]; uint32_t psx_brB_BFC202B0 = cpu->gpr[7]; psx_taken_BFC202B0 = (psx_brA_BFC202B0 != psx_brB_BFC202B0); psx_delay_BFC202B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10Cu); #endif /* 0xBFC202B4: 0062402B sltu $t0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[8] = (uint32_t)(cpu->gpr[3] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0062402Bu, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000022E0u); #endif if (psx_delay_BFC202B0) { psx_delay_BFC202B0 = 0; if (psx_taken_BFC202B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002254u); goto label_BFC20228; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022E4u); } label_BFC202B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000022E4u); #endif #ifdef PSX_COSIM cosim_block(0x000022E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022E4u); #endif /* 0xBFC202B8: 8CA70004 lw $a3, 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, 0x000022E4u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x20u); } PGXP_LOAD(0x8CA70004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000022E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC202BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000022E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1A0u); #endif /* 0xBFC202C0: 00A74021 addu $t0, $a1, $a3 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[8] = cpu->gpr[5] + cpu->gpr[7]; PGXP_ALU(0x00A74021u, cpu->gpr[8], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000022ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC202C4: 14680003 bne $v1, $t0, 0xBFC202D4 */ uint32_t psx_brA_BFC202C4 = cpu->gpr[3]; uint32_t psx_brB_BFC202C4 = cpu->gpr[8]; psx_taken_BFC202C4 = (psx_brA_BFC202C4 != psx_brB_BFC202C4); psx_delay_BFC202C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC202C8: 00E63821 addu $a3, $a3, $a2 */ { uint32_t _pgx1 = cpu->gpr[7]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[7] = cpu->gpr[7] + cpu->gpr[6]; PGXP_ALU(0x00E63821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000022F4u); #endif if (psx_delay_BFC202C4) { psx_delay_BFC202C4 = 0; if (psx_taken_BFC202C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002300u); goto label_BFC202D4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022F8u); } label_BFC202CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000022F8u); #endif #ifdef PSX_COSIM cosim_block(0x000022F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000022F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC202CC: 03E00008 jr $ra */ psx_delay_BFC202CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0u); #endif /* 0xBFC202D0: ACA70004 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, 0x000022FCu); return; } g_debug_last_store_pc = 0x000022FCu; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACA70004u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000022FCu); #endif if (psx_delay_BFC202CC) { psx_delay_BFC202CC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC202D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002300u); #endif #ifdef PSX_COSIM cosim_block(0x00002300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC202D4: 1000FFF0 beq $zero, $zero, 0xBFC20298 */ uint32_t psx_brA_BFC202D4 = cpu->gpr[0]; uint32_t psx_brB_BFC202D4 = cpu->gpr[0]; psx_taken_BFC202D4 = (psx_brA_BFC202D4 == psx_brB_BFC202D4); psx_delay_BFC202D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC202D8: AC82FFF8 sw $v0, -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, 0x00002304u); return; } g_debug_last_store_pc = 0x00002304u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC82FFF8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002304u); #endif if (psx_delay_BFC202D4) { psx_delay_BFC202D4 = 0; if (psx_taken_BFC202D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000022C4u); goto label_BFC20298; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002308u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002308u); cpu->pc = 0x00002308u; return; /* fallthrough */ } void OpenBIOS_func_00002308(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002308u); int psx_delay_BFC202E0 = 0; int psx_taken_BFC202E0 = 0; int psx_delay_BFC202E8 = 0; int psx_delay_BFC202F4 = 0; int psx_taken_BFC202F4 = 0; int psx_delay_BFC202FC = 0; int psx_delay_BFC20310 = 0; int psx_delay_BFC20328 = 0; int psx_taken_BFC20328 = 0; int psx_delay_BFC20330 = 0; int psx_taken_BFC20330 = 0; int psx_delay_BFC20348 = 0; int psx_taken_BFC20348 = 0; int psx_delay_BFC20354 = 0; int psx_taken_BFC20354 = 0; int psx_delay_BFC20364 = 0; int psx_taken_BFC20364 = 0; int psx_delay_BFC20370 = 0; int psx_taken_BFC20370 = 0; int psx_delay_BFC20380 = 0; int psx_taken_BFC20380 = 0; int psx_delay_BFC2038C = 0; int psx_taken_BFC2038C = 0; int psx_delay_BFC20398 = 0; int psx_taken_BFC20398 = 0; int psx_delay_BFC203A4 = 0; int psx_taken_BFC203A4 = 0; int psx_delay_BFC203BC = 0; int psx_taken_BFC203BC = 0; int psx_delay_BFC203C4 = 0; int psx_taken_BFC203C4 = 0; int psx_delay_BFC203CC = 0; int psx_taken_BFC203CC = 0; int psx_delay_BFC203E0 = 0; int psx_taken_BFC203E0 = 0; int psx_delay_BFC203EC = 0; int psx_taken_BFC203EC = 0; int psx_delay_BFC203F4 = 0; int psx_taken_BFC203F4 = 0; int psx_delay_BFC20404 = 0; int psx_taken_BFC20404 = 0; int psx_delay_BFC20410 = 0; int psx_taken_BFC20410 = 0; int psx_delay_BFC20420 = 0; int psx_taken_BFC20420 = 0; int psx_delay_BFC2042C = 0; int psx_taken_BFC2042C = 0; int psx_delay_BFC20434 = 0; int psx_taken_BFC20434 = 0; int psx_delay_BFC2043C = 0; int psx_taken_BFC2043C = 0; int psx_delay_BFC20450 = 0; int psx_taken_BFC20450 = 0; int psx_delay_BFC2045C = 0; int psx_taken_BFC2045C = 0; int psx_delay_BFC20468 = 0; int psx_delay_BFC2047C = 0; int psx_taken_BFC2047C = 0; int psx_delay_BFC20484 = 0; int psx_taken_BFC20484 = 0; int psx_delay_BFC2048C = 0; int psx_delay_BFC20494 = 0; int psx_taken_BFC20494 = 0; int psx_delay_BFC204A0 = 0; int psx_taken_BFC204A0 = 0; int psx_delay_BFC204AC = 0; int psx_taken_BFC204AC = 0; int psx_delay_BFC204B8 = 0; int psx_taken_BFC204B8 = 0; int psx_delay_BFC204DC = 0; int psx_taken_BFC204DC = 0; int psx_delay_BFC204E4 = 0; int psx_taken_BFC204E4 = 0; int psx_delay_BFC204EC = 0; int psx_taken_BFC204EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20400u: goto label_BFC20400; case 0xBFC20464u: goto label_BFC20464; case 0xBFC20484u: goto label_BFC20484; case 0xBFC202E8u: goto label_BFC202E8; case 0xBFC202F0u: goto label_BFC202F0; case 0xBFC202FCu: goto label_BFC202FC; case 0xBFC20304u: goto label_BFC20304; case 0xBFC20308u: goto label_BFC20308; case 0xBFC20318u: goto label_BFC20318; case 0xBFC20330u: goto label_BFC20330; case 0xBFC20338u: goto label_BFC20338; case 0xBFC20344u: goto label_BFC20344; case 0xBFC20350u: goto label_BFC20350; case 0xBFC2035Cu: goto label_BFC2035C; case 0xBFC20364u: goto label_BFC20364; case 0xBFC2036Cu: goto label_BFC2036C; case 0xBFC20378u: goto label_BFC20378; case 0xBFC20388u: goto label_BFC20388; case 0xBFC20394u: goto label_BFC20394; case 0xBFC203A0u: goto label_BFC203A0; case 0xBFC203ACu: goto label_BFC203AC; case 0xBFC203B8u: goto label_BFC203B8; case 0xBFC203C4u: goto label_BFC203C4; case 0xBFC203CCu: goto label_BFC203CC; case 0xBFC203D4u: goto label_BFC203D4; case 0xBFC203E8u: goto label_BFC203E8; case 0xBFC203F4u: goto label_BFC203F4; case 0xBFC203FCu: goto label_BFC203FC; case 0xBFC20404u: goto label_BFC20404; case 0xBFC2040Cu: goto label_BFC2040C; case 0xBFC20418u: goto label_BFC20418; case 0xBFC20428u: goto label_BFC20428; case 0xBFC20434u: goto label_BFC20434; case 0xBFC2043Cu: goto label_BFC2043C; case 0xBFC20444u: goto label_BFC20444; case 0xBFC20448u: goto label_BFC20448; case 0xBFC20458u: goto label_BFC20458; case 0xBFC20468u: goto label_BFC20468; case 0xBFC20470u: goto label_BFC20470; case 0xBFC2048Cu: goto label_BFC2048C; case 0xBFC20494u: goto label_BFC20494; case 0xBFC2049Cu: goto label_BFC2049C; case 0xBFC204A8u: goto label_BFC204A8; case 0xBFC204B4u: goto label_BFC204B4; case 0xBFC204C0u: goto label_BFC204C0; case 0xBFC204D8u: goto label_BFC204D8; case 0xBFC204E4u: goto label_BFC204E4; case 0xBFC204ECu: goto label_BFC204EC; default: break; } } label_BFC202DC: #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, 0xA1u); #endif /* 0xBFC202DC: 00A03825 or $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(0x00A03825u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002308u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC202E0: 14800003 bne $a0, $zero, 0xBFC202F0 */ uint32_t psx_brA_BFC202E0 = cpu->gpr[4]; uint32_t psx_brB_BFC202E0 = cpu->gpr[0]; psx_taken_BFC202E0 = (psx_brA_BFC202E0 != psx_brB_BFC202E0); psx_delay_BFC202E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x61u); #endif /* 0xBFC202E4: 00C02825 or $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(0x00C02825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002310u); #endif if (psx_delay_BFC202E0) { psx_delay_BFC202E0 = 0; if (psx_taken_BFC202E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000231Cu); goto label_BFC202F0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002314u); } label_BFC202E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002314u); #endif #ifdef PSX_COSIM cosim_block(0x00002314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC202E8: 08000822 j 0xB0002088 */ psx_delay_BFC202E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC202EC: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002318u); #endif if (psx_delay_BFC202E8) { psx_delay_BFC202E8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002088u); cpu->pc = 0x00002088u; return; } label_BFC202F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000231Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC202F0: 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(0x0000231Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC202F4: 14E00008 bne $a3, $zero, 0xBFC20318 */ uint32_t psx_brA_BFC202F4 = cpu->gpr[7]; uint32_t psx_brB_BFC202F4 = cpu->gpr[0]; psx_taken_BFC202F4 = (psx_brA_BFC202F4 != psx_brB_BFC202F4); psx_delay_BFC202F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC202F8: 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, 0x00002324u); return; } g_debug_last_store_pc = 0x00002324u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002324u); #endif if (psx_delay_BFC202F4) { psx_delay_BFC202F4 = 0; if (psx_taken_BFC202F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002344u); goto label_BFC20318; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002328u); } label_BFC202FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002328u); #endif #ifdef PSX_COSIM cosim_block(0x00002328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC202FC: 0C00086C jal 0xB00021B0 */ cpu->gpr[31] = 0x00002330u; /* jal link before delay slot */ psx_delay_BFC202FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20300: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000232Cu); #endif if (psx_delay_BFC202FC) { psx_delay_BFC202FC = 0; cpu->gpr[31] = 0x00002330u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); cpu->pc = 0x000021B0u; return; } label_BFC20304: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002330u); #endif #ifdef PSX_COSIM cosim_block(0x00002330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC20304: 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(0x00002330u); #endif label_BFC20308: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002334u); #endif #ifdef PSX_COSIM cosim_block(0x00002334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002334u); #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, 0x00002334u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002334u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x205u); #endif /* 0xBFC2030C: 01201025 or $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(0x01201025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20310: 03E00008 jr $ra */ psx_delay_BFC20310 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002340u); #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(0x00002340u); #endif if (psx_delay_BFC20310) { psx_delay_BFC20310 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC20318: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002344u); #endif #ifdef PSX_COSIM cosim_block(0x00002344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC20318: 24E6000F addiu $a2, $a3, 15 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[7] + (15)); PGXP_ALU(0x24E6000Fu, cpu->gpr[6], _pgx1, 0x0000000Fu); } #ifdef PSX_COSIM cosim_instr(0x00002344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2031C: 2402FFF8 addiu $v0, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2402FFF8u, cpu->gpr[2], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00002348u); #endif /* 0xBFC20320: 8C8BFFFC lw $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 & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000234Cu); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x10u); } PGXP_LOAD(0x8C8BFFFCu, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x0000234Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20324: 00C23024 and $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(0x00C23024u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC20328: 10CB0036 beq $a2, $t3, 0xBFC20404 */ uint32_t psx_brA_BFC20328 = cpu->gpr[6]; uint32_t psx_brB_BFC20328 = cpu->gpr[11]; psx_taken_BFC20328 = (psx_brA_BFC20328 == psx_brB_BFC20328); psx_delay_BFC20328 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1011u); #endif /* 0xBFC2032C: 00806025 or $t4, $a0, $zero */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[12] = cpu->gpr[4] | cpu->gpr[0]; PGXP_ALU(0x00806025u, cpu->gpr[12], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002358u); #endif if (psx_delay_BFC20328) { psx_delay_BFC20328 = 0; if (psx_taken_BFC20328) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002430u); goto label_BFC20404; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000235Cu); } label_BFC20330: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20330: 14A00011 bne $a1, $zero, 0xBFC20378 */ uint32_t psx_brA_BFC20330 = cpu->gpr[5]; uint32_t psx_brB_BFC20330 = cpu->gpr[0]; psx_taken_BFC20330 = (psx_brA_BFC20330 != psx_brB_BFC20330); psx_delay_BFC20330 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20334: 2482FFF8 addiu $v0, $a0, -8 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-8)); PGXP_ALU(0x2482FFF8u, cpu->gpr[2], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00002360u); #endif if (psx_delay_BFC20330) { psx_delay_BFC20330 = 0; if (psx_taken_BFC20330) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023A4u); goto label_BFC20378; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002364u); } label_BFC20338: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002364u); #endif #ifdef PSX_COSIM cosim_block(0x00002364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20338: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002364u); #endif /* 0xBFC2033C: 8C686544 lw $t0, 25924($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25924; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002368u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } PGXP_LOAD(0x8C686544u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002368u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20340: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000236Cu); #endif label_BFC20344: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002370u); #endif #ifdef PSX_COSIM cosim_block(0x00002370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20344: 24636538 addiu $v1, $v1, 25912 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (25912)); PGXP_ALU(0x24636538u, cpu->gpr[3], _pgx1, 0x00006538u); } #ifdef PSX_COSIM cosim_instr(0x00002370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC20348: 1503000F bne $t0, $v1, 0xBFC20388 */ uint32_t psx_brA_BFC20348 = cpu->gpr[8]; uint32_t psx_brB_BFC20348 = cpu->gpr[3]; 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(0x00002378u); #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, 0x000023B4u); goto label_BFC20388; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000237Cu); } label_BFC20350: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000237Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000237Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000237Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x848u); #endif /* 0xBFC20350: 00CB182B sltu $v1, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x00CB182Bu, cpu->gpr[3], _pgx1, _pgx2); } #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, 0x9u); #endif /* 0xBFC20354: 1060FFEB beq $v1, $zero, 0xBFC20304 */ uint32_t psx_brA_BFC20354 = cpu->gpr[3]; uint32_t psx_brB_BFC20354 = cpu->gpr[0]; psx_taken_BFC20354 = (psx_brA_BFC20354 == psx_brB_BFC20354); psx_delay_BFC20354 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20358: 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(0x00002384u); #endif if (psx_delay_BFC20354) { psx_delay_BFC20354 = 0; if (psx_taken_BFC20354) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002330u); goto label_BFC20304; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002388u); } label_BFC2035C: #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, 0x104u); #endif /* 0xBFC2035C: 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, 0x00002388u); return; } g_debug_last_store_pc = 0x00002388u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC480000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC20360: 01665823 subu $t3, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[6]; PGXP_ALU(0x01665823u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000238Cu); #endif label_BFC20364: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002390u); #endif #ifdef PSX_COSIM cosim_block(0x00002390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20364: 14A00030 bne $a1, $zero, 0xBFC20428 */ uint32_t psx_brA_BFC20364 = cpu->gpr[5]; uint32_t psx_brB_BFC20364 = cpu->gpr[0]; psx_taken_BFC20364 = (psx_brA_BFC20364 != psx_brB_BFC20364); psx_delay_BFC20364 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC20368: AC4B0004 sw $t3, 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, 0x00002394u); return; } g_debug_last_store_pc = 0x00002394u; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAC4B0004u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x00002394u); #endif if (psx_delay_BFC20364) { psx_delay_BFC20364 = 0; if (psx_taken_BFC20364) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002454u); goto label_BFC20428; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002398u); } label_BFC2036C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002398u); #endif #ifdef PSX_COSIM cosim_block(0x00002398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2036C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20370: 10000023 beq $zero, $zero, 0xBFC20400 */ uint32_t psx_brA_BFC20370 = cpu->gpr[0]; uint32_t psx_brB_BFC20370 = cpu->gpr[0]; psx_taken_BFC20370 = (psx_brA_BFC20370 == psx_brB_BFC20370); psx_delay_BFC20370 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20374: AC626544 sw $v0, 25924($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023A0u); return; } g_debug_last_store_pc = 0x000023A0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC626544u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000023A0u); #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, 0x0000242Cu); goto label_BFC20400; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023A4u); } label_BFC20378: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000023A4u); #endif #ifdef PSX_COSIM cosim_block(0x000023A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20378: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000023A4u); #endif /* 0xBFC2037C: 8C686540 lw $t0, 25920($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25920; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000023A8u); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8u); } PGXP_LOAD(0x8C686540u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x000023A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20380: 1000FFF0 beq $zero, $zero, 0xBFC20344 */ uint32_t psx_brA_BFC20380 = cpu->gpr[0]; uint32_t psx_brB_BFC20380 = cpu->gpr[0]; psx_taken_BFC20380 = (psx_brA_BFC20380 == psx_brB_BFC20380); psx_delay_BFC20380 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20384: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000023B0u); #endif if (psx_delay_BFC20380) { psx_delay_BFC20380 = 0; if (psx_taken_BFC20380) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002370u); goto label_BFC20344; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023B4u); } label_BFC20388: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000023B4u); #endif #ifdef PSX_COSIM cosim_block(0x000023B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x114u); #endif /* 0xBFC20388: 0048202B sltu $a0, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0048202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2038C: 1080002E beq $a0, $zero, 0xBFC20448 */ uint32_t psx_brA_BFC2038C = cpu->gpr[4]; 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_cyc_step(cpu, 0x501u); #endif /* 0xBFC20390: 01005025 or $t2, $t0, $zero */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[8] | cpu->gpr[0]; PGXP_ALU(0x01005025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023BCu); #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, 0x00002474u); goto label_BFC20448; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023C0u); } label_BFC20394: #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, 0x850u); #endif /* 0xBFC20394: 00CB202B sltu $a0, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20398: 1080000C beq $a0, $zero, 0xBFC203CC */ uint32_t psx_brA_BFC20398 = cpu->gpr[4]; uint32_t psx_brB_BFC20398 = cpu->gpr[0]; psx_taken_BFC20398 = (psx_brA_BFC20398 == psx_brB_BFC20398); psx_delay_BFC20398 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80Cu); #endif /* 0xBFC2039C: 004B1821 addu $v1, $v0, $t3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[11]; PGXP_ALU(0x004B1821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023C8u); #endif if (psx_delay_BFC20398) { psx_delay_BFC20398 = 0; if (psx_taken_BFC20398) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023F8u); goto label_BFC203CC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023CCu); } label_BFC203A0: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC203A0: 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(0x000023CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC203A4: 15030007 bne $t0, $v1, 0xBFC203C4 */ uint32_t psx_brA_BFC203A4 = cpu->gpr[8]; uint32_t psx_brB_BFC203A4 = cpu->gpr[3]; psx_taken_BFC203A4 = (psx_brA_BFC203A4 != psx_brB_BFC203A4); psx_delay_BFC203A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC203A8: 01665823 subu $t3, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[6]; PGXP_ALU(0x01665823u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023D4u); #endif if (psx_delay_BFC203A4) { psx_delay_BFC203A4 = 0; if (psx_taken_BFC203A4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023F0u); goto label_BFC203C4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023D8u); } label_BFC203AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000023D8u); #endif #ifdef PSX_COSIM cosim_block(0x000023D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023D8u); #endif /* 0xBFC203AC: 8D030000 lw $v1, 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, 0x000023D8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100u); } PGXP_LOAD(0x8D030000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000023D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC203B0: 00000000 nop */ /* nop */ #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, 0xCu); #endif /* 0xBFC203B4: 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, 0x000023E0u); return; } g_debug_last_store_pc = 0x000023E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000023E0u); #endif label_BFC203B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000023E4u); #endif #ifdef PSX_COSIM cosim_block(0x000023E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023E4u); #endif /* 0xBFC203B8: 8D030004 lw $v1, 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, 0x000023E4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100u); } PGXP_LOAD(0x8D030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000023E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC203BC: 1000FFE9 beq $zero, $zero, 0xBFC20364 */ uint32_t psx_brA_BFC203BC = cpu->gpr[0]; uint32_t psx_brB_BFC203BC = cpu->gpr[0]; psx_taken_BFC203BC = (psx_brA_BFC203BC == psx_brB_BFC203BC); psx_delay_BFC203BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC203C0: 006B5821 addu $t3, $v1, $t3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[3] + cpu->gpr[11]; PGXP_ALU(0x006B5821u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023ECu); #endif if (psx_delay_BFC203BC) { psx_delay_BFC203BC = 0; if (psx_taken_BFC203BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002390u); goto label_BFC20364; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023F0u); } label_BFC203C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000023F0u); #endif #ifdef PSX_COSIM cosim_block(0x000023F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000023F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC203C4: 1000FFE7 beq $zero, $zero, 0xBFC20364 */ uint32_t psx_brA_BFC203C4 = cpu->gpr[0]; uint32_t psx_brB_BFC203C4 = cpu->gpr[0]; psx_taken_BFC203C4 = (psx_brA_BFC203C4 == psx_brB_BFC203C4); psx_delay_BFC203C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC203C8: 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, 0x000023F4u); return; } g_debug_last_store_pc = 0x000023F4u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAC480000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x000023F4u); #endif if (psx_delay_BFC203C4) { psx_delay_BFC203C4 = 0; if (psx_taken_BFC203C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002390u); goto label_BFC20364; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000023F8u); } label_BFC203CC: #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, 0x108u); #endif /* 0xBFC203CC: 15030026 bne $t0, $v1, 0xBFC20468 */ uint32_t psx_brA_BFC203CC = cpu->gpr[8]; uint32_t psx_brB_BFC203CC = cpu->gpr[3]; psx_taken_BFC203CC = (psx_brA_BFC203CC != psx_brB_BFC203CC); psx_delay_BFC203CC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC203D0: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000023FCu); #endif if (psx_delay_BFC203CC) { psx_delay_BFC203CC = 0; if (psx_taken_BFC203CC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002494u); goto label_BFC20468; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002400u); } label_BFC203D4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002400u); #endif #ifdef PSX_COSIM cosim_block(0x00002400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002400u); #endif /* 0xBFC203D4: 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, 0x00002400u); 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(0x00002400u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x850u); #endif /* 0xBFC203D8: 00CB2023 subu $a0, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[6] - cpu->gpr[11]; PGXP_ALU(0x00CB2023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x218u); #endif /* 0xBFC203DC: 0124182B sltu $v1, $t1, $a0 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0124182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC203E0: 14600020 bne $v1, $zero, 0xBFC20464 */ uint32_t psx_brA_BFC203E0 = cpu->gpr[3]; uint32_t psx_brB_BFC203E0 = cpu->gpr[0]; psx_taken_BFC203E0 = (psx_brA_BFC203E0 != psx_brB_BFC203E0); psx_delay_BFC203E0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC203E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002410u); #endif if (psx_delay_BFC203E0) { psx_delay_BFC203E0 = 0; if (psx_taken_BFC203E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002490u); goto label_BFC20464; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002414u); } label_BFC203E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002414u); #endif #ifdef PSX_COSIM cosim_block(0x00002414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002414u); #endif /* 0xBFC203E8: 8D030000 lw $v1, 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, 0x00002414u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100u); } PGXP_LOAD(0x8D030000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210u); #endif /* 0xBFC203EC: 1524000A bne $t1, $a0, 0xBFC20418 */ uint32_t psx_brA_BFC203EC = cpu->gpr[9]; uint32_t psx_brB_BFC203EC = cpu->gpr[4]; psx_taken_BFC203EC = (psx_brA_BFC203EC != psx_brB_BFC203EC); psx_delay_BFC203EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC203F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000241Cu); #endif if (psx_delay_BFC203EC) { psx_delay_BFC203EC = 0; if (psx_taken_BFC203EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002444u); goto label_BFC20418; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002420u); } label_BFC203F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002420u); #endif #ifdef PSX_COSIM cosim_block(0x00002420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC203F4: 14A00005 bne $a1, $zero, 0xBFC2040C */ uint32_t psx_brA_BFC203F4 = cpu->gpr[5]; uint32_t psx_brB_BFC203F4 = cpu->gpr[0]; psx_taken_BFC203F4 = (psx_brA_BFC203F4 != psx_brB_BFC203F4); psx_delay_BFC203F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC203F8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002424u); #endif if (psx_delay_BFC203F4) { psx_delay_BFC203F4 = 0; if (psx_taken_BFC203F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002438u); goto label_BFC2040C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002428u); } label_BFC203FC: #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, 0xCu); #endif /* 0xBFC203FC: AC436544 sw $v1, 25924($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002428u); return; } g_debug_last_store_pc = 0x00002428u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC436544u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002428u); #endif label_BFC20400: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000242Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000242Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000242Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1040u); #endif /* 0xBFC20400: AD86FFFC sw $a2, -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, 0x0000242Cu); return; } g_debug_last_store_pc = 0x0000242Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAD86FFFCu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x0000242Cu); #endif label_BFC20404: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002430u); #endif #ifdef PSX_COSIM cosim_block(0x00002430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20404: 1000FFC0 beq $zero, $zero, 0xBFC20308 */ uint32_t psx_brA_BFC20404 = cpu->gpr[0]; uint32_t psx_brB_BFC20404 = cpu->gpr[0]; psx_taken_BFC20404 = (psx_brA_BFC20404 == psx_brB_BFC20404); psx_delay_BFC20404 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1201u); #endif /* 0xBFC20408: 01804825 or $t1, $t4, $zero */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[9] = cpu->gpr[12] | cpu->gpr[0]; PGXP_ALU(0x01804825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002434u); #endif if (psx_delay_BFC20404) { psx_delay_BFC20404 = 0; if (psx_taken_BFC20404) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002334u); goto label_BFC20308; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002438u); } label_BFC2040C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002438u); #endif #ifdef PSX_COSIM cosim_block(0x00002438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2040C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20410: 1000FFFB beq $zero, $zero, 0xBFC20400 */ uint32_t psx_brA_BFC20410 = cpu->gpr[0]; uint32_t psx_brB_BFC20410 = cpu->gpr[0]; psx_taken_BFC20410 = (psx_brA_BFC20410 == psx_brB_BFC20410); psx_delay_BFC20410 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20414: AC436540 sw $v1, 25920($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002440u); return; } g_debug_last_store_pc = 0x00002440u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC436540u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002440u); #endif if (psx_delay_BFC20410) { psx_delay_BFC20410 = 0; if (psx_taken_BFC20410) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000242Cu); goto label_BFC20400; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002444u); } label_BFC20418: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002444u); #endif #ifdef PSX_COSIM cosim_block(0x00002444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20418: 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(0x00002444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2041C: 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, 0x00002448u); return; } g_debug_last_store_pc = 0x00002448u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002448u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20420: 1000FFE5 beq $zero, $zero, 0xBFC203B8 */ uint32_t psx_brA_BFC20420 = cpu->gpr[0]; 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_icache_fetch(cpu, 0x00002450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC20424: 01665823 subu $t3, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[6]; PGXP_ALU(0x01665823u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002450u); #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, 0x000023E4u); goto label_BFC203B8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002454u); } label_BFC20428: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002454u); #endif #ifdef PSX_COSIM cosim_block(0x00002454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20428: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2042C: 1000FFF4 beq $zero, $zero, 0xBFC20400 */ uint32_t psx_brA_BFC2042C = cpu->gpr[0]; uint32_t psx_brB_BFC2042C = cpu->gpr[0]; psx_taken_BFC2042C = (psx_brA_BFC2042C == psx_brB_BFC2042C); psx_delay_BFC2042C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20430: AC626540 sw $v0, 25920($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000245Cu); return; } g_debug_last_store_pc = 0x0000245Cu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC626540u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000245Cu); #endif if (psx_delay_BFC2042C) { psx_delay_BFC2042C = 0; if (psx_taken_BFC2042C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000242Cu); goto label_BFC20400; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002460u); } label_BFC20434: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002460u); #endif #ifdef PSX_COSIM cosim_block(0x00002460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20434: 14800019 bne $a0, $zero, 0xBFC2049C */ uint32_t psx_brA_BFC20434 = cpu->gpr[4]; 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(0x00002464u); #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, 0x000024C8u); goto label_BFC2049C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002468u); } label_BFC2043C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002468u); #endif #ifdef PSX_COSIM cosim_block(0x00002468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC2043C: 11030017 beq $t0, $v1, 0xBFC2049C */ uint32_t psx_brA_BFC2043C = cpu->gpr[8]; uint32_t psx_brB_BFC2043C = cpu->gpr[3]; psx_taken_BFC2043C = (psx_brA_BFC2043C == psx_brB_BFC2043C); psx_delay_BFC2043C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20440: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000246Cu); #endif if (psx_delay_BFC2043C) { psx_delay_BFC2043C = 0; if (psx_taken_BFC2043C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024C8u); goto label_BFC2049C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002470u); } label_BFC20444: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002470u); #endif #ifdef PSX_COSIM cosim_block(0x00002470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x501u); #endif /* 0xBFC20444: 01005025 or $t2, $t0, $zero */ { uint32_t _pgx1 = cpu->gpr[8]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[10] = cpu->gpr[8] | cpu->gpr[0]; PGXP_ALU(0x01005025u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002470u); #endif label_BFC20448: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002474u); #endif #ifdef PSX_COSIM cosim_block(0x00002474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002474u); #endif /* 0xBFC20448: 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, 0x00002474u); 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(0x00002474u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2044C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002478u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20450: 1500FFF8 bne $t0, $zero, 0xBFC20434 */ uint32_t psx_brA_BFC20450 = cpu->gpr[8]; uint32_t psx_brB_BFC20450 = cpu->gpr[0]; psx_taken_BFC20450 = (psx_brA_BFC20450 != psx_brB_BFC20450); psx_delay_BFC20450 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x114u); #endif /* 0xBFC20454: 0048202B sltu $a0, $v0, $t0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[8]; cpu->gpr[4] = (uint32_t)(cpu->gpr[2] < cpu->gpr[8] ? 1 : 0); PGXP_ALU(0x0048202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002480u); #endif if (psx_delay_BFC20450) { psx_delay_BFC20450 = 0; if (psx_taken_BFC20450) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002460u); goto label_BFC20434; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002484u); } label_BFC20458: #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, 0x850u); #endif /* 0xBFC20458: 00CB202B sltu $a0, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2045C: 14800012 bne $a0, $zero, 0xBFC204A8 */ uint32_t psx_brA_BFC2045C = cpu->gpr[4]; uint32_t psx_brB_BFC2045C = cpu->gpr[0]; psx_taken_BFC2045C = (psx_brA_BFC2045C != psx_brB_BFC2045C); psx_delay_BFC2045C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20460: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000248Cu); #endif if (psx_delay_BFC2045C) { psx_delay_BFC2045C = 0; if (psx_taken_BFC2045C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024D4u); goto label_BFC204A8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002490u); } label_BFC20464: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002490u); #endif #ifdef PSX_COSIM cosim_block(0x00002490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC20464: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002490u); #endif label_BFC20468: #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, 0x80000000u); #endif /* 0xBFC20468: 0C000822 jal 0xB0002088 */ cpu->gpr[31] = 0x0000249Cu; /* jal link before delay slot */ psx_delay_BFC20468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC2046C: AFA50010 sw $a1, 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, 0x00002498u); return; } g_debug_last_store_pc = 0x00002498u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002498u); #endif if (psx_delay_BFC20468) { psx_delay_BFC20468 = 0; cpu->gpr[31] = 0x0000249Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002088u); cpu->pc = 0x00002088u; return; } label_BFC20470: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000249Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000249Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000249Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x205u); #endif /* 0xBFC20470: 00404825 or $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(0x00404825u, cpu->gpr[9], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000249Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024A0u); #endif /* 0xBFC20474: 8FA50010 lw $a1, 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, 0x000024A0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000024A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800u); #endif /* 0xBFC20478: 256BFFF8 addiu $t3, $t3, -8 */ { uint32_t _pgx1 = cpu->gpr[11]; cpu->gpr[11] = (uint32_t)((int32_t)cpu->gpr[11] + (-8)); PGXP_ALU(0x256BFFF8u, cpu->gpr[11], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x000024A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC2047C: 1120FFA2 beq $t1, $zero, 0xBFC20308 */ uint32_t psx_brA_BFC2047C = cpu->gpr[9]; uint32_t psx_brB_BFC2047C = cpu->gpr[0]; psx_taken_BFC2047C = (psx_brA_BFC2047C == psx_brB_BFC2047C); psx_delay_BFC2047C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20480: 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(0x000024ACu); #endif if (psx_delay_BFC2047C) { psx_delay_BFC2047C = 0; if (psx_taken_BFC2047C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002334u); goto label_BFC20308; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024B0u); } label_BFC20484: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024B0u); #endif #ifdef PSX_COSIM cosim_block(0x000024B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC20484: 144B002E bne $v0, $t3, 0xBFC20540 */ uint32_t psx_brA_BFC20484 = cpu->gpr[2]; uint32_t psx_brB_BFC20484 = cpu->gpr[11]; psx_taken_BFC20484 = (psx_brA_BFC20484 != psx_brB_BFC20484); psx_delay_BFC20484 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100Cu); #endif /* 0xBFC20488: 01821821 addu $v1, $t4, $v0 */ { uint32_t _pgx1 = cpu->gpr[12]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[12] + cpu->gpr[2]; PGXP_ALU(0x01821821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000024B4u); #endif if (psx_delay_BFC20484) { psx_delay_BFC20484 = 0; if (psx_taken_BFC20484) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000256Cu); cpu->pc = 0x0000256Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024B8u); } label_BFC2048C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024B8u); #endif #ifdef PSX_COSIM cosim_block(0x000024B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2048C: 0C00086C jal 0xB00021B0 */ cpu->gpr[31] = 0x000024C0u; /* jal link before delay slot */ psx_delay_BFC2048C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1011u); #endif /* 0xBFC20490: 01802025 or $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(0x01802025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000024BCu); #endif if (psx_delay_BFC2048C) { psx_delay_BFC2048C = 0; cpu->gpr[31] = 0x000024C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); cpu->pc = 0x000021B0u; return; } label_BFC20494: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024C0u); #endif #ifdef PSX_COSIM cosim_block(0x000024C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20494: 1000FF9C beq $zero, $zero, 0xBFC20308 */ 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, 0x1u); #endif /* 0xBFC20498: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000024C4u); #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, 0x00002334u); goto label_BFC20308; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024C8u); } label_BFC2049C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024C8u); #endif #ifdef PSX_COSIM cosim_block(0x000024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x850u); #endif /* 0xBFC2049C: 00CB202B sltu $a0, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = (uint32_t)(cpu->gpr[6] < cpu->gpr[11] ? 1 : 0); PGXP_ALU(0x00CB202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000024C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC204A0: 10800012 beq $a0, $zero, 0xBFC204EC */ uint32_t psx_brA_BFC204A0 = cpu->gpr[4]; uint32_t psx_brB_BFC204A0 = cpu->gpr[0]; psx_taken_BFC204A0 = (psx_brA_BFC204A0 == psx_brB_BFC204A0); psx_delay_BFC204A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC204A4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000024D0u); #endif if (psx_delay_BFC204A0) { psx_delay_BFC204A0 = 0; if (psx_taken_BFC204A0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002518u); goto label_BFC204EC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024D4u); } label_BFC204A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024D4u); #endif #ifdef PSX_COSIM cosim_block(0x000024D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x64u); #endif /* 0xBFC204A8: 00462821 addu $a1, $v0, $a2 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[2] + cpu->gpr[6]; PGXP_ALU(0x00462821u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000024D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC204AC: 1103000D beq $t0, $v1, 0xBFC204E4 */ uint32_t psx_brA_BFC204AC = cpu->gpr[8]; uint32_t psx_brB_BFC204AC = cpu->gpr[3]; psx_taken_BFC204AC = (psx_brA_BFC204AC == psx_brB_BFC204AC); psx_delay_BFC204AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x850u); #endif /* 0xBFC204B0: 01662023 subu $a0, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[4] = cpu->gpr[11] - cpu->gpr[6]; PGXP_ALU(0x01662023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000024DCu); #endif if (psx_delay_BFC204AC) { psx_delay_BFC204AC = 0; if (psx_taken_BFC204AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002510u); goto label_BFC204E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024E0u); } label_BFC204B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024E0u); #endif #ifdef PSX_COSIM cosim_block(0x000024E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC204B4: 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(0x000024E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x104u); #endif /* 0xBFC204B8: 1502000A bne $t0, $v0, 0xBFC204E4 */ uint32_t psx_brA_BFC204B8 = cpu->gpr[8]; uint32_t psx_brB_BFC204B8 = cpu->gpr[2]; 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(0x000024E8u); #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, 0x00002510u); goto label_BFC204E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024ECu); } label_BFC204C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000024ECu); #endif #ifdef PSX_COSIM cosim_block(0x000024ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024ECu); #endif /* 0xBFC204C0: 8D020000 lw $v0, 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, 0x000024ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100u); } PGXP_LOAD(0x8D020000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000024ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000024F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC204C4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000024F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC204C8: 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, 0x000024F4u); return; } g_debug_last_store_pc = 0x000024F4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACA20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000024F4u); #endif /* 0xBFC204CC: 8D020004 lw $v0, 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, 0x000024F8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100u); } PGXP_LOAD(0x8D020004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000024F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC204D0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000024FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC204D4: 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(0x00002500u); #endif label_BFC204D8: #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, 0x30u); #endif /* 0xBFC204D8: 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, 0x00002504u); return; } g_debug_last_store_pc = 0x00002504u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xACA40004u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC204DC: 1000FFC8 beq $zero, $zero, 0xBFC20400 */ uint32_t psx_brA_BFC204DC = cpu->gpr[0]; uint32_t psx_brB_BFC204DC = cpu->gpr[0]; psx_taken_BFC204DC = (psx_brA_BFC204DC == psx_brB_BFC204DC); psx_delay_BFC204DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x420u); #endif /* 0xBFC204E0: 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, 0x0000250Cu); return; } g_debug_last_store_pc = 0x0000250Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAD450000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000250Cu); #endif if (psx_delay_BFC204DC) { psx_delay_BFC204DC = 0; if (psx_taken_BFC204DC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000242Cu); goto label_BFC20400; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002510u); } label_BFC204E4: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC204E4: 1000FFFC beq $zero, $zero, 0xBFC204D8 */ uint32_t psx_brA_BFC204E4 = cpu->gpr[0]; uint32_t psx_brB_BFC204E4 = cpu->gpr[0]; psx_taken_BFC204E4 = (psx_brA_BFC204E4 == psx_brB_BFC204E4); psx_delay_BFC204E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x120u); #endif /* 0xBFC204E8: 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, 0x00002514u); return; } g_debug_last_store_pc = 0x00002514u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xACA80000u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002514u); #endif if (psx_delay_BFC204E4) { psx_delay_BFC204E4 = 0; if (psx_taken_BFC204E4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002504u); goto label_BFC204D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002518u); } label_BFC204EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002518u); #endif #ifdef PSX_COSIM cosim_block(0x00002518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC204EC: 1103FFDE beq $t0, $v1, 0xBFC20468 */ uint32_t psx_brA_BFC204EC = cpu->gpr[8]; uint32_t psx_brB_BFC204EC = cpu->gpr[3]; psx_taken_BFC204EC = (psx_brA_BFC204EC == psx_brB_BFC204EC); psx_delay_BFC204EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC204F0: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000251Cu); #endif if (psx_delay_BFC204EC) { psx_delay_BFC204EC = 0; if (psx_taken_BFC204EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002494u); goto label_BFC20468; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002520u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002520u); cpu->pc = 0x00002520u; return; /* fallthrough */ } void OpenBIOS_func_00002520(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002520u); int psx_delay_BFC204F8 = 0; int psx_taken_BFC204F8 = 0; int psx_delay_BFC2050C = 0; int psx_taken_BFC2050C = 0; int psx_delay_BFC20518 = 0; int psx_taken_BFC20518 = 0; int psx_delay_BFC20538 = 0; int psx_taken_BFC20538 = 0; int psx_delay_BFC2054C = 0; int psx_taken_BFC2054C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20540u: goto label_BFC20540; case 0xBFC20500u: goto label_BFC20500; case 0xBFC20514u: goto label_BFC20514; case 0xBFC20520u: goto label_BFC20520; case 0xBFC20538u: goto label_BFC20538; default: break; } } label_BFC204F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002520u); #endif #ifdef PSX_COSIM cosim_block(0x00002520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80Cu); #endif /* 0xBFC204F4: 004B1821 addu $v1, $v0, $t3 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[11]; PGXP_ALU(0x004B1821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x108u); #endif /* 0xBFC204F8: 1503FFDA bne $t0, $v1, 0xBFC20464 */ uint32_t psx_brA_BFC204F8 = cpu->gpr[8]; uint32_t psx_brB_BFC204F8 = cpu->gpr[3]; psx_taken_BFC204F8 = (psx_brA_BFC204F8 != psx_brB_BFC204F8); psx_delay_BFC204F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x850u); #endif /* 0xBFC204FC: 00CB2023 subu $a0, $a2, $t3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[4] = cpu->gpr[6] - cpu->gpr[11]; PGXP_ALU(0x00CB2023u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002528u); #endif if (psx_delay_BFC204F8) { psx_delay_BFC204F8 = 0; if (psx_taken_BFC204F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002490u); cpu->pc = 0x00002490u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000252Cu); } label_BFC20500: #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 /* 0xBFC20500: 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, 0x0000252Cu); 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(0x0000252Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20504: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x218u); #endif /* 0xBFC20508: 0124182B sltu $v1, $t1, $a0 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[3] = (uint32_t)(cpu->gpr[9] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0124182Bu, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2050C: 1460FFD5 bne $v1, $zero, 0xBFC20464 */ uint32_t psx_brA_BFC2050C = cpu->gpr[3]; uint32_t psx_brB_BFC2050C = cpu->gpr[0]; psx_taken_BFC2050C = (psx_brA_BFC2050C != psx_brB_BFC2050C); psx_delay_BFC2050C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20510: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000253Cu); #endif if (psx_delay_BFC2050C) { psx_delay_BFC2050C = 0; if (psx_taken_BFC2050C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002490u); cpu->pc = 0x00002490u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002540u); } label_BFC20514: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002540u); #endif #ifdef PSX_COSIM cosim_block(0x00002540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002540u); #endif /* 0xBFC20514: 8D030000 lw $v1, 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, 0x00002540u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100u); } PGXP_LOAD(0x8D030000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x210u); #endif /* 0xBFC20518: 11240007 beq $t1, $a0, 0xBFC20538 */ uint32_t psx_brA_BFC20518 = cpu->gpr[9]; uint32_t psx_brB_BFC20518 = cpu->gpr[4]; psx_taken_BFC20518 = (psx_brA_BFC20518 == psx_brB_BFC20518); psx_delay_BFC20518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC2051C: 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(0x00002548u); #endif if (psx_delay_BFC20518) { psx_delay_BFC20518 = 0; if (psx_taken_BFC20518) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002564u); goto label_BFC20538; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000254Cu); } label_BFC20520: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000254Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20520: 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, 0x0000254Cu); return; } g_debug_last_store_pc = 0x0000254Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000254Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002550u); #endif /* 0xBFC20524: 8D030004 lw $v1, 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, 0x00002550u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x100u); } PGXP_LOAD(0x8D030004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x840u); #endif /* 0xBFC20528: 01665823 subu $t3, $t3, $a2 */ { uint32_t _pgx1 = cpu->gpr[11]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[11] = cpu->gpr[11] - cpu->gpr[6]; PGXP_ALU(0x01665823u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x808u); #endif /* 0xBFC2052C: 006B5821 addu $t3, $v1, $t3 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[11]; cpu->gpr[11] = cpu->gpr[3] + cpu->gpr[11]; PGXP_ALU(0x006B5821u, cpu->gpr[11], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x804u); #endif /* 0xBFC20530: AC4B0004 sw $t3, 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, 0x0000255Cu); return; } g_debug_last_store_pc = 0x0000255Cu; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAC4B0004u, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x0000255Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xDu); #endif /* 0xBFC20534: 00401825 or $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(0x00401825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002560u); #endif label_BFC20538: #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, 0x1u); #endif /* 0xBFC20538: 1000FFB1 beq $zero, $zero, 0xBFC20400 */ uint32_t psx_brA_BFC20538 = cpu->gpr[0]; uint32_t psx_brB_BFC20538 = cpu->gpr[0]; psx_taken_BFC20538 = (psx_brA_BFC20538 == psx_brB_BFC20538); psx_delay_BFC20538 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x408u); #endif /* 0xBFC2053C: AD430000 sw $v1, 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, 0x00002568u); return; } g_debug_last_store_pc = 0x00002568u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAD430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002568u); #endif if (psx_delay_BFC20538) { psx_delay_BFC20538 = 0; if (psx_taken_BFC20538) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000242Cu); cpu->pc = 0x0000242Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000256Cu); } label_BFC20540: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000256Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000256Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000256Cu); #endif /* 0xBFC20540: 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, 0x0000256Cu); 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(0x0000256Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20Cu); #endif /* 0xBFC20544: 01221821 addu $v1, $t1, $v0 */ { uint32_t _pgx1 = cpu->gpr[9]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[9] + cpu->gpr[2]; PGXP_ALU(0x01221821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20548: 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, 0x00002574u); return; } g_debug_last_store_pc = 0x00002574u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC640000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002574u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2054C: 1000FFCD beq $zero, $zero, 0xBFC20484 */ uint32_t psx_brA_BFC2054C = cpu->gpr[0]; uint32_t psx_brB_BFC2054C = cpu->gpr[0]; psx_taken_BFC2054C = (psx_brA_BFC2054C == psx_brB_BFC2054C); psx_delay_BFC2054C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20550: 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(0x0000257Cu); #endif if (psx_delay_BFC2054C) { psx_delay_BFC2054C = 0; if (psx_taken_BFC2054C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000024B0u); cpu->pc = 0x000024B0u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002580u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002580u); cpu->pc = 0x00002580u; return; /* fallthrough */ } void OpenBIOS_func_00002580(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002580u); int psx_delay_BFC20554 = 0; label_BFC20554: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20554: 08000822 j 0xB0002088 */ psx_delay_BFC20554 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20558: 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(0x00002584u); #endif if (psx_delay_BFC20554) { psx_delay_BFC20554 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002088u); cpu->pc = 0x00002088u; return; } } void OpenBIOS_func_00002588(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002588u); int psx_delay_BFC2055C = 0; label_BFC2055C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002588u); #endif #ifdef PSX_COSIM cosim_block(0x00002588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002588u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC2055C: 0800086C j 0xB00021B0 */ psx_delay_BFC2055C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20560: 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(0x0000258Cu); #endif if (psx_delay_BFC2055C) { psx_delay_BFC2055C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); cpu->pc = 0x000021B0u; return; } } void OpenBIOS_func_00002590(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002590u); int psx_delay_BFC20564 = 0; label_BFC20564: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002590u); #endif #ifdef PSX_COSIM cosim_block(0x00002590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20564: 080008C2 j 0xB0002308 */ psx_delay_BFC20564 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC20568: 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(0x00002594u); #endif if (psx_delay_BFC20564) { psx_delay_BFC20564 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002308u); cpu->pc = 0x00002308u; return; } } void OpenBIOS_func_00002598(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002598u); int psx_delay_BFC20594 = 0; label_BFC2056C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002598u); #endif #ifdef PSX_COSIM cosim_block(0x00002598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2056C: 2403FFF8 addiu $v1, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2403FFF8u, cpu->gpr[3], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x00002598u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20570: 24840007 addiu $a0, $a0, 7 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (7)); PGXP_ALU(0x24840007u, cpu->gpr[4], _pgx1, 0x00000007u); } #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, 0x18u); #endif /* 0xBFC20574: 00832024 and $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3]; PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000025A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20578: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000025A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2057C: AC446544 sw $a0, 25924($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25924; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25924)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025A8u); return; } g_debug_last_store_pc = 0x000025A8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC446544u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000025A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20580: 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(0x000025ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20584: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000025B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20588: 24426538 addiu $v0, $v0, 25912 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25912)); PGXP_ALU(0x24426538u, cpu->gpr[2], _pgx1, 0x00006538u); } #ifdef PSX_COSIM cosim_instr(0x000025B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC2058C: 00A32824 and $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(0x00A32824u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000025B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20590: 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, 0x000025BCu); return; } g_debug_last_store_pc = 0x000025BCu; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #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, 0x80000001u); #endif /* 0xBFC20594: 03E00008 jr $ra */ psx_delay_BFC20594 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC20598: AC850004 sw $a1, 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, 0x000025C4u); return; } g_debug_last_store_pc = 0x000025C4u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000025C4u); #endif if (psx_delay_BFC20594) { psx_delay_BFC20594 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000025C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000025C8u); int psx_delay_BFC2059C = 0; label_BFC2059C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000025C8u); #endif #ifdef PSX_COSIM cosim_block(0x000025C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC2059C: 08000822 j 0xB0002088 */ psx_delay_BFC2059C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC205A0: 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(0x000025CCu); #endif if (psx_delay_BFC2059C) { psx_delay_BFC2059C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002088u); cpu->pc = 0x00002088u; return; } } void OpenBIOS_func_000025D0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000025D0u); int psx_delay_BFC205A4 = 0; label_BFC205A4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000025D0u); #endif #ifdef PSX_COSIM cosim_block(0x000025D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC205A4: 0800086C j 0xB00021B0 */ psx_delay_BFC205A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC205A8: 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(0x000025D4u); #endif if (psx_delay_BFC205A4) { psx_delay_BFC205A4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000021B0u); cpu->pc = 0x000021B0u; return; } } void OpenBIOS_func_000025D8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000025D8u); int psx_delay_BFC205AC = 0; label_BFC205AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000025D8u); #endif #ifdef PSX_COSIM cosim_block(0x000025D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC205AC: 080008C2 j 0xB0002308 */ psx_delay_BFC205AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC205B0: 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(0x000025DCu); #endif if (psx_delay_BFC205AC) { psx_delay_BFC205AC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002308u); cpu->pc = 0x00002308u; return; } } void OpenBIOS_func_000025E0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000025E0u); int psx_delay_BFC205DC = 0; label_BFC205B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000025E0u); #endif #ifdef PSX_COSIM cosim_block(0x000025E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC205B4: 2403FFF8 addiu $v1, $zero, -8 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-8)); PGXP_ALU(0x2403FFF8u, cpu->gpr[3], _pgx1, 0xFFFFFFF8u); } #ifdef PSX_COSIM cosim_instr(0x000025E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC205B8: 24840007 addiu $a0, $a0, 7 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (7)); PGXP_ALU(0x24840007u, cpu->gpr[4], _pgx1, 0x00000007u); } #ifdef PSX_COSIM cosim_instr(0x000025E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC205BC: 00832024 and $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] & cpu->gpr[3]; PGXP_ALU(0x00832024u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000025E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC205C0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000025ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000025F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC205C4: AC446540 sw $a0, 25920($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 25920; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (25920)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000025F0u); return; } g_debug_last_store_pc = 0x000025F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC446540u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000025F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC205C8: 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(0x000025F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC205CC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000025F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC205D0: 24426538 addiu $v0, $v0, 25912 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (25912)); PGXP_ALU(0x24426538u, cpu->gpr[2], _pgx1, 0x00006538u); } #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, 0x28u); #endif /* 0xBFC205D4: 00A32824 and $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(0x00A32824u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002600u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC205D8: 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, 0x00002604u); return; } g_debug_last_store_pc = 0x00002604u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC205DC: 03E00008 jr $ra */ psx_delay_BFC205DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC205E0: AC850004 sw $a1, 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, 0x0000260Cu); return; } g_debug_last_store_pc = 0x0000260Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC850004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000260Cu); #endif if (psx_delay_BFC205DC) { psx_delay_BFC205DC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002610(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002610u); int psx_delay_BFC20614 = 0; int psx_taken_BFC20614 = 0; int psx_delay_BFC2062C = 0; int psx_delay_BFC2063C = 0; int psx_taken_BFC2063C = 0; int psx_delay_BFC2064C = 0; int psx_taken_BFC2064C = 0; int psx_delay_BFC2065C = 0; int psx_taken_BFC2065C = 0; int psx_delay_BFC2066C = 0; int psx_taken_BFC2066C = 0; int psx_delay_BFC2067C = 0; int psx_taken_BFC2067C = 0; int psx_delay_BFC20684 = 0; int psx_taken_BFC20684 = 0; int psx_delay_BFC20694 = 0; int psx_taken_BFC20694 = 0; int psx_delay_BFC206A0 = 0; int psx_delay_BFC206B0 = 0; int psx_taken_BFC206B0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20610u: goto label_BFC20610; case 0xBFC2061Cu: goto label_BFC2061C; case 0xBFC20634u: goto label_BFC20634; case 0xBFC20644u: goto label_BFC20644; case 0xBFC20654u: goto label_BFC20654; case 0xBFC20664u: goto label_BFC20664; case 0xBFC20674u: goto label_BFC20674; case 0xBFC2067Cu: goto label_BFC2067C; case 0xBFC20684u: goto label_BFC20684; case 0xBFC2068Cu: goto label_BFC2068C; case 0xBFC2069Cu: goto label_BFC2069C; case 0xBFC206A8u: goto label_BFC206A8; default: break; } } label_BFC205E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002610u); #endif #ifdef PSX_COSIM cosim_block(0x00002610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC205E4: 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(0x00002610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC205E8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC205EC: 24420100 addiu $v0, $v0, 256 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (256)); PGXP_ALU(0x24420100u, cpu->gpr[2], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x00002618u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC205F0: 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, 0x0000261Cu); return; } g_debug_last_store_pc = 0x0000261Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x0000261Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC205F4: 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, 0x00002620u); return; } g_debug_last_store_pc = 0x00002620u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC205F8: 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, 0x00002624u); return; } g_debug_last_store_pc = 0x00002624u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00002624u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC205FC: 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, 0x00002628u); return; } g_debug_last_store_pc = 0x00002628u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002628u); #endif /* 0xBFC20600: 8C500020 lw $s0, 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, 0x0000262Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x4u); } PGXP_LOAD(0x8C500020u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x0000262Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002630u); #endif /* 0xBFC20604: 8C510024 lw $s1, 36($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002630u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x4u); } PGXP_LOAD(0x8C510024u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00002630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40001u); #endif /* 0xBFC20608: 24122000 addiu $s2, $zero, 8192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); PGXP_ALU(0x24122000u, cpu->gpr[18], _pgx1, 0x00002000u); } #ifdef PSX_COSIM cosim_instr(0x00002634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC2060C: 02118821 addu $s1, $s0, $s1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[16] + cpu->gpr[17]; PGXP_ALU(0x02118821u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002638u); #endif label_BFC20610: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000263Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000263Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000263Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30004u); #endif /* 0xBFC20610: 0211102B sltu $v0, $s0, $s1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[2] = (uint32_t)(cpu->gpr[16] < cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0211102Bu, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000263Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20614: 14400007 bne $v0, $zero, 0xBFC20634 */ uint32_t psx_brA_BFC20614 = cpu->gpr[2]; uint32_t psx_brB_BFC20614 = cpu->gpr[0]; psx_taken_BFC20614 = (psx_brA_BFC20614 != psx_brB_BFC20614); psx_delay_BFC20614 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20618: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002644u); #endif if (psx_delay_BFC20614) { psx_delay_BFC20614 = 0; if (psx_taken_BFC20614) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002660u); goto label_BFC20634; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002648u); } label_BFC2061C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002648u); #endif #ifdef PSX_COSIM cosim_block(0x00002648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002648u); #endif /* 0xBFC2061C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002648u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002648u); #endif /* 0xBFC20620: 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, 0x0000264Cu); 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(0x0000264Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002650u); #endif /* 0xBFC20624: 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, 0x00002650u); 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(0x00002650u); #endif /* 0xBFC20628: 8FB00010 lw $s0, 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, 0x00002654u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC2062C: 03E00008 jr $ra */ psx_delay_BFC2062C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20630: 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(0x0000265Cu); #endif if (psx_delay_BFC2062C) { psx_delay_BFC2062C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC20634: #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 /* 0xBFC20634: 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, 0x00002660u); 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(0x00002660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20638: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC2063C: 1452000F bne $v0, $s2, 0xBFC2067C */ uint32_t psx_brA_BFC2063C = cpu->gpr[2]; uint32_t psx_brB_BFC2063C = cpu->gpr[18]; psx_taken_BFC2063C = (psx_brA_BFC2063C != psx_brB_BFC2063C); psx_delay_BFC2063C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20640: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000266Cu); #endif if (psx_delay_BFC2063C) { psx_delay_BFC2063C = 0; if (psx_taken_BFC2063C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A8u); goto label_BFC2067C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002670u); } label_BFC20644: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002670u); #endif #ifdef PSX_COSIM cosim_block(0x00002670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002670u); #endif /* 0xBFC20644: 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, 0x00002670u); 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(0x00002670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20648: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002674u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2064C: 1444000B bne $v0, $a0, 0xBFC2067C */ uint32_t psx_brA_BFC2064C = cpu->gpr[2]; uint32_t psx_brB_BFC2064C = cpu->gpr[4]; psx_taken_BFC2064C = (psx_brA_BFC2064C != psx_brB_BFC2064C); psx_delay_BFC2064C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20650: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000267Cu); #endif if (psx_delay_BFC2064C) { psx_delay_BFC2064C = 0; if (psx_taken_BFC2064C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A8u); goto label_BFC2067C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002680u); } label_BFC20654: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002680u); #endif #ifdef PSX_COSIM cosim_block(0x00002680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002680u); #endif /* 0xBFC20654: 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, 0x00002680u); 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(0x00002680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20658: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC2065C: 14450007 bne $v0, $a1, 0xBFC2067C */ uint32_t psx_brA_BFC2065C = cpu->gpr[2]; uint32_t psx_brB_BFC2065C = cpu->gpr[5]; psx_taken_BFC2065C = (psx_brA_BFC2065C != psx_brB_BFC2065C); psx_delay_BFC2065C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20660: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000268Cu); #endif if (psx_delay_BFC2065C) { psx_delay_BFC2065C = 0; if (psx_taken_BFC2065C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A8u); goto label_BFC2067C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002690u); } label_BFC20664: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002690u); #endif #ifdef PSX_COSIM cosim_block(0x00002690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002690u); #endif /* 0xBFC20664: 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, 0x00002690u); 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(0x00002690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20668: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC2066C: 14520005 bne $v0, $s2, 0xBFC20684 */ uint32_t psx_brA_BFC2066C = cpu->gpr[2]; uint32_t psx_brB_BFC2066C = cpu->gpr[18]; psx_taken_BFC2066C = (psx_brA_BFC2066C != psx_brB_BFC2066C); psx_delay_BFC2066C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20670: 24031000 addiu $v1, $zero, 4096 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (4096)); PGXP_ALU(0x24031000u, cpu->gpr[3], _pgx1, 0x00001000u); } #ifdef PSX_COSIM cosim_instr(0x0000269Cu); #endif if (psx_delay_BFC2066C) { psx_delay_BFC2066C = 0; if (psx_taken_BFC2066C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026B0u); goto label_BFC20684; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A0u); } label_BFC20674: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026A0u); #endif #ifdef PSX_COSIM cosim_block(0x000026A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20674: 24024000 addiu $v0, $zero, 16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); PGXP_ALU(0x24024000u, cpu->gpr[2], _pgx1, 0x00004000u); } #ifdef PSX_COSIM cosim_instr(0x000026A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC20678: 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, 0x000026A4u); return; } g_debug_last_store_pc = 0x000026A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAE020004u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000026A4u); #endif label_BFC2067C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026A8u); #endif #ifdef PSX_COSIM cosim_block(0x000026A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2067C: 1000FFE4 beq $zero, $zero, 0xBFC20610 */ uint32_t psx_brA_BFC2067C = cpu->gpr[0]; uint32_t psx_brB_BFC2067C = cpu->gpr[0]; psx_taken_BFC2067C = (psx_brA_BFC2067C == psx_brB_BFC2067C); psx_delay_BFC2067C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC20680: 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(0x000026ACu); #endif if (psx_delay_BFC2067C) { psx_delay_BFC2067C = 0; if (psx_taken_BFC2067C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000263Cu); goto label_BFC20610; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026B0u); } label_BFC20684: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026B0u); #endif #ifdef PSX_COSIM cosim_block(0x000026B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20684: 1443FFFD bne $v0, $v1, 0xBFC2067C */ uint32_t psx_brA_BFC20684 = cpu->gpr[2]; uint32_t psx_brB_BFC20684 = cpu->gpr[3]; psx_taken_BFC20684 = (psx_brA_BFC20684 != psx_brB_BFC20684); psx_delay_BFC20684 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20688: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000026B4u); #endif if (psx_delay_BFC20684) { psx_delay_BFC20684 = 0; if (psx_taken_BFC20684) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A8u); goto label_BFC2067C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026B8u); } label_BFC2068C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026B8u); #endif #ifdef PSX_COSIM cosim_block(0x000026B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026B8u); #endif /* 0xBFC2068C: 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, 0x000026B8u); 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(0x000026B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20690: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000026BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20694: 1040FFF9 beq $v0, $zero, 0xBFC2067C */ uint32_t psx_brA_BFC20694 = cpu->gpr[2]; uint32_t psx_brB_BFC20694 = cpu->gpr[0]; psx_taken_BFC20694 = (psx_brA_BFC20694 == psx_brB_BFC20694); psx_delay_BFC20694 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20698: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000026C4u); #endif if (psx_delay_BFC20694) { psx_delay_BFC20694 = 0; if (psx_taken_BFC20694) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026A8u); goto label_BFC2067C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026C8u); } label_BFC2069C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026C8u); #endif #ifdef PSX_COSIM cosim_block(0x000026C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC2069C: 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, 0x000026C8u); return; } g_debug_last_store_pc = 0x000026C8u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50024u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000026C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC206A0: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000026D4u; /* jalr link before delay slot */ psx_delay_BFC206A0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC206A4: 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, 0x000026D0u); return; } g_debug_last_store_pc = 0x000026D0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40020u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000026D0u); #endif if (psx_delay_BFC206A0) { psx_delay_BFC206A0 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000026D4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC206A8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026D4u); #endif #ifdef PSX_COSIM cosim_block(0x000026D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026D4u); #endif /* 0xBFC206A8: 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, 0x000026D4u); 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(0x000026D4u); #endif /* 0xBFC206AC: 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, 0x000026D8u); 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(0x000026D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206B0: 1000FFD7 beq $zero, $zero, 0xBFC20610 */ uint32_t psx_brA_BFC206B0 = cpu->gpr[0]; uint32_t psx_brB_BFC206B0 = cpu->gpr[0]; psx_taken_BFC206B0 = (psx_brA_BFC206B0 == psx_brB_BFC206B0); psx_delay_BFC206B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC206B4: 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(0x000026E0u); #endif if (psx_delay_BFC206B0) { psx_delay_BFC206B0 = 0; if (psx_taken_BFC206B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000263Cu); goto label_BFC20610; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; /* fallthrough */ } void OpenBIOS_func_000026E4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000026E4u); int psx_delay_BFC206D4 = 0; int psx_taken_BFC206D4 = 0; int psx_delay_BFC206DC = 0; int psx_delay_BFC206EC = 0; int psx_taken_BFC206EC = 0; int psx_delay_BFC206FC = 0; int psx_taken_BFC206FC = 0; int psx_delay_BFC2070C = 0; int psx_taken_BFC2070C = 0; int psx_delay_BFC2071C = 0; int psx_taken_BFC2071C = 0; int psx_delay_BFC20728 = 0; int psx_taken_BFC20728 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC206D0u: goto label_BFC206D0; case 0xBFC206DCu: goto label_BFC206DC; case 0xBFC206E4u: goto label_BFC206E4; case 0xBFC206F4u: goto label_BFC206F4; case 0xBFC20704u: goto label_BFC20704; case 0xBFC20714u: goto label_BFC20714; case 0xBFC20724u: goto label_BFC20724; case 0xBFC20728u: goto label_BFC20728; default: break; } } label_BFC206B8: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC206B8: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000026E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC206BC: 24630100 addiu $v1, $v1, 256 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (256)); PGXP_ALU(0x24630100u, cpu->gpr[3], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x000026E8u); #endif /* 0xBFC206C0: 8C620020 lw $v0, 32($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000026ECu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C620020u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000026ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026F0u); #endif /* 0xBFC206C4: 8C630024 lw $v1, 36($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000026F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630024u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000026F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC206C8: 24074000 addiu $a3, $zero, 16384 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (16384)); PGXP_ALU(0x24074000u, cpu->gpr[7], _pgx1, 0x00004000u); } #ifdef PSX_COSIM cosim_instr(0x000026F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC206CC: 00431821 addu $v1, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[2] + cpu->gpr[3]; PGXP_ALU(0x00431821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000026F8u); #endif label_BFC206D0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000026FCu); #endif #ifdef PSX_COSIM cosim_block(0x000026FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000026FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4Cu); #endif /* 0xBFC206D0: 0043302B sltu $a2, $v0, $v1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[2] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0043302Bu, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000026FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC206D4: 14C00003 bne $a2, $zero, 0xBFC206E4 */ uint32_t psx_brA_BFC206D4 = cpu->gpr[6]; uint32_t psx_brB_BFC206D4 = cpu->gpr[0]; psx_taken_BFC206D4 = (psx_brA_BFC206D4 != psx_brB_BFC206D4); psx_delay_BFC206D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206D8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002704u); #endif if (psx_delay_BFC206D4) { psx_delay_BFC206D4 = 0; if (psx_taken_BFC206D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002710u); goto label_BFC206E4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002708u); } label_BFC206DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002708u); #endif #ifdef PSX_COSIM cosim_block(0x00002708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC206DC: 03E00008 jr $ra */ psx_delay_BFC206DC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000270Cu); #endif if (psx_delay_BFC206DC) { psx_delay_BFC206DC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC206E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002710u); #endif #ifdef PSX_COSIM cosim_block(0x00002710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002710u); #endif /* 0xBFC206E4: 8C460004 lw $a2, 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, 0x00002710u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C460004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206E8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC206EC: 14C7000E bne $a2, $a3, 0xBFC20728 */ uint32_t psx_brA_BFC206EC = cpu->gpr[6]; uint32_t psx_brB_BFC206EC = cpu->gpr[7]; psx_taken_BFC206EC = (psx_brA_BFC206EC != psx_brB_BFC206EC); psx_delay_BFC206EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000271Cu); #endif if (psx_delay_BFC206EC) { psx_delay_BFC206EC = 0; if (psx_taken_BFC206EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002754u); goto label_BFC20728; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002720u); } label_BFC206F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002720u); #endif #ifdef PSX_COSIM cosim_block(0x00002720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002720u); #endif /* 0xBFC206F4: 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, 0x00002720u); 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(0x00002720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC206F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC206FC: 14C4000A bne $a2, $a0, 0xBFC20728 */ uint32_t psx_brA_BFC206FC = cpu->gpr[6]; uint32_t psx_brB_BFC206FC = cpu->gpr[4]; psx_taken_BFC206FC = (psx_brA_BFC206FC != psx_brB_BFC206FC); psx_delay_BFC206FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20700: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000272Cu); #endif if (psx_delay_BFC206FC) { psx_delay_BFC206FC = 0; if (psx_taken_BFC206FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002754u); goto label_BFC20728; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002730u); } label_BFC20704: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002730u); #endif #ifdef PSX_COSIM cosim_block(0x00002730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002730u); #endif /* 0xBFC20704: 8C460008 lw $a2, 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, 0x00002730u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C460008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20708: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC2070C: 14C50006 bne $a2, $a1, 0xBFC20728 */ uint32_t psx_brA_BFC2070C = cpu->gpr[6]; uint32_t psx_brB_BFC2070C = cpu->gpr[5]; psx_taken_BFC2070C = (psx_brA_BFC2070C != psx_brB_BFC2070C); psx_delay_BFC2070C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20710: 24082000 addiu $t0, $zero, 8192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (8192)); PGXP_ALU(0x24082000u, cpu->gpr[8], _pgx1, 0x00002000u); } #ifdef PSX_COSIM cosim_instr(0x0000273Cu); #endif if (psx_delay_BFC2070C) { psx_delay_BFC2070C = 0; if (psx_taken_BFC2070C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002754u); goto label_BFC20728; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002740u); } label_BFC20714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002740u); #endif #ifdef PSX_COSIM cosim_block(0x00002740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002740u); #endif /* 0xBFC20714: 8C46000C lw $a2, 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, 0x00002740u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x4u); } PGXP_LOAD(0x8C46000Cu, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20718: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002744u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x140u); #endif /* 0xBFC2071C: 14C80002 bne $a2, $t0, 0xBFC20728 */ uint32_t psx_brA_BFC2071C = cpu->gpr[6]; uint32_t psx_brB_BFC2071C = cpu->gpr[8]; psx_taken_BFC2071C = (psx_brA_BFC2071C != psx_brB_BFC2071C); psx_delay_BFC2071C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20720: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000274Cu); #endif if (psx_delay_BFC2071C) { psx_delay_BFC2071C = 0; if (psx_taken_BFC2071C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002754u); goto label_BFC20728; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002750u); } label_BFC20724: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002750u); #endif #ifdef PSX_COSIM cosim_block(0x00002750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20724: 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, 0x00002750u); return; } g_debug_last_store_pc = 0x00002750u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002750u); #endif label_BFC20728: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002754u); #endif #ifdef PSX_COSIM cosim_block(0x00002754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002754u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20728: 1000FFE9 beq $zero, $zero, 0xBFC206D0 */ uint32_t psx_brA_BFC20728 = cpu->gpr[0]; 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, 0x4u); #endif /* 0xBFC2072C: 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(0x00002758u); #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, 0x000026FCu); goto label_BFC206D0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000275Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000275Cu); cpu->pc = 0x0000275Cu; return; /* fallthrough */ } void OpenBIOS_func_0000275C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000275Cu); int psx_delay_BFC20744 = 0; int psx_delay_BFC20768 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2074Cu: goto label_BFC2074C; default: break; } } label_BFC20730: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000275Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000275Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000275Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC20730: 00850018 mult $a0, $a1 */ { int64_t psx_p = (int64_t)(int32_t)cpu->gpr[4] * (int64_t)(int32_t)cpu->gpr[5]; cpu->lo = (uint32_t)((uint64_t)psx_p & 0xFFFFFFFFu); cpu->hi = (uint32_t)((uint64_t)psx_p >> 32); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_muldiv_set(cpu, psx_mult_latency_s(cpu->gpr[4])); #endif PGXP_MULDIV(0x00850018u, cpu->hi, cpu->lo, cpu->gpr[4], cpu->gpr[5]); #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, 0x20000000u); #endif /* 0xBFC20734: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00002760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC20738: 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, 0x00002764u); return; } g_debug_last_store_pc = 0x00002764u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002764u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC2073C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002768u); return; } g_debug_last_store_pc = 0x00002768u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC20740: 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(0x0000276Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC20744: 0C000960 jal 0xB0002580 */ cpu->gpr[31] = 0x00002778u; /* jal link before delay slot */ psx_delay_BFC20744 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC20748: 02002025 or $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(0x02002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002774u); #endif if (psx_delay_BFC20744) { psx_delay_BFC20744 = 0; cpu->gpr[31] = 0x00002778u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002580u); cpu->pc = 0x00002580u; return; } label_BFC2074C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002778u); #endif #ifdef PSX_COSIM cosim_block(0x00002778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC2074C: 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(0x00002778u); #endif /* 0xBFC20750: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[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, 0x10041u); #endif /* 0xBFC20754: 02003025 or $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(0x02003025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002780u); #endif /* 0xBFC20758: 8FB00010 lw $s0, 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, 0x00002784u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002784u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC2075C: 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(0x00002788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC20760: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #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, 0x2000001u); #endif /* 0xBFC20764: 241900A0 addiu $t9, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[25] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x241900A0u, cpu->gpr[25], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0x00002790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2000001u); #endif /* 0xBFC20768: 03200008 jr $t9 */ psx_delay_BFC20768 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC2076C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00002798u); #endif if (psx_delay_BFC20768) { psx_delay_BFC20768 = 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 OpenBIOS_func_0000279C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000279Cu); int psx_delay_BFC20778 = 0; label_BFC20770: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000279Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000279Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000279Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20770: 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(0x0000279Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20774: 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(0x000027A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20778: 03E00008 jr $ra */ psx_delay_BFC20778 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2077C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027A8u); #endif if (psx_delay_BFC20778) { psx_delay_BFC20778 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000027AC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000027ACu); int psx_delay_BFC207B8 = 0; int psx_delay_BFC207C4 = 0; int psx_taken_BFC207C4 = 0; int psx_delay_BFC207E0 = 0; int psx_taken_BFC207E0 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20788u: goto label_BFC20788; case 0xBFC2078Cu: goto label_BFC2078C; case 0xBFC20790u: goto label_BFC20790; case 0xBFC20794u: goto label_BFC20794; case 0xBFC20798u: goto label_BFC20798; case 0xBFC2079Cu: goto label_BFC2079C; case 0xBFC207A0u: goto label_BFC207A0; case 0xBFC207A4u: goto label_BFC207A4; case 0xBFC207A8u: goto label_BFC207A8; case 0xBFC207ACu: goto label_BFC207AC; case 0xBFC207B0u: goto label_BFC207B0; case 0xBFC207B4u: goto label_BFC207B4; case 0xBFC207B8u: goto label_BFC207B8; case 0xBFC207C0u: goto label_BFC207C0; case 0xBFC207CCu: goto label_BFC207CC; default: break; } } label_BFC20780: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027ACu); #endif #ifdef PSX_COSIM cosim_block(0x000027ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20780: 00000000 nop */ /* nop */ #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, 0x1u); #endif /* 0xBFC20784: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027B0u); #endif label_BFC20788: /* 0xBFC20788: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027B4u); cpu->pc = 0x000027B4u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027B4u); #endif #ifdef PSX_COSIM cosim_block(0x000027B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20788: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027B4u); #endif label_BFC2078C: /* 0xBFC2078C: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027B8u); cpu->pc = 0x000027B8u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027B8u); #endif #ifdef PSX_COSIM cosim_block(0x000027B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2078C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027B8u); #endif label_BFC20790: /* 0xBFC20790: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027BCu); cpu->pc = 0x000027BCu; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027BCu); #endif #ifdef PSX_COSIM cosim_block(0x000027BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000001u); #endif /* 0xBFC20790: 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(0x000027BCu); #endif label_BFC20794: /* 0xBFC20794: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027C0u); cpu->pc = 0x000027C0u; return; } #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 /* 0xBFC20794: 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, 0x000027C0u); 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(0x000027C0u); #endif label_BFC20798: /* 0xBFC20798: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027C4u); cpu->pc = 0x000027C4u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027C4u); #endif #ifdef PSX_COSIM cosim_block(0x000027C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20798: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027C4u); #endif label_BFC2079C: /* 0xBFC2079C: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027C8u); cpu->pc = 0x000027C8u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027C8u); #endif #ifdef PSX_COSIM cosim_block(0x000027C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027C8u); #endif /* 0xBFC2079C: 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, 0x000027C8u); 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(0x000027C8u); #endif label_BFC207A0: /* 0xBFC207A0: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027CCu); cpu->pc = 0x000027CCu; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027CCu); #endif #ifdef PSX_COSIM cosim_block(0x000027CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207A0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027CCu); #endif label_BFC207A4: /* 0xBFC207A4: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027D0u); cpu->pc = 0x000027D0u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027D0u); #endif #ifdef PSX_COSIM cosim_block(0x000027D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC207A4: 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(0x000027D0u); #endif label_BFC207A8: /* 0xBFC207A8: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027D4u); cpu->pc = 0x000027D4u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027D4u); #endif #ifdef PSX_COSIM cosim_block(0x000027D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000002u); #endif /* 0xBFC207A8: 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, 0x000027D4u); return; } g_debug_last_store_pc = 0x000027D4u; cpu->write_word(psx_addr, cpu->gpr[1]); } PGXP_STORE(0xAF410004u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x000027D4u); #endif label_BFC207AC: /* 0xBFC207AC: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027D8u); cpu->pc = 0x000027D8u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027D8u); #endif #ifdef PSX_COSIM cosim_block(0x000027D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000004u); #endif /* 0xBFC207AC: 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, 0x000027D8u); return; } g_debug_last_store_pc = 0x000027D8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAF420008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000027D8u); #endif label_BFC207B0: /* 0xBFC207B0: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027DCu); cpu->pc = 0x000027DCu; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027DCu); #endif #ifdef PSX_COSIM cosim_block(0x000027DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000008u); #endif /* 0xBFC207B0: 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, 0x000027DCu); return; } g_debug_last_store_pc = 0x000027DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAF43000Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000027DCu); #endif label_BFC207B4: /* 0xBFC207B4: kernel patch-range hook (RAM [0x000027B4,0x000027E4), * resume RAM 0x000027E4). 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(0x000027B4u) != 0x00000000u || cpu->read_word(0x000027B8u) != 0x00000000u || cpu->read_word(0x000027BCu) != 0x241A0100u || cpu->read_word(0x000027C0u) != 0x8F5A0008u || cpu->read_word(0x000027C4u) != 0x00000000u || cpu->read_word(0x000027C8u) != 0x8F5A0000u || cpu->read_word(0x000027CCu) != 0x00000000u || cpu->read_word(0x000027D0u) != 0x235A0008u || cpu->read_word(0x000027D4u) != 0xAF410004u || cpu->read_word(0x000027D8u) != 0xAF420008u || cpu->read_word(0x000027DCu) != 0xAF43000Cu || cpu->read_word(0x000027E0u) != 0xAF5F007Cu) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027E0u); cpu->pc = 0x000027E0u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027E0u); #endif #ifdef PSX_COSIM cosim_block(0x000027E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84000000u); #endif /* 0xBFC207B4: 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, 0x000027E0u); return; } g_debug_last_store_pc = 0x000027E0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAF5F007Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000027E0u); #endif label_BFC207B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027E4u); #endif #ifdef PSX_COSIM cosim_block(0x000027E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC207B8: 0C0009E7 jal 0xB000279C */ cpu->gpr[31] = 0x000027ECu; /* jal link before delay slot */ psx_delay_BFC207B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207BC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027E8u); #endif if (psx_delay_BFC207B8) { psx_delay_BFC207B8 = 0; cpu->gpr[31] = 0x000027ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000279Cu); cpu->pc = 0x0000279Cu; return; } label_BFC207C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027ECu); #endif #ifdef PSX_COSIM cosim_block(0x000027ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC207C0: 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(0x000027ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC207C4: 14400009 bne $v0, $zero, 0xBFC207EC */ uint32_t psx_brA_BFC207C4 = cpu->gpr[2]; uint32_t psx_brB_BFC207C4 = cpu->gpr[0]; psx_taken_BFC207C4 = (psx_brA_BFC207C4 != psx_brB_BFC207C4); psx_delay_BFC207C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000027F4u); #endif if (psx_delay_BFC207C4) { psx_delay_BFC207C4 = 0; if (psx_taken_BFC207C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002818u); cpu->pc = 0x00002818u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000027F8u); } label_BFC207CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000027F8u); #endif #ifdef PSX_COSIM cosim_block(0x000027F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000027F8u); #endif /* 0xBFC207CC: 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, 0x000027F8u); 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(0x000027F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207D0: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC207D4: 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(0x00002800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC207D8: 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(0x00002804u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC207DC: 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(0x00002808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6u); #endif /* 0xBFC207E0: 14410002 bne $v0, $at, 0xBFC207EC */ uint32_t psx_brA_BFC207E0 = cpu->gpr[2]; uint32_t psx_brB_BFC207E0 = cpu->gpr[1]; psx_taken_BFC207E0 = (psx_brA_BFC207E0 != psx_brB_BFC207E0); /* DELAY (orphaned) 0xBFC207E4: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC207E0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002818u); cpu->pc = 0x00002818u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002814u); cpu->pc = 0x00002814u; return; } void OpenBIOS_func_00002810(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002810u); int psx_delay_BFC208F0 = 0; int psx_taken_BFC208F0 = 0; int psx_delay_BFC20900 = 0; int psx_taken_BFC20900 = 0; int psx_delay_BFC20908 = 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_BFC20930 = 0; int psx_taken_BFC20930 = 0; int psx_delay_BFC2093C = 0; int psx_taken_BFC2093C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC207E8u: goto label_BFC207E8; case 0xBFC207ECu: goto label_BFC207EC; case 0xBFC207F0u: goto label_BFC207F0; case 0xBFC207F4u: goto label_BFC207F4; case 0xBFC207F8u: goto label_BFC207F8; case 0xBFC207FCu: goto label_BFC207FC; case 0xBFC20800u: goto label_BFC20800; case 0xBFC208E8u: goto label_BFC208E8; case 0xBFC208F8u: goto label_BFC208F8; case 0xBFC20908u: goto label_BFC20908; case 0xBFC20910u: goto label_BFC20910; case 0xBFC20918u: goto label_BFC20918; case 0xBFC20920u: goto label_BFC20920; case 0xBFC20928u: goto label_BFC20928; case 0xBFC20938u: goto label_BFC20938; default: break; } } label_BFC207E4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002810u); #endif #ifdef PSX_COSIM cosim_block(0x00002810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002810u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207E4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002810u); #endif label_BFC207E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002814u); #endif #ifdef PSX_COSIM cosim_block(0x00002814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002814u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC207E8: 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(0x00002814u); #endif label_BFC207EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002818u); #endif #ifdef PSX_COSIM cosim_block(0x00002818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000008u); #endif /* 0xBFC207EC: 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, 0x00002818u); return; } g_debug_last_store_pc = 0x00002818u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAF430080u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002818u); #endif label_BFC207F0: /* 0xBFC207F0: kernel patch-range hook (RAM [0x0000281C,0x0000282C), * resume RAM 0x0000282C). 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(0x0000281Cu) != 0x00000000u || cpu->read_word(0x00002820u) != 0x00000000u || cpu->read_word(0x00002824u) != 0x00000000u || cpu->read_word(0x00002828u) != 0x00000000u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000281Cu); cpu->pc = 0x0000281Cu; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000281Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000281Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000281Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000281Cu); #endif label_BFC207F4: /* 0xBFC207F4: kernel patch-range hook (RAM [0x0000281C,0x0000282C), * resume RAM 0x0000282C). 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(0x0000281Cu) != 0x00000000u || cpu->read_word(0x00002820u) != 0x00000000u || cpu->read_word(0x00002824u) != 0x00000000u || cpu->read_word(0x00002828u) != 0x00000000u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002820u); cpu->pc = 0x00002820u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002820u); #endif #ifdef PSX_COSIM cosim_block(0x00002820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002820u); #endif label_BFC207F8: /* 0xBFC207F8: kernel patch-range hook (RAM [0x0000281C,0x0000282C), * resume RAM 0x0000282C). 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(0x0000281Cu) != 0x00000000u || cpu->read_word(0x00002820u) != 0x00000000u || cpu->read_word(0x00002824u) != 0x00000000u || cpu->read_word(0x00002828u) != 0x00000000u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002824u); cpu->pc = 0x00002824u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002824u); #endif #ifdef PSX_COSIM cosim_block(0x00002824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC207F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002824u); #endif label_BFC207FC: /* 0xBFC207FC: kernel patch-range hook (RAM [0x0000281C,0x0000282C), * resume RAM 0x0000282C). 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(0x0000281Cu) != 0x00000000u || cpu->read_word(0x00002820u) != 0x00000000u || cpu->read_word(0x00002824u) != 0x00000000u || cpu->read_word(0x00002828u) != 0x00000000u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002828u); cpu->pc = 0x00002828u; return; } #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, 0x1u); #endif /* 0xBFC207FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002828u); #endif label_BFC20800: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000282Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000282Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000282Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20800: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000282Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20804: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20808: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2080C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20810: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000283Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20814: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20818: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2081C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20820: 00000000 nop */ /* nop */ #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, 0x1u); #endif /* 0xBFC20824: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20828: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2082C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000010u); #endif /* 0xBFC20830: 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, 0x0000285Cu); return; } g_debug_last_store_pc = 0x0000285Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAF440010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000285Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000020u); #endif /* 0xBFC20834: 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, 0x00002860u); return; } g_debug_last_store_pc = 0x00002860u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAF450014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000040u); #endif /* 0xBFC20838: 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, 0x00002864u); return; } g_debug_last_store_pc = 0x00002864u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAF460018u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000080u); #endif /* 0xBFC2083C: 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, 0x00002868u); return; } g_debug_last_store_pc = 0x00002868u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAF47001Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002868u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20840: 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(0x0000286Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20844: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000010u); #endif /* 0xBFC20848: 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, 0x00002874u); return; } g_debug_last_store_pc = 0x00002874u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAF44008Cu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC2084C: 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(0x00002878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20850: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000287Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000020u); #endif /* 0xBFC20854: 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, 0x00002880u); return; } g_debug_last_store_pc = 0x00002880u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAF450090u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC000000u); #endif /* 0xBFC20858: 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, 0x00002884u); return; } g_debug_last_store_pc = 0x00002884u; cpu->write_word(psx_addr, cpu->gpr[27]); } PGXP_STORE(0xAF5B006Cu, _pgxa, cpu->gpr[27]); } #ifdef PSX_COSIM cosim_instr(0x00002884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4010000u); #endif /* 0xBFC2085C: 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, 0x00002888u); return; } g_debug_last_store_pc = 0x00002888u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAF500040u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002888u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4020000u); #endif /* 0xBFC20860: 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, 0x0000288Cu); return; } g_debug_last_store_pc = 0x0000288Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAF510044u, _pgxa, cpu->gpr[17]); } #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, 0x4040000u); #endif /* 0xBFC20864: 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, 0x00002890u); return; } g_debug_last_store_pc = 0x00002890u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAF520048u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00002890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4080000u); #endif /* 0xBFC20868: 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, 0x00002894u); return; } g_debug_last_store_pc = 0x00002894u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAF53004Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x00002894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4100000u); #endif /* 0xBFC2086C: 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, 0x00002898u); return; } g_debug_last_store_pc = 0x00002898u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAF540050u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x00002898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4200000u); #endif /* 0xBFC20870: 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, 0x0000289Cu); return; } g_debug_last_store_pc = 0x0000289Cu; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAF550054u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x0000289Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000028A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4400000u); #endif /* 0xBFC20874: 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, 0x000028A0u); return; } g_debug_last_store_pc = 0x000028A0u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAF560058u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x000028A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4800000u); #endif /* 0xBFC20878: 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, 0x000028A4u); return; } g_debug_last_store_pc = 0x000028A4u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAF57005Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x000028A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000100u); #endif /* 0xBFC2087C: 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, 0x000028A8u); return; } g_debug_last_store_pc = 0x000028A8u; cpu->write_word(psx_addr, cpu->gpr[8]); } PGXP_STORE(0xAF480020u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x000028A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000200u); #endif /* 0xBFC20880: 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, 0x000028ACu); return; } g_debug_last_store_pc = 0x000028ACu; cpu->write_word(psx_addr, cpu->gpr[9]); } PGXP_STORE(0xAF490024u, _pgxa, cpu->gpr[9]); } #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, 0x4000400u); #endif /* 0xBFC20884: 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, 0x000028B0u); return; } g_debug_last_store_pc = 0x000028B0u; cpu->write_word(psx_addr, cpu->gpr[10]); } PGXP_STORE(0xAF4A0028u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x000028B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000800u); #endif /* 0xBFC20888: 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, 0x000028B4u); return; } g_debug_last_store_pc = 0x000028B4u; cpu->write_word(psx_addr, cpu->gpr[11]); } PGXP_STORE(0xAF4B002Cu, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x000028B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4001000u); #endif /* 0xBFC2088C: 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, 0x000028B8u); return; } g_debug_last_store_pc = 0x000028B8u; cpu->write_word(psx_addr, cpu->gpr[12]); } PGXP_STORE(0xAF4C0030u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x000028B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4002000u); #endif /* 0xBFC20890: 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, 0x000028BCu); return; } g_debug_last_store_pc = 0x000028BCu; cpu->write_word(psx_addr, cpu->gpr[13]); } PGXP_STORE(0xAF4D0034u, _pgxa, cpu->gpr[13]); } #ifdef PSX_COSIM cosim_instr(0x000028BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000028C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4004000u); #endif /* 0xBFC20894: 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, 0x000028C0u); return; } g_debug_last_store_pc = 0x000028C0u; cpu->write_word(psx_addr, cpu->gpr[14]); } PGXP_STORE(0xAF4E0038u, _pgxa, cpu->gpr[14]); } #ifdef PSX_COSIM cosim_instr(0x000028C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4008000u); #endif /* 0xBFC20898: 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, 0x000028C4u); return; } g_debug_last_store_pc = 0x000028C4u; cpu->write_word(psx_addr, cpu->gpr[15]); } PGXP_STORE(0xAF4F003Cu, _pgxa, cpu->gpr[15]); } #ifdef PSX_COSIM cosim_instr(0x000028C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5000000u); #endif /* 0xBFC2089C: 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, 0x000028C8u); return; } g_debug_last_store_pc = 0x000028C8u; cpu->write_word(psx_addr, cpu->gpr[24]); } PGXP_STORE(0xAF580060u, _pgxa, cpu->gpr[24]); } #ifdef PSX_COSIM cosim_instr(0x000028C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6000000u); #endif /* 0xBFC208A0: 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, 0x000028CCu); return; } g_debug_last_store_pc = 0x000028CCu; cpu->write_word(psx_addr, cpu->gpr[25]); } PGXP_STORE(0xAF590064u, _pgxa, cpu->gpr[25]); } #ifdef PSX_COSIM cosim_instr(0x000028CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000028D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14000000u); #endif /* 0xBFC208A4: 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, 0x000028D0u); return; } g_debug_last_store_pc = 0x000028D0u; cpu->write_word(psx_addr, cpu->gpr[28]); } PGXP_STORE(0xAF5C0070u, _pgxa, cpu->gpr[28]); } #ifdef PSX_COSIM cosim_instr(0x000028D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24000000u); #endif /* 0xBFC208A8: 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, 0x000028D4u); return; } g_debug_last_store_pc = 0x000028D4u; cpu->write_word(psx_addr, cpu->gpr[29]); } PGXP_STORE(0xAF5D0074u, _pgxa, cpu->gpr[29]); } #ifdef PSX_COSIM cosim_instr(0x000028D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44000000u); #endif /* 0xBFC208AC: 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, 0x000028D8u); return; } g_debug_last_store_pc = 0x000028D8u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAF5E0078u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x000028D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC208B0: 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(0x000028DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000028E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC208B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000028E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000010u); #endif /* 0xBFC208B8: 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, 0x000028E4u); return; } g_debug_last_store_pc = 0x000028E4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAF440084u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000028E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC208BC: 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(0x000028E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC208C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000028ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000028F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000010u); #endif /* 0xBFC208C4: 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, 0x000028F0u); return; } g_debug_last_store_pc = 0x000028F0u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAF440088u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000028F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC208C8: 3C1D0000 lui $sp, 0x0 */ cpu->gpr[29] = 0x00000000u; PGXP_ALU(0x3C1D0000u, cpu->gpr[29], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000028F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC208CC: 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(0x000028F8u); #endif /* 0xBFC208D0: 8FBD4B84 lw $sp, 19332($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 19332; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (19332)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000028FCu); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x20000000u); } PGXP_LOAD(0x8FBD4B84u, _pgxa, cpu->gpr[29]); } #ifdef PSX_COSIM cosim_instr(0x000028FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002900u); #endif /* 0xBFC208D4: 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, 0x00002900u); 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(0x00002900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000000u); #endif /* 0xBFC208D8: 3C1C0000 lui $gp, 0x0 */ cpu->gpr[28] = 0x00000000u; PGXP_ALU(0x3C1C0000u, cpu->gpr[28], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000000u); #endif /* 0xBFC208DC: 279C0000 addiu $gp, $gp, 0 */ { uint32_t _pgx1 = cpu->gpr[28]; cpu->gpr[28] = (uint32_t)((int32_t)cpu->gpr[28] + (0)); PGXP_ALU(0x279C0000u, cpu->gpr[28], _pgx1, 0x00000000u); } #ifdef PSX_COSIM cosim_instr(0x00002908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000001u); #endif /* 0xBFC208E0: 03A0F025 or $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(0x03A0F025u, cpu->gpr[30], _pgx1, _pgx2); } #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, 0x180000u); #endif /* 0xBFC208E4: 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(0x00002910u); #endif label_BFC208E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002914u); #endif #ifdef PSX_COSIM cosim_block(0x00002914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002914u); #endif /* 0xBFC208E8: 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, 0x00002914u); 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(0x00002914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC208EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC208F0: 12C00011 beq $s6, $zero, 0xBFC20938 */ uint32_t psx_brA_BFC208F0 = cpu->gpr[22]; uint32_t psx_brB_BFC208F0 = cpu->gpr[0]; psx_taken_BFC208F0 = (psx_brA_BFC208F0 == psx_brB_BFC208F0); psx_delay_BFC208F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC208F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002920u); #endif if (psx_delay_BFC208F0) { psx_delay_BFC208F0 = 0; if (psx_taken_BFC208F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002964u); goto label_BFC20938; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002924u); } label_BFC208F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002924u); #endif #ifdef PSX_COSIM cosim_block(0x00002924u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002924u); #endif /* 0xBFC208F8: 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, 0x00002924u); 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(0x00002924u); #endif /* 0xBFC208FC: 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, 0x00002928u); 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(0x00002928u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC20900: 12200009 beq $s1, $zero, 0xBFC20928 */ uint32_t psx_brA_BFC20900 = cpu->gpr[17]; uint32_t psx_brB_BFC20900 = cpu->gpr[0]; psx_taken_BFC20900 = (psx_brA_BFC20900 == psx_brB_BFC20900); psx_delay_BFC20900 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20904: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002930u); #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, 0x00002954u); goto label_BFC20928; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002934u); } label_BFC20908: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002934u); #endif #ifdef PSX_COSIM cosim_block(0x00002934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002934u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80020000u); #endif /* 0xBFC20908: 0220F809 jalr $ra, $s1 */ cpu->gpr[31] = 0x0000293Cu; /* jalr link before delay slot */ psx_delay_BFC20908 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2090C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002938u); #endif if (psx_delay_BFC20908) { psx_delay_BFC20908 = 0; { uint32_t _t = cpu->gpr[17]; cpu->gpr[31] = 0x0000293Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC20910: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000293Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000293Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000293Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20910: 10400005 beq $v0, $zero, 0xBFC20928 */ uint32_t psx_brA_BFC20910 = cpu->gpr[2]; 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_icache_fetch(cpu, 0x00002940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20914: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002940u); #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, 0x00002954u); goto label_BFC20928; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002944u); } label_BFC20918: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002944u); #endif #ifdef PSX_COSIM cosim_block(0x00002944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC20918: 12000003 beq $s0, $zero, 0xBFC20928 */ uint32_t psx_brA_BFC20918 = cpu->gpr[16]; 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, 0x15u); #endif /* 0xBFC2091C: 00402025 or $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(0x00402025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002948u); #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, 0x00002954u); goto label_BFC20928; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000294Cu); } label_BFC20920: #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, 0x80010000u); #endif /* 0xBFC20920: 0200F809 jalr $ra, $s0 */ cpu->gpr[31] = 0x00002954u; /* jalr link before delay slot */ psx_delay_BFC20920 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20924: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002950u); #endif if (psx_delay_BFC20920) { psx_delay_BFC20920 = 0; { uint32_t _t = cpu->gpr[16]; cpu->gpr[31] = 0x00002954u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC20928: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002954u); #endif #ifdef PSX_COSIM cosim_block(0x00002954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002954u); #endif /* 0xBFC20928: 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, 0x00002954u); 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(0x00002954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2092C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002958u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400001u); #endif /* 0xBFC20930: 16C0FFF1 bne $s6, $zero, 0xBFC208F8 */ uint32_t psx_brA_BFC20930 = cpu->gpr[22]; uint32_t psx_brB_BFC20930 = cpu->gpr[0]; psx_taken_BFC20930 = (psx_brA_BFC20930 != psx_brB_BFC20930); psx_delay_BFC20930 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20934: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002960u); #endif if (psx_delay_BFC20930) { psx_delay_BFC20930 = 0; if (psx_taken_BFC20930) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002924u); goto label_BFC208F8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002964u); } label_BFC20938: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002964u); #endif #ifdef PSX_COSIM cosim_block(0x00002964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC20938: 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(0x00002964u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x180000u); #endif /* 0xBFC2093C: 1693FFEA bne $s4, $s3, 0xBFC208E8 */ uint32_t psx_brA_BFC2093C = cpu->gpr[20]; uint32_t psx_brB_BFC2093C = cpu->gpr[19]; psx_taken_BFC2093C = (psx_brA_BFC2093C != psx_brB_BFC2093C); /* DELAY (orphaned) 0xBFC20940: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC2093C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002914u); goto label_BFC208E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002970u); cpu->pc = 0x00002970u; return; } void OpenBIOS_func_0000296C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000296Cu); int psx_delay_BFC20998 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20944u: goto label_BFC20944; default: break; } } label_BFC20940: #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, 0x1u); #endif /* 0xBFC20940: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000296Cu); #endif label_BFC20944: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002970u); #endif #ifdef PSX_COSIM cosim_block(0x00002970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000001u); #endif /* 0xBFC20944: 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(0x00002970u); #endif /* 0xBFC20948: 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, 0x00002974u); 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(0x00002974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2094C: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002978u); #endif /* 0xBFC20950: 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, 0x0000297Cu); 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(0x0000297Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20954: 24844BF8 addiu $a0, $a0, 19448 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19448)); PGXP_ALU(0x24844BF8u, cpu->gpr[4], _pgx1, 0x00004BF8u); } #ifdef PSX_COSIM cosim_instr(0x00002980u); #endif /* 0xBFC20958: 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, 0x00002984u); 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(0x00002984u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC2095C: 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(0x00002988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC20960: 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(0x0000298Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002990u); #endif /* 0xBFC20964: 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, 0x00002990u); 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(0x00002990u); #endif /* 0xBFC20968: 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, 0x00002994u); 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(0x00002994u); #endif /* 0xBFC2096C: 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, 0x00002998u); 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(0x00002998u); #endif /* 0xBFC20970: 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, 0x0000299Cu); 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(0x0000299Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029A0u); #endif /* 0xBFC20974: 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, 0x000029A0u); 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(0x000029A0u); #endif /* 0xBFC20978: 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, 0x000029A4u); 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(0x000029A4u); #endif /* 0xBFC2097C: 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, 0x000029A8u); 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(0x000029A8u); #endif /* 0xBFC20980: 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, 0x000029ACu); 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(0x000029ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029B0u); #endif /* 0xBFC20984: 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, 0x000029B0u); 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(0x000029B0u); #endif /* 0xBFC20988: 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, 0x000029B4u); 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(0x000029B4u); #endif /* 0xBFC2098C: 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, 0x000029B8u); 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(0x000029B8u); #endif /* 0xBFC20990: 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, 0x000029BCu); 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(0x000029BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x25u); #endif /* 0xBFC20994: 00A01025 or $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(0x00A01025u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000029C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20998: 03E00008 jr $ra */ psx_delay_BFC20998 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2099C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000029C8u); #endif if (psx_delay_BFC20998) { psx_delay_BFC20998 = 0; #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 OpenBIOS_func_000029CC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000029CCu); int psx_delay_BFC20A4C = 0; int psx_delay_BFC20A50 = 0; label_BFC209A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000029CCu); #endif #ifdef PSX_COSIM cosim_block(0x000029CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000001u); #endif /* 0xBFC209A0: 241B0100 addiu $k1, $zero, 256 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[27] = (uint32_t)((int32_t)cpu->gpr[0] + (256)); PGXP_ALU(0x241B0100u, cpu->gpr[27], _pgx1, 0x00000100u); } #ifdef PSX_COSIM cosim_instr(0x000029CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029D0u); #endif /* 0xBFC209A4: 8F7B0008 lw $k1, 8($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029D0u); return; } cpu->gpr[27] = psx_cyc_load_word(cpu, psx_addr, 27, 0x8000000u); } PGXP_LOAD(0x8F7B0008u, _pgxa, cpu->gpr[27]); } #ifdef PSX_COSIM cosim_instr(0x000029D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC209A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000029D4u); #endif /* 0xBFC209AC: 8F7B0000 lw $k1, 0($k1) */ { uint32_t _pgxa = cpu->gpr[27]; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029D8u); return; } cpu->gpr[27] = psx_cyc_load_word(cpu, psx_addr, 27, 0x8000000u); } PGXP_LOAD(0x8F7B0000u, _pgxa, cpu->gpr[27]); } #ifdef PSX_COSIM cosim_instr(0x000029D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC209B0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000029DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029E0u); #endif /* 0xBFC209B4: 8F620090 lw $v0, 144($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 144; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (144)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8000000u); } PGXP_LOAD(0x8F620090u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000029E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8000000u); #endif /* 0xBFC209B8: 277B0008 addiu $k1, $k1, 8 */ { uint32_t _pgx1 = cpu->gpr[27]; cpu->gpr[27] = (uint32_t)((int32_t)cpu->gpr[27] + (8)); PGXP_ALU(0x277B0008u, cpu->gpr[27], _pgx1, 0x00000008u); } #ifdef PSX_COSIM cosim_instr(0x000029E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC209BC: 00400013 mtlo $v0 */ cpu->lo = cpu->gpr[2]; PGXP_ALU(0x00400013u, cpu->lo, cpu->lo, 0u); #ifdef PSX_COSIM cosim_instr(0x000029E8u); #endif /* 0xBFC209C0: 8F630084 lw $v1, 132($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 132; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (132)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029ECu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8000000u); } PGXP_LOAD(0x8F630084u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000029ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000029F0u); #endif /* 0xBFC209C4: 8F7A0080 lw $k0, 128($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 128; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (128)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029F0u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x8000000u); } PGXP_LOAD(0x8F7A0080u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x000029F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC209C8: 00600011 mthi $v1 */ cpu->hi = cpu->gpr[3]; PGXP_ALU(0x00600011u, cpu->hi, cpu->hi, 0u); #ifdef PSX_COSIM cosim_instr(0x000029F4u); #endif /* 0xBFC209CC: 8F65008C lw $a1, 140($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 140; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (140)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029F8u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8000000u); } PGXP_LOAD(0x8F65008Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000029F8u); #endif /* 0xBFC209D0: 8F610004 lw $at, 4($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 4; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (4)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000029FCu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x8000000u); } PGXP_LOAD(0x8F610004u, _pgxa, cpu->gpr[1]); } #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, 0x0u); #endif /* 0xBFC209D4: 40856000 mtc0 $a1, cop0[12] */ cpu->cop0[12] = cpu->gpr[5]; #ifdef PSX_COSIM cosim_instr(0x00002A00u); #endif /* 0xBFC209D8: 8F620008 lw $v0, 8($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 8; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (8)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8000000u); } PGXP_LOAD(0x8F620008u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002A04u); #endif /* 0xBFC209DC: 8F63000C lw $v1, 12($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A08u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8000000u); } PGXP_LOAD(0x8F63000Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002A08u); #endif /* 0xBFC209E0: 8F640010 lw $a0, 16($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 16; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (16)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A0Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8000000u); } PGXP_LOAD(0x8F640010u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002A0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A10u); #endif /* 0xBFC209E4: 8F650014 lw $a1, 20($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A10u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8000000u); } PGXP_LOAD(0x8F650014u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002A10u); #endif /* 0xBFC209E8: 8F660018 lw $a2, 24($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 24; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (24)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A14u); return; } cpu->gpr[6] = psx_cyc_load_word(cpu, psx_addr, 6, 0x8000000u); } PGXP_LOAD(0x8F660018u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00002A14u); #endif /* 0xBFC209EC: 8F67001C lw $a3, 28($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A18u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x8000000u); } PGXP_LOAD(0x8F67001Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002A18u); #endif /* 0xBFC209F0: 8F680020 lw $t0, 32($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 32; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (32)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A1Cu); return; } cpu->gpr[8] = psx_cyc_load_word(cpu, psx_addr, 8, 0x8000000u); } PGXP_LOAD(0x8F680020u, _pgxa, cpu->gpr[8]); } #ifdef PSX_COSIM cosim_instr(0x00002A1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A20u); #endif /* 0xBFC209F4: 8F690024 lw $t1, 36($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 36; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (36)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A20u); return; } cpu->gpr[9] = psx_cyc_load_word(cpu, psx_addr, 9, 0x8000000u); } PGXP_LOAD(0x8F690024u, _pgxa, cpu->gpr[9]); } #ifdef PSX_COSIM cosim_instr(0x00002A20u); #endif /* 0xBFC209F8: 8F6A0028 lw $t2, 40($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 40; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (40)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A24u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x8000000u); } PGXP_LOAD(0x8F6A0028u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x00002A24u); #endif /* 0xBFC209FC: 8F6B002C lw $t3, 44($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 44; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (44)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A28u); return; } cpu->gpr[11] = psx_cyc_load_word(cpu, psx_addr, 11, 0x8000000u); } PGXP_LOAD(0x8F6B002Cu, _pgxa, cpu->gpr[11]); } #ifdef PSX_COSIM cosim_instr(0x00002A28u); #endif /* 0xBFC20A00: 8F6C0030 lw $t4, 48($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 48; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (48)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A2Cu); return; } cpu->gpr[12] = psx_cyc_load_word(cpu, psx_addr, 12, 0x8000000u); } PGXP_LOAD(0x8F6C0030u, _pgxa, cpu->gpr[12]); } #ifdef PSX_COSIM cosim_instr(0x00002A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A30u); #endif /* 0xBFC20A04: 8F6D0034 lw $t5, 52($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 52; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (52)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A30u); return; } cpu->gpr[13] = psx_cyc_load_word(cpu, psx_addr, 13, 0x8000000u); } PGXP_LOAD(0x8F6D0034u, _pgxa, cpu->gpr[13]); } #ifdef PSX_COSIM cosim_instr(0x00002A30u); #endif /* 0xBFC20A08: 8F6E0038 lw $t6, 56($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 56; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (56)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A34u); return; } cpu->gpr[14] = psx_cyc_load_word(cpu, psx_addr, 14, 0x8000000u); } PGXP_LOAD(0x8F6E0038u, _pgxa, cpu->gpr[14]); } #ifdef PSX_COSIM cosim_instr(0x00002A34u); #endif /* 0xBFC20A0C: 8F6F003C lw $t7, 60($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 60; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (60)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A38u); return; } cpu->gpr[15] = psx_cyc_load_word(cpu, psx_addr, 15, 0x8000000u); } PGXP_LOAD(0x8F6F003Cu, _pgxa, cpu->gpr[15]); } #ifdef PSX_COSIM cosim_instr(0x00002A38u); #endif /* 0xBFC20A10: 8F700040 lw $s0, 64($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 64; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (64)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A3Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x8000000u); } PGXP_LOAD(0x8F700040u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00002A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A40u); #endif /* 0xBFC20A14: 8F710044 lw $s1, 68($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 68; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (68)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A40u); return; } cpu->gpr[17] = psx_cyc_load_word(cpu, psx_addr, 17, 0x8000000u); } PGXP_LOAD(0x8F710044u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00002A40u); #endif /* 0xBFC20A18: 8F720048 lw $s2, 72($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 72; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (72)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A44u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x8000000u); } PGXP_LOAD(0x8F720048u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00002A44u); #endif /* 0xBFC20A1C: 8F73004C lw $s3, 76($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 76; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (76)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A48u); return; } cpu->gpr[19] = psx_cyc_load_word(cpu, psx_addr, 19, 0x8000000u); } PGXP_LOAD(0x8F73004Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x00002A48u); #endif /* 0xBFC20A20: 8F740050 lw $s4, 80($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 80; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (80)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A4Cu); return; } cpu->gpr[20] = psx_cyc_load_word(cpu, psx_addr, 20, 0x8000000u); } PGXP_LOAD(0x8F740050u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x00002A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A50u); #endif /* 0xBFC20A24: 8F750054 lw $s5, 84($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 84; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (84)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A50u); return; } cpu->gpr[21] = psx_cyc_load_word(cpu, psx_addr, 21, 0x8000000u); } PGXP_LOAD(0x8F750054u, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x00002A50u); #endif /* 0xBFC20A28: 8F760058 lw $s6, 88($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 88; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (88)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A54u); return; } cpu->gpr[22] = psx_cyc_load_word(cpu, psx_addr, 22, 0x8000000u); } PGXP_LOAD(0x8F760058u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x00002A54u); #endif /* 0xBFC20A2C: 8F77005C lw $s7, 92($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 92; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (92)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A58u); return; } cpu->gpr[23] = psx_cyc_load_word(cpu, psx_addr, 23, 0x8000000u); } PGXP_LOAD(0x8F77005Cu, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x00002A58u); #endif /* 0xBFC20A30: 8F780060 lw $t8, 96($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 96; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (96)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A5Cu); return; } cpu->gpr[24] = psx_cyc_load_word(cpu, psx_addr, 24, 0x8000000u); } PGXP_LOAD(0x8F780060u, _pgxa, cpu->gpr[24]); } #ifdef PSX_COSIM cosim_instr(0x00002A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A60u); #endif /* 0xBFC20A34: 8F790064 lw $t9, 100($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 100; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (100)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A60u); return; } cpu->gpr[25] = psx_cyc_load_word(cpu, psx_addr, 25, 0x8000000u); } PGXP_LOAD(0x8F790064u, _pgxa, cpu->gpr[25]); } #ifdef PSX_COSIM cosim_instr(0x00002A60u); #endif /* 0xBFC20A38: 8F7C0070 lw $gp, 112($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 112; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (112)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A64u); return; } cpu->gpr[28] = psx_cyc_load_word(cpu, psx_addr, 28, 0x8000000u); } PGXP_LOAD(0x8F7C0070u, _pgxa, cpu->gpr[28]); } #ifdef PSX_COSIM cosim_instr(0x00002A64u); #endif /* 0xBFC20A3C: 8F7D0074 lw $sp, 116($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 116; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (116)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A68u); return; } cpu->gpr[29] = psx_cyc_load_word(cpu, psx_addr, 29, 0x8000000u); } PGXP_LOAD(0x8F7D0074u, _pgxa, cpu->gpr[29]); } #ifdef PSX_COSIM cosim_instr(0x00002A68u); #endif /* 0xBFC20A40: 8F7E0078 lw $fp, 120($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 120; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (120)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A6Cu); return; } cpu->gpr[30] = psx_cyc_load_word(cpu, psx_addr, 30, 0x8000000u); } PGXP_LOAD(0x8F7E0078u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x00002A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A70u); #endif /* 0xBFC20A44: 8F7F007C lw $ra, 124($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 124; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (124)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A70u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x8000000u); } PGXP_LOAD(0x8F7F007Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002A70u); #endif /* 0xBFC20A48: 8F7B006C lw $k1, 108($k1) */ { uint32_t _pgxa = cpu->gpr[27] + 108; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[27] + (108)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002A74u); return; } cpu->gpr[27] = psx_cyc_load_word(cpu, psx_addr, 27, 0x8000000u); } PGXP_LOAD(0x8F7B006Cu, _pgxa, cpu->gpr[27]); } #ifdef PSX_COSIM cosim_instr(0x00002A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000001u); #endif /* 0xBFC20A4C: 03400008 jr $k0 */ psx_delay_BFC20A4C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC20A50: 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 OpenBIOS_func_00002A80(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002A80u); int psx_delay_BFC20A6C = 0; label_BFC20A54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002A80u); #endif #ifdef PSX_COSIM cosim_block(0x00002A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A54: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A58: 25080200 addiu $t0, $t0, 512 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (512)); PGXP_ALU(0x25080200u, cpu->gpr[8], _pgx1, 0x00000200u); } #ifdef PSX_COSIM cosim_instr(0x00002A84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC20A5C: 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(0x00002A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC20A60: 01485020 add $t2, $t2, $t0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[10]; 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[10] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x01485020u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002A8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002A90u); #endif /* 0xBFC20A64: 8D4A0000 lw $t2, 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, 0x00002A90u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } PGXP_LOAD(0x8D4A0000u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x00002A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20A68: 240800A0 addiu $t0, $zero, 160 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (160)); PGXP_ALU(0x240800A0u, cpu->gpr[8], _pgx1, 0x000000A0u); } #ifdef PSX_COSIM cosim_instr(0x00002A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20A6C: 01400008 jr $t2 */ psx_delay_BFC20A6C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20A70: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002A9Cu); #endif if (psx_delay_BFC20A6C) { psx_delay_BFC20A6C = 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 OpenBIOS_func_00002AA0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002AA0u); int psx_delay_BFC20A8C = 0; label_BFC20A74: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002AA0u); #endif #ifdef PSX_COSIM cosim_block(0x00002AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A74: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A78: 250849CC addiu $t0, $t0, 18892 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (18892)); PGXP_ALU(0x250849CCu, cpu->gpr[8], _pgx1, 0x000049CCu); } #ifdef PSX_COSIM cosim_instr(0x00002AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC20A7C: 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(0x00002AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC20A80: 01485020 add $t2, $t2, $t0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[10]; 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[10] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x01485020u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002AACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AB0u); #endif /* 0xBFC20A84: 8D4A0000 lw $t2, 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, 0x00002AB0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } PGXP_LOAD(0x8D4A0000u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x00002AB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20A88: 240800B0 addiu $t0, $zero, 176 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (176)); PGXP_ALU(0x240800B0u, cpu->gpr[8], _pgx1, 0x000000B0u); } #ifdef PSX_COSIM cosim_instr(0x00002AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20A8C: 01400008 jr $t2 */ psx_delay_BFC20A8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20A90: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002ABCu); #endif if (psx_delay_BFC20A8C) { psx_delay_BFC20A8C = 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 OpenBIOS_func_00002AC0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002AC0u); int psx_delay_BFC20AAC = 0; label_BFC20A94: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002AC0u); #endif #ifdef PSX_COSIM cosim_block(0x00002AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A94: 3C080000 lui $t0, 0x0 */ cpu->gpr[8] = 0x00000000u; PGXP_ALU(0x3C080000u, cpu->gpr[8], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100u); #endif /* 0xBFC20A98: 2508494C addiu $t0, $t0, 18764 */ { uint32_t _pgx1 = cpu->gpr[8]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[8] + (18764)); PGXP_ALU(0x2508494Cu, cpu->gpr[8], _pgx1, 0x0000494Cu); } #ifdef PSX_COSIM cosim_instr(0x00002AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC20A9C: 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(0x00002AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC20AA0: 01485020 add $t2, $t2, $t0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[10]; 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[10] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x01485020u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002ACCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AD0u); #endif /* 0xBFC20AA4: 8D4A0000 lw $t2, 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, 0x00002AD0u); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } PGXP_LOAD(0x8D4A0000u, _pgxa, cpu->gpr[10]); } #ifdef PSX_COSIM cosim_instr(0x00002AD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20AA8: 240800C0 addiu $t0, $zero, 192 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (192)); PGXP_ALU(0x240800C0u, cpu->gpr[8], _pgx1, 0x000000C0u); } #ifdef PSX_COSIM cosim_instr(0x00002AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20AAC: 01400008 jr $t2 */ psx_delay_BFC20AAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20AB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002ADCu); #endif if (psx_delay_BFC20AAC) { psx_delay_BFC20AAC = 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 OpenBIOS_func_00002AE0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002AE0u); int psx_delay_BFC20AC8 = 0; label_BFC20AB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002AE0u); #endif #ifdef PSX_COSIM cosim_block(0x00002AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x101u); #endif /* 0xBFC20AB4: 24084B7C addiu $t0, $zero, 19324 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[8] = (uint32_t)((int32_t)cpu->gpr[0] + (19324)); PGXP_ALU(0x24084B7Cu, cpu->gpr[8], _pgx1, 0x00004B7Cu); } #ifdef PSX_COSIM cosim_instr(0x00002AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x600u); #endif /* 0xBFC20AB8: 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(0x00002AE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x500u); #endif /* 0xBFC20ABC: 01485020 add $t2, $t2, $t0 */ { uint32_t _pgx1 = cpu->gpr[10]; uint32_t _pgx2 = cpu->gpr[8]; { int32_t psx_a = (int32_t)cpu->gpr[10]; 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[10] = (uint32_t)(int32_t)psx_r; } PGXP_ALU(0x01485020u, cpu->gpr[10], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002AE8u); #endif /* 0xBFC20AC0: 8D4A0000 lw $t2, 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, 0x00002AECu); return; } cpu->gpr[10] = psx_cyc_load_word(cpu, psx_addr, 10, 0x400u); } PGXP_LOAD(0x8D4A0000u, _pgxa, cpu->gpr[10]); } #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 /* 0xBFC20AC4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20AC8: 01400008 jr $t2 */ psx_delay_BFC20AC8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20ACC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002AF8u); #endif if (psx_delay_BFC20AC8) { psx_delay_BFC20AC8 = 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 OpenBIOS_func_00002AFC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002AFCu); int psx_delay_BFC20AE0 = 0; label_BFC20AD0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002AFCu); #endif #ifdef PSX_COSIM cosim_block(0x00002AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20AD0: 3C02BFC0 lui $v0, 0xBFC0 */ cpu->gpr[2] = 0xBFC00000u; PGXP_ALU(0x3C02BFC0u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002AFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20AD4: 24425C8C addiu $v0, $v0, 23692 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (23692)); PGXP_ALU(0x24425C8Cu, cpu->gpr[2], _pgx1, 0x00005C8Cu); } #ifdef PSX_COSIM cosim_instr(0x00002B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x111u); #endif /* 0xBFC20AD8: 01002025 or $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(0x01002025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x221u); #endif /* 0xBFC20ADC: 01202825 or $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(0x01202825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20AE0: 00400008 jr $v0 */ psx_delay_BFC20AE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000041u); #endif /* 0xBFC20AE4: 03E03025 or $a2, $ra, $zero */ { uint32_t _pgx1 = cpu->gpr[31]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[6] = cpu->gpr[31] | cpu->gpr[0]; PGXP_ALU(0x03E03025u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002B10u); #endif if (psx_delay_BFC20AE0) { psx_delay_BFC20AE0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[2]); cpu->pc = cpu->gpr[2]; return; } } void OpenBIOS_func_00002B14(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002B14u); int psx_delay_BFC20AEC = 0; label_BFC20AE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002B14u); #endif #ifdef PSX_COSIM cosim_block(0x00002B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20AE8: 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(0x00002B14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x401u); #endif /* 0xBFC20AEC: 01400008 jr $t2 */ psx_delay_BFC20AEC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC20AF0: 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(0x00002B1Cu); #endif if (psx_delay_BFC20AEC) { psx_delay_BFC20AEC = 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 OpenBIOS_func_00002B20(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002B20u); int psx_delay_BFC20B08 = 0; int psx_taken_BFC20B08 = 0; int psx_delay_BFC20B20 = 0; int psx_taken_BFC20B20 = 0; int psx_delay_BFC20B28 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20B10u: goto label_BFC20B10; case 0xBFC20B28u: goto label_BFC20B28; default: break; } } label_BFC20AF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002B20u); #endif #ifdef PSX_COSIM cosim_block(0x00002B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000010u); #endif /* 0xBFC20AF4: 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, 0x00002B20u); return; } g_debug_last_store_pc = 0x00002B20u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAFA40000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002B20u); #endif /* 0xBFC20AF8: 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, 0x00002B24u); 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(0x00002B24u); #endif /* 0xBFC20AFC: 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, 0x00002B28u); 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(0x00002B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20B00: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC20B04: 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(0x00002B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20B08: 10400007 beq $v0, $zero, 0xBFC20B28 */ uint32_t psx_brA_BFC20B08 = cpu->gpr[2]; uint32_t psx_brB_BFC20B08 = cpu->gpr[0]; psx_taken_BFC20B08 = (psx_brA_BFC20B08 == psx_brB_BFC20B08); psx_delay_BFC20B08 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC20B0C: AFA30000 sw $v1, 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, 0x00002B38u); return; } g_debug_last_store_pc = 0x00002B38u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002B38u); #endif if (psx_delay_BFC20B08) { psx_delay_BFC20B08 = 0; if (psx_taken_BFC20B08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B54u); goto label_BFC20B28; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B3Cu); } label_BFC20B10: #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 /* 0xBFC20B10: 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, 0x00002B3Cu); 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(0x00002B3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B40u); #endif /* 0xBFC20B14: 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, 0x00002B40u); 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(0x00002B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20B18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002B44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B1C: 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(0x00002B48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20B20: 1440FFFB bne $v0, $zero, 0xBFC20B10 */ uint32_t psx_brA_BFC20B20 = cpu->gpr[2]; uint32_t psx_brB_BFC20B20 = cpu->gpr[0]; psx_taken_BFC20B20 = (psx_brA_BFC20B20 != psx_brB_BFC20B20); psx_delay_BFC20B20 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000008u); #endif /* 0xBFC20B24: AFA30000 sw $v1, 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, 0x00002B50u); return; } g_debug_last_store_pc = 0x00002B50u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAFA30000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002B50u); #endif if (psx_delay_BFC20B20) { psx_delay_BFC20B20 = 0; if (psx_taken_BFC20B20) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B3Cu); goto label_BFC20B10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B54u); } label_BFC20B28: #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, 0x80000001u); #endif /* 0xBFC20B28: 03E00008 jr $ra */ psx_delay_BFC20B28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20B2C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002B58u); #endif if (psx_delay_BFC20B28) { psx_delay_BFC20B28 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002B5C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002B5Cu); int psx_delay_BFC20B5C = 0; int psx_taken_BFC20B5C = 0; int psx_delay_BFC20B78 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20B64u: goto label_BFC20B64; default: break; } } label_BFC20B30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002B5Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC20B30: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #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, 0x8u); #endif /* 0xBFC20B34: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002B60u); #endif /* 0xBFC20B38: 8CE44C58 lw $a0, 19544($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B64u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80u); } PGXP_LOAD(0x8CE44C58u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002B64u); #endif /* 0xBFC20B3C: 8C634C48 lw $v1, 19528($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19528; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002B68u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C634C48u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20B40: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002B6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50u); #endif /* 0xBFC20B44: 00043080 sll $a2, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[6] = cpu->gpr[4] << 2u; PGXP_ALU(0x00043080u, cpu->gpr[6], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00002B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20B48: 24424C08 addiu $v0, $v0, 19464 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19464)); PGXP_ALU(0x24424C08u, cpu->gpr[2], _pgx1, 0x00004C08u); } #ifdef PSX_COSIM cosim_instr(0x00002B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B4C: 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(0x00002B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20B50: 00C21021 addu $v0, $a2, $v0 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[6] + cpu->gpr[2]; PGXP_ALU(0x00C21021u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x28u); #endif /* 0xBFC20B54: 2C65000D sltiu $a1, $v1, 13 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[5] = (uint32_t)(cpu->gpr[3] < 0x0000000Du ? 1 : 0); PGXP_ALU(0x2C65000Du, cpu->gpr[5], _pgx1, 0x000Du); } #ifdef PSX_COSIM cosim_instr(0x00002B80u); #endif /* 0xBFC20B58: 8C420000 lw $v0, 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, 0x00002B84u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002B84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20B5C: 10A000EB beq $a1, $zero, 0xBFC20F0C */ uint32_t psx_brA_BFC20B5C = cpu->gpr[5]; uint32_t psx_brB_BFC20B5C = cpu->gpr[0]; psx_taken_BFC20B5C = (psx_brA_BFC20B5C == psx_brB_BFC20B5C); psx_delay_BFC20B5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20B60: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002B8Cu); #endif if (psx_delay_BFC20B5C) { psx_delay_BFC20B5C = 0; if (psx_taken_BFC20B5C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F38u); cpu->pc = 0x00002F38u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B90u); } label_BFC20B64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002B90u); #endif #ifdef PSX_COSIM cosim_block(0x00002B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20B64: 24A5A324 addiu $a1, $a1, -23772 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-23772)); PGXP_ALU(0x24A5A324u, cpu->gpr[5], _pgx1, 0xFFFFA324u); } #ifdef PSX_COSIM cosim_instr(0x00002B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B68: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00002B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20B6C: 00A31821 addu $v1, $a1, $v1 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[5] + cpu->gpr[3]; PGXP_ALU(0x00A31821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002B98u); #endif /* 0xBFC20B70: 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, 0x00002B9Cu); 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(0x00002B9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20B74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002BA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20B78: 00A00008 jr $a1 */ psx_delay_BFC20B78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B7C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002BA8u); #endif if (psx_delay_BFC20B78) { psx_delay_BFC20B78 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[5]); cpu->pc = cpu->gpr[5]; return; } } void OpenBIOS_func_00002BAC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002BACu); int psx_delay_BFC20BE4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20BE4u: goto label_BFC20BE4; default: break; } } label_BFC20B80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002BACu); #endif #ifdef PSX_COSIM cosim_block(0x00002BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20B80: 0004202B sltu $a0, $zero, $a0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20B84: 00042340 sll $a0, $a0, 13 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 13u; PGXP_ALU(0x00042340u, cpu->gpr[4], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x00002BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20B88: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002BB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B8C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20B90: AC444C60 sw $a0, 19552($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19552)); 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[4]); } PGXP_STORE(0xAC444C60u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002BBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20B94: 24634C10 addiu $v1, $v1, 19472 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19472)); PGXP_ALU(0x24634C10u, cpu->gpr[3], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0x00002BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20B98: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20B9C: 34841003 ori $a0, $a0, 0x1003 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1003u; PGXP_ALU(0x34841003u, cpu->gpr[4], _pgx1, 0x1003u); } #ifdef PSX_COSIM cosim_instr(0x00002BC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20BA0: A444104A sh $a0, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002BCCu); return; } g_debug_last_store_pc = 0x00002BCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA444104Au, _pgxa, cpu->gpr[4]); } #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, 0x48u); #endif /* 0xBFC20BA4: 00661821 addu $v1, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00661821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002BD0u); #endif /* 0xBFC20BA8: 8C630000 lw $v1, 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, 0x00002BD4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002BD4u); #endif /* 0xBFC20BAC: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20BB0: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x00002BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20BB4: 2463FF81 addiu $v1, $v1, -127 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-127)); PGXP_ALU(0x2463FF81u, cpu->gpr[3], _pgx1, 0xFFFFFF81u); } #ifdef PSX_COSIM cosim_instr(0x00002BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20BB8: A0431040 sb $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002BE4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002BE4u); #endif /* 0xBFC20BBC: 9443104A lhu $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002BE8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x9443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002BE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20BC0: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC20BC4: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00002BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20BC8: A443104A sh $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002BF4u); return; } g_debug_last_store_pc = 0x00002BF4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20BCC: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002BF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20BD0: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002BFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20BD4: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C00u); return; } g_debug_last_store_pc = 0x00002C00u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20BD8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20BDC: 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(0x00002C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20BE0: AC434C5C sw $v1, 19548($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C0Cu); return; } g_debug_last_store_pc = 0x00002C0Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C5Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002C0Cu); #endif label_BFC20BE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002C10u); #endif #ifdef PSX_COSIM cosim_block(0x00002C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20BE4: 03E00008 jr $ra */ psx_delay_BFC20BE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20BE8: 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(0x00002C14u); #endif if (psx_delay_BFC20BE4) { psx_delay_BFC20BE4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002C18(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002C18u); int psx_delay_BFC20C18 = 0; int psx_taken_BFC20C18 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20BFCu: goto label_BFC20BFC; default: break; } } label_BFC20BEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002C18u); #endif #ifdef PSX_COSIM cosim_block(0x00002C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20BEC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C18u); #endif /* 0xBFC20BF0: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #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, 0x11u); #endif /* 0xBFC20BF4: 24040052 addiu $a0, $zero, 82 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (82)); PGXP_ALU(0x24040052u, cpu->gpr[4], _pgx1, 0x00000052u); } #ifdef PSX_COSIM cosim_instr(0x00002C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20BF8: A0441040 sb $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002C24u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002C24u); #endif label_BFC20BFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002C28u); #endif #ifdef PSX_COSIM cosim_block(0x00002C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C28u); #endif /* 0xBFC20BFC: 9462104A lhu $v0, 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, 0x00002C28u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C00: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC20C04: 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(0x00002C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C08: A462104A sh $v0, 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, 0x00002C34u); return; } g_debug_last_store_pc = 0x00002C34u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002C34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C0C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20C10: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C14: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C40u); return; } g_debug_last_store_pc = 0x00002C40u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C18: 1000FFF2 beq $zero, $zero, 0xBFC20BE4 */ uint32_t psx_brA_BFC20C18 = cpu->gpr[0]; 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(0x00002C48u); #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, 0x00002C10u); cpu->pc = 0x00002C10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C4Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C4Cu); cpu->pc = 0x00002C4Cu; return; /* fallthrough */ } void OpenBIOS_func_00002C4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002C4Cu); int psx_delay_BFC20C54 = 0; int psx_taken_BFC20C54 = 0; int psx_delay_BFC20C60 = 0; int psx_taken_BFC20C60 = 0; int psx_delay_BFC20C98 = 0; int psx_delay_BFC20CA8 = 0; int psx_delay_BFC20CC4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20C5Cu: goto label_BFC20C5C; case 0xBFC20C68u: goto label_BFC20C68; case 0xBFC20CA0u: goto label_BFC20CA0; case 0xBFC20CB0u: goto label_BFC20CB0; default: break; } } label_BFC20C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C20: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C50u); #endif /* 0xBFC20C24: 90451040 lbu $a1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 5, 0x4u); PGXP_LOAD(0x90451040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20C28: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002C54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002C54u); #endif /* 0xBFC20C2C: 9462104A lhu $v0, 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, 0x00002C58u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002C58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C30: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC20C34: 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(0x00002C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C38: A462104A sh $v0, 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, 0x00002C64u); return; } g_debug_last_store_pc = 0x00002C64u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C3C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20C40: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002C6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C44: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C70u); return; } g_debug_last_store_pc = 0x00002C70u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C48: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C74u); #endif /* 0xBFC20C4C: 8C424C44 lw $v0, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002C78u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C44u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C50: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC20C54: 1440FFE3 bne $v0, $zero, 0xBFC20BE4 */ uint32_t psx_brA_BFC20C54 = cpu->gpr[2]; uint32_t psx_brB_BFC20C54 = cpu->gpr[0]; psx_taken_BFC20C54 = (psx_brA_BFC20C54 != psx_brB_BFC20C54); psx_delay_BFC20C54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002C84u); #endif if (psx_delay_BFC20C54) { psx_delay_BFC20C54 = 0; if (psx_taken_BFC20C54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C10u); cpu->pc = 0x00002C10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C88u); } label_BFC20C5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002C88u); #endif #ifdef PSX_COSIM cosim_block(0x00002C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20C5C: 30A30008 andi $v1, $a1, 0x8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[5] & 0x8u; PGXP_ALU(0x30A30008u, cpu->gpr[3], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00002C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20C60: 106000AB beq $v1, $zero, 0xBFC20F10 */ uint32_t psx_brA_BFC20C60 = cpu->gpr[3]; uint32_t psx_brB_BFC20C60 = cpu->gpr[0]; psx_taken_BFC20C60 = (psx_brA_BFC20C60 == psx_brB_BFC20C60); psx_delay_BFC20C60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002C90u); #endif if (psx_delay_BFC20C60) { psx_delay_BFC20C60 = 0; if (psx_taken_BFC20C60) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F3Cu); cpu->pc = 0x00002F3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C94u); } label_BFC20C68: #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, 0x4u); #endif /* 0xBFC20C68: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C6C: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x00002C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20C70: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x14u); #endif /* 0xBFC20C74: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20C78: 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(0x00002CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC20C7C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CA8u); return; } g_debug_last_store_pc = 0x00002CA8u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002CA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C80: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002CACu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002CB0u); #endif /* 0xBFC20C84: 8CE34C58 lw $v1, 19544($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CB0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x8CE34C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20C88: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20C8C: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CB8u); return; } g_debug_last_store_pc = 0x00002CB8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC20C90: 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(0x00002CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20C94: 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(0x00002CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC20C98: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00002CCCu; /* jalr link before delay slot */ psx_delay_BFC20C98 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20C9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002CC8u); #endif if (psx_delay_BFC20C98) { psx_delay_BFC20C98 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00002CCCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC20CA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002CCCu); #endif #ifdef PSX_COSIM cosim_block(0x00002CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20CA0: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC20CA4: 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(0x00002CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC20CA8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00002CDCu; /* jal link before delay slot */ psx_delay_BFC20CA8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20CAC: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x00002CD8u); #endif if (psx_delay_BFC20CA8) { psx_delay_BFC20CA8 = 0; cpu->gpr[31] = 0x00002CDCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC20CB0: #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 /* 0xBFC20CB0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x4u); #endif /* 0xBFC20CB4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20CB8: 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(0x00002CE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20CBC: AC434C50 sw $v1, 19536($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002CE8u); return; } g_debug_last_store_pc = 0x00002CE8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C50u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002CE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20CC0: 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(0x00002CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20CC4: 03E00008 jr $ra */ psx_delay_BFC20CC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20CC8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00002CF4u); #endif if (psx_delay_BFC20CC4) { psx_delay_BFC20CC4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002CF8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002CF8u); int psx_delay_BFC20CF8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20CF8u: goto label_BFC20CF8; default: break; } } label_BFC20CCC: #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, 0x10u); #endif /* 0xBFC20CCC: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002CF8u); #endif /* 0xBFC20CD0: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002CFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20CD4: A0801040 sb $zero, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002D00u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002D00u); #endif /* 0xBFC20CD8: 9464104A lhu $a0, 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, 0x00002D04u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20CDC: 3842005A xori $v0, $v0, 0x5A */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au; PGXP_ALU(0x3842005Au, cpu->gpr[2], _pgx1, 0x005Au); } #ifdef PSX_COSIM cosim_instr(0x00002D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20CE0: 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(0x00002D0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20CE4: A464104A sh $a0, 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, 0x00002D10u); return; } g_debug_last_store_pc = 0x00002D10u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20CE8: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20CEC: 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(0x00002D18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20CF0: AC641070 sw $a0, 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, 0x00002D1Cu); return; } g_debug_last_store_pc = 0x00002D1Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20CF4: 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(0x00002D20u); #endif label_BFC20CF8: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20CF8: 03E00008 jr $ra */ psx_delay_BFC20CF8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20CFC: 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(0x00002D28u); #endif if (psx_delay_BFC20CF8) { psx_delay_BFC20CF8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002D2C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002D2Cu); int psx_delay_BFC20D2C = 0; int psx_taken_BFC20D2C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20D10u: goto label_BFC20D10; default: break; } } label_BFC20D00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002D2Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC20D00: 00022A03 sra $a1, $v0, 8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[2] >> 8u); PGXP_ALU(0x00022A03u, cpu->gpr[5], _pgx1, 8u); } #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, 0x10u); #endif /* 0xBFC20D04: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D30u); #endif /* 0xBFC20D08: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC20D0C: A0851040 sb $a1, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002D38u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0851040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002D38u); #endif label_BFC20D10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002D3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D3Cu); #endif /* 0xBFC20D10: 9464104A lhu $a0, 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, 0x00002D3Cu); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #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, 0x4u); #endif /* 0xBFC20D14: 3842005D xori $v0, $v0, 0x5D */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Du; PGXP_ALU(0x3842005Du, cpu->gpr[2], _pgx1, 0x005Du); } #ifdef PSX_COSIM cosim_instr(0x00002D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20D18: 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(0x00002D44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20D1C: A464104A sh $a0, 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, 0x00002D48u); return; } g_debug_last_store_pc = 0x00002D48u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20D20: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20D24: 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(0x00002D50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20D28: AC641070 sw $a0, 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, 0x00002D54u); return; } g_debug_last_store_pc = 0x00002D54u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D2C: 1000FFF2 beq $zero, $zero, 0xBFC20CF8 */ uint32_t psx_brA_BFC20D2C = cpu->gpr[0]; uint32_t psx_brB_BFC20D2C = cpu->gpr[0]; psx_taken_BFC20D2C = (psx_brA_BFC20D2C == psx_brB_BFC20D2C); psx_delay_BFC20D2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20D30: 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(0x00002D5Cu); #endif if (psx_delay_BFC20D2C) { psx_delay_BFC20D2C = 0; if (psx_taken_BFC20D2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D24u); cpu->pc = 0x00002D24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D60u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D60u); cpu->pc = 0x00002D60u; return; /* fallthrough */ } void OpenBIOS_func_00002D60(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002D60u); int psx_delay_BFC20D40 = 0; int psx_taken_BFC20D40 = 0; label_BFC20D34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002D60u); #endif #ifdef PSX_COSIM cosim_block(0x00002D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20D34: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D60u); #endif /* 0xBFC20D38: 90851040 lbu $a1, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 5, 0x10u); PGXP_LOAD(0x90851040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20D3C: A0821040 sb $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002D68u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002D68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D40: 1000FFAE beq $zero, $zero, 0xBFC20BFC */ uint32_t psx_brA_BFC20D40 = cpu->gpr[0]; uint32_t psx_brB_BFC20D40 = cpu->gpr[0]; psx_taken_BFC20D40 = (psx_brA_BFC20D40 == psx_brB_BFC20D40); psx_delay_BFC20D40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D44: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002D70u); #endif if (psx_delay_BFC20D40) { psx_delay_BFC20D40 = 0; if (psx_taken_BFC20D40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C28u); cpu->pc = 0x00002C28u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D74u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D74u); cpu->pc = 0x00002D74u; return; /* fallthrough */ } void OpenBIOS_func_00002D74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002D74u); int psx_delay_BFC20D54 = 0; int psx_taken_BFC20D54 = 0; label_BFC20D48: #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, 0x4u); #endif /* 0xBFC20D48: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D74u); #endif /* 0xBFC20D4C: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20D50: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002D7Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002D80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D54: 1000FFA9 beq $zero, $zero, 0xBFC20BFC */ uint32_t psx_brA_BFC20D54 = cpu->gpr[0]; uint32_t psx_brB_BFC20D54 = cpu->gpr[0]; psx_taken_BFC20D54 = (psx_brA_BFC20D54 == psx_brB_BFC20D54); psx_delay_BFC20D54 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D58: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002D84u); #endif if (psx_delay_BFC20D54) { psx_delay_BFC20D54 = 0; if (psx_taken_BFC20D54) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C28u); cpu->pc = 0x00002C28u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D88u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D88u); cpu->pc = 0x00002D88u; return; /* fallthrough */ } void OpenBIOS_func_00002D88(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002D88u); int psx_delay_BFC20D84 = 0; int psx_taken_BFC20D84 = 0; label_BFC20D5C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20D5C: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002D88u); #endif /* 0xBFC20D60: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC20D64: A0801040 sb $zero, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002D90u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002D90u); #endif /* 0xBFC20D68: 9464104A lhu $a0, 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, 0x00002D94u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002D94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20D6C: 3842005C xori $v0, $v0, 0x5C */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu; PGXP_ALU(0x3842005Cu, cpu->gpr[2], _pgx1, 0x005Cu); } #ifdef PSX_COSIM cosim_instr(0x00002D98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20D70: 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(0x00002D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20D74: A464104A sh $a0, 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, 0x00002DA0u); return; } g_debug_last_store_pc = 0x00002DA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20D78: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20D7C: 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(0x00002DA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20D80: AC641070 sw $a0, 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, 0x00002DACu); return; } g_debug_last_store_pc = 0x00002DACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #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, 0x1u); #endif /* 0xBFC20D84: 1000FFDC beq $zero, $zero, 0xBFC20CF8 */ uint32_t psx_brA_BFC20D84 = cpu->gpr[0]; uint32_t psx_brB_BFC20D84 = cpu->gpr[0]; psx_taken_BFC20D84 = (psx_brA_BFC20D84 == psx_brB_BFC20D84); psx_delay_BFC20D84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20D88: 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(0x00002DB4u); #endif if (psx_delay_BFC20D84) { psx_delay_BFC20D84 = 0; if (psx_taken_BFC20D84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002D24u); cpu->pc = 0x00002D24u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002DB8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002DB8u); cpu->pc = 0x00002DB8u; return; /* fallthrough */ } void OpenBIOS_func_00002DB8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002DB8u); int psx_delay_BFC20D98 = 0; int psx_taken_BFC20D98 = 0; label_BFC20D8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002DB8u); #endif #ifdef PSX_COSIM cosim_block(0x00002DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20D8C: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002DB8u); #endif /* 0xBFC20D90: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #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, 0x11u); #endif /* 0xBFC20D94: A0801040 sb $zero, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002DC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002DC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20D98: 1000FFDD beq $zero, $zero, 0xBFC20D10 */ uint32_t psx_brA_BFC20D98 = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC20D9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002DC8u); #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, 0x00002D3Cu); cpu->pc = 0x00002D3Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002DCCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002DCCu); cpu->pc = 0x00002DCCu; return; /* fallthrough */ } void OpenBIOS_func_00002DCC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002DCCu); int psx_delay_BFC20DCC = 0; int psx_taken_BFC20DCC = 0; int psx_delay_BFC20DF4 = 0; int psx_taken_BFC20DF4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20DD4u: goto label_BFC20DD4; default: break; } } label_BFC20DA0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002DCCu); #endif #ifdef PSX_COSIM cosim_block(0x00002DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC20DA0: 3C071F80 lui $a3, 0x1F80 */ cpu->gpr[7] = 0x1F800000u; PGXP_ALU(0x3C071F80u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DD0u); #endif /* 0xBFC20DA4: 90E51040 lbu $a1, 4160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[7] + (4160)), 5, 0x80u); PGXP_LOAD(0x90E51040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC20DA8: A0E01040 sb $zero, 4160($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002DD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[7] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0E01040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002DD4u); #endif /* 0xBFC20DAC: 9467104A lhu $a3, 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, 0x00002DD8u); return; } cpu->gpr[7] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 7, 0x8u); } PGXP_LOAD(0x9467104Au, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20DB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002DDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC20DB4: 34E70010 ori $a3, $a3, 0x10 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[7] | 0x10u; PGXP_ALU(0x34E70010u, cpu->gpr[7], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00002DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC20DB8: A467104A sh $a3, 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, 0x00002DE4u); return; } g_debug_last_store_pc = 0x00002DE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[7] & 0xFFFFu)); } PGXP_STORE(0xA467104Au, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002DE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20DBC: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC20DC0: 2407FF7F addiu $a3, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[7] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2407FF7Fu, cpu->gpr[7], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002DECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x88u); #endif /* 0xBFC20DC4: AC671070 sw $a3, 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, 0x00002DF0u); return; } g_debug_last_store_pc = 0x00002DF0u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAC671070u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00002DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20DC8: 00021A03 sra $v1, $v0, 8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[2] >> 8u); PGXP_ALU(0x00021A03u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x00002DF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20DCC: 14A3004F bne $a1, $v1, 0xBFC20F0C */ uint32_t psx_brA_BFC20DCC = cpu->gpr[5]; uint32_t psx_brB_BFC20DCC = cpu->gpr[3]; psx_taken_BFC20DCC = (psx_brA_BFC20DCC != psx_brB_BFC20DCC); psx_delay_BFC20DCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC20DD0: 00A22826 xor $a1, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[5] = cpu->gpr[5] ^ cpu->gpr[2]; PGXP_ALU(0x00A22826u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002DFCu); #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, 0x00002F38u); cpu->pc = 0x00002F38u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E00u); } label_BFC20DD4: #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, 0x8u); #endif /* 0xBFC20DD4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20DD8: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20DDC: 24634C20 addiu $v1, $v1, 19488 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19488)); PGXP_ALU(0x24634C20u, cpu->gpr[3], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x00002E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20DE0: 2442AE98 addiu $v0, $v0, -20840 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20840)); PGXP_ALU(0x2442AE98u, cpu->gpr[2], _pgx1, 0xFFFFAE98u); } #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, 0x48u); #endif /* 0xBFC20DE4: 00661821 addu $v1, $v1, $a2 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[6]; PGXP_ALU(0x00661821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC20DE8: 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(0x00002E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20DEC: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC20DF0: 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, 0x00002E1Cu); return; } g_debug_last_store_pc = 0x00002E1Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC650000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20DF4: 1000FF7B beq $zero, $zero, 0xBFC20BE4 */ uint32_t psx_brA_BFC20DF4 = cpu->gpr[0]; uint32_t psx_brB_BFC20DF4 = cpu->gpr[0]; psx_taken_BFC20DF4 = (psx_brA_BFC20DF4 == psx_brB_BFC20DF4); psx_delay_BFC20DF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20DF8: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002E24u; 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(0x00002E24u); #endif if (psx_delay_BFC20DF4) { psx_delay_BFC20DF4 = 0; if (psx_taken_BFC20DF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C10u); cpu->pc = 0x00002C10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E28u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E28u); cpu->pc = 0x00002E28u; return; /* fallthrough */ } void OpenBIOS_func_00002E28(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002E28u); int psx_delay_BFC20E34 = 0; int psx_taken_BFC20E34 = 0; int psx_delay_BFC20E40 = 0; int psx_taken_BFC20E40 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20E3Cu: goto label_BFC20E3C; default: break; } } label_BFC20DFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002E28u); #endif #ifdef PSX_COSIM cosim_block(0x00002E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20DFC: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20E00: 2463AE98 addiu $v1, $v1, -20840 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-20840)); PGXP_ALU(0x2463AE98u, cpu->gpr[3], _pgx1, 0xFFFFAE98u); } #ifdef PSX_COSIM cosim_instr(0x00002E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20E04: 00832021 addu $a0, $a0, $v1 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = cpu->gpr[4] + cpu->gpr[3]; PGXP_ALU(0x00832021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002E30u); #endif /* 0xBFC20E08: 90840000 lbu $a0, 0($a0) */ { uint32_t _pgxa = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (0)), 4, 0x10u); PGXP_LOAD(0x90840000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20E0C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E38u); #endif /* 0xBFC20E10: 90651040 lbu $a1, 4160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (4160)), 5, 0x8u); PGXP_LOAD(0x90651040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00002E3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20E14: A0641040 sb $a0, 4160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002E40u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[3] + (4160)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0641040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E40u); #endif /* 0xBFC20E18: 9464104A lhu $a0, 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, 0x00002E44u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E1C: 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(0x00002E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20E20: 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(0x00002E4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20E24: A464104A sh $a0, 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, 0x00002E50u); return; } g_debug_last_store_pc = 0x00002E50u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20E28: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20E2C: 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(0x00002E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20E30: AC641070 sw $a0, 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, 0x00002E5Cu); return; } g_debug_last_store_pc = 0x00002E5Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC20E34: 14A20035 bne $a1, $v0, 0xBFC20F0C */ uint32_t psx_brA_BFC20E34 = cpu->gpr[5]; uint32_t psx_brB_BFC20E34 = cpu->gpr[2]; psx_taken_BFC20E34 = (psx_brA_BFC20E34 != psx_brB_BFC20E34); psx_delay_BFC20E34 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20E38: 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(0x00002E64u); #endif if (psx_delay_BFC20E34) { psx_delay_BFC20E34 = 0; if (psx_taken_BFC20E34) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F38u); cpu->pc = 0x00002F38u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E68u); } label_BFC20E3C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002E68u); #endif #ifdef PSX_COSIM cosim_block(0x00002E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E3C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20E40: 1000FF68 beq $zero, $zero, 0xBFC20BE4 */ uint32_t psx_brA_BFC20E40 = cpu->gpr[0]; uint32_t psx_brB_BFC20E40 = cpu->gpr[0]; psx_taken_BFC20E40 = (psx_brA_BFC20E40 == psx_brB_BFC20E40); psx_delay_BFC20E40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20E44: AC434C40 sw $v1, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002E70u); return; } g_debug_last_store_pc = 0x00002E70u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002E70u); #endif if (psx_delay_BFC20E40) { psx_delay_BFC20E40 = 0; if (psx_taken_BFC20E40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C10u); cpu->pc = 0x00002C10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E74u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002E74u); cpu->pc = 0x00002E74u; return; /* fallthrough */ } void OpenBIOS_func_00002E74(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002E74u); int psx_delay_BFC20E9C = 0; int psx_taken_BFC20E9C = 0; label_BFC20E48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002E74u); #endif #ifdef PSX_COSIM cosim_block(0x00002E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E48: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E4C: 24424C28 addiu $v0, $v0, 19496 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19496)); PGXP_ALU(0x24424C28u, cpu->gpr[2], _pgx1, 0x00004C28u); } #ifdef PSX_COSIM cosim_instr(0x00002E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20E50: 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(0x00002E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E80u); #endif /* 0xBFC20E54: 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, 0x00002E80u); 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(0x00002E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E58: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002E84u); #endif /* 0xBFC20E5C: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20E60: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002E8Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002E8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002E90u); #endif /* 0xBFC20E64: 9443104A lhu $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002E90u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x9443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20E68: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002E94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20E6C: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00002E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20E70: A443104A sh $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002E9Cu); return; } g_debug_last_store_pc = 0x00002E9Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443104Au, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC20E74: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20E78: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002EA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20E7C: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EA8u); return; } g_debug_last_store_pc = 0x00002EA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002EA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E80: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20E84: 24424C20 addiu $v0, $v0, 19488 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19488)); PGXP_ALU(0x24424C20u, cpu->gpr[2], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x00002EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC20E88: A0A4007F sb $a0, 127($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 127; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002EB4u; 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(0x00002EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC20E8C: 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(0x00002EB8u); #endif /* 0xBFC20E90: 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, 0x00002EBCu); 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(0x00002EBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20E94: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002EC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20E98: 00641826 xor $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(0x00641826u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002EC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20E9C: 1000FF51 beq $zero, $zero, 0xBFC20BE4 */ uint32_t psx_brA_BFC20E9C = cpu->gpr[0]; uint32_t psx_brB_BFC20E9C = cpu->gpr[0]; psx_taken_BFC20E9C = (psx_brA_BFC20E9C == psx_brB_BFC20E9C); psx_delay_BFC20E9C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20EA0: 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, 0x00002ECCu); return; } g_debug_last_store_pc = 0x00002ECCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002ECCu); #endif if (psx_delay_BFC20E9C) { psx_delay_BFC20E9C = 0; if (psx_taken_BFC20E9C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002C10u); cpu->pc = 0x00002C10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002ED0u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002ED0u); cpu->pc = 0x00002ED0u; return; /* fallthrough */ } void OpenBIOS_func_00002ED0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002ED0u); int psx_delay_BFC20EE0 = 0; int psx_taken_BFC20EE0 = 0; int psx_delay_BFC20EF4 = 0; int psx_taken_BFC20EF4 = 0; int psx_delay_BFC20F04 = 0; int psx_taken_BFC20F04 = 0; int psx_delay_BFC20F10 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20F0Cu: goto label_BFC20F0C; case 0xBFC20F10u: goto label_BFC20F10; case 0xBFC20EE8u: goto label_BFC20EE8; case 0xBFC20EFCu: goto label_BFC20EFC; default: break; } } label_BFC20EA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002ED0u); #endif #ifdef PSX_COSIM cosim_block(0x00002ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002ED0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20EA4: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002ED0u); #endif /* 0xBFC20EA8: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002ED4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20EAC: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002ED8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00002ED8u); #endif /* 0xBFC20EB0: 9462104A lhu $v0, 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, 0x00002EDCu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC20EB4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20EB8: 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(0x00002EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20EBC: A462104A sh $v0, 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, 0x00002EE8u); return; } g_debug_last_store_pc = 0x00002EE8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20EC0: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002EECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20EC4: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20EC8: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002EF4u); return; } g_debug_last_store_pc = 0x00002EF4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20ECC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002EF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20ED0: 24424C20 addiu $v0, $v0, 19488 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19488)); PGXP_ALU(0x24424C20u, cpu->gpr[2], _pgx1, 0x00004C20u); } #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, 0x44u); #endif /* 0xBFC20ED4: 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(0x00002F00u); #endif /* 0xBFC20ED8: 8C420000 lw $v0, 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, 0x00002F04u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002F04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20EDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002F08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20EE0: 1482000A bne $a0, $v0, 0xBFC20F0C */ uint32_t psx_brA_BFC20EE0 = cpu->gpr[4]; uint32_t psx_brB_BFC20EE0 = cpu->gpr[2]; psx_taken_BFC20EE0 = (psx_brA_BFC20EE0 != psx_brB_BFC20EE0); psx_delay_BFC20EE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20EE4: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F10u); #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, 0x00002F38u); goto label_BFC20F0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F14u); } label_BFC20EE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002F14u); #endif #ifdef PSX_COSIM cosim_block(0x00002F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F14u); #endif /* 0xBFC20EE8: 94621044 lhu $v0, 4164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002F14u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94621044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002F14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20EEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20EF0: 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(0x00002F1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20EF4: 1040FFFC beq $v0, $zero, 0xBFC20EE8 */ uint32_t psx_brA_BFC20EF4 = cpu->gpr[2]; uint32_t psx_brB_BFC20EF4 = cpu->gpr[0]; psx_taken_BFC20EF4 = (psx_brA_BFC20EF4 == psx_brB_BFC20EF4); psx_delay_BFC20EF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20EF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002F24u); #endif if (psx_delay_BFC20EF4) { psx_delay_BFC20EF4 = 0; if (psx_taken_BFC20EF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F14u); goto label_BFC20EE8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F28u); } label_BFC20EFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002F28u); #endif #ifdef PSX_COSIM cosim_block(0x00002F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F28u); #endif /* 0xBFC20EFC: 90641040 lbu $a0, 4160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[3] + (4160)), 4, 0x8u); PGXP_LOAD(0x90641040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002F28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20F00: 24030047 addiu $v1, $zero, 71 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); PGXP_ALU(0x24030047u, cpu->gpr[3], _pgx1, 0x00000047u); } #ifdef PSX_COSIM cosim_instr(0x00002F2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC20F04: 10830002 beq $a0, $v1, 0xBFC20F10 */ uint32_t psx_brA_BFC20F04 = cpu->gpr[4]; uint32_t psx_brB_BFC20F04 = cpu->gpr[3]; psx_taken_BFC20F04 = (psx_brA_BFC20F04 == psx_brB_BFC20F04); psx_delay_BFC20F04 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20F08: 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(0x00002F34u); #endif if (psx_delay_BFC20F04) { psx_delay_BFC20F04 = 0; if (psx_taken_BFC20F04) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F3Cu); goto label_BFC20F10; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F38u); } label_BFC20F0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002F38u); #endif #ifdef PSX_COSIM cosim_block(0x00002F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC20F0C: 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(0x00002F38u); #endif label_BFC20F10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002F3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20F10: 03E00008 jr $ra */ psx_delay_BFC20F10 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20F14: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002F40u); #endif if (psx_delay_BFC20F10) { psx_delay_BFC20F10 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00002F44(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002F44u); int psx_delay_BFC20F44 = 0; int psx_taken_BFC20F44 = 0; int psx_delay_BFC20F68 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20F4Cu: goto label_BFC20F4C; default: break; } } label_BFC20F18: #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, 0x80u); #endif /* 0xBFC20F18: 3C070000 lui $a3, 0x0 */ cpu->gpr[7] = 0x00000000u; PGXP_ALU(0x3C070000u, cpu->gpr[7], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20F1C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F48u); #endif /* 0xBFC20F20: 8CE44C58 lw $a0, 19544($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F4Cu); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x80u); } PGXP_LOAD(0x8CE44C58u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002F4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F50u); #endif /* 0xBFC20F24: 8C634C48 lw $v1, 19528($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19528; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F50u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C634C48u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20F28: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC20F2C: 00042880 sll $a1, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] << 2u; PGXP_ALU(0x00042880u, cpu->gpr[5], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00002F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20F30: 24424C08 addiu $v0, $v0, 19464 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19464)); PGXP_ALU(0x24424C08u, cpu->gpr[2], _pgx1, 0x00004C08u); } #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, 0x8u); #endif /* 0xBFC20F34: 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(0x00002F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC20F38: 00A21021 addu $v0, $a1, $v0 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[5] + cpu->gpr[2]; PGXP_ALU(0x00A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC20F3C: 2C66000A sltiu $a2, $v1, 10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[6] = (uint32_t)(cpu->gpr[3] < 0x0000000Au ? 1 : 0); PGXP_ALU(0x2C66000Au, cpu->gpr[6], _pgx1, 0x000Au); } #ifdef PSX_COSIM cosim_instr(0x00002F68u); #endif /* 0xBFC20F40: 8C420000 lw $v0, 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, 0x00002F6Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00002F6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC20F44: 10C000E4 beq $a2, $zero, 0xBFC212D8 */ uint32_t psx_brA_BFC20F44 = cpu->gpr[6]; uint32_t psx_brB_BFC20F44 = cpu->gpr[0]; psx_taken_BFC20F44 = (psx_brA_BFC20F44 == psx_brB_BFC20F44); psx_delay_BFC20F44 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20F48: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00002F74u); #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, 0x00003304u); cpu->pc = 0x00003304u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002F78u); } label_BFC20F4C: #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, 0x40u); #endif /* 0xBFC20F4C: 3C06BFC1 lui $a2, 0xBFC1 */ cpu->gpr[6] = 0xBFC10000u; PGXP_ALU(0x3C06BFC1u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC20F50: 24C6A358 addiu $a2, $a2, -23720 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[6] + (-23720)); PGXP_ALU(0x24C6A358u, cpu->gpr[6], _pgx1, 0xFFFFA358u); } #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, 0x8u); #endif /* 0xBFC20F54: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00002F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC20F58: 00C31821 addu $v1, $a2, $v1 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[6] + cpu->gpr[3]; PGXP_ALU(0x00C31821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002F84u); #endif /* 0xBFC20F5C: 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, 0x00002F88u); 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(0x00002F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20F60: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00002F8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20F64: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC20F68: 00C00008 jr $a2 */ psx_delay_BFC20F68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC20F6C: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002F98u); return; } g_debug_last_store_pc = 0x00002F98u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00002F98u); #endif if (psx_delay_BFC20F68) { psx_delay_BFC20F68 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[6]); cpu->pc = cpu->gpr[6]; return; } } void OpenBIOS_func_00002F9C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00002F9Cu); label_BFC20F70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00002F9Cu); #endif #ifdef PSX_COSIM cosim_block(0x00002F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20F70: 0004202B sltu $a0, $zero, $a0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[4] ? 1 : 0); PGXP_ALU(0x0004202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002F9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20F74: 00042340 sll $a0, $a0, 13 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 13u; PGXP_ALU(0x00042340u, cpu->gpr[4], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x00002FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20F78: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20F7C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002FA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20F80: AC444C60 sw $a0, 19552($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FACu); return; } g_debug_last_store_pc = 0x00002FACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC444C60u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002FACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20F84: 24634C10 addiu $v1, $v1, 19472 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19472)); PGXP_ALU(0x24634C10u, cpu->gpr[3], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0x00002FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20F88: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC20F8C: 34841003 ori $a0, $a0, 0x1003 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1003u; PGXP_ALU(0x34841003u, cpu->gpr[4], _pgx1, 0x1003u); } #ifdef PSX_COSIM cosim_instr(0x00002FB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20F90: A444104A sh $a0, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002FBCu); return; } g_debug_last_store_pc = 0x00002FBCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA444104Au, _pgxa, cpu->gpr[4]); } #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, 0x28u); #endif /* 0xBFC20F94: 00651821 addu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00651821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00002FC0u); #endif /* 0xBFC20F98: 8C630000 lw $v1, 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, 0x00002FC4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FC4u); #endif /* 0xBFC20F9C: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00002FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC20FA0: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #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, 0x8u); #endif /* 0xBFC20FA4: 2463FF81 addiu $v1, $v1, -127 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-127)); PGXP_ALU(0x2463FF81u, cpu->gpr[3], _pgx1, 0xFFFFFF81u); } #ifdef PSX_COSIM cosim_instr(0x00002FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20FA8: A0431040 sb $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00002FD4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FD4u); #endif /* 0xBFC20FAC: 9443104A lhu $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002FD8u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x9443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20FB0: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC20FB4: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00002FE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20FB8: A443104A sh $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00002FE4u); return; } g_debug_last_store_pc = 0x00002FE4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20FBC: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002FE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20FC0: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00002FECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00002FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20FC4: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FF0u); return; } g_debug_last_store_pc = 0x00002FF0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20FC8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00002FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC20FCC: 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(0x00002FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC20FD0: AC434C5C sw $v1, 19548($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00002FFCu); return; } g_debug_last_store_pc = 0x00002FFCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C5Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00002FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003000u); cpu->pc = 0x00003000u; return; /* fallthrough */ } void OpenBIOS_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); label_BFC20FD4: #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, 0x5u); #endif /* 0xBFC20FD4: 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(0x00003000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; /* fallthrough */ } void OpenBIOS_func_00003004(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003004u); label_BFC20FD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003004u); #endif #ifdef PSX_COSIM cosim_block(0x00003004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003004u); #endif /* 0xBFC20FD8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003004u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003008u); cpu->pc = 0x00003008u; return; /* fallthrough */ } void OpenBIOS_func_00003008(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003008u); label_BFC20FDC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003008u); #endif #ifdef PSX_COSIM cosim_block(0x00003008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20FDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000300Cu); cpu->pc = 0x0000300Cu; return; /* fallthrough */ } void OpenBIOS_func_0000300C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000300Cu); int psx_delay_BFC20FE0 = 0; label_BFC20FE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000300Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000300Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000300Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC20FE0: 03E00008 jr $ra */ { uint32_t _t = cpu->gpr[31]; /* DELAY (orphaned) 0xBFC20FE4: 27BD0018 addiu $sp, $sp, 24 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } /* CPS: publish $ra */ } void OpenBIOS_func_00003010(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003010u); label_BFC20FE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003010u); #endif #ifdef PSX_COSIM cosim_block(0x00003010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC20FE4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00003010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003014u); cpu->pc = 0x00003014u; return; /* fallthrough */ } void OpenBIOS_func_00003014(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003014u); label_BFC20FE8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003014u); #endif #ifdef PSX_COSIM cosim_block(0x00003014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC20FE8: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003014u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003018u); cpu->pc = 0x00003018u; return; /* fallthrough */ } void OpenBIOS_func_00003018(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003018u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC20FF8u: goto label_BFC20FF8; default: break; } } label_BFC20FEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003018u); #endif #ifdef PSX_COSIM cosim_block(0x00003018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003018u); #endif /* 0xBFC20FEC: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC20FF0: 24040057 addiu $a0, $zero, 87 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (87)); PGXP_ALU(0x24040057u, cpu->gpr[4], _pgx1, 0x00000057u); } #ifdef PSX_COSIM cosim_instr(0x0000301Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC20FF4: A0441040 sb $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003020u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003020u); #endif label_BFC20FF8: #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 /* 0xBFC20FF8: 9462104A lhu $v0, 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, 0x00003024u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC20FFC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21000: 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(0x0000302Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003030u); cpu->pc = 0x00003030u; return; /* fallthrough */ } void OpenBIOS_func_00003030(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003030u); label_BFC21004: #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, 0xCu); #endif /* 0xBFC21004: A462104A sh $v0, 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, 0x00003030u); return; } g_debug_last_store_pc = 0x00003030u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21008: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2100C: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21010: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000303Cu); return; } g_debug_last_store_pc = 0x0000303Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000303Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003040u); cpu->pc = 0x00003040u; return; /* fallthrough */ } void OpenBIOS_func_00003040(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003040u); int psx_delay_BFC21014 = 0; int psx_taken_BFC21014 = 0; label_BFC21014: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21014: 1000FFF0 beq $zero, $zero, 0xBFC20FD8 */ uint32_t psx_brA_BFC21014 = cpu->gpr[0]; uint32_t psx_brB_BFC21014 = cpu->gpr[0]; psx_taken_BFC21014 = (psx_brA_BFC21014 == psx_brB_BFC21014); psx_delay_BFC21014 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21018: 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(0x00003044u); #endif if (psx_delay_BFC21014) { psx_delay_BFC21014 = 0; if (psx_taken_BFC21014) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003048u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003048u); cpu->pc = 0x00003048u; return; /* fallthrough */ } void OpenBIOS_func_00003048(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003048u); label_BFC2101C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003048u); #endif #ifdef PSX_COSIM cosim_block(0x00003048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2101C: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000304Cu); cpu->pc = 0x0000304Cu; return; /* fallthrough */ } void OpenBIOS_func_0000304C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000304Cu); label_BFC21020: #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 /* 0xBFC21020: 90451040 lbu $a1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 5, 0x4u); PGXP_LOAD(0x90451040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000304Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21024: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003050u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003050u); #endif /* 0xBFC21028: 9462104A lhu $v0, 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, 0x00003054u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003058u); cpu->pc = 0x00003058u; return; /* fallthrough */ } void OpenBIOS_func_00003058(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003058u); label_BFC2102C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003058u); #endif #ifdef PSX_COSIM cosim_block(0x00003058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2102C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21030: 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(0x0000305Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003060u); cpu->pc = 0x00003060u; return; /* fallthrough */ } void OpenBIOS_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); label_BFC21034: #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, 0xCu); #endif /* 0xBFC21034: A462104A sh $v0, 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, 0x00003060u); return; } g_debug_last_store_pc = 0x00003060u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21038: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003064u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2103C: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003068u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21040: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); 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[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000306Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003070u); cpu->pc = 0x00003070u; return; /* fallthrough */ } void OpenBIOS_func_00003070(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003070u); label_BFC21044: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003070u); #endif #ifdef PSX_COSIM cosim_block(0x00003070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21044: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003070u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21048: 2442AE94 addiu $v0, $v0, -20844 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20844)); PGXP_ALU(0x2442AE94u, cpu->gpr[2], _pgx1, 0xFFFFAE94u); } #ifdef PSX_COSIM cosim_instr(0x00003074u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003078u); cpu->pc = 0x00003078u; return; /* fallthrough */ } void OpenBIOS_func_00003078(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003078u); int psx_delay_BFC21060 = 0; int psx_taken_BFC21060 = 0; int psx_delay_BFC21068 = 0; int psx_taken_BFC21068 = 0; int psx_delay_BFC21094 = 0; int psx_delay_BFC210A4 = 0; int psx_delay_BFC210B8 = 0; int psx_taken_BFC210B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC210B8u: goto label_BFC210B8; case 0xBFC21068u: goto label_BFC21068; case 0xBFC21070u: goto label_BFC21070; case 0xBFC2109Cu: goto label_BFC2109C; case 0xBFC210ACu: goto label_BFC210AC; default: break; } } label_BFC2104C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2104C: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC21050: A0450000 sb $a1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000307Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[5] & 0xFFu)); PGXP_STORE(0xA0450000u, _pgxa, cpu->gpr[5]); } #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, 0x4u); #endif /* 0xBFC21054: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003080u); #endif /* 0xBFC21058: 8C424C44 lw $v0, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003084u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C44u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2105C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21060: 1440FFDC bne $v0, $zero, 0xBFC20FD4 */ uint32_t psx_brA_BFC21060 = cpu->gpr[2]; uint32_t psx_brB_BFC21060 = cpu->gpr[0]; psx_taken_BFC21060 = (psx_brA_BFC21060 != psx_brB_BFC21060); psx_delay_BFC21060 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21064: 30A50008 andi $a1, $a1, 0x8 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = cpu->gpr[5] & 0x8u; PGXP_ALU(0x30A50008u, cpu->gpr[5], _pgx1, 0x0008u); } #ifdef PSX_COSIM cosim_instr(0x00003090u); #endif if (psx_delay_BFC21060) { psx_delay_BFC21060 = 0; if (psx_taken_BFC21060) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003000u); cpu->pc = 0x00003000u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003094u); } label_BFC21068: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003094u); #endif #ifdef PSX_COSIM cosim_block(0x00003094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21068: 10A0FFDB beq $a1, $zero, 0xBFC20FD8 */ uint32_t psx_brA_BFC21068 = cpu->gpr[5]; uint32_t psx_brB_BFC21068 = cpu->gpr[0]; psx_taken_BFC21068 = (psx_brA_BFC21068 == psx_brB_BFC21068); psx_delay_BFC21068 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2106C: 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(0x00003098u); #endif if (psx_delay_BFC21068) { psx_delay_BFC21068 = 0; if (psx_taken_BFC21068) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000309Cu); } label_BFC21070: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000309Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21070: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000309Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21074: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x000030A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21078: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000030A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2107C: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000030A8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000030A8u); #endif /* 0xBFC21080: 8CE34C58 lw $v1, 19544($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000030ACu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x80u); } PGXP_LOAD(0x8CE34C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000030ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21084: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000030B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21088: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000030B4u); return; } g_debug_last_store_pc = 0x000030B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000030B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC2108C: 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(0x000030B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21090: 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(0x000030BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC21094: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000030C8u; /* jalr link before delay slot */ psx_delay_BFC21094 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21098: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000030C4u); #endif if (psx_delay_BFC21094) { psx_delay_BFC21094 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000030C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC2109C: #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 /* 0xBFC2109C: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000030C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC210A0: 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(0x000030CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC210A4: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000030D8u; /* jal link before delay slot */ psx_delay_BFC210A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC210A8: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x000030D4u); #endif if (psx_delay_BFC210A4) { psx_delay_BFC210A4 = 0; cpu->gpr[31] = 0x000030D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC210AC: #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, 0x4u); #endif /* 0xBFC210AC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000030D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC210B0: 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(0x000030DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC210B4: AC434C50 sw $v1, 19536($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000030E0u); return; } g_debug_last_store_pc = 0x000030E0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C50u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000030E0u); #endif label_BFC210B8: #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, 0x1u); #endif /* 0xBFC210B8: 1000FFC7 beq $zero, $zero, 0xBFC20FD8 */ uint32_t psx_brA_BFC210B8 = cpu->gpr[0]; uint32_t psx_brB_BFC210B8 = cpu->gpr[0]; psx_taken_BFC210B8 = (psx_brA_BFC210B8 == psx_brB_BFC210B8); psx_delay_BFC210B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC210BC: 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(0x000030E8u); #endif if (psx_delay_BFC210B8) { psx_delay_BFC210B8 = 0; if (psx_taken_BFC210B8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000030ECu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000030ECu); cpu->pc = 0x000030ECu; return; /* fallthrough */ } void OpenBIOS_func_000030EC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000030ECu); int psx_delay_BFC210EC = 0; int psx_taken_BFC210EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC210ECu: goto label_BFC210EC; default: break; } } label_BFC210C0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000030ECu); #endif #ifdef PSX_COSIM cosim_block(0x000030ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC210C0: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000030ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000030F0u); #endif /* 0xBFC210C4: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000030F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC210C8: A0801040 sb $zero, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000030F4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000030F4u); #endif /* 0xBFC210CC: 9464104A lhu $a0, 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, 0x000030F8u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000030F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC210D0: 3842005A xori $v0, $v0, 0x5A */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Au; PGXP_ALU(0x3842005Au, cpu->gpr[2], _pgx1, 0x005Au); } #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, 0x10u); #endif /* 0xBFC210D4: 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(0x00003100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC210D8: A464104A sh $a0, 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, 0x00003104u); return; } g_debug_last_store_pc = 0x00003104u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC210DC: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC210E0: 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(0x0000310Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC210E4: AC641070 sw $a0, 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, 0x00003110u); return; } g_debug_last_store_pc = 0x00003110u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC210E8: 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(0x00003114u); #endif label_BFC210EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003118u); #endif #ifdef PSX_COSIM cosim_block(0x00003118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC210EC: 1000FFBA beq $zero, $zero, 0xBFC20FD8 */ uint32_t psx_brA_BFC210EC = cpu->gpr[0]; uint32_t psx_brB_BFC210EC = cpu->gpr[0]; psx_taken_BFC210EC = (psx_brA_BFC210EC == psx_brB_BFC210EC); psx_delay_BFC210EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC210F0: 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(0x0000311Cu); #endif if (psx_delay_BFC210EC) { psx_delay_BFC210EC = 0; if (psx_taken_BFC210EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003120u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003120u); cpu->pc = 0x00003120u; return; /* fallthrough */ } void OpenBIOS_func_00003120(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003120u); label_BFC210F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003120u); #endif #ifdef PSX_COSIM cosim_block(0x00003120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC210F4: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC210F8: 00021203 sra $v0, $v0, 8 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] >> 8u); PGXP_ALU(0x00021203u, cpu->gpr[2], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x00003124u); #endif /* 0xBFC210FC: 90861040 lbu $a2, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 6, 0x10u); PGXP_LOAD(0x90861040u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00003128u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21100: A0821040 sb $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000312Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000312Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003130u); cpu->pc = 0x00003130u; return; /* fallthrough */ } void OpenBIOS_func_00003130(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003130u); int psx_delay_BFC21124 = 0; int psx_taken_BFC21124 = 0; int psx_delay_BFC21134 = 0; int psx_taken_BFC21134 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2112Cu: goto label_BFC2112C; default: break; } } label_BFC21104: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003130u); #endif #ifdef PSX_COSIM cosim_block(0x00003130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003130u); #endif /* 0xBFC21104: 9464104A lhu $a0, 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, 0x00003130u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21108: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003134u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2110C: 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(0x00003138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21110: A464104A sh $a0, 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, 0x0000313Cu); return; } g_debug_last_store_pc = 0x0000313Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #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, 0x8u); #endif /* 0xBFC21114: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21118: 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(0x00003144u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC2111C: AC641070 sw $a0, 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, 0x00003148u); return; } g_debug_last_store_pc = 0x00003148u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21120: 2403005D addiu $v1, $zero, 93 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); PGXP_ALU(0x2403005Du, cpu->gpr[3], _pgx1, 0x0000005Du); } #ifdef PSX_COSIM cosim_instr(0x0000314Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC21124: 14C3FFE4 bne $a2, $v1, 0xBFC210B8 */ uint32_t psx_brA_BFC21124 = cpu->gpr[6]; uint32_t psx_brB_BFC21124 = cpu->gpr[3]; psx_taken_BFC21124 = (psx_brA_BFC21124 != psx_brB_BFC21124); psx_delay_BFC21124 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21128: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003154u); #endif if (psx_delay_BFC21124) { psx_delay_BFC21124 = 0; if (psx_taken_BFC21124) { #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, 0x00003158u); } label_BFC2112C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003158u); #endif #ifdef PSX_COSIM cosim_block(0x00003158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2112C: 24634C20 addiu $v1, $v1, 19488 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19488)); PGXP_ALU(0x24634C20u, cpu->gpr[3], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x00003158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC21130: 00651821 addu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00651821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000315Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21134: 1000FFA7 beq $zero, $zero, 0xBFC20FD4 */ uint32_t psx_brA_BFC21134 = cpu->gpr[0]; uint32_t psx_brB_BFC21134 = cpu->gpr[0]; psx_taken_BFC21134 = (psx_brA_BFC21134 == psx_brB_BFC21134); psx_delay_BFC21134 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21138: 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, 0x00003164u); return; } g_debug_last_store_pc = 0x00003164u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003164u); #endif if (psx_delay_BFC21134) { psx_delay_BFC21134 = 0; if (psx_taken_BFC21134) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003000u); cpu->pc = 0x00003000u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003168u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003168u); cpu->pc = 0x00003168u; return; /* fallthrough */ } void OpenBIOS_func_00003168(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003168u); int psx_delay_BFC21188 = 0; int psx_taken_BFC21188 = 0; label_BFC2113C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003168u); #endif #ifdef PSX_COSIM cosim_block(0x00003168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003168u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2113C: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003168u); #endif /* 0xBFC21140: 90861040 lbu $a2, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 6, 0x10u); PGXP_LOAD(0x90861040u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x0000316Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21144: A0821040 sb $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003170u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003170u); #endif /* 0xBFC21148: 9464104A lhu $a0, 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, 0x00003174u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2114C: 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(0x00003178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21150: 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(0x0000317Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21154: A464104A sh $a0, 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, 0x00003180u); return; } g_debug_last_store_pc = 0x00003180u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21158: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2115C: 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(0x00003188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21160: AC641070 sw $a0, 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, 0x0000318Cu); return; } g_debug_last_store_pc = 0x0000318Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #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, 0x8u); #endif /* 0xBFC21164: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003190u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21168: 24634C20 addiu $v1, $v1, 19488 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19488)); PGXP_ALU(0x24634C20u, cpu->gpr[3], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x00003194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC2116C: 00651821 addu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] + cpu->gpr[5]; PGXP_ALU(0x00651821u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003198u); #endif /* 0xBFC21170: 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, 0x0000319Cu); 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(0x0000319Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21174: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000031A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21178: 00821026 xor $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] ^ cpu->gpr[2]; PGXP_ALU(0x00821026u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000031A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2117C: 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, 0x000031A8u); return; } g_debug_last_store_pc = 0x000031A8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000031A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21180: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC21184: 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(0x000031B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21188: 1000FF92 beq $zero, $zero, 0xBFC20FD4 */ uint32_t psx_brA_BFC21188 = cpu->gpr[0]; uint32_t psx_brB_BFC21188 = cpu->gpr[0]; psx_taken_BFC21188 = (psx_brA_BFC21188 == psx_brB_BFC21188); psx_delay_BFC21188 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2118C: AC434C40 sw $v1, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000031B8u); return; } g_debug_last_store_pc = 0x000031B8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C40u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000031B8u); #endif if (psx_delay_BFC21188) { psx_delay_BFC21188 = 0; if (psx_taken_BFC21188) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003000u); cpu->pc = 0x00003000u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031BCu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031BCu); cpu->pc = 0x000031BCu; return; /* fallthrough */ } void OpenBIOS_func_000031BC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000031BCu); int psx_delay_BFC211B0 = 0; int psx_taken_BFC211B0 = 0; label_BFC21190: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000031BCu); #endif #ifdef PSX_COSIM cosim_block(0x000031BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21190: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000031BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031C0u); #endif /* 0xBFC21194: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000031C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21198: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000031C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2119C: 24424C20 addiu $v0, $v0, 19488 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19488)); PGXP_ALU(0x24424C20u, cpu->gpr[2], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x000031C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC211A0: 00451021 addu $v0, $v0, $a1 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[2] = cpu->gpr[2] + cpu->gpr[5]; PGXP_ALU(0x00451021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000031CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031D0u); #endif /* 0xBFC211A4: 8C420000 lw $v0, 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, 0x000031D0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000031D0u); #endif /* 0xBFC211A8: 90851040 lbu $a1, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[5] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 5, 0x10u); PGXP_LOAD(0x90851040u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000031D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC211AC: A0821040 sb $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000031D8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA0821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000031D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC211B0: 1000FF91 beq $zero, $zero, 0xBFC20FF8 */ uint32_t psx_brA_BFC211B0 = cpu->gpr[0]; uint32_t psx_brB_BFC211B0 = cpu->gpr[0]; psx_taken_BFC211B0 = (psx_brA_BFC211B0 == psx_brB_BFC211B0); psx_delay_BFC211B0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC211B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000031E0u); #endif if (psx_delay_BFC211B0) { psx_delay_BFC211B0 = 0; if (psx_taken_BFC211B0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003024u); cpu->pc = 0x00003024u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031E4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031E4u); cpu->pc = 0x000031E4u; return; /* fallthrough */ } void OpenBIOS_func_000031E4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000031E4u); int psx_delay_BFC211C4 = 0; int psx_taken_BFC211C4 = 0; label_BFC211B8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000031E4u); #endif #ifdef PSX_COSIM cosim_block(0x000031E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC211B8: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000031E4u); #endif /* 0xBFC211BC: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000031E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC211C0: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000031ECu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #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, 0x1u); #endif /* 0xBFC211C4: 1000FF8C beq $zero, $zero, 0xBFC20FF8 */ uint32_t psx_brA_BFC211C4 = cpu->gpr[0]; uint32_t psx_brB_BFC211C4 = cpu->gpr[0]; psx_taken_BFC211C4 = (psx_brA_BFC211C4 == psx_brB_BFC211C4); psx_delay_BFC211C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC211C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000031F4u); #endif if (psx_delay_BFC211C4) { psx_delay_BFC211C4 = 0; if (psx_taken_BFC211C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003024u); cpu->pc = 0x00003024u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031F8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000031F8u); cpu->pc = 0x000031F8u; return; /* fallthrough */ } void OpenBIOS_func_000031F8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000031F8u); int psx_delay_BFC211F4 = 0; int psx_taken_BFC211F4 = 0; label_BFC211CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000031F8u); #endif #ifdef PSX_COSIM cosim_block(0x000031F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000031F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC211CC: 3C041F80 lui $a0, 0x1F80 */ cpu->gpr[4] = 0x1F800000u; PGXP_ALU(0x3C041F80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000031F8u); #endif /* 0xBFC211D0: 90821040 lbu $v0, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[4] + (4160)), 2, 0x10u); PGXP_LOAD(0x90821040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000031FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC211D4: A0801040 sb $zero, 4160($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003200u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[4] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0801040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003200u); #endif /* 0xBFC211D8: 9464104A lhu $a0, 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, 0x00003204u); return; } cpu->gpr[4] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x9464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC211DC: 3842005C xori $v0, $v0, 0x5C */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] ^ 0x5Cu; PGXP_ALU(0x3842005Cu, cpu->gpr[2], _pgx1, 0x005Cu); } #ifdef PSX_COSIM cosim_instr(0x00003208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC211E0: 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(0x0000320Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC211E4: A464104A sh $a0, 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, 0x00003210u); return; } g_debug_last_store_pc = 0x00003210u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA464104Au, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC211E8: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003214u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC211EC: 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(0x00003218u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC211F0: AC641070 sw $a0, 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, 0x0000321Cu); return; } g_debug_last_store_pc = 0x0000321Cu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x0000321Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC211F4: 1000FFBD beq $zero, $zero, 0xBFC210EC */ uint32_t psx_brA_BFC211F4 = cpu->gpr[0]; uint32_t psx_brB_BFC211F4 = cpu->gpr[0]; psx_taken_BFC211F4 = (psx_brA_BFC211F4 == psx_brB_BFC211F4); psx_delay_BFC211F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC211F8: 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(0x00003224u); #endif if (psx_delay_BFC211F4) { psx_delay_BFC211F4 = 0; if (psx_taken_BFC211F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003118u); cpu->pc = 0x00003118u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003228u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003228u); cpu->pc = 0x00003228u; return; /* fallthrough */ } void OpenBIOS_func_00003228(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003228u); int psx_delay_BFC21228 = 0; int psx_taken_BFC21228 = 0; int psx_delay_BFC2123C = 0; int psx_taken_BFC2123C = 0; int psx_delay_BFC2124C = 0; int psx_taken_BFC2124C = 0; int psx_delay_BFC21268 = 0; int psx_taken_BFC21268 = 0; int psx_delay_BFC21298 = 0; int psx_delay_BFC212A8 = 0; int psx_delay_BFC212C8 = 0; int psx_taken_BFC212C8 = 0; int psx_delay_BFC212D0 = 0; int psx_taken_BFC212D0 = 0; int psx_delay_BFC212D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC212D8u: goto label_BFC212D8; case 0xBFC21230u: goto label_BFC21230; case 0xBFC21244u: goto label_BFC21244; case 0xBFC21254u: goto label_BFC21254; case 0xBFC21270u: goto label_BFC21270; case 0xBFC212A0u: goto label_BFC212A0; case 0xBFC212B0u: goto label_BFC212B0; case 0xBFC212BCu: goto label_BFC212BC; case 0xBFC212D0u: goto label_BFC212D0; default: break; } } label_BFC211FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003228u); #endif #ifdef PSX_COSIM cosim_block(0x00003228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC211FC: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003228u); #endif /* 0xBFC21200: 90A61040 lbu $a2, 4160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4160; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (4160)), 6, 0x20u); PGXP_LOAD(0x90A61040u, _pgxa, cpu->gpr[6]); } #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, 0x21u); #endif /* 0xBFC21204: A0A01040 sb $zero, 4160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003230u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0A01040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003230u); #endif /* 0xBFC21208: 9462104A lhu $v0, 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, 0x00003234u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2120C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21210: 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(0x0000323Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21214: A462104A sh $v0, 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, 0x00003240u); return; } g_debug_last_store_pc = 0x00003240u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21218: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2121C: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003248u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21220: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000324Cu); return; } g_debug_last_store_pc = 0x0000324Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000324Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21224: 2402005D addiu $v0, $zero, 93 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (93)); PGXP_ALU(0x2402005Du, cpu->gpr[2], _pgx1, 0x0000005Du); } #ifdef PSX_COSIM cosim_instr(0x00003250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC21228: 14C2FF6B bne $a2, $v0, 0xBFC20FD8 */ uint32_t psx_brA_BFC21228 = cpu->gpr[6]; uint32_t psx_brB_BFC21228 = cpu->gpr[2]; psx_taken_BFC21228 = (psx_brA_BFC21228 != psx_brB_BFC21228); psx_delay_BFC21228 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2122C: 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(0x00003258u); #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, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000325Cu); } label_BFC21230: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000325Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000325Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000325Cu); #endif /* 0xBFC21230: 94A21044 lhu $v0, 4164($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000325Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x94A21044u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC21234: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21238: 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(0x00003264u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2123C: 1040FFFC beq $v0, $zero, 0xBFC21230 */ 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_cyc_step(cpu, 0x4u); #endif /* 0xBFC21240: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000326Cu); #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, 0x0000325Cu); goto label_BFC21230; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003270u); } label_BFC21244: #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 /* 0xBFC21244: 8C424C44 lw $v0, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003270u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C44u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21248: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003274u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2124C: 1440001B bne $v0, $zero, 0xBFC212BC */ uint32_t psx_brA_BFC2124C = cpu->gpr[2]; uint32_t psx_brB_BFC2124C = cpu->gpr[0]; psx_taken_BFC2124C = (psx_brA_BFC2124C != psx_brB_BFC2124C); psx_delay_BFC2124C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21250: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000327Cu); #endif if (psx_delay_BFC2124C) { psx_delay_BFC2124C = 0; if (psx_taken_BFC2124C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000032E8u); goto label_BFC212BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003280u); } label_BFC21254: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003280u); #endif #ifdef PSX_COSIM cosim_block(0x00003280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21254: 2442AE94 addiu $v0, $v0, -20844 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20844)); PGXP_ALU(0x2442AE94u, cpu->gpr[2], _pgx1, 0xFFFFAE94u); } #ifdef PSX_COSIM cosim_instr(0x00003280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21258: 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(0x00003284u); #endif /* 0xBFC2125C: 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(0x00003288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21260: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC21264: 30420004 andi $v0, $v0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] & 0x4u; PGXP_ALU(0x30420004u, cpu->gpr[2], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x00003290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21268: 10400014 beq $v0, $zero, 0xBFC212BC */ uint32_t psx_brA_BFC21268 = cpu->gpr[2]; uint32_t psx_brB_BFC21268 = cpu->gpr[0]; psx_taken_BFC21268 = (psx_brA_BFC21268 == psx_brB_BFC21268); psx_delay_BFC21268 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2126C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003298u); #endif if (psx_delay_BFC21268) { psx_delay_BFC21268 = 0; if (psx_taken_BFC21268) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000032E8u); goto label_BFC212BC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000329Cu); } label_BFC21270: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000329Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000329Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000329Cu); #endif /* 0xBFC21270: 8CE24C58 lw $v0, 19544($a3) */ { uint32_t _pgxa = cpu->gpr[7] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[7] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000329Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x80u); } PGXP_LOAD(0x8CE24C58u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC21274: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000032A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21278: AC624C54 sw $v0, 19540($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000032A4u); return; } g_debug_last_store_pc = 0x000032A4u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624C54u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000032A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2127C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000032A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21280: 24634C4C addiu $v1, $v1, 19532 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19532)); PGXP_ALU(0x24634C4Cu, cpu->gpr[3], _pgx1, 0x00004C4Cu); } #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, 0xCu); #endif /* 0xBFC21284: 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(0x000032B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21288: 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(0x000032B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2128C: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000032B8u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000032B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC21290: 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(0x000032BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000032C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21294: 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(0x000032C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC21298: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000032CCu; /* jalr link before delay slot */ psx_delay_BFC21298 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2129C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000032C8u); #endif if (psx_delay_BFC21298) { psx_delay_BFC21298 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000032CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC212A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000032CCu); #endif #ifdef PSX_COSIM cosim_block(0x000032CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000032CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC212A0: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #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, 0x21u); #endif /* 0xBFC212A4: 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(0x000032D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC212A8: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000032DCu; /* jal link before delay slot */ psx_delay_BFC212A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC212AC: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x000032D8u); #endif if (psx_delay_BFC212A8) { psx_delay_BFC212A8 = 0; cpu->gpr[31] = 0x000032DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC212B0: #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, 0x4u); #endif /* 0xBFC212B0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC212B4: 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(0x000032E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC212B8: AC434C50 sw $v1, 19536($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000032E4u); return; } g_debug_last_store_pc = 0x000032E4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C50u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000032E4u); #endif label_BFC212BC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000032E8u); #endif #ifdef PSX_COSIM cosim_block(0x000032E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000032E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC212BC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000032E8u); #endif /* 0xBFC212C0: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _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, 0x9u); #endif /* 0xBFC212C4: 24030047 addiu $v1, $zero, 71 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (71)); PGXP_ALU(0x24030047u, cpu->gpr[3], _pgx1, 0x00000047u); } #ifdef PSX_COSIM cosim_instr(0x000032F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC212C8: 1483FF7B bne $a0, $v1, 0xBFC210B8 */ uint32_t psx_brA_BFC212C8 = cpu->gpr[4]; uint32_t psx_brB_BFC212C8 = cpu->gpr[3]; psx_taken_BFC212C8 = (psx_brA_BFC212C8 != psx_brB_BFC212C8); psx_delay_BFC212C8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC212CC: 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(0x000032F8u); #endif if (psx_delay_BFC212C8) { psx_delay_BFC212C8 = 0; if (psx_taken_BFC212C8) { #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, 0x000032FCu); } label_BFC212D0: #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, 0x1u); #endif /* 0xBFC212D0: 1000FF41 beq $zero, $zero, 0xBFC20FD8 */ uint32_t psx_brA_BFC212D0 = cpu->gpr[0]; uint32_t psx_brB_BFC212D0 = cpu->gpr[0]; psx_taken_BFC212D0 = (psx_brA_BFC212D0 == psx_brB_BFC212D0); psx_delay_BFC212D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC212D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003300u); #endif if (psx_delay_BFC212D0) { psx_delay_BFC212D0 = 0; if (psx_taken_BFC212D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003004u); cpu->pc = 0x00003004u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003304u); } label_BFC212D8: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC212D8: 03E00008 jr $ra */ psx_delay_BFC212D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC212DC: 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(0x00003308u); #endif if (psx_delay_BFC212D8) { psx_delay_BFC212D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_0000330C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000330Cu); int psx_delay_BFC212F4 = 0; int psx_taken_BFC212F4 = 0; int psx_delay_BFC212FC = 0; int psx_taken_BFC212FC = 0; int psx_delay_BFC21304 = 0; int psx_taken_BFC21304 = 0; int psx_delay_BFC21310 = 0; int psx_taken_BFC21310 = 0; int psx_delay_BFC21318 = 0; int psx_delay_BFC21324 = 0; int psx_taken_BFC21324 = 0; int psx_delay_BFC2133C = 0; int psx_taken_BFC2133C = 0; int psx_delay_BFC2136C = 0; int psx_taken_BFC2136C = 0; int psx_delay_BFC21374 = 0; int psx_delay_BFC213D8 = 0; int psx_delay_BFC2140C = 0; int psx_taken_BFC2140C = 0; int psx_delay_BFC21448 = 0; int psx_taken_BFC21448 = 0; int psx_delay_BFC21454 = 0; int psx_taken_BFC21454 = 0; int psx_delay_BFC21484 = 0; int psx_taken_BFC21484 = 0; int psx_delay_BFC21494 = 0; int psx_delay_BFC214A4 = 0; int psx_delay_BFC214C0 = 0; int psx_delay_BFC214D0 = 0; int psx_delay_BFC214D8 = 0; int psx_taken_BFC214D8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC212FCu: goto label_BFC212FC; case 0xBFC21304u: goto label_BFC21304; case 0xBFC2130Cu: goto label_BFC2130C; case 0xBFC21318u: goto label_BFC21318; case 0xBFC21320u: goto label_BFC21320; case 0xBFC2132Cu: goto label_BFC2132C; case 0xBFC21344u: goto label_BFC21344; case 0xBFC21348u: goto label_BFC21348; case 0xBFC21374u: goto label_BFC21374; case 0xBFC2137Cu: goto label_BFC2137C; case 0xBFC213D8u: goto label_BFC213D8; case 0xBFC213E0u: goto label_BFC213E0; case 0xBFC21414u: goto label_BFC21414; case 0xBFC21450u: goto label_BFC21450; case 0xBFC2145Cu: goto label_BFC2145C; case 0xBFC2148Cu: goto label_BFC2148C; case 0xBFC2149Cu: goto label_BFC2149C; case 0xBFC214A0u: goto label_BFC214A0; case 0xBFC214ACu: goto label_BFC214AC; case 0xBFC214C8u: goto label_BFC214C8; case 0xBFC214D8u: goto label_BFC214D8; default: break; } } label_BFC212E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000330Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC212E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000330Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003310u); #endif /* 0xBFC212E4: 8C424C48 lw $v0, 19528($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19528; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003310u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C48u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC212E8: 3C060000 lui $a2, 0x0 */ cpu->gpr[6] = 0x00000000u; PGXP_ALU(0x3C060000u, cpu->gpr[6], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC212EC: 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(0x00003318u); #endif /* 0xBFC212F0: 8CC34C58 lw $v1, 19544($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000331Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } PGXP_LOAD(0x8CC34C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000331Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC212F4: 10440047 beq $v0, $a0, 0xBFC21414 */ uint32_t psx_brA_BFC212F4 = cpu->gpr[2]; uint32_t psx_brB_BFC212F4 = cpu->gpr[4]; psx_taken_BFC212F4 = (psx_brA_BFC212F4 == psx_brB_BFC212F4); psx_delay_BFC212F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC212F8: 28440004 slti $a0, $v0, 4 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[2] < (4) ? 1 : 0); PGXP_ALU(0x28440004u, cpu->gpr[4], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x00003324u); #endif if (psx_delay_BFC212F4) { psx_delay_BFC212F4 = 0; if (psx_taken_BFC212F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003440u); goto label_BFC21414; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003328u); } label_BFC212FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003328u); #endif #ifdef PSX_COSIM cosim_block(0x00003328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC212FC: 10800008 beq $a0, $zero, 0xBFC21320 */ uint32_t psx_brA_BFC212FC = cpu->gpr[4]; uint32_t psx_brB_BFC212FC = cpu->gpr[0]; psx_taken_BFC212FC = (psx_brA_BFC212FC == psx_brB_BFC212FC); psx_delay_BFC212FC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21300: 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(0x0000332Cu); #endif if (psx_delay_BFC212FC) { psx_delay_BFC212FC = 0; if (psx_taken_BFC212FC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000334Cu); goto label_BFC21320; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003330u); } label_BFC21304: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21304: 1044001D beq $v0, $a0, 0xBFC2137C */ uint32_t psx_brA_BFC21304 = cpu->gpr[2]; uint32_t psx_brB_BFC21304 = cpu->gpr[4]; psx_taken_BFC21304 = (psx_brA_BFC21304 == psx_brB_BFC21304); psx_delay_BFC21304 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21308: 3C050000 lui $a1, 0x0 */ cpu->gpr[5] = 0x00000000u; PGXP_ALU(0x3C050000u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003334u); #endif if (psx_delay_BFC21304) { psx_delay_BFC21304 = 0; if (psx_taken_BFC21304) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000033A8u); goto label_BFC2137C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003338u); } label_BFC2130C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003338u); #endif #ifdef PSX_COSIM cosim_block(0x00003338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2130C: 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(0x00003338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21310: 10430033 beq $v0, $v1, 0xBFC213E0 */ uint32_t psx_brA_BFC21310 = cpu->gpr[2]; uint32_t psx_brB_BFC21310 = cpu->gpr[3]; psx_taken_BFC21310 = (psx_brA_BFC21310 == psx_brB_BFC21310); psx_delay_BFC21310 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21314: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003340u); #endif if (psx_delay_BFC21310) { psx_delay_BFC21310 = 0; if (psx_taken_BFC21310) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000340Cu); goto label_BFC213E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003344u); } label_BFC21318: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003344u); #endif #ifdef PSX_COSIM cosim_block(0x00003344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003344u); #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, 0x5u); #endif /* 0xBFC2131C: 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(0x00003348u); #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 */ } label_BFC21320: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000334Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000334Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000334Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21320: 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(0x0000334Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21324: 1443FFFC bne $v0, $v1, 0xBFC21318 */ uint32_t psx_brA_BFC21324 = cpu->gpr[2]; uint32_t psx_brB_BFC21324 = cpu->gpr[3]; psx_taken_BFC21324 = (psx_brA_BFC21324 != psx_brB_BFC21324); psx_delay_BFC21324 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21328: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003354u); #endif if (psx_delay_BFC21324) { psx_delay_BFC21324 = 0; if (psx_taken_BFC21324) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003344u); goto label_BFC21318; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003358u); } label_BFC2132C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2132C: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003358u); #endif /* 0xBFC21330: 8C634BFC lw $v1, 19452($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19452; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19452)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000335Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C634BFCu, _pgxa, cpu->gpr[3]); } #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, 0x4u); #endif /* 0xBFC21334: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003360u); #endif /* 0xBFC21338: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003364u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2133C: 14600002 bne $v1, $zero, 0xBFC21348 */ uint32_t psx_brA_BFC2133C = cpu->gpr[3]; uint32_t psx_brB_BFC2133C = cpu->gpr[0]; psx_taken_BFC2133C = (psx_brA_BFC2133C != psx_brB_BFC2133C); psx_delay_BFC2133C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21340: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000336Cu); #endif if (psx_delay_BFC2133C) { psx_delay_BFC2133C = 0; if (psx_taken_BFC2133C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003374u); goto label_BFC21348; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003370u); } label_BFC21344: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003370u); #endif #ifdef PSX_COSIM cosim_block(0x00003370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21344: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003370u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003370u); #endif label_BFC21348: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21348: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003374u); #endif /* 0xBFC2134C: 9462104A lhu $v0, 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, 0x00003378u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x9462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21350: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000337Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21354: 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(0x00003380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21358: A462104A sh $v0, 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, 0x00003384u); return; } g_debug_last_store_pc = 0x00003384u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2135C: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003388u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21360: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x0000338Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21364: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003390u); return; } g_debug_last_store_pc = 0x00003390u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21368: 2403005A addiu $v1, $zero, 90 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); PGXP_ALU(0x2403005Au, cpu->gpr[3], _pgx1, 0x0000005Au); } #ifdef PSX_COSIM cosim_instr(0x00003394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC2136C: 1483FFEA bne $a0, $v1, 0xBFC21318 */ uint32_t psx_brA_BFC2136C = cpu->gpr[4]; uint32_t psx_brB_BFC2136C = cpu->gpr[3]; psx_taken_BFC2136C = (psx_brA_BFC2136C != psx_brB_BFC2136C); psx_delay_BFC2136C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21370: 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(0x0000339Cu); #endif if (psx_delay_BFC2136C) { psx_delay_BFC2136C = 0; if (psx_taken_BFC2136C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003344u); goto label_BFC21318; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000033A0u); } label_BFC21374: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000033A0u); #endif #ifdef PSX_COSIM cosim_block(0x000033A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000033A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21374: 03E00008 jr $ra */ psx_delay_BFC21374 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21378: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000033A4u); #endif if (psx_delay_BFC21374) { psx_delay_BFC21374 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC2137C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000033A8u); #endif #ifdef PSX_COSIM cosim_block(0x000033A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000033A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x19u); #endif /* 0xBFC2137C: 0003202B sltu $a0, $zero, $v1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[3]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[3] ? 1 : 0); PGXP_ALU(0x0003202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000033A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21380: 00042340 sll $a0, $a0, 13 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 13u; PGXP_ALU(0x00042340u, cpu->gpr[4], _pgx1, 13u); } #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, 0x30u); #endif /* 0xBFC21384: ACA44C60 sw $a0, 19552($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 19552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (19552)); 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[4]); } PGXP_STORE(0xACA44C60u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000033B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21388: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000033B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2138C: 34841003 ori $a0, $a0, 0x1003 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] | 0x1003u; PGXP_ALU(0x34841003u, cpu->gpr[4], _pgx1, 0x1003u); } #ifdef PSX_COSIM cosim_instr(0x000033B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC21390: A4A4104A sh $a0, 4170($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000033BCu); return; } g_debug_last_store_pc = 0x000033BCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[4] & 0xFFFFu)); } PGXP_STORE(0xA4A4104Au, _pgxa, cpu->gpr[4]); } #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, 0x10u); #endif /* 0xBFC21394: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000033C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21398: 24844C10 addiu $a0, $a0, 19472 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19472)); PGXP_ALU(0x24844C10u, cpu->gpr[4], _pgx1, 0x00004C10u); } #ifdef PSX_COSIM cosim_instr(0x000033C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2139C: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x000033C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC213A0: 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(0x000033CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000033D0u); #endif /* 0xBFC213A4: 8C630000 lw $v1, 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, 0x000033D0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x8u); } PGXP_LOAD(0x8C630000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000033D0u); #endif /* 0xBFC213A8: 90A41040 lbu $a0, 4160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (4160)), 4, 0x20u); PGXP_LOAD(0x90A41040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000033D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213AC: 3063000F andi $v1, $v1, 0xF */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0xFu; PGXP_ALU(0x3063000Fu, cpu->gpr[3], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x000033D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213B0: 2463FF81 addiu $v1, $v1, -127 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-127)); PGXP_ALU(0x2463FF81u, cpu->gpr[3], _pgx1, 0xFFFFFF81u); } #ifdef PSX_COSIM cosim_instr(0x000033DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000033E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC213B4: A0A31040 sb $v1, 4160($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000033E0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[5] + (4160)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0A31040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000033E0u); #endif /* 0xBFC213B8: 94A3104A lhu $v1, 4170($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000033E4u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x94A3104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000033E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC213BC: 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(0x000033E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213C0: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #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, 0x28u); #endif /* 0xBFC213C4: A4A3104A sh $v1, 4170($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000033F0u); return; } g_debug_last_store_pc = 0x000033F0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A3104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000033F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213C8: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000033F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC213CC: AC641070 sw $a0, 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, 0x000033F8u); return; } g_debug_last_store_pc = 0x000033F8u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC641070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000033F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213D0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0xCu); #endif /* 0xBFC213D4: AC624C5C sw $v0, 19548($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003400u); return; } g_debug_last_store_pc = 0x00003400u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624C5Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003400u); #endif label_BFC213D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003404u); #endif #ifdef PSX_COSIM cosim_block(0x00003404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003404u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC213D8: 03E00008 jr $ra */ psx_delay_BFC213D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC213DC: 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(0x00003408u); #endif if (psx_delay_BFC213D8) { psx_delay_BFC213D8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC213E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000340Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000340Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000340Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC213E0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000340Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003410u); #endif /* 0xBFC213E4: 90431040 lbu $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 3, 0x4u); PGXP_LOAD(0x90431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC213E8: 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(0x00003414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC213EC: A0431040 sb $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003418u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003418u); #endif /* 0xBFC213F0: 9443104A lhu $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000341Cu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x9443104Au, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC213F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC213F8: 34630010 ori $v1, $v1, 0x10 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x10u; PGXP_ALU(0x34630010u, cpu->gpr[3], _pgx1, 0x0010u); } #ifdef PSX_COSIM cosim_instr(0x00003424u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC213FC: A443104A sh $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003428u); return; } g_debug_last_store_pc = 0x00003428u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21400: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0x9u); #endif /* 0xBFC21404: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21408: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003434u); return; } g_debug_last_store_pc = 0x00003434u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003434u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2140C: 1000FFF2 beq $zero, $zero, 0xBFC213D8 */ uint32_t psx_brA_BFC2140C = cpu->gpr[0]; uint32_t psx_brB_BFC2140C = cpu->gpr[0]; psx_taken_BFC2140C = (psx_brA_BFC2140C == psx_brB_BFC2140C); psx_delay_BFC2140C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21410: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000343Cu); #endif if (psx_delay_BFC2140C) { psx_delay_BFC2140C = 0; if (psx_taken_BFC2140C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003404u); goto label_BFC213D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003440u); } label_BFC21414: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003440u); #endif #ifdef PSX_COSIM cosim_block(0x00003440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21414: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003440u); #endif /* 0xBFC21418: 90441040 lbu $a0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 4, 0x4u); PGXP_LOAD(0x90441040u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003444u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2141C: A0401040 sb $zero, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003448u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0401040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003448u); #endif /* 0xBFC21420: 9445104A lhu $a1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000344Cu); return; } cpu->gpr[5] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 5, 0x4u); } PGXP_LOAD(0x9445104Au, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000344Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21424: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21428: 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(0x00003454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC2142C: A445104A sh $a1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003458u); return; } g_debug_last_store_pc = 0x00003458u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[5] & 0xFFFFu)); } PGXP_STORE(0xA445104Au, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21430: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0x21u); #endif /* 0xBFC21434: 2405FF7F addiu $a1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2405FF7Fu, cpu->gpr[5], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC21438: AC451070 sw $a1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003464u); return; } g_debug_last_store_pc = 0x00003464u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC451070u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2143C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003468u); #endif /* 0xBFC21440: 8C424C44 lw $v0, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000346Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C44u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC21444: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003470u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21448: 1440FFE3 bne $v0, $zero, 0xBFC213D8 */ uint32_t psx_brA_BFC21448 = cpu->gpr[2]; uint32_t psx_brB_BFC21448 = cpu->gpr[0]; psx_taken_BFC21448 = (psx_brA_BFC21448 != psx_brB_BFC21448); psx_delay_BFC21448 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2144C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003478u); #endif if (psx_delay_BFC21448) { psx_delay_BFC21448 = 0; if (psx_taken_BFC21448) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003404u); goto label_BFC213D8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000347Cu); } label_BFC21450: #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, 0x30u); #endif /* 0xBFC21450: 3085000C andi $a1, $a0, 0xC */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[5] = cpu->gpr[4] & 0xCu; PGXP_ALU(0x3085000Cu, cpu->gpr[5], _pgx1, 0x000Cu); } #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, 0x21u); #endif /* 0xBFC21454: 10A0FFC7 beq $a1, $zero, 0xBFC21374 */ uint32_t psx_brA_BFC21454 = cpu->gpr[5]; uint32_t psx_brB_BFC21454 = cpu->gpr[0]; psx_taken_BFC21454 = (psx_brA_BFC21454 == psx_brB_BFC21454); psx_delay_BFC21454 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21458: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003484u); #endif if (psx_delay_BFC21454) { psx_delay_BFC21454 = 0; if (psx_taken_BFC21454) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000033A0u); goto label_BFC21374; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003488u); } label_BFC2145C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003488u); #endif #ifdef PSX_COSIM cosim_block(0x00003488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2145C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21460: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #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, 0x20000000u); #endif /* 0xBFC21464: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00003490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21468: 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(0x00003494u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2146C: 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(0x00003498u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC21470: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000349Cu); return; } g_debug_last_store_pc = 0x0000349Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0xCu); #endif /* 0xBFC21474: A0620000 sb $v0, 0($v1) */ { uint32_t _pgxa = cpu->gpr[3]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000034A0u; 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(0x000034A0u); #endif /* 0xBFC21478: 8CC34C58 lw $v1, 19544($a2) */ { uint32_t _pgxa = cpu->gpr[6] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[6] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034A4u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40u); } PGXP_LOAD(0x8CC34C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000034A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2147C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000034A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21480: 30840004 andi $a0, $a0, 0x4 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] & 0x4u; PGXP_ALU(0x30840004u, cpu->gpr[4], _pgx1, 0x0004u); } #ifdef PSX_COSIM cosim_instr(0x000034ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21484: 10800010 beq $a0, $zero, 0xBFC214C8 */ uint32_t psx_brA_BFC21484 = cpu->gpr[4]; uint32_t psx_brB_BFC21484 = cpu->gpr[0]; psx_taken_BFC21484 = (psx_brA_BFC21484 == psx_brB_BFC21484); psx_delay_BFC21484 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21488: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034B4u); return; } g_debug_last_store_pc = 0x000034B4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000034B4u); #endif if (psx_delay_BFC21484) { psx_delay_BFC21484 = 0; if (psx_taken_BFC21484) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000034F4u); goto label_BFC214C8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000034B8u); } label_BFC2148C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000034B8u); #endif #ifdef PSX_COSIM cosim_block(0x000034B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC2148C: 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(0x000034B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21490: 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(0x000034BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC21494: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000034C8u; /* jalr link before delay slot */ psx_delay_BFC21494 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21498: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000034C4u); #endif if (psx_delay_BFC21494) { psx_delay_BFC21494 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000034C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC2149C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000034C8u); #endif #ifdef PSX_COSIM cosim_block(0x000034C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC2149C: 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(0x000034C8u); #endif label_BFC214A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000034CCu); #endif #ifdef PSX_COSIM cosim_block(0x000034CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC214A0: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000034CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC214A4: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x000034D8u; /* jal link before delay slot */ psx_delay_BFC214A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC214A8: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x000034D4u); #endif if (psx_delay_BFC214A4) { psx_delay_BFC214A4 = 0; cpu->gpr[31] = 0x000034D8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC214AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000034D8u); #endif #ifdef PSX_COSIM cosim_block(0x000034D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034D8u); #endif /* 0xBFC214AC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034D8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000034D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC214B0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000034DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC214B4: 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(0x000034E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC214B8: AC434C50 sw $v1, 19536($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000034E4u); return; } g_debug_last_store_pc = 0x000034E4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C50u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000034E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC214BC: 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(0x000034E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC214C0: 03E00008 jr $ra */ psx_delay_BFC214C0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000034F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC214C4: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000034F0u); #endif if (psx_delay_BFC214C0) { psx_delay_BFC214C0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC214C8: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC214C8: 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(0x000034F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC214CC: 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(0x000034F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC214D0: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00003504u; /* jalr link before delay slot */ psx_delay_BFC214D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003500u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC214D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003500u); #endif if (psx_delay_BFC214D0) { psx_delay_BFC214D0 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00003504u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC214D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003504u); #endif #ifdef PSX_COSIM cosim_block(0x00003504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003504u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC214D8: 1000FFF1 beq $zero, $zero, 0xBFC214A0 */ uint32_t psx_brA_BFC214D8 = cpu->gpr[0]; uint32_t psx_brB_BFC214D8 = cpu->gpr[0]; psx_taken_BFC214D8 = (psx_brA_BFC214D8 == psx_brB_BFC214D8); psx_delay_BFC214D8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC214DC: 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(0x00003508u); #endif if (psx_delay_BFC214D8) { psx_delay_BFC214D8 = 0; if (psx_taken_BFC214D8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000034CCu); goto label_BFC214A0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000350Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000350Cu); cpu->pc = 0x0000350Cu; return; /* fallthrough */ } void OpenBIOS_func_0000350C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000350Cu); int psx_delay_BFC214F0 = 0; label_BFC214E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000350Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000350Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000350Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC214E0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000350Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC214E4: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x00003510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC214E8: 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(0x00003514u); #endif /* 0xBFC214EC: 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(0x00003518u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC214F0: 03E00008 jr $ra */ psx_delay_BFC214F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC214F4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003520u); #endif if (psx_delay_BFC214F0) { psx_delay_BFC214F0 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00003524(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003524u); int psx_delay_BFC21510 = 0; int psx_taken_BFC21510 = 0; int psx_delay_BFC21518 = 0; int psx_delay_BFC21520 = 0; int psx_taken_BFC21520 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21504u: goto label_BFC21504; case 0xBFC21518u: goto label_BFC21518; case 0xBFC21520u: goto label_BFC21520; default: break; } } label_BFC214F8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003524u); #endif #ifdef PSX_COSIM cosim_block(0x00003524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC214F8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003524u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC214FC: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x00003528u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21500: 00442021 addu $a0, $v0, $a0 */ { uint32_t _pgx1 = cpu->gpr[2]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[2] + cpu->gpr[4]; PGXP_ALU(0x00442021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000352Cu); #endif label_BFC21504: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003530u); #endif #ifdef PSX_COSIM cosim_block(0x00003530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003530u); #endif /* 0xBFC21504: 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(0x00003530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21508: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003534u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2150C: 30430001 andi $v1, $v0, 0x1 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] & 0x1u; PGXP_ALU(0x30430001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x00003538u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21510: 10600003 beq $v1, $zero, 0xBFC21520 */ uint32_t psx_brA_BFC21510 = cpu->gpr[3]; uint32_t psx_brB_BFC21510 = cpu->gpr[0]; psx_taken_BFC21510 = (psx_brA_BFC21510 == psx_brB_BFC21510); psx_delay_BFC21510 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21514: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003540u); #endif if (psx_delay_BFC21510) { psx_delay_BFC21510 = 0; if (psx_taken_BFC21510) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000354Cu); goto label_BFC21520; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003544u); } label_BFC21518: #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, 0x80000001u); #endif /* 0xBFC21518: 03E00008 jr $ra */ psx_delay_BFC21518 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2151C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003548u); #endif if (psx_delay_BFC21518) { psx_delay_BFC21518 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC21520: #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, 0x1u); #endif /* 0xBFC21520: 1000FFF8 beq $zero, $zero, 0xBFC21504 */ uint32_t psx_brA_BFC21520 = cpu->gpr[0]; uint32_t psx_brB_BFC21520 = cpu->gpr[0]; psx_taken_BFC21520 = (psx_brA_BFC21520 == psx_brB_BFC21520); psx_delay_BFC21520 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21524: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003550u); #endif if (psx_delay_BFC21520) { psx_delay_BFC21520 = 0; if (psx_taken_BFC21520) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003530u); goto label_BFC21504; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003554u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003554u); cpu->pc = 0x00003554u; return; /* fallthrough */ } void OpenBIOS_func_00003554(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003554u); int psx_delay_BFC21534 = 0; int psx_taken_BFC21534 = 0; int psx_delay_BFC21548 = 0; int psx_taken_BFC21548 = 0; int psx_delay_BFC2155C = 0; int psx_taken_BFC2155C = 0; int psx_delay_BFC21578 = 0; int psx_taken_BFC21578 = 0; int psx_delay_BFC21580 = 0; int psx_taken_BFC21580 = 0; int psx_delay_BFC215EC = 0; int psx_taken_BFC215EC = 0; int psx_delay_BFC215F4 = 0; int psx_taken_BFC215F4 = 0; int psx_delay_BFC21660 = 0; int psx_taken_BFC21660 = 0; int psx_delay_BFC21668 = 0; int psx_taken_BFC21668 = 0; int psx_delay_BFC21670 = 0; int psx_delay_BFC216A4 = 0; int psx_delay_BFC216A8 = 0; uint32_t psx_ldd_BFC21588 = 0; /* load-delay temp */ uint32_t psx_ldd_BFC21600 = 0; /* load-delay temp */ if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2153Cu: goto label_BFC2153C; case 0xBFC21550u: goto label_BFC21550; case 0xBFC21554u: goto label_BFC21554; case 0xBFC21558u: goto label_BFC21558; case 0xBFC2155Cu: goto label_BFC2155C; case 0xBFC21564u: goto label_BFC21564; case 0xBFC21580u: goto label_BFC21580; case 0xBFC21588u: goto label_BFC21588; case 0xBFC215F4u: goto label_BFC215F4; case 0xBFC215FCu: goto label_BFC215FC; case 0xBFC21668u: goto label_BFC21668; case 0xBFC21670u: goto label_BFC21670; case 0xBFC21678u: goto label_BFC21678; default: break; } } label_BFC21528: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003554u); #endif #ifdef PSX_COSIM cosim_block(0x00003554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003554u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21528: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003554u); #endif /* 0xBFC2152C: 8C424C40 lw $v0, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003558u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C40u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003558u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21530: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000355Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21534: 1040004E beq $v0, $zero, 0xBFC21670 */ uint32_t psx_brA_BFC21534 = cpu->gpr[2]; uint32_t psx_brB_BFC21534 = cpu->gpr[0]; psx_taken_BFC21534 = (psx_brA_BFC21534 == psx_brB_BFC21534); psx_delay_BFC21534 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21538: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003564u); #endif if (psx_delay_BFC21534) { psx_delay_BFC21534 = 0; if (psx_taken_BFC21534) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000369Cu); goto label_BFC21670; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003568u); } label_BFC2153C: #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 /* 0xBFC2153C: 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, 0x00003568u); 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(0x00003568u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21540: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000356Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21544: 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(0x00003570u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21548: 10400049 beq $v0, $zero, 0xBFC21670 */ uint32_t psx_brA_BFC21548 = cpu->gpr[2]; uint32_t psx_brB_BFC21548 = cpu->gpr[0]; psx_taken_BFC21548 = (psx_brA_BFC21548 == psx_brB_BFC21548); psx_delay_BFC21548 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2154C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003578u); #endif if (psx_delay_BFC21548) { psx_delay_BFC21548 = 0; if (psx_taken_BFC21548) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000369Cu); goto label_BFC21670; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000357Cu); } label_BFC21550: /* 0xBFC21550: kernel patch-range hook (RAM [0x0000357C,0x0000358C), * 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(0x0000357Cu) != 0x8C621074u || cpu->read_word(0x00003580u) != 0x00000000u || cpu->read_word(0x00003584u) != 0x30420080u || cpu->read_word(0x00003588u) != 0x10400044u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000357Cu); cpu->pc = 0x0000357Cu; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000357Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000357Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000357Cu); #endif /* 0xBFC21550: 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, 0x0000357Cu); 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(0x0000357Cu); #endif label_BFC21554: /* 0xBFC21554: kernel patch-range hook (RAM [0x0000357C,0x0000358C), * 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(0x0000357Cu) != 0x8C621074u || cpu->read_word(0x00003580u) != 0x00000000u || cpu->read_word(0x00003584u) != 0x30420080u || cpu->read_word(0x00003588u) != 0x10400044u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003580u); cpu->pc = 0x00003580u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003580u); #endif #ifdef PSX_COSIM cosim_block(0x00003580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21554: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003580u); #endif label_BFC21558: /* 0xBFC21558: kernel patch-range hook (RAM [0x0000357C,0x0000358C), * 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(0x0000357Cu) != 0x8C621074u || cpu->read_word(0x00003580u) != 0x00000000u || cpu->read_word(0x00003584u) != 0x30420080u || cpu->read_word(0x00003588u) != 0x10400044u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003584u); cpu->pc = 0x00003584u; return; } #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003584u); #endif #ifdef PSX_COSIM cosim_block(0x00003584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003584u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21558: 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(0x00003584u); #endif label_BFC2155C: /* 0xBFC2155C: kernel patch-range hook (RAM [0x0000357C,0x0000358C), * 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(0x0000357Cu) != 0x8C621074u || cpu->read_word(0x00003580u) != 0x00000000u || cpu->read_word(0x00003584u) != 0x30420080u || cpu->read_word(0x00003588u) != 0x10400044u) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003588u); cpu->pc = 0x00003588u; return; } #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2155C: 10400044 beq $v0, $zero, 0xBFC21670 */ uint32_t psx_brA_BFC2155C = cpu->gpr[2]; uint32_t psx_brB_BFC2155C = cpu->gpr[0]; psx_taken_BFC2155C = (psx_brA_BFC2155C == psx_brB_BFC2155C); psx_delay_BFC2155C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21560: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000358Cu); #endif if (psx_delay_BFC2155C) { psx_delay_BFC2155C = 0; if (psx_taken_BFC2155C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000369Cu); goto label_BFC21670; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003590u); } label_BFC21564: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003590u); #endif #ifdef PSX_COSIM cosim_block(0x00003590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21564: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003590u); #endif /* 0xBFC21568: 8C424C3C lw $v0, 19516($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19516; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003594u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C3Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003594u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC2156C: 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(0x00003598u); #endif /* 0xBFC21570: 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(0x0000359Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC21574: 3C1A0000 lui $k0, 0x0 */ cpu->gpr[26] = 0x00000000u; PGXP_ALU(0x3C1A0000u, cpu->gpr[26], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000035A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6u); #endif /* 0xBFC21578: 10410020 beq $v0, $at, 0xBFC215FC */ uint32_t psx_brA_BFC21578 = cpu->gpr[2]; uint32_t psx_brB_BFC21578 = cpu->gpr[1]; psx_taken_BFC21578 = (psx_brA_BFC21578 == psx_brB_BFC21578); psx_delay_BFC21578 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC2157C: 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(0x000035A8u); #endif if (psx_delay_BFC21578) { psx_delay_BFC21578 = 0; if (psx_taken_BFC21578) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003628u); goto label_BFC215FC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000035ACu); } label_BFC21580: #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, 0x6u); #endif /* 0xBFC21580: 1441003D bne $v0, $at, 0xBFC21678 */ uint32_t psx_brA_BFC21580 = cpu->gpr[2]; uint32_t psx_brB_BFC21580 = cpu->gpr[1]; psx_taken_BFC21580 = (psx_brA_BFC21580 != psx_brB_BFC21580); psx_delay_BFC21580 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21584: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000035B0u); #endif if (psx_delay_BFC21580) { psx_delay_BFC21580 = 0; if (psx_taken_BFC21580) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036A4u); goto label_BFC21678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000035B4u); } label_BFC21588: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000035B4u); #endif #ifdef PSX_COSIM cosim_block(0x000035B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035B4u); #endif /* 0xBFC21588: 8F5A4C38 lw $k0, 19512($k0) */ /* load-delay pair: gpr[26] writeback deferred past 0xBFC2158C */ { uint32_t _pgxa = cpu->gpr[26] + 19512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (19512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035B4u); return; } psx_ldd_BFC21588 = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } PGXP_LOAD(0x8F5A4C38u, _pgxa, psx_ldd_BFC21588); } #ifdef PSX_COSIM cosim_instr(0x000035B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000003u); #endif /* 0xBFC2158C: 03400825 or $at, $k0, $zero */ { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[26] | cpu->gpr[0]; PGXP_ALU(0x03400825u, cpu->gpr[1], _pgx1, _pgx2); } cpu->gpr[26] = psx_ldd_BFC21588; /* load-delay writeback */ #ifdef PSX_COSIM cosim_instr(0x000035B8u); #endif /* 0xBFC21590: 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(0x000035BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC21594: 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(0x000035C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000002u); #endif /* 0xBFC21598: AC3A4C38 sw $k0, 19512($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035C4u); return; } g_debug_last_store_pc = 0x000035C4u; cpu->write_word(psx_addr, cpu->gpr[26]); } PGXP_STORE(0xAC3A4C38u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x000035C4u); #endif /* 0xBFC2159C: 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(0x000035C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC215A0: A0621040 sb $v0, 4160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x000035CCu; 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(0x000035CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035D0u); #endif /* 0xBFC215A4: 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, 0x000035D0u); 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(0x000035D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC215A8: 3C010000 lui $at, 0x0 */ cpu->gpr[1] = 0x00000000u; PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000035D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC215AC: 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(0x000035D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000008u); #endif /* 0xBFC215B0: 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, 0x000035DCu); return; } g_debug_last_store_pc = 0x000035DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } PGXP_STORE(0xA47A104Au, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x000035DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000035E0u); #endif /* 0xBFC215B4: 8C3A4C34 lw $k0, 19508($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19508; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19508)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035E0u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x2u); } PGXP_LOAD(0x8C3A4C34u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x000035E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC215B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000035E4u); #endif /* 0xBFC215BC: 8F410000 lw $at, 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, 0x000035E8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000000u); } PGXP_LOAD(0x8F410000u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x000035E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC215C0: 00000000 nop */ /* nop */ #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, 0x6u); #endif /* 0xBFC215C4: 00220826 xor $at, $at, $v0 */ { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2]; PGXP_ALU(0x00220826u, cpu->gpr[1], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000035F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000002u); #endif /* 0xBFC215C8: AF410000 sw $at, 0($k0) */ { uint32_t _pgxa = cpu->gpr[26]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000035F4u); return; } g_debug_last_store_pc = 0x000035F4u; cpu->write_word(psx_addr, cpu->gpr[1]); } PGXP_STORE(0xAF410000u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x000035F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC215CC: 2401FF7F addiu $at, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2401FF7Fu, cpu->gpr[1], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x000035F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xAu); #endif /* 0xBFC215D0: AC611070 sw $at, 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, 0x000035FCu); return; } g_debug_last_store_pc = 0x000035FCu; cpu->write_word(psx_addr, cpu->gpr[1]); } PGXP_STORE(0xAC611070u, _pgxa, cpu->gpr[1]); } #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, 0x2u); #endif /* 0xBFC215D4: 3C010000 lui $at, 0x0 */ cpu->gpr[1] = 0x00000000u; PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003600u); #endif /* 0xBFC215D8: 8C224C30 lw $v0, 19504($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19504; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003604u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x2u); } PGXP_LOAD(0x8C224C30u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003604u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC215DC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003608u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC215E0: 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(0x0000360Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6u); #endif /* 0xBFC215E4: AC224C30 sw $v0, 19504($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19504; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003610u); return; } g_debug_last_store_pc = 0x00003610u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC224C30u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003610u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC215E8: 2C420080 sltiu $v0, $v0, 128 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000080u ? 1 : 0); PGXP_ALU(0x2C420080u, cpu->gpr[2], _pgx1, 0x0080u); } #ifdef PSX_COSIM cosim_instr(0x00003614u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC215EC: 14400022 bne $v0, $zero, 0xBFC21678 */ uint32_t psx_brA_BFC215EC = cpu->gpr[2]; uint32_t psx_brB_BFC215EC = cpu->gpr[0]; psx_taken_BFC215EC = (psx_brA_BFC215EC != psx_brB_BFC215EC); psx_delay_BFC215EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC215F0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000361Cu); #endif if (psx_delay_BFC215EC) { psx_delay_BFC215EC = 0; if (psx_taken_BFC215EC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036A4u); goto label_BFC21678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003620u); } label_BFC215F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003620u); #endif #ifdef PSX_COSIM cosim_block(0x00003620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003620u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC215F4: 10000020 beq $zero, $zero, 0xBFC21678 */ uint32_t psx_brA_BFC215F4 = cpu->gpr[0]; uint32_t psx_brB_BFC215F4 = cpu->gpr[0]; psx_taken_BFC215F4 = (psx_brA_BFC215F4 == psx_brB_BFC215F4); psx_delay_BFC215F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC215F8: AC404C40 sw $zero, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003624u); return; } g_debug_last_store_pc = 0x00003624u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C40u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003624u); #endif if (psx_delay_BFC215F4) { psx_delay_BFC215F4 = 0; if (psx_taken_BFC215F4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036A4u); goto label_BFC21678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003628u); } label_BFC215FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003628u); #endif #ifdef PSX_COSIM cosim_block(0x00003628u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003628u); #endif /* 0xBFC215FC: 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(0x00003628u); #endif /* 0xBFC21600: 8F5A4C38 lw $k0, 19512($k0) */ /* load-delay pair: gpr[26] writeback deferred past 0xBFC21604 */ { uint32_t _pgxa = cpu->gpr[26] + 19512; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (19512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000362Cu); return; } psx_ldd_BFC21600 = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } PGXP_LOAD(0x8F5A4C38u, _pgxa, psx_ldd_BFC21600); } #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, 0x4000003u); #endif /* 0xBFC21604: 03400825 or $at, $k0, $zero */ { uint32_t _pgx1 = cpu->gpr[26]; uint32_t _pgx2 = cpu->gpr[0]; cpu->gpr[1] = cpu->gpr[26] | cpu->gpr[0]; PGXP_ALU(0x03400825u, cpu->gpr[1], _pgx1, _pgx2); } cpu->gpr[26] = psx_ldd_BFC21600; /* load-delay writeback */ #ifdef PSX_COSIM cosim_instr(0x00003630u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000004u); #endif /* 0xBFC21608: A3420000 sb $v0, 0($k0) */ { uint32_t _pgxa = cpu->gpr[26]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003634u; 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(0x00003634u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC2160C: 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(0x00003638u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000002u); #endif /* 0xBFC21610: AC3A4C38 sw $k0, 19512($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000363Cu); return; } g_debug_last_store_pc = 0x0000363Cu; cpu->write_word(psx_addr, cpu->gpr[26]); } PGXP_STORE(0xAC3A4C38u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x0000363Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003640u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21614: A0601040 sb $zero, 4160($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003640u; 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(0x00003640u); #endif /* 0xBFC21618: 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, 0x00003644u); 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(0x00003644u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC2161C: 3C010000 lui $at, 0x0 */ cpu->gpr[1] = 0x00000000u; PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003648u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000000u); #endif /* 0xBFC21620: 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(0x0000364Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003650u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000008u); #endif /* 0xBFC21624: 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, 0x00003650u); return; } g_debug_last_store_pc = 0x00003650u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[26] & 0xFFFFu)); } PGXP_STORE(0xA47A104Au, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x00003650u); #endif /* 0xBFC21628: 8C3A4C34 lw $k0, 19508($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19508; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19508)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003654u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x2u); } PGXP_LOAD(0x8C3A4C34u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x00003654u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2162C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003658u); #endif /* 0xBFC21630: 8F410000 lw $at, 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, 0x0000365Cu); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000000u); } PGXP_LOAD(0x8F410000u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x0000365Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21634: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003660u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6u); #endif /* 0xBFC21638: 00220826 xor $at, $at, $v0 */ { uint32_t _pgx1 = cpu->gpr[1]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[1] = cpu->gpr[1] ^ cpu->gpr[2]; PGXP_ALU(0x00220826u, cpu->gpr[1], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003664u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000002u); #endif /* 0xBFC2163C: AF410000 sw $at, 0($k0) */ { uint32_t _pgxa = cpu->gpr[26]; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (0)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003668u); return; } g_debug_last_store_pc = 0x00003668u; cpu->write_word(psx_addr, cpu->gpr[1]); } PGXP_STORE(0xAF410000u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x00003668u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x3u); #endif /* 0xBFC21640: 2401FF7F addiu $at, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[1] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2401FF7Fu, cpu->gpr[1], _pgx1, 0xFFFFFF7Fu); } #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, 0xAu); #endif /* 0xBFC21644: AC611070 sw $at, 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, 0x00003670u); return; } g_debug_last_store_pc = 0x00003670u; cpu->write_word(psx_addr, cpu->gpr[1]); } PGXP_STORE(0xAC611070u, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x00003670u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x2u); #endif /* 0xBFC21648: 3C010000 lui $at, 0x0 */ cpu->gpr[1] = 0x00000000u; PGXP_ALU(0x3C010000u, cpu->gpr[1], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003674u); #endif /* 0xBFC2164C: 8C224C30 lw $v0, 19504($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19504; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003678u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x2u); } PGXP_LOAD(0x8C224C30u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003678u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21650: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC21654: 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(0x00003680u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x6u); #endif /* 0xBFC21658: AC224C30 sw $v0, 19504($at) */ { uint32_t _pgxa = cpu->gpr[1] + 19504; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[1] + (19504)); 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[2]); } PGXP_STORE(0xAC224C30u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003684u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2165C: 2C42007F sltiu $v0, $v0, 127 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x0000007Fu ? 1 : 0); PGXP_ALU(0x2C42007Fu, cpu->gpr[2], _pgx1, 0x007Fu); } #ifdef PSX_COSIM cosim_instr(0x00003688u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21660: 14400005 bne $v0, $zero, 0xBFC21678 */ uint32_t psx_brA_BFC21660 = cpu->gpr[2]; uint32_t psx_brB_BFC21660 = cpu->gpr[0]; psx_taken_BFC21660 = (psx_brA_BFC21660 != psx_brB_BFC21660); psx_delay_BFC21660 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003690u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21664: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003690u); #endif if (psx_delay_BFC21660) { psx_delay_BFC21660 = 0; if (psx_taken_BFC21660) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036A4u); goto label_BFC21678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003694u); } label_BFC21668: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003694u); #endif #ifdef PSX_COSIM cosim_block(0x00003694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003694u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21668: 10000003 beq $zero, $zero, 0xBFC21678 */ uint32_t psx_brA_BFC21668 = cpu->gpr[0]; uint32_t psx_brB_BFC21668 = cpu->gpr[0]; psx_taken_BFC21668 = (psx_brA_BFC21668 == psx_brB_BFC21668); psx_delay_BFC21668 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2166C: AC404C40 sw $zero, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); 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[0]); } PGXP_STORE(0xAC404C40u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003698u); #endif if (psx_delay_BFC21668) { psx_delay_BFC21668 = 0; if (psx_taken_BFC21668) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036A4u); goto label_BFC21678; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000369Cu); } label_BFC21670: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000369Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000369Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000369Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21670: 03E00008 jr $ra */ psx_delay_BFC21670 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21674: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036A0u); #endif if (psx_delay_BFC21670) { psx_delay_BFC21670 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC21678: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4000001u); #endif /* 0xBFC21678: 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(0x000036A4u); #endif /* 0xBFC2167C: 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, 0x000036A8u); 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(0x000036A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21680: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036B0u); #endif /* 0xBFC21684: 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, 0x000036B0u); 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(0x000036B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21688: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036B4u); #endif /* 0xBFC2168C: 8F41000C lw $at, 12($k0) */ { uint32_t _pgxa = cpu->gpr[26] + 12; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (12)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036B8u); return; } cpu->gpr[1] = psx_cyc_load_word(cpu, psx_addr, 1, 0x4000000u); } PGXP_LOAD(0x8F41000Cu, _pgxa, cpu->gpr[1]); } #ifdef PSX_COSIM cosim_instr(0x000036B8u); #endif /* 0xBFC21690: 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, 0x000036BCu); 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(0x000036BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036C0u); #endif /* 0xBFC21694: 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, 0x000036C0u); 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(0x000036C0u); #endif /* 0xBFC21698: 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, 0x000036C4u); 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(0x000036C4u); #endif /* 0xBFC2169C: 8F5A0088 lw $k0, 136($k0) */ { uint32_t _pgxa = cpu->gpr[26] + 136; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[26] + (136)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000036C8u); return; } cpu->gpr[26] = psx_cyc_load_word(cpu, psx_addr, 26, 0x4000000u); } PGXP_LOAD(0x8F5A0088u, _pgxa, cpu->gpr[26]); } #ifdef PSX_COSIM cosim_instr(0x000036C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216A0: 00000000 nop */ /* nop */ #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, 0x4000001u); #endif /* 0xBFC216A4: 03400008 jr $k0 */ psx_delay_BFC216A4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC216A8: 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 OpenBIOS_func_000036D8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000036D8u); int psx_delay_BFC216BC = 0; int psx_taken_BFC216BC = 0; int psx_delay_BFC216D0 = 0; int psx_taken_BFC216D0 = 0; int psx_delay_BFC216E8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC216C4u: goto label_BFC216C4; case 0xBFC216D8u: goto label_BFC216D8; case 0xBFC216E8u: goto label_BFC216E8; default: break; } } label_BFC216AC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000036D8u); #endif #ifdef PSX_COSIM cosim_block(0x000036D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC216AC: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000036D8u); #endif /* 0xBFC216B0: 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, 0x000036DCu); 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(0x000036DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216B4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC216B8: 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(0x000036E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC216BC: 1040000A beq $v0, $zero, 0xBFC216E8 */ uint32_t psx_brA_BFC216BC = cpu->gpr[2]; uint32_t psx_brB_BFC216BC = cpu->gpr[0]; psx_taken_BFC216BC = (psx_brA_BFC216BC == psx_brB_BFC216BC); psx_delay_BFC216BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036ECu); #endif if (psx_delay_BFC216BC) { psx_delay_BFC216BC = 0; if (psx_taken_BFC216BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003714u); goto label_BFC216E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000036F0u); } label_BFC216C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000036F0u); #endif #ifdef PSX_COSIM cosim_block(0x000036F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000036F0u); #endif /* 0xBFC216C4: 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, 0x000036F0u); 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(0x000036F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000036F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC216CC: 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(0x000036F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC216D0: 10400005 beq $v0, $zero, 0xBFC216E8 */ uint32_t psx_brA_BFC216D0 = cpu->gpr[2]; uint32_t psx_brB_BFC216D0 = cpu->gpr[0]; psx_taken_BFC216D0 = (psx_brA_BFC216D0 == psx_brB_BFC216D0); psx_delay_BFC216D0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003700u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216D4: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003700u); #endif if (psx_delay_BFC216D0) { psx_delay_BFC216D0 = 0; if (psx_taken_BFC216D0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003714u); goto label_BFC216E8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003704u); } label_BFC216D8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003704u); #endif #ifdef PSX_COSIM cosim_block(0x00003704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003704u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC216D8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003704u); #endif /* 0xBFC216DC: 8C424C40 lw $v0, 19520($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19520; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003708u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C40u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003708u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216E0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000370Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003710u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC216E4: 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(0x00003710u); #endif label_BFC216E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003714u); #endif #ifdef PSX_COSIM cosim_block(0x00003714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003714u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC216E8: 03E00008 jr $ra */ psx_delay_BFC216E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216EC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003718u); #endif if (psx_delay_BFC216E8) { psx_delay_BFC216E8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_0000371C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000371Cu); int psx_delay_BFC21700 = 0; int psx_taken_BFC21700 = 0; int psx_delay_BFC21714 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21708u: goto label_BFC21708; case 0xBFC21714u: goto label_BFC21714; default: break; } } label_BFC216F0: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC216F0: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000371Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003720u); #endif /* 0xBFC216F4: 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, 0x00003720u); 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(0x00003720u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC216F8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003724u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC216FC: 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(0x00003728u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21700: 10400004 beq $v0, $zero, 0xBFC21714 */ uint32_t psx_brA_BFC21700 = cpu->gpr[2]; uint32_t psx_brB_BFC21700 = cpu->gpr[0]; psx_taken_BFC21700 = (psx_brA_BFC21700 == psx_brB_BFC21700); psx_delay_BFC21700 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003730u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21704: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003730u); #endif if (psx_delay_BFC21700) { psx_delay_BFC21700 = 0; if (psx_taken_BFC21700) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003740u); goto label_BFC21714; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003734u); } label_BFC21708: #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 /* 0xBFC21708: 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, 0x00003734u); 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(0x00003734u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2170C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003738u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21710: 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(0x0000373Cu); #endif label_BFC21714: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003740u); #endif #ifdef PSX_COSIM cosim_block(0x00003740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003740u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21714: 03E00008 jr $ra */ psx_delay_BFC21714 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21718: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003744u); #endif if (psx_delay_BFC21714) { psx_delay_BFC21714 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00003748(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003748u); int psx_delay_BFC21744 = 0; int psx_taken_BFC21744 = 0; int psx_delay_BFC21750 = 0; int psx_taken_BFC21750 = 0; int psx_delay_BFC21764 = 0; int psx_delay_BFC2177C = 0; int psx_delay_BFC2178C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2174Cu: goto label_BFC2174C; case 0xBFC21758u: goto label_BFC21758; case 0xBFC2175Cu: goto label_BFC2175C; case 0xBFC2176Cu: goto label_BFC2176C; case 0xBFC21784u: goto label_BFC21784; default: break; } } label_BFC2171C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003748u); #endif #ifdef PSX_COSIM cosim_block(0x00003748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2171C: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003748u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21720: 2463AEDC addiu $v1, $v1, -20772 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (-20772)); PGXP_ALU(0x2463AEDCu, cpu->gpr[3], _pgx1, 0xFFFFAEDCu); } #ifdef PSX_COSIM cosim_instr(0x0000374Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21724: 00041080 sll $v0, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = cpu->gpr[4] << 2u; PGXP_ALU(0x00041080u, cpu->gpr[2], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00003750u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21728: 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(0x00003754u); #endif /* 0xBFC2172C: 8C420000 lw $v0, 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, 0x00003758u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003758u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21730: 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(0x0000375Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21734: A0430000 sb $v1, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003760u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0430000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003760u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21738: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003764u); #endif /* 0xBFC2173C: 8C42AEF0 lw $v0, -20752($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20752; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20752)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003768u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AEF0u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003768u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21740: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000376Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003770u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21744: 1040000F beq $v0, $zero, 0xBFC21784 */ uint32_t psx_brA_BFC21744 = cpu->gpr[2]; uint32_t psx_brB_BFC21744 = cpu->gpr[0]; psx_taken_BFC21744 = (psx_brA_BFC21744 == psx_brB_BFC21744); psx_delay_BFC21744 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21748: 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(0x00003774u); #endif if (psx_delay_BFC21744) { psx_delay_BFC21744 = 0; if (psx_taken_BFC21744) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000037B0u); goto label_BFC21784; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003778u); } label_BFC2174C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003778u); #endif #ifdef PSX_COSIM cosim_block(0x00003778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC2174C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00003778u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21750: 10800002 beq $a0, $zero, 0xBFC2175C */ uint32_t psx_brA_BFC21750 = cpu->gpr[4]; uint32_t psx_brB_BFC21750 = cpu->gpr[0]; psx_taken_BFC21750 = (psx_brA_BFC21750 == psx_brB_BFC21750); psx_delay_BFC21750 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003780u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC21754: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); 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[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003780u); #endif if (psx_delay_BFC21750) { psx_delay_BFC21750 = 0; if (psx_taken_BFC21750) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003788u); goto label_BFC2175C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003784u); } label_BFC21758: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21758: 24022002 addiu $v0, $zero, 8194 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8194)); PGXP_ALU(0x24022002u, cpu->gpr[2], _pgx1, 0x00002002u); } #ifdef PSX_COSIM cosim_instr(0x00003784u); #endif label_BFC2175C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003788u); #endif #ifdef PSX_COSIM cosim_block(0x00003788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2175C: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003788u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21760: A462104A sh $v0, 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, 0x0000378Cu); return; } g_debug_last_store_pc = 0x0000378Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA462104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000378Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003790u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21764: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003798u; /* jal link before delay slot */ psx_delay_BFC21764 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21768: 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(0x00003794u); #endif if (psx_delay_BFC21764) { psx_delay_BFC21764 = 0; cpu->gpr[31] = 0x00003798u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC2176C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003798u); #endif #ifdef PSX_COSIM cosim_block(0x00003798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2176C: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003798u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21770: A440104A sh $zero, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000379Cu); return; } g_debug_last_store_pc = 0x0000379Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA440104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000379Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000037A0u); #endif /* 0xBFC21774: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037A0u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000037A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21778: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000037A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC2177C: 03E00008 jr $ra */ psx_delay_BFC2177C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21780: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000037ACu); #endif if (psx_delay_BFC2177C) { psx_delay_BFC2177C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC21784: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000037B0u); #endif #ifdef PSX_COSIM cosim_block(0x000037B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000037B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21784: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000037B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21788: A440104A sh $zero, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037B4u); return; } g_debug_last_store_pc = 0x000037B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA440104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000037B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC2178C: 03E00008 jr $ra */ psx_delay_BFC2178C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21790: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000037BCu); #endif if (psx_delay_BFC2178C) { psx_delay_BFC2178C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000037C0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000037C0u); int psx_delay_BFC217C4 = 0; int psx_delay_BFC217D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC217CCu: goto label_BFC217CC; case 0xBFC217DCu: goto label_BFC217DC; default: break; } } label_BFC21794: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000037C0u); #endif #ifdef PSX_COSIM cosim_block(0x000037C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000037C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21794: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000037C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21798: 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(0x000037C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC2179C: 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, 0x000037C8u); return; } g_debug_last_store_pc = 0x000037C8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000037C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC217A0: 3C101F80 lui $s0, 0x1F80 */ cpu->gpr[16] = 0x1F800000u; PGXP_ALU(0x3C101F80u, cpu->gpr[16], 0u, 0u); #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, 0xA0000000u); #endif /* 0xBFC217A4: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000037D0u); return; } g_debug_last_store_pc = 0x000037D0u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000037D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC217A8: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037D4u); return; } g_debug_last_store_pc = 0x000037D4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000037D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC217AC: 24020088 addiu $v0, $zero, 136 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (136)); PGXP_ALU(0x24020088u, cpu->gpr[2], _pgx1, 0x00000088u); } #ifdef PSX_COSIM cosim_instr(0x000037D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC217B0: A602104E sh $v0, 4174($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4174; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4174)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037DCu); return; } g_debug_last_store_pc = 0x000037DCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Eu, _pgxa, cpu->gpr[2]); } #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 /* 0xBFC217B4: 2402000D addiu $v0, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x2402000Du, cpu->gpr[2], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0x000037E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC217B8: A6021048 sh $v0, 4168($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037E4u); return; } g_debug_last_store_pc = 0x000037E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6021048u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000037E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC217BC: 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(0x000037E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC217C0: A600104A sh $zero, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037ECu); return; } g_debug_last_store_pc = 0x000037ECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA600104Au, _pgxa, cpu->gpr[0]); } #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, 0x80000000u); #endif /* 0xBFC217C4: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x000037F8u; /* jal link before delay slot */ psx_delay_BFC217C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC217C8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000037F4u); #endif if (psx_delay_BFC217C4) { psx_delay_BFC217C4 = 0; cpu->gpr[31] = 0x000037F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC217CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000037F8u); #endif #ifdef PSX_COSIM cosim_block(0x000037F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000037F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC217CC: 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(0x000037F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC217D0: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000037FCu); return; } g_debug_last_store_pc = 0x000037FCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000037FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003800u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC217D4: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003808u; /* jal link before delay slot */ psx_delay_BFC217D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC217D8: 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(0x00003804u); #endif if (psx_delay_BFC217D4) { psx_delay_BFC217D4 = 0; cpu->gpr[31] = 0x00003808u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC217DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003808u); #endif #ifdef PSX_COSIM cosim_block(0x00003808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC217DC: 24022002 addiu $v0, $zero, 8194 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (8194)); PGXP_ALU(0x24022002u, cpu->gpr[2], _pgx1, 0x00002002u); } #ifdef PSX_COSIM cosim_instr(0x00003808u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC217E0: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000380Cu); return; } g_debug_last_store_pc = 0x0000380Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x0000380Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003810u); cpu->pc = 0x00003810u; return; /* fallthrough */ } void OpenBIOS_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_BFC217E4 = 0; int psx_delay_BFC21800 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC217ECu: goto label_BFC217EC; default: break; } } label_BFC217E4: #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, 0x80000000u); #endif /* 0xBFC217E4: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003818u; /* jal link before delay slot */ psx_delay_BFC217E4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC217E8: 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(0x00003814u); #endif if (psx_delay_BFC217E4) { psx_delay_BFC217E4 = 0; cpu->gpr[31] = 0x00003818u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC217EC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003818u); #endif #ifdef PSX_COSIM cosim_block(0x00003818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003818u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC217EC: A600104A sh $zero, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003818u); return; } g_debug_last_store_pc = 0x00003818u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA600104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003818u); #endif /* 0xBFC217F0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000381Cu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x0000381Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003820u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC217F4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003820u); #endif /* 0xBFC217F8: 8FB00010 lw $s0, 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, 0x00003824u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003824u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC217FC: AC404C44 sw $zero, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003828u); return; } g_debug_last_store_pc = 0x00003828u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C44u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003828u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21800: 03E00008 jr $ra */ psx_delay_BFC21800 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003830u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21804: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00003830u); #endif if (psx_delay_BFC21800) { psx_delay_BFC21800 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00003834(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003834u); label_BFC21808: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003834u); #endif #ifdef PSX_COSIM cosim_block(0x00003834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21808: 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(0x00003834u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003838u); cpu->pc = 0x00003838u; return; /* fallthrough */ } void OpenBIOS_func_00003838(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003838u); label_BFC2180C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003838u); #endif #ifdef PSX_COSIM cosim_block(0x00003838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC2180C: 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, 0x00003838u); return; } g_debug_last_store_pc = 0x00003838u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00003838u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC21810: 3C120000 lui $s2, 0x0 */ cpu->gpr[18] = 0x00000000u; PGXP_ALU(0x3C120000u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000383Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003840u); #endif /* 0xBFC21814: 8E424C58 lw $v0, 19544($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003840u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000u); } PGXP_LOAD(0x8E424C58u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003840u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21818: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003844u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x15u); #endif /* 0xBFC2181C: 0002202B sltu $a0, $zero, $v0 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)(cpu->gpr[0] < cpu->gpr[2] ? 1 : 0); PGXP_ALU(0x0002202Bu, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003848u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21820: 00042340 sll $a0, $a0, 13 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[4] << 13u; PGXP_ALU(0x00042340u, cpu->gpr[4], _pgx1, 13u); } #ifdef PSX_COSIM cosim_instr(0x0000384Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21824: AC644C60 sw $a0, 19552($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003850u); return; } g_debug_last_store_pc = 0x00003850u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC644C60u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003850u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC21828: 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, 0x00003854u); return; } g_debug_last_store_pc = 0x00003854u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0024u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003854u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC2182C: 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, 0x00003858u); return; } g_debug_last_store_pc = 0x00003858u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40020u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x00003858u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC21830: 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, 0x0000385Cu); return; } g_debug_last_store_pc = 0x0000385Cu; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB3001Cu, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x0000385Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC21834: 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, 0x00003860u); return; } g_debug_last_store_pc = 0x00003860u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00003860u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC21838: 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, 0x00003864u); return; } g_debug_last_store_pc = 0x00003864u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003864u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC2183C: 3C051F80 lui $a1, 0x1F80 */ cpu->gpr[5] = 0x1F800000u; PGXP_ALU(0x3C051F80u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003868u); #endif /* 0xBFC21840: 94A3104A lhu $v1, 4170($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000386Cu); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x94A3104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000386Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003870u); cpu->pc = 0x00003870u; return; /* fallthrough */ } void OpenBIOS_func_00003870(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003870u); int psx_delay_BFC21860 = 0; int psx_taken_BFC21860 = 0; int psx_delay_BFC2188C = 0; int psx_delay_BFC21894 = 0; int psx_taken_BFC21894 = 0; int psx_delay_BFC218AC = 0; int psx_taken_BFC218AC = 0; int psx_delay_BFC218C4 = 0; int psx_taken_BFC218C4 = 0; int psx_delay_BFC218F8 = 0; int psx_delay_BFC21908 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21860u: goto label_BFC21860; case 0xBFC21868u: goto label_BFC21868; case 0xBFC21894u: goto label_BFC21894; case 0xBFC2189Cu: goto label_BFC2189C; case 0xBFC218B4u: goto label_BFC218B4; case 0xBFC218CCu: goto label_BFC218CC; case 0xBFC21900u: goto label_BFC21900; default: break; } } label_BFC21844: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003870u); #endif #ifdef PSX_COSIM cosim_block(0x00003870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21844: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003870u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21848: 00641825 or $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(0x00641825u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003874u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2184C: 34630012 ori $v1, $v1, 0x12 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x12u; PGXP_ALU(0x34630012u, cpu->gpr[3], _pgx1, 0x0012u); } #ifdef PSX_COSIM cosim_instr(0x00003878u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC21850: A4A3104A sh $v1, 4170($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x0000387Cu); return; } g_debug_last_store_pc = 0x0000387Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4A3104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000387Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003880u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21854: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003880u); #endif /* 0xBFC21858: 8C644C04 lw $a0, 19460($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19460; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19460)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003884u); return; } cpu->gpr[4] = psx_cyc_load_word(cpu, psx_addr, 4, 0x8u); } PGXP_LOAD(0x8C644C04u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003884u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2185C: 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(0x00003888u); #endif label_BFC21860: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000388Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000388Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000388Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21860: 14830036 bne $a0, $v1, 0xBFC2193C */ uint32_t psx_brA_BFC21860 = cpu->gpr[4]; uint32_t psx_brB_BFC21860 = cpu->gpr[3]; psx_taken_BFC21860 = (psx_brA_BFC21860 != psx_brB_BFC21860); psx_delay_BFC21860 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003890u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21864: 3C100000 lui $s0, 0x0 */ cpu->gpr[16] = 0x00000000u; PGXP_ALU(0x3C100000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003890u); #endif if (psx_delay_BFC21860) { psx_delay_BFC21860 = 0; if (psx_taken_BFC21860) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003968u); cpu->pc = 0x00003968u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003894u); } label_BFC21868: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003894u); #endif #ifdef PSX_COSIM cosim_block(0x00003894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003894u); #endif /* 0xBFC21868: 8E034C48 lw $v1, 19528($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19528; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003894u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10000u); } PGXP_LOAD(0x8E034C48u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003894u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2186C: 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(0x00003898u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21870: 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(0x0000389Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC21874: AE034C48 sw $v1, 19528($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038A0u); return; } g_debug_last_store_pc = 0x000038A0u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAE034C48u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000038A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21878: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000038A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2187C: 24634C18 addiu $v1, $v1, 19480 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (19480)); PGXP_ALU(0x24634C18u, cpu->gpr[3], _pgx1, 0x00004C18u); } #ifdef PSX_COSIM cosim_instr(0x000038A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21880: 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(0x000038ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038B0u); #endif /* 0xBFC21884: 8C420000 lw $v0, 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, 0x000038B0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C420000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000038B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21888: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000038B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC2188C: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x000038C0u; /* jalr link before delay slot */ psx_delay_BFC2188C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21890: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000038BCu); #endif if (psx_delay_BFC2188C) { psx_delay_BFC2188C = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x000038C0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC21894: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000038C0u); #endif #ifdef PSX_COSIM cosim_block(0x000038C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21894: 1040002B beq $v0, $zero, 0xBFC21944 */ uint32_t psx_brA_BFC21894 = cpu->gpr[2]; uint32_t psx_brB_BFC21894 = cpu->gpr[0]; psx_taken_BFC21894 = (psx_brA_BFC21894 == psx_brB_BFC21894); psx_delay_BFC21894 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80005u); #endif /* 0xBFC21898: 00409825 or $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(0x00409825u, cpu->gpr[19], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000038C4u); #endif if (psx_delay_BFC21894) { psx_delay_BFC21894 = 0; if (psx_taken_BFC21894) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003970u); cpu->pc = 0x00003970u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000038C8u); } label_BFC2189C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2189C: 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(0x000038C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC218A0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0x8u); #endif /* 0xBFC218A4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000038D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC218A8: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000038D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80010u); #endif /* 0xBFC218AC: 12640034 beq $s3, $a0, 0xBFC21980 */ uint32_t psx_brA_BFC218AC = cpu->gpr[19]; uint32_t psx_brB_BFC218AC = cpu->gpr[4]; psx_taken_BFC218AC = (psx_brA_BFC218AC == psx_brB_BFC218AC); psx_delay_BFC218AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC218B0: 3C110000 lui $s1, 0x0 */ cpu->gpr[17] = 0x00000000u; PGXP_ALU(0x3C110000u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000038DCu); #endif if (psx_delay_BFC218AC) { psx_delay_BFC218AC = 0; if (psx_taken_BFC218AC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000039ACu); cpu->pc = 0x000039ACu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000038E0u); } label_BFC218B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000038E0u); #endif #ifdef PSX_COSIM cosim_block(0x000038E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC218B4: AC604C5C sw $zero, 19548($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038E0u); return; } g_debug_last_store_pc = 0x000038E0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC604C5Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000038E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC218B8: A440104A sh $zero, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000038E4u); return; } g_debug_last_store_pc = 0x000038E4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA440104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000038E4u); #endif /* 0xBFC218BC: 8E224C50 lw $v0, 19536($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038E8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E224C50u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000038E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC218C0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000038ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC218C4: 14400012 bne $v0, $zero, 0xBFC21910 */ uint32_t psx_brA_BFC218C4 = cpu->gpr[2]; uint32_t psx_brB_BFC218C4 = cpu->gpr[0]; psx_taken_BFC218C4 = (psx_brA_BFC218C4 != psx_brB_BFC218C4); psx_delay_BFC218C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC218C8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000038F4u); #endif if (psx_delay_BFC218C4) { psx_delay_BFC218C4 = 0; if (psx_taken_BFC218C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000393Cu); cpu->pc = 0x0000393Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000038F8u); } label_BFC218CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000038F8u); #endif #ifdef PSX_COSIM cosim_block(0x000038F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000038F8u); #endif /* 0xBFC218CC: 8E434C58 lw $v1, 19544($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E434C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000038F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC218D0: AC404C44 sw $zero, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000038FCu); return; } g_debug_last_store_pc = 0x000038FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C44u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000038FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC218D4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003900u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC218D8: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x00003904u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC218DC: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003908u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC218E0: 24040021 addiu $a0, $zero, 33 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[0] + (33)); PGXP_ALU(0x24040021u, cpu->gpr[4], _pgx1, 0x00000021u); } #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, 0x14u); #endif /* 0xBFC218E4: A0440000 sb $a0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003910u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003910u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC218E8: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003914u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC218EC: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003918u); return; } g_debug_last_store_pc = 0x00003918u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003918u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC218F0: 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(0x0000391Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC218F4: 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(0x00003920u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC218F8: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x0000392Cu; /* jalr link before delay slot */ psx_delay_BFC218F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC218FC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003928u); #endif if (psx_delay_BFC218F8) { psx_delay_BFC218F8 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x0000392Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC21900: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000392Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000392Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000392Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21900: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 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, 0x21u); #endif /* 0xBFC21904: 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(0x00003930u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21908: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x0000393Cu; /* jal link before delay slot */ cpu->gpr[31] = 0x0000393Cu; /* jal link before delay slot */ /* DELAY (orphaned) 0xBFC2190C: 24840011 addiu $a0, $a0, 17 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } void OpenBIOS_func_00003938(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003938u); int psx_delay_BFC2191C = 0; int psx_delay_BFC21934 = 0; int psx_taken_BFC21934 = 0; int psx_delay_BFC2193C = 0; int psx_taken_BFC2193C = 0; int psx_delay_BFC21978 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21910u: goto label_BFC21910; case 0xBFC2193Cu: goto label_BFC2193C; case 0xBFC21944u: goto label_BFC21944; case 0xBFC21960u: goto label_BFC21960; case 0xBFC21924u: goto label_BFC21924; case 0xBFC2195Cu: goto label_BFC2195C; default: break; } } label_BFC2190C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003938u); #endif #ifdef PSX_COSIM cosim_block(0x00003938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003938u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2190C: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x00003938u); #endif label_BFC21910: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000393Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000393Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000393Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21910: 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(0x0000393Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100020u); #endif /* 0xBFC21914: 2685AEB0 addiu $a1, $s4, -20816 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[20] + (-20816)); PGXP_ALU(0x2685AEB0u, cpu->gpr[5], _pgx1, 0xFFFFAEB0u); } #ifdef PSX_COSIM cosim_instr(0x00003940u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC21918: AE004C48 sw $zero, 19528($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003944u); return; } g_debug_last_store_pc = 0x00003944u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE004C48u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003944u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2191C: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x00003950u; /* jal link before delay slot */ psx_delay_BFC2191C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21920: AE204C50 sw $zero, 19536($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000394Cu); return; } g_debug_last_store_pc = 0x0000394Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE204C50u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000394Cu); #endif if (psx_delay_BFC2191C) { psx_delay_BFC2191C = 0; cpu->gpr[31] = 0x00003950u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC21924: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003950u); #endif #ifdef PSX_COSIM cosim_block(0x00003950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21924: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003950u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21928: 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(0x00003954u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2192C: AC441070 sw $a0, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003958u); return; } g_debug_last_store_pc = 0x00003958u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003958u); #endif /* 0xBFC21930: 8C431074 lw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000395Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x0000395Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003960u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21934: 10000009 beq $zero, $zero, 0xBFC2195C */ uint32_t psx_brA_BFC21934 = cpu->gpr[0]; uint32_t psx_brB_BFC21934 = cpu->gpr[0]; psx_taken_BFC21934 = (psx_brA_BFC21934 == psx_brB_BFC21934); psx_delay_BFC21934 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21938: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003964u); #endif if (psx_delay_BFC21934) { psx_delay_BFC21934 = 0; if (psx_taken_BFC21934) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003988u); goto label_BFC2195C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003968u); } label_BFC2193C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003968u); #endif #ifdef PSX_COSIM cosim_block(0x00003968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003968u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2193C: 1000FFC8 beq $zero, $zero, 0xBFC21860 */ uint32_t psx_brA_BFC2193C = cpu->gpr[0]; uint32_t psx_brB_BFC2193C = cpu->gpr[0]; psx_taken_BFC2193C = (psx_brA_BFC2193C == psx_brB_BFC2193C); psx_delay_BFC2193C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21940: 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(0x0000396Cu); #endif if (psx_delay_BFC2193C) { psx_delay_BFC2193C = 0; if (psx_taken_BFC2193C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000388Cu); cpu->pc = 0x0000388Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003970u); } label_BFC21944: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21944: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003970u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21948: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003974u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2194C: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); 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[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003978u); #endif /* 0xBFC21950: 8C431074 lw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000397Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C431074u, _pgxa, cpu->gpr[3]); } #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, 0x1u); #endif /* 0xBFC21954: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003980u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21958: 34630080 ori $v1, $v1, 0x80 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x80u; PGXP_ALU(0x34630080u, cpu->gpr[3], _pgx1, 0x0080u); } #ifdef PSX_COSIM cosim_instr(0x00003984u); #endif label_BFC2195C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003988u); #endif #ifdef PSX_COSIM cosim_block(0x00003988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003988u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2195C: AC431074 sw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003988u); return; } g_debug_last_store_pc = 0x00003988u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003988u); #endif label_BFC21960: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000398Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000398Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000398Cu); #endif /* 0xBFC21960: 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, 0x0000398Cu); 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(0x0000398Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003990u); #endif /* 0xBFC21964: 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, 0x00003990u); 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(0x00003990u); #endif /* 0xBFC21968: 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, 0x00003994u); 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(0x00003994u); #endif /* 0xBFC2196C: 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, 0x00003998u); 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(0x00003998u); #endif /* 0xBFC21970: 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, 0x0000399Cu); 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(0x0000399Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039A0u); #endif /* 0xBFC21974: 8FB00010 lw $s0, 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, 0x000039A0u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000039A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21978: 03E00008 jr $ra */ psx_delay_BFC21978 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC2197C: 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(0x000039A8u); #endif if (psx_delay_BFC21978) { psx_delay_BFC21978 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000039AC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000039ACu); int psx_delay_BFC21990 = 0; int psx_delay_BFC219BC = 0; int psx_taken_BFC219BC = 0; int psx_delay_BFC219EC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21998u: goto label_BFC21998; case 0xBFC219C4u: goto label_BFC219C4; case 0xBFC219F4u: goto label_BFC219F4; default: break; } } label_BFC21980: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000039ACu); #endif #ifdef PSX_COSIM cosim_block(0x000039ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21980: AC604C5C sw $zero, 19548($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039ACu); return; } g_debug_last_store_pc = 0x000039ACu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC604C5Cu, _pgxa, cpu->gpr[0]); } #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, 0x11u); #endif /* 0xBFC21984: 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(0x000039B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21988: A440104A sh $zero, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000039B4u); return; } g_debug_last_store_pc = 0x000039B4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA440104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000039B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100020u); #endif /* 0xBFC2198C: 2685AEB0 addiu $a1, $s4, -20816 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[20] + (-20816)); PGXP_ALU(0x2685AEB0u, cpu->gpr[5], _pgx1, 0xFFFFAEB0u); } #ifdef PSX_COSIM cosim_instr(0x000039B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21990: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x000039C4u; /* jal link before delay slot */ psx_delay_BFC21990 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC21994: AE004C48 sw $zero, 19528($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039C0u); return; } g_debug_last_store_pc = 0x000039C0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAE004C48u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000039C0u); #endif if (psx_delay_BFC21990) { psx_delay_BFC21990 = 0; cpu->gpr[31] = 0x000039C4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC21998: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000039C4u); #endif #ifdef PSX_COSIM cosim_block(0x000039C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21998: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000039C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2199C: 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(0x000039C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC219A0: AC441070 sw $a0, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039CCu); return; } g_debug_last_store_pc = 0x000039CCu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC441070u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000039CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039D0u); #endif /* 0xBFC219A4: 8C431074 lw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039D0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000039D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC219A8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000039D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC219AC: 00641824 and $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(0x00641824u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000039D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC219B0: AC431074 sw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039DCu); return; } g_debug_last_store_pc = 0x000039DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000039DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039E0u); #endif /* 0xBFC219B4: 8E224C50 lw $v0, 19536($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 19536; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039E0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20000u); } PGXP_LOAD(0x8E224C50u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000039E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC219B8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000039E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC219BC: 1440FFE8 bne $v0, $zero, 0xBFC21960 */ uint32_t psx_brA_BFC219BC = cpu->gpr[2]; uint32_t psx_brB_BFC219BC = cpu->gpr[0]; psx_taken_BFC219BC = (psx_brA_BFC219BC != psx_brB_BFC219BC); psx_delay_BFC219BC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC219C0: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000039ECu); #endif if (psx_delay_BFC219BC) { psx_delay_BFC219BC = 0; if (psx_taken_BFC219BC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000398Cu); cpu->pc = 0x0000398Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000039F0u); } label_BFC219C4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000039F0u); #endif #ifdef PSX_COSIM cosim_block(0x000039F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000039F0u); #endif /* 0xBFC219C4: 8E434C58 lw $v1, 19544($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[18] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039F0u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x40000u); } PGXP_LOAD(0x8E434C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000039F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC219C8: AC404C44 sw $zero, 19524($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000039F4u); return; } g_debug_last_store_pc = 0x000039F4u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C44u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000039F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC219CC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000039F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC219D0: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #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, 0xCu); #endif /* 0xBFC219D4: 00621021 addu $v0, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00621021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003A00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80004u); #endif /* 0xBFC219D8: A0530000 sb $s3, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003A04u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[19] & 0xFFu)); PGXP_STORE(0xA0530000u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x00003A04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC219DC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003A08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC219E0: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003A0Cu); return; } g_debug_last_store_pc = 0x00003A0Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _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, 0x201u); #endif /* 0xBFC219E4: 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(0x00003A10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC219E8: 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(0x00003A14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC219EC: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00003A20u; /* jalr link before delay slot */ psx_delay_BFC219EC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC219F0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003A1Cu); #endif if (psx_delay_BFC219EC) { psx_delay_BFC219EC = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00003A20u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC219F4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003A20u); #endif #ifdef PSX_COSIM cosim_block(0x00003A20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A20u); #endif /* 0xBFC219F4: 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, 0x00003A20u); 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(0x00003A20u); #endif /* 0xBFC219F8: 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, 0x00003A24u); 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(0x00003A24u); #endif /* 0xBFC219FC: 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, 0x00003A28u); 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(0x00003A28u); #endif /* 0xBFC21A00: 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, 0x00003A2Cu); 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(0x00003A2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003A30u); cpu->pc = 0x00003A30u; return; /* fallthrough */ } void OpenBIOS_func_00003A30(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003A30u); int psx_delay_BFC21A18 = 0; label_BFC21A04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003A30u); #endif #ifdef PSX_COSIM cosim_block(0x00003A30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A30u); #endif /* 0xBFC21A04: 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, 0x00003A30u); 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(0x00003A30u); #endif /* 0xBFC21A08: 8FB00010 lw $s0, 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, 0x00003A34u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003A34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21A0C: 3C04F000 lui $a0, 0xF000 */ cpu->gpr[4] = 0xF0000000u; PGXP_ALU(0x3C04F000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003A38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21A10: 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(0x00003A3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21A14: 24840011 addiu $a0, $a0, 17 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (17)); PGXP_ALU(0x24840011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x00003A40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC21A18: 08000984 j 0xB0002610 */ psx_delay_BFC21A18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21A1C: 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(0x00003A48u); #endif if (psx_delay_BFC21A18) { psx_delay_BFC21A18 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } } void OpenBIOS_func_00003A4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003A4Cu); int psx_delay_BFC21A90 = 0; int psx_taken_BFC21A90 = 0; int psx_delay_BFC21AB4 = 0; int psx_delay_BFC21AD0 = 0; int psx_taken_BFC21AD0 = 0; int psx_delay_BFC21AE8 = 0; int psx_delay_BFC21B18 = 0; int psx_taken_BFC21B18 = 0; int psx_delay_BFC21B28 = 0; int psx_delay_BFC21B40 = 0; int psx_taken_BFC21B40 = 0; int psx_delay_BFC21B58 = 0; int psx_delay_BFC21B84 = 0; int psx_taken_BFC21B84 = 0; int psx_delay_BFC21B9C = 0; int psx_taken_BFC21B9C = 0; int psx_delay_BFC21BB8 = 0; int psx_taken_BFC21BB8 = 0; int psx_delay_BFC21BCC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21B34u: goto label_BFC21B34; case 0xBFC21BACu: goto label_BFC21BAC; case 0xBFC21A98u: goto label_BFC21A98; case 0xBFC21AA8u: goto label_BFC21AA8; case 0xBFC21ABCu: goto label_BFC21ABC; case 0xBFC21AC4u: goto label_BFC21AC4; case 0xBFC21AD8u: goto label_BFC21AD8; case 0xBFC21AF0u: goto label_BFC21AF0; case 0xBFC21B0Cu: goto label_BFC21B0C; case 0xBFC21B20u: goto label_BFC21B20; case 0xBFC21B30u: goto label_BFC21B30; case 0xBFC21B48u: goto label_BFC21B48; case 0xBFC21B60u: goto label_BFC21B60; case 0xBFC21B78u: goto label_BFC21B78; case 0xBFC21B8Cu: goto label_BFC21B8C; case 0xBFC21BA4u: goto label_BFC21BA4; case 0xBFC21BA8u: goto label_BFC21BA8; case 0xBFC21BC0u: goto label_BFC21BC0; default: break; } } label_BFC21A20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003A4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21A20: 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(0x00003A4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20100000u); #endif /* 0xBFC21A24: 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, 0x00003A50u); return; } g_debug_last_store_pc = 0x00003A50u; cpu->write_word(psx_addr, cpu->gpr[20]); } PGXP_STORE(0xAFB40028u, _pgxa, cpu->gpr[20]); } #ifdef PSX_COSIM cosim_instr(0x00003A50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC21A28: 3C140001 lui $s4, 0x1 */ cpu->gpr[20] = 0x00010000u; PGXP_ALU(0x3C140001u, cpu->gpr[20], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003A54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20200000u); #endif /* 0xBFC21A2C: 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, 0x00003A58u); return; } g_debug_last_store_pc = 0x00003A58u; cpu->write_word(psx_addr, cpu->gpr[21]); } PGXP_STORE(0xAFB5002Cu, _pgxa, cpu->gpr[21]); } #ifdef PSX_COSIM cosim_instr(0x00003A58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x100000u); #endif /* 0xBFC21A30: 2694AEDC addiu $s4, $s4, -20772 */ { uint32_t _pgx1 = cpu->gpr[20]; cpu->gpr[20] = (uint32_t)((int32_t)cpu->gpr[20] + (-20772)); PGXP_ALU(0x2694AEDCu, cpu->gpr[20], _pgx1, 0xFFFFAEDCu); } #ifdef PSX_COSIM cosim_instr(0x00003A5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x200010u); #endif /* 0xBFC21A34: 0004A880 sll $s5, $a0, 2 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[21] = cpu->gpr[4] << 2u; PGXP_ALU(0x0004A880u, cpu->gpr[21], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00003A60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20800000u); #endif /* 0xBFC21A38: 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, 0x00003A64u); return; } g_debug_last_store_pc = 0x00003A64u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAFB70034u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x00003A64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20400000u); #endif /* 0xBFC21A3C: 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, 0x00003A68u); return; } g_debug_last_store_pc = 0x00003A68u; cpu->write_word(psx_addr, cpu->gpr[22]); } PGXP_STORE(0xAFB60030u, _pgxa, cpu->gpr[22]); } #ifdef PSX_COSIM cosim_instr(0x00003A68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC21A40: 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, 0x00003A6Cu); return; } g_debug_last_store_pc = 0x00003A6Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB1001Cu, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00003A6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC21A44: 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, 0x00003A70u); return; } g_debug_last_store_pc = 0x00003A70u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF003Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003A70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60000000u); #endif /* 0xBFC21A48: 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, 0x00003A74u); return; } g_debug_last_store_pc = 0x00003A74u; cpu->write_word(psx_addr, cpu->gpr[30]); } PGXP_STORE(0xAFBE0038u, _pgxa, cpu->gpr[30]); } #ifdef PSX_COSIM cosim_instr(0x00003A74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20080000u); #endif /* 0xBFC21A4C: 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, 0x00003A78u); return; } g_debug_last_store_pc = 0x00003A78u; cpu->write_word(psx_addr, cpu->gpr[19]); } PGXP_STORE(0xAFB30024u, _pgxa, cpu->gpr[19]); } #ifdef PSX_COSIM cosim_instr(0x00003A78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20040000u); #endif /* 0xBFC21A50: 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, 0x00003A7Cu); return; } g_debug_last_store_pc = 0x00003A7Cu; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20020u, _pgxa, cpu->gpr[18]); } #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, 0x20010000u); #endif /* 0xBFC21A54: 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, 0x00003A80u); return; } g_debug_last_store_pc = 0x00003A80u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00018u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003A80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300004u); #endif /* 0xBFC21A58: 02B41021 addu $v0, $s5, $s4 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[20]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[20]; PGXP_ALU(0x02B41021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003A84u); #endif /* 0xBFC21A5C: 8C520000 lw $s2, 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, 0x00003A88u); return; } cpu->gpr[18] = psx_cyc_load_word(cpu, psx_addr, 18, 0x4u); } PGXP_LOAD(0x8C520000u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x00003A88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800010u); #endif /* 0xBFC21A60: 0004BB40 sll $s7, $a0, 13 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[23] = cpu->gpr[4] << 13u; PGXP_ALU(0x0004BB40u, cpu->gpr[23], _pgx1, 13u); } #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, 0x5u); #endif /* 0xBFC21A64: 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(0x00003A90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC21A68: 32F7FFFF andi $s7, $s7, 0xFFFF */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[23] = cpu->gpr[23] & 0xFFFFu; PGXP_ALU(0x32F7FFFFu, cpu->gpr[23], _pgx1, 0xFFFFu); } #ifdef PSX_COSIM cosim_instr(0x00003A94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC21A6C: A2420000 sb $v0, 0($s2) */ { uint32_t _pgxa = cpu->gpr[18]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003A98u; 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(0x00003A98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800008u); #endif /* 0xBFC21A70: 36E30002 ori $v1, $s7, 0x2 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[3] = cpu->gpr[23] | 0x2u; PGXP_ALU(0x36E30002u, cpu->gpr[3], _pgx1, 0x0002u); } #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, 0x4u); #endif /* 0xBFC21A74: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003AA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21A78: A443104A sh $v1, 4170($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003AA4u); return; } g_debug_last_store_pc = 0x00003AA4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA443104Au, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003AA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21A7C: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003AA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21A80: 2442AEC0 addiu $v0, $v0, -20800 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20800)); PGXP_ALU(0x2442AEC0u, cpu->gpr[2], _pgx1, 0xFFFFAEC0u); } #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, 0x200004u); #endif /* 0xBFC21A84: 02A21021 addu $v0, $s5, $v0 */ { uint32_t _pgx1 = cpu->gpr[21]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[21] + cpu->gpr[2]; PGXP_ALU(0x02A21021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003AB0u); #endif /* 0xBFC21A88: 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, 0x00003AB4u); 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(0x00003AB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC21A8C: 0080B025 or $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(0x0080B025u, cpu->gpr[22], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003AB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80001u); #endif /* 0xBFC21A90: 12600005 beq $s3, $zero, 0xBFC21AA8 */ uint32_t psx_brA_BFC21A90 = cpu->gpr[19]; uint32_t psx_brB_BFC21A90 = cpu->gpr[0]; psx_taken_BFC21A90 = (psx_brA_BFC21A90 == psx_brB_BFC21A90); psx_delay_BFC21A90 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003AC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21A94: 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(0x00003AC0u); #endif if (psx_delay_BFC21A90) { psx_delay_BFC21A90 = 0; if (psx_taken_BFC21A90) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003AD4u); goto label_BFC21AA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003AC4u); } label_BFC21A98: #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 /* 0xBFC21A98: 92710000 lbu $s1, 0($s3) */ { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[17] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 17, 0x80000u); PGXP_LOAD(0x92710000u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00003AC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21A9C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003AC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21AA0: 0011882B sltu $s1, $zero, $s1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[17] = (uint32_t)(cpu->gpr[0] < cpu->gpr[17] ? 1 : 0); PGXP_ALU(0x0011882Bu, cpu->gpr[17], _pgx1, _pgx2); } #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, 0x20001u); #endif /* 0xBFC21AA4: 00118823 subu $s1, $zero, $s1 */ { uint32_t _pgx1 = cpu->gpr[0]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[0] - cpu->gpr[17]; PGXP_ALU(0x00118823u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003AD0u); #endif label_BFC21AA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003AD4u); #endif #ifdef PSX_COSIM cosim_block(0x00003AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21AA8: 3C101F80 lui $s0, 0x1F80 */ cpu->gpr[16] = 0x1F800000u; PGXP_ALU(0x3C101F80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003AD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21AAC: 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(0x00003AD8u); #endif /* 0xBFC21AB0: 92021040 lbu $v0, 4160($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[16] + (4160)), 2, 0x10000u); PGXP_LOAD(0x92021040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003ADCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003AE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21AB4: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003AE8u; /* jal link before delay slot */ psx_delay_BFC21AB4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21AB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003AE4u); #endif if (psx_delay_BFC21AB4) { psx_delay_BFC21AB4 = 0; cpu->gpr[31] = 0x00003AE8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21ABC: #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, 0x800004u); #endif /* 0xBFC21ABC: 36E21003 ori $v0, $s7, 0x1003 */ { uint32_t _pgx1 = cpu->gpr[23]; cpu->gpr[2] = cpu->gpr[23] | 0x1003u; PGXP_ALU(0x36E21003u, cpu->gpr[2], _pgx1, 0x1003u); } #ifdef PSX_COSIM cosim_instr(0x00003AE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC21AC0: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003AECu); return; } g_debug_last_store_pc = 0x00003AECu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003AECu); #endif label_BFC21AC4: #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 /* 0xBFC21AC4: 96021044 lhu $v0, 4164($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003AF0u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x96021044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003AF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21AC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003AF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21ACC: 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(0x00003AF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21AD0: 1040FFFC beq $v0, $zero, 0xBFC21AC4 */ uint32_t psx_brA_BFC21AD0 = cpu->gpr[2]; uint32_t psx_brB_BFC21AD0 = cpu->gpr[0]; psx_taken_BFC21AD0 = (psx_brA_BFC21AD0 == psx_brB_BFC21AD0); psx_delay_BFC21AD0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21AD4: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003B00u); #endif if (psx_delay_BFC21AD0) { psx_delay_BFC21AD0 = 0; if (psx_taken_BFC21AD0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003AF0u); goto label_BFC21AC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003B04u); } label_BFC21AD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B04u); #endif #ifdef PSX_COSIM cosim_block(0x00003B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC21AD8: AC574C60 sw $s7, 19552($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19552; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19552)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B04u); return; } g_debug_last_store_pc = 0x00003B04u; cpu->write_word(psx_addr, cpu->gpr[23]); } PGXP_STORE(0xAC574C60u, _pgxa, cpu->gpr[23]); } #ifdef PSX_COSIM cosim_instr(0x00003B04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21ADC: 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(0x00003B08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21AE0: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC21AE4: A0431040 sb $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003B10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (4160)), (uint8_t)(cpu->gpr[3] & 0xFFu)); PGXP_STORE(0xA0431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003B10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21AE8: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003B1Cu; /* jal link before delay slot */ psx_delay_BFC21AE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21AEC: 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(0x00003B18u); #endif if (psx_delay_BFC21AE8) { psx_delay_BFC21AE8 = 0; cpu->gpr[31] = 0x00003B1Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21AF0: #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 /* 0xBFC21AF0: 9602104A lhu $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003B1Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x9602104Au, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC21AF4: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003B20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21AF8: 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(0x00003B24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC21AFC: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003B28u); return; } g_debug_last_store_pc = 0x00003B28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003B28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21B00: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC21B04: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B30u); return; } g_debug_last_store_pc = 0x00003B30u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003B30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21B08: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003B34u); #endif label_BFC21B0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B38u); #endif #ifdef PSX_COSIM cosim_block(0x00003B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B38u); #endif /* 0xBFC21B0C: 94621044 lhu $v0, 4164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003B38u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94621044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003B38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21B10: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC21B14: 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(0x00003B40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21B18: 1040FFFC beq $v0, $zero, 0xBFC21B0C */ uint32_t psx_brA_BFC21B18 = cpu->gpr[2]; uint32_t psx_brB_BFC21B18 = cpu->gpr[0]; psx_taken_BFC21B18 = (psx_brA_BFC21B18 == psx_brB_BFC21B18); psx_delay_BFC21B18 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21B1C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003B48u); #endif if (psx_delay_BFC21B18) { psx_delay_BFC21B18 = 0; if (psx_taken_BFC21B18) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003B38u); goto label_BFC21B0C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003B4Cu); } label_BFC21B20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21B20: 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(0x00003B4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B50u); #endif /* 0xBFC21B24: 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(0x00003B50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21B28: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003B5Cu; /* jal link before delay slot */ psx_delay_BFC21B28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC21B2C: 3C17BF80 lui $s7, 0xBF80 */ cpu->gpr[23] = 0xBF800000u; PGXP_ALU(0x3C17BF80u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003B58u); #endif if (psx_delay_BFC21B28) { psx_delay_BFC21B28 = 0; cpu->gpr[31] = 0x00003B5Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21B30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B5Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21B30: 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(0x00003B5Cu); #endif label_BFC21B34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B60u); #endif #ifdef PSX_COSIM cosim_block(0x00003B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B60u); #endif /* 0xBFC21B34: 8EE21070 lw $v0, 4208($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003B60u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x800000u); } PGXP_LOAD(0x8EE21070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003B60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21B38: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003B64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21B3C: 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(0x00003B68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21B40: 1040008B beq $v0, $zero, 0xBFC21D70 */ uint32_t psx_brA_BFC21B40 = cpu->gpr[2]; uint32_t psx_brB_BFC21B40 = cpu->gpr[0]; psx_taken_BFC21B40 = (psx_brA_BFC21B40 == psx_brB_BFC21B40); psx_delay_BFC21B40 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21B44: 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(0x00003B70u); #endif if (psx_delay_BFC21B40) { psx_delay_BFC21B40 = 0; if (psx_taken_BFC21B40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D9Cu); cpu->pc = 0x00003D9Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003B74u); } label_BFC21B48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B74u); #endif #ifdef PSX_COSIM cosim_block(0x00003B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21B48: 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(0x00003B74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21B4C: 3C101F80 lui $s0, 0x1F80 */ cpu->gpr[16] = 0x1F800000u; PGXP_ALU(0x3C101F80u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003B78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21B50: 24020042 addiu $v0, $zero, 66 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (66)); PGXP_ALU(0x24020042u, cpu->gpr[2], _pgx1, 0x00000042u); } #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, 0x10004u); #endif /* 0xBFC21B54: A2021040 sb $v0, 4160($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003B80u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[16] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2021040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003B80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21B58: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003B8Cu; /* jal link before delay slot */ psx_delay_BFC21B58 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21B5C: 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(0x00003B88u); #endif if (psx_delay_BFC21B58) { psx_delay_BFC21B58 = 0; cpu->gpr[31] = 0x00003B8Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21B60: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003B8Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003B8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003B8Cu); #endif /* 0xBFC21B60: 9602104A lhu $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003B8Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x9602104Au, _pgxa, cpu->gpr[2]); } #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 /* 0xBFC21B64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003B90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21B68: 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(0x00003B94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC21B6C: A602104A sh $v0, 4170($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003B98u); return; } g_debug_last_store_pc = 0x00003B98u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA602104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003B98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21B70: 2402FF7F addiu $v0, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2402FF7Fu, cpu->gpr[2], _pgx1, 0xFFFFFF7Fu); } #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, 0x800004u); #endif /* 0xBFC21B74: AEE21070 sw $v0, 4208($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4208)); 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[2]); } PGXP_STORE(0xAEE21070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003BA0u); #endif label_BFC21B78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BA4u); #endif #ifdef PSX_COSIM cosim_block(0x00003BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BA4u); #endif /* 0xBFC21B78: 96021044 lhu $v0, 4164($s0) */ { uint32_t _pgxa = cpu->gpr[16] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[16] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003BA4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10000u); } PGXP_LOAD(0x96021044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003BA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21B7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003BA8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21B80: 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(0x00003BACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21B84: 1040FFFC beq $v0, $zero, 0xBFC21B78 */ uint32_t psx_brA_BFC21B84 = cpu->gpr[2]; uint32_t psx_brB_BFC21B84 = cpu->gpr[0]; psx_taken_BFC21B84 = (psx_brA_BFC21B84 == psx_brB_BFC21B84); psx_delay_BFC21B84 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21B88: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003BB4u); #endif if (psx_delay_BFC21B84) { psx_delay_BFC21B84 = 0; if (psx_taken_BFC21B84) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003BA4u); goto label_BFC21B78; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003BB8u); } label_BFC21B8C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BB8u); #endif #ifdef PSX_COSIM cosim_block(0x00003BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BB8u); #endif /* 0xBFC21B8C: 90501040 lbu $s0, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[16] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 16, 0x4u); PGXP_LOAD(0x90501040u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003BB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21B90: 00000000 nop */ /* nop */ #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, 0x50000u); #endif /* 0xBFC21B94: A2500001 sb $s0, 1($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003BC0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (1)), (uint8_t)(cpu->gpr[16] & 0xFFu)); PGXP_STORE(0xA2500001u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003BC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21B98: 3210000F andi $s0, $s0, 0xF */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] & 0xFu; PGXP_ALU(0x3210000Fu, cpu->gpr[16], _pgx1, 0x000Fu); } #ifdef PSX_COSIM cosim_instr(0x00003BC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC21B9C: 16000002 bne $s0, $zero, 0xBFC21BA8 */ uint32_t psx_brA_BFC21B9C = cpu->gpr[16]; 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_cyc_step(cpu, 0x9u); #endif /* 0xBFC21BA0: 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(0x00003BCCu); #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, 0x00003BD4u); goto label_BFC21BA8; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003BD0u); } label_BFC21BA4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BD0u); #endif #ifdef PSX_COSIM cosim_block(0x00003BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC21BA4: 24100010 addiu $s0, $zero, 16 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[16] = (uint32_t)((int32_t)cpu->gpr[0] + (16)); PGXP_ALU(0x24100010u, cpu->gpr[16], _pgx1, 0x00000010u); } #ifdef PSX_COSIM cosim_instr(0x00003BD0u); #endif label_BFC21BA8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BD4u); #endif #ifdef PSX_COSIM cosim_block(0x00003BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC21BA8: 3C1EBF80 lui $fp, 0xBF80 */ cpu->gpr[30] = 0xBF800000u; PGXP_ALU(0x3C1EBF80u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003BD4u); #endif label_BFC21BAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BD8u); #endif #ifdef PSX_COSIM cosim_block(0x00003BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BD8u); #endif /* 0xBFC21BAC: 8FC21070 lw $v0, 4208($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003BD8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x8FC21070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003BD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21BB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003BDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21BB4: 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(0x00003BE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21BB8: 1040007C beq $v0, $zero, 0xBFC21DAC */ uint32_t psx_brA_BFC21BB8 = cpu->gpr[2]; uint32_t psx_brB_BFC21BB8 = cpu->gpr[0]; psx_taken_BFC21BB8 = (psx_brA_BFC21BB8 == psx_brB_BFC21BB8); psx_delay_BFC21BB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21BBC: 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(0x00003BE8u); #endif if (psx_delay_BFC21BB8) { psx_delay_BFC21BB8 = 0; if (psx_taken_BFC21BB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DD8u); cpu->pc = 0x00003DD8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003BECu); } label_BFC21BC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003BECu); #endif #ifdef PSX_COSIM cosim_block(0x00003BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21BC0: 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(0x00003BECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC21BC4: 3C171F80 lui $s7, 0x1F80 */ cpu->gpr[23] = 0x1F800000u; PGXP_ALU(0x3C171F80u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003BF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800001u); #endif /* 0xBFC21BC8: A2E01040 sb $zero, 4160($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003BF4u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[23] + (4160)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA2E01040u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003BF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21BCC: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003C00u; /* jal link before delay slot */ psx_delay_BFC21BCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21BD0: 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(0x00003BFCu); #endif if (psx_delay_BFC21BCC) { psx_delay_BFC21BCC = 0; cpu->gpr[31] = 0x00003C00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } } void OpenBIOS_func_00003C00(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C00u); label_BFC21BD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C00u); #endif #ifdef PSX_COSIM cosim_block(0x00003C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C00u); #endif /* 0xBFC21BD4: 96E2104A lhu $v0, 4170($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003C00u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x800000u); } PGXP_LOAD(0x96E2104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21BD8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003C04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C08u); cpu->pc = 0x00003C08u; return; /* fallthrough */ } void OpenBIOS_func_00003C08(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C08u); label_BFC21BDC: #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, 0x4u); #endif /* 0xBFC21BDC: 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(0x00003C08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800004u); #endif /* 0xBFC21BE0: A6E2104A sh $v0, 4170($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003C0Cu); return; } g_debug_last_store_pc = 0x00003C0Cu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6E2104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C10u); cpu->pc = 0x00003C10u; return; /* fallthrough */ } void OpenBIOS_func_00003C10(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C10u); label_BFC21BE4: #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, 0x5u); #endif /* 0xBFC21BE4: 2402FF7F addiu $v0, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2402FF7Fu, cpu->gpr[2], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003C10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC21BE8: AFC21070 sw $v0, 4208($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4208)); 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[2]); } PGXP_STORE(0xAFC21070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C18u); cpu->pc = 0x00003C18u; return; /* fallthrough */ } void OpenBIOS_func_00003C18(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C18u); int psx_delay_BFC21BF8 = 0; int psx_taken_BFC21BF8 = 0; label_BFC21BEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C18u); #endif #ifdef PSX_COSIM cosim_block(0x00003C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C18u); #endif /* 0xBFC21BEC: 96E21044 lhu $v0, 4164($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003C18u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x800000u); } PGXP_LOAD(0x96E21044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21BF0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003C1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21BF4: 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(0x00003C20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21BF8: 1040FFFC beq $v0, $zero, 0xBFC21BEC */ uint32_t psx_brA_BFC21BF8 = cpu->gpr[2]; uint32_t psx_brB_BFC21BF8 = cpu->gpr[0]; psx_taken_BFC21BF8 = (psx_brA_BFC21BF8 == psx_brB_BFC21BF8); /* DELAY (orphaned) 0xBFC21BFC: 3C021F80 lui $v0, 0x1F80 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); if (psx_taken_BFC21BF8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C18u); goto label_BFC21BEC; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C2Cu); cpu->pc = 0x00003C2Cu; return; } void OpenBIOS_func_00003C28(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C28u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21C00u: goto label_BFC21C00; default: break; } } label_BFC21BFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C28u); #endif #ifdef PSX_COSIM cosim_block(0x00003C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21BFC: 3C021F80 lui $v0, 0x1F80 */ cpu->gpr[2] = 0x1F800000u; PGXP_ALU(0x3C021F80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003C28u); #endif label_BFC21C00: #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 /* 0xBFC21C00: 90431040 lbu $v1, 4160($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4160; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (4160)), 3, 0x4u); PGXP_LOAD(0x90431040u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003C2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C30u); cpu->pc = 0x00003C30u; return; /* fallthrough */ } void OpenBIOS_func_00003C30(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C30u); int psx_delay_BFC21C08 = 0; int psx_taken_BFC21C08 = 0; label_BFC21C04: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C30u); #endif #ifdef PSX_COSIM cosim_block(0x00003C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21C04: 2402005A addiu $v0, $zero, 90 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (90)); PGXP_ALU(0x2402005Au, cpu->gpr[2], _pgx1, 0x0000005Au); } #ifdef PSX_COSIM cosim_instr(0x00003C30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21C08: 1462005B bne $v1, $v0, 0xBFC21D78 */ uint32_t psx_brA_BFC21C08 = cpu->gpr[3]; uint32_t psx_brB_BFC21C08 = cpu->gpr[2]; psx_taken_BFC21C08 = (psx_brA_BFC21C08 != psx_brB_BFC21C08); /* DELAY (orphaned) 0xBFC21C0C: 00108040 sll $s0, $s0, 1 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[16] << 1u; PGXP_ALU(0x00108040u, cpu->gpr[16], _pgx1, 1u); } if (psx_taken_BFC21C08) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DA4u); cpu->pc = 0x00003DA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C3Cu); cpu->pc = 0x00003C3Cu; return; } void OpenBIOS_func_00003C38(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C38u); if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21C10u: goto label_BFC21C10; default: break; } } label_BFC21C0C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C38u); #endif #ifdef PSX_COSIM cosim_block(0x00003C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21C0C: 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(0x00003C38u); #endif label_BFC21C10: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C3Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x50000u); #endif /* 0xBFC21C10: 02508021 addu $s0, $s2, $s0 */ { uint32_t _pgx1 = cpu->gpr[18]; uint32_t _pgx2 = cpu->gpr[16]; cpu->gpr[16] = cpu->gpr[18] + cpu->gpr[16]; PGXP_ALU(0x02508021u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003C3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C40u); cpu->pc = 0x00003C40u; return; /* fallthrough */ } void OpenBIOS_func_00003C40(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C40u); label_BFC21C14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C40u); #endif #ifdef PSX_COSIM cosim_block(0x00003C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21C14: 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(0x00003C40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x800000u); #endif /* 0xBFC21C18: 3C17BF80 lui $s7, 0xBF80 */ cpu->gpr[23] = 0xBF800000u; PGXP_ALU(0x3C17BF80u, cpu->gpr[23], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003C44u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C48u); cpu->pc = 0x00003C48u; return; /* fallthrough */ } void OpenBIOS_func_00003C48(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C48u); label_BFC21C1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C48u); #endif #ifdef PSX_COSIM cosim_block(0x00003C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C48u); #endif /* 0xBFC21C1C: 8EE31070 lw $v1, 4208($s7) */ { uint32_t _pgxa = cpu->gpr[23] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[23] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C48u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x800000u); } PGXP_LOAD(0x8EE31070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003C48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C4Cu); cpu->pc = 0x00003C4Cu; return; /* fallthrough */ } void OpenBIOS_func_00003C4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C4Cu); int psx_delay_BFC21C28 = 0; int psx_taken_BFC21C28 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21C30u: goto label_BFC21C30; default: break; } } label_BFC21C20: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C4Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C4Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C20: 00000000 nop */ /* nop */ #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, 0x8u); #endif /* 0xBFC21C24: 30630080 andi $v1, $v1, 0x80 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] & 0x80u; PGXP_ALU(0x30630080u, cpu->gpr[3], _pgx1, 0x0080u); } #ifdef PSX_COSIM cosim_instr(0x00003C50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21C28: 10600064 beq $v1, $zero, 0xBFC21DBC */ uint32_t psx_brA_BFC21C28 = cpu->gpr[3]; uint32_t psx_brB_BFC21C28 = cpu->gpr[0]; psx_taken_BFC21C28 = (psx_brA_BFC21C28 == psx_brB_BFC21C28); psx_delay_BFC21C28 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21C2C: 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(0x00003C58u); #endif if (psx_delay_BFC21C28) { psx_delay_BFC21C28 = 0; if (psx_taken_BFC21C28) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DE8u); cpu->pc = 0x00003DE8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C5Cu); } label_BFC21C30: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C5Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21C30: 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(0x00003C5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C60u); cpu->pc = 0x00003C60u; return; /* fallthrough */ } void OpenBIOS_func_00003C60(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C60u); int psx_delay_BFC21C40 = 0; int psx_taken_BFC21C40 = 0; label_BFC21C34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C60u); #endif #ifdef PSX_COSIM cosim_block(0x00003C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21C34: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003C60u); #endif /* 0xBFC21C38: 8CA2AEEC lw $v0, -20756($a1) */ { uint32_t _pgxa = cpu->gpr[5] + -20756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-20756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003C64u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA2AEECu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C3C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003C68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21C40: 10400064 beq $v0, $zero, 0xBFC21DD4 */ uint32_t psx_brA_BFC21C40 = cpu->gpr[2]; uint32_t psx_brB_BFC21C40 = cpu->gpr[0]; psx_taken_BFC21C40 = (psx_brA_BFC21C40 == psx_brB_BFC21C40); /* DELAY (orphaned) 0xBFC21C44: 3C1E1F80 lui $fp, 0x1F80 */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif cpu->gpr[30] = 0x1F800000u; PGXP_ALU(0x3C1E1F80u, cpu->gpr[30], 0u, 0u); if (psx_taken_BFC21C40) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E00u); cpu->pc = 0x00003E00u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C74u); cpu->pc = 0x00003C74u; return; } void OpenBIOS_func_00003C70(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003C70u); int psx_delay_BFC21C60 = 0; int psx_delay_BFC21C94 = 0; int psx_taken_BFC21C94 = 0; int psx_delay_BFC21CB8 = 0; int psx_taken_BFC21CB8 = 0; int psx_delay_BFC21CCC = 0; int psx_taken_BFC21CCC = 0; int psx_delay_BFC21CE8 = 0; int psx_delay_BFC21D14 = 0; int psx_taken_BFC21D14 = 0; int psx_delay_BFC21D24 = 0; int psx_taken_BFC21D24 = 0; int psx_delay_BFC21D68 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21C48u: goto label_BFC21C48; case 0xBFC21C54u: goto label_BFC21C54; case 0xBFC21C88u: goto label_BFC21C88; case 0xBFC21CACu: goto label_BFC21CAC; case 0xBFC21CE4u: goto label_BFC21CE4; case 0xBFC21C68u: goto label_BFC21C68; case 0xBFC21C9Cu: goto label_BFC21C9C; case 0xBFC21CC0u: goto label_BFC21CC0; case 0xBFC21CD4u: goto label_BFC21CD4; case 0xBFC21CF0u: goto label_BFC21CF0; case 0xBFC21D08u: goto label_BFC21D08; case 0xBFC21D1Cu: goto label_BFC21D1C; case 0xBFC21D2Cu: goto label_BFC21D2C; default: break; } } label_BFC21C44: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C70u); #endif #ifdef PSX_COSIM cosim_block(0x00003C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC21C44: 3C1E1F80 lui $fp, 0x1F80 */ cpu->gpr[30] = 0x1F800000u; PGXP_ALU(0x3C1E1F80u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003C70u); #endif label_BFC21C48: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C74u); #endif #ifdef PSX_COSIM cosim_block(0x00003C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C74u); #endif /* 0xBFC21C48: 92620001 lbu $v0, 1($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (1)), 2, 0x80000u); PGXP_LOAD(0x92620001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C4C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003C78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC21C50: 02221024 and $v0, $s1, $v0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2]; PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003C7Cu); #endif label_BFC21C54: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C80u); #endif #ifdef PSX_COSIM cosim_block(0x00003C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC21C54: AFA50010 sw $a1, 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, 0x00003C80u); return; } g_debug_last_store_pc = 0x00003C80u; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003C80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21C58: 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(0x00003C84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC21C5C: A3C21040 sb $v0, 4160($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003C88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[30] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA3C21040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21C60: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003C94u; /* jal link before delay slot */ psx_delay_BFC21C60 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C64: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003C90u); #endif if (psx_delay_BFC21C60) { psx_delay_BFC21C60 = 0; cpu->gpr[31] = 0x00003C94u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21C68: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003C94u); #endif #ifdef PSX_COSIM cosim_block(0x00003C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003C94u); #endif /* 0xBFC21C68: 97C2104A lhu $v0, 4170($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003C94u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x97C2104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003C94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21C6C: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003C98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21C70: 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(0x00003C9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC21C74: A7C2104A sh $v0, 4170($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003CA0u); return; } g_debug_last_store_pc = 0x00003CA0u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA7C2104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21C78: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003CA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21C7C: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CA8u); return; } g_debug_last_store_pc = 0x00003CA8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003CA8u); #endif /* 0xBFC21C80: 8FA50010 lw $a1, 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, 0x00003CACu); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x20000000u); } PGXP_LOAD(0x8FA50010u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003CACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21C84: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003CB0u); #endif label_BFC21C88: #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 /* 0xBFC21C88: 97C21044 lhu $v0, 4164($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003CB4u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x97C21044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C8C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003CB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21C90: 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(0x00003CBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21C94: 10400054 beq $v0, $zero, 0xBFC21DE8 */ uint32_t psx_brA_BFC21C94 = cpu->gpr[2]; uint32_t psx_brB_BFC21C94 = cpu->gpr[0]; psx_taken_BFC21C94 = (psx_brA_BFC21C94 == psx_brB_BFC21C94); psx_delay_BFC21C94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21C98: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003CC4u); #endif if (psx_delay_BFC21C94) { psx_delay_BFC21C94 = 0; if (psx_taken_BFC21C94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E14u); cpu->pc = 0x00003E14u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003CC8u); } label_BFC21C9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003CC8u); #endif #ifdef PSX_COSIM cosim_block(0x00003CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CC8u); #endif /* 0xBFC21C9C: 93C21040 lbu $v0, 4160($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[30] + (4160)), 2, 0x40000000u); PGXP_LOAD(0x93C21040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21CA0: 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(0x00003CCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC21CA4: A2420002 sb $v0, 2($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 2; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003CD0u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (2)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2420002u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21CA8: 3C04BF80 lui $a0, 0xBF80 */ cpu->gpr[4] = 0xBF800000u; PGXP_ALU(0x3C04BF80u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003CD4u); #endif label_BFC21CAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003CD8u); #endif #ifdef PSX_COSIM cosim_block(0x00003CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CD8u); #endif /* 0xBFC21CAC: 8C821070 lw $v0, 4208($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 4208; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CD8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x8C821070u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21CB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003CDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21CB4: 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(0x00003CE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21CB8: 10400058 beq $v0, $zero, 0xBFC21E1C */ uint32_t psx_brA_BFC21CB8 = cpu->gpr[2]; uint32_t psx_brB_BFC21CB8 = cpu->gpr[0]; psx_taken_BFC21CB8 = (psx_brA_BFC21CB8 == psx_brB_BFC21CB8); psx_delay_BFC21CB8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21CBC: 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(0x00003CE8u); #endif if (psx_delay_BFC21CB8) { psx_delay_BFC21CB8 = 0; if (psx_taken_BFC21CB8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E48u); cpu->pc = 0x00003E48u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003CECu); } label_BFC21CC0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003CECu); #endif #ifdef PSX_COSIM cosim_block(0x00003CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21CC0: 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(0x00003CECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003CF0u); #endif /* 0xBFC21CC4: 8CA2AEEC lw $v0, -20756($a1) */ { uint32_t _pgxa = cpu->gpr[5] + -20756; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[5] + (-20756)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003CF0u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x20u); } PGXP_LOAD(0x8CA2AEECu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003CF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21CC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003CF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21CCC: 10400057 beq $v0, $zero, 0xBFC21E2C */ uint32_t psx_brA_BFC21CCC = cpu->gpr[2]; uint32_t psx_brB_BFC21CCC = cpu->gpr[0]; psx_taken_BFC21CCC = (psx_brA_BFC21CCC == psx_brB_BFC21CCC); psx_delay_BFC21CCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000u); #endif /* 0xBFC21CD0: 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(0x00003CFCu); #endif if (psx_delay_BFC21CCC) { psx_delay_BFC21CCC = 0; if (psx_taken_BFC21CCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E58u); cpu->pc = 0x00003E58u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D00u); } label_BFC21CD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D00u); #endif #ifdef PSX_COSIM cosim_block(0x00003D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D00u); #endif /* 0xBFC21CD4: 92620000 lbu $v0, 0($s3) */ { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 2, 0x80000u); PGXP_LOAD(0x92620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21CD8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003D04u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC21CDC: 02221024 and $v0, $s1, $v0 */ { uint32_t _pgx1 = cpu->gpr[17]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[17] & cpu->gpr[2]; PGXP_ALU(0x02221024u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003D08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC21CE0: 3C1E1F80 lui $fp, 0x1F80 */ cpu->gpr[30] = 0x1F800000u; PGXP_ALU(0x3C1E1F80u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003D0Cu); #endif label_BFC21CE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D10u); #endif #ifdef PSX_COSIM cosim_block(0x00003D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC21CE4: A3C21040 sb $v0, 4160($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4160; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003D10u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[30] + (4160)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA3C21040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21CE8: 0C000AC8 jal 0xB0002B20 */ cpu->gpr[31] = 0x00003D1Cu; /* jal link before delay slot */ psx_delay_BFC21CE8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21CEC: 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(0x00003D18u); #endif if (psx_delay_BFC21CE8) { psx_delay_BFC21CE8 = 0; cpu->gpr[31] = 0x00003D1Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B20u); cpu->pc = 0x00002B20u; return; } label_BFC21CF0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D1Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003D1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D1Cu); #endif /* 0xBFC21CF0: 97C2104A lhu $v0, 4170($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4170; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003D1Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x97C2104Au, _pgxa, cpu->gpr[2]); } #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, 0x9u); #endif /* 0xBFC21CF4: 2403FF7F addiu $v1, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2403FF7Fu, cpu->gpr[3], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003D20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21CF8: 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(0x00003D24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000004u); #endif /* 0xBFC21CFC: A7C2104A sh $v0, 4170($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003D28u); return; } g_debug_last_store_pc = 0x00003D28u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA7C2104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21D00: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC21D04: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003D30u); return; } g_debug_last_store_pc = 0x00003D30u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003D30u); #endif label_BFC21D08: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D34u); #endif #ifdef PSX_COSIM cosim_block(0x00003D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D34u); #endif /* 0xBFC21D08: 97C21044 lhu $v0, 4164($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003D34u); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x40000000u); } PGXP_LOAD(0x97C21044u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21D0C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003D38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21D10: 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(0x00003D3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21D14: 1040FFFC beq $v0, $zero, 0xBFC21D08 */ uint32_t psx_brA_BFC21D14 = cpu->gpr[2]; uint32_t psx_brB_BFC21D14 = cpu->gpr[0]; psx_taken_BFC21D14 = (psx_brA_BFC21D14 == psx_brB_BFC21D14); psx_delay_BFC21D14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21D18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003D44u); #endif if (psx_delay_BFC21D14) { psx_delay_BFC21D14 = 0; if (psx_taken_BFC21D14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D34u); goto label_BFC21D08; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D48u); } label_BFC21D1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D48u); #endif #ifdef PSX_COSIM cosim_block(0x00003D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D48u); #endif /* 0xBFC21D1C: 93C21040 lbu $v0, 4160($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4160; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[30] + (4160)), 2, 0x40000000u); PGXP_LOAD(0x93C21040u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC21D20: 26520002 addiu $s2, $s2, 2 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[18] = (uint32_t)((int32_t)cpu->gpr[18] + (2)); PGXP_ALU(0x26520002u, cpu->gpr[18], _pgx1, 0x00000002u); } #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, 0x50000u); #endif /* 0xBFC21D24: 16500029 bne $s2, $s0, 0xBFC21DCC */ uint32_t psx_brA_BFC21D24 = cpu->gpr[18]; uint32_t psx_brB_BFC21D24 = cpu->gpr[16]; psx_taken_BFC21D24 = (psx_brA_BFC21D24 != psx_brB_BFC21D24); psx_delay_BFC21D24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40004u); #endif /* 0xBFC21D28: A2420001 sb $v0, 1($s2) */ { uint32_t _pgxa = cpu->gpr[18] + 1; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003D54u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[18] + (1)), (uint8_t)(cpu->gpr[2] & 0xFFu)); PGXP_STORE(0xA2420001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003D54u); #endif if (psx_delay_BFC21D24) { psx_delay_BFC21D24 = 0; if (psx_taken_BFC21D24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DF8u); cpu->pc = 0x00003DF8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D58u); } label_BFC21D2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D58u); #endif #ifdef PSX_COSIM cosim_block(0x00003D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x300000u); #endif /* 0xBFC21D2C: 0295A021 addu $s4, $s4, $s5 */ { uint32_t _pgx1 = cpu->gpr[20]; uint32_t _pgx2 = cpu->gpr[21]; cpu->gpr[20] = cpu->gpr[20] + cpu->gpr[21]; PGXP_ALU(0x0295A021u, cpu->gpr[20], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003D58u); #endif /* 0xBFC21D30: 8E820000 lw $v0, 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, 0x00003D5Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x100000u); } PGXP_LOAD(0x8E820000u, _pgxa, cpu->gpr[2]); } #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 /* 0xBFC21D34: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003D60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21D38: A0400000 sb $zero, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003D64u; 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(0x00003D64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000001u); #endif /* 0xBFC21D3C: A7C0104A sh $zero, 4170($fp) */ { uint32_t _pgxa = cpu->gpr[30] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[30] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003D68u); return; } g_debug_last_store_pc = 0x00003D68u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA7C0104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003D68u); #endif /* 0xBFC21D40: 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, 0x00003D6Cu); 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(0x00003D6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D70u); #endif /* 0xBFC21D44: 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, 0x00003D70u); 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(0x00003D70u); #endif /* 0xBFC21D48: 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, 0x00003D74u); 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(0x00003D74u); #endif /* 0xBFC21D4C: 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, 0x00003D78u); 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(0x00003D78u); #endif /* 0xBFC21D50: 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, 0x00003D7Cu); 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(0x00003D7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D80u); #endif /* 0xBFC21D54: 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, 0x00003D80u); 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(0x00003D80u); #endif /* 0xBFC21D58: 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, 0x00003D84u); 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(0x00003D84u); #endif /* 0xBFC21D5C: 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, 0x00003D88u); 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(0x00003D88u); #endif /* 0xBFC21D60: 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, 0x00003D8Cu); 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(0x00003D8Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D90u); #endif /* 0xBFC21D64: 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, 0x00003D90u); 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(0x00003D90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21D68: 03E00008 jr $ra */ psx_delay_BFC21D68 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21D6C: 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(0x00003D98u); #endif if (psx_delay_BFC21D68) { psx_delay_BFC21D68 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00003D9C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003D9Cu); int psx_delay_BFC21D70 = 0; int psx_taken_BFC21D70 = 0; int psx_delay_BFC21DA4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21D78u: goto label_BFC21D78; default: break; } } label_BFC21D70: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003D9Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003D9Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21D70: 1460FF70 bne $v1, $zero, 0xBFC21B34 */ uint32_t psx_brA_BFC21D70 = cpu->gpr[3]; uint32_t psx_brB_BFC21D70 = cpu->gpr[0]; psx_taken_BFC21D70 = (psx_brA_BFC21D70 != psx_brB_BFC21D70); psx_delay_BFC21D70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21D74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003DA0u); #endif if (psx_delay_BFC21D70) { psx_delay_BFC21D70 = 0; if (psx_taken_BFC21D70) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003B60u); cpu->pc = 0x00003B60u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DA4u); } label_BFC21D78: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003DA4u); #endif #ifdef PSX_COSIM cosim_block(0x00003DA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DA4u); #endif /* 0xBFC21D78: 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, 0x00003DA4u); 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(0x00003DA4u); #endif /* 0xBFC21D7C: 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, 0x00003DA8u); 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(0x00003DA8u); #endif /* 0xBFC21D80: 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, 0x00003DACu); 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(0x00003DACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DB0u); #endif /* 0xBFC21D84: 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, 0x00003DB0u); 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(0x00003DB0u); #endif /* 0xBFC21D88: 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, 0x00003DB4u); 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(0x00003DB4u); #endif /* 0xBFC21D8C: 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, 0x00003DB8u); 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(0x00003DB8u); #endif /* 0xBFC21D90: 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, 0x00003DBCu); 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(0x00003DBCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DC0u); #endif /* 0xBFC21D94: 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, 0x00003DC0u); 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(0x00003DC0u); #endif /* 0xBFC21D98: 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, 0x00003DC4u); 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(0x00003DC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x400011u); #endif /* 0xBFC21D9C: 02C02025 or $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(0x02C02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003DC8u); #endif /* 0xBFC21DA0: 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, 0x00003DCCu); 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(0x00003DCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC21DA4: 08000DD2 j 0xB0003748 */ psx_delay_BFC21DA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21DA8: 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(0x00003DD4u); #endif if (psx_delay_BFC21DA4) { psx_delay_BFC21DA4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003748u); cpu->pc = 0x00003748u; return; } } void OpenBIOS_func_00003DD8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003DD8u); int psx_delay_BFC21DAC = 0; int psx_taken_BFC21DAC = 0; int psx_delay_BFC21DB4 = 0; int psx_taken_BFC21DB4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21DB4u: goto label_BFC21DB4; default: break; } } label_BFC21DAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003DD8u); #endif #ifdef PSX_COSIM cosim_block(0x00003DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DD8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21DAC: 1460FF7F bne $v1, $zero, 0xBFC21BAC */ uint32_t psx_brA_BFC21DAC = cpu->gpr[3]; uint32_t psx_brB_BFC21DAC = cpu->gpr[0]; psx_taken_BFC21DAC = (psx_brA_BFC21DAC != psx_brB_BFC21DAC); psx_delay_BFC21DAC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DB0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003DDCu); #endif if (psx_delay_BFC21DAC) { psx_delay_BFC21DAC = 0; if (psx_taken_BFC21DAC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003BD8u); cpu->pc = 0x00003BD8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DE0u); } label_BFC21DB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003DE0u); #endif #ifdef PSX_COSIM cosim_block(0x00003DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DB4: 1000FFF0 beq $zero, $zero, 0xBFC21D78 */ uint32_t psx_brA_BFC21DB4 = cpu->gpr[0]; 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, 0x1u); #endif /* 0xBFC21DB8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003DE4u); #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, 0x00003DA4u); cpu->pc = 0x00003DA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DE8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DE8u); cpu->pc = 0x00003DE8u; return; /* fallthrough */ } void OpenBIOS_func_00003DE8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003DE8u); int psx_delay_BFC21DBC = 0; int psx_taken_BFC21DBC = 0; int psx_delay_BFC21DC4 = 0; int psx_taken_BFC21DC4 = 0; int psx_delay_BFC21DCC = 0; int psx_taken_BFC21DCC = 0; int psx_delay_BFC21DD4 = 0; int psx_taken_BFC21DD4 = 0; int psx_delay_BFC21DE0 = 0; int psx_taken_BFC21DE0 = 0; int psx_delay_BFC21DF4 = 0; int psx_taken_BFC21DF4 = 0; int psx_delay_BFC21E0C = 0; int psx_taken_BFC21E0C = 0; int psx_delay_BFC21E14 = 0; int psx_taken_BFC21E14 = 0; int psx_delay_BFC21E1C = 0; int psx_taken_BFC21E1C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21DCCu: goto label_BFC21DCC; case 0xBFC21DD4u: goto label_BFC21DD4; case 0xBFC21DE8u: goto label_BFC21DE8; case 0xBFC21E1Cu: goto label_BFC21E1C; case 0xBFC21DC4u: goto label_BFC21DC4; case 0xBFC21DDCu: goto label_BFC21DDC; case 0xBFC21DFCu: goto label_BFC21DFC; case 0xBFC21E00u: goto label_BFC21E00; case 0xBFC21E14u: goto label_BFC21E14; default: break; } } label_BFC21DBC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003DE8u); #endif #ifdef PSX_COSIM cosim_block(0x00003DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21DBC: 1440FF97 bne $v0, $zero, 0xBFC21C1C */ uint32_t psx_brA_BFC21DBC = cpu->gpr[2]; uint32_t psx_brB_BFC21DBC = cpu->gpr[0]; psx_taken_BFC21DBC = (psx_brA_BFC21DBC != psx_brB_BFC21DBC); psx_delay_BFC21DBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DC0: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003DECu); #endif if (psx_delay_BFC21DBC) { psx_delay_BFC21DBC = 0; if (psx_taken_BFC21DBC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C48u); cpu->pc = 0x00003C48u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DF0u); } label_BFC21DC4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003DF0u); #endif #ifdef PSX_COSIM cosim_block(0x00003DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003DF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DC4: 1000FFEC beq $zero, $zero, 0xBFC21D78 */ uint32_t psx_brA_BFC21DC4 = cpu->gpr[0]; uint32_t psx_brB_BFC21DC4 = cpu->gpr[0]; psx_taken_BFC21DC4 = (psx_brA_BFC21DC4 == psx_brB_BFC21DC4); psx_delay_BFC21DC4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DC8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003DF4u); #endif if (psx_delay_BFC21DC4) { psx_delay_BFC21DC4 = 0; if (psx_taken_BFC21DC4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DA4u); cpu->pc = 0x00003DA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DF8u); } label_BFC21DCC: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DCC: 1000FF93 beq $zero, $zero, 0xBFC21C1C */ uint32_t psx_brA_BFC21DCC = cpu->gpr[0]; uint32_t psx_brB_BFC21DCC = cpu->gpr[0]; psx_taken_BFC21DCC = (psx_brA_BFC21DCC == psx_brB_BFC21DCC); psx_delay_BFC21DCC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21DD0: 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(0x00003DFCu); #endif if (psx_delay_BFC21DCC) { psx_delay_BFC21DCC = 0; if (psx_taken_BFC21DCC) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C48u); cpu->pc = 0x00003C48u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E00u); } label_BFC21DD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E00u); #endif #ifdef PSX_COSIM cosim_block(0x00003E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21DD4: 1220FF9F beq $s1, $zero, 0xBFC21C54 */ uint32_t psx_brA_BFC21DD4 = cpu->gpr[17]; uint32_t psx_brB_BFC21DD4 = cpu->gpr[0]; psx_taken_BFC21DD4 = (psx_brA_BFC21DD4 == psx_brB_BFC21DD4); psx_delay_BFC21DD4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DD8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E04u); #endif if (psx_delay_BFC21DD4) { psx_delay_BFC21DD4 = 0; if (psx_taken_BFC21DD4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C80u); cpu->pc = 0x00003C80u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E08u); } label_BFC21DDC: #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 /* 0xBFC21DDC: 92620001 lbu $v0, 1($s3) */ { uint32_t _pgxa = cpu->gpr[19] + 1; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (1)), 2, 0x80000u); PGXP_LOAD(0x92620001u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003E08u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DE0: 1000FF9C beq $zero, $zero, 0xBFC21C54 */ uint32_t psx_brA_BFC21DE0 = cpu->gpr[0]; uint32_t psx_brB_BFC21DE0 = cpu->gpr[0]; psx_taken_BFC21DE0 = (psx_brA_BFC21DE0 == psx_brB_BFC21DE0); psx_delay_BFC21DE0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21DE4: 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(0x00003E10u); #endif if (psx_delay_BFC21DE0) { psx_delay_BFC21DE0 = 0; if (psx_taken_BFC21DE0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003C80u); cpu->pc = 0x00003C80u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E14u); } label_BFC21DE8: #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 /* 0xBFC21DE8: 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, 0x00003E14u); 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(0x00003E14u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DEC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21DF0: 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(0x00003E1Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21DF4: 1040FFA4 beq $v0, $zero, 0xBFC21C88 */ uint32_t psx_brA_BFC21DF4 = cpu->gpr[2]; uint32_t psx_brB_BFC21DF4 = cpu->gpr[0]; psx_taken_BFC21DF4 = (psx_brA_BFC21DF4 == psx_brB_BFC21DF4); psx_delay_BFC21DF4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21DF8: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E24u); #endif if (psx_delay_BFC21DF4) { psx_delay_BFC21DF4 = 0; if (psx_taken_BFC21DF4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003CB4u); cpu->pc = 0x00003CB4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E28u); } label_BFC21DFC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E28u); #endif #ifdef PSX_COSIM cosim_block(0x00003E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E28u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21DFC: 3C031F80 lui $v1, 0x1F80 */ cpu->gpr[3] = 0x1F800000u; PGXP_ALU(0x3C031F80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003E28u); #endif label_BFC21E00: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E2Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003E2Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E2Cu); #endif /* 0xBFC21E00: 94621044 lhu $v0, 4164($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4164; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4164)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003E2Cu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x94621044u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC21E04: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E30u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21E08: 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(0x00003E34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21E0C: 1040FFFC beq $v0, $zero, 0xBFC21E00 */ uint32_t psx_brA_BFC21E0C = cpu->gpr[2]; uint32_t psx_brB_BFC21E0C = cpu->gpr[0]; psx_taken_BFC21E0C = (psx_brA_BFC21E0C == psx_brB_BFC21E0C); psx_delay_BFC21E0C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E10: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E3Cu); #endif if (psx_delay_BFC21E0C) { psx_delay_BFC21E0C = 0; if (psx_taken_BFC21E0C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E2Cu); goto label_BFC21E00; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E40u); } label_BFC21E14: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E40u); #endif #ifdef PSX_COSIM cosim_block(0x00003E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E14: 1000FFD8 beq $zero, $zero, 0xBFC21D78 */ uint32_t psx_brA_BFC21E14 = cpu->gpr[0]; uint32_t psx_brB_BFC21E14 = cpu->gpr[0]; psx_taken_BFC21E14 = (psx_brA_BFC21E14 == psx_brB_BFC21E14); psx_delay_BFC21E14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E18: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E44u); #endif if (psx_delay_BFC21E14) { psx_delay_BFC21E14 = 0; if (psx_taken_BFC21E14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DA4u); cpu->pc = 0x00003DA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E48u); } label_BFC21E1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E48u); #endif #ifdef PSX_COSIM cosim_block(0x00003E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21E1C: 1460FFA3 bne $v1, $zero, 0xBFC21CAC */ uint32_t psx_brA_BFC21E1C = cpu->gpr[3]; uint32_t psx_brB_BFC21E1C = cpu->gpr[0]; psx_taken_BFC21E1C = (psx_brA_BFC21E1C != psx_brB_BFC21E1C); /* DELAY (orphaned) 0xBFC21E20: 00000000 nop */ #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* nop */ if (psx_taken_BFC21E1C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003CD8u); cpu->pc = 0x00003CD8u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E50u); cpu->pc = 0x00003E50u; return; } void OpenBIOS_func_00003E4C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003E4Cu); int psx_delay_BFC21E24 = 0; int psx_taken_BFC21E24 = 0; int psx_delay_BFC21E2C = 0; int psx_taken_BFC21E2C = 0; int psx_delay_BFC21E38 = 0; int psx_taken_BFC21E38 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21E24u: goto label_BFC21E24; case 0xBFC21E2Cu: goto label_BFC21E2C; case 0xBFC21E34u: goto label_BFC21E34; default: break; } } label_BFC21E20: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E20: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E4Cu); #endif label_BFC21E24: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E50u); #endif #ifdef PSX_COSIM cosim_block(0x00003E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E24: 1000FFD4 beq $zero, $zero, 0xBFC21D78 */ uint32_t psx_brA_BFC21E24 = cpu->gpr[0]; uint32_t psx_brB_BFC21E24 = cpu->gpr[0]; psx_taken_BFC21E24 = (psx_brA_BFC21E24 == psx_brB_BFC21E24); psx_delay_BFC21E24 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E28: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003E54u); #endif if (psx_delay_BFC21E24) { psx_delay_BFC21E24 = 0; if (psx_taken_BFC21E24) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003DA4u); cpu->pc = 0x00003DA4u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E58u); } label_BFC21E2C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E58u); #endif #ifdef PSX_COSIM cosim_block(0x00003E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21E2C: 1220FFAD beq $s1, $zero, 0xBFC21CE4 */ uint32_t psx_brA_BFC21E2C = cpu->gpr[17]; uint32_t psx_brB_BFC21E2C = cpu->gpr[0]; psx_taken_BFC21E2C = (psx_brA_BFC21E2C == psx_brB_BFC21E2C); psx_delay_BFC21E2C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000000u); #endif /* 0xBFC21E30: 3C1E1F80 lui $fp, 0x1F80 */ cpu->gpr[30] = 0x1F800000u; PGXP_ALU(0x3C1E1F80u, cpu->gpr[30], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003E5Cu); #endif if (psx_delay_BFC21E2C) { psx_delay_BFC21E2C = 0; if (psx_taken_BFC21E2C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D10u); cpu->pc = 0x00003D10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E60u); } label_BFC21E34: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E60u); #endif #ifdef PSX_COSIM cosim_block(0x00003E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E60u); #endif /* 0xBFC21E34: 92620000 lbu $v0, 0($s3) */ { uint32_t _pgxa = cpu->gpr[19]; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[19] + (0)), 2, 0x80000u); PGXP_LOAD(0x92620000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003E60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E38: 1000FFAA beq $zero, $zero, 0xBFC21CE4 */ uint32_t psx_brA_BFC21E38 = cpu->gpr[0]; uint32_t psx_brB_BFC21E38 = cpu->gpr[0]; psx_taken_BFC21E38 = (psx_brA_BFC21E38 == psx_brB_BFC21E38); psx_delay_BFC21E38 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21E3C: 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(0x00003E68u); #endif if (psx_delay_BFC21E38) { psx_delay_BFC21E38 = 0; if (psx_taken_BFC21E38) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003D10u); cpu->pc = 0x00003D10u; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E6Cu); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E6Cu); cpu->pc = 0x00003E6Cu; return; /* fallthrough */ } void OpenBIOS_func_00003E6C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00003E6Cu); int psx_delay_BFC21E54 = 0; int psx_taken_BFC21E54 = 0; int psx_delay_BFC21E5C = 0; int psx_delay_BFC21E64 = 0; int psx_delay_BFC21E78 = 0; int psx_taken_BFC21E78 = 0; int psx_delay_BFC21E80 = 0; int psx_delay_BFC21E94 = 0; int psx_taken_BFC21E94 = 0; int psx_delay_BFC21EA4 = 0; int psx_taken_BFC21EA4 = 0; int psx_delay_BFC21EC0 = 0; int psx_taken_BFC21EC0 = 0; int psx_delay_BFC21ECC = 0; int psx_delay_BFC21ED8 = 0; int psx_delay_BFC21EE4 = 0; int psx_delay_BFC21EF0 = 0; int psx_delay_BFC21EFC = 0; int psx_delay_BFC21F14 = 0; int psx_taken_BFC21F14 = 0; int psx_delay_BFC21F70 = 0; int psx_delay_BFC21F7C = 0; int psx_delay_BFC21F8C = 0; int psx_delay_BFC21FBC = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21FB0u: goto label_BFC21FB0; case 0xBFC21E5Cu: goto label_BFC21E5C; case 0xBFC21E64u: goto label_BFC21E64; case 0xBFC21E6Cu: goto label_BFC21E6C; case 0xBFC21E80u: goto label_BFC21E80; case 0xBFC21E88u: goto label_BFC21E88; case 0xBFC21E9Cu: goto label_BFC21E9C; case 0xBFC21EACu: goto label_BFC21EAC; case 0xBFC21EB4u: goto label_BFC21EB4; case 0xBFC21EC8u: goto label_BFC21EC8; case 0xBFC21ED4u: goto label_BFC21ED4; case 0xBFC21EE0u: goto label_BFC21EE0; case 0xBFC21EECu: goto label_BFC21EEC; case 0xBFC21EF8u: goto label_BFC21EF8; case 0xBFC21F04u: goto label_BFC21F04; case 0xBFC21F1Cu: goto label_BFC21F1C; case 0xBFC21F78u: goto label_BFC21F78; case 0xBFC21F84u: goto label_BFC21F84; case 0xBFC21F94u: goto label_BFC21F94; case 0xBFC21FC4u: goto label_BFC21FC4; default: break; } } label_BFC21E40: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E6Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21E40: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003E6Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E70u); #endif /* 0xBFC21E44: 8C42AEE8 lw $v0, -20760($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20760; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E70u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AEE8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003E70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21E48: 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(0x00003E74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC21E4C: 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, 0x00003E78u); return; } g_debug_last_store_pc = 0x00003E78u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003E78u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC21E50: 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, 0x00003E7Cu); return; } g_debug_last_store_pc = 0x00003E7Cu; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x00003E7Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21E54: 1040000C beq $v0, $zero, 0xBFC21E88 */ uint32_t psx_brA_BFC21E54 = cpu->gpr[2]; 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, 0x20010000u); #endif /* 0xBFC21E58: 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, 0x00003E84u); return; } g_debug_last_store_pc = 0x00003E84u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00003E84u); #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, 0x00003EB4u); goto label_BFC21E88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003E88u); } label_BFC21E5C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E88u); #endif #ifdef PSX_COSIM cosim_block(0x00003E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21E5C: 0C000E93 jal 0xB0003A4C */ cpu->gpr[31] = 0x00003E90u; /* jal link before delay slot */ psx_delay_BFC21E5C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21E60: 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(0x00003E8Cu); #endif if (psx_delay_BFC21E5C) { psx_delay_BFC21E5C = 0; cpu->gpr[31] = 0x00003E90u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003A4Cu); cpu->pc = 0x00003A4Cu; return; } label_BFC21E64: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E90u); #endif #ifdef PSX_COSIM cosim_block(0x00003E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21E64: 0C000E93 jal 0xB0003A4C */ cpu->gpr[31] = 0x00003E98u; /* jal link before delay slot */ psx_delay_BFC21E64 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21E68: 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(0x00003E94u); #endif if (psx_delay_BFC21E64) { psx_delay_BFC21E64 = 0; cpu->gpr[31] = 0x00003E98u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003A4Cu); cpu->pc = 0x00003A4Cu; return; } label_BFC21E6C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003E98u); #endif #ifdef PSX_COSIM cosim_block(0x00003E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003E98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21E6C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003E98u); #endif /* 0xBFC21E70: 8C424C64 lw $v0, 19556($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003E9Cu); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C424C64u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC21E74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003EA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21E78: 10400003 beq $v0, $zero, 0xBFC21E88 */ uint32_t psx_brA_BFC21E78 = cpu->gpr[2]; uint32_t psx_brB_BFC21E78 = cpu->gpr[0]; psx_taken_BFC21E78 = (psx_brA_BFC21E78 == psx_brB_BFC21E78); psx_delay_BFC21E78 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E7C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003EA8u); #endif if (psx_delay_BFC21E78) { psx_delay_BFC21E78 = 0; if (psx_taken_BFC21E78) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EB4u); goto label_BFC21E88; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EACu); } label_BFC21E80: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003EACu); #endif #ifdef PSX_COSIM cosim_block(0x00003EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21E80: 0C001169 jal 0xB00045A4 */ cpu->gpr[31] = 0x00003EB4u; /* jal link before delay slot */ psx_delay_BFC21E80 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E84: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003EB0u); #endif if (psx_delay_BFC21E80) { psx_delay_BFC21E80 = 0; cpu->gpr[31] = 0x00003EB4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000045A4u); cpu->pc = 0x000045A4u; return; } label_BFC21E88: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003EB4u); #endif #ifdef PSX_COSIM cosim_block(0x00003EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21E88: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003EB4u); #endif /* 0xBFC21E8C: 8C42AEF4 lw $v0, -20748($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20748; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20748)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EB8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AEF4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003EB8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21E90: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC21E94: 14400007 bne $v0, $zero, 0xBFC21EB4 */ uint32_t psx_brA_BFC21E94 = cpu->gpr[2]; uint32_t psx_brB_BFC21E94 = cpu->gpr[0]; psx_taken_BFC21E94 = (psx_brA_BFC21E94 != psx_brB_BFC21E94); psx_delay_BFC21E94 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21E98: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003EC4u); #endif if (psx_delay_BFC21E94) { psx_delay_BFC21E94 = 0; if (psx_taken_BFC21E94) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EE0u); goto label_BFC21EB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EC8u); } label_BFC21E9C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003EC8u); #endif #ifdef PSX_COSIM cosim_block(0x00003EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EC8u); #endif /* 0xBFC21E9C: 8C42AEC8 lw $v0, -20792($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EC8u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AEC8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003EC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21EA0: 00000000 nop */ /* nop */ #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, 0x5u); #endif /* 0xBFC21EA4: 10400003 beq $v0, $zero, 0xBFC21EB4 */ uint32_t psx_brA_BFC21EA4 = cpu->gpr[2]; uint32_t psx_brB_BFC21EA4 = cpu->gpr[0]; psx_taken_BFC21EA4 = (psx_brA_BFC21EA4 == psx_brB_BFC21EA4); psx_delay_BFC21EA4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21EA8: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003ED4u); #endif if (psx_delay_BFC21EA4) { psx_delay_BFC21EA4 = 0; if (psx_taken_BFC21EA4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EE0u); goto label_BFC21EB4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003ED8u); } label_BFC21EAC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003ED8u); #endif #ifdef PSX_COSIM cosim_block(0x00003ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21EAC: 2403FFFE addiu $v1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2403FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0x00003ED8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21EB0: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EDCu); return; } g_debug_last_store_pc = 0x00003EDCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003EDCu); #endif label_BFC21EB4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003EE0u); #endif #ifdef PSX_COSIM cosim_block(0x00003EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EE0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21EB4: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003EE0u); #endif /* 0xBFC21EB8: 8C42AEE4 lw $v0, -20764($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20764; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20764)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003EE4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x4u); } PGXP_LOAD(0x8C42AEE4u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003EE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21EBC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003EE8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21EC0: 1040003B beq $v0, $zero, 0xBFC21FB0 */ uint32_t psx_brA_BFC21EC0 = cpu->gpr[2]; uint32_t psx_brB_BFC21EC0 = cpu->gpr[0]; psx_taken_BFC21EC0 = (psx_brA_BFC21EC0 == psx_brB_BFC21EC0); psx_delay_BFC21EC0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21EC4: 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(0x00003EF0u); #endif if (psx_delay_BFC21EC0) { psx_delay_BFC21EC0 = 0; if (psx_taken_BFC21EC0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003FDCu); goto label_BFC21FB0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003EF4u); } label_BFC21EC8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003EF4u); #endif #ifdef PSX_COSIM cosim_block(0x00003EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC21EC8: 3C10F000 lui $s0, 0xF000 */ cpu->gpr[16] = 0xF0000000u; PGXP_ALU(0x3C10F000u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003EF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21ECC: 0C0009B9 jal 0xB00026E4 */ cpu->gpr[31] = 0x00003F00u; /* jal link before delay slot */ psx_delay_BFC21ECC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21ED0: 26040011 addiu $a0, $s0, 17 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[16] + (17)); PGXP_ALU(0x26040011u, cpu->gpr[4], _pgx1, 0x00000011u); } #ifdef PSX_COSIM cosim_instr(0x00003EFCu); #endif if (psx_delay_BFC21ECC) { psx_delay_BFC21ECC = 0; cpu->gpr[31] = 0x00003F00u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; } label_BFC21ED4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003F00u); #endif #ifdef PSX_COSIM cosim_block(0x00003F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21ED4: 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(0x00003F00u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21ED8: 0C0009B9 jal 0xB00026E4 */ cpu->gpr[31] = 0x00003F0Cu; /* jal link before delay slot */ psx_delay_BFC21ED8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21EDC: 36040011 ori $a0, $s0, 0x11 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] | 0x11u; PGXP_ALU(0x36040011u, cpu->gpr[4], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00003F08u); #endif if (psx_delay_BFC21ED8) { psx_delay_BFC21ED8 = 0; cpu->gpr[31] = 0x00003F0Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; } label_BFC21EE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003F0Cu); #endif #ifdef PSX_COSIM cosim_block(0x00003F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21EE0: 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(0x00003F0Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F10u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21EE4: 0C0009B9 jal 0xB00026E4 */ cpu->gpr[31] = 0x00003F18u; /* jal link before delay slot */ psx_delay_BFC21EE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21EE8: 36040011 ori $a0, $s0, 0x11 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] | 0x11u; PGXP_ALU(0x36040011u, cpu->gpr[4], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00003F14u); #endif if (psx_delay_BFC21EE4) { psx_delay_BFC21EE4 = 0; cpu->gpr[31] = 0x00003F18u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; } label_BFC21EEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003F18u); #endif #ifdef PSX_COSIM cosim_block(0x00003F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21EEC: 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(0x00003F18u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21EF0: 0C0009B9 jal 0xB00026E4 */ cpu->gpr[31] = 0x00003F24u; /* jal link before delay slot */ psx_delay_BFC21EF0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F20u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21EF4: 36040011 ori $a0, $s0, 0x11 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] | 0x11u; PGXP_ALU(0x36040011u, cpu->gpr[4], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00003F20u); #endif if (psx_delay_BFC21EF0) { psx_delay_BFC21EF0 = 0; cpu->gpr[31] = 0x00003F24u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; } label_BFC21EF8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003F24u); #endif #ifdef PSX_COSIM cosim_block(0x00003F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21EF8: 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(0x00003F24u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21EFC: 0C0009B9 jal 0xB00026E4 */ cpu->gpr[31] = 0x00003F30u; /* jal link before delay slot */ psx_delay_BFC21EFC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21F00: 36040011 ori $a0, $s0, 0x11 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] | 0x11u; PGXP_ALU(0x36040011u, cpu->gpr[4], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00003F2Cu); #endif if (psx_delay_BFC21EFC) { psx_delay_BFC21EFC = 0; cpu->gpr[31] = 0x00003F30u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000026E4u); cpu->pc = 0x000026E4u; return; } label_BFC21F04: #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, 0x8u); #endif /* 0xBFC21F04: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F30u); #endif /* 0xBFC21F08: 8C654C5C lw $a1, 19548($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19548; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F34u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C654C5Cu, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003F34u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21F0C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F38u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21F10: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F3Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F40u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC21F14: 10A0002B beq $a1, $zero, 0xBFC21FC4 */ uint32_t psx_brA_BFC21F14 = cpu->gpr[5]; uint32_t psx_brB_BFC21F14 = cpu->gpr[0]; psx_taken_BFC21F14 = (psx_brA_BFC21F14 == psx_brB_BFC21F14); psx_delay_BFC21F14 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21F18: 24424C4C addiu $v0, $v0, 19532 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); PGXP_ALU(0x24424C4Cu, cpu->gpr[2], _pgx1, 0x00004C4Cu); } #ifdef PSX_COSIM cosim_instr(0x00003F44u); #endif if (psx_delay_BFC21F14) { psx_delay_BFC21F14 = 0; if (psx_taken_BFC21F14) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003FF0u); goto label_BFC21FC4; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003F48u); } label_BFC21F1C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003F48u); #endif #ifdef PSX_COSIM cosim_block(0x00003F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21F1C: AC604C5C sw $zero, 19548($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F48u); return; } g_debug_last_store_pc = 0x00003F48u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC604C5Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003F48u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21F20: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x9u); #endif /* 0xBFC21F24: AC604C48 sw $zero, 19528($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F50u); return; } g_debug_last_store_pc = 0x00003F50u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC604C48u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003F50u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC21F28: 2406FF7F addiu $a2, $zero, -129 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (-129)); PGXP_ALU(0x2406FF7Fu, cpu->gpr[6], _pgx1, 0xFFFFFF7Fu); } #ifdef PSX_COSIM cosim_instr(0x00003F54u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21F2C: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F58u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x48u); #endif /* 0xBFC21F30: AC661070 sw $a2, 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, 0x00003F5Cu); return; } g_debug_last_store_pc = 0x00003F5Cu; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC661070u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00003F5Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003F60u); #endif /* 0xBFC21F34: 8C651074 lw $a1, 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, 0x00003F60u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x8u); } PGXP_LOAD(0x8C651074u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003F60u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC21F38: 3C111F80 lui $s1, 0x1F80 */ cpu->gpr[17] = 0x1F800000u; PGXP_ALU(0x3C111F80u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F64u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x60u); #endif /* 0xBFC21F3C: 00A62824 and $a1, $a1, $a2 */ { uint32_t _pgx1 = cpu->gpr[5]; uint32_t _pgx2 = cpu->gpr[6]; cpu->gpr[5] = cpu->gpr[5] & cpu->gpr[6]; PGXP_ALU(0x00A62824u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003F68u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC21F40: AC651074 sw $a1, 4212($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F6Cu); return; } g_debug_last_store_pc = 0x00003F6Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC651074u, _pgxa, cpu->gpr[5]); } #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, 0x20001u); #endif /* 0xBFC21F44: A620104A sh $zero, 4170($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003F70u); return; } g_debug_last_store_pc = 0x00003F70u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA620104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003F70u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21F48: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003F74u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21F4C: AC604C44 sw $zero, 19524($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19524; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19524)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F78u); return; } g_debug_last_store_pc = 0x00003F78u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC604C44u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003F78u); #endif /* 0xBFC21F50: 8C834C58 lw $v1, 19544($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F7Cu); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x10u); } PGXP_LOAD(0x8C834C58u, _pgxa, cpu->gpr[3]); } #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, 0x11u); #endif /* 0xBFC21F54: 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(0x00003F80u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21F58: 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(0x00003F84u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC21F5C: A0440000 sb $a0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00003F88u; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[2] + (0)), (uint8_t)(cpu->gpr[4] & 0xFFu)); PGXP_STORE(0xA0440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00003F88u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC21F60: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #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, 0xCu); #endif /* 0xBFC21F64: AC434C54 sw $v1, 19540($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19540; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19540)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003F90u); return; } g_debug_last_store_pc = 0x00003F90u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC434C54u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00003F90u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC21F68: 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(0x00003F94u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21F6C: 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(0x00003F98u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC21F70: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00003FA4u; /* jalr link before delay slot */ psx_delay_BFC21F70 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003FA0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21F74: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00003FA0u); #endif if (psx_delay_BFC21F70) { psx_delay_BFC21F70 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00003FA4u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC21F78: #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, 0x21u); #endif /* 0xBFC21F78: 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(0x00003FA4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21F7C: 0C000984 jal 0xB0002610 */ cpu->gpr[31] = 0x00003FB0u; /* jal link before delay slot */ psx_delay_BFC21F7C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10010u); #endif /* 0xBFC21F80: 36040011 ori $a0, $s0, 0x11 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[4] = cpu->gpr[16] | 0x11u; PGXP_ALU(0x36040011u, cpu->gpr[4], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00003FACu); #endif if (psx_delay_BFC21F7C) { psx_delay_BFC21F7C = 0; cpu->gpr[31] = 0x00003FB0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002610u); cpu->pc = 0x00002610u; return; } label_BFC21F84: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003FB0u); #endif #ifdef PSX_COSIM cosim_block(0x00003FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21F84: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00003FB0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC21F88: 24A5AEB0 addiu $a1, $a1, -20816 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20816)); PGXP_ALU(0x24A5AEB0u, cpu->gpr[5], _pgx1, 0xFFFFAEB0u); } #ifdef PSX_COSIM cosim_instr(0x00003FB4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC21F8C: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x00003FC0u; /* jal link before delay slot */ psx_delay_BFC21F8C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21F90: 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(0x00003FBCu); #endif if (psx_delay_BFC21F8C) { psx_delay_BFC21F8C = 0; cpu->gpr[31] = 0x00003FC0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC21F94: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21F94: 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(0x00003FC0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC21F98: A622104A sh $v0, 4170($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003FC4u); return; } g_debug_last_store_pc = 0x00003FC4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA622104Au, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003FC4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21F9C: 24020088 addiu $v0, $zero, 136 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (136)); PGXP_ALU(0x24020088u, cpu->gpr[2], _pgx1, 0x00000088u); } #ifdef PSX_COSIM cosim_instr(0x00003FC8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC21FA0: A622104E sh $v0, 4174($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4174; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4174)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003FCCu); return; } g_debug_last_store_pc = 0x00003FCCu; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA622104Eu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003FCCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC21FA4: 2402000D addiu $v0, $zero, 13 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[0] + (13)); PGXP_ALU(0x2402000Du, cpu->gpr[2], _pgx1, 0x0000000Du); } #ifdef PSX_COSIM cosim_instr(0x00003FD0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20004u); #endif /* 0xBFC21FA8: A6221048 sh $v0, 4168($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4168; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4168)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003FD4u); return; } g_debug_last_store_pc = 0x00003FD4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA6221048u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00003FD4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20001u); #endif /* 0xBFC21FAC: A620104A sh $zero, 4170($s1) */ { uint32_t _pgxa = cpu->gpr[17] + 4170; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[17] + (4170)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x00003FD8u); return; } g_debug_last_store_pc = 0x00003FD8u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[0] & 0xFFFFu)); } PGXP_STORE(0xA620104Au, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00003FD8u); #endif label_BFC21FB0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00003FDCu); #endif #ifdef PSX_COSIM cosim_block(0x00003FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003FDCu); #endif /* 0xBFC21FB0: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FDCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00003FDCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00003FE0u); #endif /* 0xBFC21FB4: 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, 0x00003FE0u); 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(0x00003FE0u); #endif /* 0xBFC21FB8: 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, 0x00003FE4u); 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(0x00003FE4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC21FBC: 03E00008 jr $ra */ psx_delay_BFC21FBC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC21FC0: 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(0x00003FECu); #endif if (psx_delay_BFC21FBC) { psx_delay_BFC21FBC = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC21FC4: #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 /* 0xBFC21FC4: 8C854C58 lw $a1, 19544($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19544; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00003FF0u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10u); } PGXP_LOAD(0x8C854C58u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00003FF0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC21FC8: 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(0x00003FF4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x28u); #endif /* 0xBFC21FCC: 00651823 subu $v1, $v1, $a1 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[5]; cpu->gpr[3] = cpu->gpr[3] - cpu->gpr[5]; PGXP_ALU(0x00651823u, cpu->gpr[3], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00003FF8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC21FD0: 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(0x00003FFCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004000u); cpu->pc = 0x00004000u; return; /* fallthrough */ } void OpenBIOS_func_00004000(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004000u); label_BFC21FD4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004000u); #endif #ifdef PSX_COSIM cosim_block(0x00004000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC21FD4: AC834C58 sw $v1, 19544($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19544; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004000u); return; } g_debug_last_store_pc = 0x00004000u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC834C58u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004000u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004004u); cpu->pc = 0x00004004u; return; /* fallthrough */ } void OpenBIOS_func_00004004(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004004u); label_BFC21FD8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004004u); #endif #ifdef PSX_COSIM cosim_block(0x00004004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004004u); #endif /* 0xBFC21FD8: 90440000 lbu $a0, 0($v0) */ { uint32_t _pgxa = cpu->gpr[2]; cpu->gpr[4] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[2] + (0)), 4, 0x4u); PGXP_LOAD(0x90440000u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00004004u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004008u); cpu->pc = 0x00004008u; return; /* fallthrough */ } void OpenBIOS_func_00004008(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004008u); label_BFC21FDC: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC21FDC: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004008u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000400Cu); cpu->pc = 0x0000400Cu; return; /* fallthrough */ } void OpenBIOS_func_0000400C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000400Cu); label_BFC21FE0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000400Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000400Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000400Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21FE0: 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(0x0000400Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004010u); cpu->pc = 0x00004010u; return; /* fallthrough */ } void OpenBIOS_func_00004010(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004010u); int psx_delay_BFC21FE4 = 0; int psx_taken_BFC21FE4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC21FECu: goto label_BFC21FEC; default: break; } } label_BFC21FE4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004010u); #endif #ifdef PSX_COSIM cosim_block(0x00004010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004010u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21FE4: 1480FFF2 bne $a0, $zero, 0xBFC21FB0 */ uint32_t psx_brA_BFC21FE4 = cpu->gpr[4]; uint32_t psx_brB_BFC21FE4 = cpu->gpr[0]; psx_taken_BFC21FE4 = (psx_brA_BFC21FE4 != psx_brB_BFC21FE4); psx_delay_BFC21FE4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC21FE8: 00031880 sll $v1, $v1, 2 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 2u; PGXP_ALU(0x00031880u, cpu->gpr[3], _pgx1, 2u); } #ifdef PSX_COSIM cosim_instr(0x00004014u); #endif if (psx_delay_BFC21FE4) { psx_delay_BFC21FE4 = 0; if (psx_taken_BFC21FE4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003FDCu); cpu->pc = 0x00003FDCu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004018u); } label_BFC21FEC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004018u); #endif #ifdef PSX_COSIM cosim_block(0x00004018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21FEC: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004018u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21FF0: AC804C30 sw $zero, 19504($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19504; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19504)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000401Cu); return; } g_debug_last_store_pc = 0x0000401Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC804C30u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000401Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004020u); cpu->pc = 0x00004020u; return; /* fallthrough */ } void OpenBIOS_func_00004020(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004020u); label_BFC21FF4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004020u); #endif #ifdef PSX_COSIM cosim_block(0x00004020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21FF4: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004020u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC21FF8: AC804C40 sw $zero, 19520($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19520; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19520)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004024u); return; } g_debug_last_store_pc = 0x00004024u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC804C40u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004024u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC21FFC: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004028u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC22000: 24844C28 addiu $a0, $a0, 19496 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (19496)); PGXP_ALU(0x24844C28u, cpu->gpr[4], _pgx1, 0x00004C28u); } #ifdef PSX_COSIM cosim_instr(0x0000402Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004030u); cpu->pc = 0x00004030u; return; /* fallthrough */ } void OpenBIOS_func_00004030(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004030u); label_BFC22004: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004030u); #endif #ifdef PSX_COSIM cosim_block(0x00004030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004030u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC22004: 00642021 addu $a0, $v1, $a0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[4]; cpu->gpr[4] = cpu->gpr[3] + cpu->gpr[4]; PGXP_ALU(0x00642021u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00004030u); #endif /* 0xBFC22008: 8C850000 lw $a1, 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, 0x00004034u); return; } cpu->gpr[5] = psx_cyc_load_word(cpu, psx_addr, 5, 0x10u); } PGXP_LOAD(0x8C850000u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x00004034u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2200C: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004038u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30u); #endif /* 0xBFC22010: AC854C38 sw $a1, 19512($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19512; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19512)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000403Cu); return; } g_debug_last_store_pc = 0x0000403Cu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAC854C38u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x0000403Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004040u); cpu->pc = 0x00004040u; return; /* fallthrough */ } void OpenBIOS_func_00004040(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004040u); label_BFC22014: #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, 0x10u); #endif /* 0xBFC22014: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004040u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC22018: AC824C3C sw $v0, 19516($a0) */ { uint32_t _pgxa = cpu->gpr[4] + 19516; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (19516)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004044u); return; } g_debug_last_store_pc = 0x00004044u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC824C3Cu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00004044u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2201C: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004048u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000404Cu); cpu->pc = 0x0000404Cu; return; /* fallthrough */ } void OpenBIOS_func_0000404C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000404Cu); label_BFC22020: #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, 0x10000u); #endif /* 0xBFC22020: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #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 /* 0xBFC22024: 24424C20 addiu $v0, $v0, 19488 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (19488)); PGXP_ALU(0x24424C20u, cpu->gpr[2], _pgx1, 0x00004C20u); } #ifdef PSX_COSIM cosim_instr(0x00004050u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22028: 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(0x00004054u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC2202C: 2605AEB0 addiu $a1, $s0, -20816 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20816)); PGXP_ALU(0x2605AEB0u, cpu->gpr[5], _pgx1, 0xFFFFAEB0u); } #ifdef PSX_COSIM cosim_instr(0x00004058u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22030: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000405Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004060u); cpu->pc = 0x00004060u; return; /* fallthrough */ } void OpenBIOS_func_00004060(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004060u); int psx_delay_BFC22038 = 0; int psx_delay_BFC22044 = 0; int psx_delay_BFC2206C = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC22040u: goto label_BFC22040; case 0xBFC2204Cu: goto label_BFC2204C; default: break; } } label_BFC22034: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004060u); #endif #ifdef PSX_COSIM cosim_block(0x00004060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22034: 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(0x00004060u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22038: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x0000406Cu; /* jal link before delay slot */ psx_delay_BFC22038 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2203C: AC624C34 sw $v0, 19508($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 19508; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (19508)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004068u); return; } g_debug_last_store_pc = 0x00004068u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC624C34u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00004068u); #endif if (psx_delay_BFC22038) { psx_delay_BFC22038 = 0; cpu->gpr[31] = 0x0000406Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC22040: #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, 0x10020u); #endif /* 0xBFC22040: 2605AEB0 addiu $a1, $s0, -20816 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20816)); PGXP_ALU(0x2605AEB0u, cpu->gpr[5], _pgx1, 0xFFFFAEB0u); } #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, 0x80000000u); #endif /* 0xBFC22044: 0C0007AE jal 0xB0001EB8 */ cpu->gpr[31] = 0x00004078u; /* jal link before delay slot */ psx_delay_BFC22044 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22048: 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(0x00004074u); #endif if (psx_delay_BFC22044) { psx_delay_BFC22044 = 0; cpu->gpr[31] = 0x00004078u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } label_BFC2204C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004078u); #endif #ifdef PSX_COSIM cosim_block(0x00004078u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004078u); #endif /* 0xBFC2204C: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004078u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004078u); #endif /* 0xBFC22050: 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, 0x0000407Cu); 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(0x0000407Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004080u); #endif /* 0xBFC22054: 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, 0x00004080u); 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(0x00004080u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22058: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004084u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2205C: AC404C48 sw $zero, 19528($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19528; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19528)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004088u); return; } g_debug_last_store_pc = 0x00004088u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C48u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004088u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22060: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000408Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22064: 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(0x00004090u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22068: 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(0x00004094u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC2206C: 08000E0D j 0xB0003834 */ psx_delay_BFC2206C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22070: AC404C50 sw $zero, 19536($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19536; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19536)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000409Cu); return; } g_debug_last_store_pc = 0x0000409Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C50u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000409Cu); #endif if (psx_delay_BFC2206C) { psx_delay_BFC2206C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00003834u); cpu->pc = 0x00003834u; return; } } void OpenBIOS_func_000040A0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000040A0u); int psx_delay_BFC2207C = 0; label_BFC22074: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000040A0u); #endif #ifdef PSX_COSIM cosim_block(0x000040A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22074: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000040A0u); #endif /* 0xBFC22078: 8C62AEC8 lw $v0, -20792($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20792; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040A4u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C62AEC8u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000040A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC2207C: 03E00008 jr $ra */ psx_delay_BFC2207C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC22080: AC64AEC8 sw $a0, -20792($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040ACu); return; } g_debug_last_store_pc = 0x000040ACu; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC64AEC8u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000040ACu); #endif if (psx_delay_BFC2207C) { psx_delay_BFC2207C = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000040B0(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000040B0u); int psx_delay_BFC22090 = 0; label_BFC22084: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000040B0u); #endif #ifdef PSX_COSIM cosim_block(0x000040B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22084: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000040B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC22088: AC44AEC0 sw $a0, -20800($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040B4u); return; } g_debug_last_store_pc = 0x000040B4u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC44AEC0u, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x000040B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2208C: 2442AEC0 addiu $v0, $v0, -20800 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20800)); PGXP_ALU(0x2442AEC0u, cpu->gpr[2], _pgx1, 0xFFFFAEC0u); } #ifdef PSX_COSIM cosim_instr(0x000040B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22090: 03E00008 jr $ra */ psx_delay_BFC22090 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC22094: 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, 0x000040C0u); return; } g_debug_last_store_pc = 0x000040C0u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x000040C0u); #endif if (psx_delay_BFC22090) { psx_delay_BFC22090 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000040C4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000040C4u); int psx_delay_BFC220C4 = 0; int psx_delay_BFC220F8 = 0; int psx_taken_BFC220F8 = 0; int psx_delay_BFC22100 = 0; int psx_taken_BFC22100 = 0; int psx_delay_BFC22114 = 0; int psx_taken_BFC22114 = 0; int psx_delay_BFC2211C = 0; int psx_taken_BFC2211C = 0; int psx_delay_BFC22124 = 0; int psx_taken_BFC22124 = 0; int psx_delay_BFC22138 = 0; int psx_taken_BFC22138 = 0; int psx_delay_BFC22184 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC220CCu: goto label_BFC220CC; case 0xBFC22100u: goto label_BFC22100; case 0xBFC22108u: goto label_BFC22108; case 0xBFC2210Cu: goto label_BFC2210C; case 0xBFC2211Cu: goto label_BFC2211C; case 0xBFC22124u: goto label_BFC22124; case 0xBFC2212Cu: goto label_BFC2212C; case 0xBFC22130u: goto label_BFC22130; case 0xBFC22140u: goto label_BFC22140; default: break; } } label_BFC22098: #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, 0x20000000u); #endif /* 0xBFC22098: 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(0x000040C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC2209C: 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, 0x000040C8u); return; } g_debug_last_store_pc = 0x000040C8u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10018u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x000040C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC220A0: 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, 0x000040CCu); return; } g_debug_last_store_pc = 0x000040CCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00014u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000040CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20021u); #endif /* 0xBFC220A4: 00A08825 or $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(0x00A08825u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000040D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC220A8: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000040D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC220AC: 3C05BFC1 lui $a1, 0xBFC1 */ cpu->gpr[5] = 0xBFC10000u; PGXP_ALU(0x3C05BFC1u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000040D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC220B0: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000040DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC220B4: 24A59C70 addiu $a1, $a1, -25488 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-25488)); PGXP_ALU(0x24A59C70u, cpu->gpr[5], _pgx1, 0xFFFF9C70u); } #ifdef PSX_COSIM cosim_instr(0x000040E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC220B8: 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, 0x000040E4u); return; } g_debug_last_store_pc = 0x000040E4u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60028u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x000040E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC220BC: 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, 0x000040E8u); return; } g_debug_last_store_pc = 0x000040E8u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA7002Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000040E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC220C0: 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, 0x000040ECu); return; } g_debug_last_store_pc = 0x000040ECu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC220C4: 0C000AC5 jal 0xB0002B14 */ cpu->gpr[31] = 0x000040F8u; /* jal link before delay slot */ psx_delay_BFC220C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC220C8: 24849B80 addiu $a0, $a0, -25728 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25728)); PGXP_ALU(0x24849B80u, cpu->gpr[4], _pgx1, 0xFFFF9B80u); } #ifdef PSX_COSIM cosim_instr(0x000040F4u); #endif if (psx_delay_BFC220C4) { psx_delay_BFC220C4 = 0; cpu->gpr[31] = 0x000040F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B14u); cpu->pc = 0x00002B14u; return; } label_BFC220CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000040F8u); #endif #ifdef PSX_COSIM cosim_block(0x000040F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000040F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC220CC: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000040F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC220D0: AC404C64 sw $zero, 19556($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19556; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000040FCu); return; } g_debug_last_store_pc = 0x000040FCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C64u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000040FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC220D4: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004100u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC220D8: AC40AEC0 sw $zero, -20800($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20800; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20800)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004104u); return; } g_debug_last_store_pc = 0x00004104u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40AEC0u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004104u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC220DC: 2442AEC0 addiu $v0, $v0, -20800 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20800)); PGXP_ALU(0x2442AEC0u, cpu->gpr[2], _pgx1, 0xFFFFAEC0u); } #ifdef PSX_COSIM cosim_instr(0x00004108u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC220E0: 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, 0x0000410Cu); return; } g_debug_last_store_pc = 0x0000410Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC400004u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000410Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004110u); #endif /* 0xBFC220E4: 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, 0x00004110u); 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(0x00004110u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC220E8: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004114u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC220EC: AC50AEDC sw $s0, -20772($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20772; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20772)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004118u); return; } g_debug_last_store_pc = 0x00004118u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC50AEDCu, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004118u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC220F0: 2442AEDC addiu $v0, $v0, -20772 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20772)); PGXP_ALU(0x2442AEDCu, cpu->gpr[2], _pgx1, 0xFFFFAEDCu); } #ifdef PSX_COSIM cosim_instr(0x0000411Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004120u); #endif /* 0xBFC220F4: 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, 0x00004120u); 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(0x00004120u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC220F8: 12000008 beq $s0, $zero, 0xBFC2211C */ uint32_t psx_brA_BFC220F8 = cpu->gpr[16]; uint32_t psx_brB_BFC220F8 = cpu->gpr[0]; psx_taken_BFC220F8 = (psx_brA_BFC220F8 == psx_brB_BFC220F8); psx_delay_BFC220F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC220FC: 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, 0x00004128u); return; } g_debug_last_store_pc = 0x00004128u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAC460004u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00004128u); #endif if (psx_delay_BFC220F8) { psx_delay_BFC220F8 = 0; if (psx_taken_BFC220F8) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004148u); goto label_BFC2211C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000412Cu); } label_BFC22100: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000412Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000412Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000412Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC22100: 1A200006 blez $s1, 0xBFC2211C */ uint32_t psx_brA_BFC22100 = cpu->gpr[17]; psx_taken_BFC22100 = ((int32_t)psx_brA_BFC22100 <= 0); psx_delay_BFC22100 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004130u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22104: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004130u); #endif if (psx_delay_BFC22100) { psx_delay_BFC22100 = 0; if (psx_taken_BFC22100) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004148u); goto label_BFC2211C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004134u); } label_BFC22108: #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, 0x30000u); #endif /* 0xBFC22108: 02118821 addu $s1, $s0, $s1 */ { uint32_t _pgx1 = cpu->gpr[16]; uint32_t _pgx2 = cpu->gpr[17]; cpu->gpr[17] = cpu->gpr[16] + cpu->gpr[17]; PGXP_ALU(0x02118821u, cpu->gpr[17], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00004134u); #endif label_BFC2210C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004138u); #endif #ifdef PSX_COSIM cosim_block(0x00004138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC2210C: A2000000 sb $zero, 0($s0) */ { uint32_t _pgxa = cpu->gpr[16]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x00004138u; 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(0x00004138u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC22110: 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(0x0000413Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004140u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x30000u); #endif /* 0xBFC22114: 1630FFFD bne $s1, $s0, 0xBFC2210C */ uint32_t psx_brA_BFC22114 = cpu->gpr[17]; uint32_t psx_brB_BFC22114 = cpu->gpr[16]; psx_taken_BFC22114 = (psx_brA_BFC22114 != psx_brB_BFC22114); psx_delay_BFC22114 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22118: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004144u); #endif if (psx_delay_BFC22114) { psx_delay_BFC22114 = 0; if (psx_taken_BFC22114) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004138u); goto label_BFC2210C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004148u); } label_BFC2211C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004148u); #endif #ifdef PSX_COSIM cosim_block(0x00004148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004148u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC2211C: 10C00008 beq $a2, $zero, 0xBFC22140 */ uint32_t psx_brA_BFC2211C = cpu->gpr[6]; uint32_t psx_brB_BFC2211C = cpu->gpr[0]; psx_taken_BFC2211C = (psx_brA_BFC2211C == psx_brB_BFC2211C); psx_delay_BFC2211C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22120: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000414Cu); #endif if (psx_delay_BFC2211C) { psx_delay_BFC2211C = 0; if (psx_taken_BFC2211C) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000416Cu); goto label_BFC22140; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004150u); } label_BFC22124: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004150u); #endif #ifdef PSX_COSIM cosim_block(0x00004150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004150u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80u); #endif /* 0xBFC22124: 18E00006 blez $a3, 0xBFC22140 */ uint32_t psx_brA_BFC22124 = cpu->gpr[7]; psx_taken_BFC22124 = ((int32_t)psx_brA_BFC22124 <= 0); psx_delay_BFC22124 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22128: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004154u); #endif if (psx_delay_BFC22124) { psx_delay_BFC22124 = 0; if (psx_taken_BFC22124) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000416Cu); goto label_BFC22140; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004158u); } label_BFC2212C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004158u); #endif #ifdef PSX_COSIM cosim_block(0x00004158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004158u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC2212C: 00C73821 addu $a3, $a2, $a3 */ { uint32_t _pgx1 = cpu->gpr[6]; uint32_t _pgx2 = cpu->gpr[7]; cpu->gpr[7] = cpu->gpr[6] + cpu->gpr[7]; PGXP_ALU(0x00C73821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00004158u); #endif label_BFC22130: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000415Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000415Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000415Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC22130: A0C00000 sb $zero, 0($a2) */ { uint32_t _pgxa = cpu->gpr[6]; psx_store_cycle_barrier(); g_debug_last_store_pc = 0x0000415Cu; cpu->write_byte((uint32_t)((int32_t)cpu->gpr[6] + (0)), (uint8_t)(cpu->gpr[0] & 0xFFu)); PGXP_STORE(0xA0C00000u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x0000415Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40u); #endif /* 0xBFC22134: 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(0x00004160u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC22138: 14C7FFFD bne $a2, $a3, 0xBFC22130 */ uint32_t psx_brA_BFC22138 = cpu->gpr[6]; uint32_t psx_brB_BFC22138 = cpu->gpr[7]; psx_taken_BFC22138 = (psx_brA_BFC22138 != psx_brB_BFC22138); psx_delay_BFC22138 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2213C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004168u); #endif if (psx_delay_BFC22138) { psx_delay_BFC22138 = 0; if (psx_taken_BFC22138) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000415Cu); goto label_BFC22130; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000416Cu); } label_BFC22140: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000416Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000416Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000416Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22140: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #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, 0x8u); #endif /* 0xBFC22144: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004170u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22148: 24633E6C addiu $v1, $v1, 15980 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15980)); PGXP_ALU(0x24633E6Cu, cpu->gpr[3], _pgx1, 0x00003E6Cu); } #ifdef PSX_COSIM cosim_instr(0x00004174u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2214C: AC40AECC sw $zero, -20788($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20788; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20788)); 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[0]); } PGXP_STORE(0xAC40AECCu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004178u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22150: 2442AECC addiu $v0, $v0, -20788 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20788)); PGXP_ALU(0x2442AECCu, cpu->gpr[2], _pgx1, 0xFFFFAECCu); } #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, 0xCu); #endif /* 0xBFC22154: 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, 0x00004180u); return; } g_debug_last_store_pc = 0x00004180u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004180u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22158: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004184u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2215C: 2463371C addiu $v1, $v1, 14108 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14108)); PGXP_ALU(0x2463371Cu, cpu->gpr[3], _pgx1, 0x0000371Cu); } #ifdef PSX_COSIM cosim_instr(0x00004188u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22160: 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, 0x0000418Cu); return; } g_debug_last_store_pc = 0x0000418Cu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #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, 0x5u); #endif /* 0xBFC22164: 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, 0x00004190u); return; } g_debug_last_store_pc = 0x00004190u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004190u); #endif /* 0xBFC22168: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004194u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004194u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2216C: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004198u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC22170: 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(0x0000419Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041A0u); #endif /* 0xBFC22174: 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, 0x000041A0u); 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(0x000041A0u); #endif /* 0xBFC22178: 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, 0x000041A4u); 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(0x000041A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2217C: AC43AEE8 sw $v1, -20760($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20760; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000041A8u); return; } g_debug_last_store_pc = 0x000041A8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEE8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000041A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22180: 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(0x000041ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22184: 03E00008 jr $ra */ psx_delay_BFC22184 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22188: 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(0x000041B4u); #endif if (psx_delay_BFC22184) { psx_delay_BFC22184 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000041B8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000041B8u); int psx_delay_BFC22194 = 0; int psx_delay_BFC221AC = 0; int psx_delay_BFC221B8 = 0; int psx_delay_BFC221E8 = 0; int psx_delay_BFC22200 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC2219Cu: goto label_BFC2219C; case 0xBFC221B4u: goto label_BFC221B4; case 0xBFC221C0u: goto label_BFC221C0; case 0xBFC221F0u: goto label_BFC221F0; default: break; } } label_BFC2218C: #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, 0x20000000u); #endif /* 0xBFC2218C: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000041B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC22190: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000041BCu); return; } g_debug_last_store_pc = 0x000041BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #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, 0x80000000u); #endif /* 0xBFC22194: 0C000DF0 jal 0xB00037C0 */ cpu->gpr[31] = 0x000041C8u; /* jal link before delay slot */ psx_delay_BFC22194 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC22198: 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, 0x000041C4u); return; } g_debug_last_store_pc = 0x000041C4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000041C4u); #endif if (psx_delay_BFC22194) { psx_delay_BFC22194 = 0; cpu->gpr[31] = 0x000041C8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000037C0u); cpu->pc = 0x000037C0u; return; } label_BFC2219C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000041C8u); #endif #ifdef PSX_COSIM cosim_block(0x000041C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2219C: 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(0x000041C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC221A0: 0000000C syscall */ cpu->pc = 0x000041CCu; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x000041CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC221A4: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000041D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC221A8: 2605AECC addiu $a1, $s0, -20788 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20788)); PGXP_ALU(0x2605AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #ifdef PSX_COSIM cosim_instr(0x000041D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC221AC: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x000041E0u; /* jal link before delay slot */ psx_delay_BFC221AC = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC221B0: 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(0x000041DCu); #endif if (psx_delay_BFC221AC) { psx_delay_BFC221AC = 0; cpu->gpr[31] = 0x000041E0u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC221B4: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000041E0u); #endif #ifdef PSX_COSIM cosim_block(0x000041E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC221B4: 2605AECC addiu $a1, $s0, -20788 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20788)); PGXP_ALU(0x2605AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #ifdef PSX_COSIM cosim_instr(0x000041E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC221B8: 0C0007AE jal 0xB0001EB8 */ cpu->gpr[31] = 0x000041ECu; /* jal link before delay slot */ psx_delay_BFC221B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC221BC: 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(0x000041E8u); #endif if (psx_delay_BFC221B8) { psx_delay_BFC221B8 = 0; cpu->gpr[31] = 0x000041ECu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } label_BFC221C0: #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, 0x4u); #endif /* 0xBFC221C0: 3C02BF80 lui $v0, 0xBF80 */ cpu->gpr[2] = 0xBF800000u; PGXP_ALU(0x3C02BF80u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000041ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000041F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC221C4: 2403FFFE addiu $v1, $zero, -2 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-2)); PGXP_ALU(0x2403FFFEu, cpu->gpr[3], _pgx1, 0xFFFFFFFEu); } #ifdef PSX_COSIM cosim_instr(0x000041F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC221C8: AC431070 sw $v1, 4208($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4208; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4208)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000041F4u); return; } g_debug_last_store_pc = 0x000041F4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431070u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000041F4u); #endif /* 0xBFC221CC: 8C431074 lw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000041F8u); return; } cpu->gpr[3] = psx_cyc_load_word(cpu, psx_addr, 3, 0x4u); } PGXP_LOAD(0x8C431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000041F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC221D0: 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(0x000041FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC221D4: 34630001 ori $v1, $v1, 0x1 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] | 0x1u; PGXP_ALU(0x34630001u, cpu->gpr[3], _pgx1, 0x0001u); } #ifdef PSX_COSIM cosim_instr(0x00004200u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC221D8: AC431074 sw $v1, 4212($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004204u); return; } g_debug_last_store_pc = 0x00004204u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC431074u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004204u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC221DC: 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(0x00004208u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC221E0: 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(0x0000420Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC221E4: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004210u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC221E8: 0C000761 jal 0xB0001D84 */ cpu->gpr[31] = 0x0000421Cu; /* jal link before delay slot */ psx_delay_BFC221E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC221EC: AC43AEC8 sw $v1, -20792($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004218u); return; } g_debug_last_store_pc = 0x00004218u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC43AEC8u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004218u); #endif if (psx_delay_BFC221E8) { psx_delay_BFC221E8 = 0; cpu->gpr[31] = 0x0000421Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D84u); cpu->pc = 0x00001D84u; return; } label_BFC221F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000421Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000421Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000421Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC221F0: 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(0x0000421Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004220u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC221F4: 0000000C syscall */ cpu->pc = 0x00004220u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00004220u); #endif /* 0xBFC221F8: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004224u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004224u); #endif /* 0xBFC221FC: 8FB00010 lw $s0, 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, 0x00004228u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004228u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22200: 03E00008 jr $ra */ psx_delay_BFC22200 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004230u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22204: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00004230u); #endif if (psx_delay_BFC22200) { psx_delay_BFC22200 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00004234(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004234u); int psx_delay_BFC2221C = 0; int psx_delay_BFC2222C = 0; int psx_delay_BFC22244 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC22224u: goto label_BFC22224; case 0xBFC22234u: goto label_BFC22234; default: break; } } label_BFC22208: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004234u); #endif #ifdef PSX_COSIM cosim_block(0x00004234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22208: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00004234u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC2220C: 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(0x00004238u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC22210: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000423Cu); return; } g_debug_last_store_pc = 0x0000423Cu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x0000423Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC22214: 0000000C syscall */ cpu->pc = 0x00004240u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00004240u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC22218: 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(0x00004244u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2221C: 0C000761 jal 0xB0001D84 */ cpu->gpr[31] = 0x00004250u; /* jal link before delay slot */ psx_delay_BFC2221C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22220: 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(0x0000424Cu); #endif if (psx_delay_BFC2221C) { psx_delay_BFC2221C = 0; cpu->gpr[31] = 0x00004250u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D84u); cpu->pc = 0x00001D84u; return; } label_BFC22224: #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, 0x20u); #endif /* 0xBFC22224: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004250u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC22228: 24A5AECC addiu $a1, $a1, -20788 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20788)); PGXP_ALU(0x24A5AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #ifdef PSX_COSIM cosim_instr(0x00004254u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2222C: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x00004260u; /* jal link before delay slot */ psx_delay_BFC2222C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22230: 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(0x0000425Cu); #endif if (psx_delay_BFC2222C) { psx_delay_BFC2222C = 0; cpu->gpr[31] = 0x00004260u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC22234: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004260u); #endif #ifdef PSX_COSIM cosim_block(0x00004260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22234: 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(0x00004260u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC22238: 0000000C syscall */ cpu->pc = 0x00004264u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00004264u); #endif /* 0xBFC2223C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004268u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004268u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22240: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000426Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004270u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22244: 03E00008 jr $ra */ psx_delay_BFC22244 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22248: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00004274u); #endif if (psx_delay_BFC22244) { psx_delay_BFC22244 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00004278(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004278u); int psx_delay_BFC222F0 = 0; int psx_taken_BFC222F0 = 0; int psx_delay_BFC22300 = 0; int psx_delay_BFC22328 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC222E0u: goto label_BFC222E0; case 0xBFC222F8u: goto label_BFC222F8; case 0xBFC22308u: goto label_BFC22308; default: break; } } label_BFC2224C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004278u); #endif #ifdef PSX_COSIM cosim_block(0x00004278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2224C: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004278u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22250: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #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, 0x20000000u); #endif /* 0xBFC22254: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x00004280u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22258: 24633E6C addiu $v1, $v1, 15980 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (15980)); PGXP_ALU(0x24633E6Cu, cpu->gpr[3], _pgx1, 0x00003E6Cu); } #ifdef PSX_COSIM cosim_instr(0x00004284u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2225C: AC40AECC sw $zero, -20788($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20788; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20788)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004288u); return; } g_debug_last_store_pc = 0x00004288u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40AECCu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x00004288u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22260: 2442AECC addiu $v0, $v0, -20788 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[2] + (-20788)); PGXP_ALU(0x2442AECCu, cpu->gpr[2], _pgx1, 0xFFFFAECCu); } #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, 0x20010000u); #endif /* 0xBFC22264: 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, 0x00004290u); return; } g_debug_last_store_pc = 0x00004290u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004290u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC22268: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004294u); return; } g_debug_last_store_pc = 0x00004294u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004294u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2226C: 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, 0x00004298u); return; } g_debug_last_store_pc = 0x00004298u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004298u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22270: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x0000429Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22274: 2463371C addiu $v1, $v1, 14108 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14108)); PGXP_ALU(0x2463371Cu, cpu->gpr[3], _pgx1, 0x0000371Cu); } #ifdef PSX_COSIM cosim_instr(0x000042A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22278: 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, 0x000042A4u); return; } g_debug_last_store_pc = 0x000042A4u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000042A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2227C: 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, 0x000042A8u); return; } g_debug_last_store_pc = 0x000042A8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000042A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22280: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22284: AC404C5C sw $zero, 19548($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19548; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19548)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042B0u); return; } g_debug_last_store_pc = 0x000042B0u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C5Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000042B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22288: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2228C: 24030101 addiu $v1, $zero, 257 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (257)); PGXP_ALU(0x24030101u, cpu->gpr[3], _pgx1, 0x00000101u); } #ifdef PSX_COSIM cosim_instr(0x000042B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22290: AC404C58 sw $zero, 19544($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19544; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19544)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042BCu); return; } g_debug_last_store_pc = 0x000042BCu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC404C58u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000042BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22294: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22298: A4434C4C sh $v1, 19532($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19532; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19532)); if (psx_addr & 1u) { psx_unaligned_access(cpu, psx_addr, 0x000042C4u); return; } g_debug_last_store_pc = 0x000042C4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4434C4Cu, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000042C4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10011u); #endif /* 0xBFC2229C: 00808025 or $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(0x00808025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000042C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222A0: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC222A4: 3C040001 lui $a0, 0x1 */ cpu->gpr[4] = 0x00010000u; PGXP_ALU(0x3C040001u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC222A8: 2482AEB0 addiu $v0, $a0, -20816 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[2] = (uint32_t)((int32_t)cpu->gpr[4] + (-20816)); PGXP_ALU(0x2482AEB0u, cpu->gpr[2], _pgx1, 0xFFFFAEB0u); } #ifdef PSX_COSIM cosim_instr(0x000042D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222AC: 24633834 addiu $v1, $v1, 14388 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14388)); PGXP_ALU(0x24633834u, cpu->gpr[3], _pgx1, 0x00003834u); } #ifdef PSX_COSIM cosim_instr(0x000042D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC222B0: 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, 0x000042DCu); return; } g_debug_last_store_pc = 0x000042DCu; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430004u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000042DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222B4: 3C030000 lui $v1, 0x0 */ cpu->gpr[3] = 0x00000000u; PGXP_ALU(0x3C030000u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222B8: 246336D8 addiu $v1, $v1, 14040 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (14040)); PGXP_ALU(0x246336D8u, cpu->gpr[3], _pgx1, 0x000036D8u); } #ifdef PSX_COSIM cosim_instr(0x000042E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC222BC: 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, 0x000042E8u); return; } g_debug_last_store_pc = 0x000042E8u; cpu->write_word(psx_addr, cpu->gpr[3]); } PGXP_STORE(0xAC430008u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x000042E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC222C0: AC80AEB0 sw $zero, -20816($a0) */ { uint32_t _pgxa = cpu->gpr[4] + -20816; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[4] + (-20816)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000042ECu); return; } g_debug_last_store_pc = 0x000042ECu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC80AEB0u, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000042ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000042F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222C4: 3C03BFC0 lui $v1, 0xBFC0 */ cpu->gpr[3] = 0xBFC00000u; PGXP_ALU(0x3C03BFC0u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC222C8: 3C040000 lui $a0, 0x0 */ cpu->gpr[4] = 0x00000000u; PGXP_ALU(0x3C040000u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000042F4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC222CC: 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, 0x000042F8u); return; } g_debug_last_store_pc = 0x000042F8u; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40000Cu, _pgxa, cpu->gpr[0]); } #ifdef PSX_COSIM cosim_instr(0x000042F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC222D0: 2484281C addiu $a0, $a0, 10268 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (10268)); PGXP_ALU(0x2484281Cu, cpu->gpr[4], _pgx1, 0x0000281Cu); } #ifdef PSX_COSIM cosim_instr(0x000042FCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC222D4: 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(0x00004300u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC222D8: 246376F4 addiu $v1, $v1, 30452 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[3] + (30452)); PGXP_ALU(0x246376F4u, cpu->gpr[3], _pgx1, 0x000076F4u); } #ifdef PSX_COSIM cosim_instr(0x00004304u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC222DC: 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(0x00004308u); #endif label_BFC222E0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000430Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000430Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000430Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8Cu); #endif /* 0xBFC222E0: 00623821 addu $a3, $v1, $v0 */ { uint32_t _pgx1 = cpu->gpr[3]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[7] = cpu->gpr[3] + cpu->gpr[2]; PGXP_ALU(0x00623821u, cpu->gpr[7], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000430Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004310u); #endif /* 0xBFC222E4: 8CE70000 lw $a3, 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, 0x00004310u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x80u); } PGXP_LOAD(0x8CE70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00004310u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x54u); #endif /* 0xBFC222E8: 00823021 addu $a2, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[6] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00823021u, cpu->gpr[6], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00004314u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC222EC: 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(0x00004318u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x24u); #endif /* 0xBFC222F0: 1445FFFB bne $v0, $a1, 0xBFC222E0 */ uint32_t psx_brA_BFC222F0 = cpu->gpr[2]; uint32_t psx_brB_BFC222F0 = cpu->gpr[5]; psx_taken_BFC222F0 = (psx_brA_BFC222F0 != psx_brB_BFC222F0); psx_delay_BFC222F0 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004320u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xC0u); #endif /* 0xBFC222F4: 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, 0x00004320u); return; } g_debug_last_store_pc = 0x00004320u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xACC70000u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x00004320u); #endif if (psx_delay_BFC222F0) { psx_delay_BFC222F0 = 0; if (psx_taken_BFC222F0) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000430Cu); goto label_BFC222E0; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004324u); } label_BFC222F8: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x201u); #endif /* 0xBFC222F8: 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(0x00004324u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC222FC: 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(0x00004328u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000004u); #endif /* 0xBFC22300: 0040F809 jalr $ra, $v0 */ cpu->gpr[31] = 0x00004334u; /* jalr link before delay slot */ psx_delay_BFC22300 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004330u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22304: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004330u); #endif if (psx_delay_BFC22300) { psx_delay_BFC22300 = 0; { uint32_t _t = cpu->gpr[2]; cpu->gpr[31] = 0x00004334u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, _t); cpu->pc = _t; return; } } label_BFC22308: #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, 0x8u); #endif /* 0xBFC22308: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004334u); #endif /* 0xBFC2230C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004338u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004338u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22310: 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(0x0000433Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004340u); #endif /* 0xBFC22314: 8C62AEAC lw $v0, -20820($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20820; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004340u); return; } cpu->gpr[2] = psx_cyc_load_word(cpu, psx_addr, 2, 0x8u); } PGXP_LOAD(0x8C62AEACu, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00004340u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC22318: AC64AEAC sw $a0, -20820($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20820; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20820)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004344u); return; } g_debug_last_store_pc = 0x00004344u; cpu->write_word(psx_addr, cpu->gpr[4]); } PGXP_STORE(0xAC64AEACu, _pgxa, cpu->gpr[4]); } #ifdef PSX_COSIM cosim_instr(0x00004344u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC2231C: 3C030001 lui $v1, 0x1 */ cpu->gpr[3] = 0x00010000u; PGXP_ALU(0x3C030001u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004348u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10008u); #endif /* 0xBFC22320: AC70AEE8 sw $s0, -20760($v1) */ { uint32_t _pgxa = cpu->gpr[3] + -20760; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (-20760)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000434Cu); return; } g_debug_last_store_pc = 0x0000434Cu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC70AEE8u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x0000434Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004350u); #endif /* 0xBFC22324: 8FB00010 lw $s0, 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, 0x00004350u); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004350u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22328: 03E00008 jr $ra */ psx_delay_BFC22328 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC2232C: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00004358u); #endif if (psx_delay_BFC22328) { psx_delay_BFC22328 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_0000435C(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x0000435Cu); int psx_delay_BFC22338 = 0; int psx_delay_BFC22350 = 0; int psx_delay_BFC2235C = 0; int psx_delay_BFC22384 = 0; int psx_delay_BFC223A8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC22340u: goto label_BFC22340; case 0xBFC22358u: goto label_BFC22358; case 0xBFC22364u: goto label_BFC22364; case 0xBFC2238Cu: goto label_BFC2238C; default: break; } } label_BFC22330: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000435Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22330: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x0000435Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC22334: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004360u); return; } g_debug_last_store_pc = 0x00004360u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004360u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22338: 0C000DF0 jal 0xB00037C0 */ cpu->gpr[31] = 0x0000436Cu; /* jal link before delay slot */ psx_delay_BFC22338 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC2233C: 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, 0x00004368u); return; } g_debug_last_store_pc = 0x00004368u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004368u); #endif if (psx_delay_BFC22338) { psx_delay_BFC22338 = 0; cpu->gpr[31] = 0x0000436Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000037C0u); cpu->pc = 0x000037C0u; return; } label_BFC22340: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000436Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000436Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000436Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22340: 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(0x0000436Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC22344: 0000000C syscall */ cpu->pc = 0x00004370u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00004370u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10000u); #endif /* 0xBFC22348: 3C100001 lui $s0, 0x1 */ cpu->gpr[16] = 0x00010000u; PGXP_ALU(0x3C100001u, cpu->gpr[16], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004374u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC2234C: 2605AECC addiu $a1, $s0, -20788 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20788)); PGXP_ALU(0x2605AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #ifdef PSX_COSIM cosim_instr(0x00004378u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22350: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x00004384u; /* jal link before delay slot */ psx_delay_BFC22350 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004380u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22354: 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(0x00004380u); #endif if (psx_delay_BFC22350) { psx_delay_BFC22350 = 0; cpu->gpr[31] = 0x00004384u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC22358: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004384u); #endif #ifdef PSX_COSIM cosim_block(0x00004384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10020u); #endif /* 0xBFC22358: 2605AECC addiu $a1, $s0, -20788 */ { uint32_t _pgx1 = cpu->gpr[16]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[16] + (-20788)); PGXP_ALU(0x2605AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #ifdef PSX_COSIM cosim_instr(0x00004384u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2235C: 0C0007AE jal 0xB0001EB8 */ cpu->gpr[31] = 0x00004390u; /* jal link before delay slot */ psx_delay_BFC2235C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22360: 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(0x0000438Cu); #endif if (psx_delay_BFC2235C) { psx_delay_BFC2235C = 0; cpu->gpr[31] = 0x00004390u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EB8u); cpu->pc = 0x00001EB8u; return; } label_BFC22364: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004390u); #endif #ifdef PSX_COSIM cosim_block(0x00004390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004390u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22364: 3C03BF80 lui $v1, 0xBF80 */ cpu->gpr[3] = 0xBF800000u; PGXP_ALU(0x3C03BF80u, cpu->gpr[3], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004390u); #endif /* 0xBFC22368: 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, 0x00004394u); 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(0x00004394u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10001u); #endif /* 0xBFC2236C: 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(0x00004398u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22370: 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(0x0000439Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22374: AC621074 sw $v0, 4212($v1) */ { uint32_t _pgxa = cpu->gpr[3] + 4212; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[3] + (4212)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043A0u); return; } g_debug_last_store_pc = 0x000043A0u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xAC621074u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000043A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC22378: 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(0x000043A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2237C: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000043A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22380: 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(0x000043ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22384: 0C000761 jal 0xB0001D84 */ cpu->gpr[31] = 0x000043B8u; /* jal link before delay slot */ psx_delay_BFC22384 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC22388: AC50AEC8 sw $s0, -20792($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20792; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20792)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043B4u); return; } g_debug_last_store_pc = 0x000043B4u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC50AEC8u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000043B4u); #endif if (psx_delay_BFC22384) { psx_delay_BFC22384 = 0; cpu->gpr[31] = 0x000043B8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D84u); cpu->pc = 0x00001D84u; return; } label_BFC2238C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000043B8u); #endif #ifdef PSX_COSIM cosim_block(0x000043B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC2238C: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000043B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC22390: AC50AEE4 sw $s0, -20764($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20764; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20764)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043BCu); return; } g_debug_last_store_pc = 0x000043BCu; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC50AEE4u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000043BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC22394: 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(0x000043C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC22398: 0000000C syscall */ cpu->pc = 0x000043C4u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x000043C4u); #endif /* 0xBFC2239C: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043C8u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000043C8u); #endif /* 0xBFC223A0: 8FB00010 lw $s0, 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, 0x000043CCu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000043CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC223A4: 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(0x000043D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC223A8: 03E00008 jr $ra */ psx_delay_BFC223A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC223AC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000043D8u); #endif if (psx_delay_BFC223A8) { psx_delay_BFC223A8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_000043DC(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000043DCu); int psx_delay_BFC223C4 = 0; int psx_delay_BFC223D4 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC223CCu: goto label_BFC223CC; case 0xBFC223DCu: goto label_BFC223DC; default: break; } } label_BFC223B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000043DCu); #endif #ifdef PSX_COSIM cosim_block(0x000043DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC223B0: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #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, 0x11u); #endif /* 0xBFC223B4: 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(0x000043E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC223B8: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000043E4u); return; } g_debug_last_store_pc = 0x000043E4u; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000043E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC223BC: 0000000C syscall */ cpu->pc = 0x000043E8u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x000043E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC223C0: 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(0x000043ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC223C4: 0C000761 jal 0xB0001D84 */ cpu->gpr[31] = 0x000043F8u; /* jal link before delay slot */ psx_delay_BFC223C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC223C8: 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(0x000043F4u); #endif if (psx_delay_BFC223C4) { psx_delay_BFC223C4 = 0; cpu->gpr[31] = 0x000043F8u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001D84u); cpu->pc = 0x00001D84u; return; } label_BFC223CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000043F8u); #endif #ifdef PSX_COSIM cosim_block(0x000043F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000043F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC223CC: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000043F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC223D0: 24A5AECC addiu $a1, $a1, -20788 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20788)); PGXP_ALU(0x24A5AECCu, cpu->gpr[5], _pgx1, 0xFFFFAECCu); } #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, 0x80000000u); #endif /* 0xBFC223D4: 0C0007B7 jal 0xB0001EDC */ cpu->gpr[31] = 0x00004408u; /* jal link before delay slot */ psx_delay_BFC223D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x11u); #endif /* 0xBFC223D8: 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(0x00004404u); #endif if (psx_delay_BFC223D4) { psx_delay_BFC223D4 = 0; cpu->gpr[31] = 0x00004408u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00001EDCu); cpu->pc = 0x00001EDCu; return; } label_BFC223DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004408u); #endif #ifdef PSX_COSIM cosim_block(0x00004408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC223DC: 3C020001 lui $v0, 0x1 */ cpu->gpr[2] = 0x00010000u; PGXP_ALU(0x3C020001u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004408u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC223E0: AC40AEE4 sw $zero, -20764($v0) */ { uint32_t _pgxa = cpu->gpr[2] + -20764; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (-20764)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x0000440Cu); return; } g_debug_last_store_pc = 0x0000440Cu; cpu->write_word(psx_addr, cpu->gpr[0]); } PGXP_STORE(0xAC40AEE4u, _pgxa, cpu->gpr[0]); } #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, 0x11u); #endif /* 0xBFC223E4: 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(0x00004410u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004414u); cpu->pc = 0x00004414u; return; /* fallthrough */ } void OpenBIOS_func_00004414(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004414u); int psx_delay_BFC223F4 = 0; label_BFC223E8: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004414u); #endif #ifdef PSX_COSIM cosim_block(0x00004414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004414u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x0u); #endif /* 0xBFC223E8: 0000000C syscall */ cpu->pc = 0x00004414u; if (psx_syscall(cpu, cpu->gpr[2])) return; #ifdef PSX_COSIM cosim_instr(0x00004414u); #endif /* 0xBFC223EC: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004418u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004418u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC223F0: 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(0x0000441Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004420u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC223F4: 03E00008 jr $ra */ psx_delay_BFC223F4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC223F8: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x00004424u); #endif if (psx_delay_BFC223F4) { psx_delay_BFC223F4 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_00004428(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004428u); int psx_delay_BFC22404 = 0; int psx_taken_BFC22404 = 0; label_BFC223FC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004428u); #endif #ifdef PSX_COSIM cosim_block(0x00004428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004428u); #endif /* 0xBFC223FC: 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(0x00004428u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22400: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000442Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004430u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22404: 14400012 bne $v0, $zero, 0xBFC22450 */ uint32_t psx_brA_BFC22404 = cpu->gpr[2]; uint32_t psx_brB_BFC22404 = cpu->gpr[0]; psx_taken_BFC22404 = (psx_brA_BFC22404 != psx_brB_BFC22404); psx_delay_BFC22404 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22408: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004434u); #endif if (psx_delay_BFC22404) { psx_delay_BFC22404 = 0; if (psx_taken_BFC22404) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000447Cu); cpu->pc = 0x0000447Cu; return; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004438u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004438u); cpu->pc = 0x00004438u; return; /* fallthrough */ } void OpenBIOS_func_00004438(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004438u); label_BFC2240C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004438u); #endif #ifdef PSX_COSIM cosim_block(0x00004438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004438u); #endif /* 0xBFC2240C: 90A60001 lbu $a2, 1($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 1; cpu->gpr[6] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (1)), 6, 0x20u); PGXP_LOAD(0x90A60001u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x00004438u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22410: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000443Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004440u); cpu->pc = 0x00004440u; return; /* fallthrough */ } void OpenBIOS_func_00004440(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x00004440u); int psx_delay_BFC22418 = 0; int psx_taken_BFC22418 = 0; int psx_delay_BFC22420 = 0; int psx_taken_BFC22420 = 0; int psx_delay_BFC22444 = 0; int psx_taken_BFC22444 = 0; int psx_delay_BFC22450 = 0; int psx_delay_BFC22468 = 0; int psx_taken_BFC22468 = 0; int psx_delay_BFC22488 = 0; int psx_taken_BFC22488 = 0; int psx_delay_BFC22494 = 0; int psx_taken_BFC22494 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC22450u: goto label_BFC22450; case 0xBFC22420u: goto label_BFC22420; case 0xBFC22428u: goto label_BFC22428; case 0xBFC2244Cu: goto label_BFC2244C; case 0xBFC22458u: goto label_BFC22458; case 0xBFC22470u: goto label_BFC22470; case 0xBFC2247Cu: goto label_BFC2247C; case 0xBFC22490u: goto label_BFC22490; default: break; } } label_BFC22414: #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, 0x44u); #endif /* 0xBFC22414: 38C20041 xori $v0, $a2, 0x41 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] ^ 0x41u; PGXP_ALU(0x38C20041u, cpu->gpr[2], _pgx1, 0x0041u); } #ifdef PSX_COSIM cosim_instr(0x00004440u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22418: 10400003 beq $v0, $zero, 0xBFC22428 */ uint32_t psx_brA_BFC22418 = cpu->gpr[2]; uint32_t psx_brB_BFC22418 = cpu->gpr[0]; psx_taken_BFC22418 = (psx_brA_BFC22418 == psx_brB_BFC22418); psx_delay_BFC22418 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x44u); #endif /* 0xBFC2241C: 38C20023 xori $v0, $a2, 0x23 */ { uint32_t _pgx1 = cpu->gpr[6]; cpu->gpr[2] = cpu->gpr[6] ^ 0x23u; PGXP_ALU(0x38C20023u, cpu->gpr[2], _pgx1, 0x0023u); } #ifdef PSX_COSIM cosim_instr(0x00004448u); #endif if (psx_delay_BFC22418) { psx_delay_BFC22418 = 0; if (psx_taken_BFC22418) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004454u); goto label_BFC22428; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000444Cu); } label_BFC22420: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000444Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000444Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000444Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22420: 1440000B bne $v0, $zero, 0xBFC22450 */ uint32_t psx_brA_BFC22420 = cpu->gpr[2]; uint32_t psx_brB_BFC22420 = cpu->gpr[0]; psx_taken_BFC22420 = (psx_brA_BFC22420 != psx_brB_BFC22420); psx_delay_BFC22420 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004450u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22424: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004450u); #endif if (psx_delay_BFC22420) { psx_delay_BFC22420 = 0; if (psx_taken_BFC22420) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000447Cu); goto label_BFC22450; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004454u); } label_BFC22428: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004454u); #endif #ifdef PSX_COSIM cosim_block(0x00004454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004454u); #endif /* 0xBFC22428: 94A30002 lhu $v1, 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, 0x00004454u); return; } cpu->gpr[3] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 3, 0x20u); } PGXP_LOAD(0x94A30002u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004454u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2242C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004458u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22430: 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(0x0000445Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22434: 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(0x00004460u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22438: 00031A00 sll $v1, $v1, 8 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = cpu->gpr[3] << 8u; PGXP_ALU(0x00031A00u, cpu->gpr[3], _pgx1, 8u); } #ifdef PSX_COSIM cosim_instr(0x00004464u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC2243C: 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(0x00004468u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC22440: 24030023 addiu $v1, $zero, 35 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (35)); PGXP_ALU(0x24030023u, cpu->gpr[3], _pgx1, 0x00000023u); } #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, 0x48u); #endif /* 0xBFC22444: 10C30004 beq $a2, $v1, 0xBFC22458 */ uint32_t psx_brA_BFC22444 = cpu->gpr[6]; uint32_t psx_brB_BFC22444 = cpu->gpr[3]; psx_taken_BFC22444 = (psx_brA_BFC22444 == psx_brB_BFC22444); psx_delay_BFC22444 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22448: 344307C7 ori $v1, $v0, 0x7C7 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[3] = cpu->gpr[2] | 0x7C7u; PGXP_ALU(0x344307C7u, cpu->gpr[3], _pgx1, 0x07C7u); } #ifdef PSX_COSIM cosim_instr(0x00004474u); #endif if (psx_delay_BFC22444) { psx_delay_BFC22444 = 0; if (psx_taken_BFC22444) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004484u); goto label_BFC22458; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004478u); } label_BFC2244C: #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 #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC2244C: 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, 0x00004478u); return; } g_debug_last_store_pc = 0x00004478u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x00004478u); #endif label_BFC22450: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000447Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000447Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000447Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC22450: 03E00008 jr $ra */ psx_delay_BFC22450 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004480u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22454: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x00004480u); #endif if (psx_delay_BFC22450) { psx_delay_BFC22450 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC22458: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004484u); #endif #ifdef PSX_COSIM cosim_block(0x00004484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004484u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x18u); #endif /* 0xBFC22458: A4830000 sh $v1, 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, 0x00004484u); return; } g_debug_last_store_pc = 0x00004484u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[3] & 0xFFFFu)); } PGXP_STORE(0xA4830000u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004484u); #endif /* 0xBFC2245C: 90A30005 lbu $v1, 5($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 5; cpu->gpr[3] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (5)), 3, 0x20u); PGXP_LOAD(0x90A30005u, _pgxa, cpu->gpr[3]); } #ifdef PSX_COSIM cosim_instr(0x00004488u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22460: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x0000448Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x8u); #endif /* 0xBFC22464: 2C630011 sltiu $v1, $v1, 17 */ { uint32_t _pgx1 = cpu->gpr[3]; cpu->gpr[3] = (uint32_t)(cpu->gpr[3] < 0x00000011u ? 1 : 0); PGXP_ALU(0x2C630011u, cpu->gpr[3], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x00004490u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC22468: 14600004 bne $v1, $zero, 0xBFC2247C */ uint32_t psx_brA_BFC22468 = cpu->gpr[3]; uint32_t psx_brB_BFC22468 = cpu->gpr[0]; psx_taken_BFC22468 = (psx_brA_BFC22468 != psx_brB_BFC22468); psx_delay_BFC22468 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x9u); #endif /* 0xBFC2246C: 2403FFBF addiu $v1, $zero, -65 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[3] = (uint32_t)((int32_t)cpu->gpr[0] + (-65)); PGXP_ALU(0x2403FFBFu, cpu->gpr[3], _pgx1, 0xFFFFFFBFu); } #ifdef PSX_COSIM cosim_instr(0x00004498u); #endif if (psx_delay_BFC22468) { psx_delay_BFC22468 = 0; if (psx_taken_BFC22468) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000044A8u); goto label_BFC2247C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000449Cu); } label_BFC22470: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000449Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000449Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000449Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xCu); #endif /* 0xBFC22470: 00431024 and $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(0x00431024u, cpu->gpr[2], _pgx1, _pgx2); } #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, 0x4u); #endif /* 0xBFC22474: 34420787 ori $v0, $v0, 0x787 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[2] | 0x787u; PGXP_ALU(0x34420787u, cpu->gpr[2], _pgx1, 0x0787u); } #ifdef PSX_COSIM cosim_instr(0x000044A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC22478: 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, 0x000044A4u); return; } g_debug_last_store_pc = 0x000044A4u; cpu->write_half(psx_addr, (uint16_t)(cpu->gpr[2] & 0xFFFFu)); } PGXP_STORE(0xA4820000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000044A4u); #endif label_BFC2247C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000044A8u); #endif #ifdef PSX_COSIM cosim_block(0x000044A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044A8u); #endif /* 0xBFC2247C: 90A20006 lbu $v0, 6($a1) */ { uint32_t _pgxa = cpu->gpr[5] + 6; cpu->gpr[2] = (uint32_t)psx_cyc_load_byte(cpu, (uint32_t)((int32_t)cpu->gpr[5] + (6)), 2, 0x20u); PGXP_LOAD(0x90A20006u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000044A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22480: 00000000 nop */ /* nop */ #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, 0x4u); #endif /* 0xBFC22484: 2C420011 sltiu $v0, $v0, 17 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000011u ? 1 : 0); PGXP_ALU(0x2C420011u, cpu->gpr[2], _pgx1, 0x0011u); } #ifdef PSX_COSIM cosim_instr(0x000044B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22488: 1440FFF1 bne $v0, $zero, 0xBFC22450 */ uint32_t psx_brA_BFC22488 = cpu->gpr[2]; uint32_t psx_brB_BFC22488 = cpu->gpr[0]; psx_taken_BFC22488 = (psx_brA_BFC22488 != psx_brB_BFC22488); psx_delay_BFC22488 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC2248C: 00000000 nop */ /* nop */ #ifdef PSX_COSIM cosim_instr(0x000044B8u); #endif if (psx_delay_BFC22488) { psx_delay_BFC22488 = 0; if (psx_taken_BFC22488) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000447Cu); goto label_BFC22450; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000044BCu); } label_BFC22490: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000044BCu); #endif #ifdef PSX_COSIM cosim_block(0x000044BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044BCu); #endif /* 0xBFC22490: 94820000 lhu $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, 0x000044BCu); return; } cpu->gpr[2] = (uint32_t)psx_cyc_load_half(cpu, psx_addr, 2, 0x10u); } PGXP_LOAD(0x94820000u, _pgxa, cpu->gpr[2]); } #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, 0x1u); #endif /* 0xBFC22494: 1000FFED beq $zero, $zero, 0xBFC2244C */ uint32_t psx_brA_BFC22494 = cpu->gpr[0]; uint32_t psx_brB_BFC22494 = cpu->gpr[0]; psx_taken_BFC22494 = (psx_brA_BFC22494 == psx_brB_BFC22494); psx_delay_BFC22494 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22498: 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(0x000044C4u); #endif if (psx_delay_BFC22494) { psx_delay_BFC22494 = 0; if (psx_taken_BFC22494) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004478u); goto label_BFC2244C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000044C8u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000044C8u); cpu->pc = 0x000044C8u; return; /* fallthrough */ } void OpenBIOS_func_000044C8(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000044C8u); int psx_delay_BFC224C4 = 0; int psx_taken_BFC224C4 = 0; int psx_delay_BFC224D4 = 0; int psx_taken_BFC224D4 = 0; int psx_delay_BFC224E8 = 0; int psx_delay_BFC224F8 = 0; int psx_delay_BFC22508 = 0; int psx_delay_BFC2251C = 0; int psx_delay_BFC22528 = 0; int psx_delay_BFC22544 = 0; int psx_delay_BFC22550 = 0; int psx_delay_BFC22558 = 0; int psx_taken_BFC22558 = 0; int psx_delay_BFC22568 = 0; int psx_delay_BFC22570 = 0; int psx_taken_BFC22570 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC224CCu: goto label_BFC224CC; case 0xBFC224DCu: goto label_BFC224DC; case 0xBFC224F0u: goto label_BFC224F0; case 0xBFC22500u: goto label_BFC22500; case 0xBFC22510u: goto label_BFC22510; case 0xBFC22524u: goto label_BFC22524; case 0xBFC22530u: goto label_BFC22530; case 0xBFC22534u: goto label_BFC22534; case 0xBFC2254Cu: goto label_BFC2254C; case 0xBFC22558u: goto label_BFC22558; case 0xBFC22560u: goto label_BFC22560; case 0xBFC22570u: goto label_BFC22570; default: break; } } label_BFC2249C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000044C8u); #endif #ifdef PSX_COSIM cosim_block(0x000044C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC2249C: 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(0x000044C8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC224A0: 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, 0x000044CCu); return; } g_debug_last_store_pc = 0x000044CCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF001Cu, _pgxa, cpu->gpr[31]); } #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, 0x20040000u); #endif /* 0xBFC224A4: 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, 0x000044D0u); return; } g_debug_last_store_pc = 0x000044D0u; cpu->write_word(psx_addr, cpu->gpr[18]); } PGXP_STORE(0xAFB20018u, _pgxa, cpu->gpr[18]); } #ifdef PSX_COSIM cosim_instr(0x000044D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20020000u); #endif /* 0xBFC224A8: 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, 0x000044D4u); return; } g_debug_last_store_pc = 0x000044D4u; cpu->write_word(psx_addr, cpu->gpr[17]); } PGXP_STORE(0xAFB10014u, _pgxa, cpu->gpr[17]); } #ifdef PSX_COSIM cosim_instr(0x000044D4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010000u); #endif /* 0xBFC224AC: 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, 0x000044D8u); return; } g_debug_last_store_pc = 0x000044D8u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAFB00010u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x000044D8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000020u); #endif /* 0xBFC224B0: 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, 0x000044DCu); return; } g_debug_last_store_pc = 0x000044DCu; cpu->write_word(psx_addr, cpu->gpr[5]); } PGXP_STORE(0xAFA50004u, _pgxa, cpu->gpr[5]); } #ifdef PSX_COSIM cosim_instr(0x000044DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000040u); #endif /* 0xBFC224B4: AFA60008 sw $a2, 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, 0x000044E0u); return; } g_debug_last_store_pc = 0x000044E0u; cpu->write_word(psx_addr, cpu->gpr[6]); } PGXP_STORE(0xAFA60008u, _pgxa, cpu->gpr[6]); } #ifdef PSX_COSIM cosim_instr(0x000044E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000080u); #endif /* 0xBFC224B8: AFA7000C sw $a3, 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, 0x000044E4u); return; } g_debug_last_store_pc = 0x000044E4u; cpu->write_word(psx_addr, cpu->gpr[7]); } PGXP_STORE(0xAFA7000Cu, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000044E4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC224BC: 3C021000 lui $v0, 0x1000 */ cpu->gpr[2] = 0x10000000u; PGXP_ALU(0x3C021000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000044E8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC224C0: 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(0x000044ECu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044F0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC224C4: 10820021 beq $a0, $v0, 0xBFC2254C */ uint32_t psx_brA_BFC224C4 = cpu->gpr[4]; uint32_t psx_brB_BFC224C4 = cpu->gpr[2]; psx_taken_BFC224C4 = (psx_brA_BFC224C4 == psx_brB_BFC224C4); psx_delay_BFC224C4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC224C8: 3C02E000 lui $v0, 0xE000 */ cpu->gpr[2] = 0xE0000000u; PGXP_ALU(0x3C02E000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000044F4u); #endif if (psx_delay_BFC224C4) { psx_delay_BFC224C4 = 0; if (psx_taken_BFC224C4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004578u); goto label_BFC2254C; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000044F8u); } label_BFC224CC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000044F8u); #endif #ifdef PSX_COSIM cosim_block(0x000044F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000044F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x14u); #endif /* 0xBFC224CC: 00821021 addu $v0, $a0, $v0 */ { uint32_t _pgx1 = cpu->gpr[4]; uint32_t _pgx2 = cpu->gpr[2]; cpu->gpr[2] = cpu->gpr[4] + cpu->gpr[2]; PGXP_ALU(0x00821021u, cpu->gpr[2], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000044F8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC224D0: 2C420002 sltiu $v0, $v0, 2 */ { uint32_t _pgx1 = cpu->gpr[2]; cpu->gpr[2] = (uint32_t)(cpu->gpr[2] < 0x00000002u ? 1 : 0); PGXP_ALU(0x2C420002u, cpu->gpr[2], _pgx1, 0x0002u); } #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, 0x5u); #endif /* 0xBFC224D4: 10400022 beq $v0, $zero, 0xBFC22560 */ uint32_t psx_brA_BFC224D4 = cpu->gpr[2]; uint32_t psx_brB_BFC224D4 = cpu->gpr[0]; psx_taken_BFC224D4 = (psx_brA_BFC224D4 == psx_brB_BFC224D4); psx_delay_BFC224D4 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000u); #endif /* 0xBFC224D8: 3C110001 lui $s1, 0x1 */ cpu->gpr[17] = 0x00010000u; PGXP_ALU(0x3C110001u, cpu->gpr[17], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004504u); #endif if (psx_delay_BFC224D4) { psx_delay_BFC224D4 = 0; if (psx_taken_BFC224D4) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000458Cu); goto label_BFC22560; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004508u); } label_BFC224DC: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004508u); #endif #ifdef PSX_COSIM cosim_block(0x00004508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC224DC: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004508u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC224E0: 24849C88 addiu $a0, $a0, -25464 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25464)); PGXP_ALU(0x24849C88u, cpu->gpr[4], _pgx1, 0xFFFF9C88u); } #ifdef PSX_COSIM cosim_instr(0x0000450Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10021u); #endif /* 0xBFC224E4: 00A08025 or $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(0x00A08025u, cpu->gpr[16], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x00004510u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC224E8: 0C000AC5 jal 0xB0002B14 */ cpu->gpr[31] = 0x0000451Cu; /* jal link before delay slot */ psx_delay_BFC224E8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40000u); #endif /* 0xBFC224EC: 3C120001 lui $s2, 0x1 */ cpu->gpr[18] = 0x00010000u; PGXP_ALU(0x3C120001u, cpu->gpr[18], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004518u); #endif if (psx_delay_BFC224E8) { psx_delay_BFC224E8 = 0; cpu->gpr[31] = 0x0000451Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B14u); cpu->pc = 0x00002B14u; return; } label_BFC224F0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000451Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000451Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000451Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x41u); #endif /* 0xBFC224F0: 24060022 addiu $a2, $zero, 34 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); PGXP_ALU(0x24060022u, cpu->gpr[6], _pgx1, 0x00000022u); } #ifdef PSX_COSIM cosim_instr(0x0000451Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC224F4: 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(0x00004520u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC224F8: 0C000150 jal 0xB0000540 */ cpu->gpr[31] = 0x0000452Cu; /* jal link before delay slot */ psx_delay_BFC224F8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC224FC: 2624AF1C addiu $a0, $s1, -20708 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (-20708)); PGXP_ALU(0x2624AF1Cu, cpu->gpr[4], _pgx1, 0xFFFFAF1Cu); } #ifdef PSX_COSIM cosim_instr(0x00004528u); #endif if (psx_delay_BFC224F8) { psx_delay_BFC224F8 = 0; cpu->gpr[31] = 0x0000452Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000540u); cpu->pc = 0x00000540u; return; } label_BFC22500: #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, 0x41u); #endif /* 0xBFC22500: 24060022 addiu $a2, $zero, 34 */ { uint32_t _pgx1 = cpu->gpr[0]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[0] + (34)); PGXP_ALU(0x24060022u, cpu->gpr[6], _pgx1, 0x00000022u); } #ifdef PSX_COSIM cosim_instr(0x0000452Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC22504: 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(0x00004530u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22508: 0C000150 jal 0xB0000540 */ cpu->gpr[31] = 0x0000453Cu; /* jal link before delay slot */ psx_delay_BFC22508 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40010u); #endif /* 0xBFC2250C: 2644AEF8 addiu $a0, $s2, -20744 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[18] + (-20744)); PGXP_ALU(0x2644AEF8u, cpu->gpr[4], _pgx1, 0xFFFFAEF8u); } #ifdef PSX_COSIM cosim_instr(0x00004538u); #endif if (psx_delay_BFC22508) { psx_delay_BFC22508 = 0; cpu->gpr[31] = 0x0000453Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00000540u); cpu->pc = 0x00000540u; return; } label_BFC22510: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000453Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000453Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000453Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x81u); #endif /* 0xBFC22510: 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(0x0000453Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x40040u); #endif /* 0xBFC22514: 2646AEF8 addiu $a2, $s2, -20744 */ { uint32_t _pgx1 = cpu->gpr[18]; cpu->gpr[6] = (uint32_t)((int32_t)cpu->gpr[18] + (-20744)); PGXP_ALU(0x2646AEF8u, cpu->gpr[6], _pgx1, 0xFFFFAEF8u); } #ifdef PSX_COSIM cosim_instr(0x00004540u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x21u); #endif /* 0xBFC22518: 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(0x00004544u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC2251C: 0C001031 jal 0xB00040C4 */ cpu->gpr[31] = 0x00004550u; /* jal link before delay slot */ psx_delay_BFC2251C = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20010u); #endif /* 0xBFC22520: 2624AF1C addiu $a0, $s1, -20708 */ { uint32_t _pgx1 = cpu->gpr[17]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[17] + (-20708)); PGXP_ALU(0x2624AF1Cu, cpu->gpr[4], _pgx1, 0xFFFFAF1Cu); } #ifdef PSX_COSIM cosim_instr(0x0000454Cu); #endif if (psx_delay_BFC2251C) { psx_delay_BFC2251C = 0; cpu->gpr[31] = 0x00004550u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000040C4u); cpu->pc = 0x000040C4u; return; } label_BFC22524: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004550u); #endif #ifdef PSX_COSIM cosim_block(0x00004550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22524: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004550u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22528: 0C00106E jal 0xB00041B8 */ cpu->gpr[31] = 0x0000455Cu; /* jal link before delay slot */ psx_delay_BFC22528 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10004u); #endif /* 0xBFC2252C: AC504C64 sw $s0, 19556($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19556; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004558u); return; } g_debug_last_store_pc = 0x00004558u; cpu->write_word(psx_addr, cpu->gpr[16]); } PGXP_STORE(0xAC504C64u, _pgxa, cpu->gpr[16]); } #ifdef PSX_COSIM cosim_instr(0x00004558u); #endif if (psx_delay_BFC22528) { psx_delay_BFC22528 = 0; cpu->gpr[31] = 0x0000455Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000041B8u); cpu->pc = 0x000041B8u; return; } label_BFC22530: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000455Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000455Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000455Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22530: 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(0x0000455Cu); #endif label_BFC22534: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004560u); #endif #ifdef PSX_COSIM cosim_block(0x00004560u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004560u); #endif /* 0xBFC22534: 8FBF001C lw $ra, 28($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 28; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (28)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x00004560u); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF001Cu, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x00004560u); #endif /* 0xBFC22538: 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, 0x00004564u); 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(0x00004564u); #endif /* 0xBFC2253C: 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, 0x00004568u); 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(0x00004568u); #endif /* 0xBFC22540: 8FB00010 lw $s0, 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, 0x0000456Cu); return; } cpu->gpr[16] = psx_cyc_load_word(cpu, psx_addr, 16, 0x20000000u); } PGXP_LOAD(0x8FB00010u, _pgxa, cpu->gpr[16]); } #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, 0x80000001u); #endif /* 0xBFC22544: 03E00008 jr $ra */ psx_delay_BFC22544 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22548: 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(0x00004574u); #endif if (psx_delay_BFC22544) { psx_delay_BFC22544 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_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_BFC2254C: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x00004578u); #endif #ifdef PSX_COSIM cosim_block(0x00004578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2254C: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004578u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22550: 0C000AC5 jal 0xB0002B14 */ cpu->gpr[31] = 0x00004584u; /* jal link before delay slot */ psx_delay_BFC22550 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004580u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC22554: 24849CB0 addiu $a0, $a0, -25424 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25424)); PGXP_ALU(0x24849CB0u, cpu->gpr[4], _pgx1, 0xFFFF9CB0u); } #ifdef PSX_COSIM cosim_instr(0x00004580u); #endif if (psx_delay_BFC22550) { psx_delay_BFC22550 = 0; cpu->gpr[31] = 0x00004584u; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B14u); cpu->pc = 0x00002B14u; return; } label_BFC22558: #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, 0x1u); #endif /* 0xBFC22558: 1000FFF6 beq $zero, $zero, 0xBFC22534 */ uint32_t psx_brA_BFC22558 = cpu->gpr[0]; uint32_t psx_brB_BFC22558 = cpu->gpr[0]; psx_taken_BFC22558 = (psx_brA_BFC22558 == psx_brB_BFC22558); psx_delay_BFC22558 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC2255C: 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(0x00004588u); #endif if (psx_delay_BFC22558) { psx_delay_BFC22558 = 0; if (psx_taken_BFC22558) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004560u); goto label_BFC22534; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x0000458Cu); } label_BFC22560: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000458Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000458Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000458Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x31u); #endif /* 0xBFC22560: 00802825 or $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(0x00802825u, cpu->gpr[5], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x0000458Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x00004590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC22564: 3C04BFC1 lui $a0, 0xBFC1 */ cpu->gpr[4] = 0xBFC10000u; PGXP_ALU(0x3C04BFC1u, cpu->gpr[4], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x00004590u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22568: 0C000AC5 jal 0xB0002B14 */ cpu->gpr[31] = 0x0000459Cu; /* jal link before delay slot */ psx_delay_BFC22568 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x10u); #endif /* 0xBFC2256C: 24849CDC addiu $a0, $a0, -25380 */ { uint32_t _pgx1 = cpu->gpr[4]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[4] + (-25380)); PGXP_ALU(0x24849CDCu, cpu->gpr[4], _pgx1, 0xFFFF9CDCu); } #ifdef PSX_COSIM cosim_instr(0x00004598u); #endif if (psx_delay_BFC22568) { psx_delay_BFC22568 = 0; cpu->gpr[31] = 0x0000459Cu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00002B14u); cpu->pc = 0x00002B14u; return; } label_BFC22570: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x0000459Cu); #endif #ifdef PSX_COSIM cosim_block(0x0000459Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x0000459Cu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x1u); #endif /* 0xBFC22570: 1000FFF0 beq $zero, $zero, 0xBFC22534 */ uint32_t psx_brA_BFC22570 = cpu->gpr[0]; uint32_t psx_brB_BFC22570 = cpu->gpr[0]; psx_taken_BFC22570 = (psx_brA_BFC22570 == psx_brB_BFC22570); psx_delay_BFC22570 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045A0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22574: 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(0x000045A0u); #endif if (psx_delay_BFC22570) { psx_delay_BFC22570 = 0; if (psx_taken_BFC22570) { #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004560u); goto label_BFC22534; } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000045A4u); } #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x000045A4u); cpu->pc = 0x000045A4u; return; /* fallthrough */ } void OpenBIOS_func_000045A4(CPUState* cpu) { #if defined(PSX_ENABLE_BLOCK_CYCLES) && (defined(__GNUC__) || defined(__clang__)) __attribute__((cleanup(psx_cyc_bb_defer_cleanup))) int _psx_cyc_bb_guard = 1; psx_cyc_bb_defer_begin(); #endif debug_server_log_call_entry(0x000045A4u); int psx_delay_BFC22598 = 0; int psx_delay_BFC225A8 = 0; int psx_delay_BFC225B8 = 0; if (cpu->pc != 0) { uint32_t _cont = cpu->pc; cpu->pc = 0; switch (_cont) { case 0xBFC225A0u: goto label_BFC225A0; case 0xBFC225B0u: goto label_BFC225B0; default: break; } } label_BFC22578: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000045A4u); #endif #ifdef PSX_COSIM cosim_block(0x000045A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045A4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x4u); #endif /* 0xBFC22578: 3C020000 lui $v0, 0x0 */ cpu->gpr[2] = 0x00000000u; PGXP_ALU(0x3C020000u, cpu->gpr[2], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000045A4u); #endif /* 0xBFC2257C: 8C474C64 lw $a3, 19556($v0) */ { uint32_t _pgxa = cpu->gpr[2] + 19556; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[2] + (19556)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045A8u); return; } cpu->gpr[7] = psx_cyc_load_word(cpu, psx_addr, 7, 0x4u); } PGXP_LOAD(0x8C474C64u, _pgxa, cpu->gpr[7]); } #ifdef PSX_COSIM cosim_instr(0x000045A8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC22580: 27BDFFE8 addiu $sp, $sp, -24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (-24)); PGXP_ALU(0x27BDFFE8u, cpu->gpr[29], _pgx1, 0xFFFFFFE8u); } #ifdef PSX_COSIM cosim_instr(0x000045ACu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x5u); #endif /* 0xBFC22584: 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(0x000045B0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC22588: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #ifdef PSX_COSIM cosim_instr(0x000045B4u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC2258C: 24A5AF1C addiu $a1, $a1, -20708 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20708)); PGXP_ALU(0x24A5AF1Cu, cpu->gpr[5], _pgx1, 0xFFFFAF1Cu); } #ifdef PSX_COSIM cosim_instr(0x000045B8u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0xA0000000u); #endif /* 0xBFC22590: AFBF0014 sw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { psx_store_cycle_barrier(); uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045BCu); return; } g_debug_last_store_pc = 0x000045BCu; cpu->write_word(psx_addr, cpu->gpr[31]); } PGXP_STORE(0xAFBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000045BCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x91u); #endif /* 0xBFC22594: 00E02025 or $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(0x00E02025u, cpu->gpr[4], _pgx1, _pgx2); } #ifdef PSX_COSIM cosim_instr(0x000045C0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC22598: 0C00110A jal 0xB0004428 */ cpu->gpr[31] = 0x000045CCu; /* jal link before delay slot */ psx_delay_BFC22598 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x84u); #endif /* 0xBFC2259C: ACE20000 sw $v0, 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, 0x000045C8u); return; } g_debug_last_store_pc = 0x000045C8u; cpu->write_word(psx_addr, cpu->gpr[2]); } PGXP_STORE(0xACE20000u, _pgxa, cpu->gpr[2]); } #ifdef PSX_COSIM cosim_instr(0x000045C8u); #endif if (psx_delay_BFC22598) { psx_delay_BFC22598 = 0; cpu->gpr[31] = 0x000045CCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004428u); cpu->pc = 0x00004428u; return; } label_BFC225A0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000045CCu); #endif #ifdef PSX_COSIM cosim_block(0x000045CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045CCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20u); #endif /* 0xBFC225A0: 3C050001 lui $a1, 0x1 */ cpu->gpr[5] = 0x00010000u; PGXP_ALU(0x3C050001u, cpu->gpr[5], 0u, 0u); #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, 0x20u); #endif /* 0xBFC225A4: 24A5AEF8 addiu $a1, $a1, -20744 */ { uint32_t _pgx1 = cpu->gpr[5]; cpu->gpr[5] = (uint32_t)((int32_t)cpu->gpr[5] + (-20744)); PGXP_ALU(0x24A5AEF8u, cpu->gpr[5], _pgx1, 0xFFFFAEF8u); } #ifdef PSX_COSIM cosim_instr(0x000045D0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000000u); #endif /* 0xBFC225A8: 0C00110A jal 0xB0004428 */ cpu->gpr[31] = 0x000045DCu; /* jal link before delay slot */ psx_delay_BFC225A8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x90u); #endif /* 0xBFC225AC: 24E40002 addiu $a0, $a3, 2 */ { uint32_t _pgx1 = cpu->gpr[7]; cpu->gpr[4] = (uint32_t)((int32_t)cpu->gpr[7] + (2)); PGXP_ALU(0x24E40002u, cpu->gpr[4], _pgx1, 0x00000002u); } #ifdef PSX_COSIM cosim_instr(0x000045D8u); #endif if (psx_delay_BFC225A8) { psx_delay_BFC225A8 = 0; cpu->gpr[31] = 0x000045DCu; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, 0x00004428u); cpu->pc = 0x00004428u; return; } label_BFC225B0: #ifndef PSX_NO_DEBUG_TOOLS debug_server_cyc_observe(0x000045DCu); #endif #ifdef PSX_COSIM cosim_block(0x000045DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045DCu); #endif /* 0xBFC225B0: 8FBF0014 lw $ra, 20($sp) */ { uint32_t _pgxa = cpu->gpr[29] + 20; { uint32_t psx_addr = (uint32_t)((int32_t)cpu->gpr[29] + (20)); if (psx_addr & 3u) { psx_unaligned_access(cpu, psx_addr, 0x000045DCu); return; } cpu->gpr[31] = psx_cyc_load_word(cpu, psx_addr, 31, 0x20000000u); } PGXP_LOAD(0x8FBF0014u, _pgxa, cpu->gpr[31]); } #ifdef PSX_COSIM cosim_instr(0x000045DCu); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_icache_fetch(cpu, 0x000045E0u); #endif /* 0xBFC225B4: 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, 0x000045E0u); 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(0x000045E0u); #endif #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x80000001u); #endif /* 0xBFC225B8: 03E00008 jr $ra */ psx_delay_BFC225B8 = 1; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_step(cpu, 0x20000000u); #endif /* 0xBFC225BC: 27BD0018 addiu $sp, $sp, 24 */ { uint32_t _pgx1 = cpu->gpr[29]; cpu->gpr[29] = (uint32_t)((int32_t)cpu->gpr[29] + (24)); PGXP_ALU(0x27BD0018u, cpu->gpr[29], _pgx1, 0x00000018u); } #ifdef PSX_COSIM cosim_instr(0x000045E8u); #endif if (psx_delay_BFC225B8) { psx_delay_BFC225B8 = 0; #ifdef PSX_ENABLE_BLOCK_CYCLES psx_cyc_bb_defer_flush(); #endif psx_check_interrupts_at(cpu, cpu->gpr[31]); cpu->pc = cpu->gpr[31]; return; /* CPS: publish $ra for trampoline dispatch */ } } void OpenBIOS_func_1FC095F8(CPUState* cpu) { psx_unknown_dispatch(cpu, 0xBFC095F8u, 0x1FC095F8u); } void OpenBIOS_func_000046A0(CPUState* cpu) { psx_unknown_dispatch(cpu, 0xBFC22674u, 0x000046A0u); } void OpenBIOS_func_00004800(CPUState* cpu) { psx_unknown_dispatch(cpu, 0xBFC227D4u, 0x00004800u); } void OpenBIOS_func_00004810(CPUState* cpu) { psx_unknown_dispatch(cpu, 0xBFC227E4u, 0x00004810u); } /* --- 3335 continuation wrappers for jal/jalr return routing --- */ void OpenBIOS_func_00000540_cont_BFC1E51C(CPUState* cpu) { cpu->pc = 0xBFC1E51Cu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E528(CPUState* cpu) { cpu->pc = 0xBFC1E528u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E530(CPUState* cpu) { cpu->pc = 0xBFC1E530u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E53C(CPUState* cpu) { cpu->pc = 0xBFC1E53Cu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E540(CPUState* cpu) { cpu->pc = 0xBFC1E540u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E58C(CPUState* cpu) { cpu->pc = 0xBFC1E58Cu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E594(CPUState* cpu) { cpu->pc = 0xBFC1E594u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E59C(CPUState* cpu) { cpu->pc = 0xBFC1E59Cu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E5A4(CPUState* cpu) { cpu->pc = 0xBFC1E5A4u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E5A8(CPUState* cpu) { cpu->pc = 0xBFC1E5A8u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E5AC(CPUState* cpu) { cpu->pc = 0xBFC1E5ACu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E6B4(CPUState* cpu) { cpu->pc = 0xBFC1E6B4u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E6BC(CPUState* cpu) { cpu->pc = 0xBFC1E6BCu; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_00000540_cont_BFC1E6C4(CPUState* cpu) { cpu->pc = 0xBFC1E6C4u; OpenBIOS_func_00000540(cpu); } void OpenBIOS_func_0000070C_cont_BFC1E6F4(CPUState* cpu) { cpu->pc = 0xBFC1E6F4u; OpenBIOS_func_0000070C(cpu); } void OpenBIOS_func_0000070C_cont_BFC1E704(CPUState* cpu) { cpu->pc = 0xBFC1E704u; OpenBIOS_func_0000070C(cpu); } void OpenBIOS_func_0000070C_cont_BFC1E714(CPUState* cpu) { cpu->pc = 0xBFC1E714u; OpenBIOS_func_0000070C(cpu); } void OpenBIOS_func_0000070C_cont_BFC1E724(CPUState* cpu) { cpu->pc = 0xBFC1E724u; OpenBIOS_func_0000070C(cpu); } void OpenBIOS_func_00000774_cont_BFC1E770(CPUState* cpu) { cpu->pc = 0xBFC1E770u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000774_cont_BFC1E780(CPUState* cpu) { cpu->pc = 0xBFC1E780u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000774_cont_BFC1E790(CPUState* cpu) { cpu->pc = 0xBFC1E790u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000774_cont_BFC1E7A0(CPUState* cpu) { cpu->pc = 0xBFC1E7A0u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000774_cont_BFC1E7B0(CPUState* cpu) { cpu->pc = 0xBFC1E7B0u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000774_cont_BFC1E7C0(CPUState* cpu) { cpu->pc = 0xBFC1E7C0u; OpenBIOS_func_00000774(cpu); } void OpenBIOS_func_00000820_cont_BFC1E7F8(CPUState* cpu) { cpu->pc = 0xBFC1E7F8u; OpenBIOS_func_00000820(cpu); } void OpenBIOS_func_00000820_cont_BFC1E7FC(CPUState* cpu) { cpu->pc = 0xBFC1E7FCu; OpenBIOS_func_00000820(cpu); } void OpenBIOS_func_00000874_cont_BFC1E8AC(CPUState* cpu) { cpu->pc = 0xBFC1E8ACu; OpenBIOS_func_00000874(cpu); } void OpenBIOS_func_00000874_cont_BFC1E8C4(CPUState* cpu) { cpu->pc = 0xBFC1E8C4u; OpenBIOS_func_00000874(cpu); } void OpenBIOS_func_00000978_cont_BFC1E964(CPUState* cpu) { cpu->pc = 0xBFC1E964u; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000978_cont_BFC1E978(CPUState* cpu) { cpu->pc = 0xBFC1E978u; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000978_cont_BFC1E9AC(CPUState* cpu) { cpu->pc = 0xBFC1E9ACu; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000978_cont_BFC1E9CC(CPUState* cpu) { cpu->pc = 0xBFC1E9CCu; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000978_cont_BFC1E9DC(CPUState* cpu) { cpu->pc = 0xBFC1E9DCu; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000978_cont_BFC1E9E0(CPUState* cpu) { cpu->pc = 0xBFC1E9E0u; OpenBIOS_func_00000978(cpu); } void OpenBIOS_func_00000A14_cont_BFC1E9FC(CPUState* cpu) { cpu->pc = 0xBFC1E9FCu; OpenBIOS_func_00000A14(cpu); } void OpenBIOS_func_00000A14_cont_BFC1EA1C(CPUState* cpu) { cpu->pc = 0xBFC1EA1Cu; OpenBIOS_func_00000A14(cpu); } void OpenBIOS_func_00000A50_cont_BFC1EA38(CPUState* cpu) { cpu->pc = 0xBFC1EA38u; OpenBIOS_func_00000A50(cpu); } void OpenBIOS_func_00000A50_cont_BFC1EA58(CPUState* cpu) { cpu->pc = 0xBFC1EA58u; OpenBIOS_func_00000A50(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EA78(CPUState* cpu) { cpu->pc = 0xBFC1EA78u; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EA8C(CPUState* cpu) { cpu->pc = 0xBFC1EA8Cu; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EAB0(CPUState* cpu) { cpu->pc = 0xBFC1EAB0u; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EACC(CPUState* cpu) { cpu->pc = 0xBFC1EACCu; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EAE0(CPUState* cpu) { cpu->pc = 0xBFC1EAE0u; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EB0C(CPUState* cpu) { cpu->pc = 0xBFC1EB0Cu; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000A8C_cont_BFC1EB2C(CPUState* cpu) { cpu->pc = 0xBFC1EB2Cu; OpenBIOS_func_00000A8C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB6C(CPUState* cpu) { cpu->pc = 0xBFC1EB6Cu; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB74(CPUState* cpu) { cpu->pc = 0xBFC1EB74u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB7C(CPUState* cpu) { cpu->pc = 0xBFC1EB7Cu; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB84(CPUState* cpu) { cpu->pc = 0xBFC1EB84u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB88(CPUState* cpu) { cpu->pc = 0xBFC1EB88u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EB98(CPUState* cpu) { cpu->pc = 0xBFC1EB98u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBA0(CPUState* cpu) { cpu->pc = 0xBFC1EBA0u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBA8(CPUState* cpu) { cpu->pc = 0xBFC1EBA8u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBB4(CPUState* cpu) { cpu->pc = 0xBFC1EBB4u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBB8(CPUState* cpu) { cpu->pc = 0xBFC1EBB8u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBC0(CPUState* cpu) { cpu->pc = 0xBFC1EBC0u; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000B7C_cont_BFC1EBCC(CPUState* cpu) { cpu->pc = 0xBFC1EBCCu; OpenBIOS_func_00000B7C(cpu); } void OpenBIOS_func_00000C24_cont_BFC1EBFC(CPUState* cpu) { cpu->pc = 0xBFC1EBFCu; OpenBIOS_func_00000C24(cpu); } void OpenBIOS_func_00000C24_cont_BFC1EC00(CPUState* cpu) { cpu->pc = 0xBFC1EC00u; OpenBIOS_func_00000C24(cpu); } void OpenBIOS_func_00000C40_cont_BFC1EC18(CPUState* cpu) { cpu->pc = 0xBFC1EC18u; OpenBIOS_func_00000C40(cpu); } void OpenBIOS_func_00000C4C_cont_BFC1EC24(CPUState* cpu) { cpu->pc = 0xBFC1EC24u; OpenBIOS_func_00000C4C(cpu); } void OpenBIOS_func_00000C60_cont_BFC1EC38(CPUState* cpu) { cpu->pc = 0xBFC1EC38u; OpenBIOS_func_00000C60(cpu); } void OpenBIOS_func_00000CCC_cont_BFC1ECB0(CPUState* cpu) { cpu->pc = 0xBFC1ECB0u; OpenBIOS_func_00000CCC(cpu); } void OpenBIOS_func_00000CCC_cont_BFC1ECB8(CPUState* cpu) { cpu->pc = 0xBFC1ECB8u; OpenBIOS_func_00000CCC(cpu); } void OpenBIOS_func_00000CCC_cont_BFC1ECC0(CPUState* cpu) { cpu->pc = 0xBFC1ECC0u; OpenBIOS_func_00000CCC(cpu); } void OpenBIOS_func_00000CCC_cont_BFC1ECCC(CPUState* cpu) { cpu->pc = 0xBFC1ECCCu; OpenBIOS_func_00000CCC(cpu); } void OpenBIOS_func_00000CCC_cont_BFC1ECD0(CPUState* cpu) { cpu->pc = 0xBFC1ECD0u; OpenBIOS_func_00000CCC(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ECE0(CPUState* cpu) { cpu->pc = 0xBFC1ECE0u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ECE4(CPUState* cpu) { cpu->pc = 0xBFC1ECE4u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ECF0(CPUState* cpu) { cpu->pc = 0xBFC1ECF0u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ECF8(CPUState* cpu) { cpu->pc = 0xBFC1ECF8u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED04(CPUState* cpu) { cpu->pc = 0xBFC1ED04u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED0C(CPUState* cpu) { cpu->pc = 0xBFC1ED0Cu; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED14(CPUState* cpu) { cpu->pc = 0xBFC1ED14u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED1C(CPUState* cpu) { cpu->pc = 0xBFC1ED1Cu; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED24(CPUState* cpu) { cpu->pc = 0xBFC1ED24u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED38(CPUState* cpu) { cpu->pc = 0xBFC1ED38u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED48(CPUState* cpu) { cpu->pc = 0xBFC1ED48u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED54(CPUState* cpu) { cpu->pc = 0xBFC1ED54u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED64(CPUState* cpu) { cpu->pc = 0xBFC1ED64u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED6C(CPUState* cpu) { cpu->pc = 0xBFC1ED6Cu; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED7C(CPUState* cpu) { cpu->pc = 0xBFC1ED7Cu; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED88(CPUState* cpu) { cpu->pc = 0xBFC1ED88u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED94(CPUState* cpu) { cpu->pc = 0xBFC1ED94u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1ED9C(CPUState* cpu) { cpu->pc = 0xBFC1ED9Cu; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1EDA8(CPUState* cpu) { cpu->pc = 0xBFC1EDA8u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000D08_cont_BFC1EDB4(CPUState* cpu) { cpu->pc = 0xBFC1EDB4u; OpenBIOS_func_00000D08(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EDD8(CPUState* cpu) { cpu->pc = 0xBFC1EDD8u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EDE0(CPUState* cpu) { cpu->pc = 0xBFC1EDE0u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EDF0(CPUState* cpu) { cpu->pc = 0xBFC1EDF0u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EDF8(CPUState* cpu) { cpu->pc = 0xBFC1EDF8u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE08(CPUState* cpu) { cpu->pc = 0xBFC1EE08u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE24(CPUState* cpu) { cpu->pc = 0xBFC1EE24u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE34(CPUState* cpu) { cpu->pc = 0xBFC1EE34u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE64(CPUState* cpu) { cpu->pc = 0xBFC1EE64u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE80(CPUState* cpu) { cpu->pc = 0xBFC1EE80u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE90(CPUState* cpu) { cpu->pc = 0xBFC1EE90u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EE98(CPUState* cpu) { cpu->pc = 0xBFC1EE98u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EEA0(CPUState* cpu) { cpu->pc = 0xBFC1EEA0u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EEAC(CPUState* cpu) { cpu->pc = 0xBFC1EEACu; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EEB4(CPUState* cpu) { cpu->pc = 0xBFC1EEB4u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EEC0(CPUState* cpu) { cpu->pc = 0xBFC1EEC0u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EEC8(CPUState* cpu) { cpu->pc = 0xBFC1EEC8u; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000DF0_cont_BFC1EECC(CPUState* cpu) { cpu->pc = 0xBFC1EECCu; OpenBIOS_func_00000DF0(cpu); } void OpenBIOS_func_00000F00_cont_BFC1EEE0(CPUState* cpu) { cpu->pc = 0xBFC1EEE0u; OpenBIOS_func_00000F00(cpu); } void OpenBIOS_func_00000F10_cont_BFC1EEEC(CPUState* cpu) { cpu->pc = 0xBFC1EEECu; OpenBIOS_func_00000F10(cpu); } void OpenBIOS_func_00000F10_cont_BFC1EEF4(CPUState* cpu) { cpu->pc = 0xBFC1EEF4u; OpenBIOS_func_00000F10(cpu); } void OpenBIOS_func_00000F50_cont_BFC1EF2C(CPUState* cpu) { cpu->pc = 0xBFC1EF2Cu; OpenBIOS_func_00000F50(cpu); } void OpenBIOS_func_00000F60_cont_BFC1EF74(CPUState* cpu) { cpu->pc = 0xBFC1EF74u; OpenBIOS_func_00000F60(cpu); } void OpenBIOS_func_00000F60_cont_BFC1EF88(CPUState* cpu) { cpu->pc = 0xBFC1EF88u; OpenBIOS_func_00000F60(cpu); } void OpenBIOS_func_00000F60_cont_BFC1EFA8(CPUState* cpu) { cpu->pc = 0xBFC1EFA8u; OpenBIOS_func_00000F60(cpu); } void OpenBIOS_func_00000F60_cont_BFC1EFAC(CPUState* cpu) { cpu->pc = 0xBFC1EFACu; OpenBIOS_func_00000F60(cpu); } void OpenBIOS_func_00001060_cont_BFC1F040(CPUState* cpu) { cpu->pc = 0xBFC1F040u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F044(CPUState* cpu) { cpu->pc = 0xBFC1F044u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F04C(CPUState* cpu) { cpu->pc = 0xBFC1F04Cu; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F054(CPUState* cpu) { cpu->pc = 0xBFC1F054u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F07C(CPUState* cpu) { cpu->pc = 0xBFC1F07Cu; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F084(CPUState* cpu) { cpu->pc = 0xBFC1F084u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F08C(CPUState* cpu) { cpu->pc = 0xBFC1F08Cu; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F098(CPUState* cpu) { cpu->pc = 0xBFC1F098u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F0B4(CPUState* cpu) { cpu->pc = 0xBFC1F0B4u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F0BC(CPUState* cpu) { cpu->pc = 0xBFC1F0BCu; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_00001060_cont_BFC1F0C0(CPUState* cpu) { cpu->pc = 0xBFC1F0C0u; OpenBIOS_func_00001060(cpu); } void OpenBIOS_func_000010F0_cont_BFC1F0CC(CPUState* cpu) { cpu->pc = 0xBFC1F0CCu; OpenBIOS_func_000010F0(cpu); } void OpenBIOS_func_000010F0_cont_BFC1F0D4(CPUState* cpu) { cpu->pc = 0xBFC1F0D4u; OpenBIOS_func_000010F0(cpu); } void OpenBIOS_func_000010F0_cont_BFC1F0DC(CPUState* cpu) { cpu->pc = 0xBFC1F0DCu; OpenBIOS_func_000010F0(cpu); } void OpenBIOS_func_000010F0_cont_BFC1F0E0(CPUState* cpu) { cpu->pc = 0xBFC1F0E0u; OpenBIOS_func_000010F0(cpu); } void OpenBIOS_func_000010F0_cont_BFC1F0F0(CPUState* cpu) { cpu->pc = 0xBFC1F0F0u; OpenBIOS_func_000010F0(cpu); } void OpenBIOS_func_00001128_cont_BFC1F110(CPUState* cpu) { cpu->pc = 0xBFC1F110u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F11C(CPUState* cpu) { cpu->pc = 0xBFC1F11Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F12C(CPUState* cpu) { cpu->pc = 0xBFC1F12Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F134(CPUState* cpu) { cpu->pc = 0xBFC1F134u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F148(CPUState* cpu) { cpu->pc = 0xBFC1F148u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F15C(CPUState* cpu) { cpu->pc = 0xBFC1F15Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F16C(CPUState* cpu) { cpu->pc = 0xBFC1F16Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F174(CPUState* cpu) { cpu->pc = 0xBFC1F174u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F17C(CPUState* cpu) { cpu->pc = 0xBFC1F17Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F18C(CPUState* cpu) { cpu->pc = 0xBFC1F18Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F194(CPUState* cpu) { cpu->pc = 0xBFC1F194u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F19C(CPUState* cpu) { cpu->pc = 0xBFC1F19Cu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1AC(CPUState* cpu) { cpu->pc = 0xBFC1F1ACu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1C0(CPUState* cpu) { cpu->pc = 0xBFC1F1C0u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1CC(CPUState* cpu) { cpu->pc = 0xBFC1F1CCu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1D4(CPUState* cpu) { cpu->pc = 0xBFC1F1D4u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1DC(CPUState* cpu) { cpu->pc = 0xBFC1F1DCu; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_00001128_cont_BFC1F1E4(CPUState* cpu) { cpu->pc = 0xBFC1F1E4u; OpenBIOS_func_00001128(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F220(CPUState* cpu) { cpu->pc = 0xBFC1F220u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F228(CPUState* cpu) { cpu->pc = 0xBFC1F228u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F238(CPUState* cpu) { cpu->pc = 0xBFC1F238u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F260(CPUState* cpu) { cpu->pc = 0xBFC1F260u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F268(CPUState* cpu) { cpu->pc = 0xBFC1F268u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F274(CPUState* cpu) { cpu->pc = 0xBFC1F274u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F284(CPUState* cpu) { cpu->pc = 0xBFC1F284u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_0000121C_cont_BFC1F288(CPUState* cpu) { cpu->pc = 0xBFC1F288u; OpenBIOS_func_0000121C(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2AC(CPUState* cpu) { cpu->pc = 0xBFC1F2ACu; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2B8(CPUState* cpu) { cpu->pc = 0xBFC1F2B8u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2CC(CPUState* cpu) { cpu->pc = 0xBFC1F2CCu; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2D0(CPUState* cpu) { cpu->pc = 0xBFC1F2D0u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2E0(CPUState* cpu) { cpu->pc = 0xBFC1F2E0u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2E8(CPUState* cpu) { cpu->pc = 0xBFC1F2E8u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F2FC(CPUState* cpu) { cpu->pc = 0xBFC1F2FCu; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F304(CPUState* cpu) { cpu->pc = 0xBFC1F304u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F318(CPUState* cpu) { cpu->pc = 0xBFC1F318u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F320(CPUState* cpu) { cpu->pc = 0xBFC1F320u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_000012BC_cont_BFC1F328(CPUState* cpu) { cpu->pc = 0xBFC1F328u; OpenBIOS_func_000012BC(cpu); } void OpenBIOS_func_00001398_cont_BFC1F38C(CPUState* cpu) { cpu->pc = 0xBFC1F38Cu; OpenBIOS_func_00001398(cpu); } void OpenBIOS_func_00001398_cont_BFC1F394(CPUState* cpu) { cpu->pc = 0xBFC1F394u; OpenBIOS_func_00001398(cpu); } void OpenBIOS_func_00001398_cont_BFC1F3B8(CPUState* cpu) { cpu->pc = 0xBFC1F3B8u; OpenBIOS_func_00001398(cpu); } void OpenBIOS_func_000013F4_cont_BFC1F3E4(CPUState* cpu) { cpu->pc = 0xBFC1F3E4u; OpenBIOS_func_000013F4(cpu); } void OpenBIOS_func_000013F4_cont_BFC1F3E8(CPUState* cpu) { cpu->pc = 0xBFC1F3E8u; OpenBIOS_func_000013F4(cpu); } void OpenBIOS_func_00001424_cont_BFC1F400(CPUState* cpu) { cpu->pc = 0xBFC1F400u; OpenBIOS_func_00001424(cpu); } void OpenBIOS_func_00001434_cont_BFC1F410(CPUState* cpu) { cpu->pc = 0xBFC1F410u; OpenBIOS_func_00001434(cpu); } void OpenBIOS_func_00001434_cont_BFC1F428(CPUState* cpu) { cpu->pc = 0xBFC1F428u; OpenBIOS_func_00001434(cpu); } void OpenBIOS_func_00001434_cont_BFC1F434(CPUState* cpu) { cpu->pc = 0xBFC1F434u; OpenBIOS_func_00001434(cpu); } void OpenBIOS_func_00001434_cont_BFC1F438(CPUState* cpu) { cpu->pc = 0xBFC1F438u; OpenBIOS_func_00001434(cpu); } void OpenBIOS_func_00001434_cont_BFC1F480(CPUState* cpu) { cpu->pc = 0xBFC1F480u; OpenBIOS_func_00001434(cpu); } void OpenBIOS_func_000014C8_cont_BFC1F4B8(CPUState* cpu) { cpu->pc = 0xBFC1F4B8u; OpenBIOS_func_000014C8(cpu); } void OpenBIOS_func_000014C8_cont_BFC1F4BC(CPUState* cpu) { cpu->pc = 0xBFC1F4BCu; OpenBIOS_func_000014C8(cpu); } void OpenBIOS_func_000014C8_cont_BFC1F4CC(CPUState* cpu) { cpu->pc = 0xBFC1F4CCu; OpenBIOS_func_000014C8(cpu); } void OpenBIOS_func_000014C8_cont_BFC1F4D4(CPUState* cpu) { cpu->pc = 0xBFC1F4D4u; OpenBIOS_func_000014C8(cpu); } void OpenBIOS_func_000014C8_cont_BFC1F4F8(CPUState* cpu) { cpu->pc = 0xBFC1F4F8u; OpenBIOS_func_000014C8(cpu); } void OpenBIOS_func_00001594_cont_BFC1F62C(CPUState* cpu) { cpu->pc = 0xBFC1F62Cu; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F634(CPUState* cpu) { cpu->pc = 0xBFC1F634u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F680(CPUState* cpu) { cpu->pc = 0xBFC1F680u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F690(CPUState* cpu) { cpu->pc = 0xBFC1F690u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F698(CPUState* cpu) { cpu->pc = 0xBFC1F698u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F6A4(CPUState* cpu) { cpu->pc = 0xBFC1F6A4u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_00001594_cont_BFC1F6A8(CPUState* cpu) { cpu->pc = 0xBFC1F6A8u; OpenBIOS_func_00001594(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F6E4(CPUState* cpu) { cpu->pc = 0xBFC1F6E4u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F6F0(CPUState* cpu) { cpu->pc = 0xBFC1F6F0u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F704(CPUState* cpu) { cpu->pc = 0xBFC1F704u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F714(CPUState* cpu) { cpu->pc = 0xBFC1F714u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F718(CPUState* cpu) { cpu->pc = 0xBFC1F718u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F734(CPUState* cpu) { cpu->pc = 0xBFC1F734u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F740(CPUState* cpu) { cpu->pc = 0xBFC1F740u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F754(CPUState* cpu) { cpu->pc = 0xBFC1F754u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F764(CPUState* cpu) { cpu->pc = 0xBFC1F764u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F784(CPUState* cpu) { cpu->pc = 0xBFC1F784u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F790(CPUState* cpu) { cpu->pc = 0xBFC1F790u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F7A4(CPUState* cpu) { cpu->pc = 0xBFC1F7A4u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F7B4(CPUState* cpu) { cpu->pc = 0xBFC1F7B4u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_000016E4_cont_BFC1F7B8(CPUState* cpu) { cpu->pc = 0xBFC1F7B8u; OpenBIOS_func_000016E4(cpu); } void OpenBIOS_func_00001850_cont_BFC1F830(CPUState* cpu) { cpu->pc = 0xBFC1F830u; OpenBIOS_func_00001850(cpu); } void OpenBIOS_func_00001880_cont_BFC1F858(CPUState* cpu) { cpu->pc = 0xBFC1F858u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F874(CPUState* cpu) { cpu->pc = 0xBFC1F874u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F880(CPUState* cpu) { cpu->pc = 0xBFC1F880u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F894(CPUState* cpu) { cpu->pc = 0xBFC1F894u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8A4(CPUState* cpu) { cpu->pc = 0xBFC1F8A4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8C4(CPUState* cpu) { cpu->pc = 0xBFC1F8C4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8D0(CPUState* cpu) { cpu->pc = 0xBFC1F8D0u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8E4(CPUState* cpu) { cpu->pc = 0xBFC1F8E4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8F4(CPUState* cpu) { cpu->pc = 0xBFC1F8F4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F8F8(CPUState* cpu) { cpu->pc = 0xBFC1F8F8u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F914(CPUState* cpu) { cpu->pc = 0xBFC1F914u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F920(CPUState* cpu) { cpu->pc = 0xBFC1F920u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F934(CPUState* cpu) { cpu->pc = 0xBFC1F934u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F944(CPUState* cpu) { cpu->pc = 0xBFC1F944u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F964(CPUState* cpu) { cpu->pc = 0xBFC1F964u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F970(CPUState* cpu) { cpu->pc = 0xBFC1F970u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F984(CPUState* cpu) { cpu->pc = 0xBFC1F984u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F994(CPUState* cpu) { cpu->pc = 0xBFC1F994u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F998(CPUState* cpu) { cpu->pc = 0xBFC1F998u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F9B4(CPUState* cpu) { cpu->pc = 0xBFC1F9B4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F9C0(CPUState* cpu) { cpu->pc = 0xBFC1F9C0u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F9D4(CPUState* cpu) { cpu->pc = 0xBFC1F9D4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1F9E4(CPUState* cpu) { cpu->pc = 0xBFC1F9E4u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1FA04(CPUState* cpu) { cpu->pc = 0xBFC1FA04u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1FA10(CPUState* cpu) { cpu->pc = 0xBFC1FA10u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1FA24(CPUState* cpu) { cpu->pc = 0xBFC1FA24u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001880_cont_BFC1FA34(CPUState* cpu) { cpu->pc = 0xBFC1FA34u; OpenBIOS_func_00001880(cpu); } void OpenBIOS_func_00001A74_cont_BFC1FA60(CPUState* cpu) { cpu->pc = 0xBFC1FA60u; OpenBIOS_func_00001A74(cpu); } void OpenBIOS_func_00001A74_cont_BFC1FA74(CPUState* cpu) { cpu->pc = 0xBFC1FA74u; OpenBIOS_func_00001A74(cpu); } void OpenBIOS_func_00001A74_cont_BFC1FA88(CPUState* cpu) { cpu->pc = 0xBFC1FA88u; OpenBIOS_func_00001A74(cpu); } void OpenBIOS_func_00001A74_cont_BFC1FA98(CPUState* cpu) { cpu->pc = 0xBFC1FA98u; OpenBIOS_func_00001A74(cpu); } void OpenBIOS_func_00001ACC_cont_BFC1FAB8(CPUState* cpu) { cpu->pc = 0xBFC1FAB8u; OpenBIOS_func_00001ACC(cpu); } void OpenBIOS_func_00001ACC_cont_BFC1FACC(CPUState* cpu) { cpu->pc = 0xBFC1FACCu; OpenBIOS_func_00001ACC(cpu); } void OpenBIOS_func_00001ACC_cont_BFC1FAE0(CPUState* cpu) { cpu->pc = 0xBFC1FAE0u; OpenBIOS_func_00001ACC(cpu); } void OpenBIOS_func_00001ACC_cont_BFC1FAF0(CPUState* cpu) { cpu->pc = 0xBFC1FAF0u; OpenBIOS_func_00001ACC(cpu); } void OpenBIOS_func_00001B24_cont_BFC1FB10(CPUState* cpu) { cpu->pc = 0xBFC1FB10u; OpenBIOS_func_00001B24(cpu); } void OpenBIOS_func_00001B24_cont_BFC1FB24(CPUState* cpu) { cpu->pc = 0xBFC1FB24u; OpenBIOS_func_00001B24(cpu); } void OpenBIOS_func_00001B24_cont_BFC1FB38(CPUState* cpu) { cpu->pc = 0xBFC1FB38u; OpenBIOS_func_00001B24(cpu); } void OpenBIOS_func_00001B24_cont_BFC1FB48(CPUState* cpu) { cpu->pc = 0xBFC1FB48u; OpenBIOS_func_00001B24(cpu); } void OpenBIOS_func_00001B7C_cont_BFC1FB68(CPUState* cpu) { cpu->pc = 0xBFC1FB68u; OpenBIOS_func_00001B7C(cpu); } void OpenBIOS_func_00001B7C_cont_BFC1FB7C(CPUState* cpu) { cpu->pc = 0xBFC1FB7Cu; OpenBIOS_func_00001B7C(cpu); } void OpenBIOS_func_00001B7C_cont_BFC1FB8C(CPUState* cpu) { cpu->pc = 0xBFC1FB8Cu; OpenBIOS_func_00001B7C(cpu); } void OpenBIOS_func_00001B7C_cont_BFC1FB9C(CPUState* cpu) { cpu->pc = 0xBFC1FB9Cu; OpenBIOS_func_00001B7C(cpu); } void OpenBIOS_func_00001BD0_cont_BFC1FBB8(CPUState* cpu) { cpu->pc = 0xBFC1FBB8u; OpenBIOS_func_00001BD0(cpu); } void OpenBIOS_func_00001BD0_cont_BFC1FBD0(CPUState* cpu) { cpu->pc = 0xBFC1FBD0u; OpenBIOS_func_00001BD0(cpu); } void OpenBIOS_func_00001C1C_cont_BFC1FC04(CPUState* cpu) { cpu->pc = 0xBFC1FC04u; OpenBIOS_func_00001C1C(cpu); } void OpenBIOS_func_00001C58_cont_BFC1FC38(CPUState* cpu) { cpu->pc = 0xBFC1FC38u; OpenBIOS_func_00001C58(cpu); } void OpenBIOS_func_00001C78_cont_BFC1FC54(CPUState* cpu) { cpu->pc = 0xBFC1FC54u; OpenBIOS_func_00001C78(cpu); } void OpenBIOS_func_00001C78_cont_BFC1FC6C(CPUState* cpu) { cpu->pc = 0xBFC1FC6Cu; OpenBIOS_func_00001C78(cpu); } void OpenBIOS_func_00001CA0_cont_BFC1FC84(CPUState* cpu) { cpu->pc = 0xBFC1FC84u; OpenBIOS_func_00001CA0(cpu); } void OpenBIOS_func_00001CA0_cont_BFC1FC94(CPUState* cpu) { cpu->pc = 0xBFC1FC94u; OpenBIOS_func_00001CA0(cpu); } void OpenBIOS_func_00001CE0_cont_BFC1FCF4(CPUState* cpu) { cpu->pc = 0xBFC1FCF4u; OpenBIOS_func_00001CE0(cpu); } void OpenBIOS_func_00001CE0_cont_BFC1FD04(CPUState* cpu) { cpu->pc = 0xBFC1FD04u; OpenBIOS_func_00001CE0(cpu); } void OpenBIOS_func_00001CE0_cont_BFC1FD18(CPUState* cpu) { cpu->pc = 0xBFC1FD18u; OpenBIOS_func_00001CE0(cpu); } void OpenBIOS_func_00001DA0_cont_BFC1FD80(CPUState* cpu) { cpu->pc = 0xBFC1FD80u; OpenBIOS_func_00001DA0(cpu); } void OpenBIOS_func_00001DA0_cont_BFC1FD90(CPUState* cpu) { cpu->pc = 0xBFC1FD90u; OpenBIOS_func_00001DA0(cpu); } void OpenBIOS_func_00001DC4_cont_BFC1FDA8(CPUState* cpu) { cpu->pc = 0xBFC1FDA8u; OpenBIOS_func_00001DC4(cpu); } void OpenBIOS_func_00001DC4_cont_BFC1FDE4(CPUState* cpu) { cpu->pc = 0xBFC1FDE4u; OpenBIOS_func_00001DC4(cpu); } void OpenBIOS_func_00001DC4_cont_BFC1FDE8(CPUState* cpu) { cpu->pc = 0xBFC1FDE8u; OpenBIOS_func_00001DC4(cpu); } void OpenBIOS_func_00001DC4_cont_BFC1FDF0(CPUState* cpu) { cpu->pc = 0xBFC1FDF0u; OpenBIOS_func_00001DC4(cpu); } void OpenBIOS_func_00001E8C_cont_BFC1FE70(CPUState* cpu) { cpu->pc = 0xBFC1FE70u; OpenBIOS_func_00001E8C(cpu); } void OpenBIOS_func_00001E8C_cont_BFC1FE84(CPUState* cpu) { cpu->pc = 0xBFC1FE84u; OpenBIOS_func_00001E8C(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FED0(CPUState* cpu) { cpu->pc = 0xBFC1FED0u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FED8(CPUState* cpu) { cpu->pc = 0xBFC1FED8u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FEE4(CPUState* cpu) { cpu->pc = 0xBFC1FEE4u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FEF4(CPUState* cpu) { cpu->pc = 0xBFC1FEF4u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FEF8(CPUState* cpu) { cpu->pc = 0xBFC1FEF8u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF00(CPUState* cpu) { cpu->pc = 0xBFC1FF00u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF10(CPUState* cpu) { cpu->pc = 0xBFC1FF10u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF14(CPUState* cpu) { cpu->pc = 0xBFC1FF14u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF1C(CPUState* cpu) { cpu->pc = 0xBFC1FF1Cu; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF30(CPUState* cpu) { cpu->pc = 0xBFC1FF30u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001EDC_cont_BFC1FF38(CPUState* cpu) { cpu->pc = 0xBFC1FF38u; OpenBIOS_func_00001EDC(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FF68(CPUState* cpu) { cpu->pc = 0xBFC1FF68u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FF78(CPUState* cpu) { cpu->pc = 0xBFC1FF78u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FF98(CPUState* cpu) { cpu->pc = 0xBFC1FF98u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFA0(CPUState* cpu) { cpu->pc = 0xBFC1FFA0u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFA8(CPUState* cpu) { cpu->pc = 0xBFC1FFA8u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFB0(CPUState* cpu) { cpu->pc = 0xBFC1FFB0u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFBC(CPUState* cpu) { cpu->pc = 0xBFC1FFBCu; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFC8(CPUState* cpu) { cpu->pc = 0xBFC1FFC8u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00001F6C_cont_BFC1FFD0(CPUState* cpu) { cpu->pc = 0xBFC1FFD0u; OpenBIOS_func_00001F6C(cpu); } void OpenBIOS_func_00002020_cont_BFC1FFF8(CPUState* cpu) { cpu->pc = 0xBFC1FFF8u; OpenBIOS_func_00002020(cpu); } void OpenBIOS_func_00002030_cont_BFC2000C(CPUState* cpu) { cpu->pc = 0xBFC2000Cu; OpenBIOS_func_00002030(cpu); } void OpenBIOS_func_00002044_cont_BFC20024(CPUState* cpu) { cpu->pc = 0xBFC20024u; OpenBIOS_func_00002044(cpu); } void OpenBIOS_func_00002070_cont_BFC20048(CPUState* cpu) { cpu->pc = 0xBFC20048u; OpenBIOS_func_00002070(cpu); } void OpenBIOS_func_00002088_cont_BFC20064(CPUState* cpu) { cpu->pc = 0xBFC20064u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20070(CPUState* cpu) { cpu->pc = 0xBFC20070u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20090(CPUState* cpu) { cpu->pc = 0xBFC20090u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20098(CPUState* cpu) { cpu->pc = 0xBFC20098u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200A0(CPUState* cpu) { cpu->pc = 0xBFC200A0u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200A8(CPUState* cpu) { cpu->pc = 0xBFC200A8u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200B8(CPUState* cpu) { cpu->pc = 0xBFC200B8u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200C0(CPUState* cpu) { cpu->pc = 0xBFC200C0u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200C8(CPUState* cpu) { cpu->pc = 0xBFC200C8u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200CC(CPUState* cpu) { cpu->pc = 0xBFC200CCu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200D4(CPUState* cpu) { cpu->pc = 0xBFC200D4u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200DC(CPUState* cpu) { cpu->pc = 0xBFC200DCu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200E8(CPUState* cpu) { cpu->pc = 0xBFC200E8u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC200FC(CPUState* cpu) { cpu->pc = 0xBFC200FCu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20104(CPUState* cpu) { cpu->pc = 0xBFC20104u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20118(CPUState* cpu) { cpu->pc = 0xBFC20118u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC2011C(CPUState* cpu) { cpu->pc = 0xBFC2011Cu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20130(CPUState* cpu) { cpu->pc = 0xBFC20130u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20138(CPUState* cpu) { cpu->pc = 0xBFC20138u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20144(CPUState* cpu) { cpu->pc = 0xBFC20144u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC2014C(CPUState* cpu) { cpu->pc = 0xBFC2014Cu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20160(CPUState* cpu) { cpu->pc = 0xBFC20160u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20168(CPUState* cpu) { cpu->pc = 0xBFC20168u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC20170(CPUState* cpu) { cpu->pc = 0xBFC20170u; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_00002088_cont_BFC2017C(CPUState* cpu) { cpu->pc = 0xBFC2017Cu; OpenBIOS_func_00002088(cpu); } void OpenBIOS_func_000021B0_cont_BFC2018C(CPUState* cpu) { cpu->pc = 0xBFC2018Cu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20198(CPUState* cpu) { cpu->pc = 0xBFC20198u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201AC(CPUState* cpu) { cpu->pc = 0xBFC201ACu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201B0(CPUState* cpu) { cpu->pc = 0xBFC201B0u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201B8(CPUState* cpu) { cpu->pc = 0xBFC201B8u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201CC(CPUState* cpu) { cpu->pc = 0xBFC201CCu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201D4(CPUState* cpu) { cpu->pc = 0xBFC201D4u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201DC(CPUState* cpu) { cpu->pc = 0xBFC201DCu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201E8(CPUState* cpu) { cpu->pc = 0xBFC201E8u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC201F4(CPUState* cpu) { cpu->pc = 0xBFC201F4u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20208(CPUState* cpu) { cpu->pc = 0xBFC20208u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20210(CPUState* cpu) { cpu->pc = 0xBFC20210u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC2021C(CPUState* cpu) { cpu->pc = 0xBFC2021Cu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20228(CPUState* cpu) { cpu->pc = 0xBFC20228u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20230(CPUState* cpu) { cpu->pc = 0xBFC20230u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20244(CPUState* cpu) { cpu->pc = 0xBFC20244u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20254(CPUState* cpu) { cpu->pc = 0xBFC20254u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20270(CPUState* cpu) { cpu->pc = 0xBFC20270u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC2027C(CPUState* cpu) { cpu->pc = 0xBFC2027Cu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC20298(CPUState* cpu) { cpu->pc = 0xBFC20298u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC2029C(CPUState* cpu) { cpu->pc = 0xBFC2029Cu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC202A4(CPUState* cpu) { cpu->pc = 0xBFC202A4u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC202B8(CPUState* cpu) { cpu->pc = 0xBFC202B8u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC202CC(CPUState* cpu) { cpu->pc = 0xBFC202CCu; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_000021B0_cont_BFC202D4(CPUState* cpu) { cpu->pc = 0xBFC202D4u; OpenBIOS_func_000021B0(cpu); } void OpenBIOS_func_00002308_cont_BFC202E8(CPUState* cpu) { cpu->pc = 0xBFC202E8u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC202F0(CPUState* cpu) { cpu->pc = 0xBFC202F0u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC202FC(CPUState* cpu) { cpu->pc = 0xBFC202FCu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20304(CPUState* cpu) { cpu->pc = 0xBFC20304u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20308(CPUState* cpu) { cpu->pc = 0xBFC20308u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20318(CPUState* cpu) { cpu->pc = 0xBFC20318u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20330(CPUState* cpu) { cpu->pc = 0xBFC20330u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20338(CPUState* cpu) { cpu->pc = 0xBFC20338u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20344(CPUState* cpu) { cpu->pc = 0xBFC20344u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20350(CPUState* cpu) { cpu->pc = 0xBFC20350u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2035C(CPUState* cpu) { cpu->pc = 0xBFC2035Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20364(CPUState* cpu) { cpu->pc = 0xBFC20364u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2036C(CPUState* cpu) { cpu->pc = 0xBFC2036Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20378(CPUState* cpu) { cpu->pc = 0xBFC20378u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20388(CPUState* cpu) { cpu->pc = 0xBFC20388u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20394(CPUState* cpu) { cpu->pc = 0xBFC20394u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203A0(CPUState* cpu) { cpu->pc = 0xBFC203A0u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203AC(CPUState* cpu) { cpu->pc = 0xBFC203ACu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203B8(CPUState* cpu) { cpu->pc = 0xBFC203B8u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203C4(CPUState* cpu) { cpu->pc = 0xBFC203C4u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203CC(CPUState* cpu) { cpu->pc = 0xBFC203CCu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203D4(CPUState* cpu) { cpu->pc = 0xBFC203D4u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203E8(CPUState* cpu) { cpu->pc = 0xBFC203E8u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203F4(CPUState* cpu) { cpu->pc = 0xBFC203F4u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC203FC(CPUState* cpu) { cpu->pc = 0xBFC203FCu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20400(CPUState* cpu) { cpu->pc = 0xBFC20400u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20404(CPUState* cpu) { cpu->pc = 0xBFC20404u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2040C(CPUState* cpu) { cpu->pc = 0xBFC2040Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20418(CPUState* cpu) { cpu->pc = 0xBFC20418u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20428(CPUState* cpu) { cpu->pc = 0xBFC20428u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20434(CPUState* cpu) { cpu->pc = 0xBFC20434u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2043C(CPUState* cpu) { cpu->pc = 0xBFC2043Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20444(CPUState* cpu) { cpu->pc = 0xBFC20444u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20448(CPUState* cpu) { cpu->pc = 0xBFC20448u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20458(CPUState* cpu) { cpu->pc = 0xBFC20458u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20464(CPUState* cpu) { cpu->pc = 0xBFC20464u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20468(CPUState* cpu) { cpu->pc = 0xBFC20468u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20470(CPUState* cpu) { cpu->pc = 0xBFC20470u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20484(CPUState* cpu) { cpu->pc = 0xBFC20484u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2048C(CPUState* cpu) { cpu->pc = 0xBFC2048Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC20494(CPUState* cpu) { cpu->pc = 0xBFC20494u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC2049C(CPUState* cpu) { cpu->pc = 0xBFC2049Cu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204A8(CPUState* cpu) { cpu->pc = 0xBFC204A8u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204B4(CPUState* cpu) { cpu->pc = 0xBFC204B4u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204C0(CPUState* cpu) { cpu->pc = 0xBFC204C0u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204D8(CPUState* cpu) { cpu->pc = 0xBFC204D8u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204E4(CPUState* cpu) { cpu->pc = 0xBFC204E4u; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002308_cont_BFC204EC(CPUState* cpu) { cpu->pc = 0xBFC204ECu; OpenBIOS_func_00002308(cpu); } void OpenBIOS_func_00002520_cont_BFC20500(CPUState* cpu) { cpu->pc = 0xBFC20500u; OpenBIOS_func_00002520(cpu); } void OpenBIOS_func_00002520_cont_BFC20514(CPUState* cpu) { cpu->pc = 0xBFC20514u; OpenBIOS_func_00002520(cpu); } void OpenBIOS_func_00002520_cont_BFC20520(CPUState* cpu) { cpu->pc = 0xBFC20520u; OpenBIOS_func_00002520(cpu); } void OpenBIOS_func_00002520_cont_BFC20538(CPUState* cpu) { cpu->pc = 0xBFC20538u; OpenBIOS_func_00002520(cpu); } void OpenBIOS_func_00002520_cont_BFC20540(CPUState* cpu) { cpu->pc = 0xBFC20540u; OpenBIOS_func_00002520(cpu); } void OpenBIOS_func_00002610_cont_BFC20610(CPUState* cpu) { cpu->pc = 0xBFC20610u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC2061C(CPUState* cpu) { cpu->pc = 0xBFC2061Cu; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20634(CPUState* cpu) { cpu->pc = 0xBFC20634u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20644(CPUState* cpu) { cpu->pc = 0xBFC20644u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20654(CPUState* cpu) { cpu->pc = 0xBFC20654u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20664(CPUState* cpu) { cpu->pc = 0xBFC20664u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20674(CPUState* cpu) { cpu->pc = 0xBFC20674u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC2067C(CPUState* cpu) { cpu->pc = 0xBFC2067Cu; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC20684(CPUState* cpu) { cpu->pc = 0xBFC20684u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC2068C(CPUState* cpu) { cpu->pc = 0xBFC2068Cu; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC2069C(CPUState* cpu) { cpu->pc = 0xBFC2069Cu; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_00002610_cont_BFC206A8(CPUState* cpu) { cpu->pc = 0xBFC206A8u; OpenBIOS_func_00002610(cpu); } void OpenBIOS_func_000026E4_cont_BFC206D0(CPUState* cpu) { cpu->pc = 0xBFC206D0u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC206DC(CPUState* cpu) { cpu->pc = 0xBFC206DCu; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC206E4(CPUState* cpu) { cpu->pc = 0xBFC206E4u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC206F4(CPUState* cpu) { cpu->pc = 0xBFC206F4u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC20704(CPUState* cpu) { cpu->pc = 0xBFC20704u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC20714(CPUState* cpu) { cpu->pc = 0xBFC20714u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC20724(CPUState* cpu) { cpu->pc = 0xBFC20724u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_000026E4_cont_BFC20728(CPUState* cpu) { cpu->pc = 0xBFC20728u; OpenBIOS_func_000026E4(cpu); } void OpenBIOS_func_0000275C_cont_BFC2074C(CPUState* cpu) { cpu->pc = 0xBFC2074Cu; OpenBIOS_func_0000275C(cpu); } void OpenBIOS_func_000027AC_cont_BFC207B8(CPUState* cpu) { cpu->pc = 0xBFC207B8u; OpenBIOS_func_000027AC(cpu); } void OpenBIOS_func_000027AC_cont_BFC207C0(CPUState* cpu) { cpu->pc = 0xBFC207C0u; OpenBIOS_func_000027AC(cpu); } void OpenBIOS_func_000027AC_cont_BFC207CC(CPUState* cpu) { cpu->pc = 0xBFC207CCu; OpenBIOS_func_000027AC(cpu); } void OpenBIOS_func_00002810_cont_BFC207E8(CPUState* cpu) { cpu->pc = 0xBFC207E8u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC207EC(CPUState* cpu) { cpu->pc = 0xBFC207ECu; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20800(CPUState* cpu) { cpu->pc = 0xBFC20800u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC208E8(CPUState* cpu) { cpu->pc = 0xBFC208E8u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC208F8(CPUState* cpu) { cpu->pc = 0xBFC208F8u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20908(CPUState* cpu) { cpu->pc = 0xBFC20908u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20910(CPUState* cpu) { cpu->pc = 0xBFC20910u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20918(CPUState* cpu) { cpu->pc = 0xBFC20918u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20920(CPUState* cpu) { cpu->pc = 0xBFC20920u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20928(CPUState* cpu) { cpu->pc = 0xBFC20928u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_00002810_cont_BFC20938(CPUState* cpu) { cpu->pc = 0xBFC20938u; OpenBIOS_func_00002810(cpu); } void OpenBIOS_func_0000296C_cont_BFC20944(CPUState* cpu) { cpu->pc = 0xBFC20944u; OpenBIOS_func_0000296C(cpu); } void OpenBIOS_func_00002B20_cont_BFC20B10(CPUState* cpu) { cpu->pc = 0xBFC20B10u; OpenBIOS_func_00002B20(cpu); } void OpenBIOS_func_00002B20_cont_BFC20B28(CPUState* cpu) { cpu->pc = 0xBFC20B28u; OpenBIOS_func_00002B20(cpu); } void OpenBIOS_func_00002B5C_cont_BFC20B64(CPUState* cpu) { cpu->pc = 0xBFC20B64u; OpenBIOS_func_00002B5C(cpu); } void OpenBIOS_func_00002BAC_cont_BFC20BE4(CPUState* cpu) { cpu->pc = 0xBFC20BE4u; OpenBIOS_func_00002BAC(cpu); } void OpenBIOS_func_00002C18_cont_BFC20BFC(CPUState* cpu) { cpu->pc = 0xBFC20BFCu; OpenBIOS_func_00002C18(cpu); } void OpenBIOS_func_00002C4C_cont_BFC20C5C(CPUState* cpu) { cpu->pc = 0xBFC20C5Cu; OpenBIOS_func_00002C4C(cpu); } void OpenBIOS_func_00002C4C_cont_BFC20C68(CPUState* cpu) { cpu->pc = 0xBFC20C68u; OpenBIOS_func_00002C4C(cpu); } void OpenBIOS_func_00002C4C_cont_BFC20CA0(CPUState* cpu) { cpu->pc = 0xBFC20CA0u; OpenBIOS_func_00002C4C(cpu); } void OpenBIOS_func_00002C4C_cont_BFC20CB0(CPUState* cpu) { cpu->pc = 0xBFC20CB0u; OpenBIOS_func_00002C4C(cpu); } void OpenBIOS_func_00002CF8_cont_BFC20CF8(CPUState* cpu) { cpu->pc = 0xBFC20CF8u; OpenBIOS_func_00002CF8(cpu); } void OpenBIOS_func_00002D2C_cont_BFC20D10(CPUState* cpu) { cpu->pc = 0xBFC20D10u; OpenBIOS_func_00002D2C(cpu); } void OpenBIOS_func_00002DCC_cont_BFC20DD4(CPUState* cpu) { cpu->pc = 0xBFC20DD4u; OpenBIOS_func_00002DCC(cpu); } void OpenBIOS_func_00002E28_cont_BFC20E3C(CPUState* cpu) { cpu->pc = 0xBFC20E3Cu; OpenBIOS_func_00002E28(cpu); } void OpenBIOS_func_00002ED0_cont_BFC20EE8(CPUState* cpu) { cpu->pc = 0xBFC20EE8u; OpenBIOS_func_00002ED0(cpu); } void OpenBIOS_func_00002ED0_cont_BFC20EFC(CPUState* cpu) { cpu->pc = 0xBFC20EFCu; OpenBIOS_func_00002ED0(cpu); } void OpenBIOS_func_00002ED0_cont_BFC20F0C(CPUState* cpu) { cpu->pc = 0xBFC20F0Cu; OpenBIOS_func_00002ED0(cpu); } void OpenBIOS_func_00002ED0_cont_BFC20F10(CPUState* cpu) { cpu->pc = 0xBFC20F10u; OpenBIOS_func_00002ED0(cpu); } void OpenBIOS_func_00002F44_cont_BFC20F4C(CPUState* cpu) { cpu->pc = 0xBFC20F4Cu; OpenBIOS_func_00002F44(cpu); } void OpenBIOS_func_00003018_cont_BFC20FF8(CPUState* cpu) { cpu->pc = 0xBFC20FF8u; OpenBIOS_func_00003018(cpu); } void OpenBIOS_func_00003078_cont_BFC21068(CPUState* cpu) { cpu->pc = 0xBFC21068u; OpenBIOS_func_00003078(cpu); } void OpenBIOS_func_00003078_cont_BFC21070(CPUState* cpu) { cpu->pc = 0xBFC21070u; OpenBIOS_func_00003078(cpu); } void OpenBIOS_func_00003078_cont_BFC2109C(CPUState* cpu) { cpu->pc = 0xBFC2109Cu; OpenBIOS_func_00003078(cpu); } void OpenBIOS_func_00003078_cont_BFC210AC(CPUState* cpu) { cpu->pc = 0xBFC210ACu; OpenBIOS_func_00003078(cpu); } void OpenBIOS_func_00003078_cont_BFC210B8(CPUState* cpu) { cpu->pc = 0xBFC210B8u; OpenBIOS_func_00003078(cpu); } void OpenBIOS_func_000030EC_cont_BFC210EC(CPUState* cpu) { cpu->pc = 0xBFC210ECu; OpenBIOS_func_000030EC(cpu); } void OpenBIOS_func_00003130_cont_BFC2112C(CPUState* cpu) { cpu->pc = 0xBFC2112Cu; OpenBIOS_func_00003130(cpu); } void OpenBIOS_func_00003228_cont_BFC21230(CPUState* cpu) { cpu->pc = 0xBFC21230u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC21244(CPUState* cpu) { cpu->pc = 0xBFC21244u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC21254(CPUState* cpu) { cpu->pc = 0xBFC21254u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC21270(CPUState* cpu) { cpu->pc = 0xBFC21270u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC212A0(CPUState* cpu) { cpu->pc = 0xBFC212A0u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC212B0(CPUState* cpu) { cpu->pc = 0xBFC212B0u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC212BC(CPUState* cpu) { cpu->pc = 0xBFC212BCu; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC212D0(CPUState* cpu) { cpu->pc = 0xBFC212D0u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_00003228_cont_BFC212D8(CPUState* cpu) { cpu->pc = 0xBFC212D8u; OpenBIOS_func_00003228(cpu); } void OpenBIOS_func_0000330C_cont_BFC212FC(CPUState* cpu) { cpu->pc = 0xBFC212FCu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21304(CPUState* cpu) { cpu->pc = 0xBFC21304u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2130C(CPUState* cpu) { cpu->pc = 0xBFC2130Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21318(CPUState* cpu) { cpu->pc = 0xBFC21318u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21320(CPUState* cpu) { cpu->pc = 0xBFC21320u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2132C(CPUState* cpu) { cpu->pc = 0xBFC2132Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21344(CPUState* cpu) { cpu->pc = 0xBFC21344u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21348(CPUState* cpu) { cpu->pc = 0xBFC21348u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21374(CPUState* cpu) { cpu->pc = 0xBFC21374u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2137C(CPUState* cpu) { cpu->pc = 0xBFC2137Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC213D8(CPUState* cpu) { cpu->pc = 0xBFC213D8u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC213E0(CPUState* cpu) { cpu->pc = 0xBFC213E0u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21414(CPUState* cpu) { cpu->pc = 0xBFC21414u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC21450(CPUState* cpu) { cpu->pc = 0xBFC21450u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2145C(CPUState* cpu) { cpu->pc = 0xBFC2145Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2148C(CPUState* cpu) { cpu->pc = 0xBFC2148Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC2149C(CPUState* cpu) { cpu->pc = 0xBFC2149Cu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC214A0(CPUState* cpu) { cpu->pc = 0xBFC214A0u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC214AC(CPUState* cpu) { cpu->pc = 0xBFC214ACu; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC214C8(CPUState* cpu) { cpu->pc = 0xBFC214C8u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_0000330C_cont_BFC214D8(CPUState* cpu) { cpu->pc = 0xBFC214D8u; OpenBIOS_func_0000330C(cpu); } void OpenBIOS_func_00003524_cont_BFC21504(CPUState* cpu) { cpu->pc = 0xBFC21504u; OpenBIOS_func_00003524(cpu); } void OpenBIOS_func_00003524_cont_BFC21518(CPUState* cpu) { cpu->pc = 0xBFC21518u; OpenBIOS_func_00003524(cpu); } void OpenBIOS_func_00003524_cont_BFC21520(CPUState* cpu) { cpu->pc = 0xBFC21520u; OpenBIOS_func_00003524(cpu); } void OpenBIOS_func_00003554_cont_BFC2153C(CPUState* cpu) { cpu->pc = 0xBFC2153Cu; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21564(CPUState* cpu) { cpu->pc = 0xBFC21564u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21580(CPUState* cpu) { cpu->pc = 0xBFC21580u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21588(CPUState* cpu) { cpu->pc = 0xBFC21588u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC215F4(CPUState* cpu) { cpu->pc = 0xBFC215F4u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC215FC(CPUState* cpu) { cpu->pc = 0xBFC215FCu; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21668(CPUState* cpu) { cpu->pc = 0xBFC21668u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21670(CPUState* cpu) { cpu->pc = 0xBFC21670u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_00003554_cont_BFC21678(CPUState* cpu) { cpu->pc = 0xBFC21678u; OpenBIOS_func_00003554(cpu); } void OpenBIOS_func_000036D8_cont_BFC216C4(CPUState* cpu) { cpu->pc = 0xBFC216C4u; OpenBIOS_func_000036D8(cpu); } void OpenBIOS_func_000036D8_cont_BFC216D8(CPUState* cpu) { cpu->pc = 0xBFC216D8u; OpenBIOS_func_000036D8(cpu); } void OpenBIOS_func_000036D8_cont_BFC216E8(CPUState* cpu) { cpu->pc = 0xBFC216E8u; OpenBIOS_func_000036D8(cpu); } void OpenBIOS_func_0000371C_cont_BFC21708(CPUState* cpu) { cpu->pc = 0xBFC21708u; OpenBIOS_func_0000371C(cpu); } void OpenBIOS_func_0000371C_cont_BFC21714(CPUState* cpu) { cpu->pc = 0xBFC21714u; OpenBIOS_func_0000371C(cpu); } void OpenBIOS_func_00003748_cont_BFC2174C(CPUState* cpu) { cpu->pc = 0xBFC2174Cu; OpenBIOS_func_00003748(cpu); } void OpenBIOS_func_00003748_cont_BFC21758(CPUState* cpu) { cpu->pc = 0xBFC21758u; OpenBIOS_func_00003748(cpu); } void OpenBIOS_func_00003748_cont_BFC2175C(CPUState* cpu) { cpu->pc = 0xBFC2175Cu; OpenBIOS_func_00003748(cpu); } void OpenBIOS_func_00003748_cont_BFC2176C(CPUState* cpu) { cpu->pc = 0xBFC2176Cu; OpenBIOS_func_00003748(cpu); } void OpenBIOS_func_00003748_cont_BFC21784(CPUState* cpu) { cpu->pc = 0xBFC21784u; OpenBIOS_func_00003748(cpu); } void OpenBIOS_func_000037C0_cont_BFC217CC(CPUState* cpu) { cpu->pc = 0xBFC217CCu; OpenBIOS_func_000037C0(cpu); } void OpenBIOS_func_000037C0_cont_BFC217DC(CPUState* cpu) { cpu->pc = 0xBFC217DCu; OpenBIOS_func_000037C0(cpu); } void OpenBIOS_func_00003810_cont_BFC217EC(CPUState* cpu) { cpu->pc = 0xBFC217ECu; OpenBIOS_func_00003810(cpu); } void OpenBIOS_func_00003870_cont_BFC21860(CPUState* cpu) { cpu->pc = 0xBFC21860u; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC21868(CPUState* cpu) { cpu->pc = 0xBFC21868u; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC21894(CPUState* cpu) { cpu->pc = 0xBFC21894u; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC2189C(CPUState* cpu) { cpu->pc = 0xBFC2189Cu; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC218B4(CPUState* cpu) { cpu->pc = 0xBFC218B4u; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC218CC(CPUState* cpu) { cpu->pc = 0xBFC218CCu; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003870_cont_BFC21900(CPUState* cpu) { cpu->pc = 0xBFC21900u; OpenBIOS_func_00003870(cpu); } void OpenBIOS_func_00003938_cont_BFC21910(CPUState* cpu) { cpu->pc = 0xBFC21910u; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_00003938_cont_BFC21924(CPUState* cpu) { cpu->pc = 0xBFC21924u; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_00003938_cont_BFC2193C(CPUState* cpu) { cpu->pc = 0xBFC2193Cu; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_00003938_cont_BFC21944(CPUState* cpu) { cpu->pc = 0xBFC21944u; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_00003938_cont_BFC2195C(CPUState* cpu) { cpu->pc = 0xBFC2195Cu; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_00003938_cont_BFC21960(CPUState* cpu) { cpu->pc = 0xBFC21960u; OpenBIOS_func_00003938(cpu); } void OpenBIOS_func_000039AC_cont_BFC21998(CPUState* cpu) { cpu->pc = 0xBFC21998u; OpenBIOS_func_000039AC(cpu); } void OpenBIOS_func_000039AC_cont_BFC219C4(CPUState* cpu) { cpu->pc = 0xBFC219C4u; OpenBIOS_func_000039AC(cpu); } void OpenBIOS_func_000039AC_cont_BFC219F4(CPUState* cpu) { cpu->pc = 0xBFC219F4u; OpenBIOS_func_000039AC(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21A98(CPUState* cpu) { cpu->pc = 0xBFC21A98u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21AA8(CPUState* cpu) { cpu->pc = 0xBFC21AA8u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21ABC(CPUState* cpu) { cpu->pc = 0xBFC21ABCu; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21AC4(CPUState* cpu) { cpu->pc = 0xBFC21AC4u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21AD8(CPUState* cpu) { cpu->pc = 0xBFC21AD8u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21AF0(CPUState* cpu) { cpu->pc = 0xBFC21AF0u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B0C(CPUState* cpu) { cpu->pc = 0xBFC21B0Cu; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B20(CPUState* cpu) { cpu->pc = 0xBFC21B20u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B30(CPUState* cpu) { cpu->pc = 0xBFC21B30u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B34(CPUState* cpu) { cpu->pc = 0xBFC21B34u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B48(CPUState* cpu) { cpu->pc = 0xBFC21B48u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B60(CPUState* cpu) { cpu->pc = 0xBFC21B60u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B78(CPUState* cpu) { cpu->pc = 0xBFC21B78u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21B8C(CPUState* cpu) { cpu->pc = 0xBFC21B8Cu; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21BA4(CPUState* cpu) { cpu->pc = 0xBFC21BA4u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21BA8(CPUState* cpu) { cpu->pc = 0xBFC21BA8u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21BAC(CPUState* cpu) { cpu->pc = 0xBFC21BACu; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003A4C_cont_BFC21BC0(CPUState* cpu) { cpu->pc = 0xBFC21BC0u; OpenBIOS_func_00003A4C(cpu); } void OpenBIOS_func_00003C28_cont_BFC21C00(CPUState* cpu) { cpu->pc = 0xBFC21C00u; OpenBIOS_func_00003C28(cpu); } void OpenBIOS_func_00003C38_cont_BFC21C10(CPUState* cpu) { cpu->pc = 0xBFC21C10u; OpenBIOS_func_00003C38(cpu); } void OpenBIOS_func_00003C4C_cont_BFC21C30(CPUState* cpu) { cpu->pc = 0xBFC21C30u; OpenBIOS_func_00003C4C(cpu); } void OpenBIOS_func_00003C70_cont_BFC21C48(CPUState* cpu) { cpu->pc = 0xBFC21C48u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21C54(CPUState* cpu) { cpu->pc = 0xBFC21C54u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21C68(CPUState* cpu) { cpu->pc = 0xBFC21C68u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21C88(CPUState* cpu) { cpu->pc = 0xBFC21C88u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21C9C(CPUState* cpu) { cpu->pc = 0xBFC21C9Cu; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21CAC(CPUState* cpu) { cpu->pc = 0xBFC21CACu; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21CC0(CPUState* cpu) { cpu->pc = 0xBFC21CC0u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21CD4(CPUState* cpu) { cpu->pc = 0xBFC21CD4u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21CE4(CPUState* cpu) { cpu->pc = 0xBFC21CE4u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21CF0(CPUState* cpu) { cpu->pc = 0xBFC21CF0u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21D08(CPUState* cpu) { cpu->pc = 0xBFC21D08u; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21D1C(CPUState* cpu) { cpu->pc = 0xBFC21D1Cu; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003C70_cont_BFC21D2C(CPUState* cpu) { cpu->pc = 0xBFC21D2Cu; OpenBIOS_func_00003C70(cpu); } void OpenBIOS_func_00003D9C_cont_BFC21D78(CPUState* cpu) { cpu->pc = 0xBFC21D78u; OpenBIOS_func_00003D9C(cpu); } void OpenBIOS_func_00003DD8_cont_BFC21DB4(CPUState* cpu) { cpu->pc = 0xBFC21DB4u; OpenBIOS_func_00003DD8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DC4(CPUState* cpu) { cpu->pc = 0xBFC21DC4u; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DCC(CPUState* cpu) { cpu->pc = 0xBFC21DCCu; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DD4(CPUState* cpu) { cpu->pc = 0xBFC21DD4u; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DDC(CPUState* cpu) { cpu->pc = 0xBFC21DDCu; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DE8(CPUState* cpu) { cpu->pc = 0xBFC21DE8u; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21DFC(CPUState* cpu) { cpu->pc = 0xBFC21DFCu; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21E00(CPUState* cpu) { cpu->pc = 0xBFC21E00u; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21E14(CPUState* cpu) { cpu->pc = 0xBFC21E14u; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003DE8_cont_BFC21E1C(CPUState* cpu) { cpu->pc = 0xBFC21E1Cu; OpenBIOS_func_00003DE8(cpu); } void OpenBIOS_func_00003E4C_cont_BFC21E24(CPUState* cpu) { cpu->pc = 0xBFC21E24u; OpenBIOS_func_00003E4C(cpu); } void OpenBIOS_func_00003E4C_cont_BFC21E2C(CPUState* cpu) { cpu->pc = 0xBFC21E2Cu; OpenBIOS_func_00003E4C(cpu); } void OpenBIOS_func_00003E4C_cont_BFC21E34(CPUState* cpu) { cpu->pc = 0xBFC21E34u; OpenBIOS_func_00003E4C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E5C(CPUState* cpu) { cpu->pc = 0xBFC21E5Cu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E64(CPUState* cpu) { cpu->pc = 0xBFC21E64u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E6C(CPUState* cpu) { cpu->pc = 0xBFC21E6Cu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E80(CPUState* cpu) { cpu->pc = 0xBFC21E80u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E88(CPUState* cpu) { cpu->pc = 0xBFC21E88u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21E9C(CPUState* cpu) { cpu->pc = 0xBFC21E9Cu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EAC(CPUState* cpu) { cpu->pc = 0xBFC21EACu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EB4(CPUState* cpu) { cpu->pc = 0xBFC21EB4u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EC8(CPUState* cpu) { cpu->pc = 0xBFC21EC8u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21ED4(CPUState* cpu) { cpu->pc = 0xBFC21ED4u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EE0(CPUState* cpu) { cpu->pc = 0xBFC21EE0u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EEC(CPUState* cpu) { cpu->pc = 0xBFC21EECu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21EF8(CPUState* cpu) { cpu->pc = 0xBFC21EF8u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21F04(CPUState* cpu) { cpu->pc = 0xBFC21F04u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21F1C(CPUState* cpu) { cpu->pc = 0xBFC21F1Cu; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21F78(CPUState* cpu) { cpu->pc = 0xBFC21F78u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21F84(CPUState* cpu) { cpu->pc = 0xBFC21F84u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21F94(CPUState* cpu) { cpu->pc = 0xBFC21F94u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21FB0(CPUState* cpu) { cpu->pc = 0xBFC21FB0u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00003E6C_cont_BFC21FC4(CPUState* cpu) { cpu->pc = 0xBFC21FC4u; OpenBIOS_func_00003E6C(cpu); } void OpenBIOS_func_00004010_cont_BFC21FEC(CPUState* cpu) { cpu->pc = 0xBFC21FECu; OpenBIOS_func_00004010(cpu); } void OpenBIOS_func_00004060_cont_BFC22040(CPUState* cpu) { cpu->pc = 0xBFC22040u; OpenBIOS_func_00004060(cpu); } void OpenBIOS_func_00004060_cont_BFC2204C(CPUState* cpu) { cpu->pc = 0xBFC2204Cu; OpenBIOS_func_00004060(cpu); } void OpenBIOS_func_000040C4_cont_BFC220CC(CPUState* cpu) { cpu->pc = 0xBFC220CCu; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC22100(CPUState* cpu) { cpu->pc = 0xBFC22100u; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC22108(CPUState* cpu) { cpu->pc = 0xBFC22108u; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC2210C(CPUState* cpu) { cpu->pc = 0xBFC2210Cu; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC2211C(CPUState* cpu) { cpu->pc = 0xBFC2211Cu; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC22124(CPUState* cpu) { cpu->pc = 0xBFC22124u; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC2212C(CPUState* cpu) { cpu->pc = 0xBFC2212Cu; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC22130(CPUState* cpu) { cpu->pc = 0xBFC22130u; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000040C4_cont_BFC22140(CPUState* cpu) { cpu->pc = 0xBFC22140u; OpenBIOS_func_000040C4(cpu); } void OpenBIOS_func_000041B8_cont_BFC2219C(CPUState* cpu) { cpu->pc = 0xBFC2219Cu; OpenBIOS_func_000041B8(cpu); } void OpenBIOS_func_000041B8_cont_BFC221B4(CPUState* cpu) { cpu->pc = 0xBFC221B4u; OpenBIOS_func_000041B8(cpu); } void OpenBIOS_func_000041B8_cont_BFC221C0(CPUState* cpu) { cpu->pc = 0xBFC221C0u; OpenBIOS_func_000041B8(cpu); } void OpenBIOS_func_000041B8_cont_BFC221F0(CPUState* cpu) { cpu->pc = 0xBFC221F0u; OpenBIOS_func_000041B8(cpu); } void OpenBIOS_func_00004234_cont_BFC22224(CPUState* cpu) { cpu->pc = 0xBFC22224u; OpenBIOS_func_00004234(cpu); } void OpenBIOS_func_00004234_cont_BFC22234(CPUState* cpu) { cpu->pc = 0xBFC22234u; OpenBIOS_func_00004234(cpu); } void OpenBIOS_func_00004278_cont_BFC222E0(CPUState* cpu) { cpu->pc = 0xBFC222E0u; OpenBIOS_func_00004278(cpu); } void OpenBIOS_func_00004278_cont_BFC222F8(CPUState* cpu) { cpu->pc = 0xBFC222F8u; OpenBIOS_func_00004278(cpu); } void OpenBIOS_func_00004278_cont_BFC22308(CPUState* cpu) { cpu->pc = 0xBFC22308u; OpenBIOS_func_00004278(cpu); } void OpenBIOS_func_0000435C_cont_BFC22340(CPUState* cpu) { cpu->pc = 0xBFC22340u; OpenBIOS_func_0000435C(cpu); } void OpenBIOS_func_0000435C_cont_BFC22358(CPUState* cpu) { cpu->pc = 0xBFC22358u; OpenBIOS_func_0000435C(cpu); } void OpenBIOS_func_0000435C_cont_BFC22364(CPUState* cpu) { cpu->pc = 0xBFC22364u; OpenBIOS_func_0000435C(cpu); } void OpenBIOS_func_0000435C_cont_BFC2238C(CPUState* cpu) { cpu->pc = 0xBFC2238Cu; OpenBIOS_func_0000435C(cpu); } void OpenBIOS_func_000043DC_cont_BFC223CC(CPUState* cpu) { cpu->pc = 0xBFC223CCu; OpenBIOS_func_000043DC(cpu); } void OpenBIOS_func_000043DC_cont_BFC223DC(CPUState* cpu) { cpu->pc = 0xBFC223DCu; OpenBIOS_func_000043DC(cpu); } void OpenBIOS_func_00004440_cont_BFC22420(CPUState* cpu) { cpu->pc = 0xBFC22420u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC22428(CPUState* cpu) { cpu->pc = 0xBFC22428u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC2244C(CPUState* cpu) { cpu->pc = 0xBFC2244Cu; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC22450(CPUState* cpu) { cpu->pc = 0xBFC22450u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC22458(CPUState* cpu) { cpu->pc = 0xBFC22458u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC22470(CPUState* cpu) { cpu->pc = 0xBFC22470u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC2247C(CPUState* cpu) { cpu->pc = 0xBFC2247Cu; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_00004440_cont_BFC22490(CPUState* cpu) { cpu->pc = 0xBFC22490u; OpenBIOS_func_00004440(cpu); } void OpenBIOS_func_000044C8_cont_BFC224CC(CPUState* cpu) { cpu->pc = 0xBFC224CCu; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC224DC(CPUState* cpu) { cpu->pc = 0xBFC224DCu; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC224F0(CPUState* cpu) { cpu->pc = 0xBFC224F0u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22500(CPUState* cpu) { cpu->pc = 0xBFC22500u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22510(CPUState* cpu) { cpu->pc = 0xBFC22510u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22524(CPUState* cpu) { cpu->pc = 0xBFC22524u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22530(CPUState* cpu) { cpu->pc = 0xBFC22530u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22534(CPUState* cpu) { cpu->pc = 0xBFC22534u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC2254C(CPUState* cpu) { cpu->pc = 0xBFC2254Cu; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22558(CPUState* cpu) { cpu->pc = 0xBFC22558u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22560(CPUState* cpu) { cpu->pc = 0xBFC22560u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000044C8_cont_BFC22570(CPUState* cpu) { cpu->pc = 0xBFC22570u; OpenBIOS_func_000044C8(cpu); } void OpenBIOS_func_000045A4_cont_BFC225A0(CPUState* cpu) { cpu->pc = 0xBFC225A0u; OpenBIOS_func_000045A4(cpu); } void OpenBIOS_func_000045A4_cont_BFC225B0(CPUState* cpu) { cpu->pc = 0xBFC225B0u; OpenBIOS_func_000045A4(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000B8(CPUState* cpu) { cpu->pc = 0xBFC000B8u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000CC(CPUState* cpu) { cpu->pc = 0xBFC000CCu; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000E4(CPUState* cpu) { cpu->pc = 0xBFC000E4u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000E8(CPUState* cpu) { cpu->pc = 0xBFC000E8u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000F0(CPUState* cpu) { cpu->pc = 0xBFC000F0u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC000FC(CPUState* cpu) { cpu->pc = 0xBFC000FCu; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC00118(CPUState* cpu) { cpu->pc = 0xBFC00118u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC00120(CPUState* cpu) { cpu->pc = 0xBFC00120u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC00134(CPUState* cpu) { cpu->pc = 0xBFC00134u; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00084_cont_BFC0013C(CPUState* cpu) { cpu->pc = 0xBFC0013Cu; OpenBIOS_func_1FC00084(cpu); } void OpenBIOS_func_1FC00144_cont_BFC00178(CPUState* cpu) { cpu->pc = 0xBFC00178u; OpenBIOS_func_1FC00144(cpu); } void OpenBIOS_func_1FC00144_cont_BFC00180(CPUState* cpu) { cpu->pc = 0xBFC00180u; OpenBIOS_func_1FC00144(cpu); } void OpenBIOS_func_1FC00144_cont_BFC00190(CPUState* cpu) { cpu->pc = 0xBFC00190u; OpenBIOS_func_1FC00144(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC002A8(CPUState* cpu) { cpu->pc = 0xBFC002A8u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00314(CPUState* cpu) { cpu->pc = 0xBFC00314u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00330(CPUState* cpu) { cpu->pc = 0xBFC00330u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00348(CPUState* cpu) { cpu->pc = 0xBFC00348u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00358(CPUState* cpu) { cpu->pc = 0xBFC00358u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00380(CPUState* cpu) { cpu->pc = 0xBFC00380u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC001AC_cont_BFC00394(CPUState* cpu) { cpu->pc = 0xBFC00394u; OpenBIOS_func_1FC001AC(cpu); } void OpenBIOS_func_1FC0039C_cont_BFC003A8(CPUState* cpu) { cpu->pc = 0xBFC003A8u; OpenBIOS_func_1FC0039C(cpu); } void OpenBIOS_func_1FC0039C_cont_BFC003BC(CPUState* cpu) { cpu->pc = 0xBFC003BCu; OpenBIOS_func_1FC0039C(cpu); } void OpenBIOS_func_1FC003C4_cont_BFC003D0(CPUState* cpu) { cpu->pc = 0xBFC003D0u; OpenBIOS_func_1FC003C4(cpu); } void OpenBIOS_func_1FC003C4_cont_BFC003E4(CPUState* cpu) { cpu->pc = 0xBFC003E4u; OpenBIOS_func_1FC003C4(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00428(CPUState* cpu) { cpu->pc = 0xBFC00428u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00430(CPUState* cpu) { cpu->pc = 0xBFC00430u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00438(CPUState* cpu) { cpu->pc = 0xBFC00438u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC0043C(CPUState* cpu) { cpu->pc = 0xBFC0043Cu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC0044C(CPUState* cpu) { cpu->pc = 0xBFC0044Cu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00450(CPUState* cpu) { cpu->pc = 0xBFC00450u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00460(CPUState* cpu) { cpu->pc = 0xBFC00460u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00470(CPUState* cpu) { cpu->pc = 0xBFC00470u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00478(CPUState* cpu) { cpu->pc = 0xBFC00478u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00494(CPUState* cpu) { cpu->pc = 0xBFC00494u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC004BC(CPUState* cpu) { cpu->pc = 0xBFC004BCu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC004DC(CPUState* cpu) { cpu->pc = 0xBFC004DCu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC004E4(CPUState* cpu) { cpu->pc = 0xBFC004E4u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC004EC(CPUState* cpu) { cpu->pc = 0xBFC004ECu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC004FC(CPUState* cpu) { cpu->pc = 0xBFC004FCu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC00504(CPUState* cpu) { cpu->pc = 0xBFC00504u; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC003F8_cont_BFC0050C(CPUState* cpu) { cpu->pc = 0xBFC0050Cu; OpenBIOS_func_1FC003F8(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC0056C(CPUState* cpu) { cpu->pc = 0xBFC0056Cu; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00570(CPUState* cpu) { cpu->pc = 0xBFC00570u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00598(CPUState* cpu) { cpu->pc = 0xBFC00598u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC0059C(CPUState* cpu) { cpu->pc = 0xBFC0059Cu; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC005AC(CPUState* cpu) { cpu->pc = 0xBFC005ACu; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC005B8(CPUState* cpu) { cpu->pc = 0xBFC005B8u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC005EC(CPUState* cpu) { cpu->pc = 0xBFC005ECu; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00610(CPUState* cpu) { cpu->pc = 0xBFC00610u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00618(CPUState* cpu) { cpu->pc = 0xBFC00618u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00620(CPUState* cpu) { cpu->pc = 0xBFC00620u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00628(CPUState* cpu) { cpu->pc = 0xBFC00628u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00660(CPUState* cpu) { cpu->pc = 0xBFC00660u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00670(CPUState* cpu) { cpu->pc = 0xBFC00670u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00678(CPUState* cpu) { cpu->pc = 0xBFC00678u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00690(CPUState* cpu) { cpu->pc = 0xBFC00690u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC0052C_cont_BFC00698(CPUState* cpu) { cpu->pc = 0xBFC00698u; OpenBIOS_func_1FC0052C(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00700(CPUState* cpu) { cpu->pc = 0xBFC00700u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00704(CPUState* cpu) { cpu->pc = 0xBFC00704u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00724(CPUState* cpu) { cpu->pc = 0xBFC00724u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00734(CPUState* cpu) { cpu->pc = 0xBFC00734u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00744(CPUState* cpu) { cpu->pc = 0xBFC00744u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00758(CPUState* cpu) { cpu->pc = 0xBFC00758u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00760(CPUState* cpu) { cpu->pc = 0xBFC00760u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00768(CPUState* cpu) { cpu->pc = 0xBFC00768u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00794(CPUState* cpu) { cpu->pc = 0xBFC00794u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC0079C(CPUState* cpu) { cpu->pc = 0xBFC0079Cu; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007B8(CPUState* cpu) { cpu->pc = 0xBFC007B8u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007C0(CPUState* cpu) { cpu->pc = 0xBFC007C0u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007D8(CPUState* cpu) { cpu->pc = 0xBFC007D8u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007E0(CPUState* cpu) { cpu->pc = 0xBFC007E0u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007E8(CPUState* cpu) { cpu->pc = 0xBFC007E8u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC007F0(CPUState* cpu) { cpu->pc = 0xBFC007F0u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00818(CPUState* cpu) { cpu->pc = 0xBFC00818u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC0082C(CPUState* cpu) { cpu->pc = 0xBFC0082Cu; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00834(CPUState* cpu) { cpu->pc = 0xBFC00834u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00848(CPUState* cpu) { cpu->pc = 0xBFC00848u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00850(CPUState* cpu) { cpu->pc = 0xBFC00850u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00858(CPUState* cpu) { cpu->pc = 0xBFC00858u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00860(CPUState* cpu) { cpu->pc = 0xBFC00860u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC006C8_cont_BFC00864(CPUState* cpu) { cpu->pc = 0xBFC00864u; OpenBIOS_func_1FC006C8(cpu); } void OpenBIOS_func_1FC00894_cont_BFC008D4(CPUState* cpu) { cpu->pc = 0xBFC008D4u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC008DC(CPUState* cpu) { cpu->pc = 0xBFC008DCu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC008E0(CPUState* cpu) { cpu->pc = 0xBFC008E0u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC0093C(CPUState* cpu) { cpu->pc = 0xBFC0093Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00944(CPUState* cpu) { cpu->pc = 0xBFC00944u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC0094C(CPUState* cpu) { cpu->pc = 0xBFC0094Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00954(CPUState* cpu) { cpu->pc = 0xBFC00954u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00964(CPUState* cpu) { cpu->pc = 0xBFC00964u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00974(CPUState* cpu) { cpu->pc = 0xBFC00974u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00988(CPUState* cpu) { cpu->pc = 0xBFC00988u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009B8(CPUState* cpu) { cpu->pc = 0xBFC009B8u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009C0(CPUState* cpu) { cpu->pc = 0xBFC009C0u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009D4(CPUState* cpu) { cpu->pc = 0xBFC009D4u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009DC(CPUState* cpu) { cpu->pc = 0xBFC009DCu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009E8(CPUState* cpu) { cpu->pc = 0xBFC009E8u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC009F4(CPUState* cpu) { cpu->pc = 0xBFC009F4u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A04(CPUState* cpu) { cpu->pc = 0xBFC00A04u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A0C(CPUState* cpu) { cpu->pc = 0xBFC00A0Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A28(CPUState* cpu) { cpu->pc = 0xBFC00A28u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A30(CPUState* cpu) { cpu->pc = 0xBFC00A30u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A38(CPUState* cpu) { cpu->pc = 0xBFC00A38u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A40(CPUState* cpu) { cpu->pc = 0xBFC00A40u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A48(CPUState* cpu) { cpu->pc = 0xBFC00A48u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A50(CPUState* cpu) { cpu->pc = 0xBFC00A50u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A5C(CPUState* cpu) { cpu->pc = 0xBFC00A5Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A68(CPUState* cpu) { cpu->pc = 0xBFC00A68u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A7C(CPUState* cpu) { cpu->pc = 0xBFC00A7Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A8C(CPUState* cpu) { cpu->pc = 0xBFC00A8Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A94(CPUState* cpu) { cpu->pc = 0xBFC00A94u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00A98(CPUState* cpu) { cpu->pc = 0xBFC00A98u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AA4(CPUState* cpu) { cpu->pc = 0xBFC00AA4u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AAC(CPUState* cpu) { cpu->pc = 0xBFC00AACu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00ABC(CPUState* cpu) { cpu->pc = 0xBFC00ABCu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AD0(CPUState* cpu) { cpu->pc = 0xBFC00AD0u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AE0(CPUState* cpu) { cpu->pc = 0xBFC00AE0u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AE8(CPUState* cpu) { cpu->pc = 0xBFC00AE8u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AF8(CPUState* cpu) { cpu->pc = 0xBFC00AF8u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00AFC(CPUState* cpu) { cpu->pc = 0xBFC00AFCu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B00(CPUState* cpu) { cpu->pc = 0xBFC00B00u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B0C(CPUState* cpu) { cpu->pc = 0xBFC00B0Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B14(CPUState* cpu) { cpu->pc = 0xBFC00B14u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B20(CPUState* cpu) { cpu->pc = 0xBFC00B20u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B28(CPUState* cpu) { cpu->pc = 0xBFC00B28u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B38(CPUState* cpu) { cpu->pc = 0xBFC00B38u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B44(CPUState* cpu) { cpu->pc = 0xBFC00B44u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B50(CPUState* cpu) { cpu->pc = 0xBFC00B50u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B60(CPUState* cpu) { cpu->pc = 0xBFC00B60u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B74(CPUState* cpu) { cpu->pc = 0xBFC00B74u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B7C(CPUState* cpu) { cpu->pc = 0xBFC00B7Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B84(CPUState* cpu) { cpu->pc = 0xBFC00B84u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B8C(CPUState* cpu) { cpu->pc = 0xBFC00B8Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B94(CPUState* cpu) { cpu->pc = 0xBFC00B94u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00B9C(CPUState* cpu) { cpu->pc = 0xBFC00B9Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00BB0(CPUState* cpu) { cpu->pc = 0xBFC00BB0u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00BB8(CPUState* cpu) { cpu->pc = 0xBFC00BB8u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00BEC(CPUState* cpu) { cpu->pc = 0xBFC00BECu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C0C(CPUState* cpu) { cpu->pc = 0xBFC00C0Cu; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C14(CPUState* cpu) { cpu->pc = 0xBFC00C14u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C20(CPUState* cpu) { cpu->pc = 0xBFC00C20u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C28(CPUState* cpu) { cpu->pc = 0xBFC00C28u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C30(CPUState* cpu) { cpu->pc = 0xBFC00C30u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00894_cont_BFC00C40(CPUState* cpu) { cpu->pc = 0xBFC00C40u; OpenBIOS_func_1FC00894(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00C88(CPUState* cpu) { cpu->pc = 0xBFC00C88u; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00C94(CPUState* cpu) { cpu->pc = 0xBFC00C94u; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00CA0(CPUState* cpu) { cpu->pc = 0xBFC00CA0u; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00CAC(CPUState* cpu) { cpu->pc = 0xBFC00CACu; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00CCC(CPUState* cpu) { cpu->pc = 0xBFC00CCCu; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00CD4(CPUState* cpu) { cpu->pc = 0xBFC00CD4u; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00C48_cont_BFC00CDC(CPUState* cpu) { cpu->pc = 0xBFC00CDCu; OpenBIOS_func_1FC00C48(cpu); } void OpenBIOS_func_1FC00CFC_cont_BFC00D10(CPUState* cpu) { cpu->pc = 0xBFC00D10u; OpenBIOS_func_1FC00CFC(cpu); } void OpenBIOS_func_1FC00CFC_cont_BFC00D14(CPUState* cpu) { cpu->pc = 0xBFC00D14u; OpenBIOS_func_1FC00CFC(cpu); } void OpenBIOS_func_1FC00CFC_cont_BFC00D40(CPUState* cpu) { cpu->pc = 0xBFC00D40u; OpenBIOS_func_1FC00CFC(cpu); } void OpenBIOS_func_1FC00CFC_cont_BFC00D48(CPUState* cpu) { cpu->pc = 0xBFC00D48u; OpenBIOS_func_1FC00CFC(cpu); } void OpenBIOS_func_1FC00CFC_cont_BFC00D4C(CPUState* cpu) { cpu->pc = 0xBFC00D4Cu; OpenBIOS_func_1FC00CFC(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00DA0(CPUState* cpu) { cpu->pc = 0xBFC00DA0u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00DA4(CPUState* cpu) { cpu->pc = 0xBFC00DA4u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00DDC(CPUState* cpu) { cpu->pc = 0xBFC00DDCu; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00DF0(CPUState* cpu) { cpu->pc = 0xBFC00DF0u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00DF8(CPUState* cpu) { cpu->pc = 0xBFC00DF8u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E04(CPUState* cpu) { cpu->pc = 0xBFC00E04u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E0C(CPUState* cpu) { cpu->pc = 0xBFC00E0Cu; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E20(CPUState* cpu) { cpu->pc = 0xBFC00E20u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E28(CPUState* cpu) { cpu->pc = 0xBFC00E28u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E30(CPUState* cpu) { cpu->pc = 0xBFC00E30u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E38(CPUState* cpu) { cpu->pc = 0xBFC00E38u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E44(CPUState* cpu) { cpu->pc = 0xBFC00E44u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E4C(CPUState* cpu) { cpu->pc = 0xBFC00E4Cu; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E54(CPUState* cpu) { cpu->pc = 0xBFC00E54u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E5C(CPUState* cpu) { cpu->pc = 0xBFC00E5Cu; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E64(CPUState* cpu) { cpu->pc = 0xBFC00E64u; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00D60_cont_BFC00E6C(CPUState* cpu) { cpu->pc = 0xBFC00E6Cu; OpenBIOS_func_1FC00D60(cpu); } void OpenBIOS_func_1FC00EE0_cont_BFC00F28(CPUState* cpu) { cpu->pc = 0xBFC00F28u; OpenBIOS_func_1FC00EE0(cpu); } void OpenBIOS_func_1FC00EE0_cont_BFC00F34(CPUState* cpu) { cpu->pc = 0xBFC00F34u; OpenBIOS_func_1FC00EE0(cpu); } void OpenBIOS_func_1FC00EE0_cont_BFC00F38(CPUState* cpu) { cpu->pc = 0xBFC00F38u; OpenBIOS_func_1FC00EE0(cpu); } void OpenBIOS_func_1FC00EE0_cont_BFC00F70(CPUState* cpu) { cpu->pc = 0xBFC00F70u; OpenBIOS_func_1FC00EE0(cpu); } void OpenBIOS_func_1FC00F8C_cont_BFC00FA0(CPUState* cpu) { cpu->pc = 0xBFC00FA0u; OpenBIOS_func_1FC00F8C(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC00FD8(CPUState* cpu) { cpu->pc = 0xBFC00FD8u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC00FE8(CPUState* cpu) { cpu->pc = 0xBFC00FE8u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC0102C(CPUState* cpu) { cpu->pc = 0xBFC0102Cu; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC01078(CPUState* cpu) { cpu->pc = 0xBFC01078u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC01088(CPUState* cpu) { cpu->pc = 0xBFC01088u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC01094(CPUState* cpu) { cpu->pc = 0xBFC01094u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC01098(CPUState* cpu) { cpu->pc = 0xBFC01098u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC010A4(CPUState* cpu) { cpu->pc = 0xBFC010A4u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC010A8(CPUState* cpu) { cpu->pc = 0xBFC010A8u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC010B4(CPUState* cpu) { cpu->pc = 0xBFC010B4u; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC00FB8_cont_BFC010BC(CPUState* cpu) { cpu->pc = 0xBFC010BCu; OpenBIOS_func_1FC00FB8(cpu); } void OpenBIOS_func_1FC010D0_cont_BFC010F0(CPUState* cpu) { cpu->pc = 0xBFC010F0u; OpenBIOS_func_1FC010D0(cpu); } void OpenBIOS_func_1FC010D0_cont_BFC010FC(CPUState* cpu) { cpu->pc = 0xBFC010FCu; OpenBIOS_func_1FC010D0(cpu); } void OpenBIOS_func_1FC010D0_cont_BFC01104(CPUState* cpu) { cpu->pc = 0xBFC01104u; OpenBIOS_func_1FC010D0(cpu); } void OpenBIOS_func_1FC010D0_cont_BFC01118(CPUState* cpu) { cpu->pc = 0xBFC01118u; OpenBIOS_func_1FC010D0(cpu); } void OpenBIOS_func_1FC01154_cont_BFC011A0(CPUState* cpu) { cpu->pc = 0xBFC011A0u; OpenBIOS_func_1FC01154(cpu); } void OpenBIOS_func_1FC01154_cont_BFC011B0(CPUState* cpu) { cpu->pc = 0xBFC011B0u; OpenBIOS_func_1FC01154(cpu); } void OpenBIOS_func_1FC01154_cont_BFC011BC(CPUState* cpu) { cpu->pc = 0xBFC011BCu; OpenBIOS_func_1FC01154(cpu); } void OpenBIOS_func_1FC01154_cont_BFC011C0(CPUState* cpu) { cpu->pc = 0xBFC011C0u; OpenBIOS_func_1FC01154(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01238(CPUState* cpu) { cpu->pc = 0xBFC01238u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01240(CPUState* cpu) { cpu->pc = 0xBFC01240u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01248(CPUState* cpu) { cpu->pc = 0xBFC01248u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01258(CPUState* cpu) { cpu->pc = 0xBFC01258u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01268(CPUState* cpu) { cpu->pc = 0xBFC01268u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0127C(CPUState* cpu) { cpu->pc = 0xBFC0127Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC012B0(CPUState* cpu) { cpu->pc = 0xBFC012B0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC012BC(CPUState* cpu) { cpu->pc = 0xBFC012BCu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC012C4(CPUState* cpu) { cpu->pc = 0xBFC012C4u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC012E0(CPUState* cpu) { cpu->pc = 0xBFC012E0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC012F8(CPUState* cpu) { cpu->pc = 0xBFC012F8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01300(CPUState* cpu) { cpu->pc = 0xBFC01300u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01308(CPUState* cpu) { cpu->pc = 0xBFC01308u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01318(CPUState* cpu) { cpu->pc = 0xBFC01318u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0132C(CPUState* cpu) { cpu->pc = 0xBFC0132Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01334(CPUState* cpu) { cpu->pc = 0xBFC01334u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01340(CPUState* cpu) { cpu->pc = 0xBFC01340u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01348(CPUState* cpu) { cpu->pc = 0xBFC01348u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01364(CPUState* cpu) { cpu->pc = 0xBFC01364u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01384(CPUState* cpu) { cpu->pc = 0xBFC01384u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01398(CPUState* cpu) { cpu->pc = 0xBFC01398u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013A8(CPUState* cpu) { cpu->pc = 0xBFC013A8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013B0(CPUState* cpu) { cpu->pc = 0xBFC013B0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013B4(CPUState* cpu) { cpu->pc = 0xBFC013B4u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013C0(CPUState* cpu) { cpu->pc = 0xBFC013C0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013C8(CPUState* cpu) { cpu->pc = 0xBFC013C8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013D8(CPUState* cpu) { cpu->pc = 0xBFC013D8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC013F0(CPUState* cpu) { cpu->pc = 0xBFC013F0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01400(CPUState* cpu) { cpu->pc = 0xBFC01400u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01410(CPUState* cpu) { cpu->pc = 0xBFC01410u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01414(CPUState* cpu) { cpu->pc = 0xBFC01414u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01418(CPUState* cpu) { cpu->pc = 0xBFC01418u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01424(CPUState* cpu) { cpu->pc = 0xBFC01424u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0142C(CPUState* cpu) { cpu->pc = 0xBFC0142Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01438(CPUState* cpu) { cpu->pc = 0xBFC01438u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01440(CPUState* cpu) { cpu->pc = 0xBFC01440u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01450(CPUState* cpu) { cpu->pc = 0xBFC01450u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0145C(CPUState* cpu) { cpu->pc = 0xBFC0145Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01468(CPUState* cpu) { cpu->pc = 0xBFC01468u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01470(CPUState* cpu) { cpu->pc = 0xBFC01470u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01480(CPUState* cpu) { cpu->pc = 0xBFC01480u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01498(CPUState* cpu) { cpu->pc = 0xBFC01498u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014A0(CPUState* cpu) { cpu->pc = 0xBFC014A0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014A8(CPUState* cpu) { cpu->pc = 0xBFC014A8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014BC(CPUState* cpu) { cpu->pc = 0xBFC014BCu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014DC(CPUState* cpu) { cpu->pc = 0xBFC014DCu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014E8(CPUState* cpu) { cpu->pc = 0xBFC014E8u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC014F0(CPUState* cpu) { cpu->pc = 0xBFC014F0u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0150C(CPUState* cpu) { cpu->pc = 0xBFC0150Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC0152C(CPUState* cpu) { cpu->pc = 0xBFC0152Cu; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC011E0_cont_BFC01530(CPUState* cpu) { cpu->pc = 0xBFC01530u; OpenBIOS_func_1FC011E0(cpu); } void OpenBIOS_func_1FC0153C_cont_BFC01554(CPUState* cpu) { cpu->pc = 0xBFC01554u; OpenBIOS_func_1FC0153C(cpu); } void OpenBIOS_func_1FC0153C_cont_BFC01560(CPUState* cpu) { cpu->pc = 0xBFC01560u; OpenBIOS_func_1FC0153C(cpu); } void OpenBIOS_func_1FC0153C_cont_BFC01568(CPUState* cpu) { cpu->pc = 0xBFC01568u; OpenBIOS_func_1FC0153C(cpu); } void OpenBIOS_func_1FC01570_cont_BFC01594(CPUState* cpu) { cpu->pc = 0xBFC01594u; OpenBIOS_func_1FC01570(cpu); } void OpenBIOS_func_1FC01570_cont_BFC0159C(CPUState* cpu) { cpu->pc = 0xBFC0159Cu; OpenBIOS_func_1FC01570(cpu); } void OpenBIOS_func_1FC01570_cont_BFC015A4(CPUState* cpu) { cpu->pc = 0xBFC015A4u; OpenBIOS_func_1FC01570(cpu); } void OpenBIOS_func_1FC01570_cont_BFC015C4(CPUState* cpu) { cpu->pc = 0xBFC015C4u; OpenBIOS_func_1FC01570(cpu); } void OpenBIOS_func_1FC01570_cont_BFC015D0(CPUState* cpu) { cpu->pc = 0xBFC015D0u; OpenBIOS_func_1FC01570(cpu); } void OpenBIOS_func_1FC015E0_cont_BFC01604(CPUState* cpu) { cpu->pc = 0xBFC01604u; OpenBIOS_func_1FC015E0(cpu); } void OpenBIOS_func_1FC015E0_cont_BFC0160C(CPUState* cpu) { cpu->pc = 0xBFC0160Cu; OpenBIOS_func_1FC015E0(cpu); } void OpenBIOS_func_1FC015E0_cont_BFC01614(CPUState* cpu) { cpu->pc = 0xBFC01614u; OpenBIOS_func_1FC015E0(cpu); } void OpenBIOS_func_1FC015E0_cont_BFC01634(CPUState* cpu) { cpu->pc = 0xBFC01634u; OpenBIOS_func_1FC015E0(cpu); } void OpenBIOS_func_1FC015E0_cont_BFC01640(CPUState* cpu) { cpu->pc = 0xBFC01640u; OpenBIOS_func_1FC015E0(cpu); } void OpenBIOS_func_1FC01650_cont_BFC01674(CPUState* cpu) { cpu->pc = 0xBFC01674u; OpenBIOS_func_1FC01650(cpu); } void OpenBIOS_func_1FC01650_cont_BFC0167C(CPUState* cpu) { cpu->pc = 0xBFC0167Cu; OpenBIOS_func_1FC01650(cpu); } void OpenBIOS_func_1FC01650_cont_BFC01684(CPUState* cpu) { cpu->pc = 0xBFC01684u; OpenBIOS_func_1FC01650(cpu); } void OpenBIOS_func_1FC01650_cont_BFC016A4(CPUState* cpu) { cpu->pc = 0xBFC016A4u; OpenBIOS_func_1FC01650(cpu); } void OpenBIOS_func_1FC01650_cont_BFC016B0(CPUState* cpu) { cpu->pc = 0xBFC016B0u; OpenBIOS_func_1FC01650(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC016DC(CPUState* cpu) { cpu->pc = 0xBFC016DCu; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC016E0(CPUState* cpu) { cpu->pc = 0xBFC016E0u; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC0171C(CPUState* cpu) { cpu->pc = 0xBFC0171Cu; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC01724(CPUState* cpu) { cpu->pc = 0xBFC01724u; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC0173C(CPUState* cpu) { cpu->pc = 0xBFC0173Cu; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC016C0_cont_BFC01754(CPUState* cpu) { cpu->pc = 0xBFC01754u; OpenBIOS_func_1FC016C0(cpu); } void OpenBIOS_func_1FC0175C_cont_BFC01774(CPUState* cpu) { cpu->pc = 0xBFC01774u; OpenBIOS_func_1FC0175C(cpu); } void OpenBIOS_func_1FC0175C_cont_BFC0177C(CPUState* cpu) { cpu->pc = 0xBFC0177Cu; OpenBIOS_func_1FC0175C(cpu); } void OpenBIOS_func_1FC0175C_cont_BFC01794(CPUState* cpu) { cpu->pc = 0xBFC01794u; OpenBIOS_func_1FC0175C(cpu); } void OpenBIOS_func_1FC0175C_cont_BFC017AC(CPUState* cpu) { cpu->pc = 0xBFC017ACu; OpenBIOS_func_1FC0175C(cpu); } void OpenBIOS_func_1FC0175C_cont_BFC017B0(CPUState* cpu) { cpu->pc = 0xBFC017B0u; OpenBIOS_func_1FC0175C(cpu); } void OpenBIOS_func_1FC017D0_cont_BFC017E0(CPUState* cpu) { cpu->pc = 0xBFC017E0u; OpenBIOS_func_1FC017D0(cpu); } void OpenBIOS_func_1FC017D0_cont_BFC017E4(CPUState* cpu) { cpu->pc = 0xBFC017E4u; OpenBIOS_func_1FC017D0(cpu); } void OpenBIOS_func_1FC017D0_cont_BFC01808(CPUState* cpu) { cpu->pc = 0xBFC01808u; OpenBIOS_func_1FC017D0(cpu); } void OpenBIOS_func_1FC017D0_cont_BFC01818(CPUState* cpu) { cpu->pc = 0xBFC01818u; OpenBIOS_func_1FC017D0(cpu); } void OpenBIOS_func_1FC017D0_cont_BFC01828(CPUState* cpu) { cpu->pc = 0xBFC01828u; OpenBIOS_func_1FC017D0(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01858(CPUState* cpu) { cpu->pc = 0xBFC01858u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC0185C(CPUState* cpu) { cpu->pc = 0xBFC0185Cu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01888(CPUState* cpu) { cpu->pc = 0xBFC01888u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01890(CPUState* cpu) { cpu->pc = 0xBFC01890u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC018B0(CPUState* cpu) { cpu->pc = 0xBFC018B0u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC018C0(CPUState* cpu) { cpu->pc = 0xBFC018C0u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC018C8(CPUState* cpu) { cpu->pc = 0xBFC018C8u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC018EC(CPUState* cpu) { cpu->pc = 0xBFC018ECu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC018FC(CPUState* cpu) { cpu->pc = 0xBFC018FCu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01920(CPUState* cpu) { cpu->pc = 0xBFC01920u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01928(CPUState* cpu) { cpu->pc = 0xBFC01928u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01930(CPUState* cpu) { cpu->pc = 0xBFC01930u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01938(CPUState* cpu) { cpu->pc = 0xBFC01938u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC0195C(CPUState* cpu) { cpu->pc = 0xBFC0195Cu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC0196C(CPUState* cpu) { cpu->pc = 0xBFC0196Cu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC0197C(CPUState* cpu) { cpu->pc = 0xBFC0197Cu; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC01830_cont_BFC01990(CPUState* cpu) { cpu->pc = 0xBFC01990u; OpenBIOS_func_1FC01830(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC019D8(CPUState* cpu) { cpu->pc = 0xBFC019D8u; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC019DC(CPUState* cpu) { cpu->pc = 0xBFC019DCu; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC01A00(CPUState* cpu) { cpu->pc = 0xBFC01A00u; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC01A08(CPUState* cpu) { cpu->pc = 0xBFC01A08u; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC01A14(CPUState* cpu) { cpu->pc = 0xBFC01A14u; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC01A1C(CPUState* cpu) { cpu->pc = 0xBFC01A1Cu; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC019B4_cont_BFC01A38(CPUState* cpu) { cpu->pc = 0xBFC01A38u; OpenBIOS_func_1FC019B4(cpu); } void OpenBIOS_func_1FC01A44_cont_BFC01A68(CPUState* cpu) { cpu->pc = 0xBFC01A68u; OpenBIOS_func_1FC01A44(cpu); } void OpenBIOS_func_1FC01A44_cont_BFC01A74(CPUState* cpu) { cpu->pc = 0xBFC01A74u; OpenBIOS_func_1FC01A44(cpu); } void OpenBIOS_func_1FC01A44_cont_BFC01A7C(CPUState* cpu) { cpu->pc = 0xBFC01A7Cu; OpenBIOS_func_1FC01A44(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01AB4(CPUState* cpu) { cpu->pc = 0xBFC01AB4u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01AB8(CPUState* cpu) { cpu->pc = 0xBFC01AB8u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01AE8(CPUState* cpu) { cpu->pc = 0xBFC01AE8u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01AF4(CPUState* cpu) { cpu->pc = 0xBFC01AF4u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01AFC(CPUState* cpu) { cpu->pc = 0xBFC01AFCu; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B04(CPUState* cpu) { cpu->pc = 0xBFC01B04u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B10(CPUState* cpu) { cpu->pc = 0xBFC01B10u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B18(CPUState* cpu) { cpu->pc = 0xBFC01B18u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B24(CPUState* cpu) { cpu->pc = 0xBFC01B24u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B2C(CPUState* cpu) { cpu->pc = 0xBFC01B2Cu; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B30(CPUState* cpu) { cpu->pc = 0xBFC01B30u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B44(CPUState* cpu) { cpu->pc = 0xBFC01B44u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B4C(CPUState* cpu) { cpu->pc = 0xBFC01B4Cu; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B5C(CPUState* cpu) { cpu->pc = 0xBFC01B5Cu; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B64(CPUState* cpu) { cpu->pc = 0xBFC01B64u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B6C(CPUState* cpu) { cpu->pc = 0xBFC01B6Cu; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01B74(CPUState* cpu) { cpu->pc = 0xBFC01B74u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01BA0(CPUState* cpu) { cpu->pc = 0xBFC01BA0u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01BA8(CPUState* cpu) { cpu->pc = 0xBFC01BA8u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01BB0(CPUState* cpu) { cpu->pc = 0xBFC01BB0u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01A84_cont_BFC01BB8(CPUState* cpu) { cpu->pc = 0xBFC01BB8u; OpenBIOS_func_1FC01A84(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C10(CPUState* cpu) { cpu->pc = 0xBFC01C10u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C14(CPUState* cpu) { cpu->pc = 0xBFC01C14u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C38(CPUState* cpu) { cpu->pc = 0xBFC01C38u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C40(CPUState* cpu) { cpu->pc = 0xBFC01C40u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C4C(CPUState* cpu) { cpu->pc = 0xBFC01C4Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C54(CPUState* cpu) { cpu->pc = 0xBFC01C54u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C5C(CPUState* cpu) { cpu->pc = 0xBFC01C5Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C7C(CPUState* cpu) { cpu->pc = 0xBFC01C7Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C88(CPUState* cpu) { cpu->pc = 0xBFC01C88u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01C98(CPUState* cpu) { cpu->pc = 0xBFC01C98u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CA8(CPUState* cpu) { cpu->pc = 0xBFC01CA8u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CBC(CPUState* cpu) { cpu->pc = 0xBFC01CBCu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CD0(CPUState* cpu) { cpu->pc = 0xBFC01CD0u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CD4(CPUState* cpu) { cpu->pc = 0xBFC01CD4u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CE0(CPUState* cpu) { cpu->pc = 0xBFC01CE0u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01CF4(CPUState* cpu) { cpu->pc = 0xBFC01CF4u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D0C(CPUState* cpu) { cpu->pc = 0xBFC01D0Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D20(CPUState* cpu) { cpu->pc = 0xBFC01D20u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D28(CPUState* cpu) { cpu->pc = 0xBFC01D28u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D40(CPUState* cpu) { cpu->pc = 0xBFC01D40u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D4C(CPUState* cpu) { cpu->pc = 0xBFC01D4Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D58(CPUState* cpu) { cpu->pc = 0xBFC01D58u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D60(CPUState* cpu) { cpu->pc = 0xBFC01D60u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D6C(CPUState* cpu) { cpu->pc = 0xBFC01D6Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D7C(CPUState* cpu) { cpu->pc = 0xBFC01D7Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D88(CPUState* cpu) { cpu->pc = 0xBFC01D88u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01D90(CPUState* cpu) { cpu->pc = 0xBFC01D90u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01DAC(CPUState* cpu) { cpu->pc = 0xBFC01DACu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01DCC(CPUState* cpu) { cpu->pc = 0xBFC01DCCu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01DD0(CPUState* cpu) { cpu->pc = 0xBFC01DD0u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01DEC(CPUState* cpu) { cpu->pc = 0xBFC01DECu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E0C(CPUState* cpu) { cpu->pc = 0xBFC01E0Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E14(CPUState* cpu) { cpu->pc = 0xBFC01E14u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E1C(CPUState* cpu) { cpu->pc = 0xBFC01E1Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E24(CPUState* cpu) { cpu->pc = 0xBFC01E24u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E40(CPUState* cpu) { cpu->pc = 0xBFC01E40u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E48(CPUState* cpu) { cpu->pc = 0xBFC01E48u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E5C(CPUState* cpu) { cpu->pc = 0xBFC01E5Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E64(CPUState* cpu) { cpu->pc = 0xBFC01E64u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E70(CPUState* cpu) { cpu->pc = 0xBFC01E70u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E74(CPUState* cpu) { cpu->pc = 0xBFC01E74u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E78(CPUState* cpu) { cpu->pc = 0xBFC01E78u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01E7C(CPUState* cpu) { cpu->pc = 0xBFC01E7Cu; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01EB0(CPUState* cpu) { cpu->pc = 0xBFC01EB0u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01EB8(CPUState* cpu) { cpu->pc = 0xBFC01EB8u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01EC4(CPUState* cpu) { cpu->pc = 0xBFC01EC4u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01ED4(CPUState* cpu) { cpu->pc = 0xBFC01ED4u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01BC4_cont_BFC01EE4(CPUState* cpu) { cpu->pc = 0xBFC01EE4u; OpenBIOS_func_1FC01BC4(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F28(CPUState* cpu) { cpu->pc = 0xBFC01F28u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F2C(CPUState* cpu) { cpu->pc = 0xBFC01F2Cu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F50(CPUState* cpu) { cpu->pc = 0xBFC01F50u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F58(CPUState* cpu) { cpu->pc = 0xBFC01F58u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F60(CPUState* cpu) { cpu->pc = 0xBFC01F60u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F68(CPUState* cpu) { cpu->pc = 0xBFC01F68u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F74(CPUState* cpu) { cpu->pc = 0xBFC01F74u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F84(CPUState* cpu) { cpu->pc = 0xBFC01F84u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F90(CPUState* cpu) { cpu->pc = 0xBFC01F90u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F94(CPUState* cpu) { cpu->pc = 0xBFC01F94u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F98(CPUState* cpu) { cpu->pc = 0xBFC01F98u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01F9C(CPUState* cpu) { cpu->pc = 0xBFC01F9Cu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01FC0(CPUState* cpu) { cpu->pc = 0xBFC01FC0u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01FC8(CPUState* cpu) { cpu->pc = 0xBFC01FC8u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC01FD8(CPUState* cpu) { cpu->pc = 0xBFC01FD8u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02018(CPUState* cpu) { cpu->pc = 0xBFC02018u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC0201C(CPUState* cpu) { cpu->pc = 0xBFC0201Cu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC0202C(CPUState* cpu) { cpu->pc = 0xBFC0202Cu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02054(CPUState* cpu) { cpu->pc = 0xBFC02054u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02064(CPUState* cpu) { cpu->pc = 0xBFC02064u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02074(CPUState* cpu) { cpu->pc = 0xBFC02074u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02094(CPUState* cpu) { cpu->pc = 0xBFC02094u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020A4(CPUState* cpu) { cpu->pc = 0xBFC020A4u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020B8(CPUState* cpu) { cpu->pc = 0xBFC020B8u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020C4(CPUState* cpu) { cpu->pc = 0xBFC020C4u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020D0(CPUState* cpu) { cpu->pc = 0xBFC020D0u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020E0(CPUState* cpu) { cpu->pc = 0xBFC020E0u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020F0(CPUState* cpu) { cpu->pc = 0xBFC020F0u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC020FC(CPUState* cpu) { cpu->pc = 0xBFC020FCu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02108(CPUState* cpu) { cpu->pc = 0xBFC02108u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02110(CPUState* cpu) { cpu->pc = 0xBFC02110u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC02128(CPUState* cpu) { cpu->pc = 0xBFC02128u; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC01EEC_cont_BFC0213C(CPUState* cpu) { cpu->pc = 0xBFC0213Cu; OpenBIOS_func_1FC01EEC(cpu); } void OpenBIOS_func_1FC02144_cont_BFC0216C(CPUState* cpu) { cpu->pc = 0xBFC0216Cu; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02170(CPUState* cpu) { cpu->pc = 0xBFC02170u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02194(CPUState* cpu) { cpu->pc = 0xBFC02194u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC0219C(CPUState* cpu) { cpu->pc = 0xBFC0219Cu; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC021B8(CPUState* cpu) { cpu->pc = 0xBFC021B8u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC021C4(CPUState* cpu) { cpu->pc = 0xBFC021C4u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02204(CPUState* cpu) { cpu->pc = 0xBFC02204u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02220(CPUState* cpu) { cpu->pc = 0xBFC02220u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02224(CPUState* cpu) { cpu->pc = 0xBFC02224u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02244(CPUState* cpu) { cpu->pc = 0xBFC02244u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02248(CPUState* cpu) { cpu->pc = 0xBFC02248u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02144_cont_BFC02250(CPUState* cpu) { cpu->pc = 0xBFC02250u; OpenBIOS_func_1FC02144(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02284(CPUState* cpu) { cpu->pc = 0xBFC02284u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02288(CPUState* cpu) { cpu->pc = 0xBFC02288u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022AC(CPUState* cpu) { cpu->pc = 0xBFC022ACu; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022B8(CPUState* cpu) { cpu->pc = 0xBFC022B8u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022C0(CPUState* cpu) { cpu->pc = 0xBFC022C0u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022C8(CPUState* cpu) { cpu->pc = 0xBFC022C8u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022DC(CPUState* cpu) { cpu->pc = 0xBFC022DCu; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022EC(CPUState* cpu) { cpu->pc = 0xBFC022ECu; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC022F0(CPUState* cpu) { cpu->pc = 0xBFC022F0u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02304(CPUState* cpu) { cpu->pc = 0xBFC02304u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC0230C(CPUState* cpu) { cpu->pc = 0xBFC0230Cu; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02310(CPUState* cpu) { cpu->pc = 0xBFC02310u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02338(CPUState* cpu) { cpu->pc = 0xBFC02338u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02340(CPUState* cpu) { cpu->pc = 0xBFC02340u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02348(CPUState* cpu) { cpu->pc = 0xBFC02348u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02350(CPUState* cpu) { cpu->pc = 0xBFC02350u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02360(CPUState* cpu) { cpu->pc = 0xBFC02360u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02368(CPUState* cpu) { cpu->pc = 0xBFC02368u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02370(CPUState* cpu) { cpu->pc = 0xBFC02370u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02378(CPUState* cpu) { cpu->pc = 0xBFC02378u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02384(CPUState* cpu) { cpu->pc = 0xBFC02384u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02390(CPUState* cpu) { cpu->pc = 0xBFC02390u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC02398(CPUState* cpu) { cpu->pc = 0xBFC02398u; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC02258_cont_BFC023AC(CPUState* cpu) { cpu->pc = 0xBFC023ACu; OpenBIOS_func_1FC02258(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02408(CPUState* cpu) { cpu->pc = 0xBFC02408u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC0240C(CPUState* cpu) { cpu->pc = 0xBFC0240Cu; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02430(CPUState* cpu) { cpu->pc = 0xBFC02430u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02438(CPUState* cpu) { cpu->pc = 0xBFC02438u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02440(CPUState* cpu) { cpu->pc = 0xBFC02440u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02448(CPUState* cpu) { cpu->pc = 0xBFC02448u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02454(CPUState* cpu) { cpu->pc = 0xBFC02454u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02464(CPUState* cpu) { cpu->pc = 0xBFC02464u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02474(CPUState* cpu) { cpu->pc = 0xBFC02474u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02478(CPUState* cpu) { cpu->pc = 0xBFC02478u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC0247C(CPUState* cpu) { cpu->pc = 0xBFC0247Cu; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024A0(CPUState* cpu) { cpu->pc = 0xBFC024A0u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024B0(CPUState* cpu) { cpu->pc = 0xBFC024B0u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024B8(CPUState* cpu) { cpu->pc = 0xBFC024B8u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024C0(CPUState* cpu) { cpu->pc = 0xBFC024C0u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024C8(CPUState* cpu) { cpu->pc = 0xBFC024C8u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024D8(CPUState* cpu) { cpu->pc = 0xBFC024D8u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC024FC(CPUState* cpu) { cpu->pc = 0xBFC024FCu; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02510(CPUState* cpu) { cpu->pc = 0xBFC02510u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02528(CPUState* cpu) { cpu->pc = 0xBFC02528u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02530(CPUState* cpu) { cpu->pc = 0xBFC02530u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC02544(CPUState* cpu) { cpu->pc = 0xBFC02544u; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC023C8_cont_BFC0254C(CPUState* cpu) { cpu->pc = 0xBFC0254Cu; OpenBIOS_func_1FC023C8(cpu); } void OpenBIOS_func_1FC02554_cont_BFC02578(CPUState* cpu) { cpu->pc = 0xBFC02578u; OpenBIOS_func_1FC02554(cpu); } void OpenBIOS_func_1FC02554_cont_BFC02584(CPUState* cpu) { cpu->pc = 0xBFC02584u; OpenBIOS_func_1FC02554(cpu); } void OpenBIOS_func_1FC02554_cont_BFC0258C(CPUState* cpu) { cpu->pc = 0xBFC0258Cu; OpenBIOS_func_1FC02554(cpu); } void OpenBIOS_func_1FC02594_cont_BFC025AC(CPUState* cpu) { cpu->pc = 0xBFC025ACu; OpenBIOS_func_1FC02594(cpu); } void OpenBIOS_func_1FC02594_cont_BFC025B8(CPUState* cpu) { cpu->pc = 0xBFC025B8u; OpenBIOS_func_1FC02594(cpu); } void OpenBIOS_func_1FC02594_cont_BFC025C8(CPUState* cpu) { cpu->pc = 0xBFC025C8u; OpenBIOS_func_1FC02594(cpu); } void OpenBIOS_func_1FC02594_cont_BFC025E4(CPUState* cpu) { cpu->pc = 0xBFC025E4u; OpenBIOS_func_1FC02594(cpu); } void OpenBIOS_func_1FC025EC_cont_BFC02608(CPUState* cpu) { cpu->pc = 0xBFC02608u; OpenBIOS_func_1FC025EC(cpu); } void OpenBIOS_func_1FC025EC_cont_BFC02624(CPUState* cpu) { cpu->pc = 0xBFC02624u; OpenBIOS_func_1FC025EC(cpu); } void OpenBIOS_func_1FC025EC_cont_BFC02630(CPUState* cpu) { cpu->pc = 0xBFC02630u; OpenBIOS_func_1FC025EC(cpu); } void OpenBIOS_func_1FC025EC_cont_BFC02638(CPUState* cpu) { cpu->pc = 0xBFC02638u; OpenBIOS_func_1FC025EC(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02684(CPUState* cpu) { cpu->pc = 0xBFC02684u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02688(CPUState* cpu) { cpu->pc = 0xBFC02688u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026B4(CPUState* cpu) { cpu->pc = 0xBFC026B4u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026BC(CPUState* cpu) { cpu->pc = 0xBFC026BCu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026D0(CPUState* cpu) { cpu->pc = 0xBFC026D0u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026E4(CPUState* cpu) { cpu->pc = 0xBFC026E4u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026EC(CPUState* cpu) { cpu->pc = 0xBFC026ECu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC026F0(CPUState* cpu) { cpu->pc = 0xBFC026F0u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02724(CPUState* cpu) { cpu->pc = 0xBFC02724u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02734(CPUState* cpu) { cpu->pc = 0xBFC02734u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02738(CPUState* cpu) { cpu->pc = 0xBFC02738u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0274C(CPUState* cpu) { cpu->pc = 0xBFC0274Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02754(CPUState* cpu) { cpu->pc = 0xBFC02754u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02758(CPUState* cpu) { cpu->pc = 0xBFC02758u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02764(CPUState* cpu) { cpu->pc = 0xBFC02764u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0276C(CPUState* cpu) { cpu->pc = 0xBFC0276Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02774(CPUState* cpu) { cpu->pc = 0xBFC02774u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02780(CPUState* cpu) { cpu->pc = 0xBFC02780u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02784(CPUState* cpu) { cpu->pc = 0xBFC02784u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02798(CPUState* cpu) { cpu->pc = 0xBFC02798u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0279C(CPUState* cpu) { cpu->pc = 0xBFC0279Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027AC(CPUState* cpu) { cpu->pc = 0xBFC027ACu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027BC(CPUState* cpu) { cpu->pc = 0xBFC027BCu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027C8(CPUState* cpu) { cpu->pc = 0xBFC027C8u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027D8(CPUState* cpu) { cpu->pc = 0xBFC027D8u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027DC(CPUState* cpu) { cpu->pc = 0xBFC027DCu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027F0(CPUState* cpu) { cpu->pc = 0xBFC027F0u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC027F8(CPUState* cpu) { cpu->pc = 0xBFC027F8u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02800(CPUState* cpu) { cpu->pc = 0xBFC02800u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02808(CPUState* cpu) { cpu->pc = 0xBFC02808u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02820(CPUState* cpu) { cpu->pc = 0xBFC02820u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02858(CPUState* cpu) { cpu->pc = 0xBFC02858u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02870(CPUState* cpu) { cpu->pc = 0xBFC02870u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0288C(CPUState* cpu) { cpu->pc = 0xBFC0288Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC028D4(CPUState* cpu) { cpu->pc = 0xBFC028D4u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC028DC(CPUState* cpu) { cpu->pc = 0xBFC028DCu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC028F4(CPUState* cpu) { cpu->pc = 0xBFC028F4u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC028FC(CPUState* cpu) { cpu->pc = 0xBFC028FCu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0290C(CPUState* cpu) { cpu->pc = 0xBFC0290Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02918(CPUState* cpu) { cpu->pc = 0xBFC02918u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02924(CPUState* cpu) { cpu->pc = 0xBFC02924u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02928(CPUState* cpu) { cpu->pc = 0xBFC02928u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02954(CPUState* cpu) { cpu->pc = 0xBFC02954u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0295C(CPUState* cpu) { cpu->pc = 0xBFC0295Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02964(CPUState* cpu) { cpu->pc = 0xBFC02964u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02974(CPUState* cpu) { cpu->pc = 0xBFC02974u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC02980(CPUState* cpu) { cpu->pc = 0xBFC02980u; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC02640_cont_BFC0299C(CPUState* cpu) { cpu->pc = 0xBFC0299Cu; OpenBIOS_func_1FC02640(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC029E8(CPUState* cpu) { cpu->pc = 0xBFC029E8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC029EC(CPUState* cpu) { cpu->pc = 0xBFC029ECu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A18(CPUState* cpu) { cpu->pc = 0xBFC02A18u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A20(CPUState* cpu) { cpu->pc = 0xBFC02A20u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A34(CPUState* cpu) { cpu->pc = 0xBFC02A34u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A48(CPUState* cpu) { cpu->pc = 0xBFC02A48u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A50(CPUState* cpu) { cpu->pc = 0xBFC02A50u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A54(CPUState* cpu) { cpu->pc = 0xBFC02A54u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A88(CPUState* cpu) { cpu->pc = 0xBFC02A88u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A98(CPUState* cpu) { cpu->pc = 0xBFC02A98u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02A9C(CPUState* cpu) { cpu->pc = 0xBFC02A9Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AB0(CPUState* cpu) { cpu->pc = 0xBFC02AB0u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AB8(CPUState* cpu) { cpu->pc = 0xBFC02AB8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02ABC(CPUState* cpu) { cpu->pc = 0xBFC02ABCu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AC4(CPUState* cpu) { cpu->pc = 0xBFC02AC4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02ACC(CPUState* cpu) { cpu->pc = 0xBFC02ACCu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AD4(CPUState* cpu) { cpu->pc = 0xBFC02AD4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AE0(CPUState* cpu) { cpu->pc = 0xBFC02AE0u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AE4(CPUState* cpu) { cpu->pc = 0xBFC02AE4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AF8(CPUState* cpu) { cpu->pc = 0xBFC02AF8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02AFC(CPUState* cpu) { cpu->pc = 0xBFC02AFCu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B0C(CPUState* cpu) { cpu->pc = 0xBFC02B0Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B1C(CPUState* cpu) { cpu->pc = 0xBFC02B1Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B28(CPUState* cpu) { cpu->pc = 0xBFC02B28u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B38(CPUState* cpu) { cpu->pc = 0xBFC02B38u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B3C(CPUState* cpu) { cpu->pc = 0xBFC02B3Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B4C(CPUState* cpu) { cpu->pc = 0xBFC02B4Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B54(CPUState* cpu) { cpu->pc = 0xBFC02B54u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B5C(CPUState* cpu) { cpu->pc = 0xBFC02B5Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B68(CPUState* cpu) { cpu->pc = 0xBFC02B68u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B70(CPUState* cpu) { cpu->pc = 0xBFC02B70u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B7C(CPUState* cpu) { cpu->pc = 0xBFC02B7Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B80(CPUState* cpu) { cpu->pc = 0xBFC02B80u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B90(CPUState* cpu) { cpu->pc = 0xBFC02B90u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02B98(CPUState* cpu) { cpu->pc = 0xBFC02B98u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02BAC(CPUState* cpu) { cpu->pc = 0xBFC02BACu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02BE8(CPUState* cpu) { cpu->pc = 0xBFC02BE8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C00(CPUState* cpu) { cpu->pc = 0xBFC02C00u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C1C(CPUState* cpu) { cpu->pc = 0xBFC02C1Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C64(CPUState* cpu) { cpu->pc = 0xBFC02C64u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C6C(CPUState* cpu) { cpu->pc = 0xBFC02C6Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C84(CPUState* cpu) { cpu->pc = 0xBFC02C84u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C8C(CPUState* cpu) { cpu->pc = 0xBFC02C8Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02C9C(CPUState* cpu) { cpu->pc = 0xBFC02C9Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CA8(CPUState* cpu) { cpu->pc = 0xBFC02CA8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CB4(CPUState* cpu) { cpu->pc = 0xBFC02CB4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CB8(CPUState* cpu) { cpu->pc = 0xBFC02CB8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CE4(CPUState* cpu) { cpu->pc = 0xBFC02CE4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CEC(CPUState* cpu) { cpu->pc = 0xBFC02CECu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02CF4(CPUState* cpu) { cpu->pc = 0xBFC02CF4u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D00(CPUState* cpu) { cpu->pc = 0xBFC02D00u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D08(CPUState* cpu) { cpu->pc = 0xBFC02D08u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D1C(CPUState* cpu) { cpu->pc = 0xBFC02D1Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D48(CPUState* cpu) { cpu->pc = 0xBFC02D48u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D50(CPUState* cpu) { cpu->pc = 0xBFC02D50u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D58(CPUState* cpu) { cpu->pc = 0xBFC02D58u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D60(CPUState* cpu) { cpu->pc = 0xBFC02D60u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D6C(CPUState* cpu) { cpu->pc = 0xBFC02D6Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D74(CPUState* cpu) { cpu->pc = 0xBFC02D74u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D80(CPUState* cpu) { cpu->pc = 0xBFC02D80u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D84(CPUState* cpu) { cpu->pc = 0xBFC02D84u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D94(CPUState* cpu) { cpu->pc = 0xBFC02D94u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02D9C(CPUState* cpu) { cpu->pc = 0xBFC02D9Cu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02DAC(CPUState* cpu) { cpu->pc = 0xBFC02DACu; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02DC8(CPUState* cpu) { cpu->pc = 0xBFC02DC8u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC029A4_cont_BFC02DD0(CPUState* cpu) { cpu->pc = 0xBFC02DD0u; OpenBIOS_func_1FC029A4(cpu); } void OpenBIOS_func_1FC02DEC_cont_BFC02E18(CPUState* cpu) { cpu->pc = 0xBFC02E18u; OpenBIOS_func_1FC02DEC(cpu); } void OpenBIOS_func_1FC02DEC_cont_BFC02E28(CPUState* cpu) { cpu->pc = 0xBFC02E28u; OpenBIOS_func_1FC02DEC(cpu); } void OpenBIOS_func_1FC02DEC_cont_BFC02E38(CPUState* cpu) { cpu->pc = 0xBFC02E38u; OpenBIOS_func_1FC02DEC(cpu); } void OpenBIOS_func_1FC02DEC_cont_BFC02E48(CPUState* cpu) { cpu->pc = 0xBFC02E48u; OpenBIOS_func_1FC02DEC(cpu); } void OpenBIOS_func_1FC02DEC_cont_BFC02E58(CPUState* cpu) { cpu->pc = 0xBFC02E58u; OpenBIOS_func_1FC02DEC(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02EA0(CPUState* cpu) { cpu->pc = 0xBFC02EA0u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02EC0(CPUState* cpu) { cpu->pc = 0xBFC02EC0u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02EE0(CPUState* cpu) { cpu->pc = 0xBFC02EE0u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F00(CPUState* cpu) { cpu->pc = 0xBFC02F00u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F20(CPUState* cpu) { cpu->pc = 0xBFC02F20u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F40(CPUState* cpu) { cpu->pc = 0xBFC02F40u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F54(CPUState* cpu) { cpu->pc = 0xBFC02F54u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F60(CPUState* cpu) { cpu->pc = 0xBFC02F60u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F6C(CPUState* cpu) { cpu->pc = 0xBFC02F6Cu; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F78(CPUState* cpu) { cpu->pc = 0xBFC02F78u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02E70_cont_BFC02F84(CPUState* cpu) { cpu->pc = 0xBFC02F84u; OpenBIOS_func_1FC02E70(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FCC(CPUState* cpu) { cpu->pc = 0xBFC02FCCu; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FD0(CPUState* cpu) { cpu->pc = 0xBFC02FD0u; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FD8(CPUState* cpu) { cpu->pc = 0xBFC02FD8u; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FE0(CPUState* cpu) { cpu->pc = 0xBFC02FE0u; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FE4(CPUState* cpu) { cpu->pc = 0xBFC02FE4u; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC02FB8_cont_BFC02FF0(CPUState* cpu) { cpu->pc = 0xBFC02FF0u; OpenBIOS_func_1FC02FB8(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03020(CPUState* cpu) { cpu->pc = 0xBFC03020u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03028(CPUState* cpu) { cpu->pc = 0xBFC03028u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03030(CPUState* cpu) { cpu->pc = 0xBFC03030u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03040(CPUState* cpu) { cpu->pc = 0xBFC03040u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC0304C(CPUState* cpu) { cpu->pc = 0xBFC0304Cu; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03054(CPUState* cpu) { cpu->pc = 0xBFC03054u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03058(CPUState* cpu) { cpu->pc = 0xBFC03058u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03070(CPUState* cpu) { cpu->pc = 0xBFC03070u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03078(CPUState* cpu) { cpu->pc = 0xBFC03078u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03088(CPUState* cpu) { cpu->pc = 0xBFC03088u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC03090(CPUState* cpu) { cpu->pc = 0xBFC03090u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC0309C(CPUState* cpu) { cpu->pc = 0xBFC0309Cu; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC030A4(CPUState* cpu) { cpu->pc = 0xBFC030A4u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC03000_cont_BFC030B4(CPUState* cpu) { cpu->pc = 0xBFC030B4u; OpenBIOS_func_1FC03000(cpu); } void OpenBIOS_func_1FC030D0_cont_BFC030E0(CPUState* cpu) { cpu->pc = 0xBFC030E0u; OpenBIOS_func_1FC030D0(cpu); } void OpenBIOS_func_1FC030D0_cont_BFC030F0(CPUState* cpu) { cpu->pc = 0xBFC030F0u; OpenBIOS_func_1FC030D0(cpu); } void OpenBIOS_func_1FC030D0_cont_BFC030F8(CPUState* cpu) { cpu->pc = 0xBFC030F8u; OpenBIOS_func_1FC030D0(cpu); } void OpenBIOS_func_1FC030D0_cont_BFC03100(CPUState* cpu) { cpu->pc = 0xBFC03100u; OpenBIOS_func_1FC030D0(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03150(CPUState* cpu) { cpu->pc = 0xBFC03150u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03154(CPUState* cpu) { cpu->pc = 0xBFC03154u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03168(CPUState* cpu) { cpu->pc = 0xBFC03168u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC0316C(CPUState* cpu) { cpu->pc = 0xBFC0316Cu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03188(CPUState* cpu) { cpu->pc = 0xBFC03188u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03190(CPUState* cpu) { cpu->pc = 0xBFC03190u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031A0(CPUState* cpu) { cpu->pc = 0xBFC031A0u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031A8(CPUState* cpu) { cpu->pc = 0xBFC031A8u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031B4(CPUState* cpu) { cpu->pc = 0xBFC031B4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031C0(CPUState* cpu) { cpu->pc = 0xBFC031C0u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031D4(CPUState* cpu) { cpu->pc = 0xBFC031D4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031E4(CPUState* cpu) { cpu->pc = 0xBFC031E4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031F0(CPUState* cpu) { cpu->pc = 0xBFC031F0u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031F8(CPUState* cpu) { cpu->pc = 0xBFC031F8u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC031FC(CPUState* cpu) { cpu->pc = 0xBFC031FCu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03204(CPUState* cpu) { cpu->pc = 0xBFC03204u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03218(CPUState* cpu) { cpu->pc = 0xBFC03218u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03248(CPUState* cpu) { cpu->pc = 0xBFC03248u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03254(CPUState* cpu) { cpu->pc = 0xBFC03254u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03264(CPUState* cpu) { cpu->pc = 0xBFC03264u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03274(CPUState* cpu) { cpu->pc = 0xBFC03274u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03280(CPUState* cpu) { cpu->pc = 0xBFC03280u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03298(CPUState* cpu) { cpu->pc = 0xBFC03298u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC032B4(CPUState* cpu) { cpu->pc = 0xBFC032B4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC032D4(CPUState* cpu) { cpu->pc = 0xBFC032D4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC032E0(CPUState* cpu) { cpu->pc = 0xBFC032E0u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC032EC(CPUState* cpu) { cpu->pc = 0xBFC032ECu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC0330C(CPUState* cpu) { cpu->pc = 0xBFC0330Cu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03318(CPUState* cpu) { cpu->pc = 0xBFC03318u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03320(CPUState* cpu) { cpu->pc = 0xBFC03320u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03330(CPUState* cpu) { cpu->pc = 0xBFC03330u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03338(CPUState* cpu) { cpu->pc = 0xBFC03338u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03340(CPUState* cpu) { cpu->pc = 0xBFC03340u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC0334C(CPUState* cpu) { cpu->pc = 0xBFC0334Cu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03354(CPUState* cpu) { cpu->pc = 0xBFC03354u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03360(CPUState* cpu) { cpu->pc = 0xBFC03360u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03370(CPUState* cpu) { cpu->pc = 0xBFC03370u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03378(CPUState* cpu) { cpu->pc = 0xBFC03378u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC0338C(CPUState* cpu) { cpu->pc = 0xBFC0338Cu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC03398(CPUState* cpu) { cpu->pc = 0xBFC03398u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033A4(CPUState* cpu) { cpu->pc = 0xBFC033A4u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033A8(CPUState* cpu) { cpu->pc = 0xBFC033A8u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033DC(CPUState* cpu) { cpu->pc = 0xBFC033DCu; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033E8(CPUState* cpu) { cpu->pc = 0xBFC033E8u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033F0(CPUState* cpu) { cpu->pc = 0xBFC033F0u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC0310C_cont_BFC033F8(CPUState* cpu) { cpu->pc = 0xBFC033F8u; OpenBIOS_func_1FC0310C(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0343C(CPUState* cpu) { cpu->pc = 0xBFC0343Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03448(CPUState* cpu) { cpu->pc = 0xBFC03448u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0344C(CPUState* cpu) { cpu->pc = 0xBFC0344Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03478(CPUState* cpu) { cpu->pc = 0xBFC03478u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0348C(CPUState* cpu) { cpu->pc = 0xBFC0348Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034A4(CPUState* cpu) { cpu->pc = 0xBFC034A4u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034AC(CPUState* cpu) { cpu->pc = 0xBFC034ACu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034B8(CPUState* cpu) { cpu->pc = 0xBFC034B8u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034DC(CPUState* cpu) { cpu->pc = 0xBFC034DCu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034EC(CPUState* cpu) { cpu->pc = 0xBFC034ECu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC034F8(CPUState* cpu) { cpu->pc = 0xBFC034F8u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03508(CPUState* cpu) { cpu->pc = 0xBFC03508u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0351C(CPUState* cpu) { cpu->pc = 0xBFC0351Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0352C(CPUState* cpu) { cpu->pc = 0xBFC0352Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03538(CPUState* cpu) { cpu->pc = 0xBFC03538u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03564(CPUState* cpu) { cpu->pc = 0xBFC03564u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03578(CPUState* cpu) { cpu->pc = 0xBFC03578u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0357C(CPUState* cpu) { cpu->pc = 0xBFC0357Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC0358C(CPUState* cpu) { cpu->pc = 0xBFC0358Cu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC03594(CPUState* cpu) { cpu->pc = 0xBFC03594u; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC03404_cont_BFC035AC(CPUState* cpu) { cpu->pc = 0xBFC035ACu; OpenBIOS_func_1FC03404(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC035D0(CPUState* cpu) { cpu->pc = 0xBFC035D0u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC035DC(CPUState* cpu) { cpu->pc = 0xBFC035DCu; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC035E4(CPUState* cpu) { cpu->pc = 0xBFC035E4u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC035EC(CPUState* cpu) { cpu->pc = 0xBFC035ECu; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC035F8(CPUState* cpu) { cpu->pc = 0xBFC035F8u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC0360C(CPUState* cpu) { cpu->pc = 0xBFC0360Cu; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03610(CPUState* cpu) { cpu->pc = 0xBFC03610u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03628(CPUState* cpu) { cpu->pc = 0xBFC03628u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03634(CPUState* cpu) { cpu->pc = 0xBFC03634u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03640(CPUState* cpu) { cpu->pc = 0xBFC03640u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03648(CPUState* cpu) { cpu->pc = 0xBFC03648u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03658(CPUState* cpu) { cpu->pc = 0xBFC03658u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03660(CPUState* cpu) { cpu->pc = 0xBFC03660u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03664(CPUState* cpu) { cpu->pc = 0xBFC03664u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC0366C(CPUState* cpu) { cpu->pc = 0xBFC0366Cu; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03678(CPUState* cpu) { cpu->pc = 0xBFC03678u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC03680(CPUState* cpu) { cpu->pc = 0xBFC03680u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC036C8(CPUState* cpu) { cpu->pc = 0xBFC036C8u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC035B4_cont_BFC036D8(CPUState* cpu) { cpu->pc = 0xBFC036D8u; OpenBIOS_func_1FC035B4(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03700(CPUState* cpu) { cpu->pc = 0xBFC03700u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03714(CPUState* cpu) { cpu->pc = 0xBFC03714u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC0371C(CPUState* cpu) { cpu->pc = 0xBFC0371Cu; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03730(CPUState* cpu) { cpu->pc = 0xBFC03730u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03734(CPUState* cpu) { cpu->pc = 0xBFC03734u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC0373C(CPUState* cpu) { cpu->pc = 0xBFC0373Cu; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03750(CPUState* cpu) { cpu->pc = 0xBFC03750u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03758(CPUState* cpu) { cpu->pc = 0xBFC03758u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03764(CPUState* cpu) { cpu->pc = 0xBFC03764u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC0376C(CPUState* cpu) { cpu->pc = 0xBFC0376Cu; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03774(CPUState* cpu) { cpu->pc = 0xBFC03774u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC0377C(CPUState* cpu) { cpu->pc = 0xBFC0377Cu; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC03794(CPUState* cpu) { cpu->pc = 0xBFC03794u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC037B0(CPUState* cpu) { cpu->pc = 0xBFC037B0u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC037C0(CPUState* cpu) { cpu->pc = 0xBFC037C0u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC037E0(CPUState* cpu) { cpu->pc = 0xBFC037E0u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC036E0_cont_BFC037E4(CPUState* cpu) { cpu->pc = 0xBFC037E4u; OpenBIOS_func_1FC036E0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC0380C(CPUState* cpu) { cpu->pc = 0xBFC0380Cu; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03818(CPUState* cpu) { cpu->pc = 0xBFC03818u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03824(CPUState* cpu) { cpu->pc = 0xBFC03824u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC0382C(CPUState* cpu) { cpu->pc = 0xBFC0382Cu; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC0383C(CPUState* cpu) { cpu->pc = 0xBFC0383Cu; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03840(CPUState* cpu) { cpu->pc = 0xBFC03840u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03848(CPUState* cpu) { cpu->pc = 0xBFC03848u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC0385C(CPUState* cpu) { cpu->pc = 0xBFC0385Cu; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03874(CPUState* cpu) { cpu->pc = 0xBFC03874u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC03890(CPUState* cpu) { cpu->pc = 0xBFC03890u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC0389C(CPUState* cpu) { cpu->pc = 0xBFC0389Cu; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC038D0(CPUState* cpu) { cpu->pc = 0xBFC038D0u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC037F0_cont_BFC038E4(CPUState* cpu) { cpu->pc = 0xBFC038E4u; OpenBIOS_func_1FC037F0(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03918(CPUState* cpu) { cpu->pc = 0xBFC03918u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03924(CPUState* cpu) { cpu->pc = 0xBFC03924u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03930(CPUState* cpu) { cpu->pc = 0xBFC03930u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03944(CPUState* cpu) { cpu->pc = 0xBFC03944u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC0394C(CPUState* cpu) { cpu->pc = 0xBFC0394Cu; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03954(CPUState* cpu) { cpu->pc = 0xBFC03954u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03964(CPUState* cpu) { cpu->pc = 0xBFC03964u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03968(CPUState* cpu) { cpu->pc = 0xBFC03968u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03980(CPUState* cpu) { cpu->pc = 0xBFC03980u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03990(CPUState* cpu) { cpu->pc = 0xBFC03990u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039A0(CPUState* cpu) { cpu->pc = 0xBFC039A0u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039A8(CPUState* cpu) { cpu->pc = 0xBFC039A8u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039B0(CPUState* cpu) { cpu->pc = 0xBFC039B0u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039BC(CPUState* cpu) { cpu->pc = 0xBFC039BCu; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039C8(CPUState* cpu) { cpu->pc = 0xBFC039C8u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039D0(CPUState* cpu) { cpu->pc = 0xBFC039D0u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039E0(CPUState* cpu) { cpu->pc = 0xBFC039E0u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039E8(CPUState* cpu) { cpu->pc = 0xBFC039E8u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039F4(CPUState* cpu) { cpu->pc = 0xBFC039F4u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC039FC(CPUState* cpu) { cpu->pc = 0xBFC039FCu; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03A08(CPUState* cpu) { cpu->pc = 0xBFC03A08u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03A14(CPUState* cpu) { cpu->pc = 0xBFC03A14u; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC038FC_cont_BFC03A1C(CPUState* cpu) { cpu->pc = 0xBFC03A1Cu; OpenBIOS_func_1FC038FC(cpu); } void OpenBIOS_func_1FC03A30_cont_BFC03A3C(CPUState* cpu) { cpu->pc = 0xBFC03A3Cu; OpenBIOS_func_1FC03A30(cpu); } void OpenBIOS_func_1FC03A30_cont_BFC03A4C(CPUState* cpu) { cpu->pc = 0xBFC03A4Cu; OpenBIOS_func_1FC03A30(cpu); } void OpenBIOS_func_1FC03A30_cont_BFC03A54(CPUState* cpu) { cpu->pc = 0xBFC03A54u; OpenBIOS_func_1FC03A30(cpu); } void OpenBIOS_func_1FC03A30_cont_BFC03A60(CPUState* cpu) { cpu->pc = 0xBFC03A60u; OpenBIOS_func_1FC03A30(cpu); } void OpenBIOS_func_1FC03A30_cont_BFC03A6C(CPUState* cpu) { cpu->pc = 0xBFC03A6Cu; OpenBIOS_func_1FC03A30(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03A88(CPUState* cpu) { cpu->pc = 0xBFC03A88u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03A8C(CPUState* cpu) { cpu->pc = 0xBFC03A8Cu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03AE4(CPUState* cpu) { cpu->pc = 0xBFC03AE4u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03AE8(CPUState* cpu) { cpu->pc = 0xBFC03AE8u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B00(CPUState* cpu) { cpu->pc = 0xBFC03B00u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B04(CPUState* cpu) { cpu->pc = 0xBFC03B04u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B20(CPUState* cpu) { cpu->pc = 0xBFC03B20u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B24(CPUState* cpu) { cpu->pc = 0xBFC03B24u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B34(CPUState* cpu) { cpu->pc = 0xBFC03B34u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B38(CPUState* cpu) { cpu->pc = 0xBFC03B38u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B4C(CPUState* cpu) { cpu->pc = 0xBFC03B4Cu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B50(CPUState* cpu) { cpu->pc = 0xBFC03B50u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B68(CPUState* cpu) { cpu->pc = 0xBFC03B68u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B70(CPUState* cpu) { cpu->pc = 0xBFC03B70u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B78(CPUState* cpu) { cpu->pc = 0xBFC03B78u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B80(CPUState* cpu) { cpu->pc = 0xBFC03B80u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B90(CPUState* cpu) { cpu->pc = 0xBFC03B90u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03B9C(CPUState* cpu) { cpu->pc = 0xBFC03B9Cu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BA4(CPUState* cpu) { cpu->pc = 0xBFC03BA4u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BB4(CPUState* cpu) { cpu->pc = 0xBFC03BB4u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BC4(CPUState* cpu) { cpu->pc = 0xBFC03BC4u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BCC(CPUState* cpu) { cpu->pc = 0xBFC03BCCu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BDC(CPUState* cpu) { cpu->pc = 0xBFC03BDCu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BE8(CPUState* cpu) { cpu->pc = 0xBFC03BE8u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BF0(CPUState* cpu) { cpu->pc = 0xBFC03BF0u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03BFC(CPUState* cpu) { cpu->pc = 0xBFC03BFCu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C04(CPUState* cpu) { cpu->pc = 0xBFC03C04u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C10(CPUState* cpu) { cpu->pc = 0xBFC03C10u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C18(CPUState* cpu) { cpu->pc = 0xBFC03C18u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C20(CPUState* cpu) { cpu->pc = 0xBFC03C20u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C28(CPUState* cpu) { cpu->pc = 0xBFC03C28u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C38(CPUState* cpu) { cpu->pc = 0xBFC03C38u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C3C(CPUState* cpu) { cpu->pc = 0xBFC03C3Cu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C6C(CPUState* cpu) { cpu->pc = 0xBFC03C6Cu; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C78(CPUState* cpu) { cpu->pc = 0xBFC03C78u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C80(CPUState* cpu) { cpu->pc = 0xBFC03C80u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C84(CPUState* cpu) { cpu->pc = 0xBFC03C84u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C90(CPUState* cpu) { cpu->pc = 0xBFC03C90u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03C98(CPUState* cpu) { cpu->pc = 0xBFC03C98u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CA0(CPUState* cpu) { cpu->pc = 0xBFC03CA0u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CB0(CPUState* cpu) { cpu->pc = 0xBFC03CB0u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CB8(CPUState* cpu) { cpu->pc = 0xBFC03CB8u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CD0(CPUState* cpu) { cpu->pc = 0xBFC03CD0u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CD8(CPUState* cpu) { cpu->pc = 0xBFC03CD8u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03A78_cont_BFC03CE4(CPUState* cpu) { cpu->pc = 0xBFC03CE4u; OpenBIOS_func_1FC03A78(cpu); } void OpenBIOS_func_1FC03D28_cont_BFC03D64(CPUState* cpu) { cpu->pc = 0xBFC03D64u; OpenBIOS_func_1FC03D28(cpu); } void OpenBIOS_func_1FC03DA0_cont_BFC03DC0(CPUState* cpu) { cpu->pc = 0xBFC03DC0u; OpenBIOS_func_1FC03DA0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03DF0(CPUState* cpu) { cpu->pc = 0xBFC03DF0u; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03DF8(CPUState* cpu) { cpu->pc = 0xBFC03DF8u; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E0C(CPUState* cpu) { cpu->pc = 0xBFC03E0Cu; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E10(CPUState* cpu) { cpu->pc = 0xBFC03E10u; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E2C(CPUState* cpu) { cpu->pc = 0xBFC03E2Cu; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E54(CPUState* cpu) { cpu->pc = 0xBFC03E54u; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E5C(CPUState* cpu) { cpu->pc = 0xBFC03E5Cu; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03DE0_cont_BFC03E68(CPUState* cpu) { cpu->pc = 0xBFC03E68u; OpenBIOS_func_1FC03DE0(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03E84(CPUState* cpu) { cpu->pc = 0xBFC03E84u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03E94(CPUState* cpu) { cpu->pc = 0xBFC03E94u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03EA4(CPUState* cpu) { cpu->pc = 0xBFC03EA4u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03EC0(CPUState* cpu) { cpu->pc = 0xBFC03EC0u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03ED0(CPUState* cpu) { cpu->pc = 0xBFC03ED0u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03EE0(CPUState* cpu) { cpu->pc = 0xBFC03EE0u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03EEC(CPUState* cpu) { cpu->pc = 0xBFC03EECu; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03E70_cont_BFC03EF8(CPUState* cpu) { cpu->pc = 0xBFC03EF8u; OpenBIOS_func_1FC03E70(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F1C(CPUState* cpu) { cpu->pc = 0xBFC03F1Cu; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F24(CPUState* cpu) { cpu->pc = 0xBFC03F24u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F34(CPUState* cpu) { cpu->pc = 0xBFC03F34u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F40(CPUState* cpu) { cpu->pc = 0xBFC03F40u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F50(CPUState* cpu) { cpu->pc = 0xBFC03F50u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F54(CPUState* cpu) { cpu->pc = 0xBFC03F54u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F5C(CPUState* cpu) { cpu->pc = 0xBFC03F5Cu; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F6C(CPUState* cpu) { cpu->pc = 0xBFC03F6Cu; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03F80(CPUState* cpu) { cpu->pc = 0xBFC03F80u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03F00_cont_BFC03FA8(CPUState* cpu) { cpu->pc = 0xBFC03FA8u; OpenBIOS_func_1FC03F00(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC03FE8(CPUState* cpu) { cpu->pc = 0xBFC03FE8u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC03FF4(CPUState* cpu) { cpu->pc = 0xBFC03FF4u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC03FFC(CPUState* cpu) { cpu->pc = 0xBFC03FFCu; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04000(CPUState* cpu) { cpu->pc = 0xBFC04000u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04004(CPUState* cpu) { cpu->pc = 0xBFC04004u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04014(CPUState* cpu) { cpu->pc = 0xBFC04014u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04020(CPUState* cpu) { cpu->pc = 0xBFC04020u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC0402C(CPUState* cpu) { cpu->pc = 0xBFC0402Cu; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC0403C(CPUState* cpu) { cpu->pc = 0xBFC0403Cu; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04064(CPUState* cpu) { cpu->pc = 0xBFC04064u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC03FD4_cont_BFC04074(CPUState* cpu) { cpu->pc = 0xBFC04074u; OpenBIOS_func_1FC03FD4(cpu); } void OpenBIOS_func_1FC04080_cont_BFC040D4(CPUState* cpu) { cpu->pc = 0xBFC040D4u; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04080_cont_BFC040E4(CPUState* cpu) { cpu->pc = 0xBFC040E4u; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04080_cont_BFC040EC(CPUState* cpu) { cpu->pc = 0xBFC040ECu; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04080_cont_BFC040FC(CPUState* cpu) { cpu->pc = 0xBFC040FCu; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04080_cont_BFC0410C(CPUState* cpu) { cpu->pc = 0xBFC0410Cu; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04080_cont_BFC04134(CPUState* cpu) { cpu->pc = 0xBFC04134u; OpenBIOS_func_1FC04080(cpu); } void OpenBIOS_func_1FC04168_cont_BFC04190(CPUState* cpu) { cpu->pc = 0xBFC04190u; OpenBIOS_func_1FC04168(cpu); } void OpenBIOS_func_1FC04168_cont_BFC041A0(CPUState* cpu) { cpu->pc = 0xBFC041A0u; OpenBIOS_func_1FC04168(cpu); } void OpenBIOS_func_1FC04168_cont_BFC041AC(CPUState* cpu) { cpu->pc = 0xBFC041ACu; OpenBIOS_func_1FC04168(cpu); } void OpenBIOS_func_1FC04168_cont_BFC041B0(CPUState* cpu) { cpu->pc = 0xBFC041B0u; OpenBIOS_func_1FC04168(cpu); } void OpenBIOS_func_1FC04168_cont_BFC041BC(CPUState* cpu) { cpu->pc = 0xBFC041BCu; OpenBIOS_func_1FC04168(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC041FC(CPUState* cpu) { cpu->pc = 0xBFC041FCu; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC0420C(CPUState* cpu) { cpu->pc = 0xBFC0420Cu; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04210(CPUState* cpu) { cpu->pc = 0xBFC04210u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04218(CPUState* cpu) { cpu->pc = 0xBFC04218u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04220(CPUState* cpu) { cpu->pc = 0xBFC04220u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC0422C(CPUState* cpu) { cpu->pc = 0xBFC0422Cu; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04234(CPUState* cpu) { cpu->pc = 0xBFC04234u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC0423C(CPUState* cpu) { cpu->pc = 0xBFC0423Cu; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04244(CPUState* cpu) { cpu->pc = 0xBFC04244u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04250(CPUState* cpu) { cpu->pc = 0xBFC04250u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC041D0_cont_BFC04254(CPUState* cpu) { cpu->pc = 0xBFC04254u; OpenBIOS_func_1FC041D0(cpu); } void OpenBIOS_func_1FC04270_cont_BFC04298(CPUState* cpu) { cpu->pc = 0xBFC04298u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042A8(CPUState* cpu) { cpu->pc = 0xBFC042A8u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042B0(CPUState* cpu) { cpu->pc = 0xBFC042B0u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042BC(CPUState* cpu) { cpu->pc = 0xBFC042BCu; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042D0(CPUState* cpu) { cpu->pc = 0xBFC042D0u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042D8(CPUState* cpu) { cpu->pc = 0xBFC042D8u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042F0(CPUState* cpu) { cpu->pc = 0xBFC042F0u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042F4(CPUState* cpu) { cpu->pc = 0xBFC042F4u; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04270_cont_BFC042FC(CPUState* cpu) { cpu->pc = 0xBFC042FCu; OpenBIOS_func_1FC04270(cpu); } void OpenBIOS_func_1FC04304_cont_BFC04310(CPUState* cpu) { cpu->pc = 0xBFC04310u; OpenBIOS_func_1FC04304(cpu); } void OpenBIOS_func_1FC04304_cont_BFC04328(CPUState* cpu) { cpu->pc = 0xBFC04328u; OpenBIOS_func_1FC04304(cpu); } void OpenBIOS_func_1FC04348_cont_BFC0435C(CPUState* cpu) { cpu->pc = 0xBFC0435Cu; OpenBIOS_func_1FC04348(cpu); } void OpenBIOS_func_1FC04374_cont_BFC04384(CPUState* cpu) { cpu->pc = 0xBFC04384u; OpenBIOS_func_1FC04374(cpu); } void OpenBIOS_func_1FC04374_cont_BFC04394(CPUState* cpu) { cpu->pc = 0xBFC04394u; OpenBIOS_func_1FC04374(cpu); } void OpenBIOS_func_1FC04374_cont_BFC043A0(CPUState* cpu) { cpu->pc = 0xBFC043A0u; OpenBIOS_func_1FC04374(cpu); } void OpenBIOS_func_1FC04374_cont_BFC043B8(CPUState* cpu) { cpu->pc = 0xBFC043B8u; OpenBIOS_func_1FC04374(cpu); } void OpenBIOS_func_1FC04374_cont_BFC043C8(CPUState* cpu) { cpu->pc = 0xBFC043C8u; OpenBIOS_func_1FC04374(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC043E4(CPUState* cpu) { cpu->pc = 0xBFC043E4u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC043F4(CPUState* cpu) { cpu->pc = 0xBFC043F4u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC043FC(CPUState* cpu) { cpu->pc = 0xBFC043FCu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0440C(CPUState* cpu) { cpu->pc = 0xBFC0440Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04414(CPUState* cpu) { cpu->pc = 0xBFC04414u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04418(CPUState* cpu) { cpu->pc = 0xBFC04418u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04424(CPUState* cpu) { cpu->pc = 0xBFC04424u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0442C(CPUState* cpu) { cpu->pc = 0xBFC0442Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0443C(CPUState* cpu) { cpu->pc = 0xBFC0443Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0444C(CPUState* cpu) { cpu->pc = 0xBFC0444Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0445C(CPUState* cpu) { cpu->pc = 0xBFC0445Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04460(CPUState* cpu) { cpu->pc = 0xBFC04460u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04470(CPUState* cpu) { cpu->pc = 0xBFC04470u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0447C(CPUState* cpu) { cpu->pc = 0xBFC0447Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04480(CPUState* cpu) { cpu->pc = 0xBFC04480u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC04494(CPUState* cpu) { cpu->pc = 0xBFC04494u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC0449C(CPUState* cpu) { cpu->pc = 0xBFC0449Cu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC044A8(CPUState* cpu) { cpu->pc = 0xBFC044A8u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC044B0(CPUState* cpu) { cpu->pc = 0xBFC044B0u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC044BC(CPUState* cpu) { cpu->pc = 0xBFC044BCu; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC043D0_cont_BFC044C0(CPUState* cpu) { cpu->pc = 0xBFC044C0u; OpenBIOS_func_1FC043D0(cpu); } void OpenBIOS_func_1FC044D0_cont_BFC044F0(CPUState* cpu) { cpu->pc = 0xBFC044F0u; OpenBIOS_func_1FC044D0(cpu); } void OpenBIOS_func_1FC044D0_cont_BFC04504(CPUState* cpu) { cpu->pc = 0xBFC04504u; OpenBIOS_func_1FC044D0(cpu); } void OpenBIOS_func_1FC044D0_cont_BFC04510(CPUState* cpu) { cpu->pc = 0xBFC04510u; OpenBIOS_func_1FC044D0(cpu); } void OpenBIOS_func_1FC044D0_cont_BFC04518(CPUState* cpu) { cpu->pc = 0xBFC04518u; OpenBIOS_func_1FC044D0(cpu); } void OpenBIOS_func_1FC044D0_cont_BFC04524(CPUState* cpu) { cpu->pc = 0xBFC04524u; OpenBIOS_func_1FC044D0(cpu); } void OpenBIOS_func_1FC04538_cont_BFC04554(CPUState* cpu) { cpu->pc = 0xBFC04554u; OpenBIOS_func_1FC04538(cpu); } void OpenBIOS_func_1FC04538_cont_BFC0455C(CPUState* cpu) { cpu->pc = 0xBFC0455Cu; OpenBIOS_func_1FC04538(cpu); } void OpenBIOS_func_1FC04538_cont_BFC04570(CPUState* cpu) { cpu->pc = 0xBFC04570u; OpenBIOS_func_1FC04538(cpu); } void OpenBIOS_func_1FC04538_cont_BFC0457C(CPUState* cpu) { cpu->pc = 0xBFC0457Cu; OpenBIOS_func_1FC04538(cpu); } void OpenBIOS_func_1FC0459C_cont_BFC045AC(CPUState* cpu) { cpu->pc = 0xBFC045ACu; OpenBIOS_func_1FC0459C(cpu); } void OpenBIOS_func_1FC0459C_cont_BFC045B8(CPUState* cpu) { cpu->pc = 0xBFC045B8u; OpenBIOS_func_1FC0459C(cpu); } void OpenBIOS_func_1FC0459C_cont_BFC045D0(CPUState* cpu) { cpu->pc = 0xBFC045D0u; OpenBIOS_func_1FC0459C(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04604(CPUState* cpu) { cpu->pc = 0xBFC04604u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04614(CPUState* cpu) { cpu->pc = 0xBFC04614u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04620(CPUState* cpu) { cpu->pc = 0xBFC04620u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04628(CPUState* cpu) { cpu->pc = 0xBFC04628u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04638(CPUState* cpu) { cpu->pc = 0xBFC04638u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04640(CPUState* cpu) { cpu->pc = 0xBFC04640u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04650(CPUState* cpu) { cpu->pc = 0xBFC04650u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC045E0_cont_BFC04654(CPUState* cpu) { cpu->pc = 0xBFC04654u; OpenBIOS_func_1FC045E0(cpu); } void OpenBIOS_func_1FC04668_cont_BFC04688(CPUState* cpu) { cpu->pc = 0xBFC04688u; OpenBIOS_func_1FC04668(cpu); } void OpenBIOS_func_1FC04668_cont_BFC04690(CPUState* cpu) { cpu->pc = 0xBFC04690u; OpenBIOS_func_1FC04668(cpu); } void OpenBIOS_func_1FC04668_cont_BFC046A8(CPUState* cpu) { cpu->pc = 0xBFC046A8u; OpenBIOS_func_1FC04668(cpu); } void OpenBIOS_func_1FC04668_cont_BFC046B8(CPUState* cpu) { cpu->pc = 0xBFC046B8u; OpenBIOS_func_1FC04668(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC046DC(CPUState* cpu) { cpu->pc = 0xBFC046DCu; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC046E8(CPUState* cpu) { cpu->pc = 0xBFC046E8u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC046F4(CPUState* cpu) { cpu->pc = 0xBFC046F4u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC046F8(CPUState* cpu) { cpu->pc = 0xBFC046F8u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC0470C(CPUState* cpu) { cpu->pc = 0xBFC0470Cu; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04718(CPUState* cpu) { cpu->pc = 0xBFC04718u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04724(CPUState* cpu) { cpu->pc = 0xBFC04724u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04730(CPUState* cpu) { cpu->pc = 0xBFC04730u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04738(CPUState* cpu) { cpu->pc = 0xBFC04738u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04770(CPUState* cpu) { cpu->pc = 0xBFC04770u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04778(CPUState* cpu) { cpu->pc = 0xBFC04778u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC046C0_cont_BFC04784(CPUState* cpu) { cpu->pc = 0xBFC04784u; OpenBIOS_func_1FC046C0(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047A8(CPUState* cpu) { cpu->pc = 0xBFC047A8u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047B0(CPUState* cpu) { cpu->pc = 0xBFC047B0u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047C8(CPUState* cpu) { cpu->pc = 0xBFC047C8u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047D4(CPUState* cpu) { cpu->pc = 0xBFC047D4u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047D8(CPUState* cpu) { cpu->pc = 0xBFC047D8u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047E8(CPUState* cpu) { cpu->pc = 0xBFC047E8u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047F0(CPUState* cpu) { cpu->pc = 0xBFC047F0u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC047F8(CPUState* cpu) { cpu->pc = 0xBFC047F8u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC04800(CPUState* cpu) { cpu->pc = 0xBFC04800u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC04804(CPUState* cpu) { cpu->pc = 0xBFC04804u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC04810(CPUState* cpu) { cpu->pc = 0xBFC04810u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC04824(CPUState* cpu) { cpu->pc = 0xBFC04824u; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04790_cont_BFC0482C(CPUState* cpu) { cpu->pc = 0xBFC0482Cu; OpenBIOS_func_1FC04790(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04860(CPUState* cpu) { cpu->pc = 0xBFC04860u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04868(CPUState* cpu) { cpu->pc = 0xBFC04868u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC0487C(CPUState* cpu) { cpu->pc = 0xBFC0487Cu; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC0488C(CPUState* cpu) { cpu->pc = 0xBFC0488Cu; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048A4(CPUState* cpu) { cpu->pc = 0xBFC048A4u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048AC(CPUState* cpu) { cpu->pc = 0xBFC048ACu; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048C0(CPUState* cpu) { cpu->pc = 0xBFC048C0u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048D0(CPUState* cpu) { cpu->pc = 0xBFC048D0u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048D8(CPUState* cpu) { cpu->pc = 0xBFC048D8u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC048E4(CPUState* cpu) { cpu->pc = 0xBFC048E4u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04900(CPUState* cpu) { cpu->pc = 0xBFC04900u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04914(CPUState* cpu) { cpu->pc = 0xBFC04914u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04918(CPUState* cpu) { cpu->pc = 0xBFC04918u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04924(CPUState* cpu) { cpu->pc = 0xBFC04924u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC0492C(CPUState* cpu) { cpu->pc = 0xBFC0492Cu; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04934(CPUState* cpu) { cpu->pc = 0xBFC04934u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC0493C(CPUState* cpu) { cpu->pc = 0xBFC0493Cu; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04940(CPUState* cpu) { cpu->pc = 0xBFC04940u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04948(CPUState* cpu) { cpu->pc = 0xBFC04948u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04958(CPUState* cpu) { cpu->pc = 0xBFC04958u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04840_cont_BFC04960(CPUState* cpu) { cpu->pc = 0xBFC04960u; OpenBIOS_func_1FC04840(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04994(CPUState* cpu) { cpu->pc = 0xBFC04994u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC0499C(CPUState* cpu) { cpu->pc = 0xBFC0499Cu; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC049B0(CPUState* cpu) { cpu->pc = 0xBFC049B0u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC049C0(CPUState* cpu) { cpu->pc = 0xBFC049C0u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC049D8(CPUState* cpu) { cpu->pc = 0xBFC049D8u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC049E0(CPUState* cpu) { cpu->pc = 0xBFC049E0u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC049F4(CPUState* cpu) { cpu->pc = 0xBFC049F4u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A04(CPUState* cpu) { cpu->pc = 0xBFC04A04u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A0C(CPUState* cpu) { cpu->pc = 0xBFC04A0Cu; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A18(CPUState* cpu) { cpu->pc = 0xBFC04A18u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A34(CPUState* cpu) { cpu->pc = 0xBFC04A34u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A48(CPUState* cpu) { cpu->pc = 0xBFC04A48u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A4C(CPUState* cpu) { cpu->pc = 0xBFC04A4Cu; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A58(CPUState* cpu) { cpu->pc = 0xBFC04A58u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A60(CPUState* cpu) { cpu->pc = 0xBFC04A60u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A68(CPUState* cpu) { cpu->pc = 0xBFC04A68u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A70(CPUState* cpu) { cpu->pc = 0xBFC04A70u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A74(CPUState* cpu) { cpu->pc = 0xBFC04A74u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A7C(CPUState* cpu) { cpu->pc = 0xBFC04A7Cu; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A8C(CPUState* cpu) { cpu->pc = 0xBFC04A8Cu; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04974_cont_BFC04A94(CPUState* cpu) { cpu->pc = 0xBFC04A94u; OpenBIOS_func_1FC04974(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04ABC(CPUState* cpu) { cpu->pc = 0xBFC04ABCu; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04AC4(CPUState* cpu) { cpu->pc = 0xBFC04AC4u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04AD8(CPUState* cpu) { cpu->pc = 0xBFC04AD8u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04AE0(CPUState* cpu) { cpu->pc = 0xBFC04AE0u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04AE8(CPUState* cpu) { cpu->pc = 0xBFC04AE8u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04AFC(CPUState* cpu) { cpu->pc = 0xBFC04AFCu; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04B14(CPUState* cpu) { cpu->pc = 0xBFC04B14u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04AA8_cont_BFC04B20(CPUState* cpu) { cpu->pc = 0xBFC04B20u; OpenBIOS_func_1FC04AA8(cpu); } void OpenBIOS_func_1FC04B2C_cont_BFC04B40(CPUState* cpu) { cpu->pc = 0xBFC04B40u; OpenBIOS_func_1FC04B2C(cpu); } void OpenBIOS_func_1FC04B2C_cont_BFC04B4C(CPUState* cpu) { cpu->pc = 0xBFC04B4Cu; OpenBIOS_func_1FC04B2C(cpu); } void OpenBIOS_func_1FC04B2C_cont_BFC04B58(CPUState* cpu) { cpu->pc = 0xBFC04B58u; OpenBIOS_func_1FC04B2C(cpu); } void OpenBIOS_func_1FC04B2C_cont_BFC04B60(CPUState* cpu) { cpu->pc = 0xBFC04B60u; OpenBIOS_func_1FC04B2C(cpu); } void OpenBIOS_func_1FC04B2C_cont_BFC04B74(CPUState* cpu) { cpu->pc = 0xBFC04B74u; OpenBIOS_func_1FC04B2C(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BB8(CPUState* cpu) { cpu->pc = 0xBFC04BB8u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BC8(CPUState* cpu) { cpu->pc = 0xBFC04BC8u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BD0(CPUState* cpu) { cpu->pc = 0xBFC04BD0u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BE4(CPUState* cpu) { cpu->pc = 0xBFC04BE4u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BE8(CPUState* cpu) { cpu->pc = 0xBFC04BE8u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04BF4(CPUState* cpu) { cpu->pc = 0xBFC04BF4u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04B84_cont_BFC04C00(CPUState* cpu) { cpu->pc = 0xBFC04C00u; OpenBIOS_func_1FC04B84(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C20(CPUState* cpu) { cpu->pc = 0xBFC04C20u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C28(CPUState* cpu) { cpu->pc = 0xBFC04C28u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C3C(CPUState* cpu) { cpu->pc = 0xBFC04C3Cu; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C4C(CPUState* cpu) { cpu->pc = 0xBFC04C4Cu; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C5C(CPUState* cpu) { cpu->pc = 0xBFC04C5Cu; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C68(CPUState* cpu) { cpu->pc = 0xBFC04C68u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C70(CPUState* cpu) { cpu->pc = 0xBFC04C70u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C78(CPUState* cpu) { cpu->pc = 0xBFC04C78u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C7C(CPUState* cpu) { cpu->pc = 0xBFC04C7Cu; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C84(CPUState* cpu) { cpu->pc = 0xBFC04C84u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04C9C(CPUState* cpu) { cpu->pc = 0xBFC04C9Cu; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04C0C_cont_BFC04CA8(CPUState* cpu) { cpu->pc = 0xBFC04CA8u; OpenBIOS_func_1FC04C0C(cpu); } void OpenBIOS_func_1FC04CBC_cont_BFC04CD0(CPUState* cpu) { cpu->pc = 0xBFC04CD0u; OpenBIOS_func_1FC04CBC(cpu); } void OpenBIOS_func_1FC04CBC_cont_BFC04CDC(CPUState* cpu) { cpu->pc = 0xBFC04CDCu; OpenBIOS_func_1FC04CBC(cpu); } void OpenBIOS_func_1FC04CBC_cont_BFC04CE0(CPUState* cpu) { cpu->pc = 0xBFC04CE0u; OpenBIOS_func_1FC04CBC(cpu); } void OpenBIOS_func_1FC04CF0_cont_BFC04D0C(CPUState* cpu) { cpu->pc = 0xBFC04D0Cu; OpenBIOS_func_1FC04CF0(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D34(CPUState* cpu) { cpu->pc = 0xBFC04D34u; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D3C(CPUState* cpu) { cpu->pc = 0xBFC04D3Cu; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D50(CPUState* cpu) { cpu->pc = 0xBFC04D50u; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D60(CPUState* cpu) { cpu->pc = 0xBFC04D60u; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D6C(CPUState* cpu) { cpu->pc = 0xBFC04D6Cu; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D74(CPUState* cpu) { cpu->pc = 0xBFC04D74u; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D7C(CPUState* cpu) { cpu->pc = 0xBFC04D7Cu; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04D1C_cont_BFC04D98(CPUState* cpu) { cpu->pc = 0xBFC04D98u; OpenBIOS_func_1FC04D1C(cpu); } void OpenBIOS_func_1FC04DA0_cont_BFC04DB8(CPUState* cpu) { cpu->pc = 0xBFC04DB8u; OpenBIOS_func_1FC04DA0(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E14(CPUState* cpu) { cpu->pc = 0xBFC04E14u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E1C(CPUState* cpu) { cpu->pc = 0xBFC04E1Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E24(CPUState* cpu) { cpu->pc = 0xBFC04E24u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E2C(CPUState* cpu) { cpu->pc = 0xBFC04E2Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E34(CPUState* cpu) { cpu->pc = 0xBFC04E34u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E3C(CPUState* cpu) { cpu->pc = 0xBFC04E3Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E44(CPUState* cpu) { cpu->pc = 0xBFC04E44u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E4C(CPUState* cpu) { cpu->pc = 0xBFC04E4Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E54(CPUState* cpu) { cpu->pc = 0xBFC04E54u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E5C(CPUState* cpu) { cpu->pc = 0xBFC04E5Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E64(CPUState* cpu) { cpu->pc = 0xBFC04E64u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E6C(CPUState* cpu) { cpu->pc = 0xBFC04E6Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E74(CPUState* cpu) { cpu->pc = 0xBFC04E74u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E7C(CPUState* cpu) { cpu->pc = 0xBFC04E7Cu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E84(CPUState* cpu) { cpu->pc = 0xBFC04E84u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E90(CPUState* cpu) { cpu->pc = 0xBFC04E90u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04E98(CPUState* cpu) { cpu->pc = 0xBFC04E98u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EA0(CPUState* cpu) { cpu->pc = 0xBFC04EA0u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EA8(CPUState* cpu) { cpu->pc = 0xBFC04EA8u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EB0(CPUState* cpu) { cpu->pc = 0xBFC04EB0u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EBC(CPUState* cpu) { cpu->pc = 0xBFC04EBCu; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EC4(CPUState* cpu) { cpu->pc = 0xBFC04EC4u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04ED0(CPUState* cpu) { cpu->pc = 0xBFC04ED0u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04ED8(CPUState* cpu) { cpu->pc = 0xBFC04ED8u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04DCC_cont_BFC04EE0(CPUState* cpu) { cpu->pc = 0xBFC04EE0u; OpenBIOS_func_1FC04DCC(cpu); } void OpenBIOS_func_1FC04F1C_cont_BFC04F30(CPUState* cpu) { cpu->pc = 0xBFC04F30u; OpenBIOS_func_1FC04F1C(cpu); } void OpenBIOS_func_1FC04F1C_cont_BFC04F3C(CPUState* cpu) { cpu->pc = 0xBFC04F3Cu; OpenBIOS_func_1FC04F1C(cpu); } void OpenBIOS_func_1FC04F1C_cont_BFC04F44(CPUState* cpu) { cpu->pc = 0xBFC04F44u; OpenBIOS_func_1FC04F1C(cpu); } void OpenBIOS_func_1FC04F1C_cont_BFC04F54(CPUState* cpu) { cpu->pc = 0xBFC04F54u; OpenBIOS_func_1FC04F1C(cpu); } void OpenBIOS_func_1FC04F64_cont_BFC04F94(CPUState* cpu) { cpu->pc = 0xBFC04F94u; OpenBIOS_func_1FC04F64(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC04FC8(CPUState* cpu) { cpu->pc = 0xBFC04FC8u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC04FD0(CPUState* cpu) { cpu->pc = 0xBFC04FD0u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC04FD8(CPUState* cpu) { cpu->pc = 0xBFC04FD8u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC04FDC(CPUState* cpu) { cpu->pc = 0xBFC04FDCu; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC04FF8(CPUState* cpu) { cpu->pc = 0xBFC04FF8u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05000(CPUState* cpu) { cpu->pc = 0xBFC05000u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05008(CPUState* cpu) { cpu->pc = 0xBFC05008u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC0501C(CPUState* cpu) { cpu->pc = 0xBFC0501Cu; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC0502C(CPUState* cpu) { cpu->pc = 0xBFC0502Cu; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05038(CPUState* cpu) { cpu->pc = 0xBFC05038u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05044(CPUState* cpu) { cpu->pc = 0xBFC05044u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05054(CPUState* cpu) { cpu->pc = 0xBFC05054u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05068(CPUState* cpu) { cpu->pc = 0xBFC05068u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05070(CPUState* cpu) { cpu->pc = 0xBFC05070u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05074(CPUState* cpu) { cpu->pc = 0xBFC05074u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05080(CPUState* cpu) { cpu->pc = 0xBFC05080u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC05088(CPUState* cpu) { cpu->pc = 0xBFC05088u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC050B8(CPUState* cpu) { cpu->pc = 0xBFC050B8u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC050C0(CPUState* cpu) { cpu->pc = 0xBFC050C0u; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC04FA4_cont_BFC050CC(CPUState* cpu) { cpu->pc = 0xBFC050CCu; OpenBIOS_func_1FC04FA4(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC050F0(CPUState* cpu) { cpu->pc = 0xBFC050F0u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC050FC(CPUState* cpu) { cpu->pc = 0xBFC050FCu; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05108(CPUState* cpu) { cpu->pc = 0xBFC05108u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC0510C(CPUState* cpu) { cpu->pc = 0xBFC0510Cu; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC0511C(CPUState* cpu) { cpu->pc = 0xBFC0511Cu; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05128(CPUState* cpu) { cpu->pc = 0xBFC05128u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05134(CPUState* cpu) { cpu->pc = 0xBFC05134u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05140(CPUState* cpu) { cpu->pc = 0xBFC05140u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05148(CPUState* cpu) { cpu->pc = 0xBFC05148u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05170(CPUState* cpu) { cpu->pc = 0xBFC05170u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05178(CPUState* cpu) { cpu->pc = 0xBFC05178u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC050DC_cont_BFC05184(CPUState* cpu) { cpu->pc = 0xBFC05184u; OpenBIOS_func_1FC050DC(cpu); } void OpenBIOS_func_1FC051CC_cont_BFC051EC(CPUState* cpu) { cpu->pc = 0xBFC051ECu; OpenBIOS_func_1FC051CC(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC0522C(CPUState* cpu) { cpu->pc = 0xBFC0522Cu; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC05240(CPUState* cpu) { cpu->pc = 0xBFC05240u; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC05274(CPUState* cpu) { cpu->pc = 0xBFC05274u; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC0527C(CPUState* cpu) { cpu->pc = 0xBFC0527Cu; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC05298(CPUState* cpu) { cpu->pc = 0xBFC05298u; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC052A0(CPUState* cpu) { cpu->pc = 0xBFC052A0u; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC052B4(CPUState* cpu) { cpu->pc = 0xBFC052B4u; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC051F8_cont_BFC052CC(CPUState* cpu) { cpu->pc = 0xBFC052CCu; OpenBIOS_func_1FC051F8(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05320(CPUState* cpu) { cpu->pc = 0xBFC05320u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05324(CPUState* cpu) { cpu->pc = 0xBFC05324u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05338(CPUState* cpu) { cpu->pc = 0xBFC05338u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05344(CPUState* cpu) { cpu->pc = 0xBFC05344u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC0534C(CPUState* cpu) { cpu->pc = 0xBFC0534Cu; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05354(CPUState* cpu) { cpu->pc = 0xBFC05354u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC0535C(CPUState* cpu) { cpu->pc = 0xBFC0535Cu; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05360(CPUState* cpu) { cpu->pc = 0xBFC05360u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05370(CPUState* cpu) { cpu->pc = 0xBFC05370u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05378(CPUState* cpu) { cpu->pc = 0xBFC05378u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05384(CPUState* cpu) { cpu->pc = 0xBFC05384u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC05398(CPUState* cpu) { cpu->pc = 0xBFC05398u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC053A4(CPUState* cpu) { cpu->pc = 0xBFC053A4u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC052F4_cont_BFC053B8(CPUState* cpu) { cpu->pc = 0xBFC053B8u; OpenBIOS_func_1FC052F4(cpu); } void OpenBIOS_func_1FC053C4_cont_BFC053E0(CPUState* cpu) { cpu->pc = 0xBFC053E0u; OpenBIOS_func_1FC053C4(cpu); } void OpenBIOS_func_1FC05474_cont_BFC05484(CPUState* cpu) { cpu->pc = 0xBFC05484u; OpenBIOS_func_1FC05474(cpu); } void OpenBIOS_func_1FC054A0_cont_BFC054B8(CPUState* cpu) { cpu->pc = 0xBFC054B8u; OpenBIOS_func_1FC054A0(cpu); } void OpenBIOS_func_1FC054A0_cont_BFC054C4(CPUState* cpu) { cpu->pc = 0xBFC054C4u; OpenBIOS_func_1FC054A0(cpu); } void OpenBIOS_func_1FC054A0_cont_BFC054CC(CPUState* cpu) { cpu->pc = 0xBFC054CCu; OpenBIOS_func_1FC054A0(cpu); } void OpenBIOS_func_1FC054A0_cont_BFC054DC(CPUState* cpu) { cpu->pc = 0xBFC054DCu; OpenBIOS_func_1FC054A0(cpu); } void OpenBIOS_func_1FC054F4_cont_BFC05514(CPUState* cpu) { cpu->pc = 0xBFC05514u; OpenBIOS_func_1FC054F4(cpu); } void OpenBIOS_func_1FC054F4_cont_BFC0551C(CPUState* cpu) { cpu->pc = 0xBFC0551Cu; OpenBIOS_func_1FC054F4(cpu); } void OpenBIOS_func_1FC054F4_cont_BFC05554(CPUState* cpu) { cpu->pc = 0xBFC05554u; OpenBIOS_func_1FC054F4(cpu); } void OpenBIOS_func_1FC05578_cont_BFC05594(CPUState* cpu) { cpu->pc = 0xBFC05594u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05578_cont_BFC055B4(CPUState* cpu) { cpu->pc = 0xBFC055B4u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05578_cont_BFC055C0(CPUState* cpu) { cpu->pc = 0xBFC055C0u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05578_cont_BFC055D8(CPUState* cpu) { cpu->pc = 0xBFC055D8u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05578_cont_BFC055E4(CPUState* cpu) { cpu->pc = 0xBFC055E4u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05578_cont_BFC055F4(CPUState* cpu) { cpu->pc = 0xBFC055F4u; OpenBIOS_func_1FC05578(cpu); } void OpenBIOS_func_1FC05600_cont_BFC05618(CPUState* cpu) { cpu->pc = 0xBFC05618u; OpenBIOS_func_1FC05600(cpu); } void OpenBIOS_func_1FC05600_cont_BFC05624(CPUState* cpu) { cpu->pc = 0xBFC05624u; OpenBIOS_func_1FC05600(cpu); } void OpenBIOS_func_1FC05600_cont_BFC05628(CPUState* cpu) { cpu->pc = 0xBFC05628u; OpenBIOS_func_1FC05600(cpu); } void OpenBIOS_func_1FC05600_cont_BFC05630(CPUState* cpu) { cpu->pc = 0xBFC05630u; OpenBIOS_func_1FC05600(cpu); } void OpenBIOS_func_1FC05600_cont_BFC05640(CPUState* cpu) { cpu->pc = 0xBFC05640u; OpenBIOS_func_1FC05600(cpu); } void OpenBIOS_func_1FC05648_cont_BFC0565C(CPUState* cpu) { cpu->pc = 0xBFC0565Cu; OpenBIOS_func_1FC05648(cpu); } void OpenBIOS_func_1FC05648_cont_BFC0566C(CPUState* cpu) { cpu->pc = 0xBFC0566Cu; OpenBIOS_func_1FC05648(cpu); } void OpenBIOS_func_1FC05648_cont_BFC056A4(CPUState* cpu) { cpu->pc = 0xBFC056A4u; OpenBIOS_func_1FC05648(cpu); } void OpenBIOS_func_1FC056B4_cont_BFC056E0(CPUState* cpu) { cpu->pc = 0xBFC056E0u; OpenBIOS_func_1FC056B4(cpu); } void OpenBIOS_func_1FC056B4_cont_BFC056E4(CPUState* cpu) { cpu->pc = 0xBFC056E4u; OpenBIOS_func_1FC056B4(cpu); } void OpenBIOS_func_1FC056EC_cont_BFC05718(CPUState* cpu) { cpu->pc = 0xBFC05718u; OpenBIOS_func_1FC056EC(cpu); } void OpenBIOS_func_1FC056EC_cont_BFC0571C(CPUState* cpu) { cpu->pc = 0xBFC0571Cu; OpenBIOS_func_1FC056EC(cpu); } void OpenBIOS_func_1FC0574C_cont_BFC05778(CPUState* cpu) { cpu->pc = 0xBFC05778u; OpenBIOS_func_1FC0574C(cpu); } void OpenBIOS_func_1FC0574C_cont_BFC05784(CPUState* cpu) { cpu->pc = 0xBFC05784u; OpenBIOS_func_1FC0574C(cpu); } void OpenBIOS_func_1FC0578C_cont_BFC057B8(CPUState* cpu) { cpu->pc = 0xBFC057B8u; OpenBIOS_func_1FC0578C(cpu); } void OpenBIOS_func_1FC0578C_cont_BFC057C0(CPUState* cpu) { cpu->pc = 0xBFC057C0u; OpenBIOS_func_1FC0578C(cpu); } void OpenBIOS_func_1FC0578C_cont_BFC057D0(CPUState* cpu) { cpu->pc = 0xBFC057D0u; OpenBIOS_func_1FC0578C(cpu); } void OpenBIOS_func_1FC0578C_cont_BFC057E0(CPUState* cpu) { cpu->pc = 0xBFC057E0u; OpenBIOS_func_1FC0578C(cpu); } void OpenBIOS_func_1FC0578C_cont_BFC057E8(CPUState* cpu) { cpu->pc = 0xBFC057E8u; OpenBIOS_func_1FC0578C(cpu); } void OpenBIOS_func_1FC057F0_cont_BFC05818(CPUState* cpu) { cpu->pc = 0xBFC05818u; OpenBIOS_func_1FC057F0(cpu); } void OpenBIOS_func_1FC057F0_cont_BFC05840(CPUState* cpu) { cpu->pc = 0xBFC05840u; OpenBIOS_func_1FC057F0(cpu); } void OpenBIOS_func_1FC05858_cont_BFC05868(CPUState* cpu) { cpu->pc = 0xBFC05868u; OpenBIOS_func_1FC05858(cpu); } void OpenBIOS_func_1FC05858_cont_BFC05870(CPUState* cpu) { cpu->pc = 0xBFC05870u; OpenBIOS_func_1FC05858(cpu); } void OpenBIOS_func_1FC05878_cont_BFC05888(CPUState* cpu) { cpu->pc = 0xBFC05888u; OpenBIOS_func_1FC05878(cpu); } void OpenBIOS_func_1FC05878_cont_BFC0588C(CPUState* cpu) { cpu->pc = 0xBFC0588Cu; OpenBIOS_func_1FC05878(cpu); } void OpenBIOS_func_1FC05894_cont_BFC0589C(CPUState* cpu) { cpu->pc = 0xBFC0589Cu; OpenBIOS_func_1FC05894(cpu); } void OpenBIOS_func_1FC05894_cont_BFC058A4(CPUState* cpu) { cpu->pc = 0xBFC058A4u; OpenBIOS_func_1FC05894(cpu); } void OpenBIOS_func_1FC05894_cont_BFC058A8(CPUState* cpu) { cpu->pc = 0xBFC058A8u; OpenBIOS_func_1FC05894(cpu); } void OpenBIOS_func_1FC05894_cont_BFC058B0(CPUState* cpu) { cpu->pc = 0xBFC058B0u; OpenBIOS_func_1FC05894(cpu); } void OpenBIOS_func_1FC05894_cont_BFC058C0(CPUState* cpu) { cpu->pc = 0xBFC058C0u; OpenBIOS_func_1FC05894(cpu); } void OpenBIOS_func_1FC058C8_cont_BFC058D0(CPUState* cpu) { cpu->pc = 0xBFC058D0u; OpenBIOS_func_1FC058C8(cpu); } void OpenBIOS_func_1FC058C8_cont_BFC058E0(CPUState* cpu) { cpu->pc = 0xBFC058E0u; OpenBIOS_func_1FC058C8(cpu); } void OpenBIOS_func_1FC058C8_cont_BFC058F0(CPUState* cpu) { cpu->pc = 0xBFC058F0u; OpenBIOS_func_1FC058C8(cpu); } void OpenBIOS_func_1FC058C8_cont_BFC058F8(CPUState* cpu) { cpu->pc = 0xBFC058F8u; OpenBIOS_func_1FC058C8(cpu); } void OpenBIOS_func_1FC058C8_cont_BFC05900(CPUState* cpu) { cpu->pc = 0xBFC05900u; OpenBIOS_func_1FC058C8(cpu); } void OpenBIOS_func_1FC0590C_cont_BFC05914(CPUState* cpu) { cpu->pc = 0xBFC05914u; OpenBIOS_func_1FC0590C(cpu); } void OpenBIOS_func_1FC0590C_cont_BFC05928(CPUState* cpu) { cpu->pc = 0xBFC05928u; OpenBIOS_func_1FC0590C(cpu); } void OpenBIOS_func_1FC05930_cont_BFC05940(CPUState* cpu) { cpu->pc = 0xBFC05940u; OpenBIOS_func_1FC05930(cpu); } void OpenBIOS_func_1FC05930_cont_BFC05948(CPUState* cpu) { cpu->pc = 0xBFC05948u; OpenBIOS_func_1FC05930(cpu); } void OpenBIOS_func_1FC05930_cont_BFC05950(CPUState* cpu) { cpu->pc = 0xBFC05950u; OpenBIOS_func_1FC05930(cpu); } void OpenBIOS_func_1FC05930_cont_BFC05958(CPUState* cpu) { cpu->pc = 0xBFC05958u; OpenBIOS_func_1FC05930(cpu); } void OpenBIOS_func_1FC05930_cont_BFC05964(CPUState* cpu) { cpu->pc = 0xBFC05964u; OpenBIOS_func_1FC05930(cpu); } void OpenBIOS_func_1FC0596C_cont_BFC05970(CPUState* cpu) { cpu->pc = 0xBFC05970u; OpenBIOS_func_1FC0596C(cpu); } void OpenBIOS_func_1FC0596C_cont_BFC05980(CPUState* cpu) { cpu->pc = 0xBFC05980u; OpenBIOS_func_1FC0596C(cpu); } void OpenBIOS_func_1FC0596C_cont_BFC05984(CPUState* cpu) { cpu->pc = 0xBFC05984u; OpenBIOS_func_1FC0596C(cpu); } void OpenBIOS_func_1FC0596C_cont_BFC0598C(CPUState* cpu) { cpu->pc = 0xBFC0598Cu; OpenBIOS_func_1FC0596C(cpu); } void OpenBIOS_func_1FC0596C_cont_BFC05994(CPUState* cpu) { cpu->pc = 0xBFC05994u; OpenBIOS_func_1FC0596C(cpu); } void OpenBIOS_func_1FC0599C_cont_BFC059A0(CPUState* cpu) { cpu->pc = 0xBFC059A0u; OpenBIOS_func_1FC0599C(cpu); } void OpenBIOS_func_1FC0599C_cont_BFC059B0(CPUState* cpu) { cpu->pc = 0xBFC059B0u; OpenBIOS_func_1FC0599C(cpu); } void OpenBIOS_func_1FC0599C_cont_BFC059B8(CPUState* cpu) { cpu->pc = 0xBFC059B8u; OpenBIOS_func_1FC0599C(cpu); } void OpenBIOS_func_1FC0599C_cont_BFC059C0(CPUState* cpu) { cpu->pc = 0xBFC059C0u; OpenBIOS_func_1FC0599C(cpu); } void OpenBIOS_func_1FC0599C_cont_BFC059C4(CPUState* cpu) { cpu->pc = 0xBFC059C4u; OpenBIOS_func_1FC0599C(cpu); } void OpenBIOS_func_1FC059CC_cont_BFC059D0(CPUState* cpu) { cpu->pc = 0xBFC059D0u; OpenBIOS_func_1FC059CC(cpu); } void OpenBIOS_func_1FC059CC_cont_BFC059E4(CPUState* cpu) { cpu->pc = 0xBFC059E4u; OpenBIOS_func_1FC059CC(cpu); } void OpenBIOS_func_1FC059CC_cont_BFC059EC(CPUState* cpu) { cpu->pc = 0xBFC059ECu; OpenBIOS_func_1FC059CC(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC059FC(CPUState* cpu) { cpu->pc = 0xBFC059FCu; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A0C(CPUState* cpu) { cpu->pc = 0xBFC05A0Cu; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A10(CPUState* cpu) { cpu->pc = 0xBFC05A10u; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A18(CPUState* cpu) { cpu->pc = 0xBFC05A18u; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A28(CPUState* cpu) { cpu->pc = 0xBFC05A28u; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A30(CPUState* cpu) { cpu->pc = 0xBFC05A30u; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC059F4_cont_BFC05A38(CPUState* cpu) { cpu->pc = 0xBFC05A38u; OpenBIOS_func_1FC059F4(cpu); } void OpenBIOS_func_1FC05A44_cont_BFC05A58(CPUState* cpu) { cpu->pc = 0xBFC05A58u; OpenBIOS_func_1FC05A44(cpu); } void OpenBIOS_func_1FC05A44_cont_BFC05A60(CPUState* cpu) { cpu->pc = 0xBFC05A60u; OpenBIOS_func_1FC05A44(cpu); } void OpenBIOS_func_1FC05A68_cont_BFC05A6C(CPUState* cpu) { cpu->pc = 0xBFC05A6Cu; OpenBIOS_func_1FC05A68(cpu); } void OpenBIOS_func_1FC05A68_cont_BFC05A74(CPUState* cpu) { cpu->pc = 0xBFC05A74u; OpenBIOS_func_1FC05A68(cpu); } void OpenBIOS_func_1FC05A68_cont_BFC05A7C(CPUState* cpu) { cpu->pc = 0xBFC05A7Cu; OpenBIOS_func_1FC05A68(cpu); } void OpenBIOS_func_1FC05A68_cont_BFC05A94(CPUState* cpu) { cpu->pc = 0xBFC05A94u; OpenBIOS_func_1FC05A68(cpu); } void OpenBIOS_func_1FC05A68_cont_BFC05A9C(CPUState* cpu) { cpu->pc = 0xBFC05A9Cu; OpenBIOS_func_1FC05A68(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AB8(CPUState* cpu) { cpu->pc = 0xBFC05AB8u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AC0(CPUState* cpu) { cpu->pc = 0xBFC05AC0u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AD0(CPUState* cpu) { cpu->pc = 0xBFC05AD0u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AD4(CPUState* cpu) { cpu->pc = 0xBFC05AD4u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AE4(CPUState* cpu) { cpu->pc = 0xBFC05AE4u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AEC(CPUState* cpu) { cpu->pc = 0xBFC05AECu; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AA4_cont_BFC05AF4(CPUState* cpu) { cpu->pc = 0xBFC05AF4u; OpenBIOS_func_1FC05AA4(cpu); } void OpenBIOS_func_1FC05AFC_cont_BFC05B04(CPUState* cpu) { cpu->pc = 0xBFC05B04u; OpenBIOS_func_1FC05AFC(cpu); } void OpenBIOS_func_1FC05AFC_cont_BFC05B1C(CPUState* cpu) { cpu->pc = 0xBFC05B1Cu; OpenBIOS_func_1FC05AFC(cpu); } void OpenBIOS_func_1FC05B24_cont_BFC05B3C(CPUState* cpu) { cpu->pc = 0xBFC05B3Cu; OpenBIOS_func_1FC05B24(cpu); } void OpenBIOS_func_1FC05B24_cont_BFC05B4C(CPUState* cpu) { cpu->pc = 0xBFC05B4Cu; OpenBIOS_func_1FC05B24(cpu); } void OpenBIOS_func_1FC05BB0_cont_BFC05BC4(CPUState* cpu) { cpu->pc = 0xBFC05BC4u; OpenBIOS_func_1FC05BB0(cpu); } void OpenBIOS_func_1FC05BD8_cont_BFC05BEC(CPUState* cpu) { cpu->pc = 0xBFC05BECu; OpenBIOS_func_1FC05BD8(cpu); } void OpenBIOS_func_1FC05C14_cont_BFC05C30(CPUState* cpu) { cpu->pc = 0xBFC05C30u; OpenBIOS_func_1FC05C14(cpu); } void OpenBIOS_func_1FC05C14_cont_BFC05C48(CPUState* cpu) { cpu->pc = 0xBFC05C48u; OpenBIOS_func_1FC05C14(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05CBC(CPUState* cpu) { cpu->pc = 0xBFC05CBCu; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05CE0(CPUState* cpu) { cpu->pc = 0xBFC05CE0u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05D00(CPUState* cpu) { cpu->pc = 0xBFC05D00u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05D20(CPUState* cpu) { cpu->pc = 0xBFC05D20u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05D40(CPUState* cpu) { cpu->pc = 0xBFC05D40u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05D60(CPUState* cpu) { cpu->pc = 0xBFC05D60u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05D80(CPUState* cpu) { cpu->pc = 0xBFC05D80u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05DA0(CPUState* cpu) { cpu->pc = 0xBFC05DA0u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05DC0(CPUState* cpu) { cpu->pc = 0xBFC05DC0u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05DE0(CPUState* cpu) { cpu->pc = 0xBFC05DE0u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05DF4(CPUState* cpu) { cpu->pc = 0xBFC05DF4u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05E00(CPUState* cpu) { cpu->pc = 0xBFC05E00u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05C8C_cont_BFC05E08(CPUState* cpu) { cpu->pc = 0xBFC05E08u; OpenBIOS_func_1FC05C8C(cpu); } void OpenBIOS_func_1FC05E10_cont_BFC05E34(CPUState* cpu) { cpu->pc = 0xBFC05E34u; OpenBIOS_func_1FC05E10(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05E84(CPUState* cpu) { cpu->pc = 0xBFC05E84u; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05E9C(CPUState* cpu) { cpu->pc = 0xBFC05E9Cu; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05EA4(CPUState* cpu) { cpu->pc = 0xBFC05EA4u; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05EB4(CPUState* cpu) { cpu->pc = 0xBFC05EB4u; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05EB8(CPUState* cpu) { cpu->pc = 0xBFC05EB8u; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05E74_cont_BFC05EBC(CPUState* cpu) { cpu->pc = 0xBFC05EBCu; OpenBIOS_func_1FC05E74(cpu); } void OpenBIOS_func_1FC05ED4_cont_BFC05EF0(CPUState* cpu) { cpu->pc = 0xBFC05EF0u; OpenBIOS_func_1FC05ED4(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F0C(CPUState* cpu) { cpu->pc = 0xBFC05F0Cu; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F1C(CPUState* cpu) { cpu->pc = 0xBFC05F1Cu; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F20(CPUState* cpu) { cpu->pc = 0xBFC05F20u; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F28(CPUState* cpu) { cpu->pc = 0xBFC05F28u; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F30(CPUState* cpu) { cpu->pc = 0xBFC05F30u; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F08_cont_BFC05F40(CPUState* cpu) { cpu->pc = 0xBFC05F40u; OpenBIOS_func_1FC05F08(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F50(CPUState* cpu) { cpu->pc = 0xBFC05F50u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F60(CPUState* cpu) { cpu->pc = 0xBFC05F60u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F68(CPUState* cpu) { cpu->pc = 0xBFC05F68u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F70(CPUState* cpu) { cpu->pc = 0xBFC05F70u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F74(CPUState* cpu) { cpu->pc = 0xBFC05F74u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F84(CPUState* cpu) { cpu->pc = 0xBFC05F84u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F88(CPUState* cpu) { cpu->pc = 0xBFC05F88u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05F90(CPUState* cpu) { cpu->pc = 0xBFC05F90u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05F48_cont_BFC05FA0(CPUState* cpu) { cpu->pc = 0xBFC05FA0u; OpenBIOS_func_1FC05F48(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FB0(CPUState* cpu) { cpu->pc = 0xBFC05FB0u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FC0(CPUState* cpu) { cpu->pc = 0xBFC05FC0u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FC8(CPUState* cpu) { cpu->pc = 0xBFC05FC8u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FD0(CPUState* cpu) { cpu->pc = 0xBFC05FD0u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FD4(CPUState* cpu) { cpu->pc = 0xBFC05FD4u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FE4(CPUState* cpu) { cpu->pc = 0xBFC05FE4u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FF4(CPUState* cpu) { cpu->pc = 0xBFC05FF4u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC05FF8(CPUState* cpu) { cpu->pc = 0xBFC05FF8u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC05FA8_cont_BFC06000(CPUState* cpu) { cpu->pc = 0xBFC06000u; OpenBIOS_func_1FC05FA8(cpu); } void OpenBIOS_func_1FC06008_cont_BFC0601C(CPUState* cpu) { cpu->pc = 0xBFC0601Cu; OpenBIOS_func_1FC06008(cpu); } void OpenBIOS_func_1FC06008_cont_BFC06028(CPUState* cpu) { cpu->pc = 0xBFC06028u; OpenBIOS_func_1FC06008(cpu); } void OpenBIOS_func_1FC06008_cont_BFC06030(CPUState* cpu) { cpu->pc = 0xBFC06030u; OpenBIOS_func_1FC06008(cpu); } void OpenBIOS_func_1FC06008_cont_BFC06038(CPUState* cpu) { cpu->pc = 0xBFC06038u; OpenBIOS_func_1FC06008(cpu); } void OpenBIOS_func_1FC06008_cont_BFC0603C(CPUState* cpu) { cpu->pc = 0xBFC0603Cu; OpenBIOS_func_1FC06008(cpu); } void OpenBIOS_func_1FC0604C_cont_BFC06060(CPUState* cpu) { cpu->pc = 0xBFC06060u; OpenBIOS_func_1FC0604C(cpu); } void OpenBIOS_func_1FC0604C_cont_BFC06068(CPUState* cpu) { cpu->pc = 0xBFC06068u; OpenBIOS_func_1FC0604C(cpu); } void OpenBIOS_func_1FC0604C_cont_BFC06070(CPUState* cpu) { cpu->pc = 0xBFC06070u; OpenBIOS_func_1FC0604C(cpu); } void OpenBIOS_func_1FC06084_cont_BFC06098(CPUState* cpu) { cpu->pc = 0xBFC06098u; OpenBIOS_func_1FC06084(cpu); } void OpenBIOS_func_1FC06084_cont_BFC060A0(CPUState* cpu) { cpu->pc = 0xBFC060A0u; OpenBIOS_func_1FC06084(cpu); } void OpenBIOS_func_1FC06084_cont_BFC060A8(CPUState* cpu) { cpu->pc = 0xBFC060A8u; OpenBIOS_func_1FC06084(cpu); } void OpenBIOS_func_1FC06084_cont_BFC060BC(CPUState* cpu) { cpu->pc = 0xBFC060BCu; OpenBIOS_func_1FC06084(cpu); } void OpenBIOS_func_1FC060C4_cont_BFC060CC(CPUState* cpu) { cpu->pc = 0xBFC060CCu; OpenBIOS_func_1FC060C4(cpu); } void OpenBIOS_func_1FC060C4_cont_BFC060D4(CPUState* cpu) { cpu->pc = 0xBFC060D4u; OpenBIOS_func_1FC060C4(cpu); } void OpenBIOS_func_1FC060C4_cont_BFC060DC(CPUState* cpu) { cpu->pc = 0xBFC060DCu; OpenBIOS_func_1FC060C4(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06124(CPUState* cpu) { cpu->pc = 0xBFC06124u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06130(CPUState* cpu) { cpu->pc = 0xBFC06130u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06138(CPUState* cpu) { cpu->pc = 0xBFC06138u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06150(CPUState* cpu) { cpu->pc = 0xBFC06150u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06164(CPUState* cpu) { cpu->pc = 0xBFC06164u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC0616C(CPUState* cpu) { cpu->pc = 0xBFC0616Cu; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC0611C_cont_BFC06170(CPUState* cpu) { cpu->pc = 0xBFC06170u; OpenBIOS_func_1FC0611C(cpu); } void OpenBIOS_func_1FC06180_cont_BFC061A0(CPUState* cpu) { cpu->pc = 0xBFC061A0u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC061AC(CPUState* cpu) { cpu->pc = 0xBFC061ACu; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC061B0(CPUState* cpu) { cpu->pc = 0xBFC061B0u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC061CC(CPUState* cpu) { cpu->pc = 0xBFC061CCu; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC061F4(CPUState* cpu) { cpu->pc = 0xBFC061F4u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC06200(CPUState* cpu) { cpu->pc = 0xBFC06200u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC06210(CPUState* cpu) { cpu->pc = 0xBFC06210u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06180_cont_BFC06218(CPUState* cpu) { cpu->pc = 0xBFC06218u; OpenBIOS_func_1FC06180(cpu); } void OpenBIOS_func_1FC06220_cont_BFC0622C(CPUState* cpu) { cpu->pc = 0xBFC0622Cu; OpenBIOS_func_1FC06220(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062C0(CPUState* cpu) { cpu->pc = 0xBFC062C0u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062CC(CPUState* cpu) { cpu->pc = 0xBFC062CCu; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062D8(CPUState* cpu) { cpu->pc = 0xBFC062D8u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062E0(CPUState* cpu) { cpu->pc = 0xBFC062E0u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062EC(CPUState* cpu) { cpu->pc = 0xBFC062ECu; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC062F8(CPUState* cpu) { cpu->pc = 0xBFC062F8u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC06304(CPUState* cpu) { cpu->pc = 0xBFC06304u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC06308(CPUState* cpu) { cpu->pc = 0xBFC06308u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC062A8_cont_BFC06310(CPUState* cpu) { cpu->pc = 0xBFC06310u; OpenBIOS_func_1FC062A8(cpu); } void OpenBIOS_func_1FC06324_cont_BFC06348(CPUState* cpu) { cpu->pc = 0xBFC06348u; OpenBIOS_func_1FC06324(cpu); } void OpenBIOS_func_1FC06324_cont_BFC06354(CPUState* cpu) { cpu->pc = 0xBFC06354u; OpenBIOS_func_1FC06324(cpu); } void OpenBIOS_func_1FC06324_cont_BFC06368(CPUState* cpu) { cpu->pc = 0xBFC06368u; OpenBIOS_func_1FC06324(cpu); } void OpenBIOS_func_1FC06324_cont_BFC0636C(CPUState* cpu) { cpu->pc = 0xBFC0636Cu; OpenBIOS_func_1FC06324(cpu); } void OpenBIOS_func_1FC0637C_cont_BFC063A0(CPUState* cpu) { cpu->pc = 0xBFC063A0u; OpenBIOS_func_1FC0637C(cpu); } void OpenBIOS_func_1FC0637C_cont_BFC063A8(CPUState* cpu) { cpu->pc = 0xBFC063A8u; OpenBIOS_func_1FC0637C(cpu); } void OpenBIOS_func_1FC0637C_cont_BFC063B8(CPUState* cpu) { cpu->pc = 0xBFC063B8u; OpenBIOS_func_1FC0637C(cpu); } void OpenBIOS_func_1FC0637C_cont_BFC063CC(CPUState* cpu) { cpu->pc = 0xBFC063CCu; OpenBIOS_func_1FC0637C(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC0640C(CPUState* cpu) { cpu->pc = 0xBFC0640Cu; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC06414(CPUState* cpu) { cpu->pc = 0xBFC06414u; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC06424(CPUState* cpu) { cpu->pc = 0xBFC06424u; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC06430(CPUState* cpu) { cpu->pc = 0xBFC06430u; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC0643C(CPUState* cpu) { cpu->pc = 0xBFC0643Cu; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC06458(CPUState* cpu) { cpu->pc = 0xBFC06458u; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC0646C(CPUState* cpu) { cpu->pc = 0xBFC0646Cu; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC0647C(CPUState* cpu) { cpu->pc = 0xBFC0647Cu; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC063E4_cont_BFC06484(CPUState* cpu) { cpu->pc = 0xBFC06484u; OpenBIOS_func_1FC063E4(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064BC(CPUState* cpu) { cpu->pc = 0xBFC064BCu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064CC(CPUState* cpu) { cpu->pc = 0xBFC064CCu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064D4(CPUState* cpu) { cpu->pc = 0xBFC064D4u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064DC(CPUState* cpu) { cpu->pc = 0xBFC064DCu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064E4(CPUState* cpu) { cpu->pc = 0xBFC064E4u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC064F4(CPUState* cpu) { cpu->pc = 0xBFC064F4u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06500(CPUState* cpu) { cpu->pc = 0xBFC06500u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC0650C(CPUState* cpu) { cpu->pc = 0xBFC0650Cu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06514(CPUState* cpu) { cpu->pc = 0xBFC06514u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06524(CPUState* cpu) { cpu->pc = 0xBFC06524u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC0652C(CPUState* cpu) { cpu->pc = 0xBFC0652Cu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06560(CPUState* cpu) { cpu->pc = 0xBFC06560u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06568(CPUState* cpu) { cpu->pc = 0xBFC06568u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC0657C(CPUState* cpu) { cpu->pc = 0xBFC0657Cu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06580(CPUState* cpu) { cpu->pc = 0xBFC06580u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC0658C(CPUState* cpu) { cpu->pc = 0xBFC0658Cu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065A0(CPUState* cpu) { cpu->pc = 0xBFC065A0u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065A8(CPUState* cpu) { cpu->pc = 0xBFC065A8u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065C8(CPUState* cpu) { cpu->pc = 0xBFC065C8u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065CC(CPUState* cpu) { cpu->pc = 0xBFC065CCu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065D4(CPUState* cpu) { cpu->pc = 0xBFC065D4u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065DC(CPUState* cpu) { cpu->pc = 0xBFC065DCu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065E8(CPUState* cpu) { cpu->pc = 0xBFC065E8u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065F0(CPUState* cpu) { cpu->pc = 0xBFC065F0u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC065F4(CPUState* cpu) { cpu->pc = 0xBFC065F4u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06604(CPUState* cpu) { cpu->pc = 0xBFC06604u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06618(CPUState* cpu) { cpu->pc = 0xBFC06618u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC06620(CPUState* cpu) { cpu->pc = 0xBFC06620u; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC0648C_cont_BFC0662C(CPUState* cpu) { cpu->pc = 0xBFC0662Cu; OpenBIOS_func_1FC0648C(cpu); } void OpenBIOS_func_1FC06634_cont_BFC06658(CPUState* cpu) { cpu->pc = 0xBFC06658u; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06634_cont_BFC0665C(CPUState* cpu) { cpu->pc = 0xBFC0665Cu; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06634_cont_BFC0666C(CPUState* cpu) { cpu->pc = 0xBFC0666Cu; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06634_cont_BFC06674(CPUState* cpu) { cpu->pc = 0xBFC06674u; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06634_cont_BFC06684(CPUState* cpu) { cpu->pc = 0xBFC06684u; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06634_cont_BFC06694(CPUState* cpu) { cpu->pc = 0xBFC06694u; OpenBIOS_func_1FC06634(cpu); } void OpenBIOS_func_1FC06728_cont_BFC06768(CPUState* cpu) { cpu->pc = 0xBFC06768u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC0677C(CPUState* cpu) { cpu->pc = 0xBFC0677Cu; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC06784(CPUState* cpu) { cpu->pc = 0xBFC06784u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC06788(CPUState* cpu) { cpu->pc = 0xBFC06788u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067AC(CPUState* cpu) { cpu->pc = 0xBFC067ACu; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067C8(CPUState* cpu) { cpu->pc = 0xBFC067C8u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067D0(CPUState* cpu) { cpu->pc = 0xBFC067D0u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067D4(CPUState* cpu) { cpu->pc = 0xBFC067D4u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067E0(CPUState* cpu) { cpu->pc = 0xBFC067E0u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067E8(CPUState* cpu) { cpu->pc = 0xBFC067E8u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC067F4(CPUState* cpu) { cpu->pc = 0xBFC067F4u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC06810(CPUState* cpu) { cpu->pc = 0xBFC06810u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06728_cont_BFC06824(CPUState* cpu) { cpu->pc = 0xBFC06824u; OpenBIOS_func_1FC06728(cpu); } void OpenBIOS_func_1FC06834_cont_BFC0684C(CPUState* cpu) { cpu->pc = 0xBFC0684Cu; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC06850(CPUState* cpu) { cpu->pc = 0xBFC06850u; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC0685C(CPUState* cpu) { cpu->pc = 0xBFC0685Cu; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC06868(CPUState* cpu) { cpu->pc = 0xBFC06868u; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC0686C(CPUState* cpu) { cpu->pc = 0xBFC0686Cu; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC06874(CPUState* cpu) { cpu->pc = 0xBFC06874u; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC06834_cont_BFC06884(CPUState* cpu) { cpu->pc = 0xBFC06884u; OpenBIOS_func_1FC06834(cpu); } void OpenBIOS_func_1FC0688C_cont_BFC068A0(CPUState* cpu) { cpu->pc = 0xBFC068A0u; OpenBIOS_func_1FC0688C(cpu); } void OpenBIOS_func_1FC0688C_cont_BFC068AC(CPUState* cpu) { cpu->pc = 0xBFC068ACu; OpenBIOS_func_1FC0688C(cpu); } void OpenBIOS_func_1FC0688C_cont_BFC068E8(CPUState* cpu) { cpu->pc = 0xBFC068E8u; OpenBIOS_func_1FC0688C(cpu); } void OpenBIOS_func_1FC0699C_cont_BFC069A8(CPUState* cpu) { cpu->pc = 0xBFC069A8u; OpenBIOS_func_1FC0699C(cpu); } void OpenBIOS_func_1FC0699C_cont_BFC069B0(CPUState* cpu) { cpu->pc = 0xBFC069B0u; OpenBIOS_func_1FC0699C(cpu); } void OpenBIOS_func_1FC069B8_cont_BFC069BC(CPUState* cpu) { cpu->pc = 0xBFC069BCu; OpenBIOS_func_1FC069B8(cpu); } void OpenBIOS_func_1FC069B8_cont_BFC069C4(CPUState* cpu) { cpu->pc = 0xBFC069C4u; OpenBIOS_func_1FC069B8(cpu); } void OpenBIOS_func_1FC069B8_cont_BFC069CC(CPUState* cpu) { cpu->pc = 0xBFC069CCu; OpenBIOS_func_1FC069B8(cpu); } void OpenBIOS_func_1FC069B8_cont_BFC069E4(CPUState* cpu) { cpu->pc = 0xBFC069E4u; OpenBIOS_func_1FC069B8(cpu); } void OpenBIOS_func_1FC069B8_cont_BFC069EC(CPUState* cpu) { cpu->pc = 0xBFC069ECu; OpenBIOS_func_1FC069B8(cpu); } void OpenBIOS_func_1FC06A38_cont_BFC06A50(CPUState* cpu) { cpu->pc = 0xBFC06A50u; OpenBIOS_func_1FC06A38(cpu); } void OpenBIOS_func_1FC06A38_cont_BFC06A58(CPUState* cpu) { cpu->pc = 0xBFC06A58u; OpenBIOS_func_1FC06A38(cpu); } void OpenBIOS_func_1FC06A38_cont_BFC06A64(CPUState* cpu) { cpu->pc = 0xBFC06A64u; OpenBIOS_func_1FC06A38(cpu); } void OpenBIOS_func_1FC06A38_cont_BFC06A7C(CPUState* cpu) { cpu->pc = 0xBFC06A7Cu; OpenBIOS_func_1FC06A38(cpu); } void OpenBIOS_func_1FC06A8C_cont_BFC06AA0(CPUState* cpu) { cpu->pc = 0xBFC06AA0u; OpenBIOS_func_1FC06A8C(cpu); } void OpenBIOS_func_1FC06AA8_cont_BFC06AB8(CPUState* cpu) { cpu->pc = 0xBFC06AB8u; OpenBIOS_func_1FC06AA8(cpu); } void OpenBIOS_func_1FC06AA8_cont_BFC06AC8(CPUState* cpu) { cpu->pc = 0xBFC06AC8u; OpenBIOS_func_1FC06AA8(cpu); } void OpenBIOS_func_1FC06AA8_cont_BFC06AD0(CPUState* cpu) { cpu->pc = 0xBFC06AD0u; OpenBIOS_func_1FC06AA8(cpu); } void OpenBIOS_func_1FC06AA8_cont_BFC06AD8(CPUState* cpu) { cpu->pc = 0xBFC06AD8u; OpenBIOS_func_1FC06AA8(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06AF4(CPUState* cpu) { cpu->pc = 0xBFC06AF4u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B08(CPUState* cpu) { cpu->pc = 0xBFC06B08u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B14(CPUState* cpu) { cpu->pc = 0xBFC06B14u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B1C(CPUState* cpu) { cpu->pc = 0xBFC06B1Cu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B24(CPUState* cpu) { cpu->pc = 0xBFC06B24u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B2C(CPUState* cpu) { cpu->pc = 0xBFC06B2Cu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B3C(CPUState* cpu) { cpu->pc = 0xBFC06B3Cu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B48(CPUState* cpu) { cpu->pc = 0xBFC06B48u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B50(CPUState* cpu) { cpu->pc = 0xBFC06B50u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B58(CPUState* cpu) { cpu->pc = 0xBFC06B58u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B60(CPUState* cpu) { cpu->pc = 0xBFC06B60u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B70(CPUState* cpu) { cpu->pc = 0xBFC06B70u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B80(CPUState* cpu) { cpu->pc = 0xBFC06B80u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B88(CPUState* cpu) { cpu->pc = 0xBFC06B88u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B90(CPUState* cpu) { cpu->pc = 0xBFC06B90u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06B98(CPUState* cpu) { cpu->pc = 0xBFC06B98u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BA0(CPUState* cpu) { cpu->pc = 0xBFC06BA0u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BA4(CPUState* cpu) { cpu->pc = 0xBFC06BA4u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BB8(CPUState* cpu) { cpu->pc = 0xBFC06BB8u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BC0(CPUState* cpu) { cpu->pc = 0xBFC06BC0u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BC8(CPUState* cpu) { cpu->pc = 0xBFC06BC8u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BD4(CPUState* cpu) { cpu->pc = 0xBFC06BD4u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BDC(CPUState* cpu) { cpu->pc = 0xBFC06BDCu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BE4(CPUState* cpu) { cpu->pc = 0xBFC06BE4u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06BFC(CPUState* cpu) { cpu->pc = 0xBFC06BFCu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C0C(CPUState* cpu) { cpu->pc = 0xBFC06C0Cu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C18(CPUState* cpu) { cpu->pc = 0xBFC06C18u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C20(CPUState* cpu) { cpu->pc = 0xBFC06C20u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C38(CPUState* cpu) { cpu->pc = 0xBFC06C38u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C44(CPUState* cpu) { cpu->pc = 0xBFC06C44u; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06AE4_cont_BFC06C4C(CPUState* cpu) { cpu->pc = 0xBFC06C4Cu; OpenBIOS_func_1FC06AE4(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CC4(CPUState* cpu) { cpu->pc = 0xBFC06CC4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CD0(CPUState* cpu) { cpu->pc = 0xBFC06CD0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CDC(CPUState* cpu) { cpu->pc = 0xBFC06CDCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CE4(CPUState* cpu) { cpu->pc = 0xBFC06CE4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CF4(CPUState* cpu) { cpu->pc = 0xBFC06CF4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06CFC(CPUState* cpu) { cpu->pc = 0xBFC06CFCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D0C(CPUState* cpu) { cpu->pc = 0xBFC06D0Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D18(CPUState* cpu) { cpu->pc = 0xBFC06D18u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D30(CPUState* cpu) { cpu->pc = 0xBFC06D30u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D50(CPUState* cpu) { cpu->pc = 0xBFC06D50u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D60(CPUState* cpu) { cpu->pc = 0xBFC06D60u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D78(CPUState* cpu) { cpu->pc = 0xBFC06D78u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D8C(CPUState* cpu) { cpu->pc = 0xBFC06D8Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06D90(CPUState* cpu) { cpu->pc = 0xBFC06D90u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06DB4(CPUState* cpu) { cpu->pc = 0xBFC06DB4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06DBC(CPUState* cpu) { cpu->pc = 0xBFC06DBCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06DC8(CPUState* cpu) { cpu->pc = 0xBFC06DC8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06DD8(CPUState* cpu) { cpu->pc = 0xBFC06DD8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06DEC(CPUState* cpu) { cpu->pc = 0xBFC06DECu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E1C(CPUState* cpu) { cpu->pc = 0xBFC06E1Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E34(CPUState* cpu) { cpu->pc = 0xBFC06E34u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E3C(CPUState* cpu) { cpu->pc = 0xBFC06E3Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E48(CPUState* cpu) { cpu->pc = 0xBFC06E48u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E54(CPUState* cpu) { cpu->pc = 0xBFC06E54u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E60(CPUState* cpu) { cpu->pc = 0xBFC06E60u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E6C(CPUState* cpu) { cpu->pc = 0xBFC06E6Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E78(CPUState* cpu) { cpu->pc = 0xBFC06E78u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E84(CPUState* cpu) { cpu->pc = 0xBFC06E84u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E8C(CPUState* cpu) { cpu->pc = 0xBFC06E8Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06E94(CPUState* cpu) { cpu->pc = 0xBFC06E94u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06EA8(CPUState* cpu) { cpu->pc = 0xBFC06EA8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06EBC(CPUState* cpu) { cpu->pc = 0xBFC06EBCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06EC8(CPUState* cpu) { cpu->pc = 0xBFC06EC8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06ED0(CPUState* cpu) { cpu->pc = 0xBFC06ED0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06ED8(CPUState* cpu) { cpu->pc = 0xBFC06ED8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F0C(CPUState* cpu) { cpu->pc = 0xBFC06F0Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F14(CPUState* cpu) { cpu->pc = 0xBFC06F14u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F20(CPUState* cpu) { cpu->pc = 0xBFC06F20u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F2C(CPUState* cpu) { cpu->pc = 0xBFC06F2Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F34(CPUState* cpu) { cpu->pc = 0xBFC06F34u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F4C(CPUState* cpu) { cpu->pc = 0xBFC06F4Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F54(CPUState* cpu) { cpu->pc = 0xBFC06F54u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F68(CPUState* cpu) { cpu->pc = 0xBFC06F68u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F70(CPUState* cpu) { cpu->pc = 0xBFC06F70u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F7C(CPUState* cpu) { cpu->pc = 0xBFC06F7Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F84(CPUState* cpu) { cpu->pc = 0xBFC06F84u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06F88(CPUState* cpu) { cpu->pc = 0xBFC06F88u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FC0(CPUState* cpu) { cpu->pc = 0xBFC06FC0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FC4(CPUState* cpu) { cpu->pc = 0xBFC06FC4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FCC(CPUState* cpu) { cpu->pc = 0xBFC06FCCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FD4(CPUState* cpu) { cpu->pc = 0xBFC06FD4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FE0(CPUState* cpu) { cpu->pc = 0xBFC06FE0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC06FF8(CPUState* cpu) { cpu->pc = 0xBFC06FF8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07000(CPUState* cpu) { cpu->pc = 0xBFC07000u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0700C(CPUState* cpu) { cpu->pc = 0xBFC0700Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0701C(CPUState* cpu) { cpu->pc = 0xBFC0701Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0702C(CPUState* cpu) { cpu->pc = 0xBFC0702Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07038(CPUState* cpu) { cpu->pc = 0xBFC07038u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07044(CPUState* cpu) { cpu->pc = 0xBFC07044u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0704C(CPUState* cpu) { cpu->pc = 0xBFC0704Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07060(CPUState* cpu) { cpu->pc = 0xBFC07060u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0706C(CPUState* cpu) { cpu->pc = 0xBFC0706Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07074(CPUState* cpu) { cpu->pc = 0xBFC07074u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC070A0(CPUState* cpu) { cpu->pc = 0xBFC070A0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC070B4(CPUState* cpu) { cpu->pc = 0xBFC070B4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC070BC(CPUState* cpu) { cpu->pc = 0xBFC070BCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC070E0(CPUState* cpu) { cpu->pc = 0xBFC070E0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC070F4(CPUState* cpu) { cpu->pc = 0xBFC070F4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07110(CPUState* cpu) { cpu->pc = 0xBFC07110u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07124(CPUState* cpu) { cpu->pc = 0xBFC07124u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0712C(CPUState* cpu) { cpu->pc = 0xBFC0712Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07140(CPUState* cpu) { cpu->pc = 0xBFC07140u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0714C(CPUState* cpu) { cpu->pc = 0xBFC0714Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07154(CPUState* cpu) { cpu->pc = 0xBFC07154u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07164(CPUState* cpu) { cpu->pc = 0xBFC07164u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07170(CPUState* cpu) { cpu->pc = 0xBFC07170u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07178(CPUState* cpu) { cpu->pc = 0xBFC07178u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07194(CPUState* cpu) { cpu->pc = 0xBFC07194u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0719C(CPUState* cpu) { cpu->pc = 0xBFC0719Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC071B4(CPUState* cpu) { cpu->pc = 0xBFC071B4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC071C0(CPUState* cpu) { cpu->pc = 0xBFC071C0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC071C8(CPUState* cpu) { cpu->pc = 0xBFC071C8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC071DC(CPUState* cpu) { cpu->pc = 0xBFC071DCu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC071F8(CPUState* cpu) { cpu->pc = 0xBFC071F8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0720C(CPUState* cpu) { cpu->pc = 0xBFC0720Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07220(CPUState* cpu) { cpu->pc = 0xBFC07220u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07238(CPUState* cpu) { cpu->pc = 0xBFC07238u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07240(CPUState* cpu) { cpu->pc = 0xBFC07240u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07248(CPUState* cpu) { cpu->pc = 0xBFC07248u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07250(CPUState* cpu) { cpu->pc = 0xBFC07250u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07260(CPUState* cpu) { cpu->pc = 0xBFC07260u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0726C(CPUState* cpu) { cpu->pc = 0xBFC0726Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0727C(CPUState* cpu) { cpu->pc = 0xBFC0727Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07284(CPUState* cpu) { cpu->pc = 0xBFC07284u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0728C(CPUState* cpu) { cpu->pc = 0xBFC0728Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07294(CPUState* cpu) { cpu->pc = 0xBFC07294u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0729C(CPUState* cpu) { cpu->pc = 0xBFC0729Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072A4(CPUState* cpu) { cpu->pc = 0xBFC072A4u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072AC(CPUState* cpu) { cpu->pc = 0xBFC072ACu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072B8(CPUState* cpu) { cpu->pc = 0xBFC072B8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072C0(CPUState* cpu) { cpu->pc = 0xBFC072C0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072C8(CPUState* cpu) { cpu->pc = 0xBFC072C8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072D8(CPUState* cpu) { cpu->pc = 0xBFC072D8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072E0(CPUState* cpu) { cpu->pc = 0xBFC072E0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072E8(CPUState* cpu) { cpu->pc = 0xBFC072E8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072F0(CPUState* cpu) { cpu->pc = 0xBFC072F0u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC072F8(CPUState* cpu) { cpu->pc = 0xBFC072F8u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07300(CPUState* cpu) { cpu->pc = 0xBFC07300u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0730C(CPUState* cpu) { cpu->pc = 0xBFC0730Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07314(CPUState* cpu) { cpu->pc = 0xBFC07314u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0732C(CPUState* cpu) { cpu->pc = 0xBFC0732Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0733C(CPUState* cpu) { cpu->pc = 0xBFC0733Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07344(CPUState* cpu) { cpu->pc = 0xBFC07344u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07354(CPUState* cpu) { cpu->pc = 0xBFC07354u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07370(CPUState* cpu) { cpu->pc = 0xBFC07370u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC0737C(CPUState* cpu) { cpu->pc = 0xBFC0737Cu; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC06C7C_cont_BFC07384(CPUState* cpu) { cpu->pc = 0xBFC07384u; OpenBIOS_func_1FC06C7C(cpu); } void OpenBIOS_func_1FC07390_cont_BFC073A8(CPUState* cpu) { cpu->pc = 0xBFC073A8u; OpenBIOS_func_1FC07390(cpu); } void OpenBIOS_func_1FC07390_cont_BFC073B8(CPUState* cpu) { cpu->pc = 0xBFC073B8u; OpenBIOS_func_1FC07390(cpu); } void OpenBIOS_func_1FC07390_cont_BFC073C4(CPUState* cpu) { cpu->pc = 0xBFC073C4u; OpenBIOS_func_1FC07390(cpu); } void OpenBIOS_func_1FC07390_cont_BFC073D4(CPUState* cpu) { cpu->pc = 0xBFC073D4u; OpenBIOS_func_1FC07390(cpu); } void OpenBIOS_func_1FC0742C_cont_BFC07440(CPUState* cpu) { cpu->pc = 0xBFC07440u; OpenBIOS_func_1FC0742C(cpu); } void OpenBIOS_func_1FC0742C_cont_BFC0744C(CPUState* cpu) { cpu->pc = 0xBFC0744Cu; OpenBIOS_func_1FC0742C(cpu); } void OpenBIOS_func_1FC0742C_cont_BFC07460(CPUState* cpu) { cpu->pc = 0xBFC07460u; OpenBIOS_func_1FC0742C(cpu); } void OpenBIOS_func_1FC0742C_cont_BFC07468(CPUState* cpu) { cpu->pc = 0xBFC07468u; OpenBIOS_func_1FC0742C(cpu); } void OpenBIOS_func_1FC0742C_cont_BFC0747C(CPUState* cpu) { cpu->pc = 0xBFC0747Cu; OpenBIOS_func_1FC0742C(cpu); } void OpenBIOS_func_1FC07484_cont_BFC07498(CPUState* cpu) { cpu->pc = 0xBFC07498u; OpenBIOS_func_1FC07484(cpu); } void OpenBIOS_func_1FC07484_cont_BFC074A4(CPUState* cpu) { cpu->pc = 0xBFC074A4u; OpenBIOS_func_1FC07484(cpu); } void OpenBIOS_func_1FC07484_cont_BFC074B8(CPUState* cpu) { cpu->pc = 0xBFC074B8u; OpenBIOS_func_1FC07484(cpu); } void OpenBIOS_func_1FC07484_cont_BFC074C0(CPUState* cpu) { cpu->pc = 0xBFC074C0u; OpenBIOS_func_1FC07484(cpu); } void OpenBIOS_func_1FC07484_cont_BFC074D4(CPUState* cpu) { cpu->pc = 0xBFC074D4u; OpenBIOS_func_1FC07484(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC07510(CPUState* cpu) { cpu->pc = 0xBFC07510u; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC07518(CPUState* cpu) { cpu->pc = 0xBFC07518u; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC07520(CPUState* cpu) { cpu->pc = 0xBFC07520u; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC07540(CPUState* cpu) { cpu->pc = 0xBFC07540u; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC07548(CPUState* cpu) { cpu->pc = 0xBFC07548u; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC0754C(CPUState* cpu) { cpu->pc = 0xBFC0754Cu; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC074DC_cont_BFC0755C(CPUState* cpu) { cpu->pc = 0xBFC0755Cu; OpenBIOS_func_1FC074DC(cpu); } void OpenBIOS_func_1FC07578_cont_BFC075C0(CPUState* cpu) { cpu->pc = 0xBFC075C0u; OpenBIOS_func_1FC07578(cpu); } void OpenBIOS_func_1FC07578_cont_BFC075D0(CPUState* cpu) { cpu->pc = 0xBFC075D0u; OpenBIOS_func_1FC07578(cpu); } void OpenBIOS_func_1FC07578_cont_BFC075E0(CPUState* cpu) { cpu->pc = 0xBFC075E0u; OpenBIOS_func_1FC07578(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07614(CPUState* cpu) { cpu->pc = 0xBFC07614u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07624(CPUState* cpu) { cpu->pc = 0xBFC07624u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC0762C(CPUState* cpu) { cpu->pc = 0xBFC0762Cu; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07630(CPUState* cpu) { cpu->pc = 0xBFC07630u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07640(CPUState* cpu) { cpu->pc = 0xBFC07640u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07644(CPUState* cpu) { cpu->pc = 0xBFC07644u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07654(CPUState* cpu) { cpu->pc = 0xBFC07654u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07660(CPUState* cpu) { cpu->pc = 0xBFC07660u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC0766C(CPUState* cpu) { cpu->pc = 0xBFC0766Cu; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC07604_cont_BFC07674(CPUState* cpu) { cpu->pc = 0xBFC07674u; OpenBIOS_func_1FC07604(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC07694(CPUState* cpu) { cpu->pc = 0xBFC07694u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076A4(CPUState* cpu) { cpu->pc = 0xBFC076A4u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076AC(CPUState* cpu) { cpu->pc = 0xBFC076ACu; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076B0(CPUState* cpu) { cpu->pc = 0xBFC076B0u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076C0(CPUState* cpu) { cpu->pc = 0xBFC076C0u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076C4(CPUState* cpu) { cpu->pc = 0xBFC076C4u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076D4(CPUState* cpu) { cpu->pc = 0xBFC076D4u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076DC(CPUState* cpu) { cpu->pc = 0xBFC076DCu; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076E4(CPUState* cpu) { cpu->pc = 0xBFC076E4u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076EC(CPUState* cpu) { cpu->pc = 0xBFC076ECu; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC0767C_cont_BFC076F4(CPUState* cpu) { cpu->pc = 0xBFC076F4u; OpenBIOS_func_1FC0767C(cpu); } void OpenBIOS_func_1FC07760_cont_BFC07768(CPUState* cpu) { cpu->pc = 0xBFC07768u; OpenBIOS_func_1FC07760(cpu); } void OpenBIOS_func_1FC07760_cont_BFC0776C(CPUState* cpu) { cpu->pc = 0xBFC0776Cu; OpenBIOS_func_1FC07760(cpu); } void OpenBIOS_func_1FC07760_cont_BFC07790(CPUState* cpu) { cpu->pc = 0xBFC07790u; OpenBIOS_func_1FC07760(cpu); } void OpenBIOS_func_1FC07760_cont_BFC07798(CPUState* cpu) { cpu->pc = 0xBFC07798u; OpenBIOS_func_1FC07760(cpu); } void OpenBIOS_func_1FC07760_cont_BFC077A4(CPUState* cpu) { cpu->pc = 0xBFC077A4u; OpenBIOS_func_1FC07760(cpu); } void OpenBIOS_func_1FC07808_cont_BFC07810(CPUState* cpu) { cpu->pc = 0xBFC07810u; OpenBIOS_func_1FC07808(cpu); } void OpenBIOS_func_1FC07808_cont_BFC07814(CPUState* cpu) { cpu->pc = 0xBFC07814u; OpenBIOS_func_1FC07808(cpu); } void OpenBIOS_func_1FC07808_cont_BFC07838(CPUState* cpu) { cpu->pc = 0xBFC07838u; OpenBIOS_func_1FC07808(cpu); } void OpenBIOS_func_1FC07808_cont_BFC07840(CPUState* cpu) { cpu->pc = 0xBFC07840u; OpenBIOS_func_1FC07808(cpu); } void OpenBIOS_func_1FC07808_cont_BFC0784C(CPUState* cpu) { cpu->pc = 0xBFC0784Cu; OpenBIOS_func_1FC07808(cpu); } void OpenBIOS_func_1FC078B0_cont_BFC078B8(CPUState* cpu) { cpu->pc = 0xBFC078B8u; OpenBIOS_func_1FC078B0(cpu); } void OpenBIOS_func_1FC078B0_cont_BFC078BC(CPUState* cpu) { cpu->pc = 0xBFC078BCu; OpenBIOS_func_1FC078B0(cpu); } void OpenBIOS_func_1FC078B0_cont_BFC078E0(CPUState* cpu) { cpu->pc = 0xBFC078E0u; OpenBIOS_func_1FC078B0(cpu); } void OpenBIOS_func_1FC078B0_cont_BFC0793C(CPUState* cpu) { cpu->pc = 0xBFC0793Cu; OpenBIOS_func_1FC078B0(cpu); } void OpenBIOS_func_1FC079C8_cont_BFC079E8(CPUState* cpu) { cpu->pc = 0xBFC079E8u; OpenBIOS_func_1FC079C8(cpu); } void OpenBIOS_func_1FC079C8_cont_BFC07A14(CPUState* cpu) { cpu->pc = 0xBFC07A14u; OpenBIOS_func_1FC079C8(cpu); } void OpenBIOS_func_1FC07A24_cont_BFC07A44(CPUState* cpu) { cpu->pc = 0xBFC07A44u; OpenBIOS_func_1FC07A24(cpu); } void OpenBIOS_func_1FC07A24_cont_BFC07A6C(CPUState* cpu) { cpu->pc = 0xBFC07A6Cu; OpenBIOS_func_1FC07A24(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07AA4(CPUState* cpu) { cpu->pc = 0xBFC07AA4u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07AB0(CPUState* cpu) { cpu->pc = 0xBFC07AB0u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07AB8(CPUState* cpu) { cpu->pc = 0xBFC07AB8u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07AC0(CPUState* cpu) { cpu->pc = 0xBFC07AC0u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07ACC(CPUState* cpu) { cpu->pc = 0xBFC07ACCu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07AFC(CPUState* cpu) { cpu->pc = 0xBFC07AFCu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B08(CPUState* cpu) { cpu->pc = 0xBFC07B08u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B10(CPUState* cpu) { cpu->pc = 0xBFC07B10u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B18(CPUState* cpu) { cpu->pc = 0xBFC07B18u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B2C(CPUState* cpu) { cpu->pc = 0xBFC07B2Cu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B40(CPUState* cpu) { cpu->pc = 0xBFC07B40u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B48(CPUState* cpu) { cpu->pc = 0xBFC07B48u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B50(CPUState* cpu) { cpu->pc = 0xBFC07B50u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B64(CPUState* cpu) { cpu->pc = 0xBFC07B64u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B68(CPUState* cpu) { cpu->pc = 0xBFC07B68u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B70(CPUState* cpu) { cpu->pc = 0xBFC07B70u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07B98(CPUState* cpu) { cpu->pc = 0xBFC07B98u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07BAC(CPUState* cpu) { cpu->pc = 0xBFC07BACu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07BB8(CPUState* cpu) { cpu->pc = 0xBFC07BB8u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07BE0(CPUState* cpu) { cpu->pc = 0xBFC07BE0u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07BF4(CPUState* cpu) { cpu->pc = 0xBFC07BF4u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C04(CPUState* cpu) { cpu->pc = 0xBFC07C04u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C0C(CPUState* cpu) { cpu->pc = 0xBFC07C0Cu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C20(CPUState* cpu) { cpu->pc = 0xBFC07C20u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C34(CPUState* cpu) { cpu->pc = 0xBFC07C34u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C50(CPUState* cpu) { cpu->pc = 0xBFC07C50u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C84(CPUState* cpu) { cpu->pc = 0xBFC07C84u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C8C(CPUState* cpu) { cpu->pc = 0xBFC07C8Cu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C94(CPUState* cpu) { cpu->pc = 0xBFC07C94u; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07A74_cont_BFC07C9C(CPUState* cpu) { cpu->pc = 0xBFC07C9Cu; OpenBIOS_func_1FC07A74(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CB0(CPUState* cpu) { cpu->pc = 0xBFC07CB0u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CB8(CPUState* cpu) { cpu->pc = 0xBFC07CB8u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CC4(CPUState* cpu) { cpu->pc = 0xBFC07CC4u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CDC(CPUState* cpu) { cpu->pc = 0xBFC07CDCu; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CE4(CPUState* cpu) { cpu->pc = 0xBFC07CE4u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07CF4(CPUState* cpu) { cpu->pc = 0xBFC07CF4u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D0C(CPUState* cpu) { cpu->pc = 0xBFC07D0Cu; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D18(CPUState* cpu) { cpu->pc = 0xBFC07D18u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D28(CPUState* cpu) { cpu->pc = 0xBFC07D28u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D34(CPUState* cpu) { cpu->pc = 0xBFC07D34u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D3C(CPUState* cpu) { cpu->pc = 0xBFC07D3Cu; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D44(CPUState* cpu) { cpu->pc = 0xBFC07D44u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D4C(CPUState* cpu) { cpu->pc = 0xBFC07D4Cu; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D58(CPUState* cpu) { cpu->pc = 0xBFC07D58u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D60(CPUState* cpu) { cpu->pc = 0xBFC07D60u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D68(CPUState* cpu) { cpu->pc = 0xBFC07D68u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07CA4_cont_BFC07D78(CPUState* cpu) { cpu->pc = 0xBFC07D78u; OpenBIOS_func_1FC07CA4(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07DEC(CPUState* cpu) { cpu->pc = 0xBFC07DECu; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07DF4(CPUState* cpu) { cpu->pc = 0xBFC07DF4u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07DFC(CPUState* cpu) { cpu->pc = 0xBFC07DFCu; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E08(CPUState* cpu) { cpu->pc = 0xBFC07E08u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E14(CPUState* cpu) { cpu->pc = 0xBFC07E14u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E20(CPUState* cpu) { cpu->pc = 0xBFC07E20u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E28(CPUState* cpu) { cpu->pc = 0xBFC07E28u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E30(CPUState* cpu) { cpu->pc = 0xBFC07E30u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E34(CPUState* cpu) { cpu->pc = 0xBFC07E34u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E74(CPUState* cpu) { cpu->pc = 0xBFC07E74u; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07DBC_cont_BFC07E7C(CPUState* cpu) { cpu->pc = 0xBFC07E7Cu; OpenBIOS_func_1FC07DBC(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07E94(CPUState* cpu) { cpu->pc = 0xBFC07E94u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07EA4(CPUState* cpu) { cpu->pc = 0xBFC07EA4u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07EB4(CPUState* cpu) { cpu->pc = 0xBFC07EB4u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07ED4(CPUState* cpu) { cpu->pc = 0xBFC07ED4u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07EE0(CPUState* cpu) { cpu->pc = 0xBFC07EE0u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07EEC(CPUState* cpu) { cpu->pc = 0xBFC07EECu; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07EF8(CPUState* cpu) { cpu->pc = 0xBFC07EF8u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F04(CPUState* cpu) { cpu->pc = 0xBFC07F04u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F0C(CPUState* cpu) { cpu->pc = 0xBFC07F0Cu; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F20(CPUState* cpu) { cpu->pc = 0xBFC07F20u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F34(CPUState* cpu) { cpu->pc = 0xBFC07F34u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F5C(CPUState* cpu) { cpu->pc = 0xBFC07F5Cu; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F78(CPUState* cpu) { cpu->pc = 0xBFC07F78u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07F94(CPUState* cpu) { cpu->pc = 0xBFC07F94u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07FA4(CPUState* cpu) { cpu->pc = 0xBFC07FA4u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07FB8(CPUState* cpu) { cpu->pc = 0xBFC07FB8u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07FC8(CPUState* cpu) { cpu->pc = 0xBFC07FC8u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07FD4(CPUState* cpu) { cpu->pc = 0xBFC07FD4u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC07FDC(CPUState* cpu) { cpu->pc = 0xBFC07FDCu; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08008(CPUState* cpu) { cpu->pc = 0xBFC08008u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC0800C(CPUState* cpu) { cpu->pc = 0xBFC0800Cu; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08014(CPUState* cpu) { cpu->pc = 0xBFC08014u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08020(CPUState* cpu) { cpu->pc = 0xBFC08020u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08030(CPUState* cpu) { cpu->pc = 0xBFC08030u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08038(CPUState* cpu) { cpu->pc = 0xBFC08038u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC07E84_cont_BFC08058(CPUState* cpu) { cpu->pc = 0xBFC08058u; OpenBIOS_func_1FC07E84(cpu); } void OpenBIOS_func_1FC0810C_cont_BFC0811C(CPUState* cpu) { cpu->pc = 0xBFC0811Cu; OpenBIOS_func_1FC0810C(cpu); } void OpenBIOS_func_1FC0817C_cont_BFC0818C(CPUState* cpu) { cpu->pc = 0xBFC0818Cu; OpenBIOS_func_1FC0817C(cpu); } void OpenBIOS_func_1FC081EC_cont_BFC081FC(CPUState* cpu) { cpu->pc = 0xBFC081FCu; OpenBIOS_func_1FC081EC(cpu); } void OpenBIOS_func_1FC08220_cont_BFC08230(CPUState* cpu) { cpu->pc = 0xBFC08230u; OpenBIOS_func_1FC08220(cpu); } void OpenBIOS_func_1FC08254_cont_BFC08264(CPUState* cpu) { cpu->pc = 0xBFC08264u; OpenBIOS_func_1FC08254(cpu); } void OpenBIOS_func_1FC08288_cont_BFC08298(CPUState* cpu) { cpu->pc = 0xBFC08298u; OpenBIOS_func_1FC08288(cpu); } void OpenBIOS_func_1FC082DC_cont_BFC082EC(CPUState* cpu) { cpu->pc = 0xBFC082ECu; OpenBIOS_func_1FC082DC(cpu); } void OpenBIOS_func_1FC08338_cont_BFC0833C(CPUState* cpu) { cpu->pc = 0xBFC0833Cu; OpenBIOS_func_1FC08338(cpu); } void OpenBIOS_func_1FC08338_cont_BFC0834C(CPUState* cpu) { cpu->pc = 0xBFC0834Cu; OpenBIOS_func_1FC08338(cpu); } void OpenBIOS_func_1FC08338_cont_BFC08354(CPUState* cpu) { cpu->pc = 0xBFC08354u; OpenBIOS_func_1FC08338(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC083E8(CPUState* cpu) { cpu->pc = 0xBFC083E8u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC083F0(CPUState* cpu) { cpu->pc = 0xBFC083F0u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC0840C(CPUState* cpu) { cpu->pc = 0xBFC0840Cu; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08414(CPUState* cpu) { cpu->pc = 0xBFC08414u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08430(CPUState* cpu) { cpu->pc = 0xBFC08430u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08440(CPUState* cpu) { cpu->pc = 0xBFC08440u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08448(CPUState* cpu) { cpu->pc = 0xBFC08448u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08454(CPUState* cpu) { cpu->pc = 0xBFC08454u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC08464(CPUState* cpu) { cpu->pc = 0xBFC08464u; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC083B8_cont_BFC0846C(CPUState* cpu) { cpu->pc = 0xBFC0846Cu; OpenBIOS_func_1FC083B8(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08484(CPUState* cpu) { cpu->pc = 0xBFC08484u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084B4(CPUState* cpu) { cpu->pc = 0xBFC084B4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084C4(CPUState* cpu) { cpu->pc = 0xBFC084C4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084C8(CPUState* cpu) { cpu->pc = 0xBFC084C8u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084D4(CPUState* cpu) { cpu->pc = 0xBFC084D4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084E4(CPUState* cpu) { cpu->pc = 0xBFC084E4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC084FC(CPUState* cpu) { cpu->pc = 0xBFC084FCu; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08504(CPUState* cpu) { cpu->pc = 0xBFC08504u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08530(CPUState* cpu) { cpu->pc = 0xBFC08530u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08540(CPUState* cpu) { cpu->pc = 0xBFC08540u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08550(CPUState* cpu) { cpu->pc = 0xBFC08550u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08558(CPUState* cpu) { cpu->pc = 0xBFC08558u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08564(CPUState* cpu) { cpu->pc = 0xBFC08564u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC0856C(CPUState* cpu) { cpu->pc = 0xBFC0856Cu; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08570(CPUState* cpu) { cpu->pc = 0xBFC08570u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08580(CPUState* cpu) { cpu->pc = 0xBFC08580u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08584(CPUState* cpu) { cpu->pc = 0xBFC08584u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08590(CPUState* cpu) { cpu->pc = 0xBFC08590u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC08598(CPUState* cpu) { cpu->pc = 0xBFC08598u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC085B4(CPUState* cpu) { cpu->pc = 0xBFC085B4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC085C0(CPUState* cpu) { cpu->pc = 0xBFC085C0u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC085C4(CPUState* cpu) { cpu->pc = 0xBFC085C4u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC08478_cont_BFC085D0(CPUState* cpu) { cpu->pc = 0xBFC085D0u; OpenBIOS_func_1FC08478(cpu); } void OpenBIOS_func_1FC085D8_cont_BFC085E0(CPUState* cpu) { cpu->pc = 0xBFC085E0u; OpenBIOS_func_1FC085D8(cpu); } void OpenBIOS_func_1FC085D8_cont_BFC085E8(CPUState* cpu) { cpu->pc = 0xBFC085E8u; OpenBIOS_func_1FC085D8(cpu); } void OpenBIOS_func_1FC085D8_cont_BFC085F0(CPUState* cpu) { cpu->pc = 0xBFC085F0u; OpenBIOS_func_1FC085D8(cpu); } void OpenBIOS_func_1FC08604_cont_BFC08610(CPUState* cpu) { cpu->pc = 0xBFC08610u; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC0861C(CPUState* cpu) { cpu->pc = 0xBFC0861Cu; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC08624(CPUState* cpu) { cpu->pc = 0xBFC08624u; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC08634(CPUState* cpu) { cpu->pc = 0xBFC08634u; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC0863C(CPUState* cpu) { cpu->pc = 0xBFC0863Cu; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC0864C(CPUState* cpu) { cpu->pc = 0xBFC0864Cu; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC08654(CPUState* cpu) { cpu->pc = 0xBFC08654u; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC0865C(CPUState* cpu) { cpu->pc = 0xBFC0865Cu; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08604_cont_BFC08664(CPUState* cpu) { cpu->pc = 0xBFC08664u; OpenBIOS_func_1FC08604(cpu); } void OpenBIOS_func_1FC08674_cont_BFC08678(CPUState* cpu) { cpu->pc = 0xBFC08678u; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC08680(CPUState* cpu) { cpu->pc = 0xBFC08680u; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC08688(CPUState* cpu) { cpu->pc = 0xBFC08688u; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC086A4(CPUState* cpu) { cpu->pc = 0xBFC086A4u; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC086AC(CPUState* cpu) { cpu->pc = 0xBFC086ACu; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC086B4(CPUState* cpu) { cpu->pc = 0xBFC086B4u; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC08674_cont_BFC086BC(CPUState* cpu) { cpu->pc = 0xBFC086BCu; OpenBIOS_func_1FC08674(cpu); } void OpenBIOS_func_1FC086C4_cont_BFC086D0(CPUState* cpu) { cpu->pc = 0xBFC086D0u; OpenBIOS_func_1FC086C4(cpu); } void OpenBIOS_func_1FC086C4_cont_BFC086D8(CPUState* cpu) { cpu->pc = 0xBFC086D8u; OpenBIOS_func_1FC086C4(cpu); } void OpenBIOS_func_1FC086C4_cont_BFC086E0(CPUState* cpu) { cpu->pc = 0xBFC086E0u; OpenBIOS_func_1FC086C4(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC086F4(CPUState* cpu) { cpu->pc = 0xBFC086F4u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC086FC(CPUState* cpu) { cpu->pc = 0xBFC086FCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08720(CPUState* cpu) { cpu->pc = 0xBFC08720u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08728(CPUState* cpu) { cpu->pc = 0xBFC08728u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC0872C(CPUState* cpu) { cpu->pc = 0xBFC0872Cu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08758(CPUState* cpu) { cpu->pc = 0xBFC08758u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08760(CPUState* cpu) { cpu->pc = 0xBFC08760u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08770(CPUState* cpu) { cpu->pc = 0xBFC08770u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08778(CPUState* cpu) { cpu->pc = 0xBFC08778u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08788(CPUState* cpu) { cpu->pc = 0xBFC08788u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08790(CPUState* cpu) { cpu->pc = 0xBFC08790u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08794(CPUState* cpu) { cpu->pc = 0xBFC08794u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC0879C(CPUState* cpu) { cpu->pc = 0xBFC0879Cu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087A0(CPUState* cpu) { cpu->pc = 0xBFC087A0u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087A8(CPUState* cpu) { cpu->pc = 0xBFC087A8u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087B8(CPUState* cpu) { cpu->pc = 0xBFC087B8u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087C0(CPUState* cpu) { cpu->pc = 0xBFC087C0u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087CC(CPUState* cpu) { cpu->pc = 0xBFC087CCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087D4(CPUState* cpu) { cpu->pc = 0xBFC087D4u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087DC(CPUState* cpu) { cpu->pc = 0xBFC087DCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087E8(CPUState* cpu) { cpu->pc = 0xBFC087E8u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087F0(CPUState* cpu) { cpu->pc = 0xBFC087F0u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC087F4(CPUState* cpu) { cpu->pc = 0xBFC087F4u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08804(CPUState* cpu) { cpu->pc = 0xBFC08804u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08818(CPUState* cpu) { cpu->pc = 0xBFC08818u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08820(CPUState* cpu) { cpu->pc = 0xBFC08820u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08848(CPUState* cpu) { cpu->pc = 0xBFC08848u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08850(CPUState* cpu) { cpu->pc = 0xBFC08850u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08858(CPUState* cpu) { cpu->pc = 0xBFC08858u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08860(CPUState* cpu) { cpu->pc = 0xBFC08860u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08868(CPUState* cpu) { cpu->pc = 0xBFC08868u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC0886C(CPUState* cpu) { cpu->pc = 0xBFC0886Cu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08870(CPUState* cpu) { cpu->pc = 0xBFC08870u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08878(CPUState* cpu) { cpu->pc = 0xBFC08878u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08880(CPUState* cpu) { cpu->pc = 0xBFC08880u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08894(CPUState* cpu) { cpu->pc = 0xBFC08894u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC08898(CPUState* cpu) { cpu->pc = 0xBFC08898u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC088A8(CPUState* cpu) { cpu->pc = 0xBFC088A8u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC088BC(CPUState* cpu) { cpu->pc = 0xBFC088BCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC088CC(CPUState* cpu) { cpu->pc = 0xBFC088CCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC088D4(CPUState* cpu) { cpu->pc = 0xBFC088D4u; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC086E8_cont_BFC088DC(CPUState* cpu) { cpu->pc = 0xBFC088DCu; OpenBIOS_func_1FC086E8(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08958(CPUState* cpu) { cpu->pc = 0xBFC08958u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08968(CPUState* cpu) { cpu->pc = 0xBFC08968u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08974(CPUState* cpu) { cpu->pc = 0xBFC08974u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08978(CPUState* cpu) { cpu->pc = 0xBFC08978u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC0898C(CPUState* cpu) { cpu->pc = 0xBFC0898Cu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08994(CPUState* cpu) { cpu->pc = 0xBFC08994u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08998(CPUState* cpu) { cpu->pc = 0xBFC08998u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089A8(CPUState* cpu) { cpu->pc = 0xBFC089A8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089B0(CPUState* cpu) { cpu->pc = 0xBFC089B0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089B8(CPUState* cpu) { cpu->pc = 0xBFC089B8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089C8(CPUState* cpu) { cpu->pc = 0xBFC089C8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089DC(CPUState* cpu) { cpu->pc = 0xBFC089DCu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC089E0(CPUState* cpu) { cpu->pc = 0xBFC089E0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A14(CPUState* cpu) { cpu->pc = 0xBFC08A14u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A44(CPUState* cpu) { cpu->pc = 0xBFC08A44u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A4C(CPUState* cpu) { cpu->pc = 0xBFC08A4Cu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A54(CPUState* cpu) { cpu->pc = 0xBFC08A54u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A5C(CPUState* cpu) { cpu->pc = 0xBFC08A5Cu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A64(CPUState* cpu) { cpu->pc = 0xBFC08A64u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A6C(CPUState* cpu) { cpu->pc = 0xBFC08A6Cu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A70(CPUState* cpu) { cpu->pc = 0xBFC08A70u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A80(CPUState* cpu) { cpu->pc = 0xBFC08A80u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A90(CPUState* cpu) { cpu->pc = 0xBFC08A90u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08A98(CPUState* cpu) { cpu->pc = 0xBFC08A98u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AA8(CPUState* cpu) { cpu->pc = 0xBFC08AA8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AB0(CPUState* cpu) { cpu->pc = 0xBFC08AB0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AB4(CPUState* cpu) { cpu->pc = 0xBFC08AB4u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AC0(CPUState* cpu) { cpu->pc = 0xBFC08AC0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AD0(CPUState* cpu) { cpu->pc = 0xBFC08AD0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AD8(CPUState* cpu) { cpu->pc = 0xBFC08AD8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08AE4(CPUState* cpu) { cpu->pc = 0xBFC08AE4u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B04(CPUState* cpu) { cpu->pc = 0xBFC08B04u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B0C(CPUState* cpu) { cpu->pc = 0xBFC08B0Cu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B14(CPUState* cpu) { cpu->pc = 0xBFC08B14u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B18(CPUState* cpu) { cpu->pc = 0xBFC08B18u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B28(CPUState* cpu) { cpu->pc = 0xBFC08B28u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B30(CPUState* cpu) { cpu->pc = 0xBFC08B30u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B38(CPUState* cpu) { cpu->pc = 0xBFC08B38u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B40(CPUState* cpu) { cpu->pc = 0xBFC08B40u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B48(CPUState* cpu) { cpu->pc = 0xBFC08B48u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B50(CPUState* cpu) { cpu->pc = 0xBFC08B50u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B58(CPUState* cpu) { cpu->pc = 0xBFC08B58u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B78(CPUState* cpu) { cpu->pc = 0xBFC08B78u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B88(CPUState* cpu) { cpu->pc = 0xBFC08B88u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B90(CPUState* cpu) { cpu->pc = 0xBFC08B90u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08B98(CPUState* cpu) { cpu->pc = 0xBFC08B98u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BB4(CPUState* cpu) { cpu->pc = 0xBFC08BB4u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BC0(CPUState* cpu) { cpu->pc = 0xBFC08BC0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BC4(CPUState* cpu) { cpu->pc = 0xBFC08BC4u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BD0(CPUState* cpu) { cpu->pc = 0xBFC08BD0u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BD8(CPUState* cpu) { cpu->pc = 0xBFC08BD8u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BEC(CPUState* cpu) { cpu->pc = 0xBFC08BECu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08BFC(CPUState* cpu) { cpu->pc = 0xBFC08BFCu; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08C20(CPUState* cpu) { cpu->pc = 0xBFC08C20u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08C28(CPUState* cpu) { cpu->pc = 0xBFC08C28u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08C34(CPUState* cpu) { cpu->pc = 0xBFC08C34u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC088F0_cont_BFC08C50(CPUState* cpu) { cpu->pc = 0xBFC08C50u; OpenBIOS_func_1FC088F0(cpu); } void OpenBIOS_func_1FC08C58_cont_BFC08C84(CPUState* cpu) { cpu->pc = 0xBFC08C84u; OpenBIOS_func_1FC08C58(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CBC(CPUState* cpu) { cpu->pc = 0xBFC08CBCu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CC8(CPUState* cpu) { cpu->pc = 0xBFC08CC8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CE4(CPUState* cpu) { cpu->pc = 0xBFC08CE4u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CEC(CPUState* cpu) { cpu->pc = 0xBFC08CECu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CF4(CPUState* cpu) { cpu->pc = 0xBFC08CF4u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08CFC(CPUState* cpu) { cpu->pc = 0xBFC08CFCu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D0C(CPUState* cpu) { cpu->pc = 0xBFC08D0Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D10(CPUState* cpu) { cpu->pc = 0xBFC08D10u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D1C(CPUState* cpu) { cpu->pc = 0xBFC08D1Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D28(CPUState* cpu) { cpu->pc = 0xBFC08D28u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D2C(CPUState* cpu) { cpu->pc = 0xBFC08D2Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D40(CPUState* cpu) { cpu->pc = 0xBFC08D40u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D48(CPUState* cpu) { cpu->pc = 0xBFC08D48u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D4C(CPUState* cpu) { cpu->pc = 0xBFC08D4Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D60(CPUState* cpu) { cpu->pc = 0xBFC08D60u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D64(CPUState* cpu) { cpu->pc = 0xBFC08D64u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D6C(CPUState* cpu) { cpu->pc = 0xBFC08D6Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D7C(CPUState* cpu) { cpu->pc = 0xBFC08D7Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D84(CPUState* cpu) { cpu->pc = 0xBFC08D84u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08D88(CPUState* cpu) { cpu->pc = 0xBFC08D88u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DB0(CPUState* cpu) { cpu->pc = 0xBFC08DB0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DC8(CPUState* cpu) { cpu->pc = 0xBFC08DC8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DD4(CPUState* cpu) { cpu->pc = 0xBFC08DD4u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DE8(CPUState* cpu) { cpu->pc = 0xBFC08DE8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DF0(CPUState* cpu) { cpu->pc = 0xBFC08DF0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08DF8(CPUState* cpu) { cpu->pc = 0xBFC08DF8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E10(CPUState* cpu) { cpu->pc = 0xBFC08E10u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E24(CPUState* cpu) { cpu->pc = 0xBFC08E24u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E34(CPUState* cpu) { cpu->pc = 0xBFC08E34u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E3C(CPUState* cpu) { cpu->pc = 0xBFC08E3Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E44(CPUState* cpu) { cpu->pc = 0xBFC08E44u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E50(CPUState* cpu) { cpu->pc = 0xBFC08E50u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E58(CPUState* cpu) { cpu->pc = 0xBFC08E58u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E60(CPUState* cpu) { cpu->pc = 0xBFC08E60u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E64(CPUState* cpu) { cpu->pc = 0xBFC08E64u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E70(CPUState* cpu) { cpu->pc = 0xBFC08E70u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E78(CPUState* cpu) { cpu->pc = 0xBFC08E78u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E88(CPUState* cpu) { cpu->pc = 0xBFC08E88u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08E90(CPUState* cpu) { cpu->pc = 0xBFC08E90u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EA0(CPUState* cpu) { cpu->pc = 0xBFC08EA0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EA8(CPUState* cpu) { cpu->pc = 0xBFC08EA8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EB0(CPUState* cpu) { cpu->pc = 0xBFC08EB0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EB8(CPUState* cpu) { cpu->pc = 0xBFC08EB8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EBC(CPUState* cpu) { cpu->pc = 0xBFC08EBCu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EC8(CPUState* cpu) { cpu->pc = 0xBFC08EC8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08ED0(CPUState* cpu) { cpu->pc = 0xBFC08ED0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EE0(CPUState* cpu) { cpu->pc = 0xBFC08EE0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EE8(CPUState* cpu) { cpu->pc = 0xBFC08EE8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EF0(CPUState* cpu) { cpu->pc = 0xBFC08EF0u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08EF8(CPUState* cpu) { cpu->pc = 0xBFC08EF8u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08F00(CPUState* cpu) { cpu->pc = 0xBFC08F00u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08F0C(CPUState* cpu) { cpu->pc = 0xBFC08F0Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08F14(CPUState* cpu) { cpu->pc = 0xBFC08F14u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08F1C(CPUState* cpu) { cpu->pc = 0xBFC08F1Cu; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08C9C_cont_BFC08F28(CPUState* cpu) { cpu->pc = 0xBFC08F28u; OpenBIOS_func_1FC08C9C(cpu); } void OpenBIOS_func_1FC08F64_cont_BFC08F6C(CPUState* cpu) { cpu->pc = 0xBFC08F6Cu; OpenBIOS_func_1FC08F64(cpu); } void OpenBIOS_func_1FC08F64_cont_BFC08F74(CPUState* cpu) { cpu->pc = 0xBFC08F74u; OpenBIOS_func_1FC08F64(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08F8C(CPUState* cpu) { cpu->pc = 0xBFC08F8Cu; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08F94(CPUState* cpu) { cpu->pc = 0xBFC08F94u; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08F9C(CPUState* cpu) { cpu->pc = 0xBFC08F9Cu; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08FA8(CPUState* cpu) { cpu->pc = 0xBFC08FA8u; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08FB4(CPUState* cpu) { cpu->pc = 0xBFC08FB4u; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08FC0(CPUState* cpu) { cpu->pc = 0xBFC08FC0u; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08F80_cont_BFC08FCC(CPUState* cpu) { cpu->pc = 0xBFC08FCCu; OpenBIOS_func_1FC08F80(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC08FE4(CPUState* cpu) { cpu->pc = 0xBFC08FE4u; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC08FEC(CPUState* cpu) { cpu->pc = 0xBFC08FECu; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC08FF0(CPUState* cpu) { cpu->pc = 0xBFC08FF0u; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC09004(CPUState* cpu) { cpu->pc = 0xBFC09004u; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC0900C(CPUState* cpu) { cpu->pc = 0xBFC0900Cu; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC09018(CPUState* cpu) { cpu->pc = 0xBFC09018u; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC08FD4_cont_BFC09020(CPUState* cpu) { cpu->pc = 0xBFC09020u; OpenBIOS_func_1FC08FD4(cpu); } void OpenBIOS_func_1FC09028_cont_BFC0903C(CPUState* cpu) { cpu->pc = 0xBFC0903Cu; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC0904C(CPUState* cpu) { cpu->pc = 0xBFC0904Cu; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09058(CPUState* cpu) { cpu->pc = 0xBFC09058u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09074(CPUState* cpu) { cpu->pc = 0xBFC09074u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09084(CPUState* cpu) { cpu->pc = 0xBFC09084u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC0908C(CPUState* cpu) { cpu->pc = 0xBFC0908Cu; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09094(CPUState* cpu) { cpu->pc = 0xBFC09094u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09098(CPUState* cpu) { cpu->pc = 0xBFC09098u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090A0(CPUState* cpu) { cpu->pc = 0xBFC090A0u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090B0(CPUState* cpu) { cpu->pc = 0xBFC090B0u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090B8(CPUState* cpu) { cpu->pc = 0xBFC090B8u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090C8(CPUState* cpu) { cpu->pc = 0xBFC090C8u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090D0(CPUState* cpu) { cpu->pc = 0xBFC090D0u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090E0(CPUState* cpu) { cpu->pc = 0xBFC090E0u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090E8(CPUState* cpu) { cpu->pc = 0xBFC090E8u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090F0(CPUState* cpu) { cpu->pc = 0xBFC090F0u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC090F8(CPUState* cpu) { cpu->pc = 0xBFC090F8u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09028_cont_BFC09100(CPUState* cpu) { cpu->pc = 0xBFC09100u; OpenBIOS_func_1FC09028(cpu); } void OpenBIOS_func_1FC09108_cont_BFC09114(CPUState* cpu) { cpu->pc = 0xBFC09114u; OpenBIOS_func_1FC09108(cpu); } void OpenBIOS_func_1FC09108_cont_BFC0911C(CPUState* cpu) { cpu->pc = 0xBFC0911Cu; OpenBIOS_func_1FC09108(cpu); } void OpenBIOS_func_1FC09108_cont_BFC09124(CPUState* cpu) { cpu->pc = 0xBFC09124u; OpenBIOS_func_1FC09108(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC0913C(CPUState* cpu) { cpu->pc = 0xBFC0913Cu; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09144(CPUState* cpu) { cpu->pc = 0xBFC09144u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC0914C(CPUState* cpu) { cpu->pc = 0xBFC0914Cu; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09158(CPUState* cpu) { cpu->pc = 0xBFC09158u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09160(CPUState* cpu) { cpu->pc = 0xBFC09160u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09168(CPUState* cpu) { cpu->pc = 0xBFC09168u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09170(CPUState* cpu) { cpu->pc = 0xBFC09170u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09178(CPUState* cpu) { cpu->pc = 0xBFC09178u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09180(CPUState* cpu) { cpu->pc = 0xBFC09180u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC0912C_cont_BFC09190(CPUState* cpu) { cpu->pc = 0xBFC09190u; OpenBIOS_func_1FC0912C(cpu); } void OpenBIOS_func_1FC09198_cont_BFC091B0(CPUState* cpu) { cpu->pc = 0xBFC091B0u; OpenBIOS_func_1FC09198(cpu); } void OpenBIOS_func_1FC09198_cont_BFC091B8(CPUState* cpu) { cpu->pc = 0xBFC091B8u; OpenBIOS_func_1FC09198(cpu); } void OpenBIOS_func_1FC09198_cont_BFC091CC(CPUState* cpu) { cpu->pc = 0xBFC091CCu; OpenBIOS_func_1FC09198(cpu); } void OpenBIOS_func_1FC09198_cont_BFC091D8(CPUState* cpu) { cpu->pc = 0xBFC091D8u; OpenBIOS_func_1FC09198(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09224(CPUState* cpu) { cpu->pc = 0xBFC09224u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0923C(CPUState* cpu) { cpu->pc = 0xBFC0923Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09240(CPUState* cpu) { cpu->pc = 0xBFC09240u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09250(CPUState* cpu) { cpu->pc = 0xBFC09250u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09260(CPUState* cpu) { cpu->pc = 0xBFC09260u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09268(CPUState* cpu) { cpu->pc = 0xBFC09268u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09270(CPUState* cpu) { cpu->pc = 0xBFC09270u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09274(CPUState* cpu) { cpu->pc = 0xBFC09274u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09290(CPUState* cpu) { cpu->pc = 0xBFC09290u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0929C(CPUState* cpu) { cpu->pc = 0xBFC0929Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092A4(CPUState* cpu) { cpu->pc = 0xBFC092A4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092AC(CPUState* cpu) { cpu->pc = 0xBFC092ACu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092B4(CPUState* cpu) { cpu->pc = 0xBFC092B4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092BC(CPUState* cpu) { cpu->pc = 0xBFC092BCu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092C0(CPUState* cpu) { cpu->pc = 0xBFC092C0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092CC(CPUState* cpu) { cpu->pc = 0xBFC092CCu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092D4(CPUState* cpu) { cpu->pc = 0xBFC092D4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092E0(CPUState* cpu) { cpu->pc = 0xBFC092E0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC092F8(CPUState* cpu) { cpu->pc = 0xBFC092F8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09304(CPUState* cpu) { cpu->pc = 0xBFC09304u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09310(CPUState* cpu) { cpu->pc = 0xBFC09310u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09328(CPUState* cpu) { cpu->pc = 0xBFC09328u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09334(CPUState* cpu) { cpu->pc = 0xBFC09334u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09338(CPUState* cpu) { cpu->pc = 0xBFC09338u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09348(CPUState* cpu) { cpu->pc = 0xBFC09348u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0935C(CPUState* cpu) { cpu->pc = 0xBFC0935Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09368(CPUState* cpu) { cpu->pc = 0xBFC09368u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09370(CPUState* cpu) { cpu->pc = 0xBFC09370u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09374(CPUState* cpu) { cpu->pc = 0xBFC09374u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0939C(CPUState* cpu) { cpu->pc = 0xBFC0939Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093B0(CPUState* cpu) { cpu->pc = 0xBFC093B0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093B8(CPUState* cpu) { cpu->pc = 0xBFC093B8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093C0(CPUState* cpu) { cpu->pc = 0xBFC093C0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093CC(CPUState* cpu) { cpu->pc = 0xBFC093CCu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093D4(CPUState* cpu) { cpu->pc = 0xBFC093D4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093DC(CPUState* cpu) { cpu->pc = 0xBFC093DCu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC093E4(CPUState* cpu) { cpu->pc = 0xBFC093E4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09400(CPUState* cpu) { cpu->pc = 0xBFC09400u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09408(CPUState* cpu) { cpu->pc = 0xBFC09408u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09414(CPUState* cpu) { cpu->pc = 0xBFC09414u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0941C(CPUState* cpu) { cpu->pc = 0xBFC0941Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09424(CPUState* cpu) { cpu->pc = 0xBFC09424u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09430(CPUState* cpu) { cpu->pc = 0xBFC09430u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09454(CPUState* cpu) { cpu->pc = 0xBFC09454u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09464(CPUState* cpu) { cpu->pc = 0xBFC09464u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09470(CPUState* cpu) { cpu->pc = 0xBFC09470u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09474(CPUState* cpu) { cpu->pc = 0xBFC09474u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09480(CPUState* cpu) { cpu->pc = 0xBFC09480u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09488(CPUState* cpu) { cpu->pc = 0xBFC09488u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09494(CPUState* cpu) { cpu->pc = 0xBFC09494u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0949C(CPUState* cpu) { cpu->pc = 0xBFC0949Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094A4(CPUState* cpu) { cpu->pc = 0xBFC094A4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094AC(CPUState* cpu) { cpu->pc = 0xBFC094ACu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094C8(CPUState* cpu) { cpu->pc = 0xBFC094C8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094CC(CPUState* cpu) { cpu->pc = 0xBFC094CCu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094E0(CPUState* cpu) { cpu->pc = 0xBFC094E0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094E8(CPUState* cpu) { cpu->pc = 0xBFC094E8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC094F4(CPUState* cpu) { cpu->pc = 0xBFC094F4u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09508(CPUState* cpu) { cpu->pc = 0xBFC09508u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09510(CPUState* cpu) { cpu->pc = 0xBFC09510u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09518(CPUState* cpu) { cpu->pc = 0xBFC09518u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09520(CPUState* cpu) { cpu->pc = 0xBFC09520u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09528(CPUState* cpu) { cpu->pc = 0xBFC09528u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09530(CPUState* cpu) { cpu->pc = 0xBFC09530u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09538(CPUState* cpu) { cpu->pc = 0xBFC09538u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09560(CPUState* cpu) { cpu->pc = 0xBFC09560u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0956C(CPUState* cpu) { cpu->pc = 0xBFC0956Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0957C(CPUState* cpu) { cpu->pc = 0xBFC0957Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09584(CPUState* cpu) { cpu->pc = 0xBFC09584u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC0958C(CPUState* cpu) { cpu->pc = 0xBFC0958Cu; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC09594(CPUState* cpu) { cpu->pc = 0xBFC09594u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095C0(CPUState* cpu) { cpu->pc = 0xBFC095C0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095C8(CPUState* cpu) { cpu->pc = 0xBFC095C8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095D0(CPUState* cpu) { cpu->pc = 0xBFC095D0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095D8(CPUState* cpu) { cpu->pc = 0xBFC095D8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095E8(CPUState* cpu) { cpu->pc = 0xBFC095E8u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC091EC_cont_BFC095F0(CPUState* cpu) { cpu->pc = 0xBFC095F0u; OpenBIOS_func_1FC091EC(cpu); } void OpenBIOS_func_1FC0A500_cont_BFC0A510(CPUState* cpu) { cpu->pc = 0xBFC0A510u; OpenBIOS_func_1FC0A500(cpu); } void OpenBIOS_func_1FC0A500_cont_BFC0A51C(CPUState* cpu) { cpu->pc = 0xBFC0A51Cu; OpenBIOS_func_1FC0A500(cpu); } void OpenBIOS_func_1FC0A500_cont_BFC0A524(CPUState* cpu) { cpu->pc = 0xBFC0A524u; OpenBIOS_func_1FC0A500(cpu); } void OpenBIOS_func_1FC0A500_cont_BFC0A544(CPUState* cpu) { cpu->pc = 0xBFC0A544u; OpenBIOS_func_1FC0A500(cpu); } void OpenBIOS_func_1FC0A500_cont_BFC0A554(CPUState* cpu) { cpu->pc = 0xBFC0A554u; OpenBIOS_func_1FC0A500(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A59C(CPUState* cpu) { cpu->pc = 0xBFC0A59Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A5C8(CPUState* cpu) { cpu->pc = 0xBFC0A5C8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A5CC(CPUState* cpu) { cpu->pc = 0xBFC0A5CCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A5D8(CPUState* cpu) { cpu->pc = 0xBFC0A5D8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A5E8(CPUState* cpu) { cpu->pc = 0xBFC0A5E8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A5EC(CPUState* cpu) { cpu->pc = 0xBFC0A5ECu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A62C(CPUState* cpu) { cpu->pc = 0xBFC0A62Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A634(CPUState* cpu) { cpu->pc = 0xBFC0A634u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A63C(CPUState* cpu) { cpu->pc = 0xBFC0A63Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A644(CPUState* cpu) { cpu->pc = 0xBFC0A644u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A668(CPUState* cpu) { cpu->pc = 0xBFC0A668u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A680(CPUState* cpu) { cpu->pc = 0xBFC0A680u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A690(CPUState* cpu) { cpu->pc = 0xBFC0A690u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6A8(CPUState* cpu) { cpu->pc = 0xBFC0A6A8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6B0(CPUState* cpu) { cpu->pc = 0xBFC0A6B0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6CC(CPUState* cpu) { cpu->pc = 0xBFC0A6CCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6D0(CPUState* cpu) { cpu->pc = 0xBFC0A6D0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6D4(CPUState* cpu) { cpu->pc = 0xBFC0A6D4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6E8(CPUState* cpu) { cpu->pc = 0xBFC0A6E8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A6F8(CPUState* cpu) { cpu->pc = 0xBFC0A6F8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A70C(CPUState* cpu) { cpu->pc = 0xBFC0A70Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A710(CPUState* cpu) { cpu->pc = 0xBFC0A710u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A720(CPUState* cpu) { cpu->pc = 0xBFC0A720u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A728(CPUState* cpu) { cpu->pc = 0xBFC0A728u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A760(CPUState* cpu) { cpu->pc = 0xBFC0A760u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A778(CPUState* cpu) { cpu->pc = 0xBFC0A778u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A77C(CPUState* cpu) { cpu->pc = 0xBFC0A77Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A780(CPUState* cpu) { cpu->pc = 0xBFC0A780u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A78C(CPUState* cpu) { cpu->pc = 0xBFC0A78Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7A4(CPUState* cpu) { cpu->pc = 0xBFC0A7A4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7AC(CPUState* cpu) { cpu->pc = 0xBFC0A7ACu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7C4(CPUState* cpu) { cpu->pc = 0xBFC0A7C4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7C8(CPUState* cpu) { cpu->pc = 0xBFC0A7C8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7D8(CPUState* cpu) { cpu->pc = 0xBFC0A7D8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7EC(CPUState* cpu) { cpu->pc = 0xBFC0A7ECu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A7F8(CPUState* cpu) { cpu->pc = 0xBFC0A7F8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A800(CPUState* cpu) { cpu->pc = 0xBFC0A800u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A810(CPUState* cpu) { cpu->pc = 0xBFC0A810u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A814(CPUState* cpu) { cpu->pc = 0xBFC0A814u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A858(CPUState* cpu) { cpu->pc = 0xBFC0A858u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A85C(CPUState* cpu) { cpu->pc = 0xBFC0A85Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A880(CPUState* cpu) { cpu->pc = 0xBFC0A880u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A88C(CPUState* cpu) { cpu->pc = 0xBFC0A88Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A8B0(CPUState* cpu) { cpu->pc = 0xBFC0A8B0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A8C4(CPUState* cpu) { cpu->pc = 0xBFC0A8C4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A8D0(CPUState* cpu) { cpu->pc = 0xBFC0A8D0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A8E4(CPUState* cpu) { cpu->pc = 0xBFC0A8E4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A908(CPUState* cpu) { cpu->pc = 0xBFC0A908u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A910(CPUState* cpu) { cpu->pc = 0xBFC0A910u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A934(CPUState* cpu) { cpu->pc = 0xBFC0A934u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A940(CPUState* cpu) { cpu->pc = 0xBFC0A940u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A948(CPUState* cpu) { cpu->pc = 0xBFC0A948u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A950(CPUState* cpu) { cpu->pc = 0xBFC0A950u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A958(CPUState* cpu) { cpu->pc = 0xBFC0A958u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A968(CPUState* cpu) { cpu->pc = 0xBFC0A968u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A974(CPUState* cpu) { cpu->pc = 0xBFC0A974u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A97C(CPUState* cpu) { cpu->pc = 0xBFC0A97Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A98C(CPUState* cpu) { cpu->pc = 0xBFC0A98Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A990(CPUState* cpu) { cpu->pc = 0xBFC0A990u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A99C(CPUState* cpu) { cpu->pc = 0xBFC0A99Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A9A8(CPUState* cpu) { cpu->pc = 0xBFC0A9A8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A9BC(CPUState* cpu) { cpu->pc = 0xBFC0A9BCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A9EC(CPUState* cpu) { cpu->pc = 0xBFC0A9ECu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0A9F0(CPUState* cpu) { cpu->pc = 0xBFC0A9F0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AA34(CPUState* cpu) { cpu->pc = 0xBFC0AA34u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AA54(CPUState* cpu) { cpu->pc = 0xBFC0AA54u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AA68(CPUState* cpu) { cpu->pc = 0xBFC0AA68u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AA84(CPUState* cpu) { cpu->pc = 0xBFC0AA84u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AA88(CPUState* cpu) { cpu->pc = 0xBFC0AA88u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AAC0(CPUState* cpu) { cpu->pc = 0xBFC0AAC0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AACC(CPUState* cpu) { cpu->pc = 0xBFC0AACCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AAD4(CPUState* cpu) { cpu->pc = 0xBFC0AAD4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AAEC(CPUState* cpu) { cpu->pc = 0xBFC0AAECu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AAF0(CPUState* cpu) { cpu->pc = 0xBFC0AAF0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AAF4(CPUState* cpu) { cpu->pc = 0xBFC0AAF4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB00(CPUState* cpu) { cpu->pc = 0xBFC0AB00u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB10(CPUState* cpu) { cpu->pc = 0xBFC0AB10u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB20(CPUState* cpu) { cpu->pc = 0xBFC0AB20u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB2C(CPUState* cpu) { cpu->pc = 0xBFC0AB2Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB34(CPUState* cpu) { cpu->pc = 0xBFC0AB34u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB40(CPUState* cpu) { cpu->pc = 0xBFC0AB40u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB4C(CPUState* cpu) { cpu->pc = 0xBFC0AB4Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AB54(CPUState* cpu) { cpu->pc = 0xBFC0AB54u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ABAC(CPUState* cpu) { cpu->pc = 0xBFC0ABACu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ABC4(CPUState* cpu) { cpu->pc = 0xBFC0ABC4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ABD8(CPUState* cpu) { cpu->pc = 0xBFC0ABD8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ABFC(CPUState* cpu) { cpu->pc = 0xBFC0ABFCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC10(CPUState* cpu) { cpu->pc = 0xBFC0AC10u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC24(CPUState* cpu) { cpu->pc = 0xBFC0AC24u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC38(CPUState* cpu) { cpu->pc = 0xBFC0AC38u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC40(CPUState* cpu) { cpu->pc = 0xBFC0AC40u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC48(CPUState* cpu) { cpu->pc = 0xBFC0AC48u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC50(CPUState* cpu) { cpu->pc = 0xBFC0AC50u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC54(CPUState* cpu) { cpu->pc = 0xBFC0AC54u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC5C(CPUState* cpu) { cpu->pc = 0xBFC0AC5Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC64(CPUState* cpu) { cpu->pc = 0xBFC0AC64u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC70(CPUState* cpu) { cpu->pc = 0xBFC0AC70u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC78(CPUState* cpu) { cpu->pc = 0xBFC0AC78u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC80(CPUState* cpu) { cpu->pc = 0xBFC0AC80u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC88(CPUState* cpu) { cpu->pc = 0xBFC0AC88u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC98(CPUState* cpu) { cpu->pc = 0xBFC0AC98u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AC9C(CPUState* cpu) { cpu->pc = 0xBFC0AC9Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ACD0(CPUState* cpu) { cpu->pc = 0xBFC0ACD0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ACD8(CPUState* cpu) { cpu->pc = 0xBFC0ACD8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AD18(CPUState* cpu) { cpu->pc = 0xBFC0AD18u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AD20(CPUState* cpu) { cpu->pc = 0xBFC0AD20u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AD74(CPUState* cpu) { cpu->pc = 0xBFC0AD74u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AD8C(CPUState* cpu) { cpu->pc = 0xBFC0AD8Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ADA8(CPUState* cpu) { cpu->pc = 0xBFC0ADA8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ADBC(CPUState* cpu) { cpu->pc = 0xBFC0ADBCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ADD0(CPUState* cpu) { cpu->pc = 0xBFC0ADD0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ADE0(CPUState* cpu) { cpu->pc = 0xBFC0ADE0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0ADF0(CPUState* cpu) { cpu->pc = 0xBFC0ADF0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AE6C(CPUState* cpu) { cpu->pc = 0xBFC0AE6Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AE78(CPUState* cpu) { cpu->pc = 0xBFC0AE78u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AE80(CPUState* cpu) { cpu->pc = 0xBFC0AE80u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AE88(CPUState* cpu) { cpu->pc = 0xBFC0AE88u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AE94(CPUState* cpu) { cpu->pc = 0xBFC0AE94u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEA0(CPUState* cpu) { cpu->pc = 0xBFC0AEA0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEA8(CPUState* cpu) { cpu->pc = 0xBFC0AEA8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEB0(CPUState* cpu) { cpu->pc = 0xBFC0AEB0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEBC(CPUState* cpu) { cpu->pc = 0xBFC0AEBCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEC8(CPUState* cpu) { cpu->pc = 0xBFC0AEC8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AED0(CPUState* cpu) { cpu->pc = 0xBFC0AED0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AED8(CPUState* cpu) { cpu->pc = 0xBFC0AED8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEE0(CPUState* cpu) { cpu->pc = 0xBFC0AEE0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEE8(CPUState* cpu) { cpu->pc = 0xBFC0AEE8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEF0(CPUState* cpu) { cpu->pc = 0xBFC0AEF0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEF4(CPUState* cpu) { cpu->pc = 0xBFC0AEF4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AEFC(CPUState* cpu) { cpu->pc = 0xBFC0AEFCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF04(CPUState* cpu) { cpu->pc = 0xBFC0AF04u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF0C(CPUState* cpu) { cpu->pc = 0xBFC0AF0Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF10(CPUState* cpu) { cpu->pc = 0xBFC0AF10u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF18(CPUState* cpu) { cpu->pc = 0xBFC0AF18u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF20(CPUState* cpu) { cpu->pc = 0xBFC0AF20u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF28(CPUState* cpu) { cpu->pc = 0xBFC0AF28u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF30(CPUState* cpu) { cpu->pc = 0xBFC0AF30u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF3C(CPUState* cpu) { cpu->pc = 0xBFC0AF3Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF48(CPUState* cpu) { cpu->pc = 0xBFC0AF48u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF54(CPUState* cpu) { cpu->pc = 0xBFC0AF54u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF60(CPUState* cpu) { cpu->pc = 0xBFC0AF60u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF6C(CPUState* cpu) { cpu->pc = 0xBFC0AF6Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF78(CPUState* cpu) { cpu->pc = 0xBFC0AF78u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AF90(CPUState* cpu) { cpu->pc = 0xBFC0AF90u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AFD8(CPUState* cpu) { cpu->pc = 0xBFC0AFD8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AFE8(CPUState* cpu) { cpu->pc = 0xBFC0AFE8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0AFFC(CPUState* cpu) { cpu->pc = 0xBFC0AFFCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B014(CPUState* cpu) { cpu->pc = 0xBFC0B014u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B01C(CPUState* cpu) { cpu->pc = 0xBFC0B01Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B024(CPUState* cpu) { cpu->pc = 0xBFC0B024u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B028(CPUState* cpu) { cpu->pc = 0xBFC0B028u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B038(CPUState* cpu) { cpu->pc = 0xBFC0B038u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B040(CPUState* cpu) { cpu->pc = 0xBFC0B040u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B048(CPUState* cpu) { cpu->pc = 0xBFC0B048u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B050(CPUState* cpu) { cpu->pc = 0xBFC0B050u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B09C(CPUState* cpu) { cpu->pc = 0xBFC0B09Cu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0A4(CPUState* cpu) { cpu->pc = 0xBFC0B0A4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0D4(CPUState* cpu) { cpu->pc = 0xBFC0B0D4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0DC(CPUState* cpu) { cpu->pc = 0xBFC0B0DCu; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0E4(CPUState* cpu) { cpu->pc = 0xBFC0B0E4u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0F0(CPUState* cpu) { cpu->pc = 0xBFC0B0F0u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B0F8(CPUState* cpu) { cpu->pc = 0xBFC0B0F8u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B108(CPUState* cpu) { cpu->pc = 0xBFC0B108u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B110(CPUState* cpu) { cpu->pc = 0xBFC0B110u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B124(CPUState* cpu) { cpu->pc = 0xBFC0B124u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B130(CPUState* cpu) { cpu->pc = 0xBFC0B130u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B138(CPUState* cpu) { cpu->pc = 0xBFC0B138u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B144(CPUState* cpu) { cpu->pc = 0xBFC0B144u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B150(CPUState* cpu) { cpu->pc = 0xBFC0B150u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0A564_cont_BFC0B158(CPUState* cpu) { cpu->pc = 0xBFC0B158u; OpenBIOS_func_1FC0A564(cpu); } void OpenBIOS_func_1FC0B160_cont_BFC0B16C(CPUState* cpu) { cpu->pc = 0xBFC0B16Cu; OpenBIOS_func_1FC0B160(cpu); } void OpenBIOS_func_1FC0B160_cont_BFC0B174(CPUState* cpu) { cpu->pc = 0xBFC0B174u; OpenBIOS_func_1FC0B160(cpu); } void OpenBIOS_func_1FC0B160_cont_BFC0B17C(CPUState* cpu) { cpu->pc = 0xBFC0B17Cu; OpenBIOS_func_1FC0B160(cpu); } void OpenBIOS_func_1FC0B250_cont_BFC0B264(CPUState* cpu) { cpu->pc = 0xBFC0B264u; OpenBIOS_func_1FC0B250(cpu); } void OpenBIOS_func_1FC0B250_cont_BFC0B278(CPUState* cpu) { cpu->pc = 0xBFC0B278u; OpenBIOS_func_1FC0B250(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B2E0(CPUState* cpu) { cpu->pc = 0xBFC0B2E0u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B2EC(CPUState* cpu) { cpu->pc = 0xBFC0B2ECu; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B2F4(CPUState* cpu) { cpu->pc = 0xBFC0B2F4u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B308(CPUState* cpu) { cpu->pc = 0xBFC0B308u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B324(CPUState* cpu) { cpu->pc = 0xBFC0B324u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B328(CPUState* cpu) { cpu->pc = 0xBFC0B328u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B32C(CPUState* cpu) { cpu->pc = 0xBFC0B32Cu; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B33C(CPUState* cpu) { cpu->pc = 0xBFC0B33Cu; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B344(CPUState* cpu) { cpu->pc = 0xBFC0B344u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B34C(CPUState* cpu) { cpu->pc = 0xBFC0B34Cu; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B35C(CPUState* cpu) { cpu->pc = 0xBFC0B35Cu; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B2B0_cont_BFC0B368(CPUState* cpu) { cpu->pc = 0xBFC0B368u; OpenBIOS_func_1FC0B2B0(cpu); } void OpenBIOS_func_1FC0B39C_cont_BFC0B3B4(CPUState* cpu) { cpu->pc = 0xBFC0B3B4u; OpenBIOS_func_1FC0B39C(cpu); } void OpenBIOS_func_1FC0B39C_cont_BFC0B3D4(CPUState* cpu) { cpu->pc = 0xBFC0B3D4u; OpenBIOS_func_1FC0B39C(cpu); } void OpenBIOS_func_1FC0B3E0_cont_BFC0B3EC(CPUState* cpu) { cpu->pc = 0xBFC0B3ECu; OpenBIOS_func_1FC0B3E0(cpu); } void OpenBIOS_func_1FC0B410_cont_BFC0B430(CPUState* cpu) { cpu->pc = 0xBFC0B430u; OpenBIOS_func_1FC0B410(cpu); } void OpenBIOS_func_1FC0B410_cont_BFC0B43C(CPUState* cpu) { cpu->pc = 0xBFC0B43Cu; OpenBIOS_func_1FC0B410(cpu); } void OpenBIOS_func_1FC0B410_cont_BFC0B448(CPUState* cpu) { cpu->pc = 0xBFC0B448u; OpenBIOS_func_1FC0B410(cpu); } void OpenBIOS_func_1FC0B410_cont_BFC0B454(CPUState* cpu) { cpu->pc = 0xBFC0B454u; OpenBIOS_func_1FC0B410(cpu); } void OpenBIOS_func_1FC0B410_cont_BFC0B468(CPUState* cpu) { cpu->pc = 0xBFC0B468u; OpenBIOS_func_1FC0B410(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4A4(CPUState* cpu) { cpu->pc = 0xBFC0B4A4u; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4AC(CPUState* cpu) { cpu->pc = 0xBFC0B4ACu; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4B4(CPUState* cpu) { cpu->pc = 0xBFC0B4B4u; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4BC(CPUState* cpu) { cpu->pc = 0xBFC0B4BCu; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4C4(CPUState* cpu) { cpu->pc = 0xBFC0B4C4u; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B484_cont_BFC0B4C8(CPUState* cpu) { cpu->pc = 0xBFC0B4C8u; OpenBIOS_func_1FC0B484(cpu); } void OpenBIOS_func_1FC0B4D0_cont_BFC0B4F8(CPUState* cpu) { cpu->pc = 0xBFC0B4F8u; OpenBIOS_func_1FC0B4D0(cpu); } void OpenBIOS_func_1FC0B514_cont_BFC0B530(CPUState* cpu) { cpu->pc = 0xBFC0B530u; OpenBIOS_func_1FC0B514(cpu); } void OpenBIOS_func_1FC0B538_cont_BFC0B548(CPUState* cpu) { cpu->pc = 0xBFC0B548u; OpenBIOS_func_1FC0B538(cpu); } void OpenBIOS_func_1FC0B558_cont_BFC0B568(CPUState* cpu) { cpu->pc = 0xBFC0B568u; OpenBIOS_func_1FC0B558(cpu); } void OpenBIOS_func_1FC0B558_cont_BFC0B578(CPUState* cpu) { cpu->pc = 0xBFC0B578u; OpenBIOS_func_1FC0B558(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5AC(CPUState* cpu) { cpu->pc = 0xBFC0B5ACu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5BC(CPUState* cpu) { cpu->pc = 0xBFC0B5BCu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5CC(CPUState* cpu) { cpu->pc = 0xBFC0B5CCu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5DC(CPUState* cpu) { cpu->pc = 0xBFC0B5DCu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5EC(CPUState* cpu) { cpu->pc = 0xBFC0B5ECu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B5FC(CPUState* cpu) { cpu->pc = 0xBFC0B5FCu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B604(CPUState* cpu) { cpu->pc = 0xBFC0B604u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B60C(CPUState* cpu) { cpu->pc = 0xBFC0B60Cu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B634(CPUState* cpu) { cpu->pc = 0xBFC0B634u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B638(CPUState* cpu) { cpu->pc = 0xBFC0B638u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B654(CPUState* cpu) { cpu->pc = 0xBFC0B654u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B658(CPUState* cpu) { cpu->pc = 0xBFC0B658u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B674(CPUState* cpu) { cpu->pc = 0xBFC0B674u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B678(CPUState* cpu) { cpu->pc = 0xBFC0B678u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B68C(CPUState* cpu) { cpu->pc = 0xBFC0B68Cu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B690(CPUState* cpu) { cpu->pc = 0xBFC0B690u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B6A0(CPUState* cpu) { cpu->pc = 0xBFC0B6A0u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B6A4(CPUState* cpu) { cpu->pc = 0xBFC0B6A4u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B6B8(CPUState* cpu) { cpu->pc = 0xBFC0B6B8u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B6BC(CPUState* cpu) { cpu->pc = 0xBFC0B6BCu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B6F0(CPUState* cpu) { cpu->pc = 0xBFC0B6F0u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B700(CPUState* cpu) { cpu->pc = 0xBFC0B700u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B70C(CPUState* cpu) { cpu->pc = 0xBFC0B70Cu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B718(CPUState* cpu) { cpu->pc = 0xBFC0B718u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B71C(CPUState* cpu) { cpu->pc = 0xBFC0B71Cu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B734(CPUState* cpu) { cpu->pc = 0xBFC0B734u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B73C(CPUState* cpu) { cpu->pc = 0xBFC0B73Cu; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B744(CPUState* cpu) { cpu->pc = 0xBFC0B744u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B594_cont_BFC0B750(CPUState* cpu) { cpu->pc = 0xBFC0B750u; OpenBIOS_func_1FC0B594(cpu); } void OpenBIOS_func_1FC0B760_cont_BFC0B780(CPUState* cpu) { cpu->pc = 0xBFC0B780u; OpenBIOS_func_1FC0B760(cpu); } void OpenBIOS_func_1FC0B760_cont_BFC0B790(CPUState* cpu) { cpu->pc = 0xBFC0B790u; OpenBIOS_func_1FC0B760(cpu); } void OpenBIOS_func_1FC0B760_cont_BFC0B798(CPUState* cpu) { cpu->pc = 0xBFC0B798u; OpenBIOS_func_1FC0B760(cpu); } void OpenBIOS_func_1FC0B7A0_cont_BFC0B7B8(CPUState* cpu) { cpu->pc = 0xBFC0B7B8u; OpenBIOS_func_1FC0B7A0(cpu); } void OpenBIOS_func_1FC0B844_cont_BFC0B858(CPUState* cpu) { cpu->pc = 0xBFC0B858u; OpenBIOS_func_1FC0B844(cpu); } void OpenBIOS_func_1FC0B888_cont_BFC0B8BC(CPUState* cpu) { cpu->pc = 0xBFC0B8BCu; OpenBIOS_func_1FC0B888(cpu); } void OpenBIOS_func_1FC0B888_cont_BFC0B8C4(CPUState* cpu) { cpu->pc = 0xBFC0B8C4u; OpenBIOS_func_1FC0B888(cpu); } void OpenBIOS_func_1FC0B8CC_cont_BFC0B8EC(CPUState* cpu) { cpu->pc = 0xBFC0B8ECu; OpenBIOS_func_1FC0B8CC(cpu); } void OpenBIOS_func_1FC0B8CC_cont_BFC0B920(CPUState* cpu) { cpu->pc = 0xBFC0B920u; OpenBIOS_func_1FC0B8CC(cpu); } void OpenBIOS_func_1FC0B928_cont_BFC0B930(CPUState* cpu) { cpu->pc = 0xBFC0B930u; OpenBIOS_func_1FC0B928(cpu); } void OpenBIOS_func_1FC0B928_cont_BFC0B944(CPUState* cpu) { cpu->pc = 0xBFC0B944u; OpenBIOS_func_1FC0B928(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B95C(CPUState* cpu) { cpu->pc = 0xBFC0B95Cu; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B978(CPUState* cpu) { cpu->pc = 0xBFC0B978u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B97C(CPUState* cpu) { cpu->pc = 0xBFC0B97Cu; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B99C(CPUState* cpu) { cpu->pc = 0xBFC0B99Cu; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B9A0(CPUState* cpu) { cpu->pc = 0xBFC0B9A0u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B9B0(CPUState* cpu) { cpu->pc = 0xBFC0B9B0u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B9D0(CPUState* cpu) { cpu->pc = 0xBFC0B9D0u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0B9F0(CPUState* cpu) { cpu->pc = 0xBFC0B9F0u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0BA0C(CPUState* cpu) { cpu->pc = 0xBFC0BA0Cu; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0BA40(CPUState* cpu) { cpu->pc = 0xBFC0BA40u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0BA50(CPUState* cpu) { cpu->pc = 0xBFC0BA50u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0BA5C(CPUState* cpu) { cpu->pc = 0xBFC0BA5Cu; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0B94C_cont_BFC0BA70(CPUState* cpu) { cpu->pc = 0xBFC0BA70u; OpenBIOS_func_1FC0B94C(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BAC4(CPUState* cpu) { cpu->pc = 0xBFC0BAC4u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BADC(CPUState* cpu) { cpu->pc = 0xBFC0BADCu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BAE0(CPUState* cpu) { cpu->pc = 0xBFC0BAE0u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BAF4(CPUState* cpu) { cpu->pc = 0xBFC0BAF4u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BAFC(CPUState* cpu) { cpu->pc = 0xBFC0BAFCu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB04(CPUState* cpu) { cpu->pc = 0xBFC0BB04u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB10(CPUState* cpu) { cpu->pc = 0xBFC0BB10u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB24(CPUState* cpu) { cpu->pc = 0xBFC0BB24u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB38(CPUState* cpu) { cpu->pc = 0xBFC0BB38u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB4C(CPUState* cpu) { cpu->pc = 0xBFC0BB4Cu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB64(CPUState* cpu) { cpu->pc = 0xBFC0BB64u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB6C(CPUState* cpu) { cpu->pc = 0xBFC0BB6Cu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB74(CPUState* cpu) { cpu->pc = 0xBFC0BB74u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB7C(CPUState* cpu) { cpu->pc = 0xBFC0BB7Cu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB84(CPUState* cpu) { cpu->pc = 0xBFC0BB84u; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BAA8_cont_BFC0BB8C(CPUState* cpu) { cpu->pc = 0xBFC0BB8Cu; OpenBIOS_func_1FC0BAA8(cpu); } void OpenBIOS_func_1FC0BB94_cont_BFC0BBE8(CPUState* cpu) { cpu->pc = 0xBFC0BBE8u; OpenBIOS_func_1FC0BB94(cpu); } void OpenBIOS_func_1FC0BB94_cont_BFC0BBF8(CPUState* cpu) { cpu->pc = 0xBFC0BBF8u; OpenBIOS_func_1FC0BB94(cpu); } void OpenBIOS_func_1FC0BB94_cont_BFC0BC0C(CPUState* cpu) { cpu->pc = 0xBFC0BC0Cu; OpenBIOS_func_1FC0BB94(cpu); } void OpenBIOS_func_1FC0BC24_cont_BFC0BC74(CPUState* cpu) { cpu->pc = 0xBFC0BC74u; OpenBIOS_func_1FC0BC24(cpu); } void OpenBIOS_func_1FC0BC24_cont_BFC0BC7C(CPUState* cpu) { cpu->pc = 0xBFC0BC7Cu; OpenBIOS_func_1FC0BC24(cpu); } void OpenBIOS_func_1FC0BC24_cont_BFC0BC80(CPUState* cpu) { cpu->pc = 0xBFC0BC80u; OpenBIOS_func_1FC0BC24(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BC90(CPUState* cpu) { cpu->pc = 0xBFC0BC90u; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BCCC(CPUState* cpu) { cpu->pc = 0xBFC0BCCCu; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BCD4(CPUState* cpu) { cpu->pc = 0xBFC0BCD4u; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BD50(CPUState* cpu) { cpu->pc = 0xBFC0BD50u; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BD54(CPUState* cpu) { cpu->pc = 0xBFC0BD54u; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BC88_cont_BFC0BD64(CPUState* cpu) { cpu->pc = 0xBFC0BD64u; OpenBIOS_func_1FC0BC88(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BD9C(CPUState* cpu) { cpu->pc = 0xBFC0BD9Cu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDA8(CPUState* cpu) { cpu->pc = 0xBFC0BDA8u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDCC(CPUState* cpu) { cpu->pc = 0xBFC0BDCCu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDD4(CPUState* cpu) { cpu->pc = 0xBFC0BDD4u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDE4(CPUState* cpu) { cpu->pc = 0xBFC0BDE4u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDEC(CPUState* cpu) { cpu->pc = 0xBFC0BDECu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BDF4(CPUState* cpu) { cpu->pc = 0xBFC0BDF4u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE1C(CPUState* cpu) { cpu->pc = 0xBFC0BE1Cu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE24(CPUState* cpu) { cpu->pc = 0xBFC0BE24u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE2C(CPUState* cpu) { cpu->pc = 0xBFC0BE2Cu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE30(CPUState* cpu) { cpu->pc = 0xBFC0BE30u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE3C(CPUState* cpu) { cpu->pc = 0xBFC0BE3Cu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE50(CPUState* cpu) { cpu->pc = 0xBFC0BE50u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE60(CPUState* cpu) { cpu->pc = 0xBFC0BE60u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE64(CPUState* cpu) { cpu->pc = 0xBFC0BE64u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE70(CPUState* cpu) { cpu->pc = 0xBFC0BE70u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE84(CPUState* cpu) { cpu->pc = 0xBFC0BE84u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE8C(CPUState* cpu) { cpu->pc = 0xBFC0BE8Cu; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE90(CPUState* cpu) { cpu->pc = 0xBFC0BE90u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BE98(CPUState* cpu) { cpu->pc = 0xBFC0BE98u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BD6C_cont_BFC0BEA4(CPUState* cpu) { cpu->pc = 0xBFC0BEA4u; OpenBIOS_func_1FC0BD6C(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BEE4(CPUState* cpu) { cpu->pc = 0xBFC0BEE4u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BEF0(CPUState* cpu) { cpu->pc = 0xBFC0BEF0u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF24(CPUState* cpu) { cpu->pc = 0xBFC0BF24u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF2C(CPUState* cpu) { cpu->pc = 0xBFC0BF2Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF30(CPUState* cpu) { cpu->pc = 0xBFC0BF30u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF34(CPUState* cpu) { cpu->pc = 0xBFC0BF34u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF40(CPUState* cpu) { cpu->pc = 0xBFC0BF40u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF4C(CPUState* cpu) { cpu->pc = 0xBFC0BF4Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF94(CPUState* cpu) { cpu->pc = 0xBFC0BF94u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BF9C(CPUState* cpu) { cpu->pc = 0xBFC0BF9Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFA4(CPUState* cpu) { cpu->pc = 0xBFC0BFA4u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFB8(CPUState* cpu) { cpu->pc = 0xBFC0BFB8u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFC0(CPUState* cpu) { cpu->pc = 0xBFC0BFC0u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFDC(CPUState* cpu) { cpu->pc = 0xBFC0BFDCu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFE8(CPUState* cpu) { cpu->pc = 0xBFC0BFE8u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFF4(CPUState* cpu) { cpu->pc = 0xBFC0BFF4u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0BFFC(CPUState* cpu) { cpu->pc = 0xBFC0BFFCu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C000(CPUState* cpu) { cpu->pc = 0xBFC0C000u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C00C(CPUState* cpu) { cpu->pc = 0xBFC0C00Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C03C(CPUState* cpu) { cpu->pc = 0xBFC0C03Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C044(CPUState* cpu) { cpu->pc = 0xBFC0C044u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C064(CPUState* cpu) { cpu->pc = 0xBFC0C064u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C06C(CPUState* cpu) { cpu->pc = 0xBFC0C06Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C09C(CPUState* cpu) { cpu->pc = 0xBFC0C09Cu; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C0A4(CPUState* cpu) { cpu->pc = 0xBFC0C0A4u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C0C4(CPUState* cpu) { cpu->pc = 0xBFC0C0C4u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0BEAC_cont_BFC0C0C8(CPUState* cpu) { cpu->pc = 0xBFC0C0C8u; OpenBIOS_func_1FC0BEAC(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C19C(CPUState* cpu) { cpu->pc = 0xBFC0C19Cu; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C1A8(CPUState* cpu) { cpu->pc = 0xBFC0C1A8u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C1B4(CPUState* cpu) { cpu->pc = 0xBFC0C1B4u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C1BC(CPUState* cpu) { cpu->pc = 0xBFC0C1BCu; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C1D4(CPUState* cpu) { cpu->pc = 0xBFC0C1D4u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C1F4(CPUState* cpu) { cpu->pc = 0xBFC0C1F4u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C210(CPUState* cpu) { cpu->pc = 0xBFC0C210u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C240(CPUState* cpu) { cpu->pc = 0xBFC0C240u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C110_cont_BFC0C280(CPUState* cpu) { cpu->pc = 0xBFC0C280u; OpenBIOS_func_1FC0C110(cpu); } void OpenBIOS_func_1FC0C2AC_cont_BFC0C2BC(CPUState* cpu) { cpu->pc = 0xBFC0C2BCu; OpenBIOS_func_1FC0C2AC(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C368(CPUState* cpu) { cpu->pc = 0xBFC0C368u; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C37C(CPUState* cpu) { cpu->pc = 0xBFC0C37Cu; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C388(CPUState* cpu) { cpu->pc = 0xBFC0C388u; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C38C(CPUState* cpu) { cpu->pc = 0xBFC0C38Cu; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C3A0(CPUState* cpu) { cpu->pc = 0xBFC0C3A0u; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C3AC(CPUState* cpu) { cpu->pc = 0xBFC0C3ACu; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C354_cont_BFC0C3B4(CPUState* cpu) { cpu->pc = 0xBFC0C3B4u; OpenBIOS_func_1FC0C354(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C3DC(CPUState* cpu) { cpu->pc = 0xBFC0C3DCu; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C3E0(CPUState* cpu) { cpu->pc = 0xBFC0C3E0u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C3E8(CPUState* cpu) { cpu->pc = 0xBFC0C3E8u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C3F4(CPUState* cpu) { cpu->pc = 0xBFC0C3F4u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C400(CPUState* cpu) { cpu->pc = 0xBFC0C400u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C408(CPUState* cpu) { cpu->pc = 0xBFC0C408u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C410(CPUState* cpu) { cpu->pc = 0xBFC0C410u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C434(CPUState* cpu) { cpu->pc = 0xBFC0C434u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C438(CPUState* cpu) { cpu->pc = 0xBFC0C438u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C448(CPUState* cpu) { cpu->pc = 0xBFC0C448u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C450(CPUState* cpu) { cpu->pc = 0xBFC0C450u; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0C3C0_cont_BFC0C47C(CPUState* cpu) { cpu->pc = 0xBFC0C47Cu; OpenBIOS_func_1FC0C3C0(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB28(CPUState* cpu) { cpu->pc = 0xBFC0CB28u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB30(CPUState* cpu) { cpu->pc = 0xBFC0CB30u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB38(CPUState* cpu) { cpu->pc = 0xBFC0CB38u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB40(CPUState* cpu) { cpu->pc = 0xBFC0CB40u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB54(CPUState* cpu) { cpu->pc = 0xBFC0CB54u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB5C(CPUState* cpu) { cpu->pc = 0xBFC0CB5Cu; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB60(CPUState* cpu) { cpu->pc = 0xBFC0CB60u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB78(CPUState* cpu) { cpu->pc = 0xBFC0CB78u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB84(CPUState* cpu) { cpu->pc = 0xBFC0CB84u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CB88(CPUState* cpu) { cpu->pc = 0xBFC0CB88u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBA4(CPUState* cpu) { cpu->pc = 0xBFC0CBA4u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBAC(CPUState* cpu) { cpu->pc = 0xBFC0CBACu; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBB4(CPUState* cpu) { cpu->pc = 0xBFC0CBB4u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBBC(CPUState* cpu) { cpu->pc = 0xBFC0CBBCu; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBC4(CPUState* cpu) { cpu->pc = 0xBFC0CBC4u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBCC(CPUState* cpu) { cpu->pc = 0xBFC0CBCCu; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBD4(CPUState* cpu) { cpu->pc = 0xBFC0CBD4u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBD8(CPUState* cpu) { cpu->pc = 0xBFC0CBD8u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBE0(CPUState* cpu) { cpu->pc = 0xBFC0CBE0u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBE8(CPUState* cpu) { cpu->pc = 0xBFC0CBE8u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CBF0(CPUState* cpu) { cpu->pc = 0xBFC0CBF0u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CC08(CPUState* cpu) { cpu->pc = 0xBFC0CC08u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CC0C(CPUState* cpu) { cpu->pc = 0xBFC0CC0Cu; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CB20_cont_BFC0CC30(CPUState* cpu) { cpu->pc = 0xBFC0CC30u; OpenBIOS_func_1FC0CB20(cpu); } void OpenBIOS_func_1FC0CC40_cont_BFC0CC70(CPUState* cpu) { cpu->pc = 0xBFC0CC70u; OpenBIOS_func_1FC0CC40(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CCCC(CPUState* cpu) { cpu->pc = 0xBFC0CCCCu; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CCD4(CPUState* cpu) { cpu->pc = 0xBFC0CCD4u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD00(CPUState* cpu) { cpu->pc = 0xBFC0CD00u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD10(CPUState* cpu) { cpu->pc = 0xBFC0CD10u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD18(CPUState* cpu) { cpu->pc = 0xBFC0CD18u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD1C(CPUState* cpu) { cpu->pc = 0xBFC0CD1Cu; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD38(CPUState* cpu) { cpu->pc = 0xBFC0CD38u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD48(CPUState* cpu) { cpu->pc = 0xBFC0CD48u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD58(CPUState* cpu) { cpu->pc = 0xBFC0CD58u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CC98_cont_BFC0CD64(CPUState* cpu) { cpu->pc = 0xBFC0CD64u; OpenBIOS_func_1FC0CC98(cpu); } void OpenBIOS_func_1FC0CD8C_cont_BFC0CDA0(CPUState* cpu) { cpu->pc = 0xBFC0CDA0u; OpenBIOS_func_1FC0CD8C(cpu); } void OpenBIOS_func_1FC0CD8C_cont_BFC0CDB0(CPUState* cpu) { cpu->pc = 0xBFC0CDB0u; OpenBIOS_func_1FC0CD8C(cpu); } void OpenBIOS_func_1FC0CD8C_cont_BFC0CDB8(CPUState* cpu) { cpu->pc = 0xBFC0CDB8u; OpenBIOS_func_1FC0CD8C(cpu); } void OpenBIOS_func_1FC0CD8C_cont_BFC0CDCC(CPUState* cpu) { cpu->pc = 0xBFC0CDCCu; OpenBIOS_func_1FC0CD8C(cpu); } void OpenBIOS_func_1FC0CD8C_cont_BFC0CDE4(CPUState* cpu) { cpu->pc = 0xBFC0CDE4u; OpenBIOS_func_1FC0CD8C(cpu); } void OpenBIOS_func_1FC0CDEC_cont_BFC0CE00(CPUState* cpu) { cpu->pc = 0xBFC0CE00u; OpenBIOS_func_1FC0CDEC(cpu); } void OpenBIOS_func_1FC0CDEC_cont_BFC0CE18(CPUState* cpu) { cpu->pc = 0xBFC0CE18u; OpenBIOS_func_1FC0CDEC(cpu); } void OpenBIOS_func_1FC0CE20_cont_BFC0CE3C(CPUState* cpu) { cpu->pc = 0xBFC0CE3Cu; OpenBIOS_func_1FC0CE20(cpu); } void OpenBIOS_func_1FC0CE20_cont_BFC0CE44(CPUState* cpu) { cpu->pc = 0xBFC0CE44u; OpenBIOS_func_1FC0CE20(cpu); } void OpenBIOS_func_1FC0CE20_cont_BFC0CE58(CPUState* cpu) { cpu->pc = 0xBFC0CE58u; OpenBIOS_func_1FC0CE20(cpu); } void OpenBIOS_func_1FC0CE20_cont_BFC0CE70(CPUState* cpu) { cpu->pc = 0xBFC0CE70u; OpenBIOS_func_1FC0CE20(cpu); } void OpenBIOS_func_1FC0CF90_cont_BFC0CF98(CPUState* cpu) { cpu->pc = 0xBFC0CF98u; OpenBIOS_func_1FC0CF90(cpu); } void OpenBIOS_func_1FC0CF90_cont_BFC0CFA4(CPUState* cpu) { cpu->pc = 0xBFC0CFA4u; OpenBIOS_func_1FC0CF90(cpu); } void OpenBIOS_func_1FC0CF90_cont_BFC0CFB8(CPUState* cpu) { cpu->pc = 0xBFC0CFB8u; OpenBIOS_func_1FC0CF90(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0CFEC(CPUState* cpu) { cpu->pc = 0xBFC0CFECu; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0CFF4(CPUState* cpu) { cpu->pc = 0xBFC0CFF4u; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0CFF8(CPUState* cpu) { cpu->pc = 0xBFC0CFF8u; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0D000(CPUState* cpu) { cpu->pc = 0xBFC0D000u; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0D004(CPUState* cpu) { cpu->pc = 0xBFC0D004u; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0D014(CPUState* cpu) { cpu->pc = 0xBFC0D014u; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0CFC0_cont_BFC0D01C(CPUState* cpu) { cpu->pc = 0xBFC0D01Cu; OpenBIOS_func_1FC0CFC0(cpu); } void OpenBIOS_func_1FC0D024_cont_BFC0D060(CPUState* cpu) { cpu->pc = 0xBFC0D060u; OpenBIOS_func_1FC0D024(cpu); } void OpenBIOS_func_1FC0D024_cont_BFC0D068(CPUState* cpu) { cpu->pc = 0xBFC0D068u; OpenBIOS_func_1FC0D024(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0AC(CPUState* cpu) { cpu->pc = 0xBFC0D0ACu; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0BC(CPUState* cpu) { cpu->pc = 0xBFC0D0BCu; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0C0(CPUState* cpu) { cpu->pc = 0xBFC0D0C0u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0D0(CPUState* cpu) { cpu->pc = 0xBFC0D0D0u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0DC(CPUState* cpu) { cpu->pc = 0xBFC0D0DCu; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0E0(CPUState* cpu) { cpu->pc = 0xBFC0D0E0u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0E4(CPUState* cpu) { cpu->pc = 0xBFC0D0E4u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0F4(CPUState* cpu) { cpu->pc = 0xBFC0D0F4u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0F8(CPUState* cpu) { cpu->pc = 0xBFC0D0F8u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D0FC(CPUState* cpu) { cpu->pc = 0xBFC0D0FCu; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D110(CPUState* cpu) { cpu->pc = 0xBFC0D110u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D0A4_cont_BFC0D114(CPUState* cpu) { cpu->pc = 0xBFC0D114u; OpenBIOS_func_1FC0D0A4(cpu); } void OpenBIOS_func_1FC0D11C_cont_BFC0D120(CPUState* cpu) { cpu->pc = 0xBFC0D120u; OpenBIOS_func_1FC0D11C(cpu); } void OpenBIOS_func_1FC0D11C_cont_BFC0D130(CPUState* cpu) { cpu->pc = 0xBFC0D130u; OpenBIOS_func_1FC0D11C(cpu); } void OpenBIOS_func_1FC0D140_cont_BFC0D14C(CPUState* cpu) { cpu->pc = 0xBFC0D14Cu; OpenBIOS_func_1FC0D140(cpu); } void OpenBIOS_func_1FC0D174_cont_BFC0D18C(CPUState* cpu) { cpu->pc = 0xBFC0D18Cu; OpenBIOS_func_1FC0D174(cpu); } void OpenBIOS_func_1FC0D174_cont_BFC0D190(CPUState* cpu) { cpu->pc = 0xBFC0D190u; OpenBIOS_func_1FC0D174(cpu); } void OpenBIOS_func_1FC0D198_cont_BFC0D1B0(CPUState* cpu) { cpu->pc = 0xBFC0D1B0u; OpenBIOS_func_1FC0D198(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D1C8(CPUState* cpu) { cpu->pc = 0xBFC0D1C8u; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D1D0(CPUState* cpu) { cpu->pc = 0xBFC0D1D0u; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D1D4(CPUState* cpu) { cpu->pc = 0xBFC0D1D4u; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D1F4(CPUState* cpu) { cpu->pc = 0xBFC0D1F4u; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D204(CPUState* cpu) { cpu->pc = 0xBFC0D204u; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D1B8_cont_BFC0D20C(CPUState* cpu) { cpu->pc = 0xBFC0D20Cu; OpenBIOS_func_1FC0D1B8(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D22C(CPUState* cpu) { cpu->pc = 0xBFC0D22Cu; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D23C(CPUState* cpu) { cpu->pc = 0xBFC0D23Cu; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D244(CPUState* cpu) { cpu->pc = 0xBFC0D244u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D248(CPUState* cpu) { cpu->pc = 0xBFC0D248u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D250(CPUState* cpu) { cpu->pc = 0xBFC0D250u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D258(CPUState* cpu) { cpu->pc = 0xBFC0D258u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D25C(CPUState* cpu) { cpu->pc = 0xBFC0D25Cu; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D264(CPUState* cpu) { cpu->pc = 0xBFC0D264u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D274(CPUState* cpu) { cpu->pc = 0xBFC0D274u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D27C(CPUState* cpu) { cpu->pc = 0xBFC0D27Cu; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D214_cont_BFC0D288(CPUState* cpu) { cpu->pc = 0xBFC0D288u; OpenBIOS_func_1FC0D214(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2AC(CPUState* cpu) { cpu->pc = 0xBFC0D2ACu; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2B4(CPUState* cpu) { cpu->pc = 0xBFC0D2B4u; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2B8(CPUState* cpu) { cpu->pc = 0xBFC0D2B8u; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2D8(CPUState* cpu) { cpu->pc = 0xBFC0D2D8u; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2E8(CPUState* cpu) { cpu->pc = 0xBFC0D2E8u; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D29C_cont_BFC0D2F0(CPUState* cpu) { cpu->pc = 0xBFC0D2F0u; OpenBIOS_func_1FC0D29C(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D30C(CPUState* cpu) { cpu->pc = 0xBFC0D30Cu; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D318(CPUState* cpu) { cpu->pc = 0xBFC0D318u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D328(CPUState* cpu) { cpu->pc = 0xBFC0D328u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D348(CPUState* cpu) { cpu->pc = 0xBFC0D348u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D34C(CPUState* cpu) { cpu->pc = 0xBFC0D34Cu; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D368(CPUState* cpu) { cpu->pc = 0xBFC0D368u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D36C(CPUState* cpu) { cpu->pc = 0xBFC0D36Cu; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D378(CPUState* cpu) { cpu->pc = 0xBFC0D378u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D388(CPUState* cpu) { cpu->pc = 0xBFC0D388u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D390(CPUState* cpu) { cpu->pc = 0xBFC0D390u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D2F8_cont_BFC0D398(CPUState* cpu) { cpu->pc = 0xBFC0D398u; OpenBIOS_func_1FC0D2F8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D3C8(CPUState* cpu) { cpu->pc = 0xBFC0D3C8u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D3D4(CPUState* cpu) { cpu->pc = 0xBFC0D3D4u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D3E4(CPUState* cpu) { cpu->pc = 0xBFC0D3E4u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D404(CPUState* cpu) { cpu->pc = 0xBFC0D404u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D408(CPUState* cpu) { cpu->pc = 0xBFC0D408u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D42C(CPUState* cpu) { cpu->pc = 0xBFC0D42Cu; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D430(CPUState* cpu) { cpu->pc = 0xBFC0D430u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D440(CPUState* cpu) { cpu->pc = 0xBFC0D440u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D444(CPUState* cpu) { cpu->pc = 0xBFC0D444u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D460(CPUState* cpu) { cpu->pc = 0xBFC0D460u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D470(CPUState* cpu) { cpu->pc = 0xBFC0D470u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D478(CPUState* cpu) { cpu->pc = 0xBFC0D478u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D480(CPUState* cpu) { cpu->pc = 0xBFC0D480u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D488(CPUState* cpu) { cpu->pc = 0xBFC0D488u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D3A8_cont_BFC0D490(CPUState* cpu) { cpu->pc = 0xBFC0D490u; OpenBIOS_func_1FC0D3A8(cpu); } void OpenBIOS_func_1FC0D4A0_cont_BFC0D4B0(CPUState* cpu) { cpu->pc = 0xBFC0D4B0u; OpenBIOS_func_1FC0D4A0(cpu); } void OpenBIOS_func_1FC0D4A0_cont_BFC0D4B8(CPUState* cpu) { cpu->pc = 0xBFC0D4B8u; OpenBIOS_func_1FC0D4A0(cpu); } void OpenBIOS_func_1FC0D4A0_cont_BFC0D4BC(CPUState* cpu) { cpu->pc = 0xBFC0D4BCu; OpenBIOS_func_1FC0D4A0(cpu); } void OpenBIOS_func_1FC0D4A0_cont_BFC0D4C4(CPUState* cpu) { cpu->pc = 0xBFC0D4C4u; OpenBIOS_func_1FC0D4A0(cpu); } void OpenBIOS_func_1FC0D4A0_cont_BFC0D4D4(CPUState* cpu) { cpu->pc = 0xBFC0D4D4u; OpenBIOS_func_1FC0D4A0(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D4E8(CPUState* cpu) { cpu->pc = 0xBFC0D4E8u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D4F0(CPUState* cpu) { cpu->pc = 0xBFC0D4F0u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D500(CPUState* cpu) { cpu->pc = 0xBFC0D500u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D50C(CPUState* cpu) { cpu->pc = 0xBFC0D50Cu; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D520(CPUState* cpu) { cpu->pc = 0xBFC0D520u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D524(CPUState* cpu) { cpu->pc = 0xBFC0D524u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D530(CPUState* cpu) { cpu->pc = 0xBFC0D530u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D54C(CPUState* cpu) { cpu->pc = 0xBFC0D54Cu; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D568(CPUState* cpu) { cpu->pc = 0xBFC0D568u; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D4DC_cont_BFC0D57C(CPUState* cpu) { cpu->pc = 0xBFC0D57Cu; OpenBIOS_func_1FC0D4DC(cpu); } void OpenBIOS_func_1FC0D588_cont_BFC0D5C4(CPUState* cpu) { cpu->pc = 0xBFC0D5C4u; OpenBIOS_func_1FC0D588(cpu); } void OpenBIOS_func_1FC0D588_cont_BFC0D5D8(CPUState* cpu) { cpu->pc = 0xBFC0D5D8u; OpenBIOS_func_1FC0D588(cpu); } void OpenBIOS_func_1FC0D588_cont_BFC0D608(CPUState* cpu) { cpu->pc = 0xBFC0D608u; OpenBIOS_func_1FC0D588(cpu); } void OpenBIOS_func_1FC0D588_cont_BFC0D61C(CPUState* cpu) { cpu->pc = 0xBFC0D61Cu; OpenBIOS_func_1FC0D588(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D634(CPUState* cpu) { cpu->pc = 0xBFC0D634u; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D63C(CPUState* cpu) { cpu->pc = 0xBFC0D63Cu; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D64C(CPUState* cpu) { cpu->pc = 0xBFC0D64Cu; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D65C(CPUState* cpu) { cpu->pc = 0xBFC0D65Cu; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D660(CPUState* cpu) { cpu->pc = 0xBFC0D660u; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D668(CPUState* cpu) { cpu->pc = 0xBFC0D668u; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D624_cont_BFC0D674(CPUState* cpu) { cpu->pc = 0xBFC0D674u; OpenBIOS_func_1FC0D624(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D6B0(CPUState* cpu) { cpu->pc = 0xBFC0D6B0u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D6B8(CPUState* cpu) { cpu->pc = 0xBFC0D6B8u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D6C4(CPUState* cpu) { cpu->pc = 0xBFC0D6C4u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D6DC(CPUState* cpu) { cpu->pc = 0xBFC0D6DCu; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D714(CPUState* cpu) { cpu->pc = 0xBFC0D714u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D730(CPUState* cpu) { cpu->pc = 0xBFC0D730u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D744(CPUState* cpu) { cpu->pc = 0xBFC0D744u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D748(CPUState* cpu) { cpu->pc = 0xBFC0D748u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D754(CPUState* cpu) { cpu->pc = 0xBFC0D754u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D76C(CPUState* cpu) { cpu->pc = 0xBFC0D76Cu; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D774(CPUState* cpu) { cpu->pc = 0xBFC0D774u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D77C(CPUState* cpu) { cpu->pc = 0xBFC0D77Cu; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D7D8(CPUState* cpu) { cpu->pc = 0xBFC0D7D8u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D7E0(CPUState* cpu) { cpu->pc = 0xBFC0D7E0u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D7E8(CPUState* cpu) { cpu->pc = 0xBFC0D7E8u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D824(CPUState* cpu) { cpu->pc = 0xBFC0D824u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D838(CPUState* cpu) { cpu->pc = 0xBFC0D838u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D850(CPUState* cpu) { cpu->pc = 0xBFC0D850u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D864(CPUState* cpu) { cpu->pc = 0xBFC0D864u; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D698_cont_BFC0D86C(CPUState* cpu) { cpu->pc = 0xBFC0D86Cu; OpenBIOS_func_1FC0D698(cpu); } void OpenBIOS_func_1FC0D88C_cont_BFC0D89C(CPUState* cpu) { cpu->pc = 0xBFC0D89Cu; OpenBIOS_func_1FC0D88C(cpu); } void OpenBIOS_func_1FC0D88C_cont_BFC0D8A4(CPUState* cpu) { cpu->pc = 0xBFC0D8A4u; OpenBIOS_func_1FC0D88C(cpu); } void OpenBIOS_func_1FC0D88C_cont_BFC0D8AC(CPUState* cpu) { cpu->pc = 0xBFC0D8ACu; OpenBIOS_func_1FC0D88C(cpu); } void OpenBIOS_func_1FC0D88C_cont_BFC0D8B4(CPUState* cpu) { cpu->pc = 0xBFC0D8B4u; OpenBIOS_func_1FC0D88C(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D918(CPUState* cpu) { cpu->pc = 0xBFC0D918u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D920(CPUState* cpu) { cpu->pc = 0xBFC0D920u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D928(CPUState* cpu) { cpu->pc = 0xBFC0D928u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D930(CPUState* cpu) { cpu->pc = 0xBFC0D930u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D950(CPUState* cpu) { cpu->pc = 0xBFC0D950u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D990(CPUState* cpu) { cpu->pc = 0xBFC0D990u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D9A4(CPUState* cpu) { cpu->pc = 0xBFC0D9A4u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D9D8(CPUState* cpu) { cpu->pc = 0xBFC0D9D8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D9F8(CPUState* cpu) { cpu->pc = 0xBFC0D9F8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0D9FC(CPUState* cpu) { cpu->pc = 0xBFC0D9FCu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DA18(CPUState* cpu) { cpu->pc = 0xBFC0DA18u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DA78(CPUState* cpu) { cpu->pc = 0xBFC0DA78u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DA80(CPUState* cpu) { cpu->pc = 0xBFC0DA80u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DA98(CPUState* cpu) { cpu->pc = 0xBFC0DA98u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DAA8(CPUState* cpu) { cpu->pc = 0xBFC0DAA8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DAAC(CPUState* cpu) { cpu->pc = 0xBFC0DAACu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DAE0(CPUState* cpu) { cpu->pc = 0xBFC0DAE0u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DAE8(CPUState* cpu) { cpu->pc = 0xBFC0DAE8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB28(CPUState* cpu) { cpu->pc = 0xBFC0DB28u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB2C(CPUState* cpu) { cpu->pc = 0xBFC0DB2Cu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB34(CPUState* cpu) { cpu->pc = 0xBFC0DB34u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB58(CPUState* cpu) { cpu->pc = 0xBFC0DB58u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB5C(CPUState* cpu) { cpu->pc = 0xBFC0DB5Cu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB68(CPUState* cpu) { cpu->pc = 0xBFC0DB68u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB84(CPUState* cpu) { cpu->pc = 0xBFC0DB84u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB94(CPUState* cpu) { cpu->pc = 0xBFC0DB94u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DB9C(CPUState* cpu) { cpu->pc = 0xBFC0DB9Cu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBA4(CPUState* cpu) { cpu->pc = 0xBFC0DBA4u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBC0(CPUState* cpu) { cpu->pc = 0xBFC0DBC0u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBC8(CPUState* cpu) { cpu->pc = 0xBFC0DBC8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBD8(CPUState* cpu) { cpu->pc = 0xBFC0DBD8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBE8(CPUState* cpu) { cpu->pc = 0xBFC0DBE8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DBF4(CPUState* cpu) { cpu->pc = 0xBFC0DBF4u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC34(CPUState* cpu) { cpu->pc = 0xBFC0DC34u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC38(CPUState* cpu) { cpu->pc = 0xBFC0DC38u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC44(CPUState* cpu) { cpu->pc = 0xBFC0DC44u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC48(CPUState* cpu) { cpu->pc = 0xBFC0DC48u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC58(CPUState* cpu) { cpu->pc = 0xBFC0DC58u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC60(CPUState* cpu) { cpu->pc = 0xBFC0DC60u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DC90(CPUState* cpu) { cpu->pc = 0xBFC0DC90u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCA8(CPUState* cpu) { cpu->pc = 0xBFC0DCA8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCAC(CPUState* cpu) { cpu->pc = 0xBFC0DCACu; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCC4(CPUState* cpu) { cpu->pc = 0xBFC0DCC4u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCC8(CPUState* cpu) { cpu->pc = 0xBFC0DCC8u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCD0(CPUState* cpu) { cpu->pc = 0xBFC0DCD0u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0D8C4_cont_BFC0DCE4(CPUState* cpu) { cpu->pc = 0xBFC0DCE4u; OpenBIOS_func_1FC0D8C4(cpu); } void OpenBIOS_func_1FC0DD00_cont_BFC0DD08(CPUState* cpu) { cpu->pc = 0xBFC0DD08u; OpenBIOS_func_1FC0DD00(cpu); } void OpenBIOS_func_1FC0DD00_cont_BFC0DD0C(CPUState* cpu) { cpu->pc = 0xBFC0DD0Cu; OpenBIOS_func_1FC0DD00(cpu); } void OpenBIOS_func_1FC0DD00_cont_BFC0DD14(CPUState* cpu) { cpu->pc = 0xBFC0DD14u; OpenBIOS_func_1FC0DD00(cpu); } void OpenBIOS_func_1FC0DD34_cont_BFC0DD38(CPUState* cpu) { cpu->pc = 0xBFC0DD38u; OpenBIOS_func_1FC0DD34(cpu); } void OpenBIOS_func_1FC0DD48_cont_BFC0DD50(CPUState* cpu) { cpu->pc = 0xBFC0DD50u; OpenBIOS_func_1FC0DD48(cpu); } void OpenBIOS_func_1FC0DD48_cont_BFC0DD64(CPUState* cpu) { cpu->pc = 0xBFC0DD64u; OpenBIOS_func_1FC0DD48(cpu); } void OpenBIOS_func_1FC0DD48_cont_BFC0DD6C(CPUState* cpu) { cpu->pc = 0xBFC0DD6Cu; OpenBIOS_func_1FC0DD48(cpu); } void OpenBIOS_func_1FC0DD84_cont_BFC0DD8C(CPUState* cpu) { cpu->pc = 0xBFC0DD8Cu; OpenBIOS_func_1FC0DD84(cpu); } void OpenBIOS_func_1FC0DD84_cont_BFC0DDA0(CPUState* cpu) { cpu->pc = 0xBFC0DDA0u; OpenBIOS_func_1FC0DD84(cpu); } void OpenBIOS_func_1FC0DD84_cont_BFC0DDA8(CPUState* cpu) { cpu->pc = 0xBFC0DDA8u; OpenBIOS_func_1FC0DD84(cpu); } void OpenBIOS_func_1FC0DDC0_cont_BFC0DDC8(CPUState* cpu) { cpu->pc = 0xBFC0DDC8u; OpenBIOS_func_1FC0DDC0(cpu); } void OpenBIOS_func_1FC0DDD0_cont_BFC0DDE0(CPUState* cpu) { cpu->pc = 0xBFC0DDE0u; OpenBIOS_func_1FC0DDD0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE00(CPUState* cpu) { cpu->pc = 0xBFC0DE00u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE08(CPUState* cpu) { cpu->pc = 0xBFC0DE08u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE0C(CPUState* cpu) { cpu->pc = 0xBFC0DE0Cu; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE28(CPUState* cpu) { cpu->pc = 0xBFC0DE28u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE38(CPUState* cpu) { cpu->pc = 0xBFC0DE38u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE40(CPUState* cpu) { cpu->pc = 0xBFC0DE40u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DDF0_cont_BFC0DE48(CPUState* cpu) { cpu->pc = 0xBFC0DE48u; OpenBIOS_func_1FC0DDF0(cpu); } void OpenBIOS_func_1FC0DE50_cont_BFC0DE60(CPUState* cpu) { cpu->pc = 0xBFC0DE60u; OpenBIOS_func_1FC0DE50(cpu); } void OpenBIOS_func_1FC0DE70_cont_BFC0DE84(CPUState* cpu) { cpu->pc = 0xBFC0DE84u; OpenBIOS_func_1FC0DE70(cpu); } void OpenBIOS_func_1FC0DEA0_cont_BFC0DEAC(CPUState* cpu) { cpu->pc = 0xBFC0DEACu; OpenBIOS_func_1FC0DEA0(cpu); } void OpenBIOS_func_1FC0DEA0_cont_BFC0DEC4(CPUState* cpu) { cpu->pc = 0xBFC0DEC4u; OpenBIOS_func_1FC0DEA0(cpu); } void OpenBIOS_func_1FC0DEA0_cont_BFC0DEC8(CPUState* cpu) { cpu->pc = 0xBFC0DEC8u; OpenBIOS_func_1FC0DEA0(cpu); } void OpenBIOS_func_1FC0DEA0_cont_BFC0DEE0(CPUState* cpu) { cpu->pc = 0xBFC0DEE0u; OpenBIOS_func_1FC0DEA0(cpu); } void OpenBIOS_func_1FC0DEA0_cont_BFC0DEE4(CPUState* cpu) { cpu->pc = 0xBFC0DEE4u; OpenBIOS_func_1FC0DEA0(cpu); } void OpenBIOS_func_1FC0DF30_cont_BFC0DF44(CPUState* cpu) { cpu->pc = 0xBFC0DF44u; OpenBIOS_func_1FC0DF30(cpu); } void OpenBIOS_func_1FC0DF30_cont_BFC0DF48(CPUState* cpu) { cpu->pc = 0xBFC0DF48u; OpenBIOS_func_1FC0DF30(cpu); } void OpenBIOS_func_1FC0DF30_cont_BFC0DF50(CPUState* cpu) { cpu->pc = 0xBFC0DF50u; OpenBIOS_func_1FC0DF30(cpu); } void OpenBIOS_func_1FC0DF30_cont_BFC0DF60(CPUState* cpu) { cpu->pc = 0xBFC0DF60u; OpenBIOS_func_1FC0DF30(cpu); } void OpenBIOS_func_1FC0DF80_cont_BFC0DFA0(CPUState* cpu) { cpu->pc = 0xBFC0DFA0u; OpenBIOS_func_1FC0DF80(cpu); } void OpenBIOS_func_1FC0DF80_cont_BFC0DFA4(CPUState* cpu) { cpu->pc = 0xBFC0DFA4u; OpenBIOS_func_1FC0DF80(cpu); } void OpenBIOS_func_1FC0DFAC_cont_BFC0DFCC(CPUState* cpu) { cpu->pc = 0xBFC0DFCCu; OpenBIOS_func_1FC0DFAC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0DFE4(CPUState* cpu) { cpu->pc = 0xBFC0DFE4u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0DFEC(CPUState* cpu) { cpu->pc = 0xBFC0DFECu; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0DFF4(CPUState* cpu) { cpu->pc = 0xBFC0DFF4u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0DFFC(CPUState* cpu) { cpu->pc = 0xBFC0DFFCu; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0E004(CPUState* cpu) { cpu->pc = 0xBFC0E004u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0E020(CPUState* cpu) { cpu->pc = 0xBFC0E020u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0E024(CPUState* cpu) { cpu->pc = 0xBFC0E024u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0E040(CPUState* cpu) { cpu->pc = 0xBFC0E040u; OpenBIOS_func_1FC0DFDC(cpu); } void OpenBIOS_func_1FC0DFDC_cont_BFC0E048(CPUState* cpu) { cpu->pc = 0xBFC0E048u; OpenBIOS_func_1FC0DFDC(cpu); }