megaed-stop - testcase for mega everdrive SDRAM corruption
[megadrive.git] / megaed-stop / sega_gcc.s
diff --git a/megaed-stop/sega_gcc.s b/megaed-stop/sega_gcc.s
new file mode 100644 (file)
index 0000000..927da4e
--- /dev/null
@@ -0,0 +1,43 @@
+    dc.l     0, 0x200, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, HBL,   exc__, VBL,   exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+    dc.l exc__, exc__, exc__, exc__, exc__, exc__, exc__, exc__\r
+\r
+    .ascii "SEGA EVERDRIVE                  "\r
+    .ascii "MEGA-ED SDRAM vs STOP                           "\r
+    .ascii "MEGA-ED SDRAM vs STOP                           "\r
+    .ascii "GM 00000000-00"\r
+    .byte 0x00,0x00\r
+    .ascii "JD              "\r
+    .byte 0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00\r
+    .byte 0x00,0xff,0x00,0x00,0xff,0xff,0xff,0xff\r
+    .ascii "               "\r
+    .ascii "                        "\r
+    .ascii "                         "\r
+    .ascii "JUE             "\r
+\r
+RST:\r
+       move.w #0x2700, %sr\r
+/* magic ED app init */\r
+       move.w #0x0000, (0xA13006)\r
+       jmp init_ed.l\r
+init_ed:\r
+       move.w #0x210f, (0xA13006)\r
+    move.l #HBL, (0x70)\r
+    move.l #VBL, (0x78)\r
+\r
+       moveq   #0, %d0\r
+       movea.l %d0, %a7\r
+       move    %a7, %usp\r
+       bra     main\r
+\r
+HBL:\r
+VBL:\r
+exc__:\r
+       rte\r
+\r
+# vim:filetype=asmM68k:ts=4:sw=4:expandtab\r