Close
0%
0%

ABNielsen.com 6502 SBC

Complete 6502 single board computer with 50x29 lines "VGA" output and PS/2 input

Similar projects worth following
Reduce, reuse, recycle. Let's solve the global IC shortage! Instead of making a retrocomputer out of mostly factory new parts still in production this project aims to use as many reused parts as possible. Instead of sending more parts to a landfill when you're done with it, this computer takes landfill parts and puts them to practical use, learning to use a 6502.

It's very easy to get a 6502, 6522, along with 28 pin RAM and ROM from the usual Ebay/Aliexpress sources but since you can't be sure exactly what you get, this project has jumpers for CMOS or NMOS 6502's. It works with either 28 pin or 32 pin ROM, also jumper selectable.

The project uses Ben Eater's easy way of interfacing PS/2 to parallel.

Basic software features include a monitor program and IO commands to read, write and execute code.

Hardware revision 0 is missing a few features but is a complete prototype that makes it ease to write bitbanging SPI or connect a second 6522(and third) via the broken out address/data bus line of 2.54mm header - on r0 I forgot to break out the IO-select signal, so connecting multiple 6522's(or other IO) does require a bodge-wire to ~CS2.

One oddity of the build, I have to admit, is the choice of a PMS171b as a glue logic/V-sync generator. At the time I needed a working prototype and just grabbed the cheapest MCU I could find. I'm planning to replace some of the 74ls161's 4bit counters with 74hc590 8 bit counters - which should free up some board space and require fewer lines with tristate buffers (74hc245's). 

Hardware Memory Map

$0000-3FFF: ZP, Stack and RAM
$2000-27FF: 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-7FFF: Input/output, etc. Onboard 6522 has address $6000.
A second, and third, and fourth 6522 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)

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>

The read command enters monitor starting at the specified address. 

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

The write command writes starting at the specified address and then enters monitor.

Exit monitor by pressing ESC

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

F1-key enters monitor without changing address.

  • 1 × 6502 CPU - either CMOS or NMOS.
  • 1 × 62256 RAM
  • 1 × 6522 VIA
  • 1 × pms171b Padauk OTP MCU (7 cent part, 100$ programmer)
  • 1 × w27c512 Memory ICs / EEPROMs

View all 20 components

  • PCB Annotations added to silkscreen

    Anders Nielsen10/30/2021 at 12:26 0 comments

    I always tend try to get things into production fast. This has a tendency to involve limited redundant information - said another way: I don't add silkscreen information already present on the schematic.

     
    I believe I've reached a point where I know another revision of this board is coming eventually , so I decided to add some silkscreen text - if nothing else, so I don't forget that the broken out data and address busses have LSB on the left when the VGA port is pointing away from you :) 

    Note: The Gerbers.zip hasn't been updated this time - if you are about to send them off to manufacture, maybe replot them from Kicad :) 

  • Video online!

    Anders Nielsen10/30/2021 at 11:55 0 comments

    Yay! I finally pulled myself together and made a short video about my 6502 SBC :)

  • Untested fixes in r1

    Anders Nielsen10/21/2021 at 15:33 0 comments

    The new revision on Github has a few differences to the last tested version. 

    On r0 pin 15 of U20 (Chip enable of the VGA signal) is connected to ground. On r1 it is connected to the inverted reset signal(through a spare inverter on U14) through a pullup resistor. 

    Technically this should make it possible to RC-delay the VGA output signal until the VRAM is cleared by code - instead of having random data in the blanking periods that could damage a real CRT screen. 

    If this was really ~1979 I would definitely implement the VGA blanking periods in hardware.

  • [FANFARE]

    Anders Nielsen10/21/2021 at 08:56 0 comments

    The project files are now on Github!

    This included Kicad board files

    https://github.com/AndersBNielsen/abn6502

  • r0 photos uploaded

    Anders Nielsen10/21/2021 at 07:45 0 comments

    Photos of my SBC have now been uploaded - on r0 traces have been cut and A14 bodged to the RAM OE.

  • Code cleanup complete

    Anders Nielsen10/20/2021 at 13:34 0 comments

    Not that I'm particularly proud of my 6502 assembly, but I just managed to remove enough stub code that it only does the bare minimum - and doesn't have half-written subroutines for things coming in the future. 


    I guess it's ready for github :) 

  • Todo

    Anders Nielsen10/01/2021 at 08:27 0 comments

    Todo:


    Add assembly files to Github

    Add Padauk PMS171b files to Github

    Add BOM to hackaday.io

    Take beautiful photos

    Make functional description

    Make Youtube video

View all 7 project logs

  • 1
    Send gerber files to your favorite board house

    The files are available from /hardware on the Github repo. You can also rebuild the files with Kicad. 

  • 2
    Build the project using assemble.sh

    This will also try to burn the main ROM using Minipro. Dependencies: [CC65] (https://github.com/cc65/cc65), the Padauk IDE (working on replacing the PMS171b with 7400 logic) and a way to burn the ROM's.
    If you don't like the movie reference, you can edit the welcome message in abn6502rom.s :)

  • 3
    Burn the ROMs and PMS171B

    I use a TL866II Plus variant for the actual ROMs and the Padauk official programmer for the PMS171B.

View all 7 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates