Donkey Kong: Walking Sound Hack?

User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by pgimeno »

That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
Attachments
Donkey Kong (US, Set 1).mra.zip
(23.06 KiB) Downloaded 222 times
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

thorr wrote: Wed Dec 01, 2021 9:17 pm Thanks everyone, you are all amazing. :-) How do we get the update_all script to fix all this? I would rather have it automated than have a screwed up system by editing things. I am ok with deleting some files and having it re-download them if needed.
I totally agree - you are all amazing!
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

pgimeno wrote: Wed Dec 01, 2021 10:27 pm That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
I deleted my "Donkey Kong" (without the US) mra file and replaced the US one with this new one, and everything seems to be working perfectly! Thanks!!
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

thorr wrote: Thu Dec 02, 2021 7:40 am
pgimeno wrote: Wed Dec 01, 2021 10:27 pm That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
I deleted my "Donkey Kong" (without the US) mra file and replaced the US one with this new one, and everything seems to be working perfectly! Thanks!!
I tried it too and it works perfectly here also - Happy days!!! Thank you!
User avatar
neurorulez
Core Developer
Posts: 7
Joined: Thu Nov 18, 2021 12:31 pm
Been thanked: 7 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by neurorulez »

pgimeno wrote: Wed Dec 01, 2021 10:27 pm That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
Merged.
retrodroid
Posts: 138
Joined: Tue Feb 02, 2021 5:55 pm
Has thanked: 96 times
Been thanked: 19 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by retrodroid »

SteelRush wrote: Thu Nov 18, 2021 4:52 am You are looking for the analog equivalent of an FPGA, which is an FPAA to handle this properly. They do exist but would need someone with the technical chops to interface with a DE10-Nano.

I saw one for sale but it’s a bit pricey and has been in “restocking” status forever.

https://zrna.org/shop

I am sure there are other FPAAs that actually can be found. I am in the same boat that I want arcade perfect sounds because only the sounds really hold the MiSTer back on arcade games that ran analog sound components.
I would pay $100 for an add-on board (either FPAA or actual analog hw circuits) that provides accurate reproductions of the sounds for arcade games that used analog sound circuitry.

...and Jotego's day job happens to be as an analog circuit engineer. :twisted: 8-)
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

retrodroid wrote: Wed Dec 29, 2021 8:18 pm
SteelRush wrote: Thu Nov 18, 2021 4:52 am You are looking for the analog equivalent of an FPGA, which is an FPAA to handle this properly. They do exist but would need someone with the technical chops to interface with a DE10-Nano.

I saw one for sale but it’s a bit pricey and has been in “restocking” status forever.

https://zrna.org/shop

I am sure there are other FPAAs that actually can be found. I am in the same boat that I want arcade perfect sounds because only the sounds really hold the MiSTer back on arcade games that ran analog sound components.
I would pay $100 for an add-on board (either FPAA or actual analog hw circuits) that provides accurate reproductions of the sounds for arcade games that used analog sound circuitry.

...and Jotego's day job happens to be as an analog circuit engineer. :twisted: 8-)
Me too! 8-) ;)
retrodroid
Posts: 138
Joined: Tue Feb 02, 2021 5:55 pm
Has thanked: 96 times
Been thanked: 19 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by retrodroid »

neurorulez wrote: Sat Dec 04, 2021 10:08 am
pgimeno wrote: Wed Dec 01, 2021 10:27 pm That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
Merged.
Has this improvement been released? If so, which core should I use to access it?
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by pgimeno »

retrodroid wrote: Wed Jan 05, 2022 3:44 pm Has this improvement been released? If so, which core should I use to access it?
Yes it has been released.

If your MRAs and your cores are up to date, then selecting this MRA in the Arcade menu should get you the updated sounds: Donkey Kong (US, Set 1)

From what I have seen, however, it seems that the MRAs may not get properly updated when using certain updaters. I don't use any so I can't tell which one is to blame and why. So, one option is to update the MRA manually. If that doesn't work, then update the core too. The core is DonkeyKong_20211126.rbf.
User avatar
neurorulez
Core Developer
Posts: 7
Joined: Thu Nov 18, 2021 12:31 pm
Been thanked: 7 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by neurorulez »

retrodroid wrote: Wed Jan 05, 2022 3:44 pm
neurorulez wrote: Sat Dec 04, 2021 10:08 am
pgimeno wrote: Wed Dec 01, 2021 10:27 pm That was indeed the issue. I apologize. It seems that the MRA I modified was an old one without that line. Please test the attached MRA and if it works, would someone (can I abuse you once more neurorulez?) submit a PR?
Merged.
Has this improvement been released? If so, which core should I use to access it?
Yes. The oficial one.
https://github.com/MiSTer-devel/Arcade- ... r/releases
shertz
Posts: 147
Joined: Sun May 24, 2020 8:12 pm
Has thanked: 15 times
Been thanked: 27 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by shertz »

Ran the update and seems the walking sound is fixed.

Now if can just fix the "how high can you get?" and saving pauline jingle, that would be epic.
Zeosstud
Posts: 106
Joined: Sun Jun 21, 2020 4:56 pm
Has thanked: 2 times
Been thanked: 25 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Zeosstud »

Anyone know if the sound fix has made it into the alternative versions, Donkey Kong (Japan, Set 1) for instance..
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

shertz wrote: Sun Jan 09, 2022 7:29 am Ran the update and seems the walking sound is fixed.

Now if can just fix the "how high can you get?" and saving pauline jingle, that would be epic.
I totally agree!
User avatar
pgimeno
Top Contributor
Posts: 710
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by pgimeno »

If someone could explain what's different between the original and the core, it would probably attract more developer interest. I was able to make the walking patch based on the explanation given by @callanabrown.
User avatar
jlancaster86
Posts: 148
Joined: Sat Jun 27, 2020 1:33 pm
Has thanked: 130 times
Been thanked: 35 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by jlancaster86 »

I believe MAME's implementation is considered to be pretty accurate (but it would be nice if somebody with real hardware could verify that), so it should be a safe comparison.

The audio in MAME has a distinctly muffled and smooth sound, while MiSTer's is rather shrill and gravelly. Maybe a filter is all that's required, but maybe it's something more significant. But when flicking between the two implementations, it's pretty obvious that not even the colours match between the two.

As with many of the other Golden Age arcade cores, it's been ported over from code originally written almost twenty years ago. Does it really need rebuilding from the ground up with modern methodology?

Code: Select all

---------------------------------------------------------------------------------
-- 
-- Arcade: Donkey Kong port to MiSTer by Sorgelig
-- 18 April 2018
-- 
---------------------------------------------------------------------------------
-- 
-- dkong Copyright (c) 2003 - 2004 Katsumi Degawa
-- T80   Copyright (c) 2001-2002 Daniel Wallner (jesus@opencores.org) All rights reserved
-- T48   Copyright (c) 2004, Arnim Laeuger (arniml@opencores.org) All rights reserved
-- 
---------------------------------------------------------------------------------
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

I’m really exposing my lack of knowledge, but here goes… could one record the sounds from an original machine and after that, have the samples coded in to the core?
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

I will share my lack of knowledge / limited knowledge as a response. I believe that is what is happening already with the walking sound, and maybe all of the other sounds already. The upside to using samples is they could potentially sound nearly perfect with proper recordings, but it might be hard to record them if they are blended with other sounds all the time while the game is playing. The downside is it may not be accurate in other ways such as timing, and if the sounds are somewhat random, they may be less or not at all random with samples. Reproducing the sound hardware accurately would be the best solution rather than using samples. This is totally doable theoretically. Personally I am a perfectionist and hate samples, but will take them instead of nothing.
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

thorr wrote: Fri Feb 04, 2022 11:00 pm I will share my lack of knowledge / limited knowledge as a response. I believe that is what is happening already with the walking sound, and maybe all of the other sounds already. The upside to using samples is they could potentially sound nearly perfect with proper recordings, but it might be hard to record them if they are blended with other sounds all the time while the game is playing. The downside is it may not be accurate in other ways such as timing, and if the sounds are somewhat random, they may be less or not at all random with samples. Reproducing the sound hardware accurately would be the best solution rather than using samples. This is totally doable theoretically. Personally I am a perfectionist and hate samples, but will take them instead of nothing.
Thanks! I agree.
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

I fired up my Mame machine and the sounds are definitely closer to the original (as far as I can tell). I also noticed a sound somewhat missing from the Mister core that is present in Mame. When Kong stomps on the second stage for example.

I'm a bit one-sided here I know, but it was the DK core that got me in to the Mister from the beginning ;)
Zeosstud
Posts: 106
Joined: Sun Jun 21, 2020 4:56 pm
Has thanked: 2 times
Been thanked: 25 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Zeosstud »

I wonder if we put together a GoFundMe and raised XXX dollars, if we could convince Jotego to have a run at making a new core.. Clearly he is one of if not the most talented people working with this project and an accurate Donkey Kong core would clearly be one heck of an accomplishment, I mean the Mame folks have been at it for 25 years as of today and it is still not perfect..

Count me in for $20 if this is an option..

Zeosstud
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

And me for 50!
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

I would be willing to contribute too. This is all theoretical at this point. Jotego would most likely need a donated Donkey Kong board and that would be key even more so than money donations I would think. He already has a patreon setup and it might be enough just to sign up for that for a year, but I don't know if you can sign up and then request Donkey Kong. I also would want Star Wars and Elevator Action, and all three are about equal in importance to me. Star Wars would be unique because the screen is different than a typical CRT monitor as far as I know (Color XY). Actually Asteroids has this too, so it is already solved on the MiSTer.
callanabrown
Posts: 89
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 14 times
Been thanked: 27 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by callanabrown »

I don't think you guys are understanding this.

There are no arcade games with analog audio supported, only digital audio with WAV samples in place of analog.

Nothing is wrong with the existing core, it doesn't need to be rewritten.
rcade
Posts: 119
Joined: Wed May 27, 2020 7:57 pm
Has thanked: 1 time
Been thanked: 17 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by rcade »

callanabrown wrote: Sun Feb 06, 2022 7:00 pm I don't think you guys are understanding this.

There are no arcade games with analog audio supported, only digital audio with WAV samples in place of analog.

Nothing is wrong with the existing core, it doesn't need to be rewritten.
That's correct. It would become "emulation" at that point.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

Yes it would be emulation but it could be perfectly emulated with cycle accurate timing. The Atari 2600 sound on the 7800 core is perfect. The NES sound is perfect. There is no reason arcade machines need to be any different and require samples.
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 6 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

I’ll be the first to admit that I don’t understand this. The last thing I want is to come across as ungrateful, I do realise that far smarter people than me made all of this.

I’m just so excited to discuss whether or not it could be done to get more accurate sounds, a dream come true really if it could :)
callanabrown
Posts: 89
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 14 times
Been thanked: 27 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by callanabrown »

thorr wrote: Sun Feb 06, 2022 8:24 pm Yes it would be emulation but it could be perfectly emulated with cycle accurate timing. The Atari 2600 sound on the 7800 core is perfect. The NES sound is perfect. There is no reason arcade machines need to be any different and require samples.
Yes there is a difference!!! Atari 2600 and 7800 and NES all have digital audio! Digital audio means a digital chip generates the sounds.

Donkey Kong has a digital audio chip as well as ANALOG sound effects.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

Analog can be represented digitally. You just need a high enough playback frequency. Look up "Nyquist Theorem". CD is a digital version of an analog LP or cassette. With a high enough sampling rate, you can't tell the difference. If you know how the analog circuits behave, this can be represented digitally. If the analog sounds are recordings of real sounds, then samples could be used for those. If they are analog circuits generating signals, then these can be done digitally. It's just math.
callanabrown
Posts: 89
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 14 times
Been thanked: 27 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by callanabrown »

Anyone else want to explain this to thorr? I'm starting to get insulted.
thorr
Top Contributor
Posts: 1311
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 634 times
Been thanked: 308 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

Jeez, take a chill pill. I have an Electrical Engineering degree specializing in Automatic Controls (Analog) and Computer Engineering (Digital) and learned a lot about digital signal processing as well. Explain to me what creates the analog sound on Donkey Kong specifically. What circuits? I don't know what that is on Donkey Kong, so I am generalizing.

Mame can recreate the analog sound without samples. If Mame can, so can the MiSTer. Both are running on all digital devices. Granted, Donkey Kong didn't originally use digital circuits for the analog sound. That doesn't mean that function couldn't be replaced with a digital circuit that recreates the analog signal in the digital realm. It is similar to recreating the Roland Jupiter 8 - an analog synthesizer. My modern Roland Fantom digital synthesizer can faithfully recreate the Jupiter 8, and that is massively more complex than Donkey Kong. The concept is the same. You need to know how the analog circuits behave and they can be modeled digitally. Pianoteq is another good example. They model real pianos and produce very realistic sounding pianos without using samples.

The installation is extremely small compared to the many gigabytes required in sample-based piano software / VST's. Saying this is "emulation" is correct, but it could be better (cleaner) than samples. In the case of Pianoteq, you can have infinitely held notes and it will work like a real piano, where a sample would have to end or be looped. Analog signals are often represented by math equations as functions over time. The math can be done digitally and turned into a digital waveform at whatever frequency you want. The higher the frequency, the more accurate the analog representation, until you reach double the frequency of the highest frequency in the analog signal at which point higher frequencies make no difference (Nyquist).

Knowing what the chips and other components (resistors, capacitors, etc.) are that create the analog sound on Donkey Kong might lead to spec sheets that provide the math information required to know how the analog signal is generated. So what would this look like on the FPGA? A calculator. From what I recall, Jotego was originally an analog specialist, so he could be super qualified for recreating Donkey Kong analog sound in the MiSTer. Here is some good reading if you are interested: https://classes.engineering.wustl.edu/e ... ESE497.pdf
Post Reply