Donkey Kong and DK Jr. Sound Fixes
The sound emulation in Donkey Kong has been imperfect for a while now and it always bugged me, since it's one of my favorite arcade games. I first attempted to fix this by dynamically altering the Machine->sample_rate in a certain pattern when the sounds are played, but that resulted in other sounds being affected and was unacceptable. Instead, after asking on the 'mame.net' forums someone posted that Derrick Renauld had done some work earlier on alternating between different samples. Well, that works, but isn't accurate either, because the game doesn't play the different pitched sounds in alternating 1-2-3 order like his code did. I found an interesting site on the net which has recordings of arcade games done by this gentleman in the early 80's. It's amusing listening, but more importantly it has a very good recording of someone playing DK. I was able to discern (mostly) the pattern the samples are played during Mario's (jumpman's) walking sequence. It is still not 100%, because the pattern in the real game starts over when you pause or change directions, but it's close enough that you won't notice. It's MUCH better than playing the same sample over and over again.
I applied the same fixed to DK Junior, but I don't have individual samples of the 2 modulated sounds (walk and climb) so the extra samples are pitch-shifted to simulate it. Climbing sounds fairly accurate, but walking is not. If you have good samples of Junior walking, I'd love a copy to fix this.
As of version 0.85, MAME has included my patches and samples, so there is no longer a download here.