Messed up music in Shadow Warriors (European Ninja Gaiden)

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Messed up music in Shadow Warriors (European Ninja Gaiden)
by on (#149660)
Today I learned that the DPCM samples in Shadow Warriors (the European version of Ninja Gaiden) are messed up somehow (compared to the U.S. version). Namely the snare sample is replaced by a strange "pop" sound that sounds more like a bass drum, and the bass drum sample is replaced by something that sounds like a short piece of noise.

Did anyone ever look into why this happens? It seems like something that might be caused by a bug such as a wrong sample start offset being used.

Also noteworthy is that the NSF rip of Shadow Warriors is "broken" in that it sounds better than it should. Maybe because the rip was hacked on top of the original Ninja Gaiden rip: viewtopic.php?p=49363#p49363

EDIT: For comparison:
Ninja Gaiden: https://youtu.be/DIcOjUaf5P8?t=11
Shadow Warriors: https://youtu.be/3c_8J5BHkiQ?t=15
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149665)
They flat-out forgot to include the drum DPCMs into the Shadow Warriors image. Probably because the fixed bank grew a little, overlapping with where the DPCM would have been.

(The game runs in 16+16F banking for the entire time)

The two DPCM samples start at $FC00, or 0x1FC10 in the iNES file. In Shadow Warriors, it's got code all the way up to $FDBD...
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149690)
Yeah, looks to be like that. Unfortunately no easy way to patch it since the samples take 768 bytes but only 512 bytes are free in the Shadow Warriors fixed bank. I guess an authentic NSF rip would be still good to have.
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149694)
God it sounds awful. Once again, it's terrible how Nintendo depicted their Euoprean customers...
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149711)
thefox wrote:
Unfortunately no easy way to patch it since the samples take 768 bytes but only 512 bytes are free in the Shadow Warriors fixed bank.

Can you change the sound effects engine to add two more sound effects "kick" and "snare" and have it play those instead of samples?
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149714)
There's clearly-unused bytes in Shadow Warriors from $FDC0-$FFBF. It tentatively feels to me like the least-invasive injection would be to shrink both the snare (512? bytes) and bd sample (256? bytes) by 128 bytes each and stuff them in the remaining free space.

It might also be practical to resample two samples from the 33kHz (rate $F) that Ninja Gaiden uses down to 21kHz (rate $D) to make it fit... Maybe?

Both builds put the MMC1-power-on-reset at $FFDA, which could be moved to free up some space, but... Shadow Warriors has some funny code from $FFC0-FFD4, but I'm not certain what ever calls it. (Obviously it could be called indirectly, but at least JSR $FFC0 and JMP $FFC0 don't appear in the PRG.)
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#149891)
lidnariq wrote:
They flat-out forgot to include the drum DPCMs into the Shadow Warriors image. Probably because the fixed bank grew a little, overlapping with where the DPCM would have been.

A week before the game ships:

"Hey guys! I, uh... accidentally wrote over some code." :lol:
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#150107)
lidnariq wrote:
There's clearly-unused bytes in Shadow Warriors from $FDC0-$FFBF. It tentatively feels to me like the least-invasive injection would be to shrink both the snare (512? bytes) and bd sample (256? bytes) by 128 bytes each and stuff them in the remaining free space.
It might also be practical to resample two samples from the 33kHz (rate $F) that Ninja Gaiden uses down to 21kHz (rate $D) to make it fit... Maybe?


If you take the snare sample and chop off the second 256 bytes, it sounds awfully similar to one of the snares found in Konami games... for example: Bucky o' Hare and Lagrange Point. I think people would be content with that.
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#150141)
Just my opinion, but I'm not a fan of half-assed fixes, like truncating samples or replacing samples with sound effects.
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#180454)
LOL.

I just swapped the 1C010-20000 region replacing the code with the US version's code, and it works like it should have been, so after this I seriously don't know how they were able to screw this up.

[Removed Shadow Warriors Fix.yarr --MOD]
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#180467)
What's a "yarr" file?
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#180469)
RAR containing a pirated copy of the ROM.
Re: Messed up music in Shadow Warriors (European Ninja Gaide
by on (#180471)
:lol: Never change, Tepples.