testpico: 32x reset + other tests
[megadrive.git] / testpico / sh2_main.c
index 97ecd3a..6fe8ad7 100644 (file)
@@ -49,6 +49,14 @@ static void do_cmd(u16 cmd, u16 r[6], u32 is_slave)
         d = read32(&rl[8/4]);
         write32(a, d);
         break;
+    case CMD_GETGBR:
+        asm("stc gbr, %0" : "=r"(d));
+        write32(&rl[4/4], d);
+        break;
+    case CMD_GETVBR:
+        asm("stc vbr, %0" : "=r"(d));
+        write32(&rl[4/4], d);
+        break;
     default:
         r[2/2]++; // error
         mem_barrier();