You're currently on: Catalog » Guides » Programmér en 27C512 (og andre EPROM'er/EEPROM'er) med RURP » Guides » Programming a 27C512 (and other EPROMs/EEPROMs) with the RURP
An EPROM holds the first instructions a retro computer runs, the program in an arcade board or the code in a game cartridge. This guide shows how to put your own data into one with the Relatively Universal ROM Programmer (RURP), Anders Nielsen's open-source Arduino shield. The worked example is a 27C512-type chip, from an empty socket to a verified copy.
ROM means read-only memory: a chip that keeps its contents when the power is off. A computer reads it like any other memory. It puts an address on the address pins (A0-A15 on a 27C512) and gets one byte back on the data pins (D0-D7). The P in EPROM means programmable: you can write it yourself, but only in a programmer and at a higher voltage than the 5 V the chip runs on. In the finished computer the chip is only read.
A 6502 computer is the classic reason to program one. At power-on the CPU fetches its start address from the reset vector at $FFFC-$FFFD, at the very top of the address space, so there has to be ROM there with a valid program. Our 6502 guide explains why, and the 6502 SRAM guide shows how RAM and ROM share the 64 KB address map. The same kind of chip holds the firmware of home computers, arcade boards, synthesizers and industrial equipment from the 1980s and 1990s. Typical jobs are burning your own firmware for a kit such as the 65uino, keeping a backup copy of an old ROM, or replacing one that has failed.
$FFFC-$FFFD
A 27C512 holds 512 kbit, which is 64 KB: 65,536 addresses of 8 bits each. That is exactly one 6502 address space, which is why the part number turns up in so many retro projects.
Programming can only change bits from 1 to 0. To get the 1s back the chip has to be erased, and how it is erased decides what you need on your bench.
The Relatively Universal ROM Programmer is an Arduino shield. Its SMD parts come presoldered: three 74HC573 latches that hold the address, a boost regulator that makes the programming voltage, and transistor switches that put that voltage on the right socket pin under software control. You solder the chip socket and the pin headers yourself. A small trimpot sets the programming voltage; the README gives a range of 12-27 V. Rev 2 and later select 24-, 28- or 32-pin chips with transistors instead of jumpers, and Rev 2.1 added a 200 mA polyfuse in front of the regulator. Rev 2.2 and Rev 2.3, the current version, have a three-position jumper JP4 with an extra position for 2716-type chips.
Firestarter is the open-source software recommended for the RURP. It is written by Henrik Olsson and published under the MIT licence on GitHub. It has two parts: firmware that runs on the Arduino underneath the RURP shield and operates the chip socket, and the firestarter command-line tool on your computer, which sends it commands over the USB cable. You install the tool with pip install firestarter, and the tool then installs the firmware on the Arduino for you (see below).
firestarter
pip install firestarter
To use the RURP with Firestarter you also need:
The RURP README recommends Firestarter if you just want to program ROMs. The commands below are from the current stable release, 3.1.0.
brew install avrdude
sudo apt install avrdude
pip install firestarter firestarter --version
-b leonardo
-b uno328pb
firestarter fw -i -b uno
firestarter fw firestarter hw
The tool and the firmware must share the first two version numbers (3.1 with 3.1). When you upgrade, upgrade the tool first and the firmware second.
Check the orientation twice. Anders notes that the Rev 2.1 fuse is no guarantee: a ROM put in the wrong way round can still be damaged.
firestarter info <chip> prints everything about one chip: size, type, whether it can be erased electrically, its VPP, the pinout, and the jumper setting for each shield revision. It does not use the programmer. Run it for every new chip type.
firestarter info <chip>
Setting the voltage. The shield has one adjustable regulator. Its full output is called VPE. For 28- and 32-pin EPROMs the firmware feeds VPP from it through a drop resistor. You set both with the same trimpot, but measure the rail the chip will get:
firestarter vpp
firestarter vpe
Run the command with the socket empty; it shows the voltage again and again but does not connect it to the socket. Turn the trimpot slowly with a small screwdriver until the reading matches the VPP line from info, then press Ctrl+C. Before every write the firmware measures again. More than 0.5 V too high stops the write; below 95 % of the target gives a warning.
info
For a W27C512 the target is 12 V. Don't overshoot: the data sheet's absolute maximum on OE/VPP and on A9 is 14.5 V. You don't set the 14 V erase voltage separately; for the erase the firmware puts the undropped VPE rail on A9 and OE/VPP for 100 ms.
JP4 routes the programming voltage to pin 1 for chips that need it there. The 27C512 has A15 on pin 1 and shares VPP with /OE on pin 22, so it needs no jumper. The 27C256 and the 2764 have VPP on pin 1, so on Rev 2.2 and 2.3 the jumper goes on the 28-pin pole (toward the socket), and on Rev 2.0 and 2.1 JP4 is closed. The 24-pin pole (toward the board edge) is only for 2716-type chips with VPP on pin 21. It connects socket pin 1 to socket pin 25, so remove it for every 28- and 32-pin chip. Never leave JP4 fitted for a 32-pin chip: the README warns that this will most likely damage the ROM, the programmer or both.
JP5 is a solder jumper on the back, bridged when the board is new. Cut it only for chips with address line A19 on pin 1, such as the 27C080 and M27C801. Firestarter asks you to confirm that JP5 is cut before it writes or erases one of those. Rev 0 and Rev 1 boards use jumpers JP1-JP3 instead; info shows their settings too.
-a
build/abn6507rom.bin
assemble.sh
firestarter write w27c512 build/abn6507rom.bin
firestarter search 27C512 firestarter info W27C512
W27C512
VPP: 12.0v
Can be erased: yes (electrically erasable)
id
0xDA08
firestarter id W27C512 firestarter read W27C512 backup.bin
firestarter write W27C512 build/abn6507rom.bin --verify
Write to W27C512: verified -- the read-back matches.
verify
blank
firestarter verify W27C512 build/abn6507rom.bin firestarter blank W27C512
The same job with a UV 27C512, such as the M27C512: run firestarter blank M27C512 first. A UV chip is never erased by the programmer, so write refuses a chip that is not blank, with a line such as Refusing write to M27C512: not blank at 0x000123, v: 0x4F. Erase it under UV light and try again. info M27C512 shows VPP: 13.0v and Can be erased: no (UV erase only), so set the voltage to 13.0 V before firestarter write M27C512 rom.bin --verify.
firestarter blank M27C512
write
Refusing write to M27C512: not blank at 0x000123, v: 0x4F.
info M27C512
VPP: 13.0v
Can be erased: no (UV erase only)
firestarter write M27C512 rom.bin --verify
Firestarter keeps a list of chips validated on real hardware. In the 27C512 family it includes the W27C512, which passed on two setups (a Leonardo with a Rev 2.0 shield and an Uno with a Rev 2.2 shield), the TMS27C512 and the SST27SF512. The other 27C512 variants are in the database but not yet validated.
Yes, the RURP programs it. firestarter search 27C256 lists 26 database entries from makers such as AMD, Atmel, Intel, Microchip, ST and TI, all on the same 28-pin EPROM protocol as the 27C512. Three things are different:
firestarter search 27C256
firestarter info AM27C256
Can a 27C512 replace a 27C256? Often, but it depends on the board. The pinouts are identical except pin 1. A 27C256 needs its pin 1 (VPP) at the supply voltage when it is read (Microchip data sheet), so boards usually tie that pin to 5 V, and a 27C512 then sees A15 = 1 and answers from its upper half. A common trick is to write the 32 KB image twice into one 64 KB file, so the chip works whichever level pin 1 has:
# macOS, Linux cat rom32k.bin rom32k.bin > rom64k.bin # Windows copy /b rom32k.bin+rom32k.bin rom64k.bin
Check your board's schematic first. If something else drives pin 1, the trick does not apply.
firestarter -p /dev/ttyACM0 fw
fw -i
-b uno
hw
rev_unknown
firestarter config --rev 5
VPP is high: 12.9V > 12.0V
VPP is low: …
Chip ID … does not match expected ID …
-f
Refusing write … not blank at …
firestarter erase W27C512 -b
Byte at … failed to program within 25 pulses
landed, but the read-back did not verify
firestarter verify <chip> <file> --full
blank/contact
address-line
erase
M2732A
Do I need a UV eraser? Only for windowed UV EPROMs such as the M27C512, 27C256, 2764 and 2732. The W27C512 and W27C020, 28C EEPROMs and SST39SF flash are erased in the RURP.
Which Arduino? An Uno, a Leonardo or an Uno-shaped board with an ATmega328PB, for Firestarter. Look at the chip marking to pick the right -b flag.
-b
Does my image have to be exactly the size of the chip? No. write writes the file from address 0 (or from -a), and verify compares as many bytes as the file holds.
Can I back up an old ROM? Yes: firestarter read <chip> backup.bin, then firestarter verify <chip> backup.bin. Set the jumpers and voltage for that chip first, as for a write.
firestarter read <chip> backup.bin
firestarter verify <chip> backup.bin
Does it program 28C64 and 28C256 EEPROMs? Yes, at 5 V with no programming voltage. Firestarter unlocks their software data protection before each write. No 28C part was on the validated list for release 3.1.0, so treat your first one as a test.
What does RURP stand for? Relatively Universal ROM Programmer.
Where can I see it in action? In Anders' video Open $9 ROM Burner just got even better and easier to use!, which installs Firestarter and burns a chip, and in Open Source ROM Burner Just Keeps Getting Better! about Rev 2.1.
The programmer and what you solder onto it:
For the computer the ROM goes into:
Chips from this guide that iMania lists. They are used parts, so check each page for stock:
Next, see how a ROM gets its place in the address map in the address-decoding guide.
Sources. RURP repository and README (jumpers, voltage, safety rules) · Hackaday project log (74HC573 latches, Rev 2.1 fuse) · Firestarter wiki: Install, Shield Revisions, Reading Chips, Writing and Verifying, Pin Maps, and the Firestarter 3.1.0 tool and chip database (search and info output) · Data sheets: Winbond W27C512 (erase and programming voltages, pinout, signature), ST M27C512 (VPP, UV erasure), Microchip 27C256 (pinout, VPP), Winbond W27C020, SST39SF010A/020A/040. Both diagrams were drawn for this guide.
search
We use cookies to provide you with the best possible experience. They also allow us to analyze user behavior in order to constantly improve the website for you.