hgr_font: leave 10 font behind

This commit is contained in:
Vince Weaver 2023-08-23 21:44:35 -04:00
parent 8bca6fb354
commit 25ad7af88b
5 changed files with 181 additions and 100 deletions

View File

@ -8,11 +8,12 @@ EMPTY_DISK = ../../../empty_disk
all: hgr_font4.dsk
hgr_font4.dsk: HELLO BIOS_TEST FONT_TEST
hgr_font4.dsk: HELLO BIOS_TEST FONT_4AM_TEST FONT_VMW_10_TEST
cp $(EMPTY_DISK)/empty.dsk hgr_font4.dsk
$(DOS33) -y hgr_font4.dsk SAVE A HELLO
$(DOS33) -y hgr_font4.dsk BSAVE -a 0x6000 BIOS_TEST
$(DOS33) -y hgr_font4.dsk BSAVE -a 0x6000 FONT_TEST
$(DOS33) -y hgr_font4.dsk BSAVE -a 0x6000 FONT_4AM_TEST
$(DOS33) -y hgr_font4.dsk BSAVE -a 0x6000 FONT_VMW_10_TEST
###
@ -25,22 +26,33 @@ BIOS_TEST: bios_test.o
ld65 -o BIOS_TEST bios_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
bios_test.o: bios_test.s \
font_condensed.s font_condensed_data.s \
font_vmw_condensed.s font_vmw_condensed_data.s \
zx02_optim.s graphics/a2_energy.hgr.zx02
ca65 -o bios_test.o bios_test.s -l bios_test.lst
###
FONT_TEST: font_test.o
ld65 -o FONT_TEST font_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
FONT_4AM_TEST: font_4am_test.o
ld65 -o FONT_4AM_TEST font_4am_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
font_4am_test.o: font_4am_test.s \
font_4am_condensed.s font_4am_condensed_data.s
ca65 -o font_4am_test.o font_4am_test.s -l font_4am_test.lst
###
FONT_VMW_10_TEST: font_vmw_10_test.o
ld65 -o FONT_VMW_10_TEST font_vmw_10_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
font_vmw_10_test.o: font_vmw_10_test.s \
font_4am_condensed.s font_4am_condensed_data.s
ca65 -o font_vmw_10_test.o font_vmw_10_test.s -l font_vmw_10_test.lst
font_test.o: font_test.s \
font_condensed.s font_condensed_data.s
ca65 -o font_test.o font_test.s -l font_test.lst
###
clean:
rm -f *~ *.o *.lst HELLO BIOS_TEST FONT_TEST
rm -f *~ *.o *.lst HELLO BIOS_TEST FONT_4AM_TEST

View File

@ -35,54 +35,30 @@ bios_test:
lda #<test1
ldy #>test1
ldx #1
stx CV
ldx #0
jsr DrawCondensedString
; test 2
lda #<test2
ldy #>test2
ldx #3
stx CV
ldx #0
jsr DrawCondensedString
; test 3
lda #<test3
ldy #>test3
ldx #5
stx CV
ldx #0
jsr DrawCondensedString
; test 4
lda #<test4
ldy #>test4
ldx #7
stx CV
ldx #0
jsr DrawCondensedString
; test 5
lda #<test5
ldy #>test5
ldx #9
stx CV
ldx #0
jsr DrawCondensedString
@ -93,18 +69,18 @@ end:
test1:
; 0123456789012345678901234567890123456789
.byte 39,"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS!"
.byte 0,100,"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS!",0
test2:
.byte 39,"pack my box with five dozen liquor jugs?"
.byte 0,150,"pack my box with five dozen liquor jugs?",0
test3:
.byte 24,"This is a HGR font test."
.byte 9,80,"This is a HGR font test.",0
test4:
.byte 38,"0123456789)(*&^%$#@!`~<>,./';:[]{}\|_+="
.byte 0,170,"0123456789)(*&^%$#@!`~<>,./';:[]{}\|_+=",0
test5:
.byte 17,"@/\/\/\/\______ |"
.byte 0,180,"@/\/\/\/\______ |",0
.include "font_4am_condensed.s"
.include "font_4am_condensed_data.s"
.include "font_vmw_condensed.s"
.include "font_vmw_condensed_data.s"
.include "zx02_optim.s"

View File

@ -0,0 +1,95 @@
; Fake BIOS screen
; for another project
.include "zp.inc"
.include "hardware.inc"
bios_test:
;===================
; set graphics mode
;===================
jsr HOME
bit HIRES
bit FULLGR
bit SET_GR
bit PAGE1
jsr build_tables
;===================
; Load graphics
;===================
lda #<graphics_data
sta ZX0_src
lda #>graphics_data
sta ZX0_src+1
lda #$20 ; temporarily load to $2000
jsr full_decomp
; test 1
lda #<test1
ldy #>test1
jsr DrawCondensedString
; test 2
lda #<test2
ldy #>test2
jsr DrawCondensedString
; test 3
lda #<test3
ldy #>test3
jsr DrawCondensedString
; test 4
lda #<test4
ldy #>test4
jsr DrawCondensedString
; test 5
lda #<test5
ldy #>test5
jsr DrawCondensedString
end:
jmp end
test1:
; 0123456789012345678901234567890123456789
.byte 0,100,"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS!",0
test2:
.byte 0,150,"pack my box with five dozen liquor jugs?",0
test3:
.byte 9,80,"This is a HGR font test.",0
test4:
.byte 0,170,"0123456789)(*&^%$#@!`~<>,./';:[]{}\|_+=",0
test5:
.byte 0,180,"@/\/\/\/\______ |",0
.include "font_vmw_condensed.s"
.include "font_vmw_condensed_data.s"
.include "zx02_optim.s"
graphics_data:
.incbin "graphics/a2_energy.hgr.zx02"
hposn_low = $1713 ; 0xC0 bytes (lifetime, used by DrawLargeCharacter)
hposn_high = $1800 ; 0xC0 bytes (lifetime, used by DrawLargeCharacter)
.include "hgr_table.s"

View File

@ -9,8 +9,6 @@
; VMW: commented, reformatted, minor changes, ca65 assembly
string_ptr = $FC ; word (used by DrawLargeString)
;------------------------------------------------------------------------------
; DrawCondensedString
;
@ -21,24 +19,24 @@ DrawCondensedString:
; store the string location
sta string_ptr
sty string_ptr+1
sta OUTL
sty OUTH
ldy #0
lda (string_ptr), Y ; get xpos
lda (OUTL), Y ; get xpos
sta CH ; save the X column offset
iny
lda (string_ptr),Y ; get ypos
lda (OUTL),Y ; get ypos
tay
; add two to string pointer
clc
lda string_ptr
lda OUTL
adc #2
sta dcb_loop+1
lda #0
adc string_ptr+1
adc OUTH
sta dcb_loop+2
; row0
@ -80,56 +78,56 @@ DrawCondensedString:
; row4
lda hposn_low, Y
adc CH
sta dcb_row4+4
lda hposn_high, Y
sta dcb_row4+5
lda hposn_low, Y
adc CH
sta dcb_row4+4
lda hposn_high, Y
sta dcb_row4+5
iny
; row5
lda hposn_low, Y
adc CH
sta dcb_row5+4
lda hposn_high, Y
sta dcb_row5+5
lda hposn_low, Y
adc CH
sta dcb_row5+4
lda hposn_high, Y
sta dcb_row5+5
iny
; row6
lda hposn_low, Y
adc CH
sta dcb_row6+4
lda hposn_high, Y
sta dcb_row6+5
lda hposn_low, Y
adc CH
sta dcb_row6+4
lda hposn_high, Y
sta dcb_row6+5
iny
; row7
lda hposn_low, Y
adc CH
sta dcb_row7+4
lda hposn_high, Y
sta dcb_row7+5
lda hposn_low, Y
adc CH
sta dcb_row7+4
lda hposn_high, Y
sta dcb_row7+5
iny
; row8
lda hposn_low, Y
adc CH
sta dcb_row8+4
lda hposn_high, Y
sta dcb_row8+5
lda hposn_low, Y
adc CH
sta dcb_row8+4
lda hposn_high, Y
sta dcb_row8+5
iny
; row9
lda hposn_low, Y
adc CH
sta dcb_row9+4
lda hposn_high, Y
sta dcb_row9+5
lda hposn_low, Y
adc CH
sta dcb_row9+4
lda hposn_high, Y
sta dcb_row9+5
ldx #0
dcb_loop:
@ -140,35 +138,35 @@ dcb_loop_smc:
; unrolled loop to write out each line
dcb_row0:
lda CondensedRow0-$19, Y ; get 1-byte font row
sta $FDFD, X ; write out to graphics mem
lda CondensedRow0-$19, Y ; get 1-byte font row
sta $FDFD, X ; write out to graphics mem
dcb_row1:
lda CondensedRow1-$19, Y
sta $FDFD, X
lda CondensedRow1-$19, Y
sta $FDFD, X
dcb_row2:
lda CondensedRow2-$19, Y
sta $FDFD, X
lda CondensedRow2-$19, Y
sta $FDFD, X
dcb_row3:
lda CondensedRow3-$19, Y
sta $FDFD, X
lda CondensedRow3-$19, Y
sta $FDFD, X
dcb_row4:
lda CondensedRow4-$19, Y
sta $FDFD, X
lda CondensedRow4-$19, Y
sta $FDFD, X
dcb_row5:
lda CondensedRow5-$19, Y
sta $FDFD, X
lda CondensedRow5-$19, Y
sta $FDFD, X
dcb_row6:
lda CondensedRow6-$19, Y
sta $FDFD, X
lda CondensedRow6-$19, Y
sta $FDFD, X
dcb_row7:
lda CondensedRow7-$19, Y
sta $FDFD, X
lda CondensedRow7-$19, Y
sta $FDFD, X
dcb_row8:
lda CondensedRow8-$19, Y
sta $FDFD, X
lda CondensedRow8-$19, Y
sta $FDFD, X
dcb_row9:
lda CondensedRow9-$19, Y
sta $FDFD, X
lda CondensedRow9-$19, Y
sta $FDFD, X
inx ; move to next
bpl dcb_loop