letter_test: test some letters

This commit is contained in:
Vince Weaver 2023-01-30 14:28:39 -05:00
parent 0507b6bd37
commit 12bef90a01
11 changed files with 289 additions and 0 deletions

View File

@ -0,0 +1,44 @@
include ../../../Makefile.inc
DOS33 = ../../../utils/dos33fs-utils/dos33
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
LINKER_SCRIPTS = ../../../linker_scripts/
EMPTY_DISK = ../../../empty_disk/
all: letter_test.dsk
letter_test.dsk: HELLO TEST.BAS LETTER_TEST
cp $(EMPTY_DISK)/empty.dsk letter_test.dsk
$(DOS33) -y letter_test.dsk SAVE A HELLO
$(DOS33) -y letter_test.dsk SAVE A TEST.BAS
$(DOS33) -y letter_test.dsk BSAVE -a 0x1000 LETTER_TEST
LETTER_TEST: letter_test.o
ld65 -o LETTER_TEST letter_test.o -C $(LINKER_SCRIPTS)/apple2_1000.inc
letter_test.o: letter_test.s
ca65 -o letter_test.o letter_test.s -l letter_test.lst
###
HELLO: hello.bas
$(TOKENIZE) < hello.bas > HELLO
###
TEST.BAS: test.bas
$(TOKENIZE) < test.bas > TEST.BAS
###
DSR.BAS: dsr.bas
$(TOKENIZE) < dsr.bas > DSR.BAS
####
clean:
rm -f *~ *.o *.lst HELLO DSR LETTER_TEST

View File

@ -0,0 +1,6 @@
5 HOME
10 HTAB 10:PRINT "DSR SHAPETABLE PARTY"
20 HTAB 15:PRINT "BY DEATER"
30 PRINT
40 PRINT "TO RUN: BRUN DSRSHAPE"
120 PRINT CHR$(4);"CATALOG"

View File

@ -0,0 +1,182 @@
; letter test
; zero page locations
HGR_SHAPE = $1A
SEEDL = $4E
FRAME = $A4
OUR_ROT = $A5
RND_EXP = $C9
HGR_PAGE = $E6
HGR_SCALE = $E7
HGR_ROTATION = $F9
WHICH = $FB
SCALE = $FC
ROTATE = $FD
XPOS = $FE
YPOS = $FF
; Soft Switches
KEYPRESS = $C000
KEYRESET = $C010
SPEAKER = $C030
PAGE0 = $C054
PAGE1 = $C055
; ROM calls
RND = $EFAE
HGR2 = $F3D8
HGR = $F3E2
HCLR = $F3F2
HCLR_COLOR = $F3F4
HPOSN = $F411
XDRAW0 = $F65D
TEXT = $FB36 ; Set text mode
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
letter_test:
;=========================================
; SETUP
;=========================================
jsr HGR
jsr HGR2 ; set/clear HGR page2 to black
; Hi-res graphics, no text at bottom
; Y=0, A=$60 after this call
lda #5
sta HGR_SCALE
lda #0
sta ROTATE
sta WHICH
;=========================
; slide in
;=========================
outer_slide_loop:
lda #255
sta XPOS
lda #100
sta YPOS
slide_loop:
jsr xdraw
lda #100
jsr WAIT
jsr xdraw
dec XPOS
dec XPOS
lda XPOS
lsr
and #$f
tax
lda rotate_pattern,X
sta ROTATE
lda XPOS
ends_smc:
cmp #65
bcs slide_loop
jsr xdraw
inc WHICH
lda WHICH
tax
lda deater_ends,X
sta ends_smc+1
lda deater_offsets,X
sta xdraw_offset_smc+1
bpl outer_slide_loop
end:
jmp end
;=======================
; xdraw
;=======================
xdraw:
ldy #0
ldx XPOS
lda YPOS
jsr HPOSN ; X= (y,x) Y=(a)
clc
lda #<shape_table_d
xdraw_offset_smc:
adc #0
tax
ldy #>shape_table_d
lda ROTATE
jmp XDRAW0
.if 0
;=======================
; flip page
;=======================
flip_page:
lda HGR_PAGE
eor #$60
sta HGR_PAGE
clc
rol
rol
tax
lda PAGE1,X
rts
.endif
; ldy #3 ; 2
;init_loop:
; tya ; 1
; asl
; asl
; sta rotate_pattern,Y; 3
; dey ; 1
; bne init_loop ; 2
rotate_pattern:
.byte 0,3,6,9, 9,6,3,0, 0,$FD,$FA,$F7, $F7,$FA,$FD, 0
deater_offsets:
.byte 0 ; D
.byte 8 ; E
.byte 15 ; A
.byte 23 ; T
.byte 8 ; E
.byte 30 ; R
.byte $FF ; end
deater_ends:
.byte 65,90,115,140,165,190
shape_table:
shape_table_d:
.byte $23,$2c,$2e,$36, $37,$27,$04,$00
shape_table_e:
.byte $27,$2c,$95,$12, $3f,$24,$00
shape_table_a:
.byte $23,$2c,$35,$96, $24,$3f,$36,$00
shape_table_t:
.byte $12,$24,$e4,$2b, $2d,$05,$00
shape_table_r:
.byte $97,$24,$24,$2d, $36,$37,$35,$06,$00

View File

@ -0,0 +1,8 @@
# Number of shapes
1
START
RT RT DN DN LT LT NLT
LT LT UP UP RT RT NDN NDN UP UP UP UP NDN NDN NRT
UP UP RT RT NRT NRT NRT NDN NDN LT LT DN DN
STOP

View File

@ -0,0 +1,10 @@
# Number of shapes
1
START
NLT UP UP
RT RT
DN DN NDN NDN
UP UP
LT LT DN DN
STOP

View File

@ -0,0 +1,6 @@
# Number of shapes
1
START
NLT UP UP RT DN RT DN DN LT DN LT UP UP
STOP

View File

@ -0,0 +1,6 @@
# Number of shapes
1
START
LT UP UP RT RT NDN NDN NDN NDN LT LT UP UP
STOP

View File

@ -0,0 +1,6 @@
# Number of shapes
1
START
LT NDN NDN UP UP UP UP RT RT DN DN LT DN RT DN DN
STOP

View File

@ -0,0 +1,7 @@
# Number of shapes
1
START
LT UP UP RT RT NDN NDN NLT
RT DN DN LT LT
STOP

View File

@ -0,0 +1,6 @@
# Number of shapes
1
START
NDN NDN UP UP UP UP NLT NLT RT RT RT RT
STOP

View File

@ -0,0 +1,8 @@
10 HIMEM:8165
20 POKE 232,229:POKE 233,31
30 FOR L=8165 TO 8175: READ B:POKE L,B:NEXT L
35 HGR:ROT=0:SCALE=2
40 FOR I=1 TO 1: XDRAW I AT I*10,100:NEXT I
90 END
100 DATA 1,0,4,0,39,44,149,43,54,63
101 DATA 0