actually implemented the dialog text (better sync needed though)
This commit is contained in:
parent
e47d81701b
commit
943185eb62
29
loader/samples/minexample/conv_liltalk.py
Normal file
29
loader/samples/minexample/conv_liltalk.py
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
f = open("liltalk_speak.txt","r").readlines()
|
||||||
|
f = [x[:-1] for x in f]
|
||||||
|
|
||||||
|
line_addrs = [11,16,16,29,33,27,32,29,11,32,24,13,14,17,27,4]
|
||||||
|
out = [0xFE, (40-line_addrs[0])//2]
|
||||||
|
cnt = 1
|
||||||
|
for line in f:
|
||||||
|
if line == '':
|
||||||
|
out.append(0xFE) # set line addr to beginning
|
||||||
|
out.append((40-line_addrs[cnt])//2)
|
||||||
|
cnt += 1
|
||||||
|
else:
|
||||||
|
num = 0
|
||||||
|
i = 0
|
||||||
|
while i < len(line) and line[i] in "0123456789":
|
||||||
|
num = num*10+int(line[i])
|
||||||
|
i += 1
|
||||||
|
str = line[i+1:]
|
||||||
|
str = str.upper()
|
||||||
|
str = str.replace("\\N","\n")
|
||||||
|
if num == 3: num += 1 # botches yay
|
||||||
|
out.append(num)
|
||||||
|
out.append(len(str))
|
||||||
|
for x in str: out.append(ord(x))
|
||||||
|
out.append(0xFF)
|
||||||
|
|
||||||
|
f = open("liltalk.bin","wb")
|
||||||
|
f.write(bytearray(out))
|
||||||
|
f.close()
|
||||||
BIN
loader/samples/minexample/liltalk.bin
Normal file
BIN
loader/samples/minexample/liltalk.bin
Normal file
Binary file not shown.
307
loader/samples/minexample/liltalk_speak.txt
Normal file
307
loader/samples/minexample/liltalk_speak.txt
Normal file
|
|
@ -0,0 +1,307 @@
|
||||||
|
3 A
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 y
|
||||||
|
3 o
|
||||||
|
3 u
|
||||||
|
3
|
||||||
|
3 O
|
||||||
|
3 K
|
||||||
|
3 ?
|
||||||
|
6
|
||||||
|
|
||||||
|
70 ... Who are you?
|
||||||
|
6
|
||||||
|
3
|
||||||
|
|
||||||
|
3 T
|
||||||
|
3 h
|
||||||
|
3 a
|
||||||
|
3 n
|
||||||
|
3 k
|
||||||
|
3
|
||||||
|
3 g
|
||||||
|
3 o
|
||||||
|
3 o
|
||||||
|
3 d
|
||||||
|
3 n
|
||||||
|
3 e
|
||||||
|
3 s
|
||||||
|
3 s
|
||||||
|
2 .\n
|
||||||
|
1
|
||||||
|
|
||||||
|
3 I
|
||||||
|
3 '
|
||||||
|
3 m
|
||||||
|
3
|
||||||
|
3 L
|
||||||
|
3 i
|
||||||
|
3 l
|
||||||
|
3 i
|
||||||
|
3 a
|
||||||
|
3
|
||||||
|
3 f
|
||||||
|
3 r
|
||||||
|
3 o
|
||||||
|
3 m
|
||||||
|
3
|
||||||
|
3 L
|
||||||
|
3 a
|
||||||
|
3 n
|
||||||
|
3 c
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 v
|
||||||
|
3 i
|
||||||
|
3 l
|
||||||
|
3 l
|
||||||
|
3 a
|
||||||
|
3 g
|
||||||
|
3 e
|
||||||
|
3 .
|
||||||
|
6
|
||||||
|
|
||||||
|
3 H
|
||||||
|
3 a
|
||||||
|
3 v
|
||||||
|
3 i
|
||||||
|
3 n
|
||||||
|
3 g
|
||||||
|
3
|
||||||
|
3 s
|
||||||
|
3 o
|
||||||
|
3 m
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 k
|
||||||
|
3 i
|
||||||
|
3 n
|
||||||
|
3 d
|
||||||
|
3
|
||||||
|
3 o
|
||||||
|
3 f
|
||||||
|
3
|
||||||
|
3 p
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3 m
|
||||||
|
3 o
|
||||||
|
3 n
|
||||||
|
3 i
|
||||||
|
3 t
|
||||||
|
3 i
|
||||||
|
3 o
|
||||||
|
3 n
|
||||||
|
2 ,\n
|
||||||
|
1
|
||||||
|
|
||||||
|
3 I
|
||||||
|
3
|
||||||
|
3 c
|
||||||
|
3 a
|
||||||
|
3 m
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 h
|
||||||
|
3 e
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 t
|
||||||
|
3 o
|
||||||
|
3
|
||||||
|
3 h
|
||||||
|
3 a
|
||||||
|
3 v
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 a
|
||||||
|
3
|
||||||
|
3 l
|
||||||
|
3 o
|
||||||
|
3 o
|
||||||
|
3 k
|
||||||
|
3 .
|
||||||
|
6
|
||||||
|
|
||||||
|
3 S
|
||||||
|
3 u
|
||||||
|
3 d
|
||||||
|
3 d
|
||||||
|
3 e
|
||||||
|
3 n
|
||||||
|
3 l
|
||||||
|
3 y
|
||||||
|
3 ,
|
||||||
|
3 t
|
||||||
|
3 h
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 a
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3 a
|
||||||
|
3
|
||||||
|
3 w
|
||||||
|
3 a
|
||||||
|
3 s
|
||||||
|
3
|
||||||
|
3 e
|
||||||
|
3 n
|
||||||
|
3 v
|
||||||
|
3 e
|
||||||
|
3 l
|
||||||
|
3 o
|
||||||
|
3 p
|
||||||
|
3 e
|
||||||
|
3 d
|
||||||
|
2 \n
|
||||||
|
1
|
||||||
|
|
||||||
|
3 b
|
||||||
|
3 y
|
||||||
|
3
|
||||||
|
3 a
|
||||||
|
3
|
||||||
|
3 l
|
||||||
|
3 i
|
||||||
|
3 g
|
||||||
|
3 h
|
||||||
|
3 t
|
||||||
|
3
|
||||||
|
3 a
|
||||||
|
3 n
|
||||||
|
3 d
|
||||||
|
3
|
||||||
|
3 y
|
||||||
|
3 o
|
||||||
|
3 u
|
||||||
|
3
|
||||||
|
3 c
|
||||||
|
3 o
|
||||||
|
3 l
|
||||||
|
3 l
|
||||||
|
3 a
|
||||||
|
3 p
|
||||||
|
3 s
|
||||||
|
3 e
|
||||||
|
3 d.
|
||||||
|
6
|
||||||
|
|
||||||
|
64 Where am I?
|
||||||
|
|
||||||
|
3 T
|
||||||
|
3 h
|
||||||
|
3 i
|
||||||
|
3 s
|
||||||
|
3
|
||||||
|
3 i
|
||||||
|
3 s
|
||||||
|
3
|
||||||
|
3 t
|
||||||
|
3 h
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 k
|
||||||
|
3 i
|
||||||
|
3 n
|
||||||
|
3 g
|
||||||
|
3 d
|
||||||
|
3 o
|
||||||
|
3 m
|
||||||
|
3
|
||||||
|
3 c
|
||||||
|
3 a
|
||||||
|
3 l
|
||||||
|
3 l
|
||||||
|
3 e
|
||||||
|
3 d
|
||||||
|
3
|
||||||
|
3 Yee
|
||||||
|
3 s
|
||||||
|
3 .
|
||||||
|
6
|
||||||
|
|
||||||
|
3 T
|
||||||
|
3 h
|
||||||
|
3 e
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3 '
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 m
|
||||||
|
3 o
|
||||||
|
3 n
|
||||||
|
3 s
|
||||||
|
3 t
|
||||||
|
3 e
|
||||||
|
3 r
|
||||||
|
3 s
|
||||||
|
3
|
||||||
|
3 n
|
||||||
|
3 e
|
||||||
|
3 a
|
||||||
|
3 r
|
||||||
|
3 .
|
||||||
|
2 \n
|
||||||
|
1
|
||||||
|
|
||||||
|
3 W
|
||||||
|
3 e
|
||||||
|
3
|
||||||
|
3 s
|
||||||
|
3 h
|
||||||
|
3 o
|
||||||
|
3 u
|
||||||
|
3 l
|
||||||
|
3 d
|
||||||
|
3
|
||||||
|
3 g
|
||||||
|
3 o.
|
||||||
|
6
|
||||||
|
|
||||||
|
3 H
|
||||||
|
3 o
|
||||||
|
3 w
|
||||||
|
3
|
||||||
|
3 a
|
||||||
|
3 b
|
||||||
|
3 o
|
||||||
|
3 u
|
||||||
|
3 t
|
||||||
|
3
|
||||||
|
3 i
|
||||||
|
3 t
|
||||||
|
2 ,\n
|
||||||
|
1
|
||||||
|
|
||||||
|
3 c
|
||||||
|
3 a
|
||||||
|
3 n
|
||||||
|
3
|
||||||
|
3 y
|
||||||
|
3 o
|
||||||
|
3 u
|
||||||
|
3
|
||||||
|
3 s
|
||||||
|
3 t
|
||||||
|
3 a
|
||||||
|
3 n
|
||||||
|
3 d
|
||||||
|
3
|
||||||
|
3 u
|
||||||
|
3 p?
|
||||||
|
6
|
||||||
|
|
||||||
|
150 Yeah,I'm alright? Should we\n Go before the monsters come?
|
||||||
|
|
||||||
|
3 S
|
||||||
|
3 u
|
||||||
|
3 r
|
||||||
|
3 e
|
||||||
|
3 .
|
||||||
|
210
|
||||||
|
|
@ -22,6 +22,8 @@ timer_reached: .res 2
|
||||||
timer_mode: .res 1
|
timer_mode: .res 1
|
||||||
enable_music: .res 1
|
enable_music: .res 1
|
||||||
temp: .res 3
|
temp: .res 3
|
||||||
|
dialog_col: .res 1
|
||||||
|
dialog_tick: .res 1
|
||||||
|
|
||||||
.include "lz_zp.asm"
|
.include "lz_zp.asm"
|
||||||
|
|
||||||
|
|
@ -81,7 +83,7 @@ code_start:
|
||||||
sta vbl
|
sta vbl
|
||||||
cli
|
cli
|
||||||
|
|
||||||
jsr intro
|
;jsr intro
|
||||||
|
|
||||||
lda #$0b
|
lda #$0b
|
||||||
sta $d011
|
sta $d011
|
||||||
|
|
@ -1531,6 +1533,12 @@ part_11:
|
||||||
jsr init_bmp
|
jsr init_bmp
|
||||||
jsr set_irq_badguy
|
jsr set_irq_badguy
|
||||||
inc enable_music
|
inc enable_music
|
||||||
|
lda #0
|
||||||
|
sta dialog_tick
|
||||||
|
lda #<dialog
|
||||||
|
sta text_ptr
|
||||||
|
lda #>dialog
|
||||||
|
sta text_ptr+1
|
||||||
cli
|
cli
|
||||||
|
|
||||||
lda #<256
|
lda #<256
|
||||||
|
|
@ -1836,15 +1844,104 @@ txt_fade_out_offset:
|
||||||
rts
|
rts
|
||||||
|
|
||||||
update_dialog:
|
update_dialog:
|
||||||
|
lda dialog_tick
|
||||||
|
beq @skip_tick
|
||||||
|
dec dialog_tick
|
||||||
|
rts
|
||||||
|
@skip_tick:
|
||||||
|
|
||||||
ldy #0
|
ldy #0
|
||||||
lda (text_ptr),y
|
lda (text_ptr),y
|
||||||
|
cmp #$fe
|
||||||
|
bne @skip_reset_col
|
||||||
|
cmp #$ff
|
||||||
bne :+
|
bne :+
|
||||||
rts
|
rts
|
||||||
:
|
:
|
||||||
; TODO
|
ldx dialog_col
|
||||||
|
cpx #40*2
|
||||||
|
beq @skip_reset
|
||||||
|
|
||||||
|
ldy #1
|
||||||
|
lda (text_ptr), y
|
||||||
|
sta dialog_col
|
||||||
|
ldx #0
|
||||||
|
lda #$20+$60
|
||||||
|
:
|
||||||
|
sta $748, x
|
||||||
|
inx
|
||||||
|
cpx #40*3
|
||||||
|
bcc :-
|
||||||
|
jmp @skip_reset2
|
||||||
|
@skip_reset:
|
||||||
|
ldy #1
|
||||||
|
lda (text_ptr), y
|
||||||
|
clc
|
||||||
|
adc #40*2
|
||||||
|
sta dialog_col
|
||||||
|
@skip_reset2:
|
||||||
|
|
||||||
|
lda text_ptr
|
||||||
|
clc
|
||||||
|
adc #2
|
||||||
|
sta text_ptr
|
||||||
|
bcc :+
|
||||||
|
inc text_ptr+1
|
||||||
|
:
|
||||||
|
jmp @skip_tick
|
||||||
|
@skip_reset_col:
|
||||||
|
clc
|
||||||
|
adc #1
|
||||||
|
sta dialog_tick
|
||||||
|
ldy #1
|
||||||
|
lda (text_ptr), y
|
||||||
|
sta temp+2
|
||||||
|
lda text_ptr
|
||||||
|
clc
|
||||||
|
adc #2
|
||||||
|
sta text_ptr
|
||||||
|
bcc :+
|
||||||
|
inc text_ptr+1
|
||||||
|
:
|
||||||
|
|
||||||
|
lda temp+2
|
||||||
|
beq @skip_text_upload
|
||||||
|
|
||||||
|
ldy #0
|
||||||
|
:
|
||||||
|
lda (text_ptr), y
|
||||||
|
jsr write_char_dialog
|
||||||
|
iny
|
||||||
|
cpy temp+2
|
||||||
|
bne :-
|
||||||
|
@skip_text_upload:
|
||||||
|
|
||||||
|
lda text_ptr
|
||||||
|
clc
|
||||||
|
adc temp+2
|
||||||
|
sta text_ptr
|
||||||
|
bcc :+
|
||||||
|
inc text_ptr+1
|
||||||
|
:
|
||||||
|
|
||||||
|
rts
|
||||||
|
|
||||||
|
write_char_dialog:
|
||||||
|
cmp #$0a ; newline
|
||||||
|
bne :+
|
||||||
|
lda #40*2
|
||||||
|
sta dialog_col
|
||||||
|
rts
|
||||||
|
:
|
||||||
|
ldx dialog_col
|
||||||
|
clc
|
||||||
|
adc #$60
|
||||||
|
sta $748, x
|
||||||
|
inc dialog_col
|
||||||
rts
|
rts
|
||||||
|
|
||||||
dialog:
|
dialog:
|
||||||
|
/*
|
||||||
.byte 0, "are you ok?", 0
|
.byte 0, "are you ok?", 0
|
||||||
.byte 1, "... who are you?", 0
|
.byte 1, "... who are you?", 0
|
||||||
.byte 2, "thank goodness.\ni'm lilia from lance village.", 0
|
.byte 2, "thank goodness.\ni'm lilia from lance village.", 0
|
||||||
|
|
@ -1856,3 +1953,5 @@ dialog:
|
||||||
.byte 8, "how about it,\ncan you stand up?", 0
|
.byte 8, "how about it,\ncan you stand up?", 0
|
||||||
.byte 9, "yeah,i'm alright.should we\ngo before the monsters come?", 0
|
.byte 9, "yeah,i'm alright.should we\ngo before the monsters come?", 0
|
||||||
.byte 10, "sure.", 0
|
.byte 10, "sure.", 0
|
||||||
|
*/
|
||||||
|
.incbin "liltalk.bin"
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ sfx_num: .res 1
|
||||||
sfx_list:
|
sfx_list:
|
||||||
.word sfx0, sfx1, sfx1+$29
|
.word sfx0, sfx1, sfx1+$29
|
||||||
sfx0:
|
sfx0:
|
||||||
.incbin "sfx_badguy.bin"
|
.incbin "sfx_badguy.bin", 256
|
||||||
sfx1:
|
sfx1:
|
||||||
.incbin "sfx_badguy_amb.bin"
|
.incbin "sfx_badguy_amb.bin", 256
|
||||||
.endproc
|
.endproc
|
||||||
Loading…
Reference in a new issue