[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reject 6502 Cycle Counter?



Bryan Parkoff wrote:
Michael,

If you want to update the screen every 1/60 second of _emulated_
time, then use the cycle counter as you describe.

If you want to update the screen every 1/60 second of _real time_,
then use a timer (or a VBL notification if refreshing at 60Hz).


Do you think that both options above have the same speed? I think that real time is very accurate than emulated time.

They are different and cannot be compared.

You don't measure emulated time to keep real time, just
as you don't measure real time to keep emulated time.

Emulated time is kept as accurately as the emulation is
faithful to the real machine, and has no relationship to
real time except approximate proportionality.

1/60th second of emulated time might be ten seconds of
real time (on a slow emulator) or 100 microseconds on a
_very_ fast emulator.  But it would always correspond to
1/60th second of _emulated_ time.

Real time is measured by counting calibrated clock pulses
on a real machine, and so is as accurate a measure of real
time as the machine's timer algorithms allow.

-michael

Music synthesis for 8-bit Apple II's!
Home page:  http://members.aol.com/MJMahon/

"The wastebasket is our most important design
tool--and it is seriously underused."