Page 1 of 9

Re: Donkey Kong: Walking Sound Hack?

Posted: Sun Nov 21, 2021 9:57 pm
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 23, 2021 3:31 am
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)

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 23, 2021 2:16 pm
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

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 1:33 am
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!!

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 7:18 am
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?

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 9:25 am
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!

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 10:21 am
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?

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 12:17 pm
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 2:31 pm
by Aspie
There is a .patch file, is this supposed to be added to folder too?

Re: Donkey Kong: Walking Sound Hack?

Posted: Thu Nov 25, 2021 9:39 pm
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Fri Nov 26, 2021 3:00 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Fri Nov 26, 2021 6:10 am
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!

Re: Donkey Kong: Walking Sound Hack?

Posted: Fri Nov 26, 2021 9:33 am
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

Re: Donkey Kong: Walking Sound Hack?

Posted: Sat Nov 27, 2021 1:31 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Sat Nov 27, 2021 8:59 am
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!

Re: Donkey Kong: Walking Sound Hack?

Posted: Sat Nov 27, 2021 11:17 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Sun Nov 28, 2021 10:44 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Sun Nov 28, 2021 5:47 pm
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

Re: Donkey Kong: Walking Sound Hack?

Posted: Sun Nov 28, 2021 7:20 pm
by Robgus
Brilliant, happy days!

I was thinking, could it be that I have a bad rom that's causing the issue?

Re: Donkey Kong: Walking Sound Hack?

Posted: Sun Nov 28, 2021 8:41 pm
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Mon Nov 29, 2021 10:39 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Mon Nov 29, 2021 6:16 pm
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)

Re: Donkey Kong: Walking Sound Hack?

Posted: Mon Nov 29, 2021 7:13 pm
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 30, 2021 1:13 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 30, 2021 6:36 am
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.

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 30, 2021 8:29 am
by thorr
Just tried this and there is some garbled text at the bottom that when you walk over it, you fall through the floor and proceed to level 2. If you try it on level 2, you fall through the floor and to the top next to the girl and die.
The walking sound is missing samples (I only have one). I used the update_all script, and it appears it doesn't get everything that is needed.

Re: Donkey Kong: Walking Sound Hack?

Posted: Tue Nov 30, 2021 11:50 pm
by pgimeno
Hm, the samples are in the MRA, maybe install it manually? It's here: https://github.com/MiSTer-devel/Distrib ... t%201).mra

Re: Donkey Kong: Walking Sound Hack?

Posted: Wed Dec 01, 2021 6:02 am
by thorr
pgimeno wrote: Tue Nov 30, 2021 11:50 pm Hm, the samples are in the MRA, maybe install it manually? It's here: https://github.com/MiSTer-devel/Distrib ... t%201).mra
Thanks for the help. This is pretty weird. The Donkey Kong I am selecting is called "Donkey Kong". However, I downloaded the above mra and overwrote a file called "Donkey Kong (US, Set 1).mra". The mra for "Donkey Kong" is dated 4/25/2021. When I select "Donkey Kong" it works but is screwed up as previously described and is missing samples. When I select "Donkey Kong (US, Set 1)" it says it can't find an rbf file for it. It seems like the update_all script isn't working correctly, at least in my case.

Re: Donkey Kong: Walking Sound Hack?

Posted: Wed Dec 01, 2021 7:42 am
by Robgus
I’ve tried both a manual install and a fresh install. I didn’t work for me in either case :/

Re: Donkey Kong: Walking Sound Hack?

Posted: Wed Dec 01, 2021 11:29 am
by pgimeno
@Robgus I'm sorry, I really have no idea what may be going on. I've had weird issues that no one else seemed to have with some cores too.

Is it possible that you have two DonkeyKong cores in the cores folder? In that case there's the possibility that the wrong one is being picked.

@thorr Yes, the `Donkey Kong.mra` file is outdated but the updater apparently does not remove old files. It is no longer in the MRA list: https://github.com/MiSTer-devel/Distrib ... in/_Arcade. It seems to have been renamed to conform to MAME naming. I have no idea why the new MRA doesn't find the core though. I always do my updates by hand, so it's possible that the updater has issues, but without a proper diagnostic of what's going on, it's hard to tell.