More NSF Requests
Moderator: Moderators
The moment you've been waiting for, for a few months has arrived. But don't get too excited. Some are decent, some not. I also filled in a few requests from you guys. You can download them at my website.
Alfred Chicken - FIX
Bo Jackson Baseball - FIX
Cammandos
Exploding Fist (Prototype)
Golden Axe
Imparial Judge
International Cricket - FIX
Nangoku Shirei!! - Spy Vs Spy
Total Recall - FIX
Zhen Jia Hou Wang
Zheng Jiu Shi Ji
Have fun and enjoy listening. I will try to rip some more for the next update.
Alfred Chicken - FIX
Bo Jackson Baseball - FIX
Cammandos
Exploding Fist (Prototype)
Golden Axe
Imparial Judge
International Cricket - FIX
Nangoku Shirei!! - Spy Vs Spy
Total Recall - FIX
Zhen Jia Hou Wang
Zheng Jiu Shi Ji
Have fun and enjoy listening. I will try to rip some more for the next update.
Re: The Blue Marlin
I have a fix version of Blue Marlin on my website. Specifically in the NEWNSF page, NSF Fix category. I hear the noise channel in it. Let me know if it's ok.locke_gb7 wrote:Sadly, one of my favorite NES games NSF i just realized is missing the "Noise" layer The Blue Marlin
Here is an updated list of NSF fix on my list
Obocchama-Kum Flopping Guy
Kabuki Quantum Fighter Cutscene
Advanced Dungeons & Dragons - Hillsfar Arena Match Start
Advanced Dungeons & Dragons - Hillsfar Failed Lock Pick
Short Order Eggsplode Burger Game
Baseball Stars You're Hired
Rally Bike Died, Stage 3, Stage 5
Dai-2-Ji - Super Robot Regular Battle Scene
Bases Loaded Switching sides
Jackie Chan's Action Kung Fu Second part of the Ending
World Class Track Meet Too many tracks, in parts, all fucked up
Famicom Wars End turn
Cool I'll check for the Blue Marlin fix tomorow
Kabuki Quantum Fighter Cutscene
Advanced Dungeons & Dragons - Hillsfar Arena Match Start
Advanced Dungeons & Dragons - Hillsfar Failed Lock Pick
Short Order Eggsplode Burger Game
Baseball Stars You're Hired
Rally Bike Died, Stage 3, Stage 5
Dai-2-Ji - Super Robot Regular Battle Scene
Bases Loaded Switching sides
Jackie Chan's Action Kung Fu Second part of the Ending
World Class Track Meet Too many tracks, in parts, all fucked up
Famicom Wars End turn
Cool I'll check for the Blue Marlin fix tomorow
One more thing, locke_gb7
Check those fix requests vs the archive that I posted a couple of days ago.
I know AD&D Hillsfar needs fixed so you don't have to check it.
Short Order Eggsplode I know needs fixed.
The others, not sure yet. Because my archive has close to the most updated archive that I know of.
Check those fix requests vs the archive that I posted a couple of days ago.
I know AD&D Hillsfar needs fixed so you don't have to check it.
Short Order Eggsplode I know needs fixed.
The others, not sure yet. Because my archive has close to the most updated archive that I know of.
- Doommaster1994
- Posts: 162
- Joined: Mon Jun 21, 2010 10:23 pm
- Location: Seattle, WA
- Contact:
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
Mr. Gimmick (Europe)
How-to details, if anyone's interested:
This was a lot trickier than Wario's Woods. I started by writing a quick program to chop the PRG ROM into 8k banks (like the FME-7 uses). Then I arranged these into a ca65 assembly project. I looked for a square channel register write with a debugger, and started out with the set of four banks that were currently loaded when that write was done.
After some tracing and thinking and debugging, and with a little help from the NTSC version's NFS, I found its play routine and initialization code. With this in place I found 3 of the songs from the game and a bunch of sound effects. The songs were running strangely slow, but it was a good start. I found a little bit of room to jam my INIT bootstrap into at the end of one of the banks.
Next I tried out the sound test in the debugger, and noted that for different songs, a different bank might be loaded at A000-BFFF, so I tried all the banks in this slot and found most of the songs (though still playing slow, and some sounded funny, especially the DPCM).
Next I figured out how the FME-7 actually performs a bankswitch, and put breakpoints on writes that would trigger it. I discovered the music playback code switched the A000-BFFF bank every frame for music data, and C000-DFFF for DPCM whenever a new sample was played. At this point I disassembled the bank that contained the music code and inserted a JSR to a custom NSF bankswitch routine where the STAs were supposed to be bankswitching the FME-7.
It took a bit of fiddling to get the bankswitching code in a state I liked. I wasn't sure if I could get away with just deleting stuff out of one of the banks to make room, so I actually put most of the code in an extra bank that I quickly switch to. This also have me space to build a table that maps the intended FME-7 bank numbers to the banks I included in the NSF. Spent some time with conditional breakpoints on the bankswitch code making sure I'd included all the relevant banks.
Fixing the speed was interesting; it turns out the music is composed for a 60Hz update rate, and there is a tiny bit of code that just calls the music update twice on every fifth frame. I stuck an RTS on the end of this snippet, and pointed my PLAY routine at it.
After that it was just a matter of building a song table and cleaning it up, and a little bit of debugging to make sure the code wasn't trying to set IRQs or write to the PPU or anything like that. I've tried to make the absolute minimum amount of changes to the banks ripped from the game.
If anyone's interested in what my working project looked like, this is the source code:
How-to details, if anyone's interested:
This was a lot trickier than Wario's Woods. I started by writing a quick program to chop the PRG ROM into 8k banks (like the FME-7 uses). Then I arranged these into a ca65 assembly project. I looked for a square channel register write with a debugger, and started out with the set of four banks that were currently loaded when that write was done.
After some tracing and thinking and debugging, and with a little help from the NTSC version's NFS, I found its play routine and initialization code. With this in place I found 3 of the songs from the game and a bunch of sound effects. The songs were running strangely slow, but it was a good start. I found a little bit of room to jam my INIT bootstrap into at the end of one of the banks.
Next I tried out the sound test in the debugger, and noted that for different songs, a different bank might be loaded at A000-BFFF, so I tried all the banks in this slot and found most of the songs (though still playing slow, and some sounded funny, especially the DPCM).
Next I figured out how the FME-7 actually performs a bankswitch, and put breakpoints on writes that would trigger it. I discovered the music playback code switched the A000-BFFF bank every frame for music data, and C000-DFFF for DPCM whenever a new sample was played. At this point I disassembled the bank that contained the music code and inserted a JSR to a custom NSF bankswitch routine where the STAs were supposed to be bankswitching the FME-7.
It took a bit of fiddling to get the bankswitching code in a state I liked. I wasn't sure if I could get away with just deleting stuff out of one of the banks to make room, so I actually put most of the code in an extra bank that I quickly switch to. This also have me space to build a table that maps the intended FME-7 bank numbers to the banks I included in the NSF. Spent some time with conditional breakpoints on the bankswitch code making sure I'd included all the relevant banks.
Fixing the speed was interesting; it turns out the music is composed for a 60Hz update rate, and there is a tiny bit of code that just calls the music update twice on every fifth frame. I stuck an RTS on the end of this snippet, and pointed my PLAY routine at it.
After that it was just a matter of building a song table and cleaning it up, and a little bit of debugging to make sure the code wasn't trying to set IRQs or write to the PPU or anything like that. I've tried to make the absolute minimum amount of changes to the banks ripped from the game.
If anyone's interested in what my working project looked like, this is the source code:
Last edited by rainwarrior on Mon Aug 07, 2017 3:04 pm, edited 2 times in total.
Apparently only FCEU 0.98.12 and AudioOverload 2.0 play (at least this) PAL NSF correctly. FCEUX 2.1.4a ignores the NSF's PAL mode setting and plays the DPCM using the NTSC rate table unless "Enable PAL mode" is checked in the video preferences, Nestopia 1.4.0H seems to entirely ignore all the PAL enable bits both in its menu and in the NSF and just plays it as though it were on an NTSC console, and Nsfplay 2.1 plays in tune but too high :/ (And I'm wrong, it's not too fast)
edit: described specifically what FCEUX and Nestopia were doing wrong
edit: described specifically what FCEUX and Nestopia were doing wrong
Last edited by lidnariq on Fri May 18, 2012 12:53 pm, edited 3 times in total.
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
What do you mean by "in tune but too high and fast"? How is that possible? (As far as I can tell they are in tune and in the right octave on NSFPlay 2.1.) Can you give me any specific details?
I don't have a way to verify against a PAL NES (unless someone wants to send me a reference recording) but I would like to get the sound emulation as accurate as I can.
If FCEU 0.98.12 is an accurate reference, can you point me at a track where the DPCM sounds different than NSFPlay? (I am comparing them side by side right now and they seem the same to me...)
I don't have a way to verify against a PAL NES (unless someone wants to send me a reference recording) but I would like to get the sound emulation as accurate as I can.
If FCEU 0.98.12 is an accurate reference, can you point me at a track where the DPCM sounds different than NSFPlay? (I am comparing them side by side right now and they seem the same to me...)
- rainwarrior
- Posts: 8732
- Joined: Sun Jan 22, 2012 12:03 pm
- Location: Canada
- Contact:
lidnariq, could you send me your in_yansf.ini file? NSFPlay should not be playing back at that pitch (does everything you play in it sound at higher pitch like that?). Was that MP3 made by using NSFPlay's WAV output feature, or by recording directly from your system?
The pitch is correct on my computer. I wonder if NSFPlay has a samplerate problem under Wine. Though I did have one other person say that it wasn't playing back at the expected pitch (they were using Windows though). Maybe there's a lingering bug in the sound init code...
The pitch is correct on my computer. I wonder if NSFPlay has a samplerate problem under Wine. Though I did have one other person say that it wasn't playing back at the expected pitch (they were using Windows though). Maybe there's a lingering bug in the sound init code...
Your hunch was right, it is a setting in in_yansf.ini — specifically APU1_QUALITY/"Sample Rate Conversion". I'd set it to 0/fastest, and it played all the pitches too high. This only shows up for NSFs with the PAL flag set while APU1_QUALITY=0, though. (e.g. the Asterix soundtrack, where it plays everything out of tune instead of consistently sharp)