Donkey Kong: Walking sound hack?

Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

Does anyone know someone that might consider taking this on, if we are a few chipping in for the time and effort?
I realise that requests like this are common, and I really don’t want to come across as ungrateful but it would be amazing if one, two or all samples could be looked over.
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

I've made this, which I don't know if it will help.

Includes patch in `git am` format. The .MRA changes are not in the patch though.

(Edit: new version fixes an inconsistency with tabs and spaces in the patch, but the core is unchanged)
Attachments
DKsndfixv2.zip
(1.04 MiB) Downloaded 20 times
DKsndfix.zip
(1.04 MiB) Downloaded 15 times
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

Now that I have more time to elaborate... The above is what can be done with a sample-based approach using the old MAME's sample set. I'm not familiar with the original Donkey Kong; in my vicinity there were mostly Crazy Kong bootlegs. But from playing a bit with MAME it looks to me like the apparent cycling was mostly sequential, so that's how I've implemented it. If those samples aren't good enough, another approach would be to record the sounds using the output of MAME itself. If even that is not enough, it means that using samples isn't the way to go.

I've looked into the MAME sources and it implements the analog circuitry down to the resistor/capacitor level, see https://github.com/mamedev/mame/blob/ma ... g.cpp#L412. MAME seems to rely a lot on macros which I haven't looked into, so I don't know how complex they are; anyway it would certainly be possible to do the same with the FPGA, but it would also certainly not be a trivial task. It's not one I'd take for sure. The Cyclone V has multiplier units, but no division units and I believe no floating-point either, so everything needs to be done with fixed-point integer maths.

To install the above patch, you need to:
  1. remove the DonkeyKong_xxxxxx.rbf from the MiSTer's /media/fat/_Arcade/cores/
  2. copy Arcade-DonkeyKong.rbf extracted from the above zip file to that location
  3. copy DKsndfix.mra from the zip file to /media/fat/_Arcade/ and optionally rename it to something more sensible
callanabrown
Posts: 30
Joined: Thu Jul 30, 2020 1:05 pm
Has thanked: 9 times
Been thanked: 8 times

Re: Donkey Kong: Walking sound hack?

Unread post by callanabrown »

Just tried it out! It definitely sounds better. I checked an old MAME video on YouTube and indeed it sounds sequential. I think it's still a bit off from a real board, but it's a big improvement, thanks for making this happen!!
thorr
Posts: 426
Joined: Mon Jul 06, 2020 9:37 pm
Has thanked: 101 times
Been thanked: 62 times

Re: Donkey Kong: Walking sound hack?

Unread post by thorr »

I haven't had a chance to try this yet, but can we get this into the main core if it is indeed better?
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

callanabrown wrote: Thu Nov 25, 2021 1:33 am Just tried it out! It definitely sounds better. I checked an old MAME video on YouTube and indeed it sounds sequential. I think it's still a bit off from a real board, but it's a big improvement, thanks for making this happen!!
I totally agree, it sounds alot better, thank you so much :D

However, I get some weird issues. It doesn't work to reboot in to last core. And after reboot, it freezes with a stuck Jumpman and some numbers and letters are on the monitor... please see the attached photos.

With that said, I really hope that this improvement makes it in the "official" core.

All the best!
Attachments
2.png
2.png (609.43 KiB) Viewed 834 times
1.png
1.png (333.57 KiB) Viewed 834 times
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

thorr wrote: Thu Nov 25, 2021 7:18 am I haven't had a chance to try this yet, but can we get this into the main core if it is indeed better?
I've added the patch so that someone else can submit it, because I left GitHub when MS acquired it. Sorg or anyone else should know what to do with the patch, so someone needs to file an issue linking to the post with the zip.

Robgus wrote: Thu Nov 25, 2021 9:25 am However, I get some weird issues. It doesn't work to reboot in to last core. And after reboot, it freezes with a stuck Jumpman and some numbers and letters are on the monitor... please see the attached photos.
I can't reproduce it. When does this happen? Right away when starting a game? Are you saying that going back to the previous core does not fix it?

Does anyone else have the same problem?
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

Brilliant!

Ok. When I first added the files as you described and booted up, it worked fine. It was when I restarted the mister (to see if it booted in to "your" core), where the issues appeared. At first the core didn't start at all. I rebooted again, in to the menu and chose the patched version and then I got the numbers and letters on the monitor. So it happened right away.

When I tried to start the previous original DK-mra, the walking sound was totally off.

So I opted to remove your patch and copy my original setup to the card - so basically back to the original DK.
User avatar
Aspie
Posts: 118
Joined: Sat Sep 26, 2020 1:07 pm
Location: Manchester
Has thanked: 16 times
Been thanked: 27 times
Contact:

Re: Donkey Kong: Walking sound hack?

Unread post by Aspie »

There is a .patch file, is this supposed to be added to folder too?
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

The .patch file is for submitting the changes to GitHub, it's not necessary to copy it to the MiSTer.

@Robgus I don't understand how that may be happening to you, sorry. My changes are quite aseptic and shouldn't affect anything but the wav output module. The only explanation is that there is some setting that I needed to set but failed to set before compiling the core, but I have no idea which. It apparently works for everyone else too.
mhartman
Posts: 78
Joined: Fri Jul 03, 2020 1:26 pm
Has thanked: 33 times
Been thanked: 16 times

Re: Donkey Kong: Walking sound hack?

Unread post by mhartman »

Robgus wrote: Thu Nov 25, 2021 9:25 am
callanabrown wrote: Thu Nov 25, 2021 1:33 am Just tried it out! It definitely sounds better. I checked an old MAME video on YouTube and indeed it sounds sequential. I think it's still a bit off from a real board, but it's a big improvement, thanks for making this happen!!
I totally agree, it sounds alot better, thank you so much :D

However, I get some weird issues. It doesn't work to reboot in to last core. And after reboot, it freezes with a stuck Jumpman and some numbers and letters are on the monitor... please see the attached photos.

With that said, I really hope that this improvement makes it in the "official" core.

All the best!
This isn’t related to the sound hack, it’s related to the high score save I believe. Mine does this and I haven’t loaded the sound hack yet. I think you have a corrupted nvram file. Delete the nvram file for DK and you should be back in business.
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

Cheers! It started after I loaded the sound hack, so maybe I did something wrong... Where do I find the nvram file, and I can still have the highscore save on right?

@pgimeno No need to say sorry. I'm really happy that you took your time to look this over!
neurorulez
Posts: 5
Joined: Thu Nov 18, 2021 12:31 pm
Been thanked: 7 times

Re: Donkey Kong: Walking sound hack?

Unread post by neurorulez »

pgimeno wrote: Thu Nov 25, 2021 10:21 am
thorr wrote: Thu Nov 25, 2021 7:18 am I haven't had a chance to try this yet, but can we get this into the main core if it is indeed better?
I've added the patch so that someone else can submit it, because I left GitHub when MS acquired it. Sorg or anyone else should know what to do with the patch, so someone needs to file an issue linking to the post with the zip.

Robgus wrote: Thu Nov 25, 2021 9:25 am However, I get some weird issues. It doesn't work to reboot in to last core. And after reboot, it freezes with a stuck Jumpman and some numbers and letters are on the monitor... please see the attached photos.
I can't reproduce it. When does this happen? Right away when starting a game? Are you saying that going back to the previous core does not fix it?

Does anyone else have the same problem?
I was added the patch to my personal repo, and when i tested it well, i will make a pull request in your name.
https://github.com/neurorulez/Arcade-DonkeyKong_MiSTer
Let's see if they accept the changes
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

Ohhh I just noticed, there's been one commit after the latest release, which fixes an issue with high score saving (this post gave me the hint). I was using current master, which included that commit. So yes, it's expectable that you need to delete the savefile (which you would need to do in the next update anyway). (Update, see my next post)

That explains the issue that @Robgus was having. If anyone else was saving high scores, the same applies. Thanks also to mhartman for pointing in the right direction.
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

pgimeno wrote: Sat Nov 27, 2021 1:31 am Ohhh I just noticed, there's been one commit after the latest release, which fixes an issue with high score saving (this post gave me the hint). I was using current master, which included that commit. So yes, it's expectable that you need to delete the savefile (which you would need to do in the next update anyway).

That explains the issue that @Robgus was having. If anyone else was saving high scores, the same applies. Thanks also to mhartman for pointing in the right direction.
Awesome!

Sorry to bother… where do I find the save file? And, I can still have the high score save on right?

Thanks!
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

Yes, you can keep the high score saving.

The high score file should be in /media/fat/config/nvram/ as seen from the MiSTer's Linux, or just /config/nvram/ relative to the SD root, depending on how you access the SD.

And I think I misunderstood the commit log, so my previous post is inaccurate. I hate merge commits >.< Apparently the fix is in the latest release, 211025, so most probably you (@Robgus) didn't update to the latest 211025 core which is why you didn't have the problem yet and only experienced it with my patched version, which includes that change.
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

pgimeno wrote: Sat Nov 27, 2021 11:17 am Yes, you can keep the high score saving.

The high score file should be in /media/fat/config/nvram/ as seen from the MiSTer's Linux, or just /config/nvram/ relative to the SD root, depending on how you access the SD.

And I think I misunderstood the commit log, so my previous post is inaccurate. I hate merge commits >.< Apparently the fix is in the latest release, 211025, so most probably you (@Robgus) didn't update to the latest 211025 core which is why you didn't have the problem yet and only experienced it with my patched version, which includes that change.
There must be something with my Mister setup... I get the same issues eventhough I deleted the save file :( (the weird numbers on the monitor and a frozen jumpman). I have the "DonkeyKong_20211025.rbf" by the way.

The autoload last core works though!

Guess I'll have to keep my fingers crossed that this makes it in the official core.
neurorulez
Posts: 5
Joined: Thu Nov 18, 2021 12:31 pm
Been thanked: 7 times

Re: Donkey Kong: Walking sound hack?

Unread post by neurorulez »

pgimeno wrote: Tue Nov 23, 2021 3:31 am I've made this, which I don't know if it will help.

Includes patch in `git am` format. The .MRA changes are not in the patch though.

(Edit: new version fixes an inconsistency with tabs and spaces in the patch, but the core is unchanged)
Changes merged.
https://github.com/MiSTer-devel/Arcade- ... 5681168336
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

Brilliant, happy days!

I was thinking, could it be that I have a bad rom that's causing the issue?
sardine
Posts: 9
Joined: Thu Apr 29, 2021 9:41 pm

Re: Donkey Kong: Walking sound hack?

Unread post by sardine »

I fired up my mister tonight and performed an update_all ,,,, and,,, Donkey Kong walk sound is wrong but another port of it is ok.

to me ( after also playing a few other games ) the games are running too fast ( since I perfo4md update_all , was ok previously ), could the game speed be slightly too fast its cutting off the walk sound too soon. its as if a PAL games is running on NTSC hardware as an example.
User avatar
pgimeno
Posts: 309
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 117 times
Been thanked: 77 times

Re: Donkey Kong: Walking sound hack?

Unread post by pgimeno »

neurorulez wrote: Sun Nov 28, 2021 5:47 pm Changes merged.
https://github.com/MiSTer-devel/Arcade- ... 5681168336
That's great! Thank you very much.

I want to clarify that I am NOT this guy: https://github.com/pgimeno - apparently my old username got taken by someone else.
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

Am I the only one here?

I did a fresh install, ran update all and I still have the weird DK issue... :shock:

I deleted every cfg file and the nvram file. The only thing I did was change horizontal to vertical, save the config and did a reset - then the issues appeared again.

Why does saving settings in the DK menu cause this, I don't get it..?

(Edit. Highscore saving was off)
netbeui
Posts: 63
Joined: Fri Jul 31, 2020 5:04 am
Has thanked: 13 times
Been thanked: 4 times

Re: Donkey Kong: Walking sound hack?

Unread post by netbeui »

I have a similar problem, the only difference is that I'm saving high scores. I ran update_all and noticed my Donkey Kong was all messed up. So I deleted the NVRAM file, played a full game and entered my high score and saved it. Played a game of Donkey Kong Jr (no issues on that core btw) and when I went back to Donkey Kong I see my recently entered high score at the top of the screen but it's not in the high score table and the attract mode screen has numbers/glitches on it. No biggie, just wanted to let you know I'm also experiencing issues.
mhartman
Posts: 78
Joined: Fri Jul 03, 2020 1:26 pm
Has thanked: 33 times
Been thanked: 16 times

Re: Donkey Kong: Walking sound hack?

Unread post by mhartman »

I was having the same issue, but before the walking sound hack. It’s something else. I guessed high score save but maybe something else.
Robgus
Posts: 34
Joined: Sun Feb 21, 2021 3:52 pm
Has thanked: 19 times
Been thanked: 2 times

Re: Donkey Kong: Walking sound hack?

Unread post by Robgus »

mhartman wrote: Tue Nov 30, 2021 1:13 am I was having the same issue, but before the walking sound hack. It’s something else. I guessed high score save but maybe something else.
Interesting. I had the latest, previous version and it worked flawlessly. Went back to it yesterday.
Post Reply