GithubHelp home page GithubHelp logo

i6502's Introduction

i6502 - A 6502 Emulator

Build Status Go Docs

This is an emulator of the i6502 hardward project I'm doing.

It's written in Golang and comes fully tested.

WebsiteDocumentation

Background

The MOS 6502 Microprocessor has been around sinc 1975 and is used in many popular systems, like the Apple II, Atari 2600, Commodore 64 and the Nintendo Entertainment System (NES).

It features an 8-bit accumulator and ALU, two 8-bit index registers and a 16-bit memory bus, allowing the processor to access up to 64kB of memory.

I/O is mapped to memory, meaning that both RAM, ROM and I/O are addressed over the same 16-bit address bus.

Because of it's simple and elegant design and the plethora of information available about this microprocessor, the 6502 is very useful for learning and hobby projects.

The 65C02 is a updated version of the 6502. It includes some bug fixes and new instructions. The goal is for i6502 to fully support the 65C02 as well.

What's included in the emulator?

  • 6502 Microprocessor, fully tested
  • 16-bit address bus, with attachable memory
  • RAM Memory
  • 6551 Asynchronous Communications Interface Adapter (ACIA)

What's not (yet) included?

  • Proper Golang packaging and documentation
  • 65C02 support
  • Roms
  • I/O (VIA 6522)
  • Batteries

Getting started

Although this package contains everything you need, there is not single 'emulator' program yet. The CPU, address bus and RAM components are all available to you, but documentation is still lacking.

For now, you can checkout the project, and run the tests.

go get github.com/ariejan/i6502
cd $GOPATH/src/github.com/ariejan/i6502
go get -t
go test

License

This project is licensed under the MIT, see LICENSE for full details.

Contributors

Special thanks to the awesome folk at http://forum.6502.org for their support and shared knowledge.

i6502's People

Contributors

ariejan avatar

Stargazers

 avatar juju avatar Klamber avatar Mike McGann avatar William Gill avatar vici avatar Gustavo Andrioli avatar 祝獻的巴基力 avatar Taylor Copeland avatar Victor Marcolino avatar Alexandre Lehmann Holzhey avatar Terence Boldt avatar Jeremiah Johnson avatar Olivier Jan avatar Chino Chang avatar Eric Kieling avatar Matthew Hughes avatar Ernesto Borio avatar Andrew McRae avatar Erik Hollembeak avatar Neo_Chen (BU4AK) avatar Andy Gilbert avatar Zach Welch avatar Brian Holdsworth avatar Michael Ernst avatar  avatar supaket wongkampoo avatar syerram avatar clker li avatar Peter H. Fröhlich avatar Jesse Ward avatar  avatar  avatar Gabriel Aszalos avatar  avatar Mohammed Irfan avatar  avatar Utkan Güngördü avatar Alexander Stensrud avatar Derek Bever avatar rex64 avatar 铁哥 avatar Justin LeFebvre avatar Ryan Phillips avatar Sal Rahman avatar Srinivas Kowtal avatar Andrew Jackman avatar Scott Ferguson avatar Batbold Dashzeveg avatar Florian Schlachter avatar Tim Bart avatar Zach Badgett avatar Jarmo Puttonen avatar Jesse Nelson avatar

Watchers

 avatar  avatar Peter H. Fröhlich avatar James Cloos avatar Ernesto Borio avatar Alexander Straystar avatar

i6502's Issues

Emulate native processor speeds

Allow the processor to emulate running at arbitrary speeds, like 1,2,4, 14 and 20 Mhz, taking into account the number of cycles each instruction costs.

Implement CPU Variants

There are different variants of the 6502:

Original MOS 6502 has some bugs (like ROR and memory address paging), which are currently not present in the emulator. Some old roms may rely on these bugs.

https://en.wikipedia.org/wiki/MOS_Technology_6502#Bugs_and_quirks

6501 is a pin-compatible microprocessor to the Motorola 6800. But due to legal issues support for this chip was soon dropped by MOS. Supporting this processor would a very low priority.

https://en.wikipedia.org/wiki/MOS_Technology_6501#Introducing_the_6501_and_6502

6507 is the same chip as the 6502, but in a different package. Instead of a DIP-40, this chip uses a DIP-28 package. The limited number of pins means that some interrupts and address pins are not available. Thus limiting the 6507 to 8kB of addressable memory. This is the chip used in the Atari 2600.

https://en.wikipedia.org/wiki/MOS_Technology_6507

6508 is based on the the 6502, but with an 8-bit general purpose IO register and 256 bytes of RAM addressable at $0000-00FF and $0100-01FF (zeropage and stack). There are no popular systems using this processor.

https://en.wikipedia.org/wiki/MOS_Technology_6508

6509 featured bank-switching on-chip and was able to address 1MB of memory. Due to this it was difficult to program and never fared well. This processor is used in the Commodore CBM-II.

https://en.wikipedia.org/wiki/MOS_Technology_6509

6510 is an expanded version of the 6502, as it includes an 8-bit general purpose IO register. This is the chip used in the Commodore 64.

https://en.wikipedia.org/wiki/MOS_Technology_6510

Nintendo Entertainment System or NES uses a variant of the 6502 designed by Ricoh named Ricoh 2A07 (PAL) or Ricoh 2A03 (NTSC). The chips are identical except their clock rates. The Ricoh chips have some sound hardware and DMA built-in and have 6502 decimal mode disabled.

https://en.wikipedia.org/wiki/Nintendo_Entertainment_System_technical_specifications

Move Klaus Dormann tests to separate app

i6502 has its own test suite. The Klaus Dormann files are used to verify compatibility and should not be part of the default test suite.

Proposed solution:

  • Keep go test to run all i6502's tests
  • Create a binary that runs the Klaus Dormann tests and add this to travis

This way, the development feedback cycle stays fast, and running Klaus Dormann stays easy.

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.