shape_table: trying to find a good 16-byte entry
This commit is contained in:
parent
d29d6649e5
commit
ef0fbe4048
|
@ -8,7 +8,8 @@ EMPTYDISK = ../../../empty_disk/empty.dsk
|
||||||
all: gear.dsk
|
all: gear.dsk
|
||||||
|
|
||||||
gear.dsk: HELLO APPLE.BAS GEAR.BAS \
|
gear.dsk: HELLO APPLE.BAS GEAR.BAS \
|
||||||
APPLE2 GEAR LINE32 PATTERN PATTERN_LOGO SQUARE_WAVE
|
APPLE2 GEAR LINE32 PATTERN PATTERN_LOGO SQUARE_WAVE \
|
||||||
|
LINE16 HERRING16 STRIPE17
|
||||||
cp $(EMPTYDISK) gear.dsk
|
cp $(EMPTYDISK) gear.dsk
|
||||||
$(DOS33) -y gear.dsk SAVE A HELLO
|
$(DOS33) -y gear.dsk SAVE A HELLO
|
||||||
$(DOS33) -y gear.dsk SAVE A GEAR.BAS
|
$(DOS33) -y gear.dsk SAVE A GEAR.BAS
|
||||||
|
@ -16,6 +17,9 @@ gear.dsk: HELLO APPLE.BAS GEAR.BAS \
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0x3f5 GEAR
|
$(DOS33) -y gear.dsk BSAVE -a 0x3f5 GEAR
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 APPLE2
|
$(DOS33) -y gear.dsk BSAVE -a 0xc00 APPLE2
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 LINE32
|
$(DOS33) -y gear.dsk BSAVE -a 0xc00 LINE32
|
||||||
|
$(DOS33) -y gear.dsk BSAVE -a 0xe7 LINE16
|
||||||
|
$(DOS33) -y gear.dsk BSAVE -a 0xe7 STRIPE17
|
||||||
|
$(DOS33) -y gear.dsk BSAVE -a 0xc00 HERRING16
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 PATTERN
|
$(DOS33) -y gear.dsk BSAVE -a 0xc00 PATTERN
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0x3f5 PATTERN_LOGO
|
$(DOS33) -y gear.dsk BSAVE -a 0x3f5 PATTERN_LOGO
|
||||||
$(DOS33) -y gear.dsk BSAVE -a 0xc00 SQUARE_WAVE
|
$(DOS33) -y gear.dsk BSAVE -a 0xc00 SQUARE_WAVE
|
||||||
|
@ -69,6 +73,33 @@ LINE32: line32.o
|
||||||
line32.o: line32.s
|
line32.o: line32.s
|
||||||
ca65 -o line32.o line32.s -l line32.lst
|
ca65 -o line32.o line32.s -l line32.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
LINE16: line16.o
|
||||||
|
ld65 -o LINE16 line16.o -C $(LINKERSCRIPTS)/apple2_e7_zp.inc
|
||||||
|
|
||||||
|
line16.o: line16.s
|
||||||
|
ca65 -o line16.o line16.s -l line16.lst
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
STRIPE17: stripe17.o
|
||||||
|
ld65 -o STRIPE17 stripe17.o -C $(LINKERSCRIPTS)/apple2_e7_zp.inc
|
||||||
|
|
||||||
|
stripe17.o: stripe17.s
|
||||||
|
ca65 -o stripe17.o stripe17.s -l stripe17.lst
|
||||||
|
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
HERRING16: herring16.o
|
||||||
|
ld65 -o HERRING16 herring16.o -C $(LINKERSCRIPTS)/apple2_c00.inc
|
||||||
|
|
||||||
|
herring16.o: herring16.s
|
||||||
|
ca65 -o herring16.o herring16.s -l herring16.lst
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
|
||||||
PATTERN: pattern.o
|
PATTERN: pattern.o
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
; 16B herringbone pattern
|
||||||
|
|
||||||
|
; FIXME: depends on memory init
|
||||||
|
|
||||||
|
; 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:
|
||||||
|
|
||||||
|
; 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=1
|
||||||
|
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||||
|
; Both A and X are 0 at exit
|
||||||
|
; Z flag set on exit
|
||||||
|
; Y varies
|
||||||
|
|
||||||
|
inx ; X=1
|
||||||
|
txa ; A=1
|
||||||
|
tay ; Y=1
|
||||||
|
|
||||||
|
bne tiny_loop ; bra
|
||||||
|
|
||||||
|
; be sure this is at address $0101, easy to set address
|
||||||
|
shape_table:
|
||||||
|
.byte $04,$00
|
|
@ -0,0 +1,92 @@
|
||||||
|
; 16B weird line 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
|
||||||
|
XPOS = $FD
|
||||||
|
YPOS = $FF
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HGR = $F3E2
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
XDRAW1 = $F661
|
||||||
|
RESTORE = $FF3F
|
||||||
|
|
||||||
|
|
||||||
|
tiny_xdraw:
|
||||||
|
|
||||||
|
.byte $0A ; scale at $E7 (also harmless asl)
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
; ldx #<shape_table ; point to bottom byte of shape address
|
||||||
|
; ldy #>shape_table ; point to top byte of shape address
|
||||||
|
|
||||||
|
ldy #$e8
|
||||||
|
ldx #$0e
|
||||||
|
|
||||||
|
; ROT in A
|
||||||
|
|
||||||
|
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||||
|
lda #1 ; ROT=1
|
||||||
|
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||||
|
; Both A and X are 0 at exit
|
||||||
|
; Z flag set on exit
|
||||||
|
; Y varies
|
||||||
|
|
||||||
|
; jsr $F666 ; rot in X, a=0
|
||||||
|
; inx
|
||||||
|
|
||||||
|
; inx ; X=1
|
||||||
|
; txa ; A=1
|
||||||
|
; tay ; Y=1
|
||||||
|
|
||||||
|
beq tiny_loop ; bra
|
||||||
|
|
||||||
|
; be sure this is at address $0101, easy to set address
|
||||||
|
;shape_table:
|
||||||
|
; .byte $04,$00
|
|
@ -1,4 +1,4 @@
|
||||||
; Tiny Xdraw
|
; 32B weird line pattern
|
||||||
|
|
||||||
; zero page locations
|
; zero page locations
|
||||||
HGR_SHAPE = $1A
|
HGR_SHAPE = $1A
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
; 16B weird line 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
|
||||||
|
XPOS = $FD
|
||||||
|
YPOS = $FF
|
||||||
|
|
||||||
|
; ROM calls
|
||||||
|
HGR2 = $F3D8
|
||||||
|
HGR = $F3E2
|
||||||
|
HPOSN = $F411
|
||||||
|
XDRAW0 = $F65D
|
||||||
|
XDRAW1 = $F661
|
||||||
|
RESTORE = $FF3F
|
||||||
|
|
||||||
|
|
||||||
|
tiny_xdraw:
|
||||||
|
|
||||||
|
; .byte $0A ; scale at $E7 (also harmless asl)
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
; ldx #<shape_table ; point to bottom byte of shape address
|
||||||
|
; ldy #>shape_table ; point to top byte of shape address
|
||||||
|
|
||||||
|
ldy #$e8
|
||||||
|
ldx #$0e
|
||||||
|
|
||||||
|
; ROT in A
|
||||||
|
|
||||||
|
; this will be 0 2nd time through loop, arbitrary otherwise
|
||||||
|
lda #1 ; ROT=1
|
||||||
|
jsr XDRAW0 ; XDRAW 1 AT X,Y
|
||||||
|
; Both A and X are 0 at exit
|
||||||
|
; Z flag set on exit
|
||||||
|
; Y varies
|
||||||
|
|
||||||
|
; jsr $F666 ; rot in X, a=0
|
||||||
|
; inx
|
||||||
|
|
||||||
|
; inx ; X=1
|
||||||
|
; txa ; A=1
|
||||||
|
; tay ; Y=1
|
||||||
|
|
||||||
|
beq tiny_loop ; bra
|
||||||
|
|
||||||
|
; be sure this is at address $0101, easy to set address
|
||||||
|
;shape_table:
|
||||||
|
; .byte $04,$00
|
|
@ -0,0 +1,12 @@
|
||||||
|
MEMORY {
|
||||||
|
ZP: start = $E7, size = $90, 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;
|
||||||
|
}
|
Loading…
Reference in New Issue