rework sh2 sync, again..
[picodrive.git] / cpu / sh2 / sh2.h
index bdb2fd9..42de630 100644 (file)
@@ -39,6 +39,15 @@ typedef struct SH2_
        void            *p_rom;\r
        unsigned int    pdb_io_csum[2];\r
 \r
+#define SH2_STATE_RUN   (1 << 0)       // to prevent recursion\r
+#define SH2_STATE_SLEEP (1 << 1)\r
+#define SH2_STATE_CPOLL (1 << 2)       // polling comm regs\r
+#define SH2_STATE_VPOLL (1 << 3)       // polling VDP\r
+       unsigned int    state;\r
+       unsigned int    poll_addr;\r
+       int             poll_cycles;\r
+       int             poll_cnt;\r
+\r
        // interpreter stuff\r
        int             icount;         // cycles left in current timeslice\r
        unsigned int    ea;\r
@@ -89,4 +98,10 @@ int REGPARM(3) p32x_sh2_write8 (unsigned int a, unsigned int d, SH2 *sh2);
 int REGPARM(3) p32x_sh2_write16(unsigned int a, unsigned int d, SH2 *sh2);\r
 int REGPARM(3) p32x_sh2_write32(unsigned int a, unsigned int d, SH2 *sh2);\r
 \r
+// debug\r
+#ifdef DRC_CMP\r
+void do_sh2_trace(SH2 *current, int cycles);\r
+void do_sh2_cmp(SH2 *current);\r
+#endif\r
+\r
 #endif /* __SH2_H__ */\r