redcode / 6502

Highly portable MOS 6502 CPU emulator written in ANSI C
GNU General Public License v3.0
148 stars 21 forks source link

NMOS HMOS 6502 accuracy #2

Open miniupnp opened 4 years ago

miniupnp commented 4 years ago

ASL, INC and possibly other read/write instructions do two writes on an original 6502. They first write the original value, then the modified one. The CMOS 65C02 behave differently.

That can cause issues when working on memory mapped I/O, such as what is done on the C64.

miniupnp commented 4 years ago

I'm not sure about the Ricoh 2A03/2A07 of the NES

redcode commented 4 years ago

Thanks, I've made several changes on the emulator since last version, I'll upload them to a new branch soon. I'm checking all instructions, memory access and cycles too.

miniupnp commented 4 years ago

regarding the differences between the different 6502 versions, do you plan to add different modes for the emulator ?

redcode commented 4 years ago

regarding the differences between the different 6502 versions, do you plan to add different modes for the emulator ?

Yes, of course. I'm working on my NES emu, and I want to use this core for other machines too. I'll add support for the undocumented opcodes and for other 6502 models.

redcode commented 4 years ago

I've uploaded my most recent code to the branch WIP (it uses the "v0.1" branch of Z). I'll release a new version of this core in January 2020.