mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-03 07:35:42 +00:00
hgr: blueorange
This commit is contained in:
parent
de2767d757
commit
645f486c91
40
graphics/hgr/wires/Makefile
Normal file
40
graphics/hgr/wires/Makefile
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
include ../../../Makefile.inc
|
||||||
|
|
||||||
|
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||||
|
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||||
|
LINKER_SCRIPTS = ../../../linker_scripts
|
||||||
|
EMPTY_DISK = ../../../empty_disk
|
||||||
|
|
||||||
|
all: wires.dsk
|
||||||
|
|
||||||
|
wires.dsk: HELLO WIRES BLUEORANGE
|
||||||
|
cp $(EMPTY_DISK)/empty.dsk wires.dsk
|
||||||
|
$(DOS33) -y wires.dsk SAVE A HELLO
|
||||||
|
$(DOS33) -y wires.dsk BSAVE -a 0x0C00 WIRES
|
||||||
|
$(DOS33) -y wires.dsk BSAVE -a 0x0373 BLUEORANGE
|
||||||
|
|
||||||
|
###
|
||||||
|
|
||||||
|
HELLO: hello.bas
|
||||||
|
$(TOKENIZE) < hello.bas > HELLO
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
WIRES: wires.o
|
||||||
|
ld65 -o WIRES wires.o -C $(LINKER_SCRIPTS)/apple2_c00.inc
|
||||||
|
|
||||||
|
wires.o: wires.s
|
||||||
|
ca65 -o wires.o wires.s -l wires.lst
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
BLUEORANGE: blueorange.o
|
||||||
|
ld65 -o BLUEORANGE blueorange.o -C $(LINKER_SCRIPTS)/apple2_373.inc
|
||||||
|
|
||||||
|
blueorange.o: blueorange.s
|
||||||
|
ca65 -o blueorange.o blueorange.s -l blueorange.lst
|
||||||
|
|
||||||
|
######
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *~ *.o *.lst WIRES
|
147
graphics/hgr/wires/blueorange.s
Normal file
147
graphics/hgr/wires/blueorange.s
Normal file
@ -0,0 +1,147 @@
|
|||||||
|
; wires -- Apple II Hires
|
||||||
|
|
||||||
|
|
||||||
|
; D0+ used by HGR routines
|
||||||
|
|
||||||
|
HGR_COLOR = $E4
|
||||||
|
HGR_PAGE = $E6
|
||||||
|
|
||||||
|
D = $F9
|
||||||
|
XX = $FA
|
||||||
|
YY = $FB
|
||||||
|
R = $FC
|
||||||
|
CX = $FD
|
||||||
|
CY = $FE
|
||||||
|
FRAME = $FF
|
||||||
|
|
||||||
|
; soft-switches
|
||||||
|
|
||||||
|
; ROM routines
|
||||||
|
|
||||||
|
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
|
||||||
|
HGR = $F3E2 ; set hires page1 and clear $2000-$3fff
|
||||||
|
BKGND0 = $F3F4
|
||||||
|
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||||
|
|
||||||
|
wires:
|
||||||
|
|
||||||
|
jsr HGR2
|
||||||
|
|
||||||
|
lda #$D5
|
||||||
|
jsr BKGND0
|
||||||
|
|
||||||
|
.if 0
|
||||||
|
ol:
|
||||||
|
ldx #0
|
||||||
|
line_loop:
|
||||||
|
lda #$D5
|
||||||
|
ll_smc1:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
lda #$AA
|
||||||
|
ll_smc2:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
; cpx #40
|
||||||
|
bne line_loop
|
||||||
|
|
||||||
|
inc ll_smc1+2
|
||||||
|
inc ll_smc2+2
|
||||||
|
|
||||||
|
lda ll_smc2+2
|
||||||
|
cmp #$60
|
||||||
|
bne ol
|
||||||
|
|
||||||
|
.endif
|
||||||
|
|
||||||
|
reset_loop:
|
||||||
|
ldy #0
|
||||||
|
outer_loop:
|
||||||
|
ldx #0
|
||||||
|
move_line_loop:
|
||||||
|
|
||||||
|
ml_smc1:
|
||||||
|
lda $4000,X
|
||||||
|
eor pulse_even,Y
|
||||||
|
ml_smc2:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
ml_smc3:
|
||||||
|
lda $4000,X
|
||||||
|
eor pulse_odd,Y
|
||||||
|
ml_smc4:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
; cpx #40
|
||||||
|
bne move_line_loop
|
||||||
|
|
||||||
|
; lda #100
|
||||||
|
; jsr WAIT
|
||||||
|
|
||||||
|
inc ml_smc1+2
|
||||||
|
inc ml_smc2+2
|
||||||
|
inc ml_smc3+2
|
||||||
|
inc ml_smc4+2
|
||||||
|
|
||||||
|
lda ml_smc2+2
|
||||||
|
cmp #$60
|
||||||
|
bne move_line_loop
|
||||||
|
|
||||||
|
lda #$40
|
||||||
|
sta ml_smc1+2
|
||||||
|
sta ml_smc2+2
|
||||||
|
sta ml_smc3+2
|
||||||
|
sta ml_smc4+2
|
||||||
|
|
||||||
|
|
||||||
|
iny
|
||||||
|
cpy #28
|
||||||
|
bne outer_loop
|
||||||
|
beq reset_loop
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; all
|
||||||
|
pulse_even:
|
||||||
|
.byte $03,$0C,$30,$40,$00,$00,$00
|
||||||
|
.byte $01,$04,$10,$00,$00,$00,$00
|
||||||
|
.byte $02,$08,$20,$00,$00,$00,$00
|
||||||
|
.byte $83,$8C,$B0,$C0,$80,$80,$80
|
||||||
|
pulse_odd:
|
||||||
|
.byte $00,$00,$00,$01,$06,$18,$60
|
||||||
|
.byte $00,$00,$00,$00,$02,$08,$20
|
||||||
|
.byte $00,$00,$00,$01,$04,$10,$40
|
||||||
|
.byte $80,$80,$80,$81,$86,$98,$E0
|
||||||
|
|
||||||
|
; blue/orange
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $03,$0C,$30,$40,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$01,$06,$18,$60
|
||||||
|
|
||||||
|
|
||||||
|
; blue/black
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $01,$04,$10,$00,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$00,$02,$08,$20
|
||||||
|
|
||||||
|
; blue/white
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $02,$08,$20,$00,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$01,$04,$10,$40
|
||||||
|
|
||||||
|
|
||||||
|
; want this to be at 3f5
|
||||||
|
; Length is 133 so start at
|
||||||
|
; $3F5 - 130 = $373
|
||||||
|
|
||||||
|
|
||||||
|
game_over:
|
||||||
|
jmp wires
|
2
graphics/hgr/wires/hello.bas
Normal file
2
graphics/hgr/wires/hello.bas
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
5 HOME
|
||||||
|
10 PRINT CHR$(4);"CATALOG"
|
143
graphics/hgr/wires/wires.s
Normal file
143
graphics/hgr/wires/wires.s
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
; wires -- Apple II Hires
|
||||||
|
|
||||||
|
|
||||||
|
; D0+ used by HGR routines
|
||||||
|
|
||||||
|
HGR_COLOR = $E4
|
||||||
|
HGR_PAGE = $E6
|
||||||
|
|
||||||
|
D = $F9
|
||||||
|
XX = $FA
|
||||||
|
YY = $FB
|
||||||
|
R = $FC
|
||||||
|
CX = $FD
|
||||||
|
CY = $FE
|
||||||
|
FRAME = $FF
|
||||||
|
|
||||||
|
; soft-switches
|
||||||
|
|
||||||
|
; ROM routines
|
||||||
|
|
||||||
|
HGR2 = $F3D8 ; set hires page2 and clear $4000-$5fff
|
||||||
|
HGR = $F3E2 ; set hires page1 and clear $2000-$3fff
|
||||||
|
HPLOT0 = $F457 ; plot at (Y,X), (A)
|
||||||
|
HCOLOR1 = $F6F0 ; set HGR_COLOR to value in X
|
||||||
|
COLORTBL = $F6F6
|
||||||
|
PLOT = $F800 ; PLOT AT Y,A (A colors output, Y preserved)
|
||||||
|
NEXTCOL = $F85F ; COLOR=COLOR+3
|
||||||
|
SETCOL = $F864 ; COLOR=A
|
||||||
|
SETGR = $FB40 ; set graphics and clear LO-RES screen
|
||||||
|
BELL2 = $FBE4
|
||||||
|
WAIT = $FCA8 ; delay 1/2(26+27A+5A^2) us
|
||||||
|
|
||||||
|
wires:
|
||||||
|
|
||||||
|
jsr HGR2
|
||||||
|
|
||||||
|
ol:
|
||||||
|
ldx #0
|
||||||
|
line_loop:
|
||||||
|
lda #$D5
|
||||||
|
ll_smc1:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
lda #$AA
|
||||||
|
ll_smc2:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
; cpx #40
|
||||||
|
bne line_loop
|
||||||
|
|
||||||
|
inc ll_smc1+2
|
||||||
|
inc ll_smc2+2
|
||||||
|
|
||||||
|
lda ll_smc2+2
|
||||||
|
cmp #$60
|
||||||
|
bne ol
|
||||||
|
|
||||||
|
|
||||||
|
reset_loop:
|
||||||
|
ldy #0
|
||||||
|
outer_loop:
|
||||||
|
ldx #0
|
||||||
|
move_line_loop:
|
||||||
|
|
||||||
|
ml_smc1:
|
||||||
|
lda $4000,X
|
||||||
|
eor pulse_even,Y
|
||||||
|
ml_smc2:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
ml_smc3:
|
||||||
|
lda $4000,X
|
||||||
|
eor pulse_odd,Y
|
||||||
|
ml_smc4:
|
||||||
|
sta $4000,X
|
||||||
|
inx
|
||||||
|
|
||||||
|
; cpx #40
|
||||||
|
bne move_line_loop
|
||||||
|
|
||||||
|
; lda #100
|
||||||
|
; jsr WAIT
|
||||||
|
|
||||||
|
inc ml_smc1+2
|
||||||
|
inc ml_smc2+2
|
||||||
|
inc ml_smc3+2
|
||||||
|
inc ml_smc4+2
|
||||||
|
|
||||||
|
lda ml_smc2+2
|
||||||
|
cmp #$60
|
||||||
|
bne move_line_loop
|
||||||
|
|
||||||
|
lda #$40
|
||||||
|
sta ml_smc1+2
|
||||||
|
sta ml_smc2+2
|
||||||
|
sta ml_smc3+2
|
||||||
|
sta ml_smc4+2
|
||||||
|
|
||||||
|
|
||||||
|
iny
|
||||||
|
cpy #21
|
||||||
|
bne outer_loop
|
||||||
|
beq reset_loop
|
||||||
|
|
||||||
|
|
||||||
|
game_over:
|
||||||
|
jmp game_over
|
||||||
|
|
||||||
|
|
||||||
|
; all
|
||||||
|
pulse_even:
|
||||||
|
.byte $03,$0C,$30,$40,$00,$00,$00
|
||||||
|
.byte $01,$04,$10,$00,$00,$00,$00
|
||||||
|
.byte $02,$08,$20,$00,$00,$00,$00
|
||||||
|
pulse_odd:
|
||||||
|
.byte $00,$00,$00,$01,$06,$18,$60
|
||||||
|
.byte $00,$00,$00,$00,$02,$08,$20
|
||||||
|
.byte $00,$00,$00,$01,$04,$10,$40
|
||||||
|
|
||||||
|
|
||||||
|
; blue/orange
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $03,$0C,$30,$40,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$01,$06,$18,$60
|
||||||
|
|
||||||
|
|
||||||
|
; blue/black
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $01,$04,$10,$00,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$00,$02,$08,$20
|
||||||
|
|
||||||
|
; blue/white
|
||||||
|
;pulse_even:
|
||||||
|
; .byte $02,$08,$20,$00,$00,$00,$00
|
||||||
|
;pulse_odd:
|
||||||
|
; .byte $00,$00,$00,$01,$04,$10,$40
|
||||||
|
|
||||||
|
|
||||||
|
|
12
linker_scripts/apple2_373.inc
Normal file
12
linker_scripts/apple2_373.inc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
MEMORY {
|
||||||
|
ZP: start = $00, size = $1A, type = rw;
|
||||||
|
RAM: start = $373, 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 = zp;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user