Page 1 of 1
6510 emulator written in 6510-machine code?
Posted: Sat Apr 26, 2003 1:24 pm
by autoboy
This might sound like a really screwed up question, but does anyone know of a 6510-emulator written in 6510 machine code? I don't wanna write one if it really exists.
If someone feel they need an explanation, here it is:
I need to be able to test automatically generated code (on a c64) before actually letting it lose on the real CPU, to make sure it behaves. (No out of bounds memory access and only execution of permitted opcodes for example).
Anyone?
/Autoboy
Posted: Tue Dec 30, 2003 3:54 pm
by blargg
You can let the CPU do most of the decoding for you, after you do as much decoding as necessary to validate the instruction (and possibly modify it). Once it's validated/modified, copy it to an execution area in RAM which restores the processor state, has a NOP-padded slot for the instruction, then saves processor state again. I've used this in a couple of debugger/monitors on other 8-bit CPUs for their single-step mode and even on the PowerPC processor which is quite a different beast than the 6502.
Re: 6510 emulator written in 6510-machine code?
Posted: Tue Dec 30, 2003 7:00 pm
by Mike Naberezny
This might sound like a really screwed up question, but does anyone know of a 6510-emulator written in 6510 machine code? I don't wanna write one if it really exists.
Check out Cameron Kaiser's KIMplement:
http://www.floodgap.com/retrobits/kim-1/
It looks like he's done what you'd like to do, perhaps he'll share his source code with you.
Regards,
Mike
Re: 6510 emulator written in 6510-machine code?
Posted: Tue Oct 31, 2023 4:33 pm
by 6502inside
This is a really old necropost, but I figured it was worth tacking on: the plan is to opensource 6o6 with the next release ("1.0") of the KIMplement, which will also be opensourced now that I'm satisfied with code quality, years and years later. 6o6 is the "6502-on-6502" virtualizer that it uses.
Re: 6510 emulator written in 6510-machine code?
Posted: Tue Oct 31, 2023 6:59 pm
by BigEd
Sounds like a good development!
Re: 6510 emulator written in 6510-machine code?
Posted: Fri May 03, 2024 7:02 pm
by 6502inside
Re: 6510 emulator written in 6510-machine code?
Posted: Tue May 14, 2024 9:55 pm
by gregorio
There is such a program in Polish (SYMULATOR 6510) and German (6510 Einzelschritt-Simulator) but writen in BASIC.
The Polish version is in the attachment.
The instructions are in the program, if you have any problems, I can translate them.
Re: 6510 emulator written in 6510-machine code?
Posted: Thu May 16, 2024 7:57 pm
by strik
There is such a program in Polish (SYMULATOR 6510) and German (6510 Einzelschritt-Simulator) but writen in BASIC.
The Polish version is in the attachment.
The instructions are in the program, if you have any problems, I can translate them.
That's obviously the "Einzelschrittsimulator" from the book
Das Maschinensprache Buch zum C64 by Lothar Englisch. There is also an
English language version of the book.
The version you offered seems to be the german version, but with instructions in Polish added before the simulator is started.