Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/cyberzhg/swift-6502-core
- Owner: CyberZHG
- Created: 2021-01-01T07:29:11.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-27T08:12:30.000Z (almost 3 years ago)
- Last Synced: 2024-10-07T04:41:18.482Z (about 1 month ago)
- Topics: 6502-emulation, 6502-processor
- Language: Swift
- Homepage:
- Size: 147 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CPU6502Core
Emulation of the 6502 CPU.
```swift
import CPU6502Corevar 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
```