Add conditional jump to music player

This commit is contained in:
Natt Akuma 2025-11-26 20:54:53 +07:00
parent c006e1a0a2
commit 6c7de32c6e
8 changed files with 42 additions and 5 deletions

View file

@ -116,6 +116,7 @@ fil_hi_n: .res CHIP_AMT
base: .res 1
chipnum: .res 1
has_played: .res chnum
extin: .res 1
vars_len = *-start_vars
.endmacro
@ -357,6 +358,7 @@ init:
jmp initaddr
play:
jmp playaddr
jmp extaddr
.byte " furC64 driver by AArt1256"
.if actual_use_zp = 0
@ -779,6 +781,18 @@ effectF0:
jmp begnote
.endmacro
.macro add_EExx
effectF2:
get_patzp
ldx extin
beq :+
sta patind
lda #$ff
sta jumppat
:
jmp begnote
.endmacro
add_09xx
add_0Fxx
add_00xx
@ -796,6 +810,7 @@ add_E5xx
add_EAxx
add_ECxx
add_4xxx
add_EExx
other_effects:
lda effects_temp
@ -866,11 +881,11 @@ effect_smc:
jmp cont_advance
eff_lo:
.repeat $12, I
.repeat $13, I
.lobytes .ident(.concat ("effect", .sprintf("%02X",I+$e0)))
.endrepeat
eff_hi:
.repeat $12, I
.repeat $13, I
.hibytes .ident(.concat ("effect", .sprintf("%02X",I+$e0)))
.endrepeat
@ -2142,6 +2157,12 @@ clamp_note:
:
rts
.proc extaddr
sta extin
lda patind
rts
.endproc
note_table_lo:
.incbin "note_lo.bin"
note_table_hi:

View file

@ -44,6 +44,7 @@ def comp(pat):
elif pat[i] == 0xEF: i += 1
elif pat[i] == 0xF0: i += 1
elif pat[i] == 0xF1: i += 2
elif pat[i] == 0xF2: i += 2
elif pat[i] == 0xFF: i += 2
elif pat[i] == 0xFD:
i += 1
@ -114,6 +115,11 @@ def conv_pattern(pattern):
temp.extend([0xED, k[1]])
has0Dxx = 0
continue
if k[0] == 0xEE:
new_byte = 1
temp.extend([0xF2, k[1]])
has0Dxx = 0
continue
if (k[0] == 0x09 or k[0] == 0x0F) and (speed_type == 1):
new_byte = 1
temp.extend([0xE1, k[1]])