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

Discuss NSF files, FamiTracker, MML tools, or anything else related to NES music.

Moderator: Moderators

User avatar
Milkomeda
Posts: 4
Joined: Thu May 10, 2012 3:15 am

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

Post by Milkomeda »

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.
prostkxy
Posts: 1
Joined: Fri May 11, 2012 4:56 am

Post by prostkxy »

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.
User avatar
Milkomeda
Posts: 4
Joined: Thu May 10, 2012 3:15 am

Post by Milkomeda »

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)
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post by rainwarrior »

Gil-Galad wrote a guide: http://gilgalad.arc-nova.org/intro.html

It's a bit of an adventure though.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad »

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.
User avatar
Milkomeda
Posts: 4
Joined: Thu May 10, 2012 3:15 am

Post by Milkomeda »

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)
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad »

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.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

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.
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad »

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.
User avatar
rainwarrior
Posts: 8062
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Post by rainwarrior »

B00daW and I ended up ripping it:
Wario's Woods (Europe).NSF
(16.23 KiB) Downloaded 80 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.)
Last edited by rainwarrior on Mon Aug 07, 2017 2:54 pm, edited 1 time in total.
User avatar
Dwedit
Posts: 4470
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Post by Dwedit »

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.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad »

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.
User avatar
Gil-Galad
Posts: 321
Joined: Sat Nov 13, 2004 9:43 pm
Location: Ohio, USA
Contact:

Post by Gil-Galad »

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
User avatar
B00daW
Posts: 586
Joined: Thu Jan 03, 2008 1:48 pm

Post by B00daW »

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. :)
Post Reply