hexed: refactor init code a bit
authornotaz <notasas@gmail.com>
Fri, 20 May 2011 11:36:55 +0000 (14:36 +0300)
committernotaz <notasas@gmail.com>
Fri, 20 May 2011 11:36:55 +0000 (14:36 +0300)
hexed/hexed.s
hexed/sega_gcc.s

index b7d9186..418ca5c 100644 (file)
@@ -262,8 +262,18 @@ txt_exc:
 main:
        /* make sure io port 2 is doing inputs */
        move.b          #0,(0xa1000b).l
-       /* mask irqs during init */
+       /* make sure irqs are masked */
        move.w          #0x2700,sr
+       /* take care of TMSS */
+       move.b          (0xa10000).l,d0
+       andi.b          #0x0f,d0
+       beq             no_tmss
+       move.l          #0x53454741,(0xa14000).l
+       /* want cart, not OS rom if cart pops in */
+       move.w          #1,(0xa14100).l
+       /* touch VDP after TMSS setup? */
+       tst.w           (0xc00004).l
+no_tmss:
 
 .if COPY_TO_EXP
        /* copy to expansion device if magic number is set */
index 580d496..13cb300 100644 (file)
         .ascii "                         "\r
         .ascii "JUE             "\r
 \r
-* Check Version Number\r
-       move.b  (0xa10000),%d0\r
-       andi.b  #0x0f,%d0\r
-       beq     WrongVersion\r
-* Sega Security Code (SEGA)\r
-       move.l  #0x53454741,(0xa14000)\r
-WrongVersion:\r
        moveq   #0,%d0\r
        movea.l %d0,%a7\r
        move    %a7,%usp\r
-\r
-       tst.w   0xC00004\r
        bra     main\r
 \r
 * INT:\r