From fad2c429df158eb6db2cc1d5547debe4b8c6002f Mon Sep 17 00:00:00 2001 From: greg Date: Fri, 2 Dec 2016 19:26:09 -0800 Subject: [PATCH] New ROM - tic tac toe --- Makefile | 17 ++++++++++++++--- tic_tac.asm | 32 ++++++++++++++++++++++++++++++++ tic_tac.link | 2 ++ 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 tic_tac.asm create mode 100644 tic_tac.link diff --git a/Makefile b/Makefile index 32838a1..52a89a1 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,14 @@ -all: smc +#all: smc +all: tic_tac + + +tic_tac: tic_tac.obj + wlalink -vr tic_tac.link tic_tac.smc + + +tic_tac.obj: tic_tac.asm + wla-65816 -vo tic_tac.asm tic_tac.obj + greenspace.obj: greenspace.asm wla-65816 -vo greenspace.asm greenspace.obj @@ -9,5 +19,6 @@ smc: greenspace.obj clean: - rm greenspace.obj - rm greenspace.smc + rm -f *.obj + rm -f greenspace.smc + rm -f tic_tac.smc diff --git a/tic_tac.asm b/tic_tac.asm new file mode 100644 index 0000000..4ed991f --- /dev/null +++ b/tic_tac.asm @@ -0,0 +1,32 @@ +.include "header.inc" +.include "snes_init.asm" + +.BANK 0 SLOT 0 +.org 0 +.section "Vblank" + +VBlank: + rti + +.ENDS + +.BANK 0 SLOT 0 +.ORG 0 +.section "Main" + +Start: + Snes_Init + +sep #$30 ; get 8-bit registers +stz $2121 ; write to CGRAM from $0 +lda #%10000000 ; this is +ldx #%00111100 ; a green color +sta $2122 ; write it +stx $2122 ; to CGRAM +lda #%00001111 ; turn on screen +sta $2100 ; here + +mainloop: + jmp mainloop + +.ENDS diff --git a/tic_tac.link b/tic_tac.link new file mode 100644 index 0000000..a3059d3 --- /dev/null +++ b/tic_tac.link @@ -0,0 +1,2 @@ +[objects] +tic_tac.obj