Donkey Kong Forum

General Donkey Kong Discussion => General Donkey Kong Discussion => Topic started by: furrykef on October 17, 2014, 09:43:17 am

Title: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 17, 2014, 09:43:17 am
I'm tired after all the hacking and sound editing I did to get these, so for now I'll just leave a link to the game's tcrf entry (http://tcrf.net/Donkey_Kong_%28Arcade%29#Unused_Music), where I uploaded everything. There are three tunes and two voice (yes, voice!) clips.

If you don't know what tcrf is, it's a site called The Cutting Room Floor, dedicated to all the unused stuff found in games (and a few related subjects). There is other unused content in Donkey Kong featured there, such as an image of a cement pie falling over, but those have been known for a good while now, whereas this is a brand new discovery.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: JCHarrist on October 17, 2014, 10:41:07 am
Nice find! Cool to think that no one has heard those sounds for 33 years.

Interesting that they had synthesized speech for Pauline but didn't implement it into the final game. Those must have taken up a pretty big chunk of memory.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 17, 2014, 10:51:01 am
It did! The game has 4 KB of ROM reserved for digital samples, but it's only used for DK's buzzing roar. I knew that sounded too big for such a simple effect; this explains where the rest of that space went.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: LMDAVE on October 17, 2014, 12:56:30 pm
Wow!! Dude this like beyond cool. Any new finds in donkey kong is major gold to an enthusiast like most here. Like Jeff said, the fact this was left unheard for 33 years and just hearing them now. Great find!
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 17, 2014, 04:40:48 pm
I made a submission to slashdot (http://slashdot.org/submission/3921287/new-music-discovered-in-donkey-kong-for-arcade) now. Vote for it so you can spread the news!
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: Donkey Kong Genius on October 17, 2014, 05:06:47 pm
Very cool. I linked it to the code page. Thanks for your interest in the Donkey Kong Code.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 17, 2014, 08:05:25 pm
Turns out I'm not the first person to find these tunes and voice clips. A homebrew Intellivision port already made use of 'em:

I might be the first person to have posted them anywhere in their original form, though.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 17, 2014, 08:28:44 pm
Woo! The discovery made slashdot's front page. :)
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: LMDAVE on October 17, 2014, 08:41:20 pm
Hope you get your due credit, really is an awesome find
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: marinomitch13 on October 17, 2014, 11:14:32 pm
Great find!
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 18, 2014, 02:54:29 am
Now to tell the story of how I made this discovery. I make chiptunes, so as I was working with the Donkey Kong disassembly, the game's sound code got my curiosity as well. The game uses its own processor to handle music and most sound effects, so the sound code is completely separate from the main program and I had to start my disassembly from scratch. I'd never done assembly language for a microcontroller before, and I must say it's wonderfully weird compared to microprocessor ASM! I'm familiar with ASM for several different CPUs, but this isn't quite like any of those.

Anyway, when I started, I didn't have any particular aim other than finding out how the program worked. I found a few interesting things. For instance, you know that rapidly descending series of notes while Mario is spinning when he dies? I found out that's not stored as a series of notes, but generated mathematically.

Reverse engineering a program is a lot like stumbling around in the dark. You poke at random things to see what happens. Since the sound code is on a different CPU from the main program, I could do whatever I liked with it without it ever crashing the game or even affecting it (other than sound). Believe me, this made things much easier! So I spent a lot of time in MAME's debugger calling routines or changing registers to find out what they did. One of the routines would start playing random tunes or glitchy nonsense whenever I called it. Imagine my shock when it started playing music I'd never heard before!

Unfortunately, this was not enough. I could make it play hidden music, but I couldn't do it reliably. It took a while to decode what the routine was actually doing so I could make it play whatever I wanted. But eventually I did, so I was able to find all the hidden tunes and voice clips and be reasonably confident that there weren't any more.

So, like many great discoveries, this one was quite by accident.

(warning: this next paragraph is for technonerds only!)
By the way, if anyone wants to have a look at my disassembly of the sound code, you can find it in dkong-snd.asm here (https://github.com/furrykef/dkdasm). This github repository I put up also contains a copy of the disassembly of the game's main program (that is, the gameplay stuff, not the sound stuff) in dkong.asm. This copy was taken from the wiki, but unlike the version on the wiki, this one has some preliminary effort put toward replacing raw offsets with labels. My intention at the moment is to keep the wiki's version for a "raw" disassembly that uses raw offsets and use github for a polished disassembly that looks like what the programmers at Ikegami and Nintendo might have written. But that's a subject for another thread...

(BTW, I ask that the disassembly of the sound code remain on github and not be added to the wiki. It would be messy having it in two places, and github still allows other people to contribute. Of course, a link to it on the wiki would be fine.)
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: Donkey Kong Genius on October 18, 2014, 12:13:14 pm
I will add the link to the wiki.

I can not guarantee that no one will add bits to the code on the wiki from your github link. No one person dictates the shape and form of the page. However, it should be noted that it is merely a commented code page. Other pages can be created on the wiki for that purpose in connection with the main commented article. If someone creates a new page and links this new wiki page to the main commented code that contains the github information, I will not delete it since the purpose of the Donkey Kong Wiki is to gather an encyclopedic database of all things pertaining to Donkey Kong. If it is about Donkey Kong, and it is added, it will remain in keeping with the purpose and intent of the wiki even if one individual had other plans to isolate information about Donkey Kong from the wiki. As it is, furrykef, you are the only person who has participated on the page presently so I see no conflict with your intent at this time.

I like the fact that you are taking interest in the Donkey Kong code. I am sure others feel the same when I say that we are curious to see if anything new will come of your investigations. Maybe you can finally put to rest the debate concerning Ross's claim to a fireball subroutine :P
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: marky_d on October 20, 2014, 06:36:34 pm
http://kotaku.com/33-years-later-new-donkey-kong-secrets-are-being-found-1648644266 (http://kotaku.com/33-years-later-new-donkey-kong-secrets-are-being-found-1648644266)
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: ChrisP on October 22, 2014, 10:16:02 pm
Haha, note that Kotaku's article already has *double* the view count of their "New World Record" article about Robbie...

A couple of new sounds being discovered in the code was more interesting to people than a new world champion.

(This is another solid reminder that anybody who gets into classic gaming in hopes of attaining celebrity is in the wrong business.  :) )

Congrats, furry! Great work. This is truly cool.
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: furrykef on October 22, 2014, 11:18:42 pm
I don't even keep track of who the current champion is. I love you guys, but this whole world record business is slightly alien to me. ^^;

(Though yes, I'm familiar with The King of Kong. Including its various simplifications and inaccuracies.)
Title: Re: UNUSED MUSIC AND SOUND FOUND IN DONKEY KONG!!
Post by: Donkey Kong Genius on October 23, 2014, 01:50:31 am
Where is Tim? He would like to share the "various simplifications and inaccuracies". Does anyone have $10,000?  <Tim>