summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.asm28
-rw-r--r--maps.asm22
2 files changed, 39 insertions, 11 deletions
diff --git a/main.asm b/main.asm
index 7ec67d4..e9e36d2 100644
--- a/main.asm
+++ b/main.asm
@@ -56,6 +56,21 @@
stz VMADDH
DMA 9,zero,$18,0
+ ; Clear OAM
+ ;
+ClearOAM:
+ stz OAMADDL
+ stz OAMADDH
+ INDEX16
+ ldx #0
+.loop
+ stz OAMDATA
+ stz OAMDATA
+ inx
+ cpx #544/2
+ bne loop
+ INDEX8
+
; Copy 4-colour tiles
;
stz VMADDL
@@ -80,6 +95,9 @@
;
stz CGADD
DMA 0,PaletteData,$22,PaletteDataLen
+ lda #$80
+ sta CGADD
+ DMA 0,PaletteData,$22,PaletteDataLen
; Copy BG3
;
@@ -118,9 +136,19 @@ copybg3:
lda #$40
sta BG3SC
+ lda #-52
+ sta BG3HOFS
+ stz BG3HOFS
+ lda #-32
+ sta BG3VOFS
+ stz BG3VOFS
+
lda #$0f
sta INIDISP
+ lda #$81
+ sta NMITIMEN
+
; Loop forever.
Forever:
jmp Forever
diff --git a/maps.asm b/maps.asm
index 597019b..5bb3e1f 100644
--- a/maps.asm
+++ b/maps.asm
@@ -29,23 +29,23 @@
bank 2
BG3Map:
- db 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,0,0,0,0,0,0,0,0,0,0,0,0
- db 20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,0,0,0,0,0,0,0,0,0,0,0
db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- db 0,0,0,0,1,40,40,40,40,0,0,40,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- db 0,0,0,0,0,1,40,0,40,0,0,40,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- db 0,0,0,0,0,1,40,0,40,0,0,40,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