- if (memcmp(&psxRegs, &rregs, offsetof(psxRegisters, intCycle)) == 0 &&
- mem_val == memcheck_read(mem_addr)
- ) {
+ if (which_event >= 0 && event_cycles[which_event] != ev_cycles) {
+ printf("bad ev_cycles #%d: %08x %08x\n", which_event, event_cycles[which_event], ev_cycles);
+ fatal = 1;
+ }
+
+ if (irq_test_cycle > irq_test_cycle_intr) {
+ printf("bad irq_test_cycle: %u %u\n", irq_test_cycle, irq_test_cycle_intr);
+ fatal = 1;
+ }
+
+ if (handler_cycle != handler_cycle_intr) {
+ printf("bad handler_cycle: %u %u\n", handler_cycle, handler_cycle_intr);
+ fatal = 1;
+ }
+
+ if (mem_val != memcheck_read(mem_addr)) {
+ printf("bad mem @%08x: %08x %08x\n", mem_addr, memcheck_read(mem_addr), mem_val);
+ fatal = 1;
+ }
+
+ if (!fatal && !memcmp(&psxRegs, &rregs, offsetof(psxRegisters, intCycle))) {