6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 11:07 pm

All times are UTC




Post new topic Reply to topic  [ 146 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
PostPosted: Tue Oct 26, 2021 5:45 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1117
Location: Albuquerque NM USA
I mentioned on Chad’s (sburrow) newbie thread that we more experienced designers should help newbies with a 6502-based EPROM programmer that is cheap, easy to build, and contain no programmable components (not even boot strap EPROM). It is a good way to provide newbie with an EPROM programmer and teach about 6502 hardware/software and components can be reused for other projects. Please provide a link if that already been done and is public domain design. If not, let this be a challenge!
Bill


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 6:36 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
plasmo wrote:
I mentioned on Chad’s (sburrow) newbie thread that we more experienced designers should help newbies with a 6502-based EPROM programmer that is cheap, easy to build, and contain no programmable components (not even boot strap EPROM).

or we could just provide the pre-programmed EPROM to run the programmer.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 6:39 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
(Thanks for the new thread!)


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:16 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
I ask this not to sound snarky, but just curious...

Why would anyone out there consider a ROM these days, especially in a 6502 project?
I have done many 6502 systems now, and have never used or will ever us a ROM.

When I first started, I looked at using a ROM and then ran into the same that most do; expensive programmer, slow access time, fiddly to reprogram in a hurry.

So instead, I used a $1.50 AVR and its inexpensive programmer. I have also used PICs, although the AVR32 series cost the same and are fast enough to actually emulate a ROM in a 6502 system directly.

How I do it is by connecting the AVR in parallel to the SRAM running the 6502. Right away, you now have many options for RAM in sizes from 2K to 512K with speeds as good as 10ns and in DIP packages. At 10ns, you can get a 65C02 smokin' along at over 10MHz with ease.

To "Boot", the AVR simply pulls on the BE / RS line of the 65C02, and then dumps it's contents to the SRAM. After that, it tristates all pins and goes to sleep, allowing the 6502 to run fully from the fast SRAM and allow read/write to the entire 64K of space.

To program my code, I use one of the PC based assemblers (Kowalski is my fav), and then include the binary in the AVR program to be uploaded. Now I can code on the PC, and with a few clicks, see the 6502 running my code. This is also all done in circuit - no pulling a ROM for programming.

SO for a fraction of the cost of the ROM method, you get a MUCH faster system, way more memory options, and instant code and load.

And if all of that isn't reason enough to call now and order your ROMless system, get a lod of this...

Any of the 20MHz AVR's are fast enough to directly emulate ROM in a 1MHz 6502 system. So you can bypass the SRAM altogether and connect one AVR to the 6502. Plug in your Atmel-ICE, and you can program your 6502 system in less steps than a friggin Arduino! Code and load!

So I must ask... why bother with ROM at all, unless doing an OEM rebuild on some vintage gear?

Here is one of my many ROMless projects, this one running directly from the AVR. The programmer shown here allows me to code 6502 assembly on the PC, press one button and then see the code running on the 6502. The other ICs on the board support the AVR further, allowing VGA generation, so this is a complete 6502 SBC that can put out color video with only 4 ICs.



Brad


Attachments:
Minimal 010.jpg
Minimal 010.jpg [ 1.92 MiB | Viewed 5690 times ]


Last edited by Oneironaut on Tue Oct 26, 2021 7:28 pm, edited 2 times in total.
Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:17 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10985
Location: England
You know, that might be a good question for a different thread...


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:30 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
Or if you consider an AVR programmer and its target to be a legitimate ROM as I do, it would fit right into this thread!
Actually, once programmed, the AVR is indeed a ROM, and to build it, one just needs to bend a 6 pin header to fit a breadboard.

BigEd wrote:
You know, that might be a good question for a different thread...


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 7:59 pm 
Offline

Joined: Fri Dec 21, 2018 1:05 am
Posts: 1117
Location: Albuquerque NM USA
GARTHWILSON wrote:
or we could just provide the pre-programmed EPROM to run the programmer.


A 100mmx100mm pc board in a manila envelope weights under 2oz and can be shipped anywhere in USA for 70 cents or Canada for $1.30, or $2.60 to rest of the world. I know, because I’ve done it many times without any problems. JLCPCB built 10 boards for $5 so I have plenty spare PC boards to give away, so it is basically free material and trivial shipping cost. An EPROM is quite a bit more expensive and a pc board is still needed.

Oneironaut wrote:
Why would anyone out there consider a ROM these days, especially in a 6502 project?
I have done many 6502 systems now, and have never used or will ever us a ROM.


I’m with you regarding ROM-less designs, vast majority of my own designs are ROM-less with the help of programmable CPLD; they are smaller and faster but they are more complicated and distract from the study of 6502. Newbies want to see a classical microprocessor design. The proposed EPROM programmer is in fact ROM-less, surely we have the expertises to design a ROM-less (or Arduino-less, or CPLD-less) 6502 SBC?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 8:14 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
plasmo wrote:
GARTHWILSON wrote:
plasmo wrote:
I mentioned on Chad’s (sburrow) newbie thread that we more experienced designers should help newbies with a 6502-based EPROM programmer that is cheap, easy to build, and contain no programmable components (not even boot strap EPROM).

or we could just provide the pre-programmed EPROM to run the programmer.

A 100mmx100mm pc board in a manila envelope weights under 2oz and can be shipped anywhere in USA for 70 cents or Canada for $1.30, or $2.60 to rest of the world. I know, because I’ve done it many times without any problems. JLCPCB built 10 boards for $5 so I have plenty spare PC boards to give away, so it is basically free material and trivial shipping cost. An EPROM is quite a bit more expensive and a pc board is still needed.

Sure; I didn't mean not to provide a board too, but rather that if using an EPROM in it makes it more attractive to the user because he can understand it better, we can supply the EPROM pre-programmed so he doesn't have the chicken-and-egg situation. I don't consider the cost a problem, since he can use the same programmer for lots of projects, and the amount of time he will put into them will dwarf the cost of the EPROM. If the programmer uses a microcontroller instead, that could be provided pre-programmed too, if the user doesn't have a way to program that.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 8:21 pm 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
The "classical" aspect makes sense. This hobby is often a journey to the past more than anything.

I wonder how many 6502 "newbs" started like me, having plenty of 8 Bit "modern" micro-controller experience (Arduino included), but wanted to take a roll down memory lane? When I initially seen all of the 6502 projects, I was turned off by the ROM / ROM Programmer requirement. Even some of the 65C02 SBC's were ending up reliant on an ebay dinosaur to program horrendously slow (150ns) ROMS.

A modern solution using modern components would be great. The $1.50 microcontroller was the only answer I came up with, so I am throwing it into the ring, since most newbs probably have this hardware on their bench.

The other win is to have in-circuit programming. Learning 6502 assembly, I make more revisions per hour than I take breaths. Imagine having to pull a ROM each time!! Forget it! A modern solution for newbs MUST have in circuit programmability and allow assembling / loading from a PC.

Brad

plasmo wrote:
I’m with you regarding ROM-less designs, vast majority of my own designs are ROM-less with the help of programmable CPLD; they are smaller and faster but they are more complicated and distract from the study of 6502. Newbies want to see a classical microprocessor design. The proposed EPROM programmer is in fact ROM-less, surely we have the expertises to design a ROM-less (or Arduino-less, or CPLD-less) 6502 SBC?


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 26, 2021 10:42 pm 
Offline
User avatar

Joined: Tue Jul 17, 2018 9:58 am
Posts: 107
Location: Long Island, NY
I haven't attempted to use an EPROM, but I was using EEPROMs for a bit and it was pretty much trivial to program it with an Arduino. No eBay dinosaurs required.
It felt a bit silly to put a microcontroller in my system that's more powerful than the overall computer, which is why I didn't try a microcontroller to store programs.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 12:30 am 
Offline
User avatar

Joined: Mon May 25, 2015 2:25 pm
Posts: 690
Location: Gillies, Ontario, Canada
I can agree, and when I am trying to keep to era specific parts it does feel "dirty" to toss any kind of modern uC in the mix.

On a humorous note, all this talk got me looking on digikey for the going rate on 32k EEPROM. Perhaps I should buy a few of these?...

https://www.digikey.ca/en/products/detail/microchip-technology/AT28C010-12DM-883/523530

That's only five bucks per kilobyte! How do they make it so cheap??
Doh!

Agumander wrote:
I haven't attempted to use an EPROM, but I was using EEPROMs for a bit and it was pretty much trivial to program it with an Arduino. No eBay dinosaurs required.
It felt a bit silly to put a microcontroller in my system that's more powerful than the overall computer, which is why I didn't try a microcontroller to store programs.


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 2:13 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
With a quick look at Mouser, it looks like EEPROM is still quite a bit slower than EPROM.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 6:00 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
Oneironaut wrote:
Why would anyone out there consider a ROM these days, especially in a 6502 project?

Why not? ROMs are simple to interface to 6502 systems and are programmable by myriad devices. The same can't be said about using a microcontroller. Many require that you purchase the manufacturer's programming rig, so what's the difference between that and buying a standard E(E)PROM burner?

As for the time aspect, I've got bunches of AMD 27C256-55 EPROMs that I can erase en masse, so it's not as though I only have one ROM that I have to erase and reprogram before I can test changes. Due to having a ZIF socket plugged into the ROM socket, I can swap ROMs in under a minute.

With that said, I don't make code changes all that quickly—I scrutinize what I've written so I can catch errors. I've never measured my productivity in terms of revisions per minute. This habit came from years of writing 6502 assembly language on systems that took their time about assembling code. So those ROM changes don't happen that often and when they do, it's once I have a strong feeling things are going to work.

So I see no particular advantage in complicating the design with a microcontroller just to avoid using a ROM. Also, we're talking about newbie usage. Do we really want to require a newbie to rig up circuitry that keeps the MPU in the gate until the microcontroller has programmed the SRAM at the ROM's address? BTW, once programmed with the firmware, that SRAM should be write-protected to avoid little contretemps, such as wild writes, that might corrupt the firmware and crash the machine.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 6:01 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8504
Location: Midwestern USA
GARTHWILSON wrote:
With a quick look at Mouser, it looks like EEPROM is still quite a bit slower than EPROM.

There are some 70ns ones listed at Digi-Key, but they aren't in DIP packages. The AMD ones I have are 55ns and were stable with POC V1.1 running at 12.5 MHz.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Wed Oct 27, 2021 9:35 am 
Offline

Joined: Sun Jul 11, 2021 9:12 am
Posts: 155
BigDumbDinosaur wrote:
So I see no particular advantage in complicating the design with a microcontroller just to avoid using a ROM. Also, we're talking about newbie usage. Do we really want to require a newbie to rig up circuitry that keeps the MPU in the gate until the microcontroller has programmed the SRAM at the ROM's address? BTW, once programmed with the firmware, that SRAM should be write-protected to avoid little contretemps, such as wild writes, that might corrupt the firmware and crash the machine.


FWIW, I’m a newbie and I preload RAM with a microcontroller (Raspberry Pi Pico) with a simple circuit that latches the data and address lines, holds CPU in high Z, then resets the CPU when ready. Takes roughly quarter of a second to populate the RAM.

Once I make code changes, I can upload to the device and have it completely running in about 10 seconds. I don’t have any EPROMs or a burner and no real urge to get any.

Total cost under $10, including all components and the Pico. Maybe I’m not your average newbie, I dunno.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 146 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 39 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: