All Projects → mre → mos6502

mre / mos6502

Licence: other
MOS 6502 emulator written in Rust

Programming Languages

rust
11053 projects
HTML
75241 projects

Projects that are alternatives of or similar to mos6502

retro-computing
🤓🕹💾 This hobby project contains software implementations of old microprocessors and complete computer systems. I'm very interested in retrocomputing and this is how I learn about the inner workings of these old, classic and amazing computers and game consoles.
Stars: ✭ 15 (-40%)
Mutual labels:  emulator, retrocomputing, 6502
6502-emulator
An Understandable 6502 Emulator
Stars: ✭ 26 (+4%)
Mutual labels:  emulator, cpu, 6502
osnine-java
6809 and OS-9 emulator in Java
Stars: ✭ 17 (-32%)
Mutual labels:  emulator, retrocomputing
disc-elite-beebasm
Fully documented and annotated source code for the disc version of Elite on the BBC Micro
Stars: ✭ 19 (-24%)
Mutual labels:  retrocomputing, 6502
Gearnes
NES / Famicom emulator for iOS, Mac, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 23 (-8%)
Mutual labels:  emulator, 6502
chip8emu
A Terminal Based Chip-8 Emulator
Stars: ✭ 28 (+12%)
Mutual labels:  emulator, retrocomputing
ukncbtl
UKNCBTL is emulator of Elektronika MS 0511 (UKNC), soviet computer based on two PDP-11 compatible processors.
Stars: ✭ 39 (+56%)
Mutual labels:  emulator, retrocomputing
nes-rust
NES emulator in Rust with GUI
Stars: ✭ 78 (+212%)
Mutual labels:  emulator, cpu
apultra
Free open-source compressor for apLib with 5-7% better ratios
Stars: ✭ 84 (+236%)
Mutual labels:  retrocomputing, 6502
vrcpu
Code, documentation, schematics, notes for my Ben Eater inspired breadboard computer and emulator
Stars: ✭ 98 (+292%)
Mutual labels:  emulator, cpu
champ
A 65C02 profiler
Stars: ✭ 17 (-32%)
Mutual labels:  emulator, 6502
Z80
Highly portable Zilog Z80 CPU emulator written in ANSI C
Stars: ✭ 131 (+424%)
Mutual labels:  emulator, cpu
Thistle
6502 based architecture for OpenComputers
Stars: ✭ 26 (+4%)
Mutual labels:  emulator, 6502
js-nes-emulator
NES emulator in javascript.
Stars: ✭ 12 (-52%)
Mutual labels:  emulator, 6502
elite-a-beebasm
Fully documented and annotated source code for Angus Duggan's Elite-A on the BBC Micro
Stars: ✭ 24 (-4%)
Mutual labels:  retrocomputing, 6502
IBMulator
The IBM PS/1 emulator.
Stars: ✭ 62 (+148%)
Mutual labels:  emulator, retrocomputing
Nesicide
Integrated Development Environment for the 8-bit Nintendo Entertainment System
Stars: ✭ 244 (+876%)
Mutual labels:  emulator, 6502
awesome-list
Awesome Lists of retrocomputing resources (6502, Apple 2, Atari, ...)
Stars: ✭ 38 (+52%)
Mutual labels:  retrocomputing, 6502
MC6809
Implementation of the MC6809 CPU in Python (Extracted from https://github.com/jedie/DragonPy project)
Stars: ✭ 24 (-4%)
Mutual labels:  emulator, cpu
go6502
6502 CPU emulator, assembler and disassembler written in Go
Stars: ✭ 31 (+24%)
Mutual labels:  emulator, 6502

mos6502

docs.rs

An emulator for the MOS 6502 CPU written in Rust.
It builds on stable Rust and supports #[no_std] targets.

What is the MOS 6502?

The MOS Technology 6502 (typically pronounced "sixty-five-oh-two" or "six-five-oh-two") is an 8-bit microprocessor that was designed by a small team led by Chuck Peddle for MOS Technology. [...]

When it was introduced in 1975, the 6502 was the least expensive microprocessor on the market by a considerable margin. It initially sold for less than one-sixth the cost of competing designs from larger companies, such as the 6800 or Intel 8080. Its introduction caused rapid decreases in pricing across the entire processor market. Along with the Zilog Z80, it sparked a series of projects that resulted in the home computer revolution of the early 1980s.

Source: Wikipedia

How to use this library

use mos6502::address::Address;
use mos6502::cpu;

fn main() {
    // Calculate the greatest common divisor of 56 and 49
    // using Euclid's algorithm.
    let zero_page_data = [56, 49];

    let program = [
        // (F)irst | (S)econd
        // .algo
        0xa5, 0x00,       // Load from F to A
        // .algo_
        0x38,             // Set carry flag
        0xe5, 0x01,       // Substract S from number in A (from F)
        0xf0, 0x07,       // Jump to .end if diff is zero
        0x30, 0x08,       // Jump to .swap if diff is negative
        0x85, 0x00,       // Load A to F
        0x4c, 0x12, 0x00, // Jump to .algo_
        // .end
        0xa5, 0x00,       // Load from S to A
        0xff,
        // .swap
        0xa6, 0x00,       // load F to X
        0xa4, 0x01,       // load S to Y
        0x86, 0x01,       // Store X to F
        0x84, 0x00,       // Store Y to S
        0x4c, 0x10, 0x00, // Jump to .algo
    ];

    let mut cpu = cpu::CPU::new();

    cpu.memory.set_bytes(Address(0x00), &zero_page_data);
    cpu.memory.set_bytes(Address(0x10), &program);
    cpu.registers.program_counter = Address(0x10);

    cpu.run();

    // The expected GCD is 7
    assert_eq!(7, cpu.registers.accumulator);
}

Credits

This started off as a fork of amw-zero/6502-rs, which seems to be unmaintained at this point.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].