Three pages so-far and I've written and cancelled 3 posts so-far...
So 3rd time lucky...
plasmo wrote:
In my original post, I wasn't suggesting newbie designing a ROM-less EPROM programmer. It is sufficiently difficult that I was challenging the more experienced designers to come up with a cheap, easy-to-build 6502-based ROMless EPROM programmer. Now, I admit I wasn't clear about what the end product of the challenge looks like. I had in mind a finished, tested design including finished PC board, and have working software all ready to go. I had vision of putting a bare pc board in 1st Class letter mail and ship it cheaply. This way a newcomer can build it as his/her first project and have an useful tool at the same time.
The ROMless boot is the real challenge here. You still need some sort of storage device to hold the run-time code and some sort of "thing" to hold enough code for the 6502 to read that code and start to execute it to give the newbie to ability to program an EPROM.
I've seen desktop PC's used as the storage device, using their parallel port and microcontrollers.
Given the general lack of parallel ports on modern PCs these days then that leaves a microcontroller and so if using a µC, then I'm struggling to see why there is a need for a 6502 at all. You can build up a device uing an Arduino Uno and a pair of 74x595 shift registers that will program popular parallel flash based EPROM devices that can be used in 6502 systems.
A Raspberry Pi could be used too, but then there's the additional issue of setting one up in the first place. It's not hard, but if you're not used to it, then can can sometimes prove a challenge. (Also the 3.3v vs 5v issue too)
So what goes in the 1st class post is an Arduino Uno or compatible, a breadboard, 2 shift registers and some wires. The Arduino can be programmed by the sender or a downloadable ".ino" or .hex file provided to pre-program it.
The code can then take data via its serial line and program the EPROM. You will need software handshake as hardware handshake generally doesn't work on Arduinos although putting the 6502 image inside the Arduino's FLASH to be used to program the device you'll boot the 6502 with is not hard at all - certianly for up to 16KB of target image size. Then subsequently, you design the target 6502 device with a serial port or some other data transfer mechanism - SD/CF, etc. and have it self-program the chip in-situ, just like an Arduino can self program.
The following plans fail the ROMless requirement, but are usable because...
Plan B:
Use a W65C134SXB board.
Develop code for it to allow the user to download the code via it's on-board ROM monitor into it's RAM, use that code to take more code to program into the SST39SF010A Flash device which can subsequently disable the on-board ROM.
A big downside here is the choice of EPROM device - precisely one. It's not a bad choice but PLCC rather than DIL, if that matters.
Plan C: Make a board with the W65C134 CPU and a ZIF Socket for the DIL flash device and as above.
Plan D: Just use the W65C134SXB board and develop your code for that. It has it all.
But the '134 has an on-board ROM. Is that really a problem?
plasmo wrote:
]This is really no different than most of my retro designs. The design homepage contains schematic, gerber photoplot, bill of materials, CPLD equations, software, all information needed to build the particular retro project. If I have spare pc boards, I usually offer to ship it free anywhere in USA. I, in fact, have a
ROM-less EPROM programmer, but unfortunately it is based on Z280, but take a look at the homepage; it has all information needed to build one. That's what I have in mind for a ROMless 6502-based EPROM programmer project.
There is a big difference here: The Z280 has an on-board serial port and is designed to be bootstrapped that way. The 6502 doesn't. So... You will need extra glue on the 6502 side plus some sort of ACIA and address generator (and you may well be very clever here and use the 6502 as that), reset that, feed it bytes, write bytes from e.g. $FF00 through $FFFF and take the 6502 out of reset and off you go. You'll need some sort of CPLD/Microcontroller, etc. to assist you with that....
My ROMless Ruby board has the ATmega hold the 6502 in reset, connect to the top 256 bytes of RAM, write a bootloader into it plus vectors then take the 6502 out of reset and wheeeee...
So without a µC in the target system - It's a great idea, but the 6502 is lacking a little. Keep life easy - make a simple programmer for a few popular flash devices that can be used in a modern 65C02 system (e.g. my Arduino one above), then you can concentrate on the target system... Even Ben Eater said you needed a programmer for his popular 6502 system...
Or make the µC an integral part of the target system. I'm now calling it a co-processor in my Ruby boards and it can do stuff like serial, filing system and floating point arithmetics..
Cheers,
-Gordon