GithubHelp home page GithubHelp logo

olivierjan / 6502-sbc-using-teensy Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 1.0 230 KB

Simple home made 6502 computer using a Teensy 3.6 to emulate part of the hardware

License: MIT License

C++ 11.65% C 88.35%
6502 65c02 sbcomputers teensy teensy36 teensy-board 6551 6850 emulation

6502-sbc-using-teensy's Introduction

SBC (for Teensy 3.6)

This codes uses a Teensy to emulate hardware of a 65C02 based computer apart from CPU itself. The following parts can be emulated :

  • Clock (mandatory)
  • RAM
  • ROM
  • ACIA (6850 or 6551)

Configuration

Global configuration

Edit SBC.h and #define which part are to be emulated by commenting out the unwanted ones:

#define ACIA6551
#define ACIA6850
#define ROMEMU
#define RAMEMU

Notes

  1. Only one ACIA can be defined at a time, the other must be commented out.
  2. Make sure to provide real values for RAMSIZE, ACIADRESS and ROMADRRESS even if they are not emulated.
  3. If you emulate a component, make sure a real IC is not actually connected, as both Teensy and the IC will put data on the bus at the same time !

ROM configuration

If you emulate a ROM, provide it as a C Array in a file called rom.h. Three ROMs are provided here:

  1. OSI Basic ROM (rom.h.OSI)
  • Uses a 6850.
  • RAMSIZE(max): 0xA000
  • ACIADDRESS: 0xA000
  • ROMADDRESS: 0xC000
  1. ROM with Monitor and ehBasic (rom.h.6551/rom.h.6850)
  • Uses a 6850 or 6551 depending on the file you include.
  • RAMSIZE(max): 0xA000
  • ACIADDRESS: 0xA000
  • ROMADDRESS: 0xB000
  1. Java6502 (rom.h) My own ROM using Microsoft Basic 2
  • RAMSIZE(max): 0xC000
  • ACIADDRESS: 0xC100
  • ROMADDRESS: 0xD000

You can replace with your own ROM, using srec_cat to generate the C Array. See my ROM Software repo for more details.

The code is very basic but is meant to help debug a hombrew computer. It can be greatly optimised and I will try to add new features over time (usable debugging, support for VIAs and other components, etc...).

WARNING: Teensy 3.6 is only 3.3v and will provide power to the whole circuit. A 5V version should be possible using Teensy 3.5 but I can't get this to work on Teensy 3.5 at the moment.

PCB Board

A PCB to host the Teensy and the 65C02 is provided, I designed it using EasyEDA and ordered it from JLCPCB. I provided the design here in Altium and Gerber format, but haven't tested these, only the EasyEDA.

The PCB can be plugged in an existing circuit, and you can choose to power the circuit from Teensy or not using the jumper.

Any comments welcome !

Written with StackEdit.

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.