added nufli bmp

This commit is contained in:
AArt1256 2025-11-16 00:55:16 +03:00
parent bec0c6ac45
commit 02cec7acfe
28 changed files with 247 additions and 21 deletions

View file

@ -137,7 +137,7 @@ tellarch:
loader: $(LOADER)
$(LOADER): $(LOADERCFG)
make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=1800 RESIDENT=1700 ZP=02 prg
make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=1800 RESIDENT=0F00 ZP=02 prg
assemble: $(ASSEMBLE)
@ -160,10 +160,11 @@ $(DISKIMAGE): $(ASSEMBLE)
$(RM) $@
$(CC1541) -n "ys2 intro" -i test \
-f $(NAME) -w $< \
-f "sid" -w sid.bin \
-f "sid" -w use_this_sid.bin \
-f "badguy" -w badguy.zx0.prg \
-f "font" -w font.bin \
-f "scrmap" -w tilemap.bin.lz \
-f "intrbmp" -w title_320-prepared.zx0.prg \
$@

View file

@ -1,4 +1,7 @@
zx02/zx02 badguyz.bin badguy.zx0
printf "\x00\xe0" > badguy.zx0.prg
printf "\x00\x80" > badguy.zx0.prg
cat badguy.zx0 >> badguy.zx0.prg
python3 aart_lz.py tilemap.bin tilemap.bin.lz
python3 aart_lz.py tilemap.bin tilemap.bin.lz
zx02/zx02 title_320-prepared.bin title_320-prepared.zx0
printf "\x00\x80" > title_320-prepared.zx0.prg
cat title_320-prepared.zx0 >> title_320-prepared.zx0.prg

Binary file not shown.

View file

@ -20,6 +20,8 @@ text_ptr: .res 2
aart_lz_buffer := $fd00
.include "lz_zp.asm"
CODE_START_ADDR = $e000
.segment "CODE"
ZP=$e0
@ -31,11 +33,99 @@ pntr = ZP+7
.org $080d
jsr install
copy_start:
sei
lda #$35
sta $01
lda #>(code_end-CODE_START_ADDR)
sta $ff
lda #<(code_end-CODE_START_ADDR)
sta $fe
lda #<CODE_START_ADDR
sta $fc
lda #>CODE_START_ADDR
sta $fd
lda #<code_start
sta $fa
lda #>code_start
sta $fb
@copy_loop:
ldy #0
lda ($fa), y
sta ($fc), y
inc $fc
bne :+
inc $fd
:
inc $fa
bne :+
inc $fb
:
lda $fe
bne :+
dec $ff
:
dec $fe
lda $fe
ora $ff
bne @copy_loop
lda #$36
sta $01
cli
jsr install
sei
lda #$35
sta $01
jmp CODE_START_ADDR
run_nufli_bmp:
lda #$01
sta $81
lda #$29
sta $80
lda #0
sta $d01a
jsr $a000
cli
jsr $3000
@loop:
bit $d011
bpl @loop
jsr $a003
@loop2:
bit $d011
bmi @loop2
lda #0
sta $d020
sta $d021
jsr $a003
lda $80
bne :+
dec $81
:
dec $80
lda $81
cmp #$ff
beq :+
jmp @loop
:
rts
.res loadraw - *
.incbin "../../build/loader-c64.prg", 2
.res install - *
.incbin "../../build/install-c64.prg", 2
code_start:
.org CODE_START_ADDR
sei
ldx #<fontname
ldy #>fontname
@ -46,9 +136,9 @@ pntr = ZP+7
ldx #0
:
lda $e000, x
lda $8000, x
sta $d800, x
lda $e100, x
lda $8100, x
sta $d900, x
inx
bne :-
@ -75,7 +165,7 @@ pntr = ZP+7
lda #0
sta ZX0_src
lda #$e0
lda #$80
sta ZX0_src+1
lda #0
sta ZX0_dst
@ -175,8 +265,125 @@ pntr = ZP+7
lda #$1a
sta frame_until
jsr wait_frame_until
lda #120
sta frame_delay
jsr wait_loop
lda #$0b
sta $d011
sei
ldx #<introname
ldy #>introname
jsr loadraw
lda #0
sta ZX0_src
lda #$80
sta ZX0_src+1
lda #0
sta ZX0_dst
lda #$10
jsr zx02
ldx #<sidname
ldy #>sidname
jsr loadraw
lda #<fake_kernal_irq
sta $fffe
lda #>fake_kernal_irq
sta $ffff
lda #1
sta $d01a
jsr run_nufli_bmp
sei
jsr init_2x
jmp *
init_2x:
lda #127
sta $dc0d
and $d011
sta $d011
lda $dc0d
lda $dd0d
lda #<irq_music
sta $fffe
lda #>irq_music
sta $ffff
lda #$0b
sta $d011
lda #$00
sta $d012
lda #0
sta $d01a
lda #$63; <(985248/100)
sta $dc04
lda #$26;>(985248/100)
sta $dc05
lda $dc0d
and #$81
sta $dc0d
lda #$40
sta $dc0c
lda #$81
sta $dc0d
@loop:
bit $d011
bpl @loop
@loop2:
bit $d011
bmi @loop2
cli
rts
irq_music:
pha
txa
pha
tya
pha
inc $d020
jsr $a003
dec $d020
pla
tay
pla
tax
pla
jmp $dc0c
fake_kernal_irq:
pha
txa
pha
tya
pha
tsx
lda $0104, x
and #$10
beq :+
jmp ($0314)
:
jmp ($0314) ; fuck you
wait_loop:
loop2:
lda vbl
@ -438,7 +645,8 @@ irq_badguy:
badguy: .byte "badguy",0
fontname: .byte "font",0
sidname: .byte "sid", 0
introname: .byte "intrbmp", 0
darmtower_txt:
.res (40-26)/2, ' '
@ -486,8 +694,22 @@ upload_text:
.include "zx02.asm"
.include "thcmod_lz.asm"
.res loadraw - *
.incbin "../../build/loader-c64.prg", 2
.res $ea31-*, $ff
;asl $d019
pla
tay
pla
tax
pla
rti
.res install - *
.incbin "../../build/install-c64.prg", 2
.res $ea81-*, $ff
;asl $d019
pla
tay
pla
tax
pla
rti
code_end:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.