airloaf / v6502 Goto Github PK
View Code? Open in Web Editor NEW6502 C++ Library
Home Page: https://airloaf.github.io/V6502
6502 C++ Library
Home Page: https://airloaf.github.io/V6502
ADC and SBC with decimal mode has not been implemented. Decimal mode article
If we look at the op code table we have defined, there are many gaps. These gaps represent unofficial opcodes. While they were not intended to be used as instructions, an actual 6502 cpu can still process it as an instruction.
NESDev Unofficial opcodes This site right here has a list of unofficial opcodes. It even details some NES games which utilize such opcodes. For a true NES emulator these would have to be implemented into the 6502 CPU library.
In order to run programs and ensure correctness of the CPU, a CPU monitor should be implemented.
Requirements:
Currently we are only Instruction accurate since we are not modifying the registers and memory correctly per cycle. NES Dev wiki has a page on the CPU cycle details that should help in making a cycle accurate emulation of the 6502 processor. Cycle Details.
The CPU is very sluggish when running it on VNES. I can imagine it has to do with all the allocations that come into play when creating a new instruction as well as addressing modes. I think the best move will be to move the addressing mode functionality within the instruction class and we should only allocate a single instruction object and re-use it constantly. This should improve the CPU's performance greatly.
On the NesDev wiki, there are many CPU tests which can test the correctness of our CPU. CPU Tests
Requirements:
We currently do not have tests for interrupts (BRK, NMI and IRQ).
We should test for the following scenarios
The 6502 performs some form of pipe lining. The first cycle of each instruction (getting the actual opcode of the instruction) occurs at the last cycle of the previous instruction. This is also why crossing page boundaries on some instructions causes an extra cycle to be thrown. See the cycle information for each instruction here
PDCurses is a OpenCurses implementation for windows. We should look into this for implementing the CPU monitor for windows based platforms.
PDCurses
The name Address Bus should be changed to Memory Bus. According to the datasheet, you write addresses to the address bus and then read the data for that corresponding address in the data bus. Memory Bus is a more suitable name since it both reads and writes into memory.
The current tests for V6502 are difficult to write. They involve writing certain values into memory. We should unit test the instructions individually. In order to do so, we will need to extract each function and have the bare necessaries required to execute each individual instruction.
Doxygen can create some good looking documentation web pages. This should be used when uploading a web format of the API.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.