Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /storage/content/49/145849/famitracker.com/public_html/forum/classes/dbHandler.php on line 29 FamiTracker
Login:
Menu:
Post: Author:
FamiTracker > General > Bug Reports & Feature Requests > Clean PRG Help! Owner: TheSyntaxSinTax New post
Page 1 of 2 Sort: Goto Page: [1] [2] Next >>
Clean PRG Help! Posted: 2012-07-13 05:41 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36727
Okay so I've been messing around with writing music in Famitracker for a while and I'm finally getting into actually trying to get my music onto the actual hardware. I've done a lot of research and managed to get a burner and chips that work with it, but I can't seem to get a Clean PRG to boot.

Here's what I've got going on right now:

*NROM cart with PRG chip removed and ZIF socket installed in it's place
*TOP853 Eprom programmer (a cheap one, I know)
*M27C512 Eprom chips

I managed to do a successful test burn with the data off of the NROM's PRG chip, so I know that my methods for getting data onto the chips work.

I then attempt to a burn of the "Clean PRG" option using a single song to make absolutely sure that I'm under 32kb. However, when I boot up my system I get a blank screen (sometimes colored) but with no sound.

Is there anything I'm missing here? I expected this export option to be fairly plug and play.

If it matters, I am using version 0.3.7

Thanks for any and all info. If a thread for this info already exists that I don't know of, please direct me to where it is.

Posted: 2012-07-13 05:45  (Last Edited: 2012-07-13 05:46) Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36728
Also, I'm using only the primary sound channels. No expansions or anything. Just wanted to clear that up if it was gonna be the first answer.

Posted: 2012-07-13 06:07  (Last Edited: 2012-07-13 06:23) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36729
If you haven't already, did you test the PRG with an emulator to make sure that works?

Edit: skip this question, I see you did this already, and I also looked it up and realized NROM is indeed compatible with JEDEC standard EPROMS.
(The second question is whether you've tested your cart with a known good ROM, e.g. have you tried putting the ROM you just removed on your EPROM? Does that work? Is the 27C512 pinout is compatible with the mask ROM you're replacing, or do you need to reroute some of the wires?)

Another question is, since the PRG should be 32k and your chip is 64k, did you try duplicating the data, just in case you have the wrong high address bit selected?

Personally I have not verified whether the PRG export works. I've used the .BIN export and compiled ROMs with the driver source and ca65, and those have worked fine (in emulators and on hardware).

Posted: 2012-07-13 07:09 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36734
I didn't test my stuff with an emulator yet. That's a good idea actually. I jumped straight into testin' directly on my socketed NROM cart without even thinking of that.

As far as the NROM cart is concerned, I've tested the socket with both the original chip as well as a dump-to-buffer and burn onto my Eproms. That's how I know that my chips definitely work.

Hmm... never thought of duplicating the Clean PRG data. I'm guessing that this is just a straight-up copy/paste into the rest of the data to be burned onto the chip?

Like I've said before, I'm kind of new to this in terms of the programming side of things. The BIN export method sounds promising, but I could definitely use some pointers on how to do that, if it's not fairly self-explanatory.

Posted: 2012-07-13 07:21  (Last Edited: 2012-07-13 07:25) Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36735
For BIN export, if you get ca65, and the nsf driver source, there's instructions on how to do most of it in with the driver. The code that it gives is written to build an NSF, but it's not hard to make an NES or PRG instead if you know a little NES 6502 assembly. (basically just replacing your .cfg file, and nsf_wrap.s)

It gets more complicated if you need to do bankswitching, but that's obviously not an option with NROM.

Posted: 2012-07-13 07:54  (Last Edited: 2012-07-13 08:44) Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36737
Oh, I'm looking to keep this as simple as possible. I don't suppose that I'd have any luck with nullsleep's NSF cart instructions? Since those instructions are step by step, and I'm new to assembly, might it be a good way to go?

http://nullsleep.com/treasure/nsf_cart_guide/


EDIT: BTW, I downloaded the latest NSF driver source from the Famitracker.net downloads section. Can't seem to find anything related to ca65 though.

Once again, I'm totally noob status over here with 6502 assembly, so forgive me if anything you're saying is getting lost in translation here.


EDIT 2: Okay, looking at the readme file, ca65 seems to be a type of command in the assembler.



[color=red][i]Moderator: posts merged.[/i]

Posted: 2012-07-13 09:41 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36742
cc65 is a C compiler for 6502 systems, and one of its included tools is the assembler ca65.

[url=http://www.cc65.org/]http://www.cc65.org/

I can write the needed startup code and put together an easy to use guide tomorrow. All you will need to do is make a BIN and run a batch file.

After setting up once, it will be pretty easy to build new ROMs (i.e. just export a new BIN and run a batch file to make the ROM).

Posted: 2012-07-13 10:06 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36743
Hmm... so I did a bit of legwork and found this online utility designed to break a ROM into PRG and CHR data:

http://www.kevinselwyn.com/ReadNES/

It was even able to automatically double the data to fill out the EPROM if you click and choose the "2x" option.

I tried exporting ROM from Famitracker, successfully testing it in an emulator, using the online utility for splitting the ROM, and then burning the 64 kilobyte PRG onto my Eprom.

...and it didn't work.

I totally thought it would, considering it worked just fine as a ROM before the split.

Are there any utilities similar to this that can split ROMs into PRG and CHR and are known to be more reliable?

Posted: 2012-07-13 10:10  (Last Edited: 2012-07-13 10:31) Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36744
(sees your reply) Oh Cool, thanks! That's really awesome of you. I'll definitely have to try that out once you have it all ready to go.

(looks at the crazy number of options in the cc65 download section) Hooboy, this is gonna be a lot more involved than just installing and running the executable and then editing the files within that, isn't it?

My reaction: http://www.youtube.com/watch?v=IUH3JQjcweM

Well, I already soldered up the Eprom cart and bought the chips. I'd say I'm way past "barrier of entry" level at this point.

Posted: 2012-07-13 20:04 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36757
Perhaps the "Clean" PRG format isn't quite as "Clean" as one would presume it to be. Any chance we could bring this up to jsr for bug fixes in the next version of FamiTracker?

If the Eprom size is the issue, perhaps having an option to select for chip size would be good, so that you have the correct high address bit.

Posted: 2012-07-13 21:13 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36759
This might be relevant: [url=http://famitracker.com/forum/posts.php?id=3515]http://famitracker.com/forum/posts.php?id=3515

There was a bug in the NES export, presumably applies to the PRG export as well, since the NES is just PRG with a header and CHR attached.

Anyhow, I'll have a BIN export guide up in a little bit. Writing it now.

Posted: 2012-07-13 22:50 Reply | Quote
rainwarrior

Avatar

Member for: 4150 days
Location: Canada
Status: Offline

#36764
Guide is here: [url=http://famitracker.com/forum/posts.php?id=3681]http://famitracker.com/forum/posts.php?id=3681

Posted: 2012-07-14 00:44 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36771
Sweet deal! I'll be sure to test this out sometime this weekend and let you know how it all went down.

Posted: 2012-07-16 02:50 Reply | Quote
jsr
Administrator

Avatar

Member for: 5924 days
Location: Sweden
Status: Offline

#36820
I can confirm that the NES export bug also appears in the PRG exporter, as it's basically a NES ROM file without the iNES header. So a custom build is necessary in the current version.

_______________________
Programmer and developer
Posted: 2012-07-18 08:56 Reply | Quote
TheSyntaxSinTax

Avatar

Member for: 3825 days
Location: California
Status: Offline

#36875
Bummer. Don't suppose we can get a fix on this in next update or anything?

Page 1 of 2 Sort: Goto Page: [1] [2] Next >>