-
-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Feature request
Creating these 2 functions will allow a better control on a music IT file:
spcPause()
: This function pauses a played music (started withspcPlay(0)
)spcResume()
: This function resumes a paused music (paused withspcPause()
)
Advanced Feature request
Creating this function will help developers to simply get the current startPos
value:
spcGetStartPos()
So they can pass it to spcPlay(startPos)
after stopping a music with spcStop()
.
Notes
These are the explanation of KungFuFurby that might help you to implement this feature:
startpos refers to an orderlist ID. You can retrieve the orderlist ID directly from $2143/$F7... but of course, the ASM I ported over way back when didn't include this function for whatever reason on the 65816 side.
Copy over this snippet of code, giving it a different name:
pvsneslib/pvsneslib/source/snesmodwla.asm
Lines 794 to 805 in 862adbf
;********************************************************************** | |
; read status register | |
;********************************************************************** | |
spcReadStatus: | |
ldx #5 ; read PORT2 with stability checks | |
lda REG_APUIO2 ; | |
@loop: ; | |
cmp REG_APUIO2 ; | |
bne spcReadStatus ; | |
dex ; | |
bne @loop ; | |
rts ; |
Replace all instances of REG_APUIO2 with REG_APUIO3.
I'd say put your modified function somewhere in https://github.com/alekmaul/pvsneslib/blob/master/pvsneslib/include/snes/sound.h ...but I don't see a good return type example from here. I'm thinking a u8