mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-06 14:30:18 +00:00
orb: making sure we don't forget what we've learned
This commit is contained in:
parent
7c27921394
commit
5a73be34b7
@ -20,7 +20,8 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
STAROOPS.BAS HGRSTARFIELD.BAS COOL_BOT.BAS WEB.BAS ORB.BAS \
|
||||
FIREWORKS.BAS THINKING.BAS ARCS.BAS WIRE_HGR.BAS STATIC.BAS \
|
||||
OVAL.BAS OVAL_HGR.BAS MOVING.BAS THICK_SINE.BAS TURKEY.BAS \
|
||||
FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS
|
||||
FLAME_HGR.BAS RECT.BAS SNOWY.BAS EDGAR.BAS OOPS4.BAS OOPS3.BAS \
|
||||
HORROR.BAS
|
||||
# cp $(EMPTY_DISK)/empty.dsk appleiibot.dsk
|
||||
cp empty.dsk appleiibot.dsk
|
||||
$(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
||||
@ -110,6 +111,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
$(DOS33) -y appleiibot.dsk SAVE A EDGAR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A OOPS4.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A OOPS3.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A HORROR.BAS
|
||||
|
||||
####
|
||||
|
||||
@ -621,5 +623,10 @@ FLAME_HGR.BAS: flame_hgr.bas
|
||||
|
||||
####
|
||||
|
||||
HORROR.BAS: horror.bas
|
||||
$(TOKENIZE) < horror.bas > HORROR.BAS
|
||||
|
||||
####
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst convert_to convert_from convert_qkumba convert_vmw make_boxes convert_back convert_tgreene LOAD *.BAS
|
||||
|
2
basic/appleiibot/horror.bas
Normal file
2
basic/appleiibot/horror.bas
Normal file
@ -0,0 +1,2 @@
|
||||
1FORI=0TO134:POKE1013+I,4*PEEK(2126+I)-204+(PEEK(2261+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&"/fo]UTjTrY2TjSqZ3AhqleQq_8lcYpY4<e<4cqAkq[1Sr359GqLdQqUoEqTqhp\dBrJoldZ3No\k43;1]]S9En]Vo]G8Pp[38HpVo=*C3P]p5[3[3;6ndh5gWpdp_Z\rm3mp:o3S%+4>04WCZ+V)(5-8Z@*5XLY<9L$P=3&/<IY%%GE8&%CS
|
@ -3,9 +3,11 @@ include ../../../Makefile.inc
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
PICTUREDSK = ~/research/picturedsk.git/picturedsk
|
||||
|
||||
all: flyer_512.dsk
|
||||
all: flyer_512.dsk flyer_512.woz
|
||||
|
||||
###
|
||||
|
||||
flyer_512.dsk: FLYER
|
||||
# 0, 7, 14, 6, 13, 5, 12, 4, 11, 3, 10, 2, 9, 1, 8, 15
|
||||
@ -15,6 +17,9 @@ flyer_512.dsk: FLYER
|
||||
|
||||
###
|
||||
|
||||
flyer_512.woz: FLYER
|
||||
$(PICTUREDSK) ./flux_image/desire2.bmp flyer_512.woz FLYER
|
||||
|
||||
submit: text8.zip
|
||||
|
||||
text8.zip: FLYER flyer.s file_id.diz flyer_512.dsk
|
||||
|
@ -5,5 +5,7 @@ Shapetable flyer with mockingboard music
|
||||
by Deater / dSr
|
||||
music by mA2E
|
||||
|
||||
picturedsk woz disk flux tool by Ben Zotto
|
||||
|
||||
Note: assumes Mockingboard in Slot#4.
|
||||
Music only plays on left speaker.
|
||||
|
BIN
demos/l/flyer_512/flux_image/desire2.bmp
Normal file
BIN
demos/l/flyer_512/flux_image/desire2.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 149 KiB |
@ -7,26 +7,26 @@ TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTYDISK = ../../../empty_disk
|
||||
|
||||
all: combo.dsk
|
||||
all: orb.dsk
|
||||
|
||||
$(DOS33):
|
||||
cd ../../utils/dos33fs-utils && make
|
||||
|
||||
combo.dsk: $(DOS33) HELLO COMBO
|
||||
cp $(EMPTYDISK)/empty.dsk combo.dsk
|
||||
$(DOS33) -y combo.dsk SAVE A HELLO
|
||||
$(DOS33) -y combo.dsk BSAVE -a 0xc00 COMBO
|
||||
orb.dsk: $(DOS33) HELLO COMBO
|
||||
cp $(EMPTYDISK)/empty.dsk orb.dsk
|
||||
$(DOS33) -y orb.dsk SAVE A HELLO
|
||||
$(DOS33) -y orb.dsk BSAVE -a 0xc00 COMBO
|
||||
|
||||
###
|
||||
|
||||
submit: combo_256.zip
|
||||
|
||||
combo_256.zip: BOXES boxes.s file_id.diz combo.dsk
|
||||
combo_256.zip: BOXES boxes.s file_id.diz orb.dsk
|
||||
mkdir -p lovebyte2022_combo_256
|
||||
cp BOXES ./lovebyte2022_combo_256
|
||||
cp boxes.s ./lovebyte2022_combo_256
|
||||
cp file_id.diz ./lovebyte2022_combo_256
|
||||
cp combo.dsk ./lovebyte2022_combo_256
|
||||
cp orb.dsk ./lovebyte2022_combo_256
|
||||
cp combo_256_720p.mp4 ./lovebyte2022_combo_256
|
||||
zip -r combo_256.zip lovebyte2022_combo_256
|
||||
|
||||
|
@ -7,8 +7,8 @@ EMPTY_DISK = ../../../empty_disk
|
||||
|
||||
all: circles.dsk
|
||||
|
||||
circles.dsk: HELLO CIRCLES CIRCLES_FILL ARCS WEB PAC ORB \
|
||||
BRES.BAS BRESBOT.BAS BRESCOOL.BAS \
|
||||
circles.dsk: HELLO CIRCLES CIRCLES_FILL ARCS WEB PAC ORB ORB_TINY \
|
||||
BRES.BAS BRESBOT.BAS BRESCOOL.BAS HORROR \
|
||||
MID.BAS MIDBOT.BAS MIDCOOL.BAS BRESTEST.BAS ARCS_BOT
|
||||
cp $(EMPTY_DISK)/empty.dsk circles.dsk
|
||||
$(DOS33) -y circles.dsk SAVE A HELLO
|
||||
@ -25,6 +25,8 @@ circles.dsk: HELLO CIRCLES CIRCLES_FILL ARCS WEB PAC ORB \
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x03f5 WEB
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x0C00 PAC
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x03f5 ORB
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x03f5 ORB_TINY
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x03f5 HORROR
|
||||
$(DOS33) -y circles.dsk BSAVE -a 0x9600 ARCS_BOT
|
||||
|
||||
###
|
||||
@ -124,6 +126,22 @@ orb.o: orb.s
|
||||
ca65 -o orb.o orb.s -l orb.lst
|
||||
|
||||
|
||||
#
|
||||
|
||||
ORB_TINY: orb_tiny.o
|
||||
ld65 -o ORB_TINY orb_tiny.o -C $(LINKER_SCRIPTS)/apple2_3f5.inc
|
||||
|
||||
orb_tiny.o: orb_tiny.s
|
||||
ca65 -o orb_tiny.o orb_tiny.s -l orb_tiny.lst
|
||||
|
||||
#
|
||||
|
||||
HORROR: horror.o
|
||||
ld65 -o HORROR horror.o -C $(LINKER_SCRIPTS)/apple2_3f5.inc
|
||||
|
||||
horror.o: horror.s
|
||||
ca65 -o horror.o horror.s -l horror.lst
|
||||
|
||||
|
||||
|
||||
###
|
||||
@ -131,4 +149,4 @@ orb.o: orb.s
|
||||
clean:
|
||||
rm -f *~ *.o *.lst CIRCLES ARCS WEB CIRCLES_FILL PAC ORB \
|
||||
BRES.BAS BRESBOT.BAS BRESCOOL.BAS BRESTEST.BAS \
|
||||
MID.BAS MIDBOT.BAS MIDCOOL.BAS
|
||||
MID.BAS MIDBOT.BAS MIDCOOL.BAS ORB_TINY HORROR
|
||||
|
179
graphics/hgr/circles/horror.s
Normal file
179
graphics/hgr/circles/horror.s
Normal file
@ -0,0 +1,179 @@
|
||||
; horror
|
||||
|
||||
; this was found accidentally when doing the lovebyte demo
|
||||
|
||||
; zero page
|
||||
|
||||
HGR_COLOR = $E4
|
||||
|
||||
COUNT = $F6
|
||||
XX = $F7
|
||||
MINUSXX = $F8
|
||||
YY = $F9
|
||||
MINUSYY = $FA
|
||||
D = $FB
|
||||
R = $FC
|
||||
DADD = $FD
|
||||
|
||||
|
||||
; ROM routines
|
||||
|
||||
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
|
||||
HPLOT0 = $F457 ; plot at (Y,X), (A)
|
||||
HLINRL = $F530 ; line to (X,A), (Y)
|
||||
HCOLOR1 = $F6F0 ; set HGR_COLOR to value in X
|
||||
|
||||
|
||||
|
||||
horror:
|
||||
|
||||
jsr HGR2 ; after, A=0, Y=0
|
||||
|
||||
; a=0, y=0 here
|
||||
|
||||
tax ; x=0
|
||||
|
||||
dey ; set init color to white
|
||||
sty HGR_COLOR ; set init color to white
|
||||
|
||||
draw_next:
|
||||
stx R
|
||||
|
||||
;===============================
|
||||
; draw circle
|
||||
;===============================
|
||||
; draw circle at (CX,CY) of radius R
|
||||
; signed 8-bit math so problems if R > 64?
|
||||
|
||||
lda #0
|
||||
sta XX ; XX = 0
|
||||
|
||||
stx YY ; YY =R (X is R here)
|
||||
|
||||
lda #3 ; D=3-2*R
|
||||
sec
|
||||
sbc R
|
||||
sbc R
|
||||
sta D
|
||||
|
||||
; always odd, never zero
|
||||
|
||||
bne do_plots ; bra skip ahead first time through
|
||||
|
||||
circle_loop:
|
||||
inc XX ; XX=XX+1
|
||||
|
||||
lda XX ; XX is common both paths
|
||||
ldy #6 ; default path add 6
|
||||
|
||||
; IF D>0 THEN Y=Y-1:D=D+4*(X-Y)+10
|
||||
bit D ; check if negative w/o changing A
|
||||
bmi d_negative
|
||||
|
||||
dec YY ; YY=YY-1
|
||||
|
||||
d_positive:
|
||||
; D=D+4*(XX-YY)+10
|
||||
|
||||
; XX is already in A
|
||||
sec
|
||||
sbc YY
|
||||
ldy #10
|
||||
d_negative:
|
||||
; ELSE D=D+4*(XX)+6
|
||||
common_D:
|
||||
sty DADD
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc DADD
|
||||
adc D
|
||||
sta D
|
||||
|
||||
do_plots:
|
||||
; setup constants
|
||||
|
||||
lda XX
|
||||
eor #$FF
|
||||
sta MINUSXX
|
||||
inc MINUSXX
|
||||
|
||||
lda YY
|
||||
eor #$FF
|
||||
sta MINUSYY
|
||||
inc MINUSYY
|
||||
|
||||
; HPLOT CX+X,CY+Y
|
||||
; HPLOT CX-X,CY+Y
|
||||
; HPLOT CX+X,CY-Y
|
||||
; HPLOT CX-X,CY-Y
|
||||
; HPLOT CX+Y,CY+X
|
||||
; HPLOT CX-Y,CY+X
|
||||
; HPLOT CX+Y,CY-X
|
||||
; HPLOT CX-Y,CY-X
|
||||
|
||||
lda #3
|
||||
sta COUNT
|
||||
pos_loop:
|
||||
|
||||
; calc left side
|
||||
|
||||
; calc X co-ord
|
||||
|
||||
lda COUNT
|
||||
ora #$1
|
||||
eor #$2
|
||||
tax
|
||||
; lda CX
|
||||
|
||||
|
||||
lda #128
|
||||
clc
|
||||
adc XX,X
|
||||
tax
|
||||
|
||||
; calc y co-ord
|
||||
|
||||
ldx COUNT
|
||||
; lda CY
|
||||
lda #96
|
||||
clc
|
||||
adc XX,X
|
||||
|
||||
ldy #0
|
||||
|
||||
jsr HPLOT0 ; plot at (Y,X), (A)
|
||||
|
||||
|
||||
; calc right side
|
||||
lda COUNT
|
||||
and #$2
|
||||
eor #$2
|
||||
tax
|
||||
lda XX,X
|
||||
asl
|
||||
|
||||
ldy #0
|
||||
ldx #0
|
||||
jsr HLINRL ; plot relative (X,A), (Y)
|
||||
; so in our case (0,XX*2),0
|
||||
|
||||
|
||||
dec COUNT
|
||||
bpl pos_loop
|
||||
|
||||
; IF YY>=XX THEN 4
|
||||
; equivelant to IF XX<YY
|
||||
; but sadly appears we need IF XX<=YY for same effect
|
||||
lda YY
|
||||
cmp XX
|
||||
bcs circle_loop
|
||||
|
||||
done:
|
||||
ldx R
|
||||
inx ; increment radius
|
||||
jsr HCOLOR1 ; use as color
|
||||
|
||||
; cpx #48 ; run until R=48
|
||||
bne draw_next ; loop (GOTO 1)
|
||||
|
197
graphics/hgr/circles/orb_tiny.s
Normal file
197
graphics/hgr/circles/orb_tiny.s
Normal file
@ -0,0 +1,197 @@
|
||||
; orb
|
||||
|
||||
; this was found accidentally when trying to draw circles
|
||||
; it's doing Bresenham circle algo I think, which does weird
|
||||
; things when radius=0
|
||||
|
||||
; optimized for lovebyte2022
|
||||
|
||||
|
||||
; zero page
|
||||
|
||||
HGR_COLOR = $E4
|
||||
|
||||
COUNT = $F6
|
||||
XX = $F7
|
||||
MINUSXX = $F8
|
||||
YY = $F9
|
||||
MINUSYY = $FA
|
||||
D = $FB
|
||||
R = $FC
|
||||
DADD = $FD
|
||||
|
||||
|
||||
; ROM routines
|
||||
|
||||
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
|
||||
HPLOT0 = $F457 ; plot at (Y,X), (A)
|
||||
HLINRL = $F530 ; line to (X,A), (Y)
|
||||
HCOLOR1 = $F6F0 ; set HGR_COLOR to value in X
|
||||
|
||||
|
||||
|
||||
orb:
|
||||
jsr HGR2
|
||||
|
||||
; a=0, y=0 here (it's after HGR2)
|
||||
|
||||
tax ; x=0 (set R=0)
|
||||
|
||||
dey ; set init color to white
|
||||
sty HGR_COLOR ; set init color to white
|
||||
|
||||
draw_next:
|
||||
; X is always R here
|
||||
|
||||
stx R
|
||||
|
||||
;===============================
|
||||
; draw circle
|
||||
;===============================
|
||||
; draw circle at (CX,CY) of radius R
|
||||
; signed 8-bit math so problems if R > 64?
|
||||
|
||||
lda #0
|
||||
sta XX ; XX = 0
|
||||
|
||||
stx YY ; YY =R (X is R here)
|
||||
|
||||
lda #3 ; D=3-2*R
|
||||
sec
|
||||
sbc R
|
||||
sbc R
|
||||
|
||||
; D is now in A
|
||||
|
||||
; always odd, never zero
|
||||
|
||||
bne do_plots ; bra skip ahead first time through
|
||||
|
||||
circle_loop:
|
||||
inc XX ; XX=XX+1
|
||||
|
||||
lda XX ; XX is common both paths
|
||||
ldy #6 ; default path add 6
|
||||
|
||||
; IF D>0 THEN Y=Y-1:D=D+4*(X-Y)+10
|
||||
bit D ; check if negative w/o changing A
|
||||
bmi d_negative
|
||||
|
||||
dec YY ; YY=YY-1
|
||||
|
||||
d_positive:
|
||||
; D=D+4*(XX-YY)+10
|
||||
|
||||
; XX is already in A
|
||||
; sec ; saves a byte, seems to be OK?
|
||||
sbc YY
|
||||
ldy #10
|
||||
d_negative:
|
||||
; ELSE D=D+4*(XX)+6
|
||||
common_D:
|
||||
sty DADD
|
||||
asl
|
||||
asl
|
||||
clc
|
||||
adc DADD
|
||||
adc D
|
||||
|
||||
do_plots:
|
||||
; D is always in A here
|
||||
|
||||
sta D
|
||||
|
||||
; setup plus/minus XX/YY
|
||||
|
||||
ldx #2
|
||||
plus_minus_loop:
|
||||
lda XX,X
|
||||
eor #$FF
|
||||
sta MINUSXX,X
|
||||
inc MINUSXX,X
|
||||
dex
|
||||
dex
|
||||
bpl plus_minus_loop
|
||||
|
||||
; HPLOT CX+X,CY+Y
|
||||
; HPLOT CX-X,CY+Y
|
||||
; HPLOT CX+X,CY-Y
|
||||
; HPLOT CX-X,CY-Y
|
||||
; HPLOT CX+Y,CY+X
|
||||
; HPLOT CX-Y,CY+X
|
||||
; HPLOT CX+Y,CY-X
|
||||
; HPLOT CX-Y,CY-X
|
||||
|
||||
ldx #3
|
||||
|
||||
pos_loop:
|
||||
; calc left side
|
||||
|
||||
; COUNT already in X here
|
||||
|
||||
stx COUNT
|
||||
|
||||
; calc y co-ord
|
||||
|
||||
lda #96 ; center around y=96
|
||||
clc
|
||||
adc XX,X ; index with COUNT
|
||||
tay ; save for later
|
||||
|
||||
; calc x co-ord
|
||||
|
||||
txa ; get count
|
||||
ora #$1 ; generate pattern
|
||||
eor #$2 ; ???
|
||||
tax ; offset in array
|
||||
|
||||
lda #128 ; center around x=128
|
||||
clc
|
||||
adc XX,X
|
||||
|
||||
tax
|
||||
|
||||
tya ; restore Y co-ordinate
|
||||
ldy #0 ; always 0
|
||||
|
||||
jsr HPLOT0 ; plot at (Y,X), (A)
|
||||
|
||||
|
||||
; calc right side
|
||||
lda COUNT
|
||||
and #$2
|
||||
eor #$2
|
||||
tax
|
||||
lda XX,X
|
||||
asl
|
||||
|
||||
ldy #0
|
||||
ldx #0
|
||||
jsr HLINRL ; plot relative (X,A), (Y)
|
||||
; so in our case (0,XX*2),0
|
||||
|
||||
; X/A/Y saved to zero page
|
||||
; X/Y were zero
|
||||
ldx COUNT
|
||||
dex ; decrement count
|
||||
|
||||
bpl pos_loop
|
||||
|
||||
|
||||
; IF YY>=XX THEN 4
|
||||
; should be equivelant to IF XX<YY
|
||||
; but sadly appears we need IF XX<=YY for our initial effect
|
||||
lda YY
|
||||
cmp XX
|
||||
bcs circle_loop
|
||||
|
||||
done:
|
||||
ldx R
|
||||
inx ; increment radius
|
||||
jsr HCOLOR1 ; use as color
|
||||
|
||||
; cpx #48 ; run until R=48
|
||||
bne draw_next ; loop (GOTO 1)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user