Skip to content

Commit

Permalink
fix tile text sample
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume committed Jun 10, 2020
1 parent 18dbfc1 commit 8b77330
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
4 changes: 2 additions & 2 deletions samples/Makefile.vars
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
ALOEVERA = "../../target/debug/aloevera"
X16_EMU = "../../../x16-emulator/x16emu"
X16_ROM = "../../../x16-rom/build/x16/rom.bin"
X16_EMU_FLAGS = -run -scale 2
#DEBUG = -debug 092B
X16_EMU_FLAGS = -run -scale 4
#DEBUG = -debug 9000
2 changes: 1 addition & 1 deletion samples/tile_text/tile_text.bas
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
20 FOR I = 0 TO 511
40 READ A:POKE $9F23,A:NEXT I
50 REM PUT THIS BACK FOR JUST TILE BASE RESULT
60 REM GOTO 1000
60 GOTO 1000
100 REM POKE TILEMAP DATA INTO MAP BASE
101 REM START AT BASE + A02 AS PER PANE DATA
110 LET C = 0
Expand Down
20 changes: 6 additions & 14 deletions samples/tile_text/tile_text.s
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,15 @@ VERA_DATA_PORT = $9F23

.code
jmp start
.proc load_tileset
lda #$0
sta VERA_ADDR
lda #$F8
sta VERA_ADDR + 1
lda #$10
sta VERA_ADDR + 2

.proc load_imageset
v_address_set $F800, 1
set_const_16 $00, imageset

TARGET = 512 ;loop until 512 reached
TARGET = 512 ;loop until size reached

loop:
lda ($00),y
sta VERA_DATA_PORT
sta VERA_DATA0
add_constant_16 $00, 1
loop_till_eq_16 $00, (imageset + TARGET), loop
rts
Expand Down Expand Up @@ -62,14 +56,12 @@ jmp start
.endproc

start:
jsr load_tileset
jsr load_tilemap; comment out if you just want to see the tileset result
jsr load_imageset
jsr load_tilemap; comment out if you just want to see the imageset result
rts

.segment "RODATA"
imageset:
.include "output/imagesets/text_set_1.ca65.inc"
tilemap:
.include "output/tilemaps/tilemap_1.ca65.inc"
; Or comment out above and comment in below to observe 256 color text mode
;.include "output/tilemaps/tilemap_2.ca65.inc"

0 comments on commit 8b77330

Please sign in to comment.