SuperNSF PCM+PSG driver
Moderator: Moderators
SuperNSF PCM+PSG driver
hi everyone.
some songs were quietly entered in this past Famicompo Mini (september) that used a new sort of driver.
http://dl.dropbox.com/u/2316004/entry001.nsf
http://dl.dropbox.com/u/2316004/entry046.nsf
http://dl.dropbox.com/u/2316004/entry068.nsf
what you may notice about these songs is that they play multiple PCM samples (up to 4 channels) and 2a03 and VRC6 at the same time
we also made a straight up MOD player version
http://dl.dropbox.com/u/2316004/bananasp.nsf
the tool itself has been released (to little fanfare), so it feel it's a good time to post about it, especially as stuff like NSF v2 and pornotracker are being developed. and i figured this forum would be interested if no one else is.
tool:
http://lmao.rotfl.at/upload/B00daW/supernsf.zip
i didn't do any coding but i was involved with the development of supernsf and its predecessors. it uses $4011 to do cpu cycle-timed software mixing at around 12khz (different rate, and different driver for each number of PCM channels from 1 to 4) and supports some basic instrument macros like mml/famitracker. the cpu cycle timing actually causes the pitch to vary slightly relative to the PSG channels across different players, but not catastrophically. of course whatever the driver does also causes seeking to break in many players.
i supposed that's all the interesting stuff i have to say about it.
some songs were quietly entered in this past Famicompo Mini (september) that used a new sort of driver.
http://dl.dropbox.com/u/2316004/entry001.nsf
http://dl.dropbox.com/u/2316004/entry046.nsf
http://dl.dropbox.com/u/2316004/entry068.nsf
what you may notice about these songs is that they play multiple PCM samples (up to 4 channels) and 2a03 and VRC6 at the same time
we also made a straight up MOD player version
http://dl.dropbox.com/u/2316004/bananasp.nsf
the tool itself has been released (to little fanfare), so it feel it's a good time to post about it, especially as stuff like NSF v2 and pornotracker are being developed. and i figured this forum would be interested if no one else is.
tool:
http://lmao.rotfl.at/upload/B00daW/supernsf.zip
i didn't do any coding but i was involved with the development of supernsf and its predecessors. it uses $4011 to do cpu cycle-timed software mixing at around 12khz (different rate, and different driver for each number of PCM channels from 1 to 4) and supports some basic instrument macros like mml/famitracker. the cpu cycle timing actually causes the pitch to vary slightly relative to the PSG channels across different players, but not catastrophically. of course whatever the driver does also causes seeking to break in many players.
i supposed that's all the interesting stuff i have to say about it.
Yes, indeed it's amazing. I was reading another page which seemed to highlight a flamewar about whether or not it's "Legitimate" to use mixed PCM in NSF competitions. (My opinion: it isn't)
The obvious problem is that it seems next to impossible to use this engine in a game, except for a static screen with no tricks. The "Rickrolled" demo showed us that you can still pull off one PPU write and scroll every frame even with streaming PCM playing, but I wouldn't throw in any OAM updates in there.
Edit: I wonder if this could be done with a cycle-based IRQ mapper? It takes about 41 CPU cycles to respond to an IRQ and play a pre-mixed sample. So if you make the sample rate 16384Hz, playback takes 37% CPU usage. Mixing happens in another thread, is it fast enough to keep up?
The obvious problem is that it seems next to impossible to use this engine in a game, except for a static screen with no tricks. The "Rickrolled" demo showed us that you can still pull off one PPU write and scroll every frame even with streaming PCM playing, but I wouldn't throw in any OAM updates in there.
Edit: I wonder if this could be done with a cycle-based IRQ mapper? It takes about 41 CPU cycles to respond to an IRQ and play a pre-mixed sample. So if you make the sample rate 16384Hz, playback takes 37% CPU usage. Mixing happens in another thread, is it fast enough to keep up?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
In other words, a title screen or other cut scene. There's a reason that Wheel of Fortune and Skate or Die 2 have samples in their title screen music, and there's a reason that Castlevania: Circle of the Moon and Animal Crossing: Wild World have streaming samples instead of sequenced music for their title screens.Dwedit wrote:The obvious problem is that it seems next to impossible to use this engine in a game, except for a static screen with no tricks.
tepples:
That's why I think the engine would be perfect for first person adventure games, like a Princess Tomato, Shadowgate, Deja Vu, or Metal Slader Glory remake.
Dwedit:
The purpose of Battle of the Bits (for the most part) is abusing old hardware and formats. We also have competitions sometimes where the rules dictate how big a song might be. For example: It might be nice to use Shiru's engine to see how small we can make NSFs.
That's why I think the engine would be perfect for first person adventure games, like a Princess Tomato, Shadowgate, Deja Vu, or Metal Slader Glory remake.
Dwedit:
The purpose of Battle of the Bits (for the most part) is abusing old hardware and formats. We also have competitions sometimes where the rules dictate how big a song might be. For example: It might be nice to use Shiru's engine to see how small we can make NSFs.
http://kkfos.aspekt.fi/2010/11/14/4-bit ... e-channel/Dwedit wrote:So this mixes channels through the 7-bit PCM channel. Has anyone tried to play 4-bit digital samples through the Square and noise channels?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
http://average.truechiptilldeath.com/ne ... pernsf.zip
Strobe's Apache server seems to be down at the moment.
Dwedit: Yep, it's all done through $4011. As for the pulse and noise channels, that sounds like delicious abuse. SN7 PSG used pulse abuse for PWM and PCM samples. It should be possible, but I haven't heard of anyone doing it. Memblers's Squeedo does some really interesting things with the pulse and triangle channels. #mod_shrine, coda's crew, has also thought of making some FM abuse out of the triangle channel with IRQ support of NSF2. The gates are open for more wank.
Strobe's Apache server seems to be down at the moment.
Dwedit: Yep, it's all done through $4011. As for the pulse and noise channels, that sounds like delicious abuse. SN7 PSG used pulse abuse for PWM and PCM samples. It should be possible, but I haven't heard of anyone doing it. Memblers's Squeedo does some really interesting things with the pulse and triangle channels. #mod_shrine, coda's crew, has also thought of making some FM abuse out of the triangle channel with IRQ support of NSF2. The gates are open for more wank.
- Hamtaro126
- Posts: 818
- Joined: Thu Jan 19, 2006 5:08 pm
My bad. However, I can't seem to get the thing to work on PowerPak. Is this for PAL only?thefox wrote:http://kkfos.aspekt.fi/2010/11/14/4-bit ... e-channel/Dwedit wrote:So this mixes channels through the 7-bit PCM channel. Has anyone tried to play 4-bit digital samples through the Square and noise channels?
Hmm, shouldn't be.B00daW wrote:My bad. However, I can't seem to get the thing to work on PowerPak. Is this for PAL only?thefox wrote:http://kkfos.aspekt.fi/2010/11/14/4-bit ... e-channel/Dwedit wrote:So this mixes channels through the 7-bit PCM channel. Has anyone tried to play 4-bit digital samples through the Square and noise channels?
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Not really -> the GBA have to stream data anyway if you don't want to be restricted to GBC sound. Castlevania COTM just uses the standard sappy sound engine and the streamed song isn't even compressed.and there's a reason that Castlevania: Circle of the Moon [...] have streaming samples instead of sequenced music for their title screens.
Also check my Final Fantasy V and VI advance sound restoration hacks where I introduced streamed songs at the place of sequenced ones, without changing anything in the code.
But I'd agree a title screen with a music like that would be awesome.
Useless, lumbering half-wits don't scare us.
I'm aware of that; I've written a mixed GBC/PCM music engine for the GBA (used in TOD) and a compressed music player for the GBA (stand-alone and in a game). I was trying to point out that game developers are willing to spend far more resources on the first impression to put players in the mood of "awesome".Bregalad wrote:Not really -> the GBA have to stream data anyway if you don't want to be restricted to GBC sound.