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 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 cp $(EMPTY_DISK)/empty.dsk hgr_font4.dsk
$(DOS33) -y hgr_font4.dsk SAVE A HELLO $(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 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 ld65 -o BIOS_TEST bios_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc
bios_test.o: bios_test.s \ 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 zx02_optim.s graphics/a2_energy.hgr.zx02
ca65 -o bios_test.o bios_test.s -l bios_test.lst ca65 -o bios_test.o bios_test.s -l bios_test.lst
### ###
FONT_TEST: font_test.o FONT_4AM_TEST: font_4am_test.o
ld65 -o FONT_TEST font_test.o -C $(LINKER_SCRIPTS)/apple2_6000.inc 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: 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 lda #<test1
ldy #>test1 ldy #>test1
jsr DrawCondensedString
ldx #1
stx CV
ldx #0
; test 2 ; test 2
lda #<test2 lda #<test2
ldy #>test2 ldy #>test2
jsr DrawCondensedString
ldx #3
stx CV
ldx #0
; test 3 ; test 3
lda #<test3 lda #<test3
ldy #>test3 ldy #>test3
ldx #5
stx CV
ldx #0
jsr DrawCondensedString jsr DrawCondensedString
; test 4 ; test 4
lda #<test4 lda #<test4
ldy #>test4 ldy #>test4
ldx #7
stx CV
ldx #0
jsr DrawCondensedString jsr DrawCondensedString
; test 5 ; test 5
lda #<test5 lda #<test5
ldy #>test5 ldy #>test5
ldx #9
stx CV
ldx #0
jsr DrawCondensedString jsr DrawCondensedString
@ -93,18 +69,18 @@ end:
test1: test1:
; 0123456789012345678901234567890123456789 ; 0123456789012345678901234567890123456789
.byte 39,"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS!" .byte 0,100,"PACK MY BOX WITH FIVE DOZEN LIQUOR JUGS!",0
test2: test2:
.byte 39,"pack my box with five dozen liquor jugs?" .byte 0,150,"pack my box with five dozen liquor jugs?",0
test3: test3:
.byte 24,"This is a HGR font test." .byte 9,80,"This is a HGR font test.",0
test4: test4:
.byte 38,"0123456789)(*&^%$#@!`~<>,./';:[]{}\|_+=" .byte 0,170,"0123456789)(*&^%$#@!`~<>,./';:[]{}\|_+=",0
test5: test5:
.byte 17,"@/\/\/\/\______ |" .byte 0,180,"@/\/\/\/\______ |",0
.include "font_4am_condensed.s" .include "font_vmw_condensed.s"
.include "font_4am_condensed_data.s" .include "font_vmw_condensed_data.s"
.include "zx02_optim.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 ; VMW: commented, reformatted, minor changes, ca65 assembly
string_ptr = $FC ; word (used by DrawLargeString)
;------------------------------------------------------------------------------ ;------------------------------------------------------------------------------
; DrawCondensedString ; DrawCondensedString
; ;
@ -21,24 +19,24 @@ DrawCondensedString:
; store the string location ; store the string location
sta string_ptr sta OUTL
sty string_ptr+1 sty OUTH
ldy #0 ldy #0
lda (string_ptr), Y ; get xpos lda (OUTL), Y ; get xpos
sta CH ; save the X column offset sta CH ; save the X column offset
iny iny
lda (string_ptr),Y ; get ypos lda (OUTL),Y ; get ypos
tay tay
; add two to string pointer ; add two to string pointer
clc clc
lda string_ptr lda OUTL
adc #2 adc #2
sta dcb_loop+1 sta dcb_loop+1
lda #0 lda #0
adc string_ptr+1 adc OUTH
sta dcb_loop+2 sta dcb_loop+2
; row0 ; row0