Troubles getting a NSF made with MML to play

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
cooper
Posts: 9
Joined: Wed Oct 11, 2006 2:29 pm
Location: Paris

Troubles getting a NSF made with MML to play

Post by cooper »

Hello All! I've been browsing these forums for little over a year, and wanted to start out by saying I really appreciate all of the hard work that has been done by everyone.

I've been struggling with getting a .nsf made using ppmck to play in a NES rom. I'm still a big n00b in regards to 6502, but over the last week, I've been getting more comfortable with everything. I've been trying to use the nesasm nerdtracker nsf code posted here...

http://nesdev.com/wiki/?page=Nerdtracke ... +in+NESASM

I know my .nsf wasn't made in nerdtracker, but I figure if should still work if I modify the init and play addresses, but no dice. I have a few questions below...

1) The play address of my nsf is $8080, according to nullsleep's nsf cartridge guide, I don't need to strip out the header, and I can .org at $8000. Do I need to strip the header or should I be ok? My compiled NSF including the header is $2000 bytes. (8192 bytes)

2) Does anyone have any links to documentation on debugging? I pull up FCEUXD and seek to $8080 and $8084 and follow the jsr's around, and everything looks like it should be working. Since I'm really new to assembly in general, I don't completley understand the best way to drill down and find out what is wrong.

3) I've read many posts on this board about troubles with nesasm in regards to banks and other things. I have looked at the DASM source on Chris's nfs guide, but couldn't get that to work either. Does anyone happen to have a simple music player in ca65 or other assembler so I can go over the code and try to learn from that?

I appreciate any assistance that anyone can provide, and my appologies in advance if I've completely gone about this in the wrong way.
User avatar
85cocoa
Posts: 96
Joined: Sat Jul 22, 2006 12:06 pm
Location: USA

Post by 85cocoa »

I'm nowhere near an expert on this, but I do see one problem: The Nerdtracker player code is designed for a different data format from MML.

(Mods, help is appreciated, please)
Warning: I am not a serious developer (yet), but CS and EE really interest me.
I was -_pentium5.1_- until I screwed up. This is why I screwed up. ^_^
User avatar
Memblers
Posts: 4100
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers »

cocoa85: It's just a little code stub that with some init/play/load address modifications could play any NSF.

So, your NSF already plays in a normal NSF player, I assume.

I should mention that little bit of NSF playing code in NESASM was never tested by me. I just wrote it on there for those who use NESASM.

1. For cutting of the header or not, the load address is what really matters. If load is $8000 the header must be removed, if it's $8080 then it shouldn't be removed. But the play address being $8080 is a really strong indication that the load is probably $8080.

2. Nope, debuggers are mostly self-explanitory when you know assembly though. Personally I prefer the debugger in FCEU over FCEUXD, but I don't know if that helps you. Try letting your program run, then hit the step button and see where it ends up. If it's not on that infinite JMP loop, then it must've crashed somewhere.

3. For ca65 you could pretty much copy that code over except for the NESASM-specific parts and you'd need to set up a linker configuration and stuff. I've got an example program of sorts here: http://www.parodius.com/~memblers/nes/ (see n.bat and nsf.cfg). It's not a little NSF setup thing, but it just shows how to use ca65 sorta.

If you can upload your ROM somewhere, I could take a shot at figuring out what the problem is.
User avatar
cooper
Posts: 9
Joined: Wed Oct 11, 2006 2:29 pm
Location: Paris

Post by cooper »

Thank you very much Memblers, this definately clears a few things up. Once I get home from work, I'll check out your setup with ca65, and try debugging with FCEU. Thanks for the help!
User avatar
No Carrier
Posts: 290
Joined: Tue Dec 13, 2005 4:19 pm
Location: Gainesville, FL - USA
Contact:

Post by No Carrier »

Have you seen Nullsleep's directions for making a playback cart? It worked well for me, and was quite easy!

http://www.8bitpeoples.com/nullsleep/tr ... art_guide/

..and a thread discussing it on 2a03:

http://2a03.org/forum/viewtopic.php?id=67

Hope that helps!

NC
User avatar
cooper
Posts: 9
Joined: Wed Oct 11, 2006 2:29 pm
Location: Paris

Post by cooper »

Thanks for everyones help! One thing I'm really struggling with right now is it seems my nsf starts at $8070, and I can't for the life of me find out why. I think once I figure out why this is occuring, everything will start working fine. You can check out my feeble attempt at learning cc65 w/ memblers help here. This is a zip file with the code, NSF, and rom. Thanks in advance, and sorry for being such a n00b :(
Post Reply