This project is read-only.
2
Vote

Execution speed can't be adjusted

description

Heathkit sample program #1 (load file samp123a.s19 and DO 0000) runs too fast on the emulator to see what is happening on the emulated 7-segment LED displays. So I edited the .s19 file directly, changing "2F00" to "FFFF" (5.4 times slower) to try and slow it down. (See the attached file.) This change makes no apparent change in the execution speed. It would be nice if the emulator provided a way to make existing programs execute at the same speed as the ET-3400 hardware. It would be OK if it could even get close enough that adjusting in-program timing loops (like the example given above) could be used to fine-tune execution speed. (I am using emulator version 1.0.3 on a Dell XPS 8300 Windows 7 PC, new early 2012.)

file attachments

comments

RogelioP wrote Dec 24, 2014 at 3:49 PM

Second the request on making the emulator execution speed 500 kHz instead of the stock 1 MHz. Trying the sample program with the ticker scrolling message display (samp45a.s19) even after altering the delay loop at address 0024 from $6000 to $FFFF the scroll speed is fast enough to prevent proper reading of the message, there is a noticeable slowdown after changing the loop's upper count limit but not nearly enough.

RupertAvery wrote Jan 7, 2015 at 1:36 AM

Actually the problem isn't that with emulated clock speed, but more to do with cycle emulation. To get an accurate cycle emulation you would have to tell the host CPU to more or less waste cycles during the time that the emulated CPU is executing just one cycle.

Console emulators get away with this by emulating at the necessary frame speed (30/60fps), and running the emulator as fast as possible, then performing an interrupt to update the screen.

Right now this is pretty much what this emulator does as well, so changing the loop value doesn't do much since it executes the loop as fast as possible, instead of actually executing the instruction in the allotted time.

Getting cycle-exact emulation is always a bit of a challenge. I do have an experimental cycle-exact version but I didn't feel it was good enough for release. It is in the source though.

RupertAvery wrote Jan 7, 2015 at 1:53 AM

For the next release I will re-enable the Settings option which should allow you to slow down the emulator. It still won't be cycle-accurate (meaning changing loops won't do much), but at least you can play around with the speed.