Git Product home page Git Product logo

6502's Introduction

6502

Trying to build a 6502 based computer.

0 Introduction

Why the 6502 and which 6502, a short introduction.

1 Clock

We need a clock, a source of pulses.

Chapter one discusses options for clocks. The hardest way is to build your own oscillator based on a crystal. I would recommend another option: a canned oscillator. This is basically the first option, but then completely done and packaged in a can. Third option, since many have it available: you could also use an Arduino Nano as clock source.

I also went a different route: slow clocks, based on a NE555 or even human button presses.

2 Emulation

The Nano as clock source was not only easy, it also gave me an idea. When the Nano controls the clock, it also knows when to sample the address lines. We then have a spy that can follow each (clock) step.

That appears to work very well, as discussed in the second chapter. Would it even be possible to sample the data lines? Yes! and spoof the data lines? Yes! The Nano now emulates a memory in addition to a clock.

3 EEPROM

The Nano was fun, but this is a hardware project, not a software project. So, we keep the Nano to run the clock and use it to sample the address and data bus for tracing purposes. But we add a real memory. RAM would have advantages (can hold code and data), but I don't know how to fill the RAM with (initial) code. So let's first add EEPROM. With that working, we replace the Nano with a real oscillator.

The third chapter explains how to hook up an EEPROM to the 6502. And as a side project we develop an EEPROM programmer so that the 6502 has some code to work on (and the Nano has some code to spy on).

4 RAM

One could argue that the previous chapter resulted in a real computer: oscillator, CPU, EEPROM with a running program. The problem is that the only (RAM) memory the program used was the (A, X and Y) registers.

In chapter four we add a RAM.

As a side project, we study timing.

5 Memory decoder

We may think we have a full fledged computer -- cpu, clock, rom, ram -- but the truth is that we do not yet have any peripherals. Think GPIO ports, a UART, and maybe even things like a small keyboard or display. For that we need to add memory mapped IO, and for that we need an address decoder.

When adding the RAM next to the ROM we already had a minimalistic address decoder. In chapter five we add a "future proof" one.

6 GPIO

We have a computer without peripherals. In this chapter we investigate options for "General Purpose Input and Output" or GPIO ports. We look back at solutions used in previous chapters, and introduce new ones. One of the candidates is the VIA, or Versatile Interface Adapter that was produced by MOS, the manufacturer of the 6502.

The VIA is a chip that implements two GPIO ports (each with 8 lines), has timers and interrupts.

7 UART

Adding the ACIA ...

8 Monitor

Adding a monitor program to write/read and go ...

Other

Keyboard, 7-segment display, interrupt timer, single step, slow clock.

(end of doc)

6502's People

Contributors

maarten-pennings avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

vbolshakov corum

6502's Issues

ACIA section for 6502

Sir,
My apologies for using the issue section for this, however I could not find any contact info for you on GitHub. Anyway, I really enjoy your 6502 tutorial. I started down this path about 4 months ago after discovering Ben Eaters tutorials. I have hit a wall however in trying to add an ACIA and Monitor program. These are things Ben never got around to in his tutorial. I noticed it looks like you have place holders for this in you own tutorial. Do you anticipate adding these at some point?
Thanks so much.
Jonathan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.