Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/theloni-monk/ya6502e
Yet Another 6502 Emulator: An emulator for the iconic MOS 6502 CPU written in c++
https://github.com/theloni-monk/ya6502e
6502 6502-processor assembly assembly-6502 cpp emulator
Last synced: about 10 hours ago
JSON representation
Yet Another 6502 Emulator: An emulator for the iconic MOS 6502 CPU written in c++
- Host: GitHub
- URL: https://github.com/theloni-monk/ya6502e
- Owner: theloni-monk
- Created: 2020-04-19T05:02:04.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T07:45:23.000Z (over 4 years ago)
- Last Synced: 2024-11-13T23:42:51.432Z (2 months ago)
- Topics: 6502, 6502-processor, assembly, assembly-6502, cpp, emulator
- Language: C++
- Homepage:
- Size: 12.6 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Yet Another 6052 Emulator
There are many like it but this one is mine. Written by Theo Cooper
## Architechture
The ```CPU_6502``` class extends the ```MemoryInterface``` class which is a wrapper for any device/object that accesses the virtual memory bus.
The virtual memory bus is implemented in the ```MemoryMapper``` class which at its most base form is essentially a pointer to a 64k byte array.
The fetch cycle of the CPU entails decoding the opcode and using the information of the addressing mode to construct the parameters that will be passed to the instruction. The instructions are written as lamda functions in Operations.cpp which are then put into an array which is used to map the instructions to the actual function pointers. The program counter is then incremented and the instruction run.
The overall architecture of the system was built with flexibility and modularity in mind. It isn't strictly necessary to develop such a complex system by which the CPU accesses its memory. But by routing everything through a memory map and by constructing a special runtime enviorment class to house of of the necessary components for a larger system, the overall implementation becomes very modular.
It would be a logical next step in this project to leverage its modularity to program an emulator for an NES, which runs on a 6502 cpu.