diff --git a/loader/samples/minexample/Makefile b/loader/samples/minexample/Makefile index 34d520d..3f2f604 100644 --- a/loader/samples/minexample/Makefile +++ b/loader/samples/minexample/Makefile @@ -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 $< \ diff --git a/loader/samples/minexample/badguy.bin b/loader/samples/minexample/badguy.bin index 1c722c9..4d8173a 100644 Binary files a/loader/samples/minexample/badguy.bin and b/loader/samples/minexample/badguy.bin differ diff --git a/loader/samples/minexample/font.bin b/loader/samples/minexample/font.bin index 8328344..adddaf8 100644 Binary files a/loader/samples/minexample/font.bin and b/loader/samples/minexample/font.bin differ diff --git a/loader/samples/minexample/loaderconfig.inc b/loader/samples/minexample/loaderconfig.inc index 7901632..dab7083 100644 --- a/loader/samples/minexample/loaderconfig.inc +++ b/loader/samples/minexample/loaderconfig.inc @@ -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, diff --git a/loader/samples/minexample/minexample.s b/loader/samples/minexample/minexample.s index 50354a3..301e9d3 100644 --- a/loader/samples/minexample/minexample.s +++ b/loader/samples/minexample/minexample.s @@ -95,26 +95,12 @@ code_start: sei - ldx #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 + jsr fileexists + bcs :- + ldx #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 + jsr fileexists + bcc end + jsr load_font jmp * clear_2bufs: