Compare commits

...

6 Commits

Author SHA1 Message Date
Greg Shuflin f1d3f2f6b6 Read from joypad 2022-06-15 11:30:27 -07:00
Greg Shuflin 8f947ae232 Draw another tile 2022-06-15 11:14:37 -07:00
Greg Shuflin 0de9c89162 Go back to tile 0 2022-06-15 11:10:07 -07:00
Greg Shuflin 33bd61d62a Use tile 1 for entire background 2022-06-15 11:08:30 -07:00
Greg Shuflin 26d66e9b8d Change sprite layout 2022-06-15 11:06:58 -07:00
Greg Shuflin db5a2c1b32 Fix color descriptions 2022-06-15 11:06:47 -07:00
2 changed files with 46 additions and 8 deletions

View File

@ -18,8 +18,8 @@ charset:
.byte %00000000
; tile 0x01
.byte %11111111 ; row 0, color 0
.byte %00000000 ; row 0, color 1
.byte %11110000 ; row 0, color 0
.byte %11111111 ; row 0, color 1
.byte %10000001 ; row 1, color 0
.byte %00000000 ; row 1, color 1
.byte %10000001 ; row 2, color 0
@ -35,4 +35,25 @@ charset:
.byte %11111111 ; row 7, color 0
.byte %00000000 ; row 7, color 1
; tile 0x02
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
.byte %00000000
.byte %11111111
charset_end:

View File

@ -29,13 +29,13 @@ start:
lda #$00
sta CGDATA
; Color 2 - blue
; Color 2 - green
lda #$e0
sta CGDATA
lda #$03
sta CGDATA
; Color 3 - green
; Color 3 - blue
lda #$00
sta CGDATA
lda #$7c
@ -69,7 +69,8 @@ start:
ldx #(VRAM_BG1)
@loop:
stx VMADDL
stz VMDATAL
lda #$00
sta VMDATAL
stz VMDATAH
inx
cpx #(VRAM_BG1 + 32 * 29)
@ -88,12 +89,28 @@ start:
lda #%00000001
sta TM
lda #$0f
sta INIDISP
lda #$01
sta NMITIMEN
mainloop:
lda JOY1H
bit #%00000100 ; Down button
beq down_not_pressed
; write tile 2 to position (4, 8)
TILE_X2= 4
TILE_Y2= 8
ldx #(VRAM_BG1 + (TILE_Y2* 32) + TILE_X2)
stx VMADDL
lda #$02
sta VMDATAL
stz VMDATAH
down_not_pressed:
bra mainloop
busywait:
bra busywait