mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-26 01:31:07 +00:00
entropy: add initial port
not working
This commit is contained in:
parent
efe7522ed4
commit
e4d0ce8a8b
161
still_alive/objects_shape.inc
Normal file
161
still_alive/objects_shape.inc
Normal file
@ -0,0 +1,161 @@
|
|||||||
|
; Applesoft Shape Table
|
||||||
|
|
||||||
|
; Size
|
||||||
|
.byte $07,00
|
||||||
|
; Offsets
|
||||||
|
.byte $10,$00 ; 0
|
||||||
|
.byte $1b,$00 ; 1
|
||||||
|
.byte $2e,$00 ; 2
|
||||||
|
.byte $42,$00 ; 3
|
||||||
|
.byte $61,$00 ; 4
|
||||||
|
.byte $80,$00 ; 5
|
||||||
|
.byte $8a,$00 ; 6
|
||||||
|
|
||||||
|
; Shape 0
|
||||||
|
; "Cross Hair" (why is this in quotes?)
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; ##.##
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; #
|
||||||
|
; START
|
||||||
|
; NLT NLT
|
||||||
|
; RT RT NRT NRT LT LT
|
||||||
|
; NDN NDN NDN NDN UP UP UP UP UP UP UP UP UP
|
||||||
|
; STOP
|
||||||
|
;
|
||||||
|
.byte $1b,$6d,$39,$97,$12,$24,$24,$24,$24, $04,$00
|
||||||
|
|
||||||
|
|
||||||
|
; Shape 1
|
||||||
|
;
|
||||||
|
; "Portal"
|
||||||
|
; #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # * #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; # #
|
||||||
|
; #
|
||||||
|
;
|
||||||
|
; START
|
||||||
|
; NLT NLT UP UP UP NRT UP UP UP NRT RT NDN
|
||||||
|
; DN DN DN NRT DN DN DN DN DN NLT DN DN DN NLT
|
||||||
|
; UP NLT UP UP UP NLT UP UP UP
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $1b,$24,$0c,$24,$0c,$15,$36,$0e,$36, $36,$1e,$36,$1e,$1c,$24,$1c,$24
|
||||||
|
.byte $04,$00
|
||||||
|
|
||||||
|
; Shape 2
|
||||||
|
; Sideways Portal
|
||||||
|
; #*#*#*#*#*#*#
|
||||||
|
; #*# #*#
|
||||||
|
; *# . #*
|
||||||
|
; #*# #*#
|
||||||
|
; #*#*#*#*#*#*#
|
||||||
|
; START
|
||||||
|
; NDN NDN NRT RT NRT RT NRT RT NRT UP
|
||||||
|
; RT NRT UP UP LT NLT UP
|
||||||
|
; LT NLT LT NLT LT NLT LT NLT LT NLT LT NLT DN
|
||||||
|
; LT NLT DN DN RT NRT DN
|
||||||
|
; RT NRT RT NRT RT
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $52,$0d,$0d,$0d,$6c,$24,$1f,$fc, $1f,$1f,$1f,$1f,$1f,$fe,$36,$0d
|
||||||
|
.byte $6e,$0d,$05,$00
|
||||||
|
|
||||||
|
; Shape 3
|
||||||
|
; Chell Right
|
||||||
|
;
|
||||||
|
; B B
|
||||||
|
; B ##
|
||||||
|
; B ###
|
||||||
|
; B ##
|
||||||
|
; B O ######
|
||||||
|
; O O ## ##
|
||||||
|
; O O .######
|
||||||
|
; O O
|
||||||
|
; O O
|
||||||
|
; O O
|
||||||
|
; B O
|
||||||
|
; B O
|
||||||
|
; B O O
|
||||||
|
; START
|
||||||
|
; NLT NLT DN DN DN DN DN DN RT NRT LT NLT NLT NLT NLT
|
||||||
|
; # FALL ARRESTOR BEGIN
|
||||||
|
; UP UP UP NRT UP UP UP UP UP NLT
|
||||||
|
; # HAIR
|
||||||
|
; UP UP UP UP NRT NRT RT NRT DN
|
||||||
|
; # FACE
|
||||||
|
; NLT LT DN RT RT DN NLT LT DN NRT DN RT NRT
|
||||||
|
; # GUN
|
||||||
|
; RT UP RT RT RT RT RT DN NLT LT LT NLT NLT NDN RT RT RT RT RT RT
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $1b,$36,$36,$36,$0d,$df,$1b,$24, $0c,$24,$24,$1c,$24,$64,$69,$1e
|
||||||
|
.byte $37,$2d,$1e,$77,$6e,$25,$2d,$2d, $f5,$ff,$13,$2d,$2d,$2d,$00
|
||||||
|
|
||||||
|
; Shape 4
|
||||||
|
; Chell LEFT
|
||||||
|
;
|
||||||
|
; START
|
||||||
|
; NRT NRT DN DN DN DN DN DN LT NLT RT NRT NRT NRT NRT
|
||||||
|
; # FALL ARRESTOR BEGIN
|
||||||
|
; UP UP UP NLT UP UP UP UP UP NRT
|
||||||
|
; # HAIR
|
||||||
|
; UP UP UP UP NLT NLT LT NLT DN
|
||||||
|
; # FACE
|
||||||
|
; NRT RT DN LT LT DN NRT RT DN NLT DN LT NLT
|
||||||
|
; # GUN
|
||||||
|
; LT UP LT LT LT LT LT DN NRT RT RT NRT NRT NDN LT LT LT LT LT LT
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $09,$36,$36,$36,$1f,$4d,$09,$24, $1c,$24,$24,$0c,$24,$e4,$fb,$0e
|
||||||
|
.byte $35,$3f,$0e,$f5,$fe,$27,$3f,$3f, $77,$6d,$11,$3f,$3f,$3f,$00
|
||||||
|
|
||||||
|
; Shape 5
|
||||||
|
; FireBall
|
||||||
|
;
|
||||||
|
; #
|
||||||
|
; # #
|
||||||
|
; # . #
|
||||||
|
; # #
|
||||||
|
; #
|
||||||
|
; START
|
||||||
|
; NDN NDN UP NRT UP NRT UP NLT UP NLT DN NLT DN NLT DN NRT DN NRT
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $12,$0c,$0c,$1c,$1c,$1e,$1e,$0e, $0e,$00
|
||||||
|
|
||||||
|
; Shape 6
|
||||||
|
; Blue Core
|
||||||
|
; #######
|
||||||
|
; ## ##
|
||||||
|
; ## # # # ##
|
||||||
|
; ## # . # ##
|
||||||
|
; ## # # # ##
|
||||||
|
; ## ##
|
||||||
|
; #######
|
||||||
|
|
||||||
|
; START
|
||||||
|
; # Inner
|
||||||
|
; NDN LT NLT UP UP RT NRT RT NRT DN DN LT NLT NDN NDN
|
||||||
|
; # Outer
|
||||||
|
; LT LT LT UP LT UP LT UP RT UP LT UP NRT RT UP RT RT RT RT RT RT DN
|
||||||
|
; # Upper Left
|
||||||
|
; RT DN RT DN LT DN RT DN NLT LT DN LT LT LT
|
||||||
|
; STOP
|
||||||
|
|
||||||
|
.byte $fa,$24,$0d,$0d,$36,$9f,$3a,$3f, $3c,$3c,$2c,$3c,$0c,$25,$2d,$2d
|
||||||
|
.byte $2d,$2e,$2e,$3e,$2e,$1e,$37,$3f, $07,$00
|
18
two-liners/Makefile
Normal file
18
two-liners/Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
include ../Makefile.inc
|
||||||
|
|
||||||
|
DOS33 = ../dos33fs-utils/dos33
|
||||||
|
TOKENIZE = ../asoft_basic-utils/tokenize_asoft
|
||||||
|
|
||||||
|
all: entropy.dsk
|
||||||
|
|
||||||
|
entropy.dsk: ENTROPY
|
||||||
|
$(DOS33) -y entropy.dsk BSAVE -a 0x0C00 ENTROPY
|
||||||
|
|
||||||
|
ENTROPY: entropy.o
|
||||||
|
ld65 -o ENTROPY entropy.o -C ../linker_scripts/apple2_c00.inc
|
||||||
|
|
||||||
|
entropy.o: entropy.s
|
||||||
|
ca65 -o entropy.o entropy.s -l entropy.lst
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.o *.lst ENTROPY
|
BIN
two-liners/entropy.dsk
Normal file
BIN
two-liners/entropy.dsk
Normal file
Binary file not shown.
101
two-liners/entropy.s
Normal file
101
two-liners/entropy.s
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
; Entropy
|
||||||
|
; by Dave McKellar of Toronto
|
||||||
|
; Two-line BASIC program
|
||||||
|
; Found on Beagle Brother's Apple Mechanic Disk
|
||||||
|
; Converted to 6502 Assembly by Vince Weaver
|
||||||
|
|
||||||
|
; 24001 ROT=0:FOR I=1 TO 15: READ A,B: POKE A,B: NEXT: DATA
|
||||||
|
; 232,252,233,29,7676,1,7678,4,7679,0,7680,18,7681,63,
|
||||||
|
; 7682,36,7683,36,7684,45,7685,45,7686,54,7687,54,7688,63,
|
||||||
|
; 7689,0
|
||||||
|
; 24002 FOR I=1 TO 99: HGR2: FOR E=.08 TO .15 STEP .01:
|
||||||
|
; FOR Y=4 to 189 STEP 6: FOR X=4 to 278 STEP 6:
|
||||||
|
; SCALE=(RND(1)<E)*RND(1)*E*20+1: XDRAW 1 AT X,Y:
|
||||||
|
; NEXT: NEXT: NEXT
|
||||||
|
|
||||||
|
|
||||||
|
; zero page locations
|
||||||
|
HGR_SHAPE = $1A
|
||||||
|
HGR_SCALE = $E7
|
||||||
|
HGR_ROTATION = $F9
|
||||||
|
XPOS = $FD
|
||||||
|
XPOSH = $FE
|
||||||
|
YPOS = $FF
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
|
||||||
|
entropy:
|
||||||
|
|
||||||
|
lda #<shape_table
|
||||||
|
sta HGR_SHAPE
|
||||||
|
lda #>shape_table
|
||||||
|
sta HGR_SHAPE+1
|
||||||
|
|
||||||
|
|
||||||
|
loop:
|
||||||
|
jsr HGR2 ; HGR2
|
||||||
|
|
||||||
|
eloop: ; FOR E=.08 TO .15 STEP .01:
|
||||||
|
|
||||||
|
lda #4
|
||||||
|
sta YPOS
|
||||||
|
yloop: ; FOR Y=4 to 189 STEP 6
|
||||||
|
lda #4
|
||||||
|
sta XPOS
|
||||||
|
lda #0
|
||||||
|
sta XPOSH
|
||||||
|
xloop: ; FOR X=4 to 278 STEP 6
|
||||||
|
|
||||||
|
lda #1
|
||||||
|
sta HGR_SCALE
|
||||||
|
|
||||||
|
; SCALE=(RND(1)<E)*RND(1)*E*20+1
|
||||||
|
|
||||||
|
ldy XPOSH
|
||||||
|
ldx XPOS
|
||||||
|
lda YPOS
|
||||||
|
|
||||||
|
jsr HPOSN ; X= (y,x) Y=(a)
|
||||||
|
|
||||||
|
|
||||||
|
ldx #<shape_table
|
||||||
|
ldy #>shape_table
|
||||||
|
lda #0 ; ROT=0
|
||||||
|
|
||||||
|
|
||||||
|
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||||
|
|
||||||
|
; NEXT X
|
||||||
|
lda XPOS
|
||||||
|
clc
|
||||||
|
adc #6
|
||||||
|
sta XPOS
|
||||||
|
lda #0
|
||||||
|
adc XPOSH
|
||||||
|
sta XPOSH
|
||||||
|
beq xloop
|
||||||
|
lda XPOS
|
||||||
|
cmp #22
|
||||||
|
bcs xloop
|
||||||
|
nexty:
|
||||||
|
|
||||||
|
; NEXT Y
|
||||||
|
lda YPOS
|
||||||
|
clc
|
||||||
|
adc #6
|
||||||
|
sta YPOS
|
||||||
|
cmp #189
|
||||||
|
bcs yloop
|
||||||
|
; NEXT E
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jmp loop
|
||||||
|
|
||||||
|
shape_table:
|
||||||
|
; .byte 1,0 ; 1 shape
|
||||||
|
; .byte 4,0 ; offset at 4 bytes
|
||||||
|
.byte 18,63,36,36,45,45,54,54,63,0 ; data
|
Loading…
x
Reference in New Issue
Block a user