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.

Moderator: Moderators

Bananmos
Posts: 524
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 » Fri Jul 10, 2020 1:27 pm

rainwarrior wrote:
Fri Jul 10, 2020 1:10 pm
Dwedit wrote:
Wed Jul 08, 2020 8:55 pm
Confirming 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: 7822
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 » Fri Jul 10, 2020 3:10 pm

Oh! Yes that's a pretty plausible reason! I hadn't thought of that.

User avatar
Bregalad
Posts: 7889
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

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

Post by Bregalad » Sat Jul 11, 2020 1:40 am

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: 1149
Joined: Tue Oct 06, 2015 10:16 am

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

Post by calima » 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?

User avatar
Gilbert
Posts: 384
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 » 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.

User avatar
Bregalad
Posts: 7889
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

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

Post by Bregalad » Sat Jul 11, 2020 1:36 pm

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: 7822
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 » Sun Jul 19, 2020 12:45 am

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 71 times
nsfdpcmreverse1.zip
Python utility to automate NSF DPCM bit-reversal
(12.28 KiB) Downloaded 27 times

User avatar
Dwedit
Posts: 4328
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 » Sun Jul 19, 2020 1:24 am

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: 1351
Joined: Sun May 27, 2012 8:43 pm

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

Post by mikejmoffitt » Sun Jul 19, 2020 1:36 am

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: 7822
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 » Sun Jul 19, 2020 4:53 pm

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: 384
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 » Sun Jul 19, 2020 6:07 pm

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: 89
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 » Sun Jul 19, 2020 8:06 pm

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.

lidnariq
Posts: 9491
Joined: Sun Apr 13, 2008 11:12 am
Location: Seattle

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

Post by lidnariq » Sun Jul 19, 2020 8:23 pm

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: 89
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 » Sun Jul 19, 2020 8:35 pm

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!

User avatar
bleubleu
Posts: 91
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 » Mon Jul 20, 2020 4:44 am

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