32x: drc: more wip, some games work, debug stats
[picodrive.git] / pico / 32x / 32x.c
index c75e3fe..ba89d98 100644 (file)
@@ -38,6 +38,7 @@ void Pico32xStartup(void)
 {
   elprintf(EL_STATUS|EL_32X, "32X startup");
 
+  // TODO: OOM handling
   PicoAHW |= PAHW_32X;
   sh2_init(&msh2, 0);
   msh2.irq_callback = sh2_irq_cb;
@@ -121,6 +122,8 @@ void PicoUnload32x(void)
   if (Pico32xMem != NULL)
     free(Pico32xMem);
   Pico32xMem = NULL;
+  sh2_finish(&msh2);
+  sh2_finish(&ssh2);
 
   PicoAHW &= ~PAHW_32X;
 }