EDIT: RESOLVED
As noted by glutock (Thank You!), LDX FT_SFX_CH1 should have been LDX #FT_SFX_CH1
If weird crap happens in memory while playing sound effects, check for this : ) and thanks everyone for your help.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I completed my second game and have been working on final touches. Up until now I've been playing music and using one sound effect channel. I decided to use two sound effect channels since one sound in particular happens often and I didn't want it to get cut off.
If I use FT_SFX_CH0, everything is fine (been using this one only up until now)
If I use FT_SFX_CH1, everything gets glitched up, including vram? It's odd.
If I use FT_SFX_CH2, everything is fine, I can actually use channel 2 and 0 together without issue. Why would channel 1 sends things out of whack? This might be a loaded question but I'm hoping the symptom is obvious; I re-read the readme that came with the library and didn't see anything special about channel 1.
If it helps, here is the layout of how I'm using memory (NROM, no bankswitching):
And here is my famitone2 init macros
My famitone2 updates are in NMI and my play effects calls are in main thread.
As noted by glutock (Thank You!), LDX FT_SFX_CH1 should have been LDX #FT_SFX_CH1
If weird crap happens in memory while playing sound effects, check for this : ) and thanks everyone for your help.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I completed my second game and have been working on final touches. Up until now I've been playing music and using one sound effect channel. I decided to use two sound effect channels since one sound in particular happens often and I didn't want it to get cut off.
If I use FT_SFX_CH0, everything is fine (been using this one only up until now)
If I use FT_SFX_CH1, everything gets glitched up, including vram? It's odd.
If I use FT_SFX_CH2, everything is fine, I can actually use channel 2 and 0 together without issue. Why would channel 1 sends things out of whack? This might be a loaded question but I'm hoping the symptom is obvious; I re-read the readme that came with the library and didn't see anything special about channel 1.
If it helps, here is the layout of how I'm using memory (NROM, no bankswitching):
Code:
; zero page memory 0000 - 00FF
; stack memory 0100 - 01FF
; memory range 0100 - 010F = enemy slots (tail end of stack memory, don't let stack build up)
; memory range 0200 - 0300 = sprite ram
; memory range 0300 - 06CO = virtual gameboard nametable
; memory range 06C0 - 06FF = ppu buffer
; memory range 0700 - 0800 = famitone2
; stack memory 0100 - 01FF
; memory range 0100 - 010F = enemy slots (tail end of stack memory, don't let stack build up)
; memory range 0200 - 0300 = sprite ram
; memory range 0300 - 06CO = virtual gameboard nametable
; memory range 06C0 - 06FF = ppu buffer
; memory range 0700 - 0800 = famitone2
And here is my famitone2 init macros
Code:
FT_BASE_ADR = $0700 ; page in the RAM used for FT2 variables, should be $xx00
FT_TEMP = $F5 ; 3 bytes in zeropage used by the library as a scratchpad
FT_DPCM_OFF = $c000 ; $c000..$ffc0, 64-byte steps
FT_SFX_STREAMS = 3 ; number of sound effects played at once, 1..4
;FT_DPCM_ENABLE ;undefine to exclude all DMC code
FT_SFX_ENABLE ;undefine to exclude all sound effects code
FT_THREAD ;undefine if you are calling sound effects from the same thread as the sound update call
;FT_PAL_SUPPORT ;undefine to exclude PAL support
FT_NTSC_SUPPORT ;undefine to exclude NTSC support
FT_TEMP = $F5 ; 3 bytes in zeropage used by the library as a scratchpad
FT_DPCM_OFF = $c000 ; $c000..$ffc0, 64-byte steps
FT_SFX_STREAMS = 3 ; number of sound effects played at once, 1..4
;FT_DPCM_ENABLE ;undefine to exclude all DMC code
FT_SFX_ENABLE ;undefine to exclude all sound effects code
FT_THREAD ;undefine if you are calling sound effects from the same thread as the sound update call
;FT_PAL_SUPPORT ;undefine to exclude PAL support
FT_NTSC_SUPPORT ;undefine to exclude NTSC support
My famitone2 updates are in NMI and my play effects calls are in main thread.