Features of my 6502 Single Board Computer, revision 1

*Only 32k ROM and 24k RAM available, 2k of the RAM used for Video RAM. 

Why?

The grand chip shortage quickly went from a small peculiarity to a serious problem for the whole industry. A year ago, some types of products were affected - now it's affecting anything from laptops, to network switches, to robot lawn mowers. Even Arduinos and dev-boards - and especially Raspberry Pi's. 
Meanwhile, mountains of electronics waste is accumulating, because of the shorter and shorter electronics lifecycle. Even though there is some demand for old parts from hobbyists, I speculate most of these old parts are eventually headed for the great landfills. 

Some of the most common parts of the 1970's, 80's and 90's are 7400-series logic IC's, RAMs, ROMs, microprocessors and support IC's from old home computers, gaming consoles and industrial control systems. Many of these devices are recycled and the many IC's refurbished for resale, either with their original part name etched on top or sanded and re-etched with a brand-new-looking laser etching of a similar IC. Of course, many a hacker will already have tubes and tubes of many of these types of components, simply because they're leftover from a long lost project that didn't quite make it - or in my case inside the electronics I refuse to throw away. 

How?

If we can decrease the demand for new parts, and at the same time increase the demand for used parts we might be able to not only make a dent in the IC shortage, but also promote recycling of PCB's that would've otherwise gone straight to the landfills. Simply by nudging the economic feasibility of recycling instead of tossing. 

Of course not only by building this project, but also as a proof of concept for the philosophy of going with what you already have instead of buying the newest and shiniest. 

The 6502 is closing in on it's 50th anniversary in 2025 and it and it's variants are running anything from the Nintendo Entertainment System, the Commodore home computers, the Apple I and II, and millions of embedded devices. Even Futurama's Bender and the Schwarzenegger-skinned T-800 Terminator uses it. 

You might think the 6502 is limited to assembly language or BASIC, and training assembly was indeed on of my motivations, but for daily use as a quick way to interface embedded peripherals the cc65 compiler does a fine job at converting C code to 6502 assembly. 
You might also think programming it is in the realm of fiddling with UV erasable ROMS, but in my case I've got a simple solution setup for single click wireless programming

This makes the project one of the easiest ways to test out a new or old SPI, i2C, parallel or serial device - even if it's based on 1970's tech. 

Said another way, the ABN6502 R1 saves new IC's for those who really need them, it promotes recycling of old PCB's and refurbishment of IC's, it gives new life to the millions of 6502's in the world, and making it is a fun and highly educational journey, available to anyone at low cost. 

Overview Hackaday Prize Competition video (4 minutes)

Complete hardware overview (23 minutes)

The project is designed to be as universal as possible, supporting the widest possible range of IC's. By design it's capable of using ANY 6502 microprocessor, no matter if it was produced in 1975 or 2022. CMOS or NMOS doesn't matter for this board, even though the type is critical for many other 6502 boards. 

Though not tested thoroughly (due to the vast amount of options), with the relatively low speed 2MHz system clock, it shouldn't matter if the 7400 IC's are 74HC, 74AC, 74LS, 74S or even plain old 7400 for some of them - anything you have with the correct number on it should work, though power requirements can get out of hand if most glue logic is vintage 7400. 

Though not a main objective, cost is definitely an added bonus, since refurbished parts cost much less than new ones - and every part you have in your garage already means you don't have to pay out of pocket. 

The PCB itself is designed to be as compact as possible, since it is the least recyclable part of the project, with trace widths that wouldn't have been possible in the 1970's, even though the project still aims to also be appealing to retro-vintage-enthusiasts.  When you're done with it, if you use sockets, the IC's are easily salvageable for the next project this one inspires, or maybe you'll leave in the oscillator as an easily available source of 1,2,4,8 and 16MHz square waves. 

The project also has a certain amount of modularity built in as it is very much possible to get the system running without most of the components. Without video output, the system will run with just a 6502, a ROM, two or three glue IC's and a choice of output register or 6522(or neither) either with an external clock or the on board crystal oscillator circuit.

All files are available on Github with a creative commons license that allows you to make as many PCB's as you want, as long as it's not for profit and you give reasonable credit. 

Hardware Memory Map

$0000-5FFF: ZP, Stack and RAM 

$0800-0FFF: Part of RAM is set aside for video RAM. Not all of it is used on screen but all is reserved. (For blanking etc)

$4000-5FFF: This space is either RAM or IO space - if R26 is shorted (default) it's RAM, if R27 is shorted instead then this is left as empty floating address space that can be used for extra IO, etc.

$6000-7FFF: Input/output, etc. 

Onboard 6522 has address $6000. 

The output only register aka the Control Register has been moved to $7000 (was previously at $5000)

A second, and third, and fourth 6522 VIA(or 6526 VIA, 6532 RIOT etc) can easily be added off board by using A13, A12, and A11 as CS1 and the same !CS2. The other VIA's would be addressable at $5000, $4800 and $4400. 

$8000-FFFF: ROM (including reset, irq and nmi vectors at $FFFA-F). J5 can be shorted if an older 28 pin ROM is used instead of a new 32 pin SST39SF010.

OS Syntax

The OS isn't much for spitting out syntax errors or any help for that matter. 

Current commands are:

read <16 bit address, MSB-first> 

Example: read 8000

The read command monitors the entered address until a key is pressed. 

write <start 16bit address, MSB-first> <data> [<data>..<data>]  

Example: write 2000 deadbeef01020304050607

The write command writes starting at the specified address.

run (Jumps to the address contained in $30 and $31, LSB in $30 (!))


F1-key enters monitor without changing address.

Exit monitor by pressing ESC. Up down arrows and pageup/down keys can be used to navigate. 

F2-key enters the tape save routine (requires #Simple Universal Modem)

F3-key enters the tape load routine (requires #Simple Universal Modem)

F4-key enters BASIC (if BASIC is assembled in - see instructions on Github)

F5-key is a hotkey for "run" 

F8-key jumps to the reset vector

Pause/break-key jumps to the noclear label (reset without clearing RAM/ZP)


If the optional wireless module is installed code can be sent using the code in software_linux using a common nrf24l01+ module on a Raspberry Pi. The OS makes the module listen on the default addresses and automatically installs code when received. The "run" vector is automatically set so userland code can be run by pressing F5. 

More info about the wireless features here in the video below.