Welcome, Guest. Please Login or Register
To the NESWORLD news page
   
  HomeHelpSearchLoginRegisterAwards  
 
Page Index Toggle Pages: 1
Send Topic Print
Which chips to use for PRG and CHR when burning? (Read 11375 times)
electro
Forum Newbie
*

Offline



NESWORLD KICKS ASS!

Posts: 7

Which chips to use for PRG and CHR when burning?
13. Feb 2008 at 00:15
 
Hi,

Just getting started with programming and NES stuff. I going to try to burn a rom for testing on a real NES.

I'm a little confused about a couple fo things.

If I try to recycle a super mario bros. cart, remove the PRG rom and replace it with a flash eeprom, which flash eeprom would be best for this?

Can I use the 28F256 without any mods to the cart's PCB?

Would I also have to replace the CHR rom chip with a CHR ram chip?
If so which chip should I use for that?

Thanks for any info, it's appreciated.

T
Back to top
« Last Edit: 13. Feb 2008 at 00:20 by electro »  
 
IP Logged
 
albailey
Senior Member
****

Offline



My NES collecting is getting
out of hand

Posts: 496
Ottawa

Re: Which chips to use for PRG and CHR when burnin
Reply #1 - 13. Feb 2008 at 18:34
 
Here's a post I did a long time ago on one of the other forums. Scroll down to the part when I mention NROM.

-------------------

I'll give some general tips for repros in general, and then a detailed description for Recca.

General tips:
Launch the ROM in Nintendulator. There should be a Debug Information window. In that window you should see info telling you things like: Mapper type (Recca is mapper 4 or MMC3), size of PRG (Recca is 128), size of CHR (Recca is 128) and the type of mirroring (Recca is horizontal). If there is extended header information you should also note that as well (supports battery backup, etc..)

Note on mirroring. You do not need to find a donor cart that matches for mirroring, you can switch it. Example: To switch a cart from horizontal mirroring to vertical mirroring, you'll need to desolder the pad on V and solder it to H. (Yes, it's backward. Think of the letter representing the scrolling)
Mirroring does not matter when getting donors for MMC1 and MMC3 since it is done by the software. (ie: you dont switch anything for Recca)

Now that you know which type of donor cart you need, go to this page
http://www.parodius.com/~veilleux/boardtable.txt
This is useful for NROM, CNROM, UNROM donors, but not that great for other types.
Kevtris has a good list of MMC1 details:
http://www.tripoint.org/kevtris/mappers/mmc1/index.html
Recca is MMC3 and you will want a TSROM donor.

So use the boardtable and get an TSROM. Take it apart, de-solder the PRG and CHR chips. Get another one and try again (because if its your first time de-sodering, I guarantee you'll ruin it. desoldering is tough)


Next thing you need to do is get the proper chips to put on it. RECCA has needs 128 KB chips. EPROMs are in Kb (lower case b) si figure that out by multiplying KB by 8 (128*8 = 1024). Order youself a couple 27C010-150 EPROMs or 29F010 Flash.

You then need to strip the header off the ROM, split it into its PRG and CHR segments. I'm sure there are tools or emulators that will do this for you. I just wrote my own. I imagine some people use a hex editor

In theory you can program the CHR onto a chip and the PRG onto a chip and solder those to the board. In reality you can't, there's more to it.

The chips arent always compatable with the donor without re-wiring them. UNROM donors sometimes dont have enough holes in the donor board for a 32 pin chip.
DRK on nesworld made up a nice doc on conversions:
http://www.nesdev.com/NES%20EPROM%20Conversions.txt

One other thing. If you are putting data on a chip, you must fill the chip.
Lets say you are doing an NROM which has 16K PRG, you ae probably putting it on a 27C256 EPROM (or 29F256 flash) which is 32KB in size. You need to double up your binary file before writing it to the chip. You can do this in DOS by using the DOS copy command.
Example concatenate a file called “theFile” twice (essentially doubling its size) and have its destination be “theDestFile”

copy /b theFile + /b theFile /b theDestFile

NROM is the easiest to start with. There's no re-wiring to do.

I highly suggest you make a dev board first using sockets. If you need to re-wire, re-wire the sockets (not the chips you put in the sockets). A dev board allows you to see if you have prepared/programmed the EPROMs correctly.

I'm no expert, I've only ever done simple stuff. My EPROM programmer doesnt work with chips larger than 128 KB.
EPROMS are cheaper than flash. Flash are easier to use (no need to buy a UV eraser). I've never used One-time-programmable chips, but I believe they are the cheapest (and you can only program them once).

I'm sure I'm missing a ton of stuff. Hopefuly this will help but you should definitely check out www.nesdev.com

---------------

Al
Back to top
 
WWW  
IP Logged
 
albailey
Senior Member
****

Offline



My NES collecting is getting
out of hand

Posts: 496
Ottawa

Re: Which chips to use for PRG and CHR when burnin
Reply #2 - 13. Feb 2008 at 18:40
 
Now to actually answer your question.
If you want to test your NROM code on a real Nintendo, here are some steps:

-de-solder both the CHR and PRG chips.
-solder in 28 pin sockets where those chips were.
-plug back in the CHR and PRG chip and test the cart.  SInce you will be unable to close the cart, you can either use a dremel to cut the plastic,  or you can plug the PCB into a game genie.  I'd suggest cutting the plastic.

OK, so now you have a rudimentary NROM test cart.
Refer to my earlier post on how to switch the mirroring to whatever mode you will be doing your development in.

You will need to flash both the CHR and the PRG.  I indicated in my previous post how to use DOS copy to make sure you have made the data large enough to fill the EPROM.

These are 32 KB (32 KiloBytes is 256 Kilobits) EPROMs/FLASH chips which are fine for NROM development.  Be aware that some NROM boards are called NROM-128 (example: Baseball) instead of NROM-256. so you might as well avoid those.

32 KB (28 pin)
•      27C256-150 EPROM Futurlec $1.80 (150ns) http://www.futurlec.com/Memory/27C256-150pr.shtml
•      AT29C256 Flash: Futurlec $4.50 (120 ns) http://www.futurlec.com/Memory/AT29C256pr.shtml
Edit- wow the price went up on some of these.  I think its $6.5o for the flash now.

Then program the FLASH chips and plug them in and try it out.

Al
Back to top
« Last Edit: 13. Feb 2008 at 18:45 by albailey »  
WWW  
IP Logged
 
electro
Forum Newbie
*

Offline



NESWORLD KICKS ASS!

Posts: 7

Re: Which chips to use for PRG and CHR when burnin
Reply #3 - 14. Feb 2008 at 02:39
 
Al,

Thanks for all of this info. I really appreciate this.

I will read it all over thoroughly and then post.

Thank you very much.

T
Back to top
 
 
IP Logged
 
coinheaven
God Member
*****

Offline



I don't trust books; they're
all fact, no heart.

Posts: 500

Re: Which chips to use for PRG and CHR when burnin
Reply #4 - 15. Feb 2008 at 15:55
 
would the power pak work for this?
Back to top
 
 
IP Logged
 
electro
Forum Newbie
*

Offline



NESWORLD KICKS ASS!

Posts: 7

Re: Which chips to use for PRG and CHR when burnin
Reply #5 - 15. Feb 2008 at 19:51
 
I've ordered my Willem USB programmer and a super mario bro's cart.

Trying out HXD hex editor, (also looked at translhexion). I like HXD better for some reason, even though I have no idea how to use it yet.

What I don't yet understand is how to physically extract the PRG portion of the hex code and strip off the iNES header.

I can post the hex code of my compiled rom here, tonight.

Thanks again,
T
Back to top
 
 
IP Logged
 
electro
Forum Newbie
*

Offline



NESWORLD KICKS ASS!

Posts: 7

Re: Which chips to use for PRG and CHR when burnin
Reply #6 - 16. Feb 2008 at 16:07
 
I'm using the hex editor HXD. I was able to identify and strip off the .iNES header (the first 16 Bytes of the hex code) as instructed above.

My rom only had PRG stuff on it, I didn't program any video or graphics. In the header of my assembly code I had .ineschr 0

However, if I did have video stuff in my program I'm wondering how I would identify the CHR code in the hex data?

How do I know where the PRG code ends and where the CHR code begins in the hex data?

Thanks again,
T
Back to top
 
 
IP Logged
 
albailey
Senior Member
****

Offline



My NES collecting is getting
out of hand

Posts: 496
Ottawa

Re: Which chips to use for PRG and CHR when burnin
Reply #7 - 17. Feb 2008 at 00:10
 
coinheaven wrote on 15. Feb 2008 at 15:55:
would the power pak work for this?

If you have written an NROM game, it will definitely work on a power pak exactly the same as on a real cart (for testing purposes).


As for how to strip PRG, etc...  ALl of that info is located in the header.
The header tells you how many 8KB CHR segments there are and how many 16KB segments there are.  I think the CHR segments are stored sequentially first.  So if you header had 1 for CHR and 2 for PRG, you would strip off the first 16 bytes, store the next 8K as CHR, store the next 2x16=32KB of PRG, and ignore the rest (sometimes people store addiitonal junk a tthe end of their roms).

I'm pretty sure the windows software available for copyNES  (www.retrousb.com) ; has some simple utiltity functions built in.  Even if you dont have a copynes I think you can still use the tools if you put your ROM in the ROMS directory for the tool after you install it (and can then invoke split on the rom).

Al


Al

Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print