[sebhc] Emulator timing
dave04a at dunfield.com
Tue May 25 18:33:11 CDT 2004
>Would it be reasonable to have three modes:
>1. your existing instruction (and clock) throttle
>2. accurate clock interrupts but unthrottled instructions <--(new)
>3. "bat out of H***" mode (nothing throttled)
I'll think about it, however I really don't want to mess with the throttle
system any more right now - you have to understand that almost every "dos
compatible" environment supports the 55ms clock tick, however changing the
interval is an entirely different matter, so to maintain the widest
compatibility, I use only the 55ms tick as my "hard real time indicator"
Everything else is extrapolation done by the emulator, and it's a real
pain in the a** to get it right.
Mode 1 is currently implemented.
Mode 2 is also currently implemented, just set the option XS=0 to tell
the emulator that you do not want any speed throttling - in this case,
the clock interrupts will occur every 1000 instructions, unless you
specify a different inteval with XI= -- this means that all of the
software sees a "reasonable" real-time environment, but on a fast
machine, it may seem to the outside observer to be happening at a rather
quick pace - on my P3/733 I get in the order of 18,000 interrupts/second
- thats right, about 18mips from the virtual 8080 CPU.
Mode 3 can be accomplished with XS=0, and choosing a value for XI=
which gives the desired interrupt rate - on my system, an interval
just under 40,000 instructions per interrupt gives me a fairly nice
500hz tick. - This will take some experimentation. - NOTE that you
cannot boot HDOS 2.0 in this mode due to the software timing loops.
Under pure DOS this is very stable - under winblows or any other
multitasking system, it will drift if you have background activity.
When the throttle is engaged it will automatically self-calibrate
and maintain reasonable accuracy even when system performance drifts.
For reasons of controlling overflow conditions, I set the limit that
you can specify with XS= to 9999 (x1000 = 10mips) If your system is
fast enough, why not just use this value in Mode 1 which allows the
throttle to automatically maintain a 500hz clock - is a 10mip 8080
not fast enough?
If you want to fool around with the interrupt rate - I have just
uploaded a updated improved version of the emulator (same location)
which outputs more debug information when you press Control-HOME.
Most of this will be meangless to anyone but me :-), however the
second line "I:", last entry "F=" gives the actual frequency of
clock interrupts being generated on the virtual machine.
dave04a (at) Dave Dunfield
dunfield (dot) Firmware development services & tools: www.dunfield.com
com Vintage computing equipment collector.
Delivered by the SEBHC Mailing List
More information about the Sebhc