This document contains instructions for using an 8 bit EPROM programmer to program 16 bit EPROMs. I program EPROMs specifically for the Amiga but the the instructions should work for all 16 bit EPROM applications, particularly other systems that use the Motorola 68000 CPU (e.g. Atari ST, Sega Megadrive).
This is for people who already own an 8 bit programmer and wish to program 16 bit roms. If you do not own an EPROM programmer and are looking to buy one I highly recommend buying a 16 bit programmer to begin with.
I do not guarantee the accuracy of information in this document however it is accurate as far as I am aware. This project involves making an electronic circuit and a certain amount of skill is required to complete it. I take no responsibility if you build it and you break EPROMs, your EPROM programmer, your old retro machine, or anything else. I do not condone piracy of ROMs, please only program ROMs that you have a license for. Do not contact me for a copy of any ROM images. Amiga Kickstart images can be purchased legally in Amiga Forever Plus Edition.
This document is Copyright (c) Gary Lindsay, 2018, and is released as public domain. It may be distributed far and wide provided it is distributed in its entireity including this message. I wrote this out of the goodness in my heart for the benefit of the retro computing community (in particular the Amiga community) but I did not write it so other people can make money from it so please do not charge money for distribution and please do not include in a publication you sell for profit without asking first. If you improve the design and release it to the public (e.g. by designing a PCB) please send me a copy and I can incorporate it. I can be contacted at facebook.com/gazzmaniac.
Some prior experience doing electronics projects and knowing how to solder is highly beneficial. If you wish to make a permanent solution you need to solder a circuit on a prototype board (or homemade PCB). A basic understanding of the workings of computers is also beneficial but not mandatory, as is a knowledge of some basic mathematics. While some background reading is provided a certain level of technical knowledge of electronics and computers is assumed. It is not complicated but it is not suitable as a first project either.
While the instructions in this document should work for any 8 bit programmer, they are specifically written for the Genius G540 programmer from Shenzhen Stager Electronic Co. Ltd., http://www.stg51.com/english/productshow.asp?id=6. It was a cheap 8 bit programmer bought from eBay a few years ago and is a really good piece of kit for the price, provided you aren't worried about grammatically correct documentation ;-). Note that if you want to install the driver on recent versions of MS Windows you must temporarily allow unsigned drivers during installation. I suggest running the programmer on an XP box if you still have one.
Words in italics are words that are being defined.
Finally, I have written this document using old HTML, with the logic being that it should be readable on an Amiga using a suitable browser (and TCP stack if reading from the internet). All images are GIF files for the same reason (although there are jpeg copies of the photos). It's an uncomplicated document and doesn't need things like CSS. We're into retro computing so why not internet like they used to in 1995?
1Some sort of plug to connect the adapter to the programmer is required. My one uses slightly modified header pins, extending below the PCB rather than above it, connected to a little board below the adapter board which in turn had another set of header pins. I suggest getting pins as long as you can find; I used 20 mm pins but they are a bit too short. There is a photograph in the construction section.
2Pull-up resistors, suggested value between 10 K ohm to 20 K ohm (close enough is good enough, but too low and they will use too much power and too high and they won't work). They do not all have to be the same value, just use whatever is at hand.
3An actual 8PDT switch is not strictly necessary. My adapter uses jumpers that the user changes each time. You could also use DIP switches, jumper wires, whatever is at hand.
4It is highly recommended that each type of line (control lines, data lines, address lines) use the same colour wire, and that the GND line is black, the VCC line is red, and the VPP line is yellow. I used cut-up CAT5 network cable for all lines except the power lines using blue for address lines A0-A8, white-blue for A9-18, green for data lines O0-O7, white-green for O8-O15, and brown for the control lines.
Schematics can be viewed as a GIF or as PDF. The circuit is fairly simple. Consider P1 as if it were a 27C040. The address lines are connected like-for-like, i.e. A0-A0, A1-A1, etc, as are the control lines CE and OE, and the power lines VCC, VPP, & GND. The data lines O0-O7 from P1 are connected to the centre of each pole of the switch (or into the central jumper), with the high byte of U1 (O0-O7) being connected to one side and the low/offset byte (O8-O15) to the other side. A table is provided below:
|P1 Pin/Line||U1 Line/Pin||P1 Pin/Line||U1 Line/Pin||P1 Pin/Line||U1 Line/Pin||P1 Pin/Line||U1 Line/Pin|
|Power & Control Lines|
|P1 Pin/Line||S1 Pole (Centre)||S1 Pole (Hi/Even)||U1 Line/Pin||S1 Pole (Lo/Odd)||U1 Line/Pin|
|O0/13||00 Centre||00 Hi||14/O0||00 Lo||15/O8|
|O1/14||01 Centre||01 Hi||16/O1||01 Lo||17/O9|
|O2/15||02 Centre||02 Hi||18/O2||02 Lo||19/O10|
|O3/17||03 Centre||03 Hi||20/O3||03 Lo||21/O11|
|O4/18||04 Centre||04 Hi||23/O4||04 Lo||24/O12|
|O5/19||05 Centre||05 Hi||25/O5||05 Lo||26/O13|
|O6/20||06 Centre||06 Hi||27/O6||06 Lo||28/O14|
|O7/21||07 Centre||07 Hi||29/O7||07 Lo||30/O15A-1|
Construction is fairly straightforward. Put the IC socket (U1) on one side of the prototype board and whatever you're using as P1 on the other side. Take care with geometry of the board that the edge of the board doesn't cover the programmer's ZIF socket otherwise it makes it difficult (not impossible) to use. Then install S1; I used three rows of eight header pins above P1.
Next install a resistor between A18 and GND (pins 1 and 12 on U1) flush to the board. Now use wires and solder bridge to connect the various address, power, and control lines between P1 and U1, and between P1, S1, and U1 for the data lines. That's it!
Click through the GIF file to see a better quality JPEG.
To use the adapter we need to burn the hi (even) byte to data lines 0 to 7 and the lo (odd/offset) byte to data lines 8 to 15 in two separate operations. In order to do this we need image files of the hi and lo bytes separately.
There are two steps here. If we are using the 27C800 and want a dual kickstart first we need to concatenate the two ROM images. In this case we want to use Kickstart 1.3 in the first half of the EPROM and Kickstart 3.1 in the second half. It is really easy to do on the Windows/MSDos command line:
copy /b kick13.rom+3.1a500.rom 13_31.rom
On a Linux box use:
cat kick13.rom 3.1a500.rom > 13_31.rom
If the Kickstart 1.3 image is only 256 kb you need to copy it twice:
copy /b kick13.rom+kick13.rom+3.1a500.rom 13_31.rom
Now we have to split the ROM image into hi and lo bytes and make sure we byteswap to account for the M68000's big-endianness. I have written a little Python script that does this:
python splitter.py 13_31.rom
There should now be two files called 13_31.rom0.bin and 13_31.rom1.bin corresponding to the hi byte and lo byte respectively.
A little note. The Diagrom image comes pre-byteswapped so be aware that the two images created by the splitter script will be named incorrectly. Same is true if you are making a ROM for a little-endian system. If you are maintaining Amigas I highly recommend making a Diagrom for your system. The Diagrom can boot when Kickstart can't and can tell you exactly what is wrong with your machine.
Plug the programmer into the computer without the adapter and start the EPROM programming software. Choose device 27C040 but make sure the voltages are correct - in my version of the G540 software VCC is 3 volts not 5 for some vendors' 27C040. It's bizzare but that's what you get when you buy a cheap programmer.
Load the file for the hi byte (13_31.rom0.bin) into the software's data buffer. If you are programming a single kickstart onto a 27C400 make sure you select to fill the blank area with FF (all 1s - so that the second pass does not actually program anything - you could also just concatenate the ROM image onto itself if you wanted). Scroll down to addresss 0x040000. If you are programming the dual kickstart make sure byte 1 (NOT byte 0) from the ROM image should be at address 0x040000. - this is the first address when A18 is high). If you are programming the 27C400 ALL bytes after address 0x040000 should be FF.>
Now put the blank EPROM into the adapter. If you are burning a 27C400 make sure that pin 1 on the IC goes into the place for pin 2 on U1 (leave U1 pins 1 and 42 empty). Set S1 to program the hi byte (data lines 0-7). Put the adapter into the programmer and program the EPROM as normal. If programming a 27C400 the verification should fail at address 0x040000 (exactly half way) because there will be data where the software is expecting FF's; don't worry, this is normal (if it does not fail at exactly half way there may be a problem).
When the hi byte is done change S1 to the lo byte (data lines 8-16) and repeat the process using lo byte file. If everything has gone well you should be able to put the EPROM into your computer and it will boot. It probably won't break your computer if you make a mistake, and I can personally confirm that burning the lo and hi bytes the wrong way around will not break an Amiga 500.
If you wish to manually verify the two images you can read the image back and use the fc command from the Windows command line to compare it to the source image, e.g.:
fc 13_31.rom0.bin 13_31.rom0_read.bin
That's the end, I hope this has been useful.