#endif
#include "psxcommon.h"
-#include "psxmem.h"
-#include "psxcounters.h"
-#include "psxbios.h"
enum R3000Aexception {
R3000E_Int = 0, // Interrupt
PAIR p[32];
} psxCP2Ctrl;
-enum {
- PSXINT_SIO = 0,
- PSXINT_CDR,
- PSXINT_CDREAD,
- PSXINT_GPUDMA,
- PSXINT_MDECOUTDMA,
- PSXINT_SPUDMA,
- PSXINT_GPUBUSY,
- PSXINT_MDECINDMA,
- PSXINT_GPUOTCDMA,
- PSXINT_CDRDMA,
- PSXINT_NEWDRC_CHECK,
- PSXINT_RCNT,
- PSXINT_CDRLID,
- PSXINT_CDRPLAY_OLD, /* unused */
- PSXINT_SPU_UPDATE,
- PSXINT_COUNT
-};
-
enum R3000Abdt {
// corresponds to bits 31,30 of Cause reg
R3000A_BRANCH_TAKEN = 3,
u8 dloadSel; /* interp. delay load state */
u8 dloadReg[2];
u32 dloadVal[2];
+ u32 biosBranchCheck;
+ u32 cpuInRecursion;
+ u32 reserved[2];
// warning: changing anything in psxRegisters requires update of all
// asm in libpcsxcore/new_dynarec/
} psxRegisters;
extern psxRegisters psxRegs;
/* new_dynarec stuff */
-extern u32 event_cycles[PSXINT_COUNT];
-extern u32 next_interupt;
-
void new_dyna_freeze(void *f, int mode);
-#define new_dyna_set_event_abs(e, abs) { \
- u32 abs_ = abs; \
- s32 di_ = next_interupt - abs_; \
- event_cycles[e] = abs_; \
- if (di_ > 0) { \
- /*printf("%u: next_interupt %u -> %u\n", psxRegs.cycle, next_interupt, abs_);*/ \
- next_interupt = abs_; \
- } \
-}
-
-#define new_dyna_set_event(e, c) \
- new_dyna_set_event_abs(e, psxRegs.cycle + (c))
-
int psxInit();
void psxReset();
void psxShutdown();
void psxExecuteBios();
void psxJumpTest();
+void irq10Interrupt();
+void psxScheduleIrq10(int irq_count, int x_cycles, int y);
+
#ifdef __cplusplus
}
#endif