Load font directly to the destination

This commit is contained in:
Natt Akuma 2025-11-26 04:35:13 +07:00
parent 937bea7699
commit 3f4765029b
5 changed files with 49 additions and 73 deletions

View file

@ -155,7 +155,7 @@ tellarch:
loader: $(LOADER)
$(LOADER): $(LOADERCFG)
make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=0a00 RESIDENT=0900 ZP=02 prg
make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=0b00 RESIDENT=0900 ZP=02 prg
assemble: $(ASSEMBLE)
@ -174,7 +174,7 @@ endif
diskimage: $(DISKIMAGE)
$(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS)
$(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS) use_this_sid.bin font.bin
$(RM) $@
$(CC1541) -n "otomata labs" -i " 2025" \
-f "ys2intro" -w $< \

Binary file not shown.

Binary file not shown.

View file

@ -40,7 +40,7 @@ DECOMPRESSOR = DECOMPRESSORS::NONE; available are NONE, BITNA
; extended features, different settings can be run with the same installed drive code, increase host-side code size
.define FILE_EXISTS_API 0 ; include the fileexists call for simple multi-disk handling
.define FILE_EXISTS_API 1 ; include the fileexists call for simple multi-disk handling
.define LOAD_UNDER_D000_DFFF 0 ; C-64/128: enable loading (and decompression) to the RAM at $D000..$DFFF,
; note that this does not slow down loading when not loading to RAM at $D000..$DFFF,

View file

@ -95,26 +95,12 @@ code_start:
sei
ldx #<fontname
ldy #>fontname
jsr loadraw
lda #0
jsr load_font
lda #$34
sta $01
ldx #0
:
lda $8000, x
sta $d800, x
eor #$ff
sta $c00, x
lda $8100, x
sta $d900, x
eor #$ff
sta $d00, x
inx
bne :-
lda #0
tax
:
@ -151,7 +137,7 @@ code_start:
lda #$1b
sta $d011
lda #$d0
lda #$d2
sta $d012
lda #1
@ -1221,36 +1207,32 @@ irq_badguy:
inc vbl
;inc $d020
nop
nop
nop
nop
lda #$1b
sta $d011
lda #$19
sta $d018
lda #$c8
sta $d016
lda $dd00
and #3
sta @dd00_arc+1
lda #0
sta $dd00
lda #$47
lda #$13
sta $d018
lda #1
sta $d021
lda #$fa
:
lda $d012
cmp #$fb
bcc :-
.res 2, $ea
cmp $d012
bcs :-
lda #$3b
sta $d011
lda #$19
sta $d018
lda #$d8
sta $d016
@dd00_arc:
lda #$19
sta $d018
lda #0
sta $dd00
sta $d021
;dec $d020
@ -1303,60 +1285,33 @@ too_bad_txt:
.res (40-16)/2, ' '
upload_text:
lda #$34
sta $01
stx text_ptr
sty text_ptr+1
ldy #39
:
lda (text_ptr), y
sec
sbc #$20
sta $d348, y
clc
adc #$60
sta $748, y
dey
bne :-
lda #$35
sta $01
lda #1
ldy #39
:
sta $db48, y
dey
bne :-
bpl :-
rts
upload_text_bottom:
lda #$34
sta $01
stx text_ptr
sty text_ptr+1
ldy #39
:
lda (text_ptr), y
sec
sbc #$20
sta $d348+40+40, y
clc
adc #$60
sta $748+40+40, y
dey
bne :-
lda #$35
sta $01
lda #1
ldy #39
:
sta $db48+40+40, y
dey
bne :-
bpl :-
rts
run_nufli_bmp:
lda #$01
sta $81
@ -1433,6 +1388,18 @@ load_8000_zx02:
pla
jmp zx02
load_font:
beq :+
pha
:
ldx #<fontname
ldy #>fontname
jsr fileexists
bcs :-
ldx #<fontname
ldy #>fontname
jmp loadraw
part_10:
; the sprite data is embedded into first few bitmap pixels
; which are hidden by black border attributes
@ -1452,7 +1419,7 @@ part_10:
stx $d01c
lda #11
sta $d026
lda #@y+50
lda #@y+48
jsr position_2x
; draw top half
@loop:
@ -1532,6 +1499,15 @@ part_10:
.byte 2, 2, 2, 9, 2, 2
@finish:
jsr position_2x_to_display
.res ((*+$ff)&$ff00|2)-*
end:
ldx #<fontname
ldy #>fontname
jsr fileexists
bcc end
jsr load_font
jmp *
clear_2bufs: