Donkey Kong: Walking Sound Hack?

jopdorp
Core Developer
Posts: 20
Joined: Tue Mar 29, 2022 10:07 pm
Has thanked: 14 times
Been thanked: 61 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by jopdorp »

A new rbf was released today that that should sound exactly the same, but a bit louder. It is a slightly optimized version that solves timing warnings that the previous build caused in the timing analysis of the compiler. It may be worth to update to it, it won't fix MRA related problems, but it should be a bit more reliable.
jca
Top Contributor
Posts: 1911
Joined: Wed May 27, 2020 1:59 pm
Has thanked: 145 times
Been thanked: 454 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by jca »

It looks like the version is 04/29. Is this correct?
jopdorp
Core Developer
Posts: 20
Joined: Tue Mar 29, 2022 10:07 pm
Has thanked: 14 times
Been thanked: 61 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by jopdorp »

it's this file:
https://github.com/MiSTer-devel/Arcade- ... eyKong.rbf

I forgot to set the name correctly with the date in my pull request, that'll be fixed with a new pull request. My apologies for that.

It is going to be 05/02
mario64
Posts: 119
Joined: Sun May 24, 2020 6:50 pm
Has thanked: 18 times
Been thanked: 10 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by mario64 »

lagomorph wrote: Mon May 02, 2022 4:02 pm
mario64 wrote: Mon May 02, 2022 2:20 pm Could someone please post a known working MRA for this core? Thank you.
I'm not sure what the issue is as the current MRAs should work. You could try editing Donkey Kong (US, Set 1).mra or making a copy and editing the line <rbf>donkeykong</rbf> replacing donkeykong with the full name of your rbf that you placed in cores/ to make sure it's using the correct core.
Thanks again for all your help. I fixed the problem by deleting the existing nvram file :-)
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

The sound is not fixed. I've investigated this more with a MAME v FPGA comparison video. I own an original PCB and MAME is definitely similar in sound to the PCB whereas Mister is off in lots of places.



I also think that maybe the rom version is off? Old versions of MAME had very red girders like the FPGA implementation. This is just a thought on why it may be so different.
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by dshadoff »

If you have an original PCB, a comparison between that and MiSTer would be more meaningful; MAME should not be used as a reference at a detailed level (though it is often useful for broad, high-level things).
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

dshadoff wrote: Sun Oct 30, 2022 7:07 pm If you have an original PCB, a comparison between that and MiSTer would be more meaningful; MAME should not be used as a reference at a detailed level (though it is often useful for broad, high-level things).
Sure I can do that, this was quicker to capture. I have a direct capture card (Mr Video) on the PCB so will do that today.

As a player that plays this game daily on PCB, I can assume you the MAME sounds are the similar if not identical to the PCB, but let me prove that right or wrong! :)

As Arnie would say…. I’ll be back.
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

So glad you asked for this, although some sounds are a little closer all the same issues are there.



Hopefully it can help some smart person fix the problem?
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

One last comparision to round this off, this time PCB v MAME, even though the MAME sound is quite a bit duller, the general tone is near identical. We want this on FPGA but with a nice crisp sound (maybe it was my PC settings for sound in MAME). Thanks for watching y'all, hope this helps.

User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Donkey Kong: Walking Sound Hack?

Unread post by aberu »

The pitch is off to the jingle on MiSTer it sounds like.
birdybro~
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

aberu wrote: Mon Oct 31, 2022 4:04 am The pitch is off to the jingle on MiSTer it sounds like.
It’s a lot more than just in the jingle, it’s off everywhere. Running, jumps, hammer hits, music. I do wonder if it’s a simple incorrect resistor/capacitor assignment the code (not that i know how that works.)
dshadoff
Core Developer
Posts: 534
Joined: Sun May 24, 2020 9:30 pm
Has thanked: 19 times
Been thanked: 141 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by dshadoff »

Wow, all three are so much more different than I had suspected. This is all kinds of amazing seeing the comparison.
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

Sorry I’m incorrect on the jump s, low level ttl work was done and it is accurate listening to them PCB then FPGA (will a little off pitch), it’s just there is so much going on differently around it. From discord chat it seems this stuff is possible to fix just a lot of work and knowhow on what TTL circuits (correct terminology?) are for what sounds.
A challenge for soemone. :)
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

Ok one last video, I'll stop I promise I just want to make it clear and easy for whomever may try to fix it.
FPGA sound increased by 6db to play at the same level.
In general the PCB has a deeper more resonating sound, the FPGA is 'tinny' and higher pitched.



Intro (Kong Climb) Jingle - Very similar except the high pitch of FPGA.
Stomp Sound - Very similar except the high pitch of FPGA.
Pre Start sound - Similar but the high pitch of FPGA seems higher than previous sounds.
Start Jingle - PCB sounds like bells/xylophone, FPGA sounds like high pitch digital beeps.
Run sound - PCB sound more like heaver shoes, FPGA sound like squeeky sneakers.
Jump Sound - Very similar except the high pitch of FPGA.
Run Climb - Same as running
Jump Sound - Very similar except the high pitch of FPGA.
Barrel Smash then score - Very similar except the high pitch of FPGA.
Barrel Board completion - Similar to other jingles, very beep/scratchy/digital on FPGA.
Rivet Board (level) completion - Similar to other jingles, very beep/scratchy/digital on FPGA.
Death Sound - Very similar except the high pitch of FPGA.

Seems to be two constant issues, the pitch of overall sound, and the jingles (digital not analog?) are very beepy and scratchy.

I'm cross posting with the discord as I'm not sure the people who could fix this are frequentling one or the other.
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 5 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

Thank you for posting the video, interesting to see!
I really wish someone could take this further.
RascalUK
Posts: 156
Joined: Mon Jun 08, 2020 2:02 pm
Location: Manchester, UK
Has thanked: 72 times
Been thanked: 23 times
Contact:

Re: Donkey Kong: Walking Sound Hack?

Unread post by RascalUK »

The PCB sounds soooo good.
Robgus
Posts: 90
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 62 times
Been thanked: 5 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Robgus »

80sArcadeKid wrote: Mon Oct 31, 2022 6:16 am Sorry I’m incorrect on the jump s, low level ttl work was done and it is accurate listening to them PCB then FPGA (will a little off pitch), it’s just there is so much going on differently around it. From discord chat it seems this stuff is possible to fix just a lot of work and knowhow on what TTL circuits (correct terminology?) are for what sounds.
A challenge for soemone. :)
That sounds hopeful. I’ve read somewhere that it is difficult to get the right analog sound.

But is it possible to get closer to the pcb sounds?
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

I am pretty sure that most of the sounds you are hearing from the MiSTer are still samples. The walking sound is not a sample anymore. We just need to get the rest of the sounds converted and it will be a lot better.

Also, you need to use filters in the core menu and the walking sound should sound correct. This is by design, although I am not sure I agree with it because how is anyone supposed to know which filter to choose, and it doesn't choose one by default. Anyway, if you read through this whole thread, I think all the details are there to be found.
lagomorph
Posts: 15
Joined: Mon Jul 06, 2020 2:18 pm
Has thanked: 2 times
Been thanked: 1 time

Re: Donkey Kong: Walking Sound Hack?

Unread post by lagomorph »

thorr wrote: Mon Oct 31, 2022 6:55 pm I am pretty sure that most of the sounds you are hearing from the MiSTer are still samples. The walking sound is not a sample anymore. We just need to get the rest of the sounds converted and it will be a lot better.

Also, you need to use filters in the core menu. This is by design, although I am not sure I agree with it because how is anyone supposed to know which filter to choose, and it doesn't choose one by default. Anyway, if you read through this whole thread, I think all the details are there to be found.
Does anyone think the current walking sound was an improvement over the samples though? To me that change was a serious regression in accuracy.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by LamerDeluxe »

Indeed clearly an amplitude envelope is missing. And even the 2nd order 2khz low pass audio filter still passes too much high frequency audio.

EDIT: Lowering volume levels in the core menu (one step down from maximum still has good bass) seems to help to make the audio less harsh (maybe something is clipping?).
User avatar
Chilli_Vibes
Posts: 129
Joined: Sat Mar 12, 2022 4:47 pm
Has thanked: 53 times
Been thanked: 33 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by Chilli_Vibes »

None of the Mister sounds sound anything like the PCB.
Also, the musical notes on the Mister are not short notes that stop, before the next note is played. On the Mister, the notes are just one long note that lasts until the next note is played. Listen to the PCB "Start Jingle" at 0:26, and keep listening to hear the Mister version, totally different. Same pitch and notes, but longer notes.
Can we not get really high quality samples from Geoff Suttor's PCB ?
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

It should be super easy to get perfect quality samples from Mame assuming each sound can be heard by itself and clipped into a sample file. Not saying Mame is perfect, but it is all digital and can be copied exactly. This would be an improvement over the current samples. I still vote for replacing samples with the generated ones like the walking sound is now. More work may need to be done to get them to sound better, but they are better than samples because there may be some randomness to the analog sound that would not be possible with samples.
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

LamerDeluxe wrote: Mon Oct 31, 2022 7:06 pm Indeed clearly an amplitude envelope is missing. And even the 2nd order 2khz low pass audio filter still passes too much high frequency audio.

EDIT: Lowering volume levels in the core menu (one step down from maximum still has good bass) seems to help to make the audio less harsh (maybe something is clipping?).
See the top post of this page (page 6). jopdorp released a louder version which is the latest version. On page five, there is a link to the previous .rbf that is quieter. I wonder if that one works better.
User avatar
LamerDeluxe
Top Contributor
Posts: 1160
Joined: Sun May 24, 2020 10:25 pm
Has thanked: 798 times
Been thanked: 257 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by LamerDeluxe »

thorr wrote: Mon Oct 31, 2022 8:09 pm
LamerDeluxe wrote: Mon Oct 31, 2022 7:06 pm Indeed clearly an amplitude envelope is missing. And even the 2nd order 2khz low pass audio filter still passes too much high frequency audio.

EDIT: Lowering volume levels in the core menu (one step down from maximum still has good bass) seems to help to make the audio less harsh (maybe something is clipping?).
See the top post of this page (page 6). jopdorp released a louder version which is the latest version. On page five, there is a link to the previous .rbf that is quieter. I wonder if that one works better.
That one does actually seem to sound more smooth with more bass, with the filter in the core menu turned off. EDIT: And volumes at 100%
EDIT2: Overal volume is much lower though
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

LamerDeluxe wrote: Mon Oct 31, 2022 8:18 pm That one does actually seem to sound more smooth with more bass, with the filter in the core menu turned off. EDIT: And volumes at 100%
EDIT2: Overal volume is much lower though
Thanks for checking. Also, he suggested a 1-pole 2kHz filter. Maybe submit an issue to the github with your findings and this might get picked up again to be worked on further.
80sArcadeKid
Posts: 48
Joined: Thu Feb 11, 2021 10:59 pm
Has thanked: 27 times
Been thanked: 30 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by 80sArcadeKid »

Chilli_Vibes wrote: Mon Oct 31, 2022 7:11 pm None of the Mister sounds sound anything like the PCB.
Also, the musical notes on the Mister are not short notes that stop, before the next note is played. On the Mister, the notes are just one long note that lasts until the next note is played. Listen to the PCB "Start Jingle" at 0:26, and keep listening to hear the Mister version, totally different. Same pitch and notes, but longer notes.
Can we not get really high quality samples from Geoff Suttor's PCB ?
I can't capture any higher quality than the video I posted. And it comes in 'mixed' during gameplay.
The thing is, the sound is seperated into digital and analog parts. The digital sounds are stored on eproms(?) on the PCB (see video). This is the melodies. The rest is analog and requires (accurate) analog simulation of the circuits. This is apparently what MAME does for the analog sounds (walk, jump, stomp,etc)

There is a bit of info around on this.

https://www.brasington.org/arcade/tech/dk/
https://www.brasington.org/arcade/tech/dkj/
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Donkey Kong: Walking Sound Hack?

Unread post by aberu »

thorr wrote: Mon Oct 31, 2022 7:43 pm

It should be super easy to get perfect quality samples from Mame assuming each sound can be heard by itself and clipped into a sample file. Not saying Mame is perfect, but it is all digital and can be copied exactly. This would be an improvement over the current samples. I still vote for replacing samples with the generated ones like the walking sound is now. More work may need to be done to get them to sound better, but they are better than samples because there may be some randomness to the analog sound that would not be possible with samples.

I wouldn't suggest relying on MAME's to secure samples but instead doing it the right way and reimplementing the sound chip system inside the core so we don't need to use samples. Better to not waste effort on doing it with the workaround, and instead do it right, if someone with the skills wants to take a stab at it.

80sArcadeKid wrote: Tue Nov 01, 2022 3:27 am
Chilli_Vibes wrote: Mon Oct 31, 2022 7:11 pm

None of the Mister sounds sound anything like the PCB.
Also, the musical notes on the Mister are not short notes that stop, before the next note is played. On the Mister, the notes are just one long note that lasts until the next note is played. Listen to the PCB "Start Jingle" at 0:26, and keep listening to hear the Mister version, totally different. Same pitch and notes, but longer notes.
Can we not get really high quality samples from Geoff Suttor's PCB ?

I can't capture any higher quality than the video I posted. And it comes in 'mixed' during gameplay.
The thing is, the sound is seperated into digital and analog parts. The digital sounds are stored on eproms(?) on the PCB (see video). This is the melodies. The rest is analog and requires (accurate) analog simulation of the circuits. This is apparently what MAME does for the analog sounds (walk, jump, stomp,etc)

There is a bit of info around on this.

Yes, it would be preferable to simulate it the correct way. It would also be nice if it were written in a way that is portable because there may be similarities with other arcade systems from the same time period which could be ported over.

birdybro~
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

aberu wrote: Tue Nov 01, 2022 4:02 pm I wouldn't suggest relying on MAME's to secure samples but instead doing it the right way and reimplementing the sound chip system inside the core so we don't need to use samples. Better to not waste effort on doing it with the workaround, and instead do it right, if someone with the skills wants to take a stab at it.
So far that someone with the skills is @jopdorp. He gets it and he already said the current implementation is temporary and has a plan to make a more robust version and bring it back to Donkey Kong at some point. I just hope he follows through. There are two things that need to happen here as was already pointed out. The digital side needs to be properly implemented. This part of it should be relatively easy since it is digital and in the ROM's. The analog side of it is more complicated, but not impossible. The analog waveforms need to be "modeled" using math functions and there needs to be FPGA space dedicated to the calculator that can do this. From what I am hearing in the walking sound, jopdorp is on the right track, but some low pass filters need to be added to hide the high frequency sounds. His new version may end up being a lot better, but who knows. He is essentially taking intelligent short cuts to make the math easier and faster from what I understand. He talked about this in the previous pages of this thread.

I think part of what is happening is the analog and digital sound in the real arcade cabinet are getting mixed together by chips that are affecting the sound and filtering out the high frequencies of both. So if we had clean analog and clean digital coming from the MiSTer (this is how part of it sounds to me even though it is still wrong sounding in general), it will sound wrong because of all the high frequency sound not getting properly filtered. Also, the bass needs to be boosted I think.
User avatar
aberu
Core Developer
Posts: 1144
Joined: Tue Jun 09, 2020 8:34 pm
Location: Longmont, CO
Has thanked: 244 times
Been thanked: 388 times
Contact:

Re: Donkey Kong: Walking Sound Hack?

Unread post by aberu »

Personally, a minimal amount of filtering should be used in the core and the framework's filters that already exist should be used instead. There are already arcade LPF, and from what I'm hearing in various recordings there was wide variation in system to system for Donkey Kong's filtering anyways. I'd really prefer the output of the core sans audio filters to be clean so that it can be put into other people's cabs or other kinds of setups, and then they can adjust the filtering to taste. If it ends up sounding as crappily muffled as MAME apparently does, that would be awful.
birdybro~
thorr
Top Contributor
Posts: 1100
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 537 times
Been thanked: 252 times

Re: Donkey Kong: Walking Sound Hack?

Unread post by thorr »

I could agree, but with some caveats. Since there are two audio paths, the points before they get mixed together need to be properly separately filtered to match the original arcade sound if one were to hook up leads and listen at those points. Each path may require completely different filters. Any filters that exist after they get mixed together need to exist as designed in the arcade PCB as options in the core menu. Just picking one from the existing list is not good enough in my opinion. Either build the correct one into the core, or have it on the list. Also, if the correct one is on the list, the core should default to that option and mention it somewhere that that option is the correct option. I haven't checked lately if this is possible, but the core menu should also be able to add multiple filters, like have a low pass filter and a bass boost. I do remember Donkey Kong sounding very muffled and bassy in real life back in the day. It always struck me as very different sounding than other arcade games. In the PCB vs Mame video above, what I remember is sort of in the middle of the two but closer to the PCB. The PCB one does sound very nice though, and the Mame sounds cruddy by comparison in a general sense.
Post Reply