mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-23 05:29:03 +00:00
dsr64: add another tiny demo
This commit is contained in:
parent
b81d473ad3
commit
9024856cde
46
demos/l/dsr_64/Makefile
Normal file
46
demos/l/dsr_64/Makefile
Normal file
@ -0,0 +1,46 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
|
||||
all: dsr_64.dsk
|
||||
|
||||
dsr_64.dsk: HELLO DSR
|
||||
cp $(EMPTYDISK) dsr_64.dsk
|
||||
$(DOS33) -y dsr_64.dsk SAVE A HELLO
|
||||
$(DOS33) -y dsr_64.dsk BSAVE -a 0x70 DSR
|
||||
|
||||
###
|
||||
|
||||
submit: xdraw16.zip
|
||||
|
||||
xdraw16.zip: DSR dsr.s file_id.diz dsr_64.dsk
|
||||
mkdir -p lovebyte2021_dsr_64
|
||||
cp DSR ./lovebyte2021_dsr_64
|
||||
cp dsr.s ./lovebyte2021_dsr_64
|
||||
cp file_id.diz ./lovebyte2021_dsr_64
|
||||
cp dsr_64.dsk ./lovebyte2021_dsr_64
|
||||
cp dsr_720p.mp4 ./lovebyte2021_dsr_64
|
||||
zip -r xdraw16.zip lovebyte2021_dsr_64
|
||||
|
||||
####
|
||||
|
||||
|
||||
####
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
DSR: dsr.o
|
||||
ld65 -o DSR dsr.o -C ./apple2_70_zp.inc
|
||||
|
||||
dsr.o: dsr.s
|
||||
ca65 -o dsr.o dsr.s -l dsr.lst
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO DSR *.zip
|
12
demos/l/dsr_64/apple2_70_zp.inc
Normal file
12
demos/l/dsr_64/apple2_70_zp.inc
Normal file
@ -0,0 +1,12 @@
|
||||
MEMORY {
|
||||
ZP: start = $70, size = $80, type = rw;
|
||||
RAM: start = $E7, size = $8E00, file = %O;
|
||||
}
|
||||
|
||||
SEGMENTS {
|
||||
#CODE: load = RAM, type = ro;
|
||||
#RODATA: load = RAM, type = ro;
|
||||
#DATA: load = RAM, type = rw;
|
||||
#BSS: load = RAM, type = bss, define = yes;
|
||||
ZEROPAGE: load = ZP, type = ro;
|
||||
}
|
134
demos/l/dsr_64/dsr.s
Normal file
134
demos/l/dsr_64/dsr.s
Normal file
@ -0,0 +1,134 @@
|
||||
; Tiny DSR
|
||||
|
||||
; 82 bytes -- original
|
||||
; 77 bytes -- after some work (forgot to document)
|
||||
; 75 bytes -- count down frame counter
|
||||
; 73 bytes -- Y is 0 after HCLR
|
||||
; 72 bytes -- shave byte off page flip code
|
||||
; 70 bytes -- end by crashing to monitor
|
||||
; 67 bytes -- replace frame count with rotate
|
||||
; 64 bytes -- always increment scale
|
||||
|
||||
; zero page locations
|
||||
HGR_SHAPE = $1A
|
||||
HGR_SHAPE2 = $1B
|
||||
HGR_BITS = $1C
|
||||
GBASL = $26
|
||||
GBASH = $27
|
||||
A5H = $45
|
||||
XREG = $46
|
||||
YREG = $47
|
||||
; C0-CF should be clear
|
||||
; D0-DF?? D0-D5 = HGR scratch?
|
||||
HGR_DX = $D0 ; HGLIN
|
||||
HGR_DX2 = $D1 ; HGLIN
|
||||
HGR_DY = $D2 ; HGLIN
|
||||
HGR_QUADRANT = $D3
|
||||
HGR_E = $D4
|
||||
HGR_E2 = $D5
|
||||
HGR_X = $E0
|
||||
HGR_X2 = $E1
|
||||
HGR_Y = $E2
|
||||
HGR_COLOR = $E4
|
||||
HGR_HORIZ = $E5
|
||||
HGR_PAGE = $E6
|
||||
HGR_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
|
||||
; soft-switch
|
||||
PAGE1 = $C054
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
||||
HCLR = $F3F2 ; A=0, Y=0 after, X unchanged
|
||||
|
||||
OUR_ROT=$E0
|
||||
|
||||
|
||||
.zeropage
|
||||
.globalzp rot_smc
|
||||
|
||||
|
||||
; spinning dsr logo
|
||||
|
||||
dsr_spin:
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
|
||||
sty HGR_SCALE ; 2 init scale to 0
|
||||
|
||||
;=========================================
|
||||
; MAIN LOOP
|
||||
;=========================================
|
||||
|
||||
main_loop:
|
||||
inc HGR_SCALE ; 2 ; increment scale
|
||||
|
||||
inc rot_smc+1 ; 2 ; rotate
|
||||
inc rot_smc+1 ; 2
|
||||
|
||||
|
||||
;=======================
|
||||
; xdraw
|
||||
;=======================
|
||||
xdraw:
|
||||
; setup X and Y co-ords
|
||||
|
||||
ldy #0 ; XPOSH always 0 for us
|
||||
ldx #110
|
||||
lda #96
|
||||
jsr HPOSN ; X= (y,x) Y=(a)
|
||||
; after, A=COLOR.BITS
|
||||
; Y = xoffset (140/7=20?)
|
||||
; X = remainder?
|
||||
|
||||
jsr HCLR ; A=0 and Y=0 after, X=unchanged
|
||||
|
||||
ldx #<shape_dsr ; point to our shape
|
||||
; ldy #>shape_dsr ; this is always zero since in zero page
|
||||
|
||||
rot_smc:
|
||||
lda #$0 ; set rotation
|
||||
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
|
||||
flip_page:
|
||||
; flip draw page $20/$40
|
||||
lda HGR_PAGE
|
||||
eor #$60
|
||||
sta HGR_PAGE
|
||||
|
||||
; flip page
|
||||
; have $20/$40 want to map to C054/C055
|
||||
|
||||
asl
|
||||
asl ; $20 -> C=1 $00
|
||||
asl ; $40 -> C=0 $00
|
||||
rol
|
||||
tax
|
||||
sta PAGE1,X
|
||||
|
||||
; A and X are 0/1 here
|
||||
|
||||
; if rot_smc not 64 then loop
|
||||
|
||||
bit rot_smc+1 ; set V if bit 6 set
|
||||
bvc main_loop ; 2
|
||||
|
||||
|
||||
; fall through at end and crash
|
||||
|
||||
|
||||
shape_dsr:
|
||||
.byte $2d,$36,$ff,$3f
|
||||
.byte $24,$ad,$22,$24,$94,$21,$2c,$4d
|
||||
.byte $91,$3f,$36,$00
|
5
demos/l/dsr_64/file_id.diz
Normal file
5
demos/l/dsr_64/file_id.diz
Normal file
@ -0,0 +1,5 @@
|
||||
Tiny Xdraw
|
||||
-
|
||||
Hi-res Xdraw Pattern
|
||||
16-byte Intro for Apple II, Lovebyte 2021
|
||||
by Deater / dSr
|
8
demos/l/dsr_64/hello.bas
Normal file
8
demos/l/dsr_64/hello.bas
Normal file
@ -0,0 +1,8 @@
|
||||
5 HOME
|
||||
10 PRINT "TINY XDRAW -- A 16 BYTE APPLE II INTRO"
|
||||
15 PRINT " BY DEATER / DSR"
|
||||
20 PRINT CHR$(4)"CATALOG"
|
||||
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN DSR'"
|
||||
30 GET A$
|
||||
35 PRINT
|
||||
40 PRINT CHR$(4)"BRUN DSR"
|
Loading…
x
Reference in New Issue
Block a user