Improve intro part, add second song
This commit is contained in:
parent
c6232454f1
commit
d43158e45d
|
|
@ -132,6 +132,7 @@ AS_FLAGS = -Wa -I../../../shared -I ../../include -u __EXEHDR__
|
||||||
|
|
||||||
ZX0PRGS = \
|
ZX0PRGS = \
|
||||||
song0.zx0.prg \
|
song0.zx0.prg \
|
||||||
|
song1.zx0.prg \
|
||||||
badguy.zx0.prg \
|
badguy.zx0.prg \
|
||||||
title_320-prepared.zx0.prg \
|
title_320-prepared.zx0.prg \
|
||||||
tower.zx0.prg \
|
tower.zx0.prg \
|
||||||
|
|
@ -181,6 +182,7 @@ $(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS) font.bin
|
||||||
$(CC1541) -n "otomata labs" -i " 2025" \
|
$(CC1541) -n "otomata labs" -i " 2025" \
|
||||||
-f "ys2intro" -w $< \
|
-f "ys2intro" -w $< \
|
||||||
-f "song0" -w song0.zx0.prg \
|
-f "song0" -w song0.zx0.prg \
|
||||||
|
-f "song1" -w song1.zx0.prg \
|
||||||
-f "badguy" -w badguy.zx0.prg \
|
-f "badguy" -w badguy.zx0.prg \
|
||||||
-f "font" -w font.bin \
|
-f "font" -w font.bin \
|
||||||
-f "intrbmp" -w title_320-prepared.zx0.prg \
|
-f "intrbmp" -w title_320-prepared.zx0.prg \
|
||||||
|
|
@ -230,6 +232,10 @@ song0.bin: ys2_fixed_drums.fur
|
||||||
cd $(FURC64) && ./convert.sh $(abspath $<)
|
cd $(FURC64) && ./convert.sh $(abspath $<)
|
||||||
cp $(FURC64)/asm/song.bin $@
|
cp $(FURC64)/asm/song.bin $@
|
||||||
|
|
||||||
|
song1.bin: ys2_lilia_sid.fur
|
||||||
|
cd $(FURC64) && ./convert.sh $(abspath $<)
|
||||||
|
cp $(FURC64)/asm/song.bin $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-$(RM) $(ZX0PRGS) $(LZPRGS)
|
-$(RM) $(ZX0PRGS) $(LZPRGS)
|
||||||
-$(RM) *.o $(ASSEMBLE) $(DISKIMAGE)
|
-$(RM) *.o $(ASSEMBLE) $(DISKIMAGE)
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -94,51 +94,44 @@ code_start:
|
||||||
.org CODE_START_ADDR
|
.org CODE_START_ADDR
|
||||||
|
|
||||||
sei
|
sei
|
||||||
|
lda #$0b
|
||||||
lda #0
|
sta $d011
|
||||||
jsr load_font
|
|
||||||
|
|
||||||
lda #$34
|
|
||||||
sta $01
|
|
||||||
|
|
||||||
lda #0
|
|
||||||
tax
|
|
||||||
:
|
|
||||||
.repeat 4, I
|
|
||||||
sta $d000+(I*250), x
|
|
||||||
.endrepeat
|
|
||||||
inx
|
|
||||||
cpx #250
|
|
||||||
bne :-
|
|
||||||
|
|
||||||
lda #$35
|
|
||||||
sta $01
|
|
||||||
|
|
||||||
lda #0
|
lda #0
|
||||||
|
sta $d020
|
||||||
sta ZX0_dst+0
|
sta ZX0_dst+0
|
||||||
|
jsr load_font
|
||||||
|
; we don't have the music player here yet
|
||||||
|
; so just put an rts instruction at $a003
|
||||||
|
lda #$60
|
||||||
|
sta $a003
|
||||||
|
jsr init_2x
|
||||||
|
jsr clr_txt
|
||||||
|
ldx #<copyright
|
||||||
|
ldy #>copyright
|
||||||
|
jsr write_txt3
|
||||||
|
ldx #$30
|
||||||
|
ldy #$01
|
||||||
|
jsr init_timer
|
||||||
|
lda #1
|
||||||
|
sta timer_mode
|
||||||
|
|
||||||
ldx #<badguy
|
ldx #<badguy
|
||||||
ldy #>badguy
|
ldy #>badguy
|
||||||
jsr load_8000_zx02_2000
|
jsr load_8000_zx02_2000
|
||||||
|
|
||||||
lda #127
|
:
|
||||||
sta $dc0d
|
lda timer_reached
|
||||||
|
beq :-
|
||||||
|
|
||||||
and $d011
|
ldx #250
|
||||||
sta $d011
|
ldy #0
|
||||||
|
jsr txt_fade_out
|
||||||
|
lda #64
|
||||||
|
sta frame_delay
|
||||||
|
jsr wait_loop
|
||||||
|
|
||||||
lda $dc0d
|
sei
|
||||||
lda $dd0d
|
jsr set_irq_badguy
|
||||||
|
|
||||||
lda #<irq_badguy
|
|
||||||
sta $fffe
|
|
||||||
lda #>irq_badguy
|
|
||||||
sta $ffff
|
|
||||||
|
|
||||||
lda #$1b
|
|
||||||
sta $d011
|
|
||||||
lda #$d2
|
|
||||||
sta $d012
|
|
||||||
|
|
||||||
lda #1
|
lda #1
|
||||||
sta $d01a
|
sta $d01a
|
||||||
|
|
@ -150,10 +143,6 @@ code_start:
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|
||||||
lda #64
|
|
||||||
sta frame_delay
|
|
||||||
jsr wait_loop
|
|
||||||
|
|
||||||
jsr intro
|
jsr intro
|
||||||
|
|
||||||
lda #$0b
|
lda #$0b
|
||||||
|
|
@ -170,23 +159,17 @@ code_start:
|
||||||
lda #$a0
|
lda #$a0
|
||||||
jsr load_8000_zx02
|
jsr load_8000_zx02
|
||||||
|
|
||||||
ldx #<towername
|
|
||||||
ldy #>towername
|
|
||||||
jsr loadraw
|
|
||||||
|
|
||||||
lda #<fake_kernal_irq
|
lda #<fake_kernal_irq
|
||||||
sta $fffe
|
sta $fffe
|
||||||
lda #>fake_kernal_irq
|
lda #>fake_kernal_irq
|
||||||
sta $ffff
|
sta $ffff
|
||||||
|
|
||||||
lda #1
|
|
||||||
sta $d01a
|
|
||||||
|
|
||||||
jsr run_nufli_bmp
|
jsr run_nufli_bmp
|
||||||
sei
|
sei
|
||||||
jsr init_2x
|
jsr init_2x
|
||||||
lda #$0b
|
lda #$0b
|
||||||
sta $d011
|
sta $d011
|
||||||
|
; jmp part_11
|
||||||
|
|
||||||
jsr clr_txt
|
jsr clr_txt
|
||||||
ldx #<story_writ
|
ldx #<story_writ
|
||||||
|
|
@ -198,8 +181,9 @@ code_start:
|
||||||
lda #1
|
lda #1
|
||||||
sta timer_mode
|
sta timer_mode
|
||||||
|
|
||||||
lda #$20
|
ldx #<towername
|
||||||
jsr zx02_8000
|
ldy #>towername
|
||||||
|
jsr load_8000_zx02_2000
|
||||||
|
|
||||||
:
|
:
|
||||||
lda timer_reached
|
lda timer_reached
|
||||||
|
|
@ -207,12 +191,7 @@ code_start:
|
||||||
|
|
||||||
ldx #$b8
|
ldx #$b8
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr init_timer
|
jsr txt_fade_out
|
||||||
lda #2
|
|
||||||
sta timer_mode
|
|
||||||
:
|
|
||||||
lda timer_reached
|
|
||||||
beq :-
|
|
||||||
|
|
||||||
jsr init_bmp
|
jsr init_bmp
|
||||||
|
|
||||||
|
|
@ -253,12 +232,7 @@ code_start:
|
||||||
|
|
||||||
ldx #$90
|
ldx #$90
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr init_timer
|
jsr txt_fade_out
|
||||||
lda #2
|
|
||||||
sta timer_mode
|
|
||||||
:
|
|
||||||
lda timer_reached
|
|
||||||
beq :-
|
|
||||||
|
|
||||||
jsr init_bmp
|
jsr init_bmp
|
||||||
|
|
||||||
|
|
@ -316,13 +290,7 @@ code_start:
|
||||||
|
|
||||||
ldx #$48
|
ldx #$48
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr init_timer
|
jsr txt_fade_out
|
||||||
lda #2
|
|
||||||
sta timer_mode
|
|
||||||
|
|
||||||
:
|
|
||||||
lda timer_reached
|
|
||||||
beq :-
|
|
||||||
|
|
||||||
jsr init_bmp
|
jsr init_bmp
|
||||||
|
|
||||||
|
|
@ -393,13 +361,7 @@ code_start:
|
||||||
|
|
||||||
ldx #$48
|
ldx #$48
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr init_timer
|
jsr txt_fade_out
|
||||||
lda #2
|
|
||||||
sta timer_mode
|
|
||||||
|
|
||||||
:
|
|
||||||
lda timer_reached
|
|
||||||
beq :-
|
|
||||||
|
|
||||||
jsr init_bmp
|
jsr init_bmp
|
||||||
|
|
||||||
|
|
@ -483,13 +445,7 @@ code_start:
|
||||||
|
|
||||||
ldx #$20
|
ldx #$20
|
||||||
ldy #$01
|
ldy #$01
|
||||||
jsr init_timer
|
jsr txt_fade_out
|
||||||
lda #2
|
|
||||||
sta timer_mode
|
|
||||||
|
|
||||||
:
|
|
||||||
lda timer_reached
|
|
||||||
beq :-
|
|
||||||
|
|
||||||
part_9:
|
part_9:
|
||||||
; $0400-$07ff buffer 0 tilemap
|
; $0400-$07ff buffer 0 tilemap
|
||||||
|
|
@ -766,8 +722,7 @@ intro:
|
||||||
|
|
||||||
lda #120
|
lda #120
|
||||||
sta frame_delay
|
sta frame_delay
|
||||||
jsr wait_loop
|
jmp wait_loop
|
||||||
rts
|
|
||||||
|
|
||||||
wait_frame:
|
wait_frame:
|
||||||
@loop:
|
@loop:
|
||||||
|
|
@ -907,12 +862,14 @@ irq_music:
|
||||||
bne :+
|
bne :+
|
||||||
inc timer+1
|
inc timer+1
|
||||||
:
|
:
|
||||||
lda timer
|
|
||||||
cmp timer_limit
|
|
||||||
bne :+
|
|
||||||
lda timer+1
|
lda timer+1
|
||||||
cmp timer_limit+1
|
cmp timer_limit+1
|
||||||
|
bcc :++
|
||||||
bne :+
|
bne :+
|
||||||
|
lda timer
|
||||||
|
cmp timer_limit
|
||||||
|
bcc :++
|
||||||
|
:
|
||||||
lda #1
|
lda #1
|
||||||
sta timer_reached
|
sta timer_reached
|
||||||
:
|
:
|
||||||
|
|
@ -1200,18 +1157,13 @@ update_bmp:
|
||||||
|
|
||||||
irq_badguy:
|
irq_badguy:
|
||||||
pha
|
pha
|
||||||
txa
|
|
||||||
pha
|
|
||||||
tya
|
|
||||||
pha
|
|
||||||
|
|
||||||
inc vbl
|
pha
|
||||||
;inc $d020
|
pla
|
||||||
|
pha
|
||||||
nop
|
pla
|
||||||
nop
|
pha
|
||||||
nop
|
pla
|
||||||
nop
|
|
||||||
lda #$1b
|
lda #$1b
|
||||||
sta $d011
|
sta $d011
|
||||||
lda #$c8
|
lda #$c8
|
||||||
|
|
@ -1221,11 +1173,21 @@ irq_badguy:
|
||||||
lda #1
|
lda #1
|
||||||
sta $d021
|
sta $d021
|
||||||
|
|
||||||
lda #$fa
|
lda #<irq_badguy2
|
||||||
:
|
sta $fffe
|
||||||
cmp $d012
|
lda #>irq_badguy2
|
||||||
bcs :-
|
sta $ffff
|
||||||
|
lda #$fb
|
||||||
|
sta $d012
|
||||||
|
|
||||||
|
asl $d019
|
||||||
|
pla
|
||||||
|
rti
|
||||||
|
|
||||||
|
irq_badguy2:
|
||||||
|
pha
|
||||||
|
|
||||||
|
inc vbl
|
||||||
lda #$3b
|
lda #$3b
|
||||||
sta $d011
|
sta $d011
|
||||||
lda #$d8
|
lda #$d8
|
||||||
|
|
@ -1235,19 +1197,42 @@ irq_badguy:
|
||||||
lda #0
|
lda #0
|
||||||
sta $d021
|
sta $d021
|
||||||
|
|
||||||
;dec $d020
|
lda #<irq_badguy
|
||||||
|
sta $fffe
|
||||||
|
lda #>irq_badguy
|
||||||
|
sta $ffff
|
||||||
|
lda #$d2
|
||||||
|
sta $d012
|
||||||
|
|
||||||
asl $d019
|
asl $d019
|
||||||
pla
|
pla
|
||||||
tay
|
|
||||||
pla
|
|
||||||
tax
|
|
||||||
pla
|
|
||||||
rti
|
rti
|
||||||
|
|
||||||
|
set_irq_badguy:
|
||||||
|
lda #127
|
||||||
|
sta $dc0d
|
||||||
|
|
||||||
|
and $d011
|
||||||
|
sta $d011
|
||||||
|
|
||||||
|
lda $dc0d
|
||||||
|
lda $dd0d
|
||||||
|
|
||||||
|
lda #<irq_badguy
|
||||||
|
sta $fffe
|
||||||
|
lda #>irq_badguy
|
||||||
|
sta $ffff
|
||||||
|
|
||||||
|
lda #$1b
|
||||||
|
sta $d011
|
||||||
|
lda #$d2
|
||||||
|
sta $d012
|
||||||
|
rts
|
||||||
|
|
||||||
badguy: .byte "badguy",0
|
badguy: .byte "badguy",0
|
||||||
fontname: .byte "font",0
|
fontname: .byte "font",0
|
||||||
song0name: .byte "song0", 0
|
song0name: .byte "song0", 0
|
||||||
|
song1name: .byte "song1", 0
|
||||||
introname: .byte "intrbmp", 0
|
introname: .byte "intrbmp", 0
|
||||||
towername: .byte "tower", 0
|
towername: .byte "tower", 0
|
||||||
towerbeamname: .byte "towerbm", 0
|
towerbeamname: .byte "towerbm", 0
|
||||||
|
|
@ -1320,6 +1305,7 @@ run_nufli_bmp:
|
||||||
sta $80
|
sta $80
|
||||||
lda #0
|
lda #0
|
||||||
sta $d01a
|
sta $d01a
|
||||||
|
asl $d019
|
||||||
jsr $a000
|
jsr $a000
|
||||||
cli
|
cli
|
||||||
jsr $3000
|
jsr $3000
|
||||||
|
|
@ -1509,6 +1495,16 @@ part_11:
|
||||||
jsr $a006
|
jsr $a006
|
||||||
cmp #17
|
cmp #17
|
||||||
bne :-
|
bne :-
|
||||||
|
; load new music
|
||||||
|
sei
|
||||||
|
jsr set_irq_badguy
|
||||||
|
|
||||||
|
ldx #<song1name
|
||||||
|
ldy #>song1name
|
||||||
|
lda #$a0
|
||||||
|
jsr load_8000_zx02
|
||||||
|
cli
|
||||||
|
|
||||||
jmp end
|
jmp end
|
||||||
|
|
||||||
.res ((*+$ff)&$ff00|2)-*
|
.res ((*+$ff)&$ff00|2)-*
|
||||||
|
|
@ -1517,8 +1513,7 @@ end:
|
||||||
ldy #>fontname
|
ldy #>fontname
|
||||||
jsr fileexists
|
jsr fileexists
|
||||||
bcc end
|
bcc end
|
||||||
jsr load_font
|
jmp code_start
|
||||||
jmp *
|
|
||||||
|
|
||||||
clear_2bufs:
|
clear_2bufs:
|
||||||
ldy #$44
|
ldy #$44
|
||||||
|
|
@ -1620,76 +1615,41 @@ copybuf:
|
||||||
@tdstlo: .lobytes (16+4)*40+$6008, (16+4)*40+$0408
|
@tdstlo: .lobytes (16+4)*40+$6008, (16+4)*40+$0408
|
||||||
@tdsthi: .hibytes (16+4)*40+$6008, (16+4)*40+$0408
|
@tdsthi: .hibytes (16+4)*40+$6008, (16+4)*40+$0408
|
||||||
|
|
||||||
|
copyright:
|
||||||
|
.byte " ys ^ "
|
||||||
|
.byte " copyright 1988 falcom "
|
||||||
|
.byte " all right reserved "
|
||||||
|
|
||||||
story_writ:
|
story_writ:
|
||||||
.res 11, ' '
|
|
||||||
.byte " story written by "
|
.byte " story written by "
|
||||||
.res 40-(16+11), ' '
|
|
||||||
.res 11, ' '
|
|
||||||
.res 5, ' '
|
|
||||||
.byte " takahiro ohura "
|
.byte " takahiro ohura "
|
||||||
.res 40-(14+11+5), ' '
|
|
||||||
.res 11, ' '
|
|
||||||
.res 5, ' '
|
|
||||||
.byte " tomoo yamane "
|
.byte " tomoo yamane "
|
||||||
.res 40-(12+11+5), ' '
|
|
||||||
|
|
||||||
scenario_writ:
|
scenario_writ:
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " scenario written by "
|
.byte " scenario written by "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " tomoyoshi miyazaki "
|
.byte " tomoyoshi miyazaki "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
|
|
||||||
prog_writ:
|
prog_writ:
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.byte " programmed by "
|
.byte " programmed by "
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.byte " masaya hashimoto "
|
.byte " masaya hashimoto "
|
||||||
.res (40-22)/2, ' '
|
|
||||||
|
|
||||||
gart_writ:
|
gart_writ:
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " graphic arts designed by "
|
.byte " graphic arts designed by "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " takahiro ohura "
|
.byte " takahiro ohura "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " ayano koshiro "
|
.byte " ayano koshiro "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " kazuhiko tsuzuki "
|
.byte " kazuhiko tsuzuki "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.res (40-24)/2, ' '
|
|
||||||
.byte " tomoo yamane "
|
.byte " tomoo yamane "
|
||||||
.res (40-24)/2, ' '
|
|
||||||
|
|
||||||
music_writ:
|
music_writ:
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.byte " music composed by "
|
.byte " music composed by "
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.byte " mieko ishikawa "
|
.byte " mieko ishikawa "
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.byte " yuzo koshiro "
|
.byte " yuzo koshiro "
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.res (40-20)/2, ' '
|
|
||||||
.byte " hideya nagata "
|
.byte " hideya nagata "
|
||||||
.res (40-20)/2, ' '
|
|
||||||
|
|
||||||
scene_writ:
|
scene_writ:
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.byte " scene set by "
|
.byte " scene set by "
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.byte " seigo oketani "
|
.byte " seigo oketani "
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.res (40-22)/2, ' '
|
|
||||||
.byte " yoshihiko kurata "
|
.byte " yoshihiko kurata "
|
||||||
.res (40-22)/2, ' '
|
|
||||||
|
|
||||||
clr_txt:
|
clr_txt:
|
||||||
lda #$80
|
lda #$80
|
||||||
|
|
@ -1909,4 +1869,13 @@ write_txt2:
|
||||||
bne :-
|
bne :-
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
txt_fade_out:
|
||||||
|
jsr init_timer
|
||||||
|
lda #2
|
||||||
|
sta timer_mode
|
||||||
|
:
|
||||||
|
lda timer_reached
|
||||||
|
beq :-
|
||||||
|
rts
|
||||||
|
|
||||||
code_end:
|
code_end:
|
||||||
|
|
|
||||||
BIN
loader/samples/minexample/song1.bin
Normal file
BIN
loader/samples/minexample/song1.bin
Normal file
Binary file not shown.
BIN
loader/samples/minexample/ys2_lilia_sid.fur
Normal file
BIN
loader/samples/minexample/ys2_lilia_sid.fur
Normal file
Binary file not shown.
Loading…
Reference in a new issue