MOS 6502 Simulator -

BSD License

MOS 6502 Simulator -

MOS 6502 Simulator is sort of an emulator for a 6502 chip. There's virtually nothing apart from the CPU (minus BCD operations). It also bears no heed to instruction timings.

Whilst (apart from those two things) it successfully simulates the CPU there were a few design flaws, which led me not to continue with it:

- I wrote it in C++.

As the 6502 had no dedicated IO bus, everything was done via memory. I had the idea of having a pure virtual class which provided a generic interface, then as I wrote devices to sit in the memory space, they could just override portions of it, or trap on writes or something.

Whilst writing this, I kept getting the feeling I should have written it in asm instead Especially for manipulating flags and rotates and stuff. (as I could have just rotated AL, for example, rather than the mess I have in the C++ code.

- Sloppy instruction decoding.

I originally set out to decode the instructions properly, but there were lots of exceptions to the system used (esp. if I intended to support the 65C02 for example). This decended into a massive switch statement. I almost considered splitting it up to smaller files, and just #include them in the middle, just to make it more managable.

Also, as they are not in numerical order (grouped according to type, or addressing mode, can't remember atm) it wouldn't compile to a jump table. Does with optimisation on though.

The main thing that prompted me to write this was I found my BBC-B in the loft, and felt a pang of nostalgia for the hours wasted hunched over it in the lowest resolution text mode (IIRC mode 7 to save ram). I had the idea of writing a NES or BBC emulator, however it didn't get that far.

It has a pretty simple image format. The file must be >= 65536 bytes (64k) and that is simply the memory image for the system (16-bit address bus). There is a strange sort of ASCII text display at 0x200, which is ok enough for spewing a string to. As it was just thrown together in the space of 6 hours or so (took a long time to do the switch statement) it's not very thouroughly documented, but hey.

Product's homepage

Download and use it now: MOS 6502 Simulator - free download

Add a review

Tell us your experience with MOS 6502 Simulator -

Related programsOur Recommendations

Tk::ListboxDnD 1.3

The intent is to add Drop and Drag functionality to the Tk::Listbox widget. You can drag items


spell-karamba 0.2

spell-karamba is a desktop applet for SuperKaramba that spells the typed words - letter by


Aymuze Me 1.0

Aymuze Me is an add-on version of www.Aymuze.Me which brings together the popular websites aimed to


wmappl 0.71

wmappl is a simple scrolling application launcher for the WindowMaker dock. It is loosely based off


Java Service Wrapper Community Edition 3.5.26

An Open Source tool that allows Java applications to be executed as UNIX daemons


Games::PMM 0.10

Games::PMM is the base distribution of the Paper Maché Monsters Game.Paper Maché Monsters


Screensavers for Xandros 4.x

Screensavers for Xandros 4.x contains twelve different screensavers you can try out for Xandros.


Beethoven and the Lost Symphony 1.01

Beethoven and the Lost Symphony is a very short but humorous adventure game.The StoryOne morning


JuK 4.6.3

JuKis part of the KDE Multimedia package. JuK packages are distributed with basically all current


Nightingale 1.12.1

Nightingale is an open source graphical software written in C++ around the GTK+ toolkit and forked


Thumbnail of MOS 6502 Simulator -


4 stars

Price: FREE

Publisher/Developer: Richard Whitty

Release Date: Jul 3, 2012

View Program Details

Top Downloadslast week