WIP lilia talk

This commit is contained in:
Natt Akuma 2025-11-28 15:15:49 +07:00
parent a38269cdf0
commit 48569fe245
21 changed files with 95 additions and 82 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -142,7 +142,8 @@ ZX0PRGS = \
lilia.zx0.prg \ lilia.zx0.prg \
lilia_hero.zx0.prg \ lilia_hero.zx0.prg \
island.zx0.prg \ island.zx0.prg \
clouds.zx0.prg clouds.zx0.prg \
lilia_talk.zx0.prg
LZPRGS = \ LZPRGS = \
island_map.lz.prg island_map.lz.prg
@ -158,7 +159,7 @@ tellarch:
loader: $(LOADER) loader: $(LOADER)
$(LOADER): $(LOADERCFG) $(LOADER): $(LOADERCFG)
make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=0b00 RESIDENT=0900 ZP=02 prg make -C $(LOADER_SRC) EXTCONFIGPATH=../samples/$(NAME) PLATFORM=$(_PLATFORM_) INSTALL=0a00 RESIDENT=0900 ZP=02 prg
assemble: $(ASSEMBLE) assemble: $(ASSEMBLE)
@ -195,6 +196,7 @@ $(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS) font.bin
-f "island" -w island.zx0.prg \ -f "island" -w island.zx0.prg \
-f "islandmap" -w island_map.lz.prg \ -f "islandmap" -w island_map.lz.prg \
-f "clouds" -w clouds.zx0.prg \ -f "clouds" -w clouds.zx0.prg \
-f "liltalk" -w lilia_talk.zx0.prg \
$@ $@

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 ; extended features, different settings can be run with the same installed drive code, increase host-side code size
.define FILE_EXISTS_API 1 ; include the fileexists call for simple multi-disk handling .define FILE_EXISTS_API 0 ; 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, .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, ; note that this does not slow down loading when not loading to RAM at $D000..$DFFF,

View file

@ -45,18 +45,18 @@ copy_start:
lda #$35 lda #$35
sta $01 sta $01
lda #<CODE_START_ADDR lda #<code_start
sta $fc sta $fc
lda #>CODE_START_ADDR lda #>code_start
sta $fd sta $fd
lda #<code_start lda #<code_load
sta $fa sta $fa
lda #>code_start lda #>code_load
sta $fb sta $fb
ldy #0 ldy #0
ldx #>(code_end-CODE_START_ADDR) ldx #>(code_end-code_start)
beq :+++ beq :+++
: :
lda ($fa), y lda ($fa), y
@ -73,17 +73,30 @@ copy_start:
sta ($fc), y sta ($fc), y
iny iny
: :
cpy #<(code_end-CODE_START_ADDR) cpy #<(code_end-code_start)
bne :-- bne :--
lda #$36 inc $01
sta $01
cli cli
jsr install jsr install
sei sei
lda #$35 dec $01
jmp code_start
check_return:
; for some reason GETIN enable interrupts back
lda #0
sta $d01a
asl $d019
lda #$36
sta $01 sta $01
jmp CODE_START_ADDR :
jsr $ff9f ; SCNKEY
jsr $ffe4 ; GETIN
cmp #$0d
bne :-
dec $01
jmp code_start
.res loadraw - * .res loadraw - *
.incbin "../../build/loader-c64.prg", 2 .incbin "../../build/loader-c64.prg", 2
@ -91,17 +104,18 @@ copy_start:
.res install - * .res install - *
.incbin "../../build/install-c64.prg", 2 .incbin "../../build/install-c64.prg", 2
code_start: code_load:
.org CODE_START_ADDR .org CODE_START_ADDR
code_start:
sei
lda #$0b
sta $d011
lda #0 lda #0
sta $d020 sta $d020
sta ZX0_dst+0 sta ZX0_dst+0
sta enable_music lda #$0b
sta $d011
jsr load_font jsr load_font
.assert * = CODE_START_ADDR + 15, error
lda #0
sta enable_music
jsr init_2x jsr init_2x
jsr clr_txt jsr clr_txt
ldx #<copyright ldx #<copyright
@ -126,16 +140,10 @@ code_start:
jsr txt_fade_out jsr txt_fade_out
sei sei
jsr set_irq_badguy
lda #1
sta $d01a
sta bmp_delay
jsr init_bmp jsr init_bmp
jsr set_irq_badguy
lda #0 lda #0
sta vbl sta vbl
cli cli
jsr intro jsr intro
@ -194,7 +202,6 @@ code_start:
sta vbl sta vbl
lda #$11 lda #$11
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
ldx #$6c ldx #$6c
@ -235,7 +242,6 @@ code_start:
sta vbl sta vbl
lda #$0d lda #$0d
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
lda bmp_addr lda bmp_addr
sta temp sta temp
@ -255,7 +261,6 @@ code_start:
lda temp+1 lda temp+1
sta bmp_addr+1 sta bmp_addr+1
lda #$0d+3 lda #$0d+3
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
pla pla
tax tax
@ -293,7 +298,6 @@ code_start:
sta vbl sta vbl
lda #$08 lda #$08
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
lda bmp_addr lda bmp_addr
sta temp sta temp
@ -313,7 +317,6 @@ code_start:
lda temp+1 lda temp+1
sta bmp_addr+1 sta bmp_addr+1
lda #$08+8 lda #$08+8
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
pla pla
tax tax
@ -324,7 +327,6 @@ code_start:
lda #0 lda #0
sta vbl sta vbl
lda #$27 lda #$27
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
ldx #25 ldx #25
@ -361,7 +363,6 @@ code_start:
jsr init_bmp jsr init_bmp
lda #$1d lda #$1d
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
ldx #5 ldx #5
@ -403,7 +404,6 @@ code_start:
jsr init_bmp jsr init_bmp
lda #$08 lda #$08
sta frame_until
jsr wait_frame_until_2x jsr wait_frame_until_2x
: :
@ -681,7 +681,6 @@ intro:
jsr sfx_init jsr sfx_init
lda #7 lda #7
sta frame_until
jsr wait_frame_until jsr wait_frame_until
lda #64 lda #64
@ -705,7 +704,6 @@ intro:
jsr clear_text jsr clear_text
lda #$0d lda #$0d
sta frame_until
jsr wait_frame_until jsr wait_frame_until
ldx #<adol_win ldx #<adol_win
@ -731,14 +729,12 @@ intro:
jsr clear_text jsr clear_text
lda #$13 lda #$13
sta frame_until
jsr wait_frame_until jsr wait_frame_until
lda #0 lda #0
jsr sfx_init jsr sfx_init
lda #$1a lda #$1a
sta frame_until
jsr wait_frame_until jsr wait_frame_until
lda #120 lda #120
@ -832,6 +828,20 @@ fade_cols:
.byte $0, $0, $0, $0, $b, $c, $f, $1 .byte $0, $0, $0, $0, $b, $c, $f, $1
.res 32-10, $1 .res 32-10, $1
fake_kernal_irq:
pha
txa
pha
tya
pha
tsx
lda $0104, x
and #$10
beq :+
jmp ($0314)
:
jmp ($0314) ; fuck you
irq_music: irq_music:
pha pha
txa txa
@ -919,21 +929,6 @@ irq_music:
pla pla
jmp $dc0c 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: wait_loop:
@loop2: @loop2:
lda vbl lda vbl
@ -952,6 +947,7 @@ wait_loop:
rts rts
wait_frame_until: wait_frame_until:
sta frame_until
@loop: @loop:
lda vbl lda vbl
beq @loop beq @loop
@ -979,6 +975,7 @@ wait_frame_until:
rts rts
wait_frame_until_2x: wait_frame_until_2x:
sta frame_until
@loop: @loop:
lda vbl lda vbl
cmp #2 cmp #2
@ -1208,6 +1205,18 @@ irq_badguy2:
lda #$d2 lda #$d2
sta $d012 sta $d012
lda enable_music
beq :+
txa
pha
tya
pha
jsr $a003
pla
tay
pla
tax
:
asl $d019 asl $d019
pla pla
rti rti
@ -1227,10 +1236,11 @@ set_irq_badguy:
lda #>irq_badguy lda #>irq_badguy
sta $ffff sta $ffff
lda #$1b
sta $d011
lda #$d2 lda #$d2
sta $d012 sta $d012
lda #1
sta $d01a
asl $d019
rts rts
badguy: .byte "badguy",0 badguy: .byte "badguy",0
@ -1247,6 +1257,7 @@ liliaheroname: .byte "lilhero", 0
islandname: .byte "island", 0 islandname: .byte "island", 0
islandmapname: .byte "islandmap", 0 islandmapname: .byte "islandmap", 0
cloudsname: .byte "clouds", 0 cloudsname: .byte "clouds", 0
liliatalkname: .byte "liltalk", 0
darmtower_txt: darmtower_txt:
@ -1307,7 +1318,6 @@ run_nufli_bmp:
sta $d01a sta $d01a
asl $d019 asl $d019
jsr $a000 jsr $a000
cli
jsr $3000 jsr $3000
@loop: @loop:
bit $d011 bit $d011
@ -1376,16 +1386,14 @@ load_8000_zx02:
jmp zx02 jmp zx02
load_font: load_font:
beq :+ bcc :+
pha pha
: :
ldx #<fontname ldx #<fontname
ldy #>fontname ldy #>fontname
jsr fileexists jsr loadraw
bcs :- bcs :-
ldx #<fontname rts
ldy #>fontname
jmp loadraw
part_10: part_10:
; the sprite data is embedded into first few bitmap pixels ; the sprite data is embedded into first few bitmap pixels
@ -1550,9 +1558,9 @@ part_11:
lda #1 lda #1
sta timer_mode sta timer_mode
; ldx #<liliatalkname ldx #<liliatalkname
; ldy #>liliatalkname ldy #>liliatalkname
; jsr load_8000_zx02_2000 jsr load_8000_zx02_2000
: :
lda timer_reached lda timer_reached
beq :- beq :-
@ -1572,27 +1580,37 @@ part_11:
lda timer_reached lda timer_reached
beq :- beq :-
jmp * ; TEMP
; load new music ; load new music
lda #0 sei
sta enable_music
ldx #<song1name ldx #<song1name
ldy #>song1name ldy #>song1name
lda #$a0 lda #$a0
jsr load_8000_zx02 jsr load_8000_zx02
jsr $a000
sei jsr init_bmp
jsr set_irq_badguy jsr set_irq_badguy
inc enable_music inc enable_music
cli cli
lda #61
sta frame_until
jsr wait_frame_until_2x
sei
lda #$0b
sta $d011
ldx #64
:
jsr wait_frame
dex
bpl :-
jsr clr_txt jsr clr_txt
ldx #<turn_disk ldx #<turn_disk
ldy #>turn_disk ldy #>turn_disk
jsr write_txt1 jsr write_txt2
lda #1
jmp end sta $d021
jmp check_return
clear_2bufs: clear_2bufs:
ldy #$44 ldy #$44
@ -1746,7 +1764,8 @@ presented:
.byte " presented by falcom " .byte " presented by falcom "
turn_disk: turn_disk:
.byte " insert datadisk in drive 8 " .byte " insert datadisk in "
.byte " drive 8 then return "
clr_txt: clr_txt:
lda #$80 lda #$80
@ -1874,12 +1893,4 @@ txt_fade_out_offset:
beq :- beq :-
rts rts
.res ((*+$ff)&$ff00|2)-*
end:
ldx #<fontname
ldy #>fontname
jsr fileexists
bcc end
jmp code_start
code_end: code_end: