Wario's Woods EU/AUS (PAL) NSF rip request

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Wario's Woods EU/AUS (PAL) NSF rip request
by on (#93605)
One of my favourite childhood games was Wario's Woods and being from Australia I had the PAL version of Wario's Woods which strangely enough featured different BGM from the U.S. version for most of the game. (I distinctively remember the boss battle theme on the PAL version which I loved so so much)

Would someone be able to kindly enough make a NSF rip of the PAL version for Wario's Woods please then my NES nostalgia would be complete.

by on (#93669)
hi there

i in australia and have the pal version of this game. let me know step by step what you need done and i will try and do it for you.

by on (#93689)
Thanks for offering however I've been incredibly busy the past couple of months so I haven't had the time to learn how to rip NSFs myself otherwise I would've done so already (Which is why I'm asking for a request here)

by on (#93690)
Gil-Galad wrote a guide: http://gilgalad.arc-nova.org/intro.html

It's a bit of an adventure though.

by on (#93691)
I didn't know how to rip NSFs, but I managed to change the Dragon Quest 3 NSF into a Dragon Warrior 3 NSF.

You look at the NSF file specifications, it tells you where to find the Init and Play addresses.
For an NSF, usually the init code is slightly changed (rippers often add in a song selection table).
But the idea is that you know you have two different versions of the same game. Look at the Init code with a disassembler or hex editor. Then look at the Play code with a disassembler or hex editor.
Search for the matching code in the other rom.
Then make an NSF from there.

by on (#93693)
Also I might add that some do not have an initialization call. You have to build one yourself. Sometimes it's easy to do, sometimes not.

If you guys don't get it ripped, let me know and I can try it as well.

by on (#93694)
Im making an attempt to rip this myself but im not getting very far at all.

Is it normal to be getting 1 dump file with NES2NSF?

PAL version of Warios Woods is giving me one dump file
NTSC version is giving me 3 dump files

I couldn't follow this guide if my life depended on it (But I want to at least try before I give up on it)

by on (#93697)
Milkomeda wrote:
Im making an attempt to rip this myself but im not getting very far at all.

Is it normal to be getting 1 dump file with NES2NSF?

PAL version of Warios Woods is giving me one dump file
NTSC version is giving me 3 dump files


Question 1: NES2NSF utility is just a glorified bank splitter. There are some settings in the config file where you can adjust the output size of the file. Default is 16K.

The utility also scans the ROM and detects any bytes that resemble writing to $4015 and then outputs only those banks.

STA $4015 - 8D1540
STX $4015 - 8E1540
STY $4015 - 8C1540

So, yes, it is possible to output more than one bank. Sometimes the utility will pick up on data not associated with the audio driver because three specific bytes were found.

Each bank, you have to figure out the load address for the start of the bank as well. Sometimes you can figure that out by disassembling the bank.

by on (#93709)
Gil-Galad wrote:
The utility also scans the ROM and detects any bytes that resemble writing to $4015 and then outputs only those banks.

STA $4015 - 8D1540
STX $4015 - 8E1540
STY $4015 - 8C1540

So, yes, it is possible to output more than one bank. Sometimes the utility will pick up on data not associated with the audio driver because three specific bytes were found.

And if the game never uses the DMC, like mine, it might write #$0F to $4015 at reset and then never touch it in the actual music player, causing the utility not to find the music code at all.

by on (#93733)
tepples wrote:
And if the game never uses the DMC, like mine, it might write #$0F to $4015 at reset and then never touch it in the actual music player, causing the utility not to find the music code at all.


That's absolutely right and I've ran into a few situations like that until I stopped using that utility.

by on (#93949)
B00daW and I ended up ripping it:

Attachment:
Wario's Woods (Europe).NSF [16.23 KiB]
Downloaded 51 times


What's the process for submitting new NSF rips? Is there an optimizer program they should be run through? (This is only 16k anyway...)


As for how we did this, B00daW found the music code/data block in the ROM (I don't know what his process was for this), then copied the INIT code from the NTSC rip. This by itself doesn't work yet, but it's a good starting point, after which the following was done:

1. Discovered that the game triggers a new song by writing a song number to $F0 (it was $F3 in the NTSC version). I think B00daW did this by poking values in an emulator until he found the one that changes the song.

2. Traced through the NMI code in the ROM to find where the PLAY routine should point, turned out to be at $8003. (It was $8000 in the NTSC version.)

3. Still didn't work; eventually we discovered that the PAL version has an initialization subroutine at $8000 that sets up some necessary RAM variables. Called this from INIT, and we had a working NSF.

4. Tested all 256 possible values for $F0 to find which ones actually made sound. 0-55 all worked. Most were silent above this range, but a few made some broken sounding noises; I didn't include these, I think they were just random data kind of stuff, except 110 (NSF track 57), which sounds similar to 6 (NSF track 7) but without the square channels active. (Feel free to remove it if this was inappropriate. Just edit byte 6 of the NSF from $39 to $38 to get rid of it.)

by on (#93954)
If you want to "optimize" an NSF file, there's a way. FCEUX's code-data logger has a feature to create a "stripped" NES rom, removing any code or data that wasn't used when running the rom. Fast forward to the max, let each song loop several times, and you have an "optimized" NSF.

But FCEUX deliberately disables the code-data logger and stripped ROM creator if you loaded an NSF file. They were concerned about needing to fix an NSF later, which becomes hard to do when the code and data for the rom block is gutted away.

by on (#93956)
I don't use those automatic optimizers anymore. They can cause a lot of problems and eliminates code that could be necessary if used in a ROM. Anything that wasn't included in the rip index would be wiped out as well.

The information was correct about ripping the game. I made some really simple code. I did rip this game just incase you guys didn't get it. This one is fairly easy to rip. There just isn't hardly any this easy anymore.

07:FF80:48 PHA
07:FF81:A9 80 LDA #$80
07:FF83:8D 17 40 STA $4017 = #$FF
07:FF86:A9 0F LDA #$0F
07:FF88:8D 15 40 STA $4015 = #$FF
07:FF8B:20 00 80 JSR $8000
07:FF8E:68 PLA
07:FF8F:85 F0 STA $00F0 = #$FE
07:FF91:60 RTS

Writing to $4015 wasn't really necessary in this rip. I almost always start the code off that way so I just left it there after adding the JSR to $8000.

by on (#93957)
Just one more thing.

At the beginning of the play routine is where you would find that address to switch the tune. A great deal of Nintendo drivers are similar to the same way. This game's audio driver is a little different than a lot of Nintendo drivers though. Some of the older games clear the tune index addresses at the very end of the play code. So, it's easier to find than debugging the code.

00:8003:A5 F0 LDA $00F0 = #$00
00:8005:C9 FE CMP #$FE
00:8007:F0 0D BEQ $8016
00:8009:A2 FE LDX #$FE

by on (#93963)
We both went into this knowing practically no idea what we were doing. I learned much of what I know from watching Gil's YouTube tutorial and applying my own spins. rainwarrior is a beast and stayed up past 5am sorting those tracks. Once you go through the motions of the ripping process things make a lot more sense. It's even fun making your own init code. Makes me feel like investigating some MuseTracker and SuperNSF NSFs to see what they did to get around playing PCM without frame IRQs.

Again this was good fun and I hope to do it again.

...Another thing off my list of things I wanted to do. :)

by on (#93993)
Thanks for ripping this, guys! Though, I'm very curious as to why they changed the music for the PAL release... it sounds like they even went so far as to change the entire music engine. o_O (They might not have, but things do sound a bit different...)

An interesting thing to note is that track 20 of the NSF went on to be the BGM for 1P mode on the SNES version. I booted up the rom for this game, and I couldn't find this song in any of the modes... but I didn't really play that far, so it might be accessible later on.

by on (#94024)
But then the background music for 1P mode in Wario's Woods (U) for Super NES also sounds like a "Jimmy Hart Version" of the background music for 1P mode in Wario's Woods (U) for NES.

by on (#94147)
B00daW wrote:
We both went into this knowing practically no idea what we were doing. I learned much of what I know from watching Gil's YouTube tutorial and applying my own spins. rainwarrior is a beast and stayed up past 5am sorting those tracks. Once you go through the motions of the ripping process things make a lot more sense. It's even fun making your own init code. Makes me feel like investigating some MuseTracker and SuperNSF NSFs to see what they did to get around playing PCM without frame IRQs.

Again this was good fun and I hope to do it again.

...Another thing off my list of things I wanted to do. :)


Wow huge thanks to you 2 and thanks to Gil as well

I did make an attempt at trying this myself however since I lacked knowledge of the 6502 assembly I got stuck at the sound driver range in the stack viewer. After seeing the 6502 assembly guide my jaw dropped at how complicated it looked. I was making comparisons to it against Algebra in terms of how complicated they both were.

Is there anything that can be done in the file about decreasing the speed of the tracks? I noticed they play at 60hz NTSC speed but it would be much more enjoyable listening to them at the proper 50hz PAL speed.

by on (#94157)
Milkomeda wrote:
After seeing the 6502 assembly guide my jaw dropped at how complicated it looked. I was making comparisons to it against Algebra in terms of how complicated they both were.

Yeah, I learned 6502 assembly on Apple II computers back in seventh grade, around the same time I learned algebra.

by on (#94161)
Milkomeda wrote:
Is there anything that can be done in the file about decreasing the speed of the tracks? I noticed they play at 60hz NTSC speed but it would be much more enjoyable listening to them at the proper 50hz PAL speed.


I made sure that the NSF is timed at 50Hz and has the PAL flag set. Make sure you're using a NSF player that supports PAL. Quite a few of them do not. Try NSFPlay 2.1. It works well on WINE, so should be fine with Parallels if you are on a Mac.