Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cyberzhg/swift-6502-core

Emulation of the 6502 CPU
https://github.com/cyberzhg/swift-6502-core

6502-emulation 6502-processor

Last synced: 15 days ago
JSON representation

Emulation of the 6502 CPU

Awesome Lists containing this project

README

        

# CPU6502Core

Emulation of the 6502 CPU.

```swift
import CPU6502Core

var cpu = CPU6502()
var memory = PlainMemory()

memory.setBytes(start: 0x8000, bytes: [0xA9, 0x0A]) // LDA #10
cpu.PC = 0x8000
let actualCycle = try self.cpu.execute(memory, maxCycle: 2)
// `actualCycle` will be 2
// `cpu.PC` will be 0x8002
// `cpu.A` will be 0x0A
```