It is currently Thu Oct 19, 2017 7:45 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Modifying NSFs
PostPosted: Tue Jun 14, 2016 2:20 pm 
Offline

Joined: Mon Jun 13, 2016 6:12 am
Posts: 6
I'm new to the NSF scene. How do I modify NSFs?


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 3:13 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5718
Location: Canada
They're not easy to modify, because they're the same kind of content as an NES ROM, just with no video output. The NSF file is NES machine code and music data.

To modify an NSF you need the same skillset as for NES ROM hacking. Learn the 6502 instruction set. Analyze and disassemble the code. Figure out what part does the thing you want to change, and patch that part of the code.

Every NSF has different code in it; there's no ready-made solution for this kind of thing. There are easy ways to make new NSFs from scratch, but modifying existing ones takes a lot of work. If it's for a specific game, someone may have already done some work to document the music code for you. Check romhacking.net just in case.

You might ask a more specific question, like, "how do I change the melody in track 3 of the NSF for Super Mario Bros?", because you might get a more useful answer. There's not much anybody can help in response to the general question.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 4:00 pm 
Offline

Joined: Mon Jun 13, 2016 6:12 am
Posts: 6
In that case, what I'm working on is making the NES versions of arcade ports, starting with Mario Bros. (using the European exclusive Mario Bros. Classic Series) and Donkey Kong (using DK: Original Edition). I'd like to modify the sound effects and music to be more like the arcade version. This means I just need to change the pitch and tone and things like that. Romhacking.net doesn't seem to have anything.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 6:24 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1772
Location: DIGDUG
I think, conceptually, what you want is to emulate the Nintendo Vs Arcade system. There already are emulators that do that.

Otherwise, you're going through a lot of effort just to emulate it on an incompatible emulator.

This reminds me of the 'hack ideas' over at rockhacking.net, where people often say...'hey, can you take the improved graphics version of the GBA port, and insert them into the NES version'. And, all I can think is...'why? You already have a GBA version that looks exactly like that. Why put 3-6 months work just to get the exact same looking thing?' I digress.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 7:11 pm 
Offline

Joined: Mon Jun 13, 2016 6:12 am
Posts: 6
I made a typo - I'm trying to make the NES versions of arcade ports, starting with Mario Bros. (using the European exclusive Mario Bros. Classic Series) and Donkey Kong (using DK: Original Edition) more like their original arcade versions. The hack ideas thing is just any ideas that come to mind and make someone think, "Hey, that would be interesting". In certain cases, though, I agree - definitely not worth multiple months of work. What I'm trying to do is what everyone wanted back in the early to mid 80s: bring as good as possible arcade experiences to home consoles. And the NES versions just don't do it for me. They could've pushed the system to its limits to get better experiences, maybe not at first but at least by 1992 or so. I intend to do that.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 7:18 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1772
Location: DIGDUG
I'm saying it's not worth doing, because it's already done. Get a Vs emulator (MAME ?), done.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Tue Jun 14, 2016 7:28 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5718
Location: Canada
They're not VS games. Both MB and DK ran on a Z80 with an I8039 doing the sound. (They are both emulated by MAME though.)

Anyhow, I think the kind of thing you're asking would probably take a couple of days for someone with a lot of NES development experience to accomplish. Might be a couple of months of learning preceding that for someone who is new to it. Really depends on what kind of skills you already have, versus how interesting the project is to you.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Wed Jun 15, 2016 6:38 am 
Offline

Joined: Mon Jun 13, 2016 6:12 am
Posts: 6
I can easily modify palettes and graphics, and soon I should be able to do text as well. It's just the music and sound effects I can't do. Would it be possible to modify addresses found within the sound area/NSF to change them? Once again, I just need to kind of make them more detailed, probably deeper, whatever I find needs to be done to make them sound like arcade games. If there's a way to modify addresses, I could probably just find out where the sound is and experiment in that area until I find what works.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Wed Jun 15, 2016 9:08 pm 
Offline
User avatar

Joined: Thu Sep 07, 2006 1:08 pm
Posts: 535
Location: United States
Numerous times I'd accidentally freeze a channel's pitch/octave using the Cheat Console function in FCEUXD. Are you familiar with reading/writing breakpoints?

_________________
Ruling the World One Bean™ at a Time...


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Thu Jun 16, 2016 6:12 am 
Offline

Joined: Mon Jun 13, 2016 6:12 am
Posts: 6
No, but I've heard of them. What is the Cheat Console thing? Is that like the Cheats function in FCEUX, where you can set new values to addresses? I might try playing around with it before I try to figure out this NSF stuff.


Top
 Profile  
 
 Post subject: Re: Modifying NSFs
PostPosted: Thu Jun 16, 2016 7:43 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1772
Location: DIGDUG
Probably won't work. You need advanced knowledge of 6502 assembly to understand what you're looking at, or to know what to set breakpoints for.

I recommend putting a 'help wanted' ad over at romhacking.net, and try to find someone who already knows how to do this stuff.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group