nopsteam / 6502 Goto Github PK
View Code? Open in Web Editor NEW6502 Emulator
License: The Unlicense
6502 Emulator
License: The Unlicense
We need to add the decimal mode to this emulator.
http://www.6502.org/tutorials/decimal_mode.html
Following the 6502 spec, there is a bug in architecture when indirect
addressing mode is used.
Not sure if this thing affects all the indirect
addressing like indirect, x
and indirect, y
but probably yes.
We need to check if the lo(ADDRESS) is 0xFF and, then, consider a full page return, so:
LDX #$02
STX $3000
LDX #$04
STX $3100
LDX #$03
STX $30FF
JMP ($30FF)
the jump will consider the hi(0x3000) + lo(0x30FF) = 0x0203
NB: WE CAN'T USE EASY6502 TO VALIDATE THIS BECAUSE THEY ARE NOT RESPECTING THIS BEHAVIOUR AS WE CAN SEE IN THE PICTURE:
Valgrind is a too that provides a number of debugging and profiling tools that help you make your programs faster and more correct. The most popular of these tools is called Memcheck. It can detect many memory-related errors like memory leaks that are common in C and C++ programs and that can lead to crashes and unpredictable behaviour.
So, would be nice to have it running on every build of this, right?
How to use it
https://www.cprogramming.com/debugging/valgrind.html
Based on this, we should do exit(1)
on any error.
This lines should be changed:
https://github.com/nopsteam/6502/blob/main/src/disassembler.c#L23
https://github.com/nopsteam/6502/blob/main/src/disassembler.c#L28
https://github.com/nopsteam/6502/blob/main/src/disassembler.c#L35
https://github.com/nopsteam/6502/blob/main/src/bus.c#L67
https://github.com/nopsteam/6502/blob/main/src/bus.c#L72
https://github.com/nopsteam/6502/blob/main/src/bus.c#L79
If possible create some tests for this.
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.