Making a EPROM Burner

Discuss hardware-related topics, such as development cartridges, CopyNES, PowerPak, EPROMs, or whatever.

Moderators: B00daW, Moderators

User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote: About dumping the chips... I just committed a patch to my repo for both the computer side and arduino side that allows for the dumping previously it would always go into write mode which would erase the whole chip now it will go into dump/program mode based on which program on the computer you run.
I compiled these on my slackware box and they seem to work fine, but I will probably end up having to do all of this on Windows (My parents don't even know I have linux on a flash drive and they wouldn't be happy if they did because it's not something that they know anything about). Will this program compile in MinGW/msys? I haven't had a chance to try it yet, but I really am looking forward to messing with this once I get the 74hc595 registers. I'm glad that there's a dumping program now!

And to anyone who knows, should I get two 32 pin DIP IC sockets? I am a relatively poor solderer and I would like to know if there's a big risk of hurting the flash chips. I know they are pretty heat-sensitive. I can say that I successfully replaced the LED in my NES with a green one for fun, and that I did the 'extra audio channel support' hack (connect pins 3 and 9 on the expansion port) without any problems, but I am still wary of doing something wrong. What can I do to minimize the time applying the iron to the board (i.e. the best ways to prevent having to fix mistakes)?
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

wyatt8740 wrote:
nintendo8 wrote: About dumping the chips... I just committed a patch to my repo for both the computer side and arduino side that allows for the dumping previously it would always go into write mode which would erase the whole chip now it will go into dump/program mode based on which program on the computer you run.
I compiled these on my slackware box and they seem to work fine, but I will probably end up having to do all of this on Windows (My parents don't even know I have linux on a flash drive and they wouldn't be happy if they did because it's not something that they know anything about). Will this program compile in MinGW/msys? I haven't had a chance to try it yet, but I really am looking forward to messing with this once I get the 74hc595 registers. I'm glad that there's a dumping program now!
Ok It does compile with mingw and it does not have any need for extra libraries than what is included.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote: Note that I used avr-gcc instead of the arduino IDE to compile this if you do not have avr-gcc it can be modified with ease just change int main() to void setup() and add void loop() {} at the bottom of the program and I think it will compile just fine in the arduino IDE.
And here is the part that runs on your computer I have only tested it on linux but I used a cross platform library so it may work on windows
I tried to compile it both with avr-gcc and with the arduino IDE using your directions; both gave me errors. Arduino IDE gave me 'not defined in this scope' (maybe the functions that defined them had to be called inside the setup() loop before they could be used?) and the avr-gcc I am working on and may have an answer to.
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

Could you please post all errors generated by avr-gcc.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote:Could you please post all errors generated by avr-gcc.
Should have used the makefile. D'oh! It's working now :)
Now when my 74hc595's get here I can try it!
Also, I did end up ordering two sst39sf020's. They supposedly have a memory retention twice that of the 29c020's (according to the datasheets).

anyway, the error log was this:
http://pastebin.com/2jfd00zQ
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

Sorry for the double post, but I felt that this deserved a bump rather than an edit.

I compiled the avr and host pc programs successfully, and my stuff from digikey arrived today! I am ready to roll once I wire in the 74hc595s. Is there anything I have to be really careful not to do? e.g. if i wire 'x' up wrong, the flash chip will burst into flames?

Thanks for the help :D
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

wyatt8740 wrote:
nintendo8 wrote:Could you please post all errors generated by avr-gcc.
Should have used the makefile. D'oh! It's working now :)
Glad to hear it make sure you replace 524288 with 262144 in both programs so it works with the smaller capacity flash chips. Also for stuff that you should be real careful to do is not mix up ground and voltage that will kill the chip but don't expect flames just a bad smell in your room. Also for your flash chip there is no A18 that is Not connected. Also don't connect two wires to the same pin.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote:
wyatt8740 wrote:
nintendo8 wrote:Could you please post all errors generated by avr-gcc.
Should have used the makefile. D'oh! It's working now :)
Glad to hear it make sure you replace 524288 with 262144 in both programs so it works with the smaller capacity flash chips. Also for stuff that you should be real careful to do is not mix up ground and voltage that will kill the chip but don't expect flames just a bad smell in your room. Also for your flash chip there is no A18 that is Not connected. Also don't connect two wires to the same pin.
Thanks!

...By the way, how would I upload the output of avr-gcc to the arduino? Would I use avrdude? I just saw something in the makefile that can be invoked with

Code: Select all

make writeflash
.

Is it okay to hit 'reset' on the arduino while a chip is not being written, but is connected? The LED flash would blink the WE# line a few times.
Would I have to change the makefile for an atmega16u2 (Arduino Uno R3)?
*EDIT*
That was stupid. There are two Atmel Chips on the arduino, ATmega16u2 for USB I/O, and ATmega328p for everything else. Sorry!
Last edited by wyatt8740 on Thu Jun 13, 2013 6:17 pm, edited 1 time in total.
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

The arduino uno r3 uses an atmega328p the atmega16u2 acts as a usb to serial converter so in others you would want to change it to atmega328p however I believe I already have it set to that and if fact make writeflash should already be able to program your arduino uno r3 assuming that is is at /dev/ttyACM0 which the makefile is currently set to use if not you will have to change that. Also yes you do use avrdude make sure you have that installed.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote:The arduino uno r3 uses an atmega328p the atmega16u2 acts as a usb to serial converter so in others you would want to change it to atmega328p however I believe I already have it set to that and if fact make writeflash should already be able to program your arduino uno r3 assuming that is is at /dev/ttyACM0 which the makefile is currently set to use if not you will have to change that. Also yes you do use avrdude make sure you have that installed.
Okay! I had to run make as root because I'm too lazy to set up valid permissions to access /dev/ttyACM0 as a non-root user, but it seemed to work! I still have to desolder my Mario 3 ROM chips and add a battery (TKROM conversion) but I think it's going to work! Thanks a million.

I would like to add that the 29c020 chips (which I did NOT try to write) cannot be written the same as the 39sf020 chips. they are pin-compatible for read operations, however, so I will dump those chips anyway.

On the 74hc595 chips, which pin is serial strobe? Is serial strobe 'SER' on this datasheet?
On the same datasheet, is 'RCLK' the storage clock? And is SRCLK what the 'LSB' and 'MSB' lines go to? (I know that LSB is 'least significant bit' and MSB 'most significant', and these are like the endian-ness, is that correct?)
Does pin 12 (OE#) go to OE on the shift register, the sst39sf020, or both?
I'm pretty sure that is correct, but I really am a software guy. I just love hardware, but I'm too tentative to fry anything.
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

OE# only goes to the flash chip. Serial strobe is the clock that is SRCLK this is common with a 3 shift registers (connected together) that goes from pin 10 on the arduino uno to pin 11 on the shift register. RCLK is the storage register think of this as a latch.
I also forgot to mention that Pin 10 on the shift register needs to be plugged in to 5v and pin 13 needs to be plugged into ground in addition to plugging in the vcc and gnd. SER (pin 14) is the actual serial data which I called the LSB middle and MSB. the LSB contains A7:A0 meaning that pins A7 thru A0 are connected to the flash chip and the 8bits come from the parallel output of the shift register. The MSB is pins A17(A18 for F040):A16 those get connected to the pins labled as such on the flash chip.
This datsheet http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf gives a nice brief sentance explaining what each pin does I find it less confusing than the other datasheet
Symbol Pin Description
Q1 1 parallel data output 1
Q2 2 parallel data output 2
Q3 3 parallel data output 3
Q4 4 parallel data output 4
Q5 5 parallel data output 5
Q6 6 parallel data output 6
Q7 7 parallel data output 7
GND 8 ground (0 V)
Q7S 9 serial data output
MR 10 master reset (active LOW)
SHCP 11 shift register clock input
STCP 12 storage register clock input
OE 13 output enable input (active LOW)
DS 14 serial data input
Q0 15 parallel data output 0
VCC 16 supply voltage
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote:SER (pin 14) is the actual serial data which I called the LSB middle and MSB. the LSB contains A7:A0 meaning that pins A7 thru A0 are connected to the flash chip and the 8bits come from the parallel output of the shift register. The MSB is pins A17(A18 for F040):A16 those get connected to the pins labled as such on the flash chip.
This datsheet http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf gives a nice brief sentance explaining what each pin does I find it less confusing than the other datasheet
Thank you for clearing that up; I have decoded paralell->serial shift registers before, but with little understanding of what the register was actually doing.

But does 'A7' go to the LSB's Q7, or Q0? I'm sorry but my knowing that the 6502 and 2A03 take big-endian is making my brain a bit confused, even though I know that the NES CPU is not involved in this process.
nintendo8
Posts: 54
Joined: Tue Jul 10, 2012 1:37 pm

Re: Making a EPROM Burner

Post by nintendo8 »

A7 goes to Q7 on the shift register that is connected to pin 2. A8 goes to Q0 on the shift register that is connected to pin 3 and so on.
So here is the address mapping
A7:A0 Q7:Q0 shift register pin 2
A15:A8 Q7:Q0 shift register pin 3
A7:16 Q1:Q0 shift register pin 4
note that the ':' symbol means anything in range of x and y.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

nintendo8 wrote:A7 goes to Q7 on the shift register that is connected to pin 2. A8 goes to Q0 on the shift register that is connected to pin 3 and so on.
So here is the address mapping
A7:A0 Q7:Q0 shift register pin 2
A15:A8 Q7:Q0 shift register pin 3
A7:16 Q1:Q0 shift register pin 4
note that the ':' symbol means anything in range of x and y.
Okay, I tried this and something's wrong. I am using a SST39SF020. This is the output I get when I try to write the PRG or CHR:

Code: Select all

Byte 255 at address 17553 should be 94

Byte 255 at address 17554 should be 95

Byte 255 at address 17555 should be 67

Byte 255 at address 17556 should be 27

Byte 255 at address 17557 should be 80

Byte 255 at address 17558 should be 82
and so on. It begins with 'byte 255 at address 00001 should be x' though.

Is there a pin connection I need to make to the registers that I haven't made?

*EDIT*
I probably messed up when I forgot to connect the storage register and serial clock to any but the MSB. Trying it now. It seems to be working :D
Thank you so much for being patient with my stupidity.

By the way, whenever I attempt to dump the chips, the program freezes at

Code: Select all

Progress : % 56.531525
I don't know why, but the flashing was apparently successful.
User avatar
wyatt8740
Posts: 79
Joined: Sun Jun 05, 2011 8:03 pm
Location: Fort Wayne, Indiana, USA (NTSC)

Re: Making a EPROM Burner

Post by wyatt8740 »

Does anyone know a good place to go for a visual illustration of how to modify a TSROM board for eeproms/eproms/flash chips? I already have sockets installed and want to modify the tracks on the PCB unless there is an easier way. I only have two sockets, and don't want to order anything else, so I don't want a solution that requires two more.
Post Reply