VGM playback on the SPC
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
I just tried it in BSNES.. in NTSC mode I can replicate it if I press X & Y repeatedly in fairly quick succession. In PAL mode I wasn't able to replicate it.
I guess I'm pretty tight on vblank time in NTSC mode. Perhaps I should do the volume bar update to RAM instead and DMA the new data to VRAM during the next vblank, like I do with the song list.
I guess I'm pretty tight on vblank time in NTSC mode. Perhaps I should do the volume bar update to RAM instead and DMA the new data to VRAM during the next vblank, like I do with the song list.
I've released the source code for my music disk (you can download it here). Included is the UI code, as well as the VGM playback code for the SPC. The VGM packer is also included in the archive, so it's possible to replace the songs.
This code wasn't originally meant to be released, so it's not pretty to look at. At least I've cleaned it up a little bit.
The graphical glitches that orwannon reported have been fixed AFAICT, as well as a couple of other minor UI bugs.
This code wasn't originally meant to be released, so it's not pretty to look at. At least I've cleaned it up a little bit.
The graphical glitches that orwannon reported have been fixed AFAICT, as well as a couple of other minor UI bugs.
Re: VGM playback on the SPC
I've made some updates on the musicdisk. The new ROM is found here (and here's a video of it running on my SNES).
The compression scheme used for the VGM data has been improved, so I decided to include some more songs. 18 more to be precise. This also left me with some spare RAM on the SPC side, which is decided to give to the DSP's echo processor to implement a sort-of poor man's delayed bass boost (you can toggle this on/off with Select+A).
I've also improved the timing, so the playback rate should be more even now.
The compression scheme used for the VGM data has been improved, so I decided to include some more songs. 18 more to be precise. This also left me with some spare RAM on the SPC side, which is decided to give to the DSP's echo processor to implement a sort-of poor man's delayed bass boost (you can toggle this on/off with Select+A).
I've also improved the timing, so the playback rate should be more even now.
Re: VGM playback on the SPC
Delayed? As I recall, EDL=0 gives you only one sample delayed echo, and the FIR still works normally (since the history buffer is in internal registers, rather than read from RAM each sample). Or maybe you want it delayed...
Seems like you could do treble and bass adjustment by feeding everything into the echo buffer, turning main volume to zero so that only the echo plays through its FIR, and having feedback volume=0 so you don't get any feedback. Then set the center FIR coefficient to 64 (0.5) and you can then increase/decrease treble and bass. Just going by memory of the SPC here.
Seems like you could do treble and bass adjustment by feeding everything into the echo buffer, turning main volume to zero so that only the echo plays through its FIR, and having feedback volume=0 so you don't get any feedback. Then set the center FIR coefficient to 64 (0.5) and you can then increase/decrease treble and bass. Just going by memory of the SPC here.
Re: VGM playback on the SPC
It's mainly because I started out with a standard echo with a flat frequency response filter, which I thought sounded better with a fairly long delay. Then I tried out different types of filters, but kept the delay and feedback pretty much unchanged.
Could be nice to have several different filters that the user can select from. I still have some spare RAM on the SPC, so it should be possible to shoehorn in somewhere.
That would make a nice feature for a SNES sound library btw; low/high/band pass filters with adjustable cutoff frequency, so you can do SID-style filter sweeps.
Could be nice to have several different filters that the user can select from. I still have some spare RAM on the SPC, so it should be possible to shoehorn in somewhere.
That would make a nice feature for a SNES sound library btw; low/high/band pass filters with adjustable cutoff frequency, so you can do SID-style filter sweeps.
Re: VGM playback on the SPC
Here's yet another updated ROM (youtube video).
The latest source code is available here. For the filter-related stuff, look for the update_filter routine in vgmplay_spc700_ext.asm, which is triggered by the NextFilter routine in t700c.asm.
This version has the following filter settings that you can switch between:
* Off (no filtering)
* Standard echo, 80ms delay
* Bass boost (low pass filter mixed with an attenuated version of the original signal)
* Bass boost, 80ms delay
* Treble boost (high pass filter mixed with an attenuated version of the original signal)
Use Right on the D-Pad to switch filter. I also made it so that the song isn't restarted when a new filter setting is applied.
The latest source code is available here. For the filter-related stuff, look for the update_filter routine in vgmplay_spc700_ext.asm, which is triggered by the NextFilter routine in t700c.asm.
This version has the following filter settings that you can switch between:
* Off (no filtering)
* Standard echo, 80ms delay
* Bass boost (low pass filter mixed with an attenuated version of the original signal)
* Bass boost, 80ms delay
* Treble boost (high pass filter mixed with an attenuated version of the original signal)
Use Right on the D-Pad to switch filter. I also made it so that the song isn't restarted when a new filter setting is applied.
- zephemeros
- Posts: 2
- Joined: Sun Nov 04, 2012 5:42 pm
- Location: Campbell River, BC
Re: VGM playback on the SPC
Not sure if it really matters anymore or if it's worth the bump, but I'm getting some graphical glitches on real (2-1-3) NTSC hardware using an sd2snes.
EDIT: Turns out this was an sd2snes issue, not an actual hardware issue. The latest firmware update seems to have fixed things.
EDIT: Turns out this was an sd2snes issue, not an actual hardware issue. The latest firmware update seems to have fixed things.
Re: VGM playback on the SPC
There is actually a GUI bug even in the latest version of my player where the volume bars can get messed up. I've triggered it myself a couple of times, but I don't have a sure-fire way of reproducing it.