32x: drc: more wip, some games work, debug stats
[picodrive.git] / cpu / sh2 / sh2.c
index bda1c93..8ba5673 100644 (file)
@@ -1,12 +1,26 @@
 #include <string.h>
 #include "sh2.h"
+#include "compiler.h"
 
 #define I 0xf0
 
-void sh2_init(SH2 *sh2, int is_slave)
+int sh2_init(SH2 *sh2, int is_slave)
 {
+       int ret = 0;
+
        memset(sh2, 0, sizeof(*sh2));
        sh2->is_slave = is_slave;
+#ifdef DRC_SH2
+       ret = sh2_drc_init(sh2);
+#endif
+       return ret;
+}
+
+void sh2_finish(SH2 *sh2)
+{
+#ifdef DRC_SH2
+       sh2_drc_finish(sh2);
+#endif
 }
 
 void sh2_reset(SH2 *sh2)