mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-03-04 04:30:18 +00:00
hgr: update par_hgr
This commit is contained in:
parent
c387dfd393
commit
43bf3ae846
@ -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 \
|
OOZE.BAS HORIZ_STAR.BAS PLANET.BAS SECRET_COLLECT.BAS PLANET_GR.BAS \
|
||||||
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \
|
BOXES.BAS SOLARIS.BAS SOLARIS2.BAS ASPLODE.BAS SOLARIS3.BAS \
|
||||||
TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS \
|
TARGET.BAS ELITE.BAS MYSTERY.BAS OFFICE.BAS GR_XOR.BAS \
|
||||||
LARGE_XOR.BAS PAR_XOR.BAS
|
LARGE_XOR.BAS PAR_XOR.BAS PAR_HGR.BAS
|
||||||
cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk
|
cp $(EMPTY_DISK)/empty_lots_of_dirents.dsk appleiibot.dsk
|
||||||
# cp empty.dsk appleiibot.dsk
|
# cp empty.dsk appleiibot.dsk
|
||||||
# $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
# $(DOS33) -y appleiibot.dsk BSAVE -a 0x0300 LOAD
|
||||||
@ -144,6 +144,7 @@ appleiibot.dsk: E2.BAS FLAME.BAS FLAME2.BAS HELLO \
|
|||||||
$(DOS33) -y appleiibot.dsk SAVE A GR_XOR.BAS
|
$(DOS33) -y appleiibot.dsk SAVE A GR_XOR.BAS
|
||||||
$(DOS33) -y appleiibot.dsk SAVE A LARGE_XOR.BAS
|
$(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_XOR.BAS
|
||||||
|
$(DOS33) -y appleiibot.dsk SAVE A PAR_HGR.BAS
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
@ -806,6 +807,11 @@ LARGE_XOR.BAS: large_xor.bas
|
|||||||
PAR_XOR.BAS: par_xor.bas
|
PAR_XOR.BAS: par_xor.bas
|
||||||
$(TOKENIZE) < par_xor.bas > PAR_XOR.BAS
|
$(TOKENIZE) < par_xor.bas > PAR_XOR.BAS
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
PAR_HGR.BAS: par_hgr.bas
|
||||||
|
$(TOKENIZE) < par_hgr.bas > PAR_HGR.BAS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
####
|
####
|
||||||
|
2
basic/appleiibot/par_hgr.bas
Normal file
2
basic/appleiibot/par_hgr.bas
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
1FORI=0TO137:POKE1013+I,4*PEEK(2126+I)-204+(PEEK(2264+I/3)-35)/4^(I-INT(I/3)*3):NEXT
|
||||||
|
2&"-ho/foP`UA:7hK]V;Z.6\/::Z37Yhr_kln\o8SH.DVH3\kEKJj5/<E/\a@a[Kb3*SO3b3.2lVP4Z:Y/4TkTlbAq=Co'Zr]8U@m3=p=;o4\Hg5UAi2Dp=7k3]Ue3Y2Y3;Ua5gce7X=X[SQ3C<7Z$UC'Y;4)L=4C'X'G$'=>W$WK'@#(+4*3E4#++D
|
@ -8,15 +8,15 @@ TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
|||||||
|
|
||||||
all: paralax.dsk
|
all: paralax.dsk
|
||||||
|
|
||||||
paralax.dsk: HELLO BOXES BOXES_BOT LARGE LARGE_BOT PAR PAR_BOT WEIRD
|
paralax.dsk: HELLO BOXES PAR WEIRD
|
||||||
cp $(EMPTY_DISK) paralax.dsk
|
cp $(EMPTY_DISK) paralax.dsk
|
||||||
$(DOS33) -y paralax.dsk SAVE A HELLO
|
$(DOS33) -y paralax.dsk SAVE A HELLO
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 BOXES
|
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 BOXES
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0x3B7 BOXES_BOT
|
# $(DOS33) -y paralax.dsk BSAVE -a 0x3B7 BOXES_BOT
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 LARGE
|
# $(DOS33) -y paralax.dsk BSAVE -a 0xc00 LARGE
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0x386 LARGE_BOT
|
# $(DOS33) -y paralax.dsk BSAVE -a 0x386 LARGE_BOT
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 PAR
|
$(DOS33) -y paralax.dsk BSAVE -a 0x3f5 PAR
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0x37B PAR_BOT
|
# $(DOS33) -y paralax.dsk BSAVE -a 0x37B PAR_BOT
|
||||||
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 WEIRD
|
$(DOS33) -y paralax.dsk BSAVE -a 0xc00 WEIRD
|
||||||
|
|
||||||
###
|
###
|
||||||
@ -38,7 +38,7 @@ large.o: large.s
|
|||||||
###
|
###
|
||||||
|
|
||||||
PAR: par.o
|
PAR: par.o
|
||||||
ld65 -o PAR par.o -C $(LINKER_DIR)/apple2_c00.inc
|
ld65 -o PAR par.o -C $(LINKER_DIR)/apple2_3f5.inc
|
||||||
|
|
||||||
par.o: par.s
|
par.o: par.s
|
||||||
ca65 -o par.o par.s -l par.lst
|
ca65 -o par.o par.s -l par.lst
|
||||||
|
@ -44,6 +44,7 @@ parallax:
|
|||||||
|
|
||||||
;===================
|
;===================
|
||||||
; init screen
|
; init screen
|
||||||
|
jsr HGR
|
||||||
jsr HGR2
|
jsr HGR2
|
||||||
|
|
||||||
;===================
|
;===================
|
||||||
@ -59,8 +60,7 @@ init_loop:
|
|||||||
lda GBASL
|
lda GBASL
|
||||||
sta hgr_lookup_l,X
|
sta hgr_lookup_l,X
|
||||||
lda GBASH
|
lda GBASH
|
||||||
sec
|
and #$1F ; 20 30 001X 40 50 010X
|
||||||
sbc #$40
|
|
||||||
sta hgr_lookup_h,X
|
sta hgr_lookup_h,X
|
||||||
dex
|
dex
|
||||||
cpx #$ff
|
cpx #$ff
|
||||||
@ -72,45 +72,45 @@ parallax_forever:
|
|||||||
inc FRAME ; 2
|
inc FRAME ; 2
|
||||||
lda FRAME
|
lda FRAME
|
||||||
lsr
|
lsr
|
||||||
sta FRAME2
|
; sta FRAME2
|
||||||
|
sta frame2_smc+1
|
||||||
lsr
|
lsr
|
||||||
sta FRAME4
|
; sta FRAME4
|
||||||
|
sta frame4_smc+1
|
||||||
|
|
||||||
;========================
|
;========================
|
||||||
; flip page
|
; flip page
|
||||||
|
|
||||||
lda HGR_PAGE ; $40 or $20
|
lda HGR_PAGE ; $40 or $20
|
||||||
pha
|
|
||||||
asl
|
|
||||||
asl
|
|
||||||
rol
|
|
||||||
tay
|
|
||||||
lda PAGE1,Y
|
|
||||||
pla
|
|
||||||
|
|
||||||
eor #$60 ; flip draw_page
|
eor #$60 ; flip draw_page
|
||||||
sta HGR_PAGE
|
sta HGR_PAGE
|
||||||
|
|
||||||
|
asl
|
||||||
|
asl
|
||||||
|
rol
|
||||||
|
eor #$1
|
||||||
|
tay
|
||||||
|
lda PAGE1,Y
|
||||||
|
|
||||||
|
|
||||||
ldx #191 ; init Y
|
ldx #100 ; init Y
|
||||||
|
|
||||||
|
|
||||||
yloop:
|
yloop:
|
||||||
|
|
||||||
;==============
|
;==============
|
||||||
; point GBASL/GBSAH to current line
|
; point output to current line
|
||||||
|
|
||||||
lda hgr_lookup_l,X
|
lda hgr_lookup_l,X
|
||||||
sta out_smc+1
|
sta out_smc+1
|
||||||
lda hgr_lookup_h,X
|
lda hgr_lookup_h,X
|
||||||
clc
|
ora HGR_PAGE
|
||||||
adc HGR_PAGE
|
|
||||||
sta out_smc+2
|
sta out_smc+2
|
||||||
|
|
||||||
;==============
|
;==============
|
||||||
; current column (work backwards)
|
; current column (work backwards)
|
||||||
|
|
||||||
ldy #39 ; 2
|
ldy #29 ; 2
|
||||||
xloop:
|
xloop:
|
||||||
|
|
||||||
;==============
|
;==============
|
||||||
@ -130,7 +130,8 @@ xloop:
|
|||||||
|
|
||||||
txa
|
txa
|
||||||
|
|
||||||
sec ; subtract frame from Y
|
; carry always clear here?
|
||||||
|
; sec ; subtract frame from Y
|
||||||
sbc FRAME
|
sbc FRAME
|
||||||
|
|
||||||
eor X2
|
eor X2
|
||||||
@ -138,7 +139,7 @@ xloop:
|
|||||||
|
|
||||||
beq skip_color_large
|
beq skip_color_large
|
||||||
lda #$ff
|
lda #$ff
|
||||||
jmp draw_color
|
bne draw_color
|
||||||
skip_color_large:
|
skip_color_large:
|
||||||
|
|
||||||
;===========================
|
;===========================
|
||||||
@ -147,14 +148,15 @@ skip_color_large:
|
|||||||
txa
|
txa
|
||||||
|
|
||||||
sec ; subtract frame from Y
|
sec ; subtract frame from Y
|
||||||
sbc FRAME2
|
frame2_smc:
|
||||||
|
sbc #0
|
||||||
|
|
||||||
eor X2
|
eor X2
|
||||||
and #$20
|
and #$20
|
||||||
|
|
||||||
beq skip_color_medium
|
beq skip_color_medium
|
||||||
lda #$55
|
lda #$55
|
||||||
jmp draw_color
|
bne draw_color
|
||||||
skip_color_medium:
|
skip_color_medium:
|
||||||
|
|
||||||
|
|
||||||
@ -164,7 +166,8 @@ skip_color_medium:
|
|||||||
txa
|
txa
|
||||||
|
|
||||||
sec ; subtract frame from YY
|
sec ; subtract frame from YY
|
||||||
sbc FRAME4
|
frame4_smc:
|
||||||
|
sbc #0
|
||||||
|
|
||||||
eor X2
|
eor X2
|
||||||
and #$10
|
and #$10
|
||||||
@ -172,17 +175,12 @@ skip_color_medium:
|
|||||||
beq skip_color_small
|
beq skip_color_small
|
||||||
lda #$aa
|
lda #$aa
|
||||||
|
|
||||||
jmp draw_color
|
bne draw_color
|
||||||
skip_color_small:
|
skip_color_small:
|
||||||
|
|
||||||
lda #$00
|
lda #$00
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;========================
|
;========================
|
||||||
; actually draw color
|
; actually draw color
|
||||||
|
|
||||||
@ -192,18 +190,19 @@ out_smc:
|
|||||||
|
|
||||||
|
|
||||||
dey ; 1
|
dey ; 1
|
||||||
bpl xloop ; 2
|
cpy #10
|
||||||
|
bne xloop ; 2
|
||||||
|
|
||||||
dex ; 1
|
dex ; 1
|
||||||
|
|
||||||
cpx #$FF
|
; cpx #$FF
|
||||||
|
|
||||||
bne yloop ; 2
|
bpl yloop ; 2
|
||||||
|
|
||||||
beq parallax_forever ; 2
|
bmi parallax_forever ; 2
|
||||||
|
|
||||||
|
|
||||||
; for bot
|
; for bot
|
||||||
; $3F5 - 127 + 3 = $379
|
; $3F5 - 127 + 3 = $379
|
||||||
|
|
||||||
jmp parallax
|
; jmp parallax
|
||||||
|
@ -37,6 +37,8 @@ WAIT = $FCA8 ;; delay 1/2(26+27A+5A^2) us
|
|||||||
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
|
HPOSN = $F411 ; (Y,X),(A) (values stores in HGRX,XH,Y)
|
||||||
|
|
||||||
|
|
||||||
|
hgr_lookup_h = $1000
|
||||||
|
hgr_lookup_l = $1100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -46,6 +48,28 @@ parallax:
|
|||||||
; init screen
|
; init screen
|
||||||
jsr HGR2
|
jsr HGR2
|
||||||
|
|
||||||
|
;===================
|
||||||
|
; int tables
|
||||||
|
|
||||||
|
ldx #191
|
||||||
|
init_loop:
|
||||||
|
txa
|
||||||
|
pha
|
||||||
|
jsr HPOSN
|
||||||
|
pla
|
||||||
|
tax
|
||||||
|
lda GBASL
|
||||||
|
sta hgr_lookup_l,X
|
||||||
|
lda GBASH
|
||||||
|
sec
|
||||||
|
sbc #$40
|
||||||
|
sta hgr_lookup_h,X
|
||||||
|
dex
|
||||||
|
cpx #$ff
|
||||||
|
bne init_loop
|
||||||
|
|
||||||
|
tax
|
||||||
|
|
||||||
parallax_forever:
|
parallax_forever:
|
||||||
|
|
||||||
inc FRAME ; 2
|
inc FRAME ; 2
|
||||||
@ -83,13 +107,13 @@ yloop:
|
|||||||
;==============
|
;==============
|
||||||
; point GBASL/GBSAH to current line
|
; point GBASL/GBSAH to current line
|
||||||
|
|
||||||
txa
|
lda hgr_lookup_l,X
|
||||||
|
sta GBASL
|
||||||
|
lda hgr_lookup_h,X
|
||||||
|
clc
|
||||||
|
adc HGR_PAGE
|
||||||
|
sta GBASH
|
||||||
|
|
||||||
pha
|
|
||||||
jsr HPOSN
|
|
||||||
pla
|
|
||||||
|
|
||||||
tax
|
|
||||||
|
|
||||||
;==============
|
;==============
|
||||||
; current column (work backwards)
|
; current column (work backwards)
|
||||||
@ -192,15 +216,6 @@ skip_color_large:
|
|||||||
|
|
||||||
beq parallax_forever ; 2
|
beq parallax_forever ; 2
|
||||||
|
|
||||||
; 00 = right
|
|
||||||
; 01 = up
|
|
||||||
; 10 = left
|
|
||||||
; 11 = down
|
|
||||||
; adc = $65
|
|
||||||
; sbc = $E5
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; for bot
|
; for bot
|
||||||
; $3F5 - 127 + 3 = $379
|
; $3F5 - 127 + 3 = $379
|
||||||
|
Loading…
x
Reference in New Issue
Block a user