diff --git a/.gitignore b/.gitignore index 32b1aee..07aa64f 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ loader/samples/minexample/*.o loader/samples/minexample/*.zx0.prg loader/samples/minexample/*.lz.prg loader/samples/minexample/*.tmp +loader/samples/minexample/song0.bin diff --git a/loader/samples/minexample/Makefile b/loader/samples/minexample/Makefile index 2241425..276c2f2 100644 --- a/loader/samples/minexample/Makefile +++ b/loader/samples/minexample/Makefile @@ -131,7 +131,7 @@ DISKIMAGE = $(BUILDDIR)/$(NAME)-$(_PLATFORM_).d64 AS_FLAGS = -Wa -I../../../shared -I ../../include -u __EXEHDR__ ZX0PRGS = \ - use_this_sid.zx0.prg \ + song0.zx0.prg \ badguy.zx0.prg \ title_320-prepared.zx0.prg \ tower.zx0.prg \ @@ -180,7 +180,7 @@ $(DISKIMAGE): $(ASSEMBLE) $(CC1541) $(ZX0PRGS) $(LZPRGS) font.bin $(RM) $@ $(CC1541) -n "otomata labs" -i " 2025" \ -f "ys2intro" -w $< \ - -f "song0" -w use_this_sid.zx0.prg \ + -f "song0" -w song0.zx0.prg \ -f "badguy" -w badguy.zx0.prg \ -f "font" -w font.bin \ -f "intrbmp" -w title_320-prepared.zx0.prg \ @@ -226,7 +226,7 @@ $(ZX02): $(PRINTF) "\x00\x90" | cat - $@.tmp > $@ $(RM) $@.tmp -use_this_sid.bin: ys2_port_legato.fur +song0.bin: ys2_fixed_drums.fur cd $(FURC64) && ./convert.sh $(abspath $<) cp $(FURC64)/asm/song.bin $@ diff --git a/loader/samples/minexample/furC64/asm/furC64.asm b/loader/samples/minexample/furC64/asm/furC64.asm index 5629d5a..0459488 100644 --- a/loader/samples/minexample/furC64/asm/furC64.asm +++ b/loader/samples/minexample/furC64/asm/furC64.asm @@ -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: diff --git a/loader/samples/minexample/furC64/convert_to_asm.py b/loader/samples/minexample/furC64/convert_to_asm.py index 14ac9aa..531f72f 100644 --- a/loader/samples/minexample/furC64/convert_to_asm.py +++ b/loader/samples/minexample/furC64/convert_to_asm.py @@ -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]]) diff --git a/loader/samples/minexample/minexample.s b/loader/samples/minexample/minexample.s index f87c15d..9e68f72 100644 --- a/loader/samples/minexample/minexample.s +++ b/loader/samples/minexample/minexample.s @@ -1502,6 +1502,15 @@ part_10: @finish: jsr position_2x_to_display +part_11: + ; tell the music to end and wait +: + lda #1 + jsr $a006 + cmp #17 + bne :- + jmp end + .res ((*+$ff)&$ff00|2)-* end: ldx #