• Please review our updated Terms and Rules here

Looking for timing accurate, cycle exact 8088 simulator code

datajerk

Experienced Member
Joined
Oct 25, 2012
Messages
57
Hello all,

I am working on a project where I would like to know the exact instruction and cycle count of an 8088 program I have developed. I just need a solid 8088 simular with source that I can modify. I have had great luck with doing the same for the 6502, 8008, 8080, and z80, and I would think the 8088 would have many options, but apparently my Google-fu is weak and I have struck out. An 8086 or similar x86 simulator will not have the correct timing.

Any pointers?

Thanks.

P.S. feel free to email me directly: datajerk@gmail.com

Thanks again.
 
There is currently no such simulator.

I'm in the process of writing one, but it's really hard because the information needed isn't published anywhere, so I'm having to reverse-engineer it from the hardware. There are timings published, but they are the best case timings taking into account only the exection unit (EU). The 8088 and 8086 also have a Bus Interface Unit (BIU) which operates asynchronously, so we need to know exactly when in each instruction the EU makes a request of the BIU.

My work in progress so far is at https://github.com/reenigne/reenigne/blob/master/8088/8088.cpp - that has the infrastructure but not the data (so it's not actually cycle-exact yet). Let me know if you'd like to contribute.

If you just want to time a piece of 8088 code, I have an XT set up with the ability to do this quite easily.
 
There is currently no such simulator.

I've tried both MESS and PCE. They run benchmarks like si6.exe and mips.com and report 10-20% faster than a 4.77 MHz XT. I found another called PicoXT (Windows binary only) that runs si6.exe and mips.com and reports correct 4.77 MHz XT speeds.

My work in progress so far is at https://github.com/reenigne/reenigne/blob/master/8088/8088.cpp - that has the infrastructure but not the data (so it's not actually cycle-exact yet). Let me know if you'd like to contribute.

I'll take a look at it in about 3-4 weeks.

If you just want to time a piece of 8088 code, I have an XT set up with the ability to do this quite easily.

I would really like to know how accurate PicoXT is. Can you run si6.exe and mips.com and send me pictures of the output? Thanks.
 
I would really like to know how accurate PicoXT is. Can you run si6.exe and mips.com and send me pictures of the output? Thanks.

Sure, here you go:

xt_mips.jpg

xt_si6.jpg


I used C&T MIPS and Norton SI 6.0 from Trixter's TOPBENCH site. As you can see, MIPS was calibrated against a real 4.77MHz PC, so all the scores are 1.0. I tried it on PicoXT as well, and although that got 1.0 overall, the detailed scores are not all 1.0, so obviously PicoXT's authors just tuned the overall speed so that either this benchmark or a similar one was correct rather than doing proper cycle-exact emulation.

I couldn't get this version of Norton SI to run on PicoXT, but I didn't try very hard.
 
Thank you very much for testing. I was afraid of that. Looks like I'll be pinging you to benchmark my code on a real 8088 unless I can find one for sale--cheap.

Thanks again.
 
I'm probably underestimating what you really need but I thought bochs was meant to be 100% emulation which is why it was slower than the rest. Not sure if you can restrict it to a speed or really debug the performance/ticks of a specific app though.

The other emulator I've seen that seems to be quite configurable is simh but again I'm not sure that's really what you're looking for either.
 
I'm probably underestimating what you really need

I am doing research for a series of articles about the history, performance, and programmability (in assembly) of various popular 8-bit processors (8008 to 68008). I have created an assembly language benchmark to compare the performance and have optimized it for each processor. The problem is that I do not have all the original platforms to test on. So I have been using cycle accurate simulators to test the code, this also makes my cross-development/optimization process much faster. I have already done this for the 8008, 8080, z80, 6800, and 6502. And, I've got what I need for the 6809. The 8088 and 68008 have been a bit more difficult to find good code for that has the correct timings. I did find a good 68008 Sinclair QL emulator that looks promising. (And yes, I know the 8088 and 68008 are not 8-bit processors, but they had 8-bit data buses, and they were the bridges out of the 8-bit era.)

I will only be comparing performance on a year-by-year basis of the processors available in personal/consumer/single-user systems. E.g. there is no need to compare the 8008 and the 68008. However 6502, z80, 8080 did exist in shipping systems in a specific set of years.

I thought bochs was meant to be 100% emulation which is why it was slower than the rest. Not sure if you can restrict it to a speed or really debug the performance/ticks of a specific app though.

AFAIK, bochs is 386 and up.

The other emulator I've seen that seems to be quite configurable is simh but again I'm not sure that's really what you're looking for either.

AFAIK, Simh does not have 8088 simulation.

Thanks for the suggestions.
 
Back
Top