6502 emulator

Its not 100% complete and there are lots of opcodes that are not handled but this can already “run” 6502 code (there are several test samples in the project itself)

Since its effectively a “byte code interpreter” I though others might find its configuration useful

1 Like

Awesome mate. Really cool.

Reminds me of a Z80 emulator I wrote years ago in Realbasic. I wish I could find the source for it…

I would expect Z80 would be similar in how it could be done

As could many other VM languages like java etc - they just have a lot more complexity because of the concepts they support that early CPU’s didn’t

What what the drive for doing this out of interest @npalardy?

Also, found these two books on my shelf…

I wore out my copy of that Z80 one in years past…

1 Like

I dont even recall what we were talking about here that spurred me to poke around with the 6502

I never owned a machine that had one (or a Z80 either) :slight_smile:

My first was a 6809 based machine and then an 8088 based TI Professional which I used for a VERY long time

How would one use your emulator. What would one need to have/do?

P.S. I still happen to have my Apple II+.

Its a 6502 CPU emulator and only a handful of instructions are implemented so far
Its NOT a computer simulator - yet

If you’re expecting an Apple II emulator I have a long way to go :slight_smile:

1 Like

I’d be really interested to see how far you can get with this mate.

Have you considered trying to get a simple system emulator up and running? There’s a bunch of documentation out there on the NES for example which was based around the 6502. Much simpler than the Apple II from an architecture point of view I think.

I probably should finish up the CPU emulation before moving on to the rest of a system :slight_smile:

1 Like

guess I’m missing something here… emulating a processor (6502, Z80 whatever) is one thing, but what good is it (even as a mind exercise) if there is no “hardware” to emulate as well. Every computer that used any processor needed at least one input device (keyboard?) and at least one output device (monitor?)… and each one of them had their own unique drivers. So a CPU emulator can execute instructions and bit twiddle “registers”, but without an OS to run on the emulator… what have you?

A work in progress ?

What I meant… was what would a working project entail?
I had thought about a z80 emulator, that would should all the registers on the screen, a way to enter some kind of either hex code or assembly “program”… with specific “addresses” that would fake i/o

Ideally it could be a working Apple II emulator etc
Or at least enough of the core of the 6502 that making an emulator for other systems would be possible

6502’s are still commercially available and used so … who knows
Maybe if this works well enough a paying emulator ?

Neat! In high school a friend and I wrote a version of the old arcade came Gauntlet on a C64 using 6502 assembler. It had a centered sprite and the joystick would move the map auto stopping on sprite collisions with wall. It was soooo fast we had to add loops to slow it down.