chrisly42
9c48c11cd1
- Bugfix: WaitForFrame was completely broken. Now also caters for race-condition that would have waited one extra frame. - Bugfix: InitPart would overwrite innocent memory (reported by Gigabates and Losso) - Bugfix: Palette LERP had wrong bias. - Removed extra paths in include statement, use default include paths instead - Added Raspberry Casket no-jitter background calc mode (FW_MUSIC_PLAYER_CHOICE = 6) - Updated Raspberry Casket to V2.0 presto branch (WIP) - Removed fw_FrameCounterLong, use fw_FrameCounter-2 for debug purposes - Support for blue noise palette LERPing (like in Is Real). Provide your own blue noise table (4 KB), stuff it into fw_BlueNoiseTablePtr, set FW_PALETTE_LERP_SUPPORT to 2 - Music tick routine is now replaceable during runtime (fw_MusicTickRoutine) - Support for softints and audio interrupts - LMB exit can also be disabled dynamically when using FW_LMB_EXIT_SUPPORT = 2 and fw_DisableLMBExit != 0 - Added LSP Micro support and LSP Nano (custom format that uses note pitches instead of periods) - Minor other things
67 lines
2.0 KiB
NASM
67 lines
2.0 KiB
NASM
IFEQ FW_VBL_MUSIC_IRQ
|
|
fail "FW_VBL_MUSIC_IRQ must be enabled"
|
|
ENDC
|
|
IFEQ FW_DYNAMIC_MEMORY_SUPPORT
|
|
fail "FW_DYNAMIC_MEMORY_SUPPORT must be enabled"
|
|
ENDC
|
|
|
|
fw_MusicAlloc:
|
|
; actually $1C6E for player (V1.0), $984 for song
|
|
move.l #$1C6E+$984,d0
|
|
bsr fw_AllocFast
|
|
move.l a0,fw_PretrackerMyPlayer(a6)
|
|
lea $1C6E(a0),a0
|
|
move.l a0,fw_PretrackerMySong(a6)
|
|
rts
|
|
|
|
fw_MusicInit:
|
|
PUTMSG 10,<"%d: Pretracker song init %p %p">,fw_FrameCounter-2(a6),a0,a1
|
|
move.l a0,a2
|
|
PUSHM d7/a1
|
|
move.l fw_PretrackerMyPlayer(a6),a0
|
|
move.l fw_PretrackerMySong(a6),a1
|
|
PUTMSG 10,<"MyPlayer=%p MySong=%p Data=%p">,a0,a1,a2
|
|
lea fw_PretrackerReplayer(pc),a3
|
|
adda.w 2(a3),a3
|
|
jsr (a3) ; songInit
|
|
POPM
|
|
|
|
move.l a1,d1
|
|
bne.s .noalloc
|
|
PUTMSG 10,<"Allocating %ld bytes samples memory for Pretracker">,d0
|
|
bsr fw_AllocChip
|
|
move.l a0,fw_MusicSamples(a6)
|
|
move.l a0,a1
|
|
.noalloc
|
|
|
|
PUTMSG 10,<"%d: Pretracker player init">,fw_FrameCounter-2(a6)
|
|
move.l fw_PretrackerMyPlayer(a6),a0
|
|
move.l fw_PretrackerMySong(a6),a2
|
|
|
|
lea fw_PretrackerReplayer(pc),a3
|
|
adda.w 6(a3),a3
|
|
jsr (a3) ; playerInit
|
|
|
|
lea fw_MusicPlay(pc),a0
|
|
move.l a0,fw_MusicTickRoutine(a6)
|
|
PUTMSG 10,<"%d: Pretracker init done">,fw_FrameCounter-2(a6)
|
|
rts
|
|
|
|
fw_MusicPlay:
|
|
move.l fw_PretrackerMyPlayer(a6),a0
|
|
lea fw_PretrackerReplayer(pc),a3
|
|
adda.w 10(a3),a3
|
|
jmp (a3) ; playerTick
|
|
|
|
fw_MusicStop:
|
|
clr.l fw_MusicTickRoutine(a6)
|
|
move.w #DMAF_AUDIO,dmacon(a5)
|
|
; unsupported right now
|
|
rts
|
|
|
|
;--------------------------------------------------------------------
|
|
|
|
fw_PretrackerReplayer:
|
|
;include "musicplayers/pretracker_replayer_resourced.asm"
|
|
incbin "musicplayers/pretracker_replayer_binary_blob.bin"
|