Skip to content

Commit

Permalink
More fixes to samples
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume committed Jun 8, 2020
1 parent 527ca0d commit 92d608f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions samples/tile_wall/tile_wall.bas
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
2 REM TILED, 4BPP, ON
3 REM IMAGESET ADDRESS $1A800
4 REM TILEMAP ADDRESS $00000
10 POKE $9F2D,$12: POKE $9F2E,$00: POKE $9F2F,$D7
10 POKE $9F2D,$12: POKE $9F2E,$80: POKE $9F2F,$D7
11 POKE $9F30,$0: POKE $9F31,$0: POKE $9F32,$0: POKE $9F33,$0
12 POKE $9F29,$33
13 CLS: PRINT "POKING PALETTE"
Expand Down Expand Up @@ -32,7 +32,7 @@
110 LET S = 1280 + C + K:REM $500
120 LET R% = S/256
130 POKE $9F20,S AND $FF:POKE $9F21,R%
135 POKE $9F22, $10: REM SET HIGH ADDR TO
135 POKE $9F22, $11: REM SET HIGH ADDR TO
140 FOR I = 0 TO 45
150 READ A:POKE $9F23,A: C=C+1: NEXT I
160 K = K + 82
Expand Down
20 changes: 10 additions & 10 deletions samples/tile_wall/tile_wall.s
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
.code
jmp start
.proc set_mode ;target layer 0
lda #$12 ; 4bpp, 64x32 map
sta $9F2D
lda #$00 ; map base $00000
lda #$12 ; 4bpp, 64x32 map
sta $9F2D
lda #$80 ; map base $10000
sta $9F2E
lda #$d7 ; tile base $1A800, 16x16 tiles
lda #$d7 ; tile base $1A800, 16x16 tiles
sta $9F2F
lda #$0 ; zero out hscroll and vscroll hi and low
lda #$0 ; zero out hscroll and vscroll hi and low
sta $9F30
sta $9F31
sta $9F32
sta $9F33
lda #$33 ; enable layer 0 and 1, rgb
lda #$33; enable layer 0 and 1, rgb
sta $9F29
rts
.endproc
Expand Down Expand Up @@ -53,7 +53,7 @@ jmp start
.proc clear_map
VAR_ENTRIES_WRITTEN = $00
set_const_16 VAR_ENTRIES_WRITTEN, 0
v_address_set $00000, 1
v_address_set $10000, 1
loop:
;index at 0 is an empty tile in our map
lda #0
Expand Down Expand Up @@ -85,10 +85,10 @@ jmp start
sta VERA_ADDR_LO
lda $01
sta VERA_ADDR_MID
lda #$10
lda #$11
sta VERA_ADDR_HI
set_const_16 VAR_BYTES_WRITTEN_CUR_ROW, 0
loop:
loop:
lda ($02),y
sta VERA_DATA0
add_constant_16 VAR_BYTES_WRITTEN_TOTAL, 1
Expand All @@ -101,7 +101,7 @@ jmp start
.endproc

.proc load_tilemap_conflated
v_address_set $00000, 1
v_address_set $10000, 1
set_const_16 $00, tilemap_conflated

TARGET = 4096 ;loop until size reached
Expand Down

0 comments on commit 92d608f

Please sign in to comment.