I accidentally discovered what Double Dribble was probably intended to sound like.

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

Bananmos
Posts: 552
Joined: Wed Mar 09, 2005 9:08 am
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Bananmos »

rainwarrior wrote: Fri Jul 10, 2020 1:10 pm
Dwedit wrote: Wed Jul 08, 2020 8:55 pmConfirming that the Blades of Steel samples are not bit swapped, just low quality.
The weird thing about Blades of Steel is some of the samples are still stored in DPCM format but played back with a CPU simulation of the DPCM unit.

So... I guess they would have had to get it right by that point, but I have no explanation for why they bothered to duplicate the hardware in software.
Hmm, I always thought it was just a work-around for running out of space in the fixed bank, and the developers realising it was a clever way to work around the limit for the samples that play when the screen is static.

Running it in Mesen, I can see it actually uses real DPCM during matches, which totally supports this oh-cr*p-the-fixed-bank-is-full theory.

I suppose it could be argued that they wasted the potential to use a more sophisticated format for those screen-is-paused samples... but hey, deadlines! :)
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by rainwarrior »

Oh! Yes that's a pretty plausible reason! I hadn't thought of that.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Bregalad »

nocash wrote: Thu Jul 09, 2020 12:21 pm That stuff happens all the time, even in professional music.
Indeed.

This remember me Golden Sun - The Lost Age where 2 songs have a silent track which is not played during gameplay but stored in the ROM, and it was clearly intended to be played back. The songs are n°12 (Lemuria, which sounds weird in the game you can clearly tell something is missing) and n°42 (1st world map theme) where a silent drum track is not played back.
calima
Posts: 1745
Joined: Tue Oct 06, 2015 10:16 am

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by calima »

That's a bit confusing, if the track is silent, why do you think it was intended to be played back? What's the point in using up resources for silence?
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Gilbert »

Another related example is Hebereke/Ufouria, where the triangle channel may not always play on the title screen due to programming bugs.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Bregalad »

calima wrote: Sat Jul 11, 2020 9:44 am That's a bit confusing, if the track is silent, why do you think it was intended to be played back? What's the point in using up resources for silence?
Sorry I didn't get into details.
The reason they're silent is because there is no patch selection at the start of the track, so we don't know with which instrument the track should be played back. I think it defaults to 0 (to be verified) which points to a dummy GBC square wave instrument which is automatically silenced by the sweeping unit - actually I'm not even sure why it plays silence.
Gilbert wrote: Sat Jul 11, 2020 9:53 am Another related example is Hebereke/Ufouria, where the triangle channel may not always play on the title screen due to programming bugs.
Indeed, this one is epic ! It sounds actually better without the triangle, especially at the end.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by rainwarrior »

MovieMovies1 brought to my attention that the bass samples in Sunsoft games sound a lot cleaner with the bits reversed.

I wrote a quick utility to automate the reversal process for NSF files. I haven't tested it much, and it runs really slow, but it seems to work. In about 30 minutes it produced this NSF of Gimmick! (attached). Listen to how much cleaner the DPCM sounds are. Track 16 demonstrates it especially well.
Attachments
rev.Gimmick! [Mr. Gimmick] (1992-01-31)(-)(Sunsoft).nsf
Gimmick! NSF with bit-reversed samples
(80.13 KiB) Downloaded 405 times
nsfdpcmreverse1.zip
Python utility to automate NSF DPCM bit-reversal
(12.28 KiB) Downloaded 277 times
User avatar
Dwedit
Posts: 4924
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Dwedit »

Neat! Gremlins 2 and Silius sound clearer with the samples reversed, but Fester's Quest sounds a lot worse. So maybe it's not quite an open and shut case for Sunsoft games.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
mikejmoffitt
Posts: 1353
Joined: Sun May 27, 2012 8:43 pm

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by mikejmoffitt »

Wow, that's a really nice find. I'm now considering writing an NSF player to use prior to Gimmick's release so this can be taken advantage of.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by rainwarrior »

I added an option for DPCM bit-reverse to NSFplay, which might make it easier to investigate possibilities.

Preview build here:
https://ci.appveyor.com/project/bbbrads ... /artifacts
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Gilbert »

Just a guess. May be the converter tool (most probably a command line tool) used by most(some?) developers had soft switches to set the output format for use with different systems, and sometime people just set it wrong without noticing. (The resultant samples still played on the system and were in most case still intelligible though not as clear as what the system could offer.)
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Controllerhead »

Gilbert wrote: Sun Jul 19, 2020 6:07 pm Just a guess.
I think it's also unintuitive that it's a continuous bitstream that loads bytes forward but each byte itself right shifts from bit 0 to 7 instead of left shifts from 7 to 0. If you imagine a continuous sound wave as a stream of bits, it's not that; Each individual byte is "backwards", as it is right shifted. I learned this by messing w/ FamiTracker and trying to make custom DPCM waveforms w/ a hex editor. I could see how developers could screw this up and assume the bits left shifted and just streamed from 7 to 0 in "forwards" order, like a soundwave would look like, and not really be able to tell the difference back in the day with a 22khz 8bit samplerate through a cheap 80s TV speaker.
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by lidnariq »

There's no universal convention as to whether the LSbit is "first" or the MSbit is "first".

Asynchronous serial (including MIDI), Ethernet, and USB, the LSbit is first.
I²C, SPI, MSbit is first.
NES PPU, SMS VDP, other things: MSbit is left (first)
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by Controllerhead »

lidnariq wrote: Sun Jul 19, 2020 8:23 pm There's no universal convention as to whether the LSbit is "first" or the MSbit is "first".
There's no universal convention for endian-ness either, especially back in the day. Fun times!
Image
User avatar
bleubleu
Posts: 108
Joined: Wed Apr 04, 2018 7:29 pm
Location: Montreal, Canada

Re: I accidentally discovered what Double Dribble was probably intended to sound like.

Post by bleubleu »

This is super exciting to me. Cant believe we discover that kind of stuff after 30+ years!

Already added to FamiStudio 2.2.0! :mrgreen:
ReverseBits.jpg
-Mat
Post Reply