Emulator recommendation

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
Post Reply
spiff
Posts: 4
Joined: 17 Dec 2015

Emulator recommendation

Post by spiff »

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.
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Emulator recommendation

Post by BigEd »

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/
)
User avatar
8BIT
Posts: 1787
Joined: 30 Aug 2002
Location: Sacramento, CA
Contact:

Re: Emulator recommendation

Post by 8BIT »

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/
fastgear
Posts: 141
Joined: 27 Apr 2016
Location: South Africa

Re: Emulator recommendation

Post by fastgear »

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
Post Reply