6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat May 18, 2024 5:54 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sat Apr 26, 2003 1:24 pm 
Offline

Joined: Sat Apr 26, 2003 1:09 pm
Posts: 2
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue Dec 30, 2003 3:54 pm 
Offline

Joined: Tue Dec 30, 2003 10:35 am
Posts: 42
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.


Top
 Profile  
Reply with quote  
PostPosted: Tue Dec 30, 2003 7:00 pm 
Offline
Site Admin
User avatar

Joined: Fri Aug 30, 2002 1:08 am
Posts: 280
Location: Northern California
autoboy wrote:
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

_________________
- Mike Naberezny (mike@naberezny.com) http://6502.org


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 31, 2023 4:33 pm 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 55
Location: Sunny So Cal
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.

_________________
Machine room: http://www.floodgap.com/etc/machines.html


Top
 Profile  
Reply with quote  
PostPosted: Tue Oct 31, 2023 6:59 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10801
Location: England
Sounds like a good development!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 03, 2024 7:02 pm 
Offline

Joined: Wed Jan 03, 2007 3:53 pm
Posts: 55
Location: Sunny So Cal
Forgot to post it to this thread!

Discussion: https://oldvcr.blogspot.com/2024/04/vir ... 6-and.html
Code: https://github.com/classilla/6o6

_________________
Machine room: http://www.floodgap.com/etc/machines.html


Top
 Profile  
Reply with quote  
PostPosted: Tue May 14, 2024 9:55 pm 
Offline

Joined: Tue Feb 07, 2023 12:27 pm
Posts: 21
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.


Attachments:
Symulator_6510.zip [7.24 KiB]
Downloaded 2 times
Top
 Profile  
Reply with quote  
PostPosted: Thu May 16, 2024 7:57 pm 
Offline
User avatar

Joined: Thu Mar 24, 2022 8:52 pm
Posts: 11
gregorio wrote:
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: