6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 6:39 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Emulator recommendation
PostPosted: Mon Mar 18, 2019 12:12 pm 
Offline

Joined: Thu Dec 17, 2015 2:52 pm
Posts: 4
I want to run code extracts in an emulator to evaluate code size and execution speed. In addition to being able to execute the code in debug like fashion I also want to know number of clock cycles spent, instruction trace, memory access maps, register state, memory inspector, ...

Is there a tool already available that can do this kind of stuff? Open source is of course a bonus.


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 18, 2019 1:04 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10975
Location: England
If you're comfortable with C - and it's fairly unusual C - you might be happy to start by tweaking and instrumenting Ian Piumarta's lib6502:
http://www.piumarta.com/software/lib6502/

(If you're happy with tweaking JavaScript then JSBeeb by Matt Godbolt (and friends) might be a good starting point:
https://bbc.godbolt.org/
)


Top
 Profile  
Reply with quote  
PostPosted: Mon Mar 18, 2019 3:23 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1746
Location: Sacramento, CA
You can try the Kowalski Simulator.

It has is own assembler and debugging tools. You can view memory and registers, use breakpoints and single step. I have made some corrections to the cycle counting and fixed a few other bugs as well.

My latest release is here:
viewtopic.php?f=8&t=5011&hilit=kowalski#p60014

I have used it to develop several timing critical applications, most recent was the 6502 badge that used a bit banged serial output and the IRQ pin as the serial input. A modified badge was also given to Chuck Peddle which was a date and time clock that also counted the number of days since the 6502 was created, and had several scrolling factoids about the 6502. All was being driven completely with cycle counting for keeping the clock updated. See more about the badge here http://www.sunrise-ev.com/6502.htm

Daryl

_________________
Please visit my website -> https://sbc.rictor.org/


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 09, 2019 4:21 pm 
Offline

Joined: Wed Apr 27, 2016 2:15 pm
Posts: 141
Location: South Africa
Vice is also a nice alternative. When you compile from source with the debug option, you get an extra menu option "debug" which allows you to enable tracing of the main cpu. The trace include a dissasembled trace of the instructions executed, together with the state of all the registers and cycle count on each line.

Vice also have a build in monitor doing thr kind of tasks you described


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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: