summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-09-18 14:42:07 +0000
committerIan C <ianc@noddybox.co.uk>2018-09-18 14:42:07 +0000
commit0700f3d642c05713012e5f073df5884bc008d35c (patch)
tree3823cd884e8f79d7c226b6d096d7a7f4223a2fe6 /main.asm
parent8e05438548a50dece16697f1b1cdddbde68c95cd (diff)
Centered BG3.
Diffstat (limited to 'main.asm')
-rw-r--r--main.asm28
1 files changed, 28 insertions, 0 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