gianlucag / mos6502 Goto Github PK
View Code? Open in Web Editor NEWA fast & simple MOS 6502 CPU emulator written in C++
License: MIT License
A fast & simple MOS 6502 CPU emulator written in C++
License: MIT License
This causes include loops when used as a part of larger projects
The README suggests the C64 used the 6502, but actually, it used the 6510, is this a 6502 emulation or 6510? It suggests you could make a C64 with this emulation, but if it is a 6502 emulator, it may or may not work.
A real chip, and Mike Chambers' fake6502 as well, read the reset vector low byte first (i.e. $fffc) and then $fffd. But it seems like this emulator does it in reverse order.
I appreciate it's a tiny thing but it's showing as a difference in my test suite
What do we think? Do we care about such tiny differences?
There is reference to the Run method, but it doesn't match the code.
The README says void Run(uint32_t n);
but the code says void Run(int32_t cycles, uint64_t& cycleCount, CycleMethod cycleMethod = CYCLE_COUNT);
.
The stack pointer hardware in the 6502 can only update the stack pointer after the stack access has happened. So, it decrements the stack pointer after pushing a value onto the stack, so that the stack pointer is ready for another push.
But when pulling, this means it has to pull some dummy data (just to update the stack pointer) before pulling the real data.
It looks as though gianlucag/mos6502 does not do this dummy read. While executing a plp
instruction, which is a four-cycle instruction, gianlucag/mos6502 performs only two memory reads:
but the real chip will perform the following four memory reads:
Exactly the same problem affects other instructions that read from the stack: rts
, pla
, and probably also rti
.
Would it be technically possible to use this to access a graphical config menu thats present on a sidkick pico? I use your sidberry to play sids via the sidkick pico and want to tune some stuff thats in the config menu.
The "status" member has uninitialized bits. When I noticed that a static instance of mos6502 would work as expected but one on the stack or heap would show subtle differences in program execution (static data=bss), it pointed me to the bug.
Otherwise, this is a very nice and efficient piece of code. Using it for my second project. I love it!
I've converted your code to Delphi but you're missing a license. Thank you
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.