mirror of
https://github.com/deater/dos33fsprogs.git
synced 2025-02-07 21:30:39 +00:00
double: getting closer
This commit is contained in:
parent
0cc56766d2
commit
74eb128890
@ -10,7 +10,7 @@ all: double.dsk
|
||||
double.dsk: HELLO DOUBLE
|
||||
cp $(EMPTYDISK) double.dsk
|
||||
$(DOS33) -y double.dsk SAVE A HELLO
|
||||
$(DOS33) -y double.dsk BSAVE -a 0x1000 DOUBLE
|
||||
$(DOS33) -y double.dsk BSAVE -a 0x6000 DOUBLE
|
||||
|
||||
###
|
||||
|
||||
@ -20,11 +20,15 @@ HELLO: hello.bas
|
||||
###
|
||||
|
||||
DOUBLE: double.o
|
||||
ld65 -o DOUBLE double.o -C $(LINKERSCRIPTS)/apple2_1000.inc
|
||||
ld65 -o DOUBLE double.o -C $(LINKERSCRIPTS)/apple2_6000.inc
|
||||
|
||||
double.o: double.s \
|
||||
zp.inc hardware.inc pt3_lib_mockingboard_detect.s \
|
||||
pt3_lib_mockingboard_setup.s pt3_lib_detect_model.s
|
||||
pt3_lib_mockingboard_setup.s pt3_lib_detect_model.s \
|
||||
zx02_optim.s \
|
||||
graphics/sworg_hgr.hgr.zx02 \
|
||||
graphics/sworg_dhgr.aux.zx02 \
|
||||
graphics/sworg_dhgr.bin.zx02
|
||||
ca65 -o double.o double.s -l double.lst
|
||||
|
||||
###
|
||||
|
@ -130,9 +130,42 @@ cp2_loop:
|
||||
bit PAGE1
|
||||
|
||||
|
||||
;============================
|
||||
; load hi-res image to PAGE2
|
||||
;============================
|
||||
;=======================================
|
||||
; load double hi-res image to MAIN:PAGE1
|
||||
;=======================================
|
||||
|
||||
lda #<image_dhgr_bin
|
||||
sta ZX0_src
|
||||
lda #>image_dhgr_bin
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
;=======================================
|
||||
; load double hi-res image to AUX:PAGE1
|
||||
;=======================================
|
||||
|
||||
bit PAGE2 ; map in AUX (80store)
|
||||
|
||||
lda #<image_dhgr_aux
|
||||
sta ZX0_src
|
||||
lda #>image_dhgr_aux
|
||||
sta ZX0_src+1
|
||||
|
||||
lda #$20
|
||||
|
||||
jsr full_decomp
|
||||
|
||||
|
||||
;=================================
|
||||
; load hi-res image to MAIN:PAGE2
|
||||
;=================================
|
||||
|
||||
; turn off eightystore
|
||||
|
||||
sta EIGHTYSTOREOFF
|
||||
|
||||
lda #<image_hgr
|
||||
sta ZX0_src
|
||||
@ -144,36 +177,10 @@ cp2_loop:
|
||||
jsr full_decomp
|
||||
|
||||
|
||||
; draw double-hires lines
|
||||
|
||||
sta FULLGR
|
||||
|
||||
|
||||
lda #$20 ; draw to page0 (MAIN?)
|
||||
sta HGRPAGE
|
||||
|
||||
lda #150 ; start at 150
|
||||
sta YPOS
|
||||
color_loop:
|
||||
lda YPOS
|
||||
and #$f
|
||||
sta TCOLOR
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
asl
|
||||
ora TCOLOR
|
||||
sta TCOLOR ; update color
|
||||
|
||||
lda YPOS
|
||||
jsr draw_line_color
|
||||
|
||||
inc YPOS
|
||||
lda YPOS
|
||||
cmp #192
|
||||
bne color_loop
|
||||
|
||||
sta EIGHTYSTOREOFF
|
||||
|
||||
; wait for vblank on IIe
|
||||
; positive? during vblank
|
||||
|
||||
@ -225,21 +232,21 @@ double_loop:
|
||||
sta SETAN3 ; 4 ; doublehiresoff
|
||||
jsr delay_1552
|
||||
|
||||
; 3 lines HIRES
|
||||
; 3 lines HIRES PAGE2
|
||||
sta HIRES ; 4
|
||||
sta PAGE2 ; 4
|
||||
jsr delay_1552
|
||||
|
||||
; 3 lines HIRES
|
||||
sta HIRES ; 4
|
||||
sta PAGE1 ; 4
|
||||
; 3 lines Double-hires
|
||||
sta SET80COL ; 4 ; set 80 column mode
|
||||
sta CLRAN3 ; 4 ; doublehireson
|
||||
jsr delay_1552
|
||||
|
||||
; 3 line Double-HIRES
|
||||
|
||||
sta SET80COL ; 4
|
||||
sta CLRAN3 ; 4
|
||||
|
||||
; sta PAGE1 ; 4
|
||||
sta SET_GR ; 4
|
||||
sta SET_GR ; 4
|
||||
jsr delay_1552
|
||||
|
||||
|
||||
@ -281,39 +288,6 @@ loop6: dex ; 2
|
||||
rts
|
||||
|
||||
|
||||
;==========================
|
||||
; draw horizontal DHGR line
|
||||
;==========================
|
||||
; color is in TCOLOR
|
||||
; Y position is in A
|
||||
;=========================
|
||||
draw_line_color:
|
||||
ldx #0
|
||||
ldy #0
|
||||
jsr HPOSN ; setup GBASL/GBASH with Y position
|
||||
|
||||
ldy #0
|
||||
line_loop_it:
|
||||
; set page2
|
||||
sta PAGE2
|
||||
lda TCOLOR
|
||||
sta (GBASL),Y
|
||||
cmp #$80
|
||||
rol TCOLOR
|
||||
|
||||
; set page1
|
||||
sta PAGE1
|
||||
lda TCOLOR
|
||||
sta (GBASL),Y
|
||||
cmp #$80
|
||||
rol TCOLOR
|
||||
iny
|
||||
|
||||
cpy #40
|
||||
bne line_loop_it
|
||||
|
||||
rts
|
||||
|
||||
|
||||
.include "pt3_lib_detect_model.s"
|
||||
; .include "pt3_lib_mockingboard_setup.s"
|
||||
@ -323,3 +297,7 @@ line_loop_it:
|
||||
|
||||
image_hgr:
|
||||
.incbin "graphics/sworg_hgr.hgr.zx02"
|
||||
image_dhgr_aux:
|
||||
.incbin "graphics/sworg_dhgr.aux.zx02"
|
||||
image_dhgr_bin:
|
||||
.incbin "graphics/sworg_dhgr.bin.zx02"
|
||||
|
@ -2,14 +2,16 @@ include ../../../Makefile.inc
|
||||
|
||||
ZX02 = ~/research/6502_compression/zx02.git/build/zx02
|
||||
PNG_TO_HGR = ../../../utils/hgr-utils/png2hgr
|
||||
PNG_TO_DHGR = ../../../utils/hgr-utils/png2dhgr
|
||||
LINKER_SCRIPTS = ../../../linker_scripts
|
||||
DOS33 = ../../../utils/dos33fs-utils/dos33
|
||||
EMPTY_DISK = ../../../empty_disk/empty.dsk
|
||||
TOKENIZE = ../../../utils/asoft_basic-utils/tokenize_asoft
|
||||
|
||||
all: \
|
||||
sworg_hgr.hgr.zx02
|
||||
|
||||
sworg_hgr.hgr.zx02 \
|
||||
sworg_dhgr.bin.zx02 \
|
||||
sworg_dhgr.aux.zx02
|
||||
|
||||
####
|
||||
|
||||
@ -19,6 +21,20 @@ sworg_hgr.hgr.zx02: sworg_hgr.hgr
|
||||
sworg_hgr.hgr: sworg_hgr.png
|
||||
$(PNG_TO_HGR) sworg_hgr.png > sworg_hgr.hgr
|
||||
|
||||
####
|
||||
|
||||
sworg_dhgr.aux.zx02: sworg_dhgr.AUX
|
||||
$(ZX02) sworg_dhgr.AUX sworg_dhgr.aux.zx02
|
||||
|
||||
sworg_dhgr.AUX: sworg_dhgr.png
|
||||
$(PNG_TO_DHGR) sworg_dhgr.png sworg_dhgr
|
||||
|
||||
sworg_dhgr.bin.zx02: sworg_dhgr.BIN
|
||||
$(ZX02) sworg_dhgr.BIN sworg_dhgr.bin.zx02
|
||||
|
||||
sworg_dhgr.BIN: sworg_dhgr.png
|
||||
$(PNG_TO_DHGR) sworg_dhgr.png sworg_dhgr
|
||||
|
||||
|
||||
####
|
||||
|
||||
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
@ -19,8 +19,8 @@ PAGE1 = $C054
|
||||
PAGE2 = $C055
|
||||
LORES = $C056
|
||||
HIRES = $C057
|
||||
CLRAN3 = $C05E
|
||||
SETAN3 = $C05F
|
||||
CLRAN3 = $C05E ; in 80-col mode, enable double graphics
|
||||
SETAN3 = $C05F ; in 80-col mode, disable double graphics
|
||||
VBLANK = $C019 ; *not* RDVBL (VBL signal low)
|
||||
|
||||
; ROM routines
|
||||
|
Loading…
x
Reference in New Issue
Block a user