mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-01 05:31:52 +00:00
lovebyte: wires again
This commit is contained in:
parent
217bfb131a
commit
9abcdcac62
49
demos/unused/wires_128/Makefile
Normal file
49
demos/unused/wires_128/Makefile
Normal file
@ -0,0 +1,49 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
LINKERSCRIPTS = ../../../linker_scripts/
|
||||
|
||||
all: wires.dsk
|
||||
|
||||
wires.dsk: HELLO WIRES
|
||||
cp $(EMPTYDISK) wires.dsk
|
||||
$(DOS33) -y wires.dsk SAVE A HELLO
|
||||
$(DOS33) -y wires.dsk BSAVE -a 0xc00 WIRES
|
||||
|
||||
###
|
||||
|
||||
submit: wires.zip
|
||||
|
||||
wires.zip: WIRES wires.s file_id.diz wires.dsk
|
||||
mkdir -p lovebyte2023_wires
|
||||
cp WIRES ./lovebyte2023_wires
|
||||
cp wires.s ./lovebyte2023_wires
|
||||
cp file_id.diz ./lovebyte2023_wires
|
||||
cp wires.dsk ./lovebyte2023_wires
|
||||
cp monitor.txt ./lovebyte2023_wires
|
||||
cp wires_screen.png ./lovebyte2023_wires
|
||||
cp wires_720p.mp4 ./lovebyte2023_wires
|
||||
zip -r wires.zip lovebyte2023_wires
|
||||
|
||||
####
|
||||
|
||||
|
||||
####
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
WIRES: wires.o
|
||||
ld65 -o WIRES wires.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
wires.o: wires.s
|
||||
ca65 -o wires.o wires.s -l wires.lst
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO WIRES *.zip
|
10
demos/unused/wires_128/file_id.diz
Normal file
10
demos/unused/wires_128/file_id.diz
Normal file
@ -0,0 +1,10 @@
|
||||
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-
|
||||
Spiraling Shape
|
||||
--------------------------------------
|
||||
Hi-res Xdraw Pattern
|
||||
with Sound!
|
||||
by Deater / dSr
|
||||
|
||||
31-byte Intro for Apple II
|
||||
Lovebyte 2024
|
||||
--------------------------------------
|
7
demos/unused/wires_128/hello.bas
Normal file
7
demos/unused/wires_128/hello.bas
Normal file
@ -0,0 +1,7 @@
|
||||
5 HOME
|
||||
10 PRINT " WIRES"
|
||||
20 PRINT CHR$(4)"CATALOG"
|
||||
25 PRINT:PRINT "PRESS ANY KEY TO 'BRUN WIRES'"
|
||||
30 GET A$
|
||||
35 PRINT
|
||||
40 PRINT CHR$(4)"BRUN WIRES"
|
132
demos/unused/wires_128/wires.s
Normal file
132
demos/unused/wires_128/wires.s
Normal file
@ -0,0 +1,132 @@
|
||||
; wires -- Apple II Hires
|
||||
|
||||
|
||||
; D0+ used by HGR routines
|
||||
|
||||
HGR_COLOR = $E4
|
||||
HGR_PAGE = $E6
|
||||
|
||||
GBASL = $26
|
||||
GBASH = $27
|
||||
|
||||
HGR_END2 = $FC
|
||||
HGR_END = $FD
|
||||
COUNT = $FE
|
||||
FRAME = $FF
|
||||
|
||||
; soft-switches
|
||||
|
||||
PAGE1 = $C054
|
||||
PAGE2 = $C055
|
||||
|
||||
; ROM routines
|
||||
|
||||
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
|
||||
HGR = $F3E2 ; set hires page1 and clear $2000-$3FFF
|
||||
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||
|
||||
wires:
|
||||
jsr HGR
|
||||
jsr HGR2 ; clear screen PAGE2 A and Y 0 after
|
||||
|
||||
reset_x:
|
||||
ldx #$0
|
||||
|
||||
switch_pages:
|
||||
lda HGR_PAGE
|
||||
eor #$60
|
||||
sta HGR_PAGE
|
||||
cmp #$40
|
||||
bne switch_page2
|
||||
bit PAGE1
|
||||
jmp outer_loop
|
||||
switch_page2:
|
||||
bit PAGE2
|
||||
|
||||
outer_loop:
|
||||
|
||||
;=====================================
|
||||
; pulse loop horizontal
|
||||
;=====================================
|
||||
; write out pattern to horizontal line
|
||||
; due to memory layout by going $4000-$43FF only draw every 8th line
|
||||
|
||||
|
||||
lda #$00
|
||||
tay
|
||||
|
||||
sta GBASL
|
||||
|
||||
lda HGR_PAGE ; point GBASL to $4000
|
||||
sta GBASH
|
||||
|
||||
clc
|
||||
adc #$4
|
||||
sta HGR_END
|
||||
adc #$1C
|
||||
sta HGR_END2
|
||||
horiz_loop:
|
||||
|
||||
lda even_lookup,X
|
||||
sta (GBASL),Y
|
||||
iny
|
||||
|
||||
lda odd_lookup,X
|
||||
sta (GBASL),Y
|
||||
iny
|
||||
|
||||
bne noflo2
|
||||
inc GBASH
|
||||
noflo2:
|
||||
|
||||
lda HGR_END
|
||||
cmp GBASH
|
||||
bne horiz_loop
|
||||
|
||||
;========================================
|
||||
; vertical loop
|
||||
;========================================
|
||||
|
||||
; A should already be $44 here
|
||||
; Y should be 0
|
||||
; X is position in pattern
|
||||
|
||||
; to be honest I don't remember how this works
|
||||
|
||||
vert_loop:
|
||||
txa
|
||||
|
||||
clc
|
||||
adc #2 ; $44 + 2? = $46
|
||||
asl ; = $8E
|
||||
asl ; shift left? = $1C + carry
|
||||
adc HGR_PAGE ; what? = $5D
|
||||
sbc GBASH ; huh - $44 = $19
|
||||
|
||||
cmp #8 ; WHAT IS GOING ON HERE?
|
||||
lda #$81
|
||||
bcs noeor
|
||||
ora #$02
|
||||
noeor:
|
||||
|
||||
sta (GBASL),Y ; store it out
|
||||
|
||||
inc GBASL ; skip two columns
|
||||
inc GBASL
|
||||
bne noflo
|
||||
inc GBASH
|
||||
noflo:
|
||||
lda HGR_END2
|
||||
cmp GBASH
|
||||
bne vert_loop
|
||||
|
||||
inx ; wrap at 7
|
||||
cpx #7
|
||||
beq reset_x
|
||||
|
||||
bne switch_pages ; bra
|
||||
|
||||
even_lookup:
|
||||
.byte $D7,$DD,$F5, $D5,$D5,$D5,$D5
|
||||
odd_lookup:
|
||||
.byte $AA,$AA,$AA, $AB,$AE,$BA,$EA
|
Loading…
Reference in New Issue
Block a user