Finish clouds transition

This commit is contained in:
Natt Akuma 2025-11-28 04:15:00 +07:00
parent 8649775d96
commit a38269cdf0

View file

@ -20,6 +20,7 @@ timer: .res 2
timer_limit: .res 2 timer_limit: .res 2
timer_reached: .res 2 timer_reached: .res 2
timer_mode: .res 1 timer_mode: .res 1
enable_music: .res 1
temp: .res 3 temp: .res 3
aart_lz_buffer := $fd00 aart_lz_buffer := $fd00
@ -99,11 +100,8 @@ code_start:
lda #0 lda #0
sta $d020 sta $d020
sta ZX0_dst+0 sta ZX0_dst+0
sta enable_music
jsr load_font 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 init_2x
jsr clr_txt jsr clr_txt
ldx #<copyright ldx #<copyright
@ -160,6 +158,7 @@ code_start:
sta $fffe sta $fffe
lda #>fake_kernal_irq lda #>fake_kernal_irq
sta $ffff sta $ffff
inc enable_music
jsr run_nufli_bmp jsr run_nufli_bmp
sei sei
@ -395,7 +394,6 @@ code_start:
ldx #$10 ldx #$10
ldy #$01 ldy #$01
lda #8*11 lda #8*11
sta timer
jsr txt_fade_out_offset jsr txt_fade_out_offset
ldx #$c4 ldx #$c4
@ -777,7 +775,7 @@ init_2x:
sta $d012 sta $d012
position_2x_to_display: position_2x_to_display:
lda #51 lda #50
position_2x: position_2x:
: :
bit $d011 bit $d011
@ -850,7 +848,10 @@ irq_music:
inc vbl inc vbl
;inc $d020 ;inc $d020
lda enable_music
beq :+
jsr $a003 jsr $a003
:
;dec $d020 ;dec $d020
lda timer_mode lda timer_mode
@ -1389,7 +1390,7 @@ load_font:
part_10: part_10:
; the sprite data is embedded into first few bitmap pixels ; the sprite data is embedded into first few bitmap pixels
; which are hidden by black border attributes ; which are hidden by black border attributes
@y = $60 @y = 93
jsr clr_txt jsr clr_txt
ldx #<total_direct ldx #<total_direct
ldy #>total_direct ldy #>total_direct
@ -1426,6 +1427,8 @@ part_10:
sta $d026 sta $d026
lda #@y+48 lda #@y+48
jsr position_2x jsr position_2x
lda #0
sta vbl
; draw top half ; draw top half
@loop: @loop:
bit $d011 bit $d011
@ -1433,10 +1436,16 @@ part_10:
ldx #0 ldx #0
ldy #0 ldy #0
lda frame lda frame
cmp #200 ; TODO bpl :+
bcc :+
jmp @finish jmp @finish
: :
cmp #$74
bcc :+
lda #$74
:
pha
:
clc
adc @sprxs,x adc @sprxs,x
sta $d000,y sta $d000,y
sta temp sta temp
@ -1467,7 +1476,7 @@ part_10:
ldx #0 ldx #0
ldy #0 ldy #0
lda frame pla
clc clc
: :
adc @sprxs+8,x adc @sprxs+8,x
@ -1485,15 +1494,18 @@ part_10:
iny iny
inx inx
cpx #6 cpx #6
nop
bcc :- bcc :-
lda vbl
and #15
bne :+
inc frame inc frame
:
jmp @loop jmp @loop
@sprxs: @sprxs:
.byte 200, <-24, 24, 24, <-64, 24, 24, 24 .byte 48, <-24, 24, 24, <-64, 24, 24, 24
.byte 200-40, 24, 24, 24, <-44, 24 .byte 48-40, 24, 24, 24, <-44, 24
@sprys: @sprys:
.byte @y-8, @y, @y, @y, @y+21, @y+21, @y+21, @y+21 .byte @y-8, @y, @y, @y, @y+21, @y+21, @y+21, @y+21
@ -1504,40 +1516,84 @@ part_10:
.byte 2, 2, 2, 9, 2, 2 .byte 2, 2, 2, 9, 2, 2
@finish: @finish:
jsr position_2x_to_display lda #$0b
sta $d011
lda #0
sta $d015
jsr clr_txt
ldx #<produced
ldy #>produced
jsr write_txt2
ldx #$c0
ldy #$01
jsr init_timer
lda #1
sta timer_mode
:
lda timer_reached
beq :-
ldx #$48
ldy #$01
lda #8*11
jsr txt_fade_out_offset
part_11: part_11:
jsr clr_txt
ldx #<presented
ldy #>presented
jsr write_txt1
ldx #$c0
ldy #$01
jsr init_timer
lda #1
sta timer_mode
; ldx #<liliatalkname
; ldy #>liliatalkname
; jsr load_8000_zx02_2000
:
lda timer_reached
beq :-
; tell the music to end and wait ; tell the music to end and wait
: :
lda #1 lda #1
jsr $a006 jsr $a006
cmp #17 cmp #17
bne :- bne :-
; load new music
sei
jsr set_irq_badguy
ldx #$00
ldy #$01
lda #8*11
jsr txt_fade_out_offset
:
lda timer_reached
beq :-
jmp * ; TEMP
; load new music
lda #0
sta enable_music
ldx #<song1name ldx #<song1name
ldy #>song1name ldy #>song1name
lda #$a0 lda #$a0
jsr load_8000_zx02 jsr load_8000_zx02
sei
jsr set_irq_badguy
inc enable_music
cli cli
jsr clr_txt jsr clr_txt
ldx #<turn_disk ldx #<turn_disk
ldy #>turn_disk ldy #>turn_disk
jsr write_txt jsr write_txt1
jmp end jmp end
.res ((*+$ff)&$ff00|2)-*
end:
ldx #<fontname
ldy #>fontname
jsr fileexists
bcc end
jmp code_start
clear_2bufs: clear_2bufs:
ldy #$44 ldy #$44
.byte $2c ; skip next instruction .byte $2c ; skip next instruction
@ -1682,7 +1738,11 @@ total_direct:
.byte " total directed by " .byte " total directed by "
.byte " masaya hashimoto " .byte " masaya hashimoto "
presented_by: produced:
.byte " produced by "
.byte " masayuki katoh "
presented:
.byte " presented by falcom " .byte " presented by falcom "
turn_disk: turn_disk:
@ -1775,7 +1835,7 @@ write_txt2:
ldx #>($400+13*40) ldx #>($400+13*40)
jmp write_txt_to jmp write_txt_to
write_txt: write_txt1:
stx text_ptr stx text_ptr
sty text_ptr+1 sty text_ptr+1
ldy #0 ldy #0
@ -1814,4 +1874,12 @@ 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: