mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-01-01 05:31:52 +00:00
hgr: pattern
This commit is contained in:
parent
bbed9e6a95
commit
e8b63d7aeb
@ -27,7 +27,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
OOZE.BAS HORIZ_STAR.BAS PLANET.BAS SECRET_COLLECT.BAS PLANET_GR.BAS \
|
||||
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \
|
||||
TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS \
|
||||
LARGE_XOR.BAS PAR_XOR.BAS PAR_HGR.BAS
|
||||
LARGE_XOR.BAS PAR_XOR.BAS PAR_HGR.BAS SIER_XOR.BAS PATTERN_LOGO.BAS
|
||||
cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk
|
||||
# cp empty.dsk appleiibot.dsk
|
||||
# $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
||||
@ -145,6 +145,8 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
||||
$(DOS33) -y appleiibot.dsk SAVE A LARGE_XOR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A PAR_XOR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A PAR_HGR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A SIER_XOR.BAS
|
||||
$(DOS33) -y appleiibot.dsk SAVE A PATTERN_LOGO.BAS
|
||||
|
||||
|
||||
####
|
||||
@ -812,6 +814,17 @@ PAR_XOR.BAS: par_xor.bas
|
||||
PAR_HGR.BAS: par_hgr.bas
|
||||
$(TOKENIZE) < par_hgr.bas > PAR_HGR.BAS
|
||||
|
||||
####
|
||||
|
||||
SIER_XOR.BAS: sier_xor.bas
|
||||
$(TOKENIZE) < sier_xor.bas > SIER_XOR.BAS
|
||||
|
||||
####
|
||||
|
||||
PATTERN_LOGO.BAS: pattern_logo.bas
|
||||
$(TOKENIZE) < pattern_logo.bas > PATTERN_LOGO.BAS
|
||||
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
2
basic/appleiibot/pattern_logo.bas
Normal file
2
basic/appleiibot/pattern_logo.bas
Normal file
@ -0,0 +1,2 @@
|
||||
1FORI=0TO124:POKE1013+I,4*PEEK(2126+I)-204+(PEEK(2251+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&"/foW4TdRmW];/n[G[4\3;Do\adoVQTc[5Mk]2TrkC4mD4;C4drgn]3Pk]2Tr;C4kC4mD4drggmrS1[B[X:7p[H[3]@=1p(0<5>V8=@a5<5>b5;<P6>7>>5<<=?@>3S<F+D%(<U@G@*1)#%*4*#1)%FCG'%'GSG3)G$;O(J%
|
2
basic/appleiibot/sier_xor.bas
Normal file
2
basic/appleiibot/sier_xor.bas
Normal file
@ -0,0 +1,2 @@
|
||||
1FORI=0TO119:POKE1013+I,4*PEEK(2126+I)-204+(PEEK(2246+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||
2&"-ho/foP`UA:7hK]V;Z.6\/::Z37Yhr_k[2S54XWe7qnE4mG4VkEBRl+3=<1]bHcTYa.6VG3a/64cTK&X<TljDV=7d6TLj@Wg/\Ha3]+m3VQZ+9e7kUc;g]m_[SQ3C<7Z$UCN)%%)<GMH$?743I[74S7$7;C@C##F
|
80
graphics/hgr/shape_table/Makefile
Normal file
80
graphics/hgr/shape_table/Makefile
Normal file
@ -0,0 +1,80 @@
|
||||
include ../../../Makefile.inc
|
||||
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
LINKERSCRIPTS = ../../../linker_scripts
|
||||
EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||
|
||||
all: gear.dsk
|
||||
|
||||
gear.dsk: HELLO APPLE.BAS GEAR.BAS APPLE2 GEAR LINE32 PATTERN PATTERN_LOGO
|
||||
cp $(EMPTYDISK) gear.dsk
|
||||
$(DOS33) -y gear.dsk SAVE A HELLO
|
||||
$(DOS33) -y gear.dsk SAVE A GEAR.BAS
|
||||
$(DOS33) -y gear.dsk SAVE A APPLE.BAS
|
||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 GEAR
|
||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 APPLE2
|
||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 LINE32
|
||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 PATTERN
|
||||
$(DOS33) -y gear.dsk BSAVE -a 0x3f5 PATTERN_LOGO
|
||||
|
||||
###
|
||||
|
||||
HELLO: hello.bas
|
||||
$(TOKENIZE) < hello.bas > HELLO
|
||||
|
||||
###
|
||||
|
||||
GEAR.BAS: gear.bas
|
||||
$(TOKENIZE) < gear.bas > GEAR.BAS
|
||||
|
||||
###
|
||||
|
||||
APPLE.BAS: apple.bas
|
||||
$(TOKENIZE) < apple.bas > APPLE.BAS
|
||||
|
||||
|
||||
###
|
||||
|
||||
GEAR: gear.o
|
||||
ld65 -o GEAR gear.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
gear.o: gear.s
|
||||
ca65 -o gear.o gear.s -l gear.lst
|
||||
|
||||
###
|
||||
|
||||
APPLE2: apple2.o
|
||||
ld65 -o APPLE2 apple2.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
apple2.o: apple2.s
|
||||
ca65 -o apple2.o apple2.s -l apple2.lst
|
||||
|
||||
###
|
||||
|
||||
LINE32: line32.o
|
||||
ld65 -o LINE32 line32.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
line32.o: line32.s
|
||||
ca65 -o line32.o line32.s -l line32.lst
|
||||
|
||||
###
|
||||
|
||||
PATTERN: pattern.o
|
||||
ld65 -o PATTERN pattern.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||
|
||||
pattern.o: pattern.s
|
||||
ca65 -o pattern.o pattern.s -l pattern.lst
|
||||
|
||||
###
|
||||
|
||||
PATTERN_LOGO: pattern_logo.o
|
||||
ld65 -o PATTERN_LOGO pattern_logo.o -C $(LINKERSCRIPTS)/apple2_3f5.inc
|
||||
|
||||
pattern_logo.o: pattern_logo.s
|
||||
ca65 -o pattern_logo.o pattern_logo.s -l pattern_logo.lst
|
||||
|
||||
###
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o *.lst HELLO GEAR.BAS GEAR PATTERN APPLE.BAS PATTERN_LOGO
|
10
graphics/hgr/shape_table/apple.bas
Normal file
10
graphics/hgr/shape_table/apple.bas
Normal file
@ -0,0 +1,10 @@
|
||||
10 HIMEM:8142
|
||||
20 POKE 232,206:POKE 233,31
|
||||
30 FOR L=8142 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,53,142,36,44
|
||||
101 DATA 53,190,9,36,44,53,190,9,32,36
|
||||
102 DATA 140,18,45,60,55,46,13,37,36,79
|
||||
103 DATA 57,54,46,0
|
71
graphics/hgr/shape_table/apple.table
Normal file
71
graphics/hgr/shape_table/apple.table
Normal file
@ -0,0 +1,71 @@
|
||||
# Number of shapes
|
||||
1
|
||||
# "Apple ]["
|
||||
START
|
||||
LT
|
||||
UP
|
||||
UP
|
||||
RT
|
||||
RT
|
||||
DN
|
||||
DN
|
||||
#
|
||||
NRT
|
||||
NDN
|
||||
UP
|
||||
UP
|
||||
UP
|
||||
RT
|
||||
RT
|
||||
DN
|
||||
DN
|
||||
LT
|
||||
#
|
||||
NDN
|
||||
NRT
|
||||
NRT
|
||||
UP
|
||||
UP
|
||||
UP
|
||||
RT
|
||||
RT
|
||||
DN
|
||||
DN
|
||||
LT
|
||||
NDN
|
||||
NRT
|
||||
NRT
|
||||
NUP
|
||||
UP
|
||||
UP
|
||||
UP
|
||||
UP
|
||||
NRT
|
||||
NDN
|
||||
NDN
|
||||
NDN
|
||||
RT
|
||||
RT
|
||||
UP
|
||||
LT
|
||||
LT
|
||||
DN
|
||||
DN
|
||||
RT
|
||||
RT
|
||||
NRT
|
||||
RT
|
||||
UP
|
||||
UP
|
||||
UP
|
||||
LT
|
||||
NRT
|
||||
NRT
|
||||
NRT
|
||||
LT
|
||||
DN
|
||||
DN
|
||||
DN
|
||||
RT
|
||||
STOP
|
||||
|
135
graphics/hgr/shape_table/apple2.s
Normal file
135
graphics/hgr/shape_table/apple2.s
Normal file
@ -0,0 +1,135 @@
|
||||
; Tiny Xdraw
|
||||
|
||||
; 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_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
HGR_ROTATION = $F9
|
||||
FRAME = $FC
|
||||
FRAMEH = $FD
|
||||
XPOS = $FE
|
||||
YPOS = $FF
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
DRAW0 = $F601
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
|
||||
|
||||
gear:
|
||||
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
.if 0
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
; A and Y are 0 here.
|
||||
; X is left behind by the boot process?
|
||||
|
||||
sty FRAME
|
||||
sty FRAMEH
|
||||
|
||||
ldy #0
|
||||
ldx #100
|
||||
lda #100
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
; saves X,Y,A to zero page
|
||||
; after Y= orig X/7
|
||||
; A and X are ??
|
||||
tiny_loop:
|
||||
|
||||
; values for shape table
|
||||
; Y X
|
||||
; 00 E7 = neat
|
||||
; 00 EB = OK
|
||||
; 00 EF = good
|
||||
; F0 01 = cool, let's go with it
|
||||
|
||||
ldx #<shape_table ; point to bottom byte of shape address
|
||||
ldy #>shape_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #1 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
|
||||
inc FRAME
|
||||
bne skip_frameh_inc
|
||||
inc FRAMEH
|
||||
skip_frameh_inc:
|
||||
lda FRAMEH
|
||||
cmp #13
|
||||
bne tiny_loop ; bra
|
||||
|
||||
lda FRAME
|
||||
cmp #32
|
||||
bne tiny_loop
|
||||
oog:
|
||||
|
||||
.endif
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
ldy #0
|
||||
ldx #96
|
||||
lda #150
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
|
||||
|
||||
ldx #<apple_table ; point to bottom byte of shape address
|
||||
ldy #>apple_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #56 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
blah:
|
||||
jmp blah
|
||||
|
||||
shape_table:
|
||||
; .byte $01,$00,
|
||||
.byte $04,$00,$25,$35,$00
|
||||
|
||||
apple_table:
|
||||
.byte $27,$2c,$35,$8e,$24,$2c
|
||||
.byte $35,$be,$09,$24,$2c,$35,$be,$09
|
||||
.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e
|
||||
.byte $0d,$25,$24,$4f,$39,$36,$2e,$00
|
158
graphics/hgr/shape_table/gear.s
Normal file
158
graphics/hgr/shape_table/gear.s
Normal file
@ -0,0 +1,158 @@
|
||||
; Pattern Logo
|
||||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
; 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_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
HGR_ROTATION = $F9
|
||||
FRAME = $FC
|
||||
FRAMEH = $FD
|
||||
XPOS = $FE
|
||||
YPOS = $FF
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
DRAW0 = $F601
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
|
||||
|
||||
gear:
|
||||
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
; A and Y are 0 here.
|
||||
; X is left behind by the boot process?
|
||||
|
||||
sty HGR_COLLISIONS
|
||||
|
||||
tya
|
||||
tax ; load X with 0
|
||||
; ldy #0
|
||||
; ldx #00
|
||||
; lda #00
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
; saves X,Y,A to zero page
|
||||
; after Y= orig X/7
|
||||
; A and X are ??
|
||||
pattern_loop:
|
||||
|
||||
ldx #<pattern_table ; point to bottom byte of shape address
|
||||
ldy #>pattern_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #1 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
lda HGR_COLLISIONS
|
||||
bne pattern_loop
|
||||
|
||||
oog:
|
||||
|
||||
lda #$7f
|
||||
sta HGR_COLOR
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
lda #3
|
||||
sta FRAME
|
||||
logo_loop1:
|
||||
|
||||
inc xsmc+1
|
||||
inc ysmc+1
|
||||
|
||||
jsr draw_logo
|
||||
|
||||
dec FRAME
|
||||
bne logo_loop1
|
||||
|
||||
lda #$00
|
||||
sta HGR_COLOR
|
||||
|
||||
lda #3
|
||||
sta FRAME
|
||||
logo_loop2:
|
||||
|
||||
jsr draw_logo
|
||||
|
||||
inc xsmc+1
|
||||
inc ysmc+1
|
||||
|
||||
dec FRAME
|
||||
bne logo_loop2
|
||||
|
||||
blah:
|
||||
beq blah
|
||||
|
||||
;===============
|
||||
; draw shape table logo
|
||||
draw_logo:
|
||||
ldy #0
|
||||
xsmc:
|
||||
ldx #96
|
||||
ysmc:
|
||||
lda #150
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
|
||||
|
||||
ldx #<apple_table ; point to bottom byte of shape address
|
||||
ldy #>apple_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #52 ; ROT=0
|
||||
jmp DRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
|
||||
|
||||
|
||||
pattern_table:
|
||||
.byte $04,$00
|
||||
|
||||
apple_table:
|
||||
.byte $27,$2c,$35,$8e,$24,$2c
|
||||
.byte $35,$be,$09,$24,$2c,$35,$be,$09
|
||||
.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e
|
||||
.byte $0d,$25,$24,$4f,$39,$36,$2e,$00
|
10
graphics/hgr/shape_table/gear.table
Normal file
10
graphics/hgr/shape_table/gear.table
Normal file
@ -0,0 +1,10 @@
|
||||
# Number of shapes
|
||||
1
|
||||
# "Engine"
|
||||
START
|
||||
RT
|
||||
UP
|
||||
RT
|
||||
DN
|
||||
STOP
|
||||
|
90
graphics/hgr/shape_table/line32.s
Normal file
90
graphics/hgr/shape_table/line32.s
Normal file
@ -0,0 +1,90 @@
|
||||
; Tiny Xdraw
|
||||
|
||||
; 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_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
HGR_ROTATION = $F9
|
||||
FRAME = $FC
|
||||
XPOS = $FD
|
||||
YPOS = $FF
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
|
||||
|
||||
tiny_xdraw:
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
; A and Y are 0 here.
|
||||
; X is left behind by the boot process?
|
||||
|
||||
|
||||
ldy #0
|
||||
ldx #100
|
||||
lda #100
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
; saves X,Y,A to zero page
|
||||
; after Y= orig X/7
|
||||
; A and X are ??
|
||||
tiny_loop:
|
||||
|
||||
; values for shape table
|
||||
; Y X
|
||||
; 00 E7 = neat
|
||||
; 00 EB = OK
|
||||
; 00 EF = good
|
||||
; F0 01 = cool, let's go with it
|
||||
|
||||
ldx #<shape_table ; point to bottom byte of shape address
|
||||
ldy #>shape_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #1 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
beq tiny_loop ; bra
|
||||
|
||||
|
||||
shape_table:
|
||||
; .byte $01,$00,
|
||||
.byte $04,$00,$25,$35,$00
|
||||
|
||||
|
114
graphics/hgr/shape_table/pattern.s
Normal file
114
graphics/hgr/shape_table/pattern.s
Normal file
@ -0,0 +1,114 @@
|
||||
; Cool Pattern
|
||||
|
||||
; 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_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
HGR_ROTATION = $F9
|
||||
FRAME = $FC
|
||||
FRAMEH = $FD
|
||||
XPOS = $FE
|
||||
YPOS = $FF
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
DRAW0 = $F601
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
|
||||
|
||||
tiny_xdraw:
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
; A and Y are 0 here.
|
||||
; X is left behind by the boot process?
|
||||
|
||||
; sty FRAME
|
||||
; sty FRAMEH
|
||||
|
||||
sty HGR_COLLISIONS
|
||||
|
||||
tya
|
||||
tax
|
||||
|
||||
; ldy #0
|
||||
; ldx #100
|
||||
; lda #100
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
; saves X,Y,A to zero page
|
||||
; after Y= orig X/7
|
||||
; A and X are ??
|
||||
tiny_loop:
|
||||
|
||||
; values for shape table
|
||||
; Y X
|
||||
; 00 E7 = neat
|
||||
; 00 EB = OK
|
||||
; 00 EF = good
|
||||
; F0 01 = cool, let's go with it
|
||||
|
||||
ldx #<shape_table ; point to bottom byte of shape address
|
||||
ldy #>shape_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #1 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
|
||||
; inc FRAME
|
||||
; bne skip_frameh_inc
|
||||
; inc FRAMEH
|
||||
;skip_frameh_inc:
|
||||
; lda FRAMEH
|
||||
; cmp #13
|
||||
; bne tiny_loop ; bra
|
||||
|
||||
; lda FRAME
|
||||
; cmp #32
|
||||
|
||||
lda HGR_COLLISIONS
|
||||
bne tiny_loop
|
||||
|
||||
blah:
|
||||
beq blah
|
||||
|
||||
shape_table:
|
||||
; .byte $01,$00,
|
||||
.byte $04,$00 ;,$25,$35,$00
|
||||
|
||||
|
158
graphics/hgr/shape_table/pattern_logo.s
Normal file
158
graphics/hgr/shape_table/pattern_logo.s
Normal file
@ -0,0 +1,158 @@
|
||||
; Pattern Logo
|
||||
|
||||
; by Vince `deater` Weaver
|
||||
|
||||
; 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_SCALE = $E7
|
||||
HGR_SHAPE_TABLE = $E8
|
||||
HGR_SHAPE_TABLE2= $E9
|
||||
HGR_COLLISIONS = $EA
|
||||
HGR_ROTATION = $F9
|
||||
FRAME = $FC
|
||||
FRAMEH = $FD
|
||||
XPOS = $FE
|
||||
YPOS = $FF
|
||||
|
||||
; ROM calls
|
||||
HGR2 = $F3D8
|
||||
HGR = $F3E2
|
||||
HPOSN = $F411
|
||||
DRAW0 = $F601
|
||||
XDRAW0 = $F65D
|
||||
XDRAW1 = $F661
|
||||
RESTORE = $FF3F
|
||||
|
||||
|
||||
gear:
|
||||
|
||||
|
||||
jsr HGR2 ; Hi-res, full screen ; 3
|
||||
; Y=0, A=0 after this call
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
; A and Y are 0 here.
|
||||
; X is left behind by the boot process?
|
||||
|
||||
sty HGR_COLLISIONS
|
||||
|
||||
tya
|
||||
tax ; load X with 0
|
||||
; ldy #0
|
||||
; ldx #00
|
||||
; lda #00
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
; saves X,Y,A to zero page
|
||||
; after Y= orig X/7
|
||||
; A and X are ??
|
||||
pattern_loop:
|
||||
|
||||
ldx #<pattern_table ; point to bottom byte of shape address
|
||||
ldy #>pattern_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #1 ; ROT=0
|
||||
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
lda HGR_COLLISIONS
|
||||
bne pattern_loop
|
||||
|
||||
oog:
|
||||
|
||||
lda #$7f
|
||||
sta HGR_COLOR
|
||||
|
||||
lda #10
|
||||
sta HGR_SCALE
|
||||
|
||||
lda #3
|
||||
sta FRAME
|
||||
logo_loop1:
|
||||
|
||||
inc xsmc+1
|
||||
inc ysmc+1
|
||||
|
||||
jsr draw_logo
|
||||
|
||||
dec FRAME
|
||||
bne logo_loop1
|
||||
|
||||
lda #$00
|
||||
sta HGR_COLOR
|
||||
|
||||
lda #3
|
||||
sta FRAME
|
||||
logo_loop2:
|
||||
|
||||
jsr draw_logo
|
||||
|
||||
inc xsmc+1
|
||||
inc ysmc+1
|
||||
|
||||
dec FRAME
|
||||
bne logo_loop2
|
||||
|
||||
blah:
|
||||
beq blah
|
||||
|
||||
;===============
|
||||
; draw shape table logo
|
||||
draw_logo:
|
||||
ldy #0
|
||||
xsmc:
|
||||
ldx #96
|
||||
ysmc:
|
||||
lda #150
|
||||
jsr HPOSN ; set screen position to X= (y,x) Y=(a)
|
||||
|
||||
|
||||
ldx #<apple_table ; point to bottom byte of shape address
|
||||
ldy #>apple_table ; point to top byte of shape address
|
||||
|
||||
; ROT in A
|
||||
|
||||
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||
lda #52 ; ROT=0
|
||||
jmp DRAW0 ; XDRAW 1 AT X,Y
|
||||
; Both A and X are 0 at exit
|
||||
; Z flag set on exit
|
||||
; Y varies
|
||||
|
||||
|
||||
|
||||
|
||||
pattern_table:
|
||||
.byte $04,$00
|
||||
|
||||
apple_table:
|
||||
.byte $27,$2c,$35,$8e,$24,$2c
|
||||
.byte $35,$be,$09,$24,$2c,$35,$be,$09
|
||||
.byte $20,$24,$8c,$12,$2d,$3c,$37,$2e
|
||||
.byte $0d,$25,$24,$4f,$39,$36,$2e,$00
|
Loading…
Reference in New Issue
Block a user