User Tools

Site Tools


6502 Computer

I started with a Ben Eater kit. Here are my variations.

My custom Monitor with MSBASIC and FAT32 SD card support: Source Code:

Video Card

Currently using an ESP32 as a video card using FabGL. I discovered after going down this path that IRQ's can't be processed faster then 200khz. This does hinder performance as there are delays in the echo code. I will probably replace with a RPI Pico in the near future.

It is wired through a 6522 VIA. I couldn't get the Control Lines to work with the ESP so the 8 data lines are OR'ed to trigger the IRQ on the ESP.

Source Code:


I have 28k available for use rather than the 16k in Ben's Design. To accomplish this I added a single MC14082B dual 4-input AND gate. Instead of tying A14 to the NAND gate with the Inverted A15 signal I AND A14,A13,A12,and A11 and then that goes into the NAND Gate and output to the CS of the 6522. A10 goes to the first VIA giving address of 7C00 and A9 to the second VIA with address of 7A. I also tie the output of the AND to the OE of RAM. With this I am able to use addresses 0000-6FFF for RAM and have the ability to add 5 more I/O devices.

SD Card Storage

I Added a second VIA addressed at 7A00 and have a microsd card SPI adapter plugged in there. I modified gfoot's source to compile with ca65 and work with my BIOS\Monitor and MSBASIC. I am able to list files with my monitor in root and nested directories. I am able to load them into memory, display as ASCII or HEX, or execute.


It is a custom monitor from scratch that I later incorporated other peoples sdcard code, memtest and MSBASIC. It is a really simple monitor that all command are 1 character long but they have varying arguments.

  • B - Launches MS BASIC 2
  • C - Clears the screen
  • D - Displays ASCII text starting at 0600 until null character is found.
  • F - File listing. Will take optional argument of subdirector(ies). Example: F TEST\TEST
  • H - Hex dump a page from memory. Requires one argument of the page in HEX. Example: H FF
  • L - Load file from sdcard to memory starting at address 0600. Can be filename in root or path to nested file. Example: L TEST\TEST\TEST.TXT
  • M - Run memory test
  • R - Runs a program in memory starting at specified address. It can be one loaded with L or manually entered with S. Example: R 0600
  • S - Store hex values to memory. Takes varying arguments. First is the start address and the rest is 8 bit values in hex. You can enter as many values as will fit in the 256 byte input buffer. Example: S 0600 48 65 6C 6C 6F 20 57 6F 72 6C 64 21


It is based on this code:

I modified the code to handle backspaces for editing. I also added some commands to call my BIOS and also to load files from an SD card.

Added tokens:

  • CLS - Clears the screen.
  • LOAD - Loads a file from SD card with the path to file.
  • BGCOLOR - sets the background color to the 2 Digit ANSI color (40-49).
  • FGCOLOR - sets the foreground color to the 2 Digit ANSI color (30-39).
  • LOCATE - move cursor to location on screen, Line and Column separated by a comma.
  • SETTEXT - sets the text features. It is a sum of the values you would like:
  1. 15 BOLD
  2. 8 Italic
  3. 4 Underlined
  4. 2 Blink
  5. 1 Inverted


I started with Ben's keyboard interface and technically I still have it there but I found it would work sometimes and not others. I read that temperature and humidity will effect and RC circuit. I'm not sure if this is true but I will redesign this interface with a 4 bit counter and some checking. For now I have an arduino plugged in to read and send the scan codes to the 6522.

6502_computer.txt · Last modified: 2024/06/11 19:55 by austin