hexed projext started
authornotaz <notasas@gmail.com>
Mon, 16 Mar 2009 23:08:57 +0000 (23:08 +0000)
committernotaz <notasas@gmail.com>
Mon, 16 Mar 2009 23:08:57 +0000 (23:08 +0000)
hexed/Makefile
hexed/font.s [new file with mode: 0644]
hexed/test.s

index bfe4a04..de60dbc 100644 (file)
@@ -5,8 +5,8 @@ OBJCOPY = $(CROSS)objcopy
 \r
 ASFLAGS = -m68000 --register-prefix-optional --bitwise-or \r
 \r
-TARGET = nshtest.bin\r
-OBJS = sega_gcc.o test.o\r
+TARGET = hexed.bin\r
+OBJS = sega_gcc.o test.o font.o\r
 \r
 all : $(TARGET)\r
 \r
diff --git a/hexed/font.s b/hexed/font.s
new file mode 100644 (file)
index 0000000..b40a977
--- /dev/null
@@ -0,0 +1,1156 @@
+.text
+.globl font
+
+font:
+/* \00 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \01 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \02 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \03 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \04 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \05 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \06 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \07 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \08 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \09 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \0a */
+       dc.l 0x00111100
+       dc.l 0x01000010
+       dc.l 0x10011001
+       dc.l 0x10111101
+       dc.l 0x10111101
+       dc.l 0x10011001
+       dc.l 0x01000010
+       dc.l 0x00111100
+/* \0b */
+       dc.l 0x00111100
+       dc.l 0x01000010
+       dc.l 0x10000001
+       dc.l 0x10000001
+       dc.l 0x10000001
+       dc.l 0x10000001
+       dc.l 0x01000010
+       dc.l 0x00111100
+/* \0c */
+       dc.l 0x11111110
+       dc.l 0x10000010
+       dc.l 0x10001010
+       dc.l 0x11010010
+       dc.l 0x10100010
+       dc.l 0x10000010
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* \0d */
+       dc.l 0x11111110
+       dc.l 0x10000010
+       dc.l 0x10000010
+       dc.l 0x10000010
+       dc.l 0x10000010
+       dc.l 0x10000010
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* \0e */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \0f */
+       dc.l 0x00000000
+       dc.l 0x00111000
+       dc.l 0x01100100
+       dc.l 0x01110100
+       dc.l 0x01111100
+       dc.l 0x00111000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \10 */
+       dc.l 0x10000000
+       dc.l 0x11000000
+       dc.l 0x11110000
+       dc.l 0x11111100
+       dc.l 0x11110000
+       dc.l 0x11000000
+       dc.l 0x10000000
+       dc.l 0x00000000
+/* \11 */
+       dc.l 0x00000001
+       dc.l 0x00000011
+       dc.l 0x00001111
+       dc.l 0x00111111
+       dc.l 0x00001111
+       dc.l 0x00000011
+       dc.l 0x00000001
+       dc.l 0x00000000
+/* \12 */
+       dc.l 0x00011000
+       dc.l 0x00111100
+       dc.l 0x01111110
+       dc.l 0x00011000
+       dc.l 0x01111110
+       dc.l 0x00111100
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* \13 */
+       dc.l 0x11101110
+       dc.l 0x11101110
+       dc.l 0x11101110
+       dc.l 0x11001100
+       dc.l 0x00000000
+       dc.l 0x11001100
+       dc.l 0x11001100
+       dc.l 0x00000000
+/* \14 */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00110000
+       dc.l 0x01101000
+       dc.l 0x01111000
+       dc.l 0x00110000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \15 */
+       dc.l 0x00000000
+       dc.l 0x00111000
+       dc.l 0x01100100
+       dc.l 0x01110100
+       dc.l 0x01111100
+       dc.l 0x00111000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \16 */
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x01111010
+       dc.l 0x01111010
+       dc.l 0x01111110
+       dc.l 0x01111110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* \17 */
+       dc.l 0x00001110
+       dc.l 0x00111110
+       dc.l 0x00111010
+       dc.l 0x00100010
+       dc.l 0x00100110
+       dc.l 0x01101110
+       dc.l 0x11100100
+       dc.l 0x01000000
+/* \18 */
+       dc.l 0x00011000
+       dc.l 0x00111100
+       dc.l 0x01111110
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* \19 */
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x00111100
+       dc.l 0x01111110
+       dc.l 0x00111100
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* \1a */
+       dc.l 0x00001000
+       dc.l 0x01111100
+       dc.l 0x01111110
+       dc.l 0x01111110
+       dc.l 0x01111100
+       dc.l 0x00001000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \1b */
+       dc.l 0x00010000
+       dc.l 0x00111110
+       dc.l 0x01111110
+       dc.l 0x01111110
+       dc.l 0x00111110
+       dc.l 0x00010000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \1c */
+       dc.l 0x01011000
+       dc.l 0x00101010
+       dc.l 0x11011100
+       dc.l 0x11001000
+       dc.l 0x11011100
+       dc.l 0x00101010
+       dc.l 0x01011000
+       dc.l 0x00000000
+/* \1d */
+       dc.l 0x00100100
+       dc.l 0x01100110
+       dc.l 0x11111111
+       dc.l 0x11111111
+       dc.l 0x01100110
+       dc.l 0x00100100
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* \1e */
+       dc.l 0x00000000
+       dc.l 0x00010000
+       dc.l 0x00010000
+       dc.l 0x00111000
+       dc.l 0x00111000
+       dc.l 0x01111100
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* \1f */
+       dc.l 0x11111110
+       dc.l 0x01111100
+       dc.l 0x00111000
+       dc.l 0x00111000
+       dc.l 0x00010000
+       dc.l 0x00010000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* ' ' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '!' */
+       dc.l 0x00011100
+       dc.l 0x00011100
+       dc.l 0x00011100
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* '"' */
+       dc.l 0x01101100
+       dc.l 0x01101100
+       dc.l 0x00100100
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '#' */
+       dc.l 0x00000000
+       dc.l 0x00101000
+       dc.l 0x01111100
+       dc.l 0x00101000
+       dc.l 0x01111100
+       dc.l 0x00101000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '$' */
+       dc.l 0x00010000
+       dc.l 0x00111000
+       dc.l 0x01100000
+       dc.l 0x00111000
+       dc.l 0x00001100
+       dc.l 0x01111000
+       dc.l 0x00010000
+       dc.l 0x00000000
+/* '%' */
+       dc.l 0x01000000
+       dc.l 0x10100100
+       dc.l 0x01001000
+       dc.l 0x00010000
+       dc.l 0x00100100
+       dc.l 0x01001010
+       dc.l 0x00000100
+       dc.l 0x00000000
+/* '&' */
+       dc.l 0x00011000
+       dc.l 0x00110100
+       dc.l 0x00011000
+       dc.l 0x00111010
+       dc.l 0x01101100
+       dc.l 0x01100110
+       dc.l 0x00111010
+       dc.l 0x00000000
+/* ''' */
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00100000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '(' */
+       dc.l 0x00110000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x00110000
+       dc.l 0x00000000
+/* ')' */
+       dc.l 0x00001100
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00001100
+       dc.l 0x00000000
+/* '*' */
+       dc.l 0x00010000
+       dc.l 0x01010100
+       dc.l 0x00111000
+       dc.l 0x01111100
+       dc.l 0x00111000
+       dc.l 0x01010100
+       dc.l 0x00010000
+       dc.l 0x00000000
+/* '+' */
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x01111110
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* ',' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00110000
+       dc.l 0x00000000
+/* '-' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00111110
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '.' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '/' */
+       dc.l 0x00000000
+       dc.l 0x00000100
+       dc.l 0x00001000
+       dc.l 0x00010000
+       dc.l 0x00100000
+       dc.l 0x01000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '0' */
+       dc.l 0x00111000
+       dc.l 0x01001100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01100100
+       dc.l 0x00111000
+       dc.l 0x00000000
+/* '1' */
+       dc.l 0x00011000
+       dc.l 0x00111000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x01111110
+       dc.l 0x00000000
+/* '2' */
+       dc.l 0x01111100
+       dc.l 0x11000110
+       dc.l 0x00001110
+       dc.l 0x00111100
+       dc.l 0x01111000
+       dc.l 0x11100000
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* '3' */
+       dc.l 0x01111110
+       dc.l 0x00001100
+       dc.l 0x00011000
+       dc.l 0x00111100
+       dc.l 0x00000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* '4' */
+       dc.l 0x00011100
+       dc.l 0x00111100
+       dc.l 0x01101100
+       dc.l 0x11001100
+       dc.l 0x11111110
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00000000
+/* '5' */
+       dc.l 0x11111100
+       dc.l 0x11000000
+       dc.l 0x11111100
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* '6' */
+       dc.l 0x00111100
+       dc.l 0x01100000
+       dc.l 0x11000000
+       dc.l 0x11111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* '7' */
+       dc.l 0x11111110
+       dc.l 0x11000110
+       dc.l 0x00001100
+       dc.l 0x00011000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00000000
+/* '8' */
+       dc.l 0x01111000
+       dc.l 0x11000100
+       dc.l 0x11100100
+       dc.l 0x01111000
+       dc.l 0x10000110
+       dc.l 0x10000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* '9' */
+       dc.l 0x01111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01111110
+       dc.l 0x00000110
+       dc.l 0x00001100
+       dc.l 0x01111000
+       dc.l 0x00000000
+/* ':' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* ';' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00110000
+/* '<' */
+       dc.l 0x00011100
+       dc.l 0x00111000
+       dc.l 0x01110000
+       dc.l 0x11100000
+       dc.l 0x01110000
+       dc.l 0x00111000
+       dc.l 0x00011100
+       dc.l 0x00000000
+/* '=' */
+       dc.l 0x00000000
+       dc.l 0x01111100
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x01111100
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '>' */
+       dc.l 0x01110000
+       dc.l 0x00111000
+       dc.l 0x00011100
+       dc.l 0x00001110
+       dc.l 0x00011100
+       dc.l 0x00111000
+       dc.l 0x01110000
+       dc.l 0x00000000
+/* '?' */
+       dc.l 0x01111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x00011100
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* '@' */
+       dc.l 0x00111100
+       dc.l 0x01000010
+       dc.l 0x10011001
+       dc.l 0x10100001
+       dc.l 0x10100101
+       dc.l 0x10011001
+       dc.l 0x01000010
+       dc.l 0x00111100
+/* 'A' */
+       dc.l 0x00111000
+       dc.l 0x01101100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11111110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'B' */
+       dc.l 0x11111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11111100
+       dc.l 0x00000000
+/* 'C' */
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 'D' */
+       dc.l 0x11111000
+       dc.l 0x11001100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11001100
+       dc.l 0x11111000
+       dc.l 0x00000000
+/* 'E' */
+       dc.l 0x11111110
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x11111100
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* 'F' */
+       dc.l 0x11111110
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x11111100
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x00000000
+/* 'G' */
+       dc.l 0x00111110
+       dc.l 0x01100000
+       dc.l 0x11000000
+       dc.l 0x11001110
+       dc.l 0x11000110
+       dc.l 0x01100110
+       dc.l 0x00111110
+       dc.l 0x00000000
+/* 'H' */
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11111110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'I' */
+       dc.l 0x01111110
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x01111110
+       dc.l 0x00000000
+/* 'J' */
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* 'K' */
+       dc.l 0x11000110
+       dc.l 0x11001100
+       dc.l 0x11011000
+       dc.l 0x11110000
+       dc.l 0x11111000
+       dc.l 0x11011100
+       dc.l 0x11001110
+       dc.l 0x00000000
+/* 'L' */
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01111110
+       dc.l 0x00000000
+/* 'M' */
+       dc.l 0x11000110
+       dc.l 0x11101110
+       dc.l 0x11111110
+       dc.l 0x11111110
+       dc.l 0x11010110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'N' */
+       dc.l 0x11000110
+       dc.l 0x11100110
+       dc.l 0x11110110
+       dc.l 0x11111110
+       dc.l 0x11011110
+       dc.l 0x11001110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'O' */
+       dc.l 0x01111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* 'P' */
+       dc.l 0x11111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11111100
+       dc.l 0x11000000
+       dc.l 0x11000000
+       dc.l 0x00000000
+/* 'Q' */
+       dc.l 0x01111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11011110
+       dc.l 0x11001100
+       dc.l 0x01111010
+       dc.l 0x00000000
+/* 'R' */
+       dc.l 0x11111100
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11001110
+       dc.l 0x11111000
+       dc.l 0x11011100
+       dc.l 0x11001110
+       dc.l 0x00000000
+/* 'S' */
+       dc.l 0x01111000
+       dc.l 0x11001100
+       dc.l 0x11000000
+       dc.l 0x01111100
+       dc.l 0x00000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* 'T' */
+       dc.l 0x01111110
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* 'U' */
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* 'V' */
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11101110
+       dc.l 0x01111100
+       dc.l 0x00111000
+       dc.l 0x00010000
+       dc.l 0x00000000
+/* 'W' */
+       dc.l 0x11000110
+       dc.l 0x11000110
+       dc.l 0x11010110
+       dc.l 0x11111110
+       dc.l 0x11111110
+       dc.l 0x11101110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'X' */
+       dc.l 0x11000110
+       dc.l 0x11101110
+       dc.l 0x00111100
+       dc.l 0x00111000
+       dc.l 0x01111100
+       dc.l 0x11101110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'Y' */
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* 'Z' */
+       dc.l 0x11111110
+       dc.l 0x00001110
+       dc.l 0x00011100
+       dc.l 0x00111000
+       dc.l 0x01110000
+       dc.l 0x11100000
+       dc.l 0x11111110
+       dc.l 0x00000000
+/* '[' */
+       dc.l 0x00111100
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* '\' */
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x00110000
+       dc.l 0x00011000
+       dc.l 0x00001100
+       dc.l 0x00000110
+       dc.l 0x00000110
+       dc.l 0x00000000
+/* ']' */
+       dc.l 0x00111100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* '^' */
+       dc.l 0x00011000
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '_' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x11111111
+/* '`' */
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* 'a' */
+       dc.l 0x00000000
+       dc.l 0x00111100
+       dc.l 0x00000110
+       dc.l 0x00111110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 'b' */
+       dc.l 0x01100000
+       dc.l 0x01111100
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01111100
+       dc.l 0x00000000
+/* 'c' */
+       dc.l 0x00000000
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 'd' */
+       dc.l 0x00000110
+       dc.l 0x00111110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111110
+       dc.l 0x00000000
+/* 'e' */
+       dc.l 0x00000000
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01111110
+       dc.l 0x01100000
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 'f' */
+       dc.l 0x00011100
+       dc.l 0x00110000
+       dc.l 0x01111000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00000000
+/* 'g' */
+       dc.l 0x00000000
+       dc.l 0x00111110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111110
+       dc.l 0x00000110
+       dc.l 0x00111100
+/* 'h' */
+       dc.l 0x01100000
+       dc.l 0x01111100
+       dc.l 0x01110110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00000000
+/* 'i' */
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00111000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* 'j' */
+       dc.l 0x00001100
+       dc.l 0x00000000
+       dc.l 0x00011100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00001100
+       dc.l 0x00111000
+/* 'k' */
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100110
+       dc.l 0x01101100
+       dc.l 0x01111000
+       dc.l 0x01101100
+       dc.l 0x01100110
+       dc.l 0x00000000
+/* 'l' */
+       dc.l 0x00111000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* 'm' */
+       dc.l 0x00000000
+       dc.l 0x11101100
+       dc.l 0x11111110
+       dc.l 0x11111110
+       dc.l 0x11111110
+       dc.l 0x11010110
+       dc.l 0x11000110
+       dc.l 0x00000000
+/* 'n' */
+       dc.l 0x00000000
+       dc.l 0x01111100
+       dc.l 0x01110110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00000000
+/* 'o' */
+       dc.l 0x00000000
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 'p' */
+       dc.l 0x00000000
+       dc.l 0x01111100
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01111100
+       dc.l 0x01100000
+       dc.l 0x01100000
+/* 'q' */
+       dc.l 0x00000000
+       dc.l 0x00111110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111110
+       dc.l 0x00000110
+       dc.l 0x00000110
+/* 'r' */
+       dc.l 0x00000000
+       dc.l 0x01111110
+       dc.l 0x01110000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x01100000
+       dc.l 0x00000000
+/* 's' */
+       dc.l 0x00000000
+       dc.l 0x00111100
+       dc.l 0x01100000
+       dc.l 0x00111100
+       dc.l 0x00000110
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00000000
+/* 't' */
+       dc.l 0x00110000
+       dc.l 0x01111000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00110000
+       dc.l 0x00011100
+       dc.l 0x00000000
+/* 'u' */
+       dc.l 0x00000000
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01101110
+       dc.l 0x00111110
+       dc.l 0x00000000
+/* 'v' */
+       dc.l 0x00000000
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* 'w' */
+       dc.l 0x00000000
+       dc.l 0x11000110
+       dc.l 0x11010110
+       dc.l 0x11111110
+       dc.l 0x11111110
+       dc.l 0x01111100
+       dc.l 0x01101100
+       dc.l 0x00000000
+/* 'x' */
+       dc.l 0x00000000
+       dc.l 0x01100110
+       dc.l 0x00111100
+       dc.l 0x00011000
+       dc.l 0x00111100
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00000000
+/* 'y' */
+       dc.l 0x00000000
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x01100110
+       dc.l 0x00111110
+       dc.l 0x00000110
+       dc.l 0x00111100
+/* 'z' */
+       dc.l 0x00000000
+       dc.l 0x01111110
+       dc.l 0x00001100
+       dc.l 0x00011000
+       dc.l 0x00110000
+       dc.l 0x01100000
+       dc.l 0x01111110
+       dc.l 0x00000000
+/* '{' */
+       dc.l 0x00001110
+       dc.l 0x00011000
+       dc.l 0x00001100
+       dc.l 0x00111000
+       dc.l 0x00001100
+       dc.l 0x00011000
+       dc.l 0x00001110
+       dc.l 0x00000000
+/* '|' */
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00011000
+       dc.l 0x00000000
+/* '}' */
+       dc.l 0x01110000
+       dc.l 0x00011000
+       dc.l 0x00110000
+       dc.l 0x00011100
+       dc.l 0x00110000
+       dc.l 0x00011000
+       dc.l 0x01110000
+       dc.l 0x00000000
+/* '~' */
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x01110110
+       dc.l 0x11011100
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+       dc.l 0x00000000
+/* '\7f' */
+       dc.l 0x00010000
+       dc.l 0x00101000
+       dc.l 0x00010000
+       dc.l 0x01010100
+       dc.l 0x10101010
+       dc.l 0x01000100
+       dc.l 0x00000000
+       dc.l 0x00000000
index 3802920..6ca711a 100644 (file)
 .endm
 
 
-/* For indirect (variable) addresses.
-   Destroys d6-d7. */
-.macro VRAM_ADDR_var reg adr
-       move.l \adr,d6
+# make VDP word from address adr to d0
+# destroys d7
+.macro VRAM_ADDR_var adr
+       move.l \adr,d0
        move.l \adr,d7
-       and.w #0x3fff,d6
+       and.w #0x3fff,d0
        lsr.w #7,d7
        lsr.w #7,d7
-       add.w #0x4000,d6
-       lsl.l #7,d6
-       lsl.l #7,d6
-       lsl.l #2,d6
-       or.l d7,d6
-       move.l d6,\reg
+       add.w #0x4000,d0
+       lsl.l #7,d0
+       lsl.l #7,d0
+       lsl.l #2,d0
+       or.l d7,d0
 .endm
 
 
 #################################################
 
 colors:
-       dc.w 0x0040,0x0080,0x000e,0x00e0,0x0e00,0x00ee
-pattern:
-       dc.l 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000
-       dc.l 0x22334455,0x22334455,0x22334455,0x22334455,0x22334455,0x22334455,0x22334455,0x22334455
-       /* shadow sprite */
-       dc.l 0x00000fff
-       dc.l 0x0000ffff
-       dc.l 0x00ffffff
-       dc.l 0x00ffffff
-       dc.l 0x0fffffff
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       /* */
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0x0fffffff
-       dc.l 0x00ffffff
-       dc.l 0x00ffffff
-       dc.l 0x0000ffff
-       dc.l 0x00000fff
-       /* */
-       dc.l 0xfff00000
-       dc.l 0xffff0000
-       dc.l 0xffffff00
-       dc.l 0xffffff00
-       dc.l 0xfffffff0
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       /* */
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0xffffffff
-       dc.l 0xfffffff0
-       dc.l 0xffffff00
-       dc.l 0xffffff00
-       dc.l 0xffff0000
-       dc.l 0xfff00000
-       /* hilight sprite */
-       dc.l 0x00000eee
-       dc.l 0x0000eeee
-       dc.l 0x00eeeeee
-       dc.l 0x00eeeeee
-       dc.l 0x0eeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       /* */
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0x0eeeeeee
-       dc.l 0x00eeeeee
-       dc.l 0x00eeeeee
-       dc.l 0x0000eeee
-       dc.l 0x00000eee
-       /* */
-       dc.l 0xeee00000
-       dc.l 0xeeee0000
-       dc.l 0xeeeeee00
-       dc.l 0xeeeeee00
-       dc.l 0xeeeeeee0
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       /* */
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeeee
-       dc.l 0xeeeeeee0
-       dc.l 0xeeeeee00
-       dc.l 0xeeeeee00
-       dc.l 0xeeee0000
-       dc.l 0xeee00000
+       dc.w 0x0000,0x0eee
+colors_end:
+
+# pattern:
 
 
 sprite_data:
        /*         Y        size     link          attr        X */
-       dc.w  10+128;  dc.b 0x05;  dc.b 1;  dc.w 0x6002;  dc.w 0
-       dc.w  30+128;  dc.b 0x05;  dc.b 2;  dc.w 0x6006;  dc.w 0
-       dc.w  60+128;  dc.b 0x05;  dc.b 3;  dc.w 0xe002;  dc.w 0
-       dc.w  80+128;  dc.b 0x05;  dc.b 4;  dc.w 0xe006;  dc.w 0
-       dc.w 120+128;  dc.b 0x05;  dc.b 5;  dc.w 0x6002;  dc.w 0
-       dc.w 140+128;  dc.b 0x05;  dc.b 6;  dc.w 0x6006;  dc.w 0
-       dc.w 170+128;  dc.b 0x05;  dc.b 7;  dc.w 0xe002;  dc.w 0
-       dc.w 190+128;  dc.b 0x05;  dc.b 0;  dc.w 0xe006;  dc.w 0
+       dc.w       0;  dc.b 0x05;  dc.b 0;  dc.w 0x6002;  dc.w 0
 sprite_data_end:
 
+hello:
+       .ascii  "hello world"
 
 ##################################################
 #                                                #
@@ -217,46 +139,44 @@ sprite_data_end:
 #                                                #
 ##################################################
  
+.align 2
+
 main:
        /* Initialize VDP */
        jsr             init_gfx
 
        /* Load color data */
        movea.l         #0,a3
-       move.l          #colors,a4
-       moveq.l         #6,d4
+       movea.l         #colors,a4
+       moveq.l         #(colors_end-colors)/2,d4
        jsr             load_colors
 
        /* load patterns */
        movea.l         #0,a3
-       movea.l         #pattern,a4
-       move.l          #10,d4
+       movea.l         #font,a4
+       move.l          #128,d4
        jsr             load_tiles
 
        /* generate A layer map */
-       movea.l         #0xe000+10*2,a6
+       movea.l         #0xe000,a6
        move.l          #28-1,d4
 lmaploop0:
        movea.l         a6,a3
        jsr             load_prepare
 
-       moveq.l         #6-1,d3
-0:     move.l          #0x00010001,(a3)
-       dbra            d3,0b
-
-       moveq.l         #9-1,d3
-0:     move.l          #0x80018001,(a3)
+       move.l          #64/2-1,d3
+0:     move.l          #0x00000000,(a3)
        dbra            d3,0b
 
        add.l           #64*2,a6
        dbra            d4,lmaploop0
 
        /* generate B layer map */
-       movea.l         #0xc000+64*14*2,a3
+       movea.l         #0xc000,a3
        jsr             load_prepare
 
-       move.l          #64*14/2-1,d3
-0:     move.l          #0x80008000,(a3)
+       move.l          #64*28/2-1,d3
+0:     move.l          #0x00000000,(a3)
        dbra            d3,0b
 
        /* upload sprite data */
@@ -270,6 +190,11 @@ lmaploop0:
 
        jsr             wait_vsync
 
+       movea.l         #hello,a0
+       moveq.l         #1,d0
+       moveq.l         #1,d1
+       jsr             print
+
 ##################################################
 #                                                #
 #                 MAIN LOOP                      #
@@ -277,18 +202,7 @@ lmaploop0:
 ##################################################
 
 forever:
-       movea.l         #vtimer,a0
-       move.l          (a0),d4
-       and.w           #0x1ff,d4
-       movea.l         #0xfc06,a6
-       moveq.l         #8-1,d5
 
-0:
-       movea.l         a6,a3
-       jsr             load_prepare
-       move.w          d4,(a3)
-       addq.w          #8,a6
-       dbra            d5,0b
 
        jsr             wait_vsync
        bra             forever
@@ -303,20 +217,20 @@ forever:
 
 init_gfx:
        move.l          #GFXCNTL,a3
-       write_vdp_reg   0,(VDP0_E_DISPLAY + VDP0_PLTT_FULL)
-       write_vdp_reg   1,(VDP1_E_VBI + VDP1_E_DISPLAY + VDP1_E_DMA + VDP1_RESERVED)
+       write_vdp_reg   0,(VDP0_E_DISPLAY | VDP0_PLTT_FULL)
+       write_vdp_reg   1,(VDP1_E_VBI | VDP1_E_DISPLAY | VDP1_E_DMA | VDP1_RESERVED)
        write_vdp_reg   2,(0xe000 >> 10)        /* Screen map a adress */
        write_vdp_reg   3,(0xe000 >> 10)        /* Window address */
        write_vdp_reg   4,(0xc000 >> 13)        /* Screen map b address */
        write_vdp_reg   5,(0xfc00 >>  9)        /* Sprite address */
        write_vdp_reg   6,0     
-       write_vdp_reg   7,1                     /* Border color */
+       write_vdp_reg   7,0                     /* Backdrop color */
        write_vdp_reg   10,1                    /* Lines per hblank interrupt */
        write_vdp_reg   11,0                    /* 2-cell vertical scrolling */
-       write_vdp_reg   12,(VDP12_SCREEN_V224 | VDP12_SCREEN_H320 | VDP12_SPR_SHADOWS)
-       write_vdp_reg   13,(0x6000 >> 10)       /* Horizontal scroll address */
+       write_vdp_reg   12,(VDP12_SCREEN_V224 | VDP12_SCREEN_H320)
+       write_vdp_reg   13,(0x8000 >> 10)       /* Horizontal scroll address */
        write_vdp_reg   15,2
-       write_vdp_reg   16,(VDP16_MAP_V32 + VDP16_MAP_H64)
+       write_vdp_reg   16,(VDP16_MAP_V32 | VDP16_MAP_H64)      /* layer size */
        write_vdp_reg   17,0
        write_vdp_reg   18,0xff
        rts
@@ -331,13 +245,13 @@ init_gfx:
 #  a3: VRAM base                                # 
 #  a4: pattern address                          #
 #  d4: number of tiles to load                  #
-#  Destroys a2,d0,d6-d7...                      #
+#  Destroys a2,d0,d7...                         #
 #                                               #
 #################################################
 
 load_tiles:
        move.l          #GFXCNTL,a2
-       VRAM_ADDR_var   d0,a3
+       VRAM_ADDR_var   a3
        move.l          d0,(a2)
        lsl             #3,d4
        
@@ -350,38 +264,20 @@ _copy_tile_data:
        rts
 
 
+# Prepare to write to VDP RAM @a3
+#  a3: VRAM base
+#  a3 set to VDP data port for convenience
+#  destroys a2,d0,d7
+
 load_prepare:
        move.l          #GFXCNTL,a2
-       VRAM_ADDR_var   d0,a3
+       VRAM_ADDR_var   a3
        move.l          d0,(a2)
        move.l          #GFXDATA,a3
 
        rts
 
 
-#################################################
-#                                               #
-#        Clear one of the screen maps           #
-#                                               #
-# Parameters:                                   #
-#  a0: Map address                              # 
-#  d0: Data to write to each map entry          #
-#                                               #
-#################################################
-
-clear_map:
-       move.l          #GFXCNTL,a4
-       VRAM_ADDR_var   d1,a0
-       move.l          d1,(a4)
-       move.l          #GFXDATA,a3
-       move.w          #1023,d1        /* Loop counter */
-_clear_map_loop:
-       move.w          d0,(a3)
-       move.w          d0,(a3)
-       dbra            d1,_clear_map_loop
-       rts
-       
-
 #################################################
 #                                               #
 #        Load color data from ROM               #
@@ -406,6 +302,34 @@ _copy_color_data:
 
        rts
 
+#################################################
+##
+## print
+#   a0 - string
+#   d0 - x
+#   d1 - y 
+
+print:
+       lsl.w           #6,d1
+       add.w           d1,d0
+       movea.l         #0xe000,a6
+       lsl.w           #1,d0
+       add.w           d0,a6
+       moveq.l         #0,d1
+
+_print_loop:
+       move.b          (a0)+,d1
+       beq             _print_end
+
+       move.l          a6,a3
+       jsr             load_prepare
+       move.w          d1,(a3)
+       addq.l          #2,a6
+       jmp             _print_loop
+
+_print_end:
+       rts
+
 
 #################################################
 #                                               #
@@ -430,13 +354,16 @@ _wait_change:
 #################################################
 
 .bss
+
+# used by sega_gcc.s
 .globl htimer
 .globl vtimer
 .globl rand_num
 htimer:                .long 0
 vtimer:                .long 0
 rand_num:      .long 0
-scrollx:       .long 0
+
+#
 
 .end