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

Re: Reject 6502 Cycle Counter?



Bryan Parkoff wrote:
I have read Intel documentation which it explains Performance Counter like time stamp. Apple II Emulator requires to execute 6502 CPU to increment 6502 cycle until 6502 cycle reaches 17030. Then Screen Update checks to see if it is 17030 6502 cycles before screen is updated. If I attempt to program Apple II Emulator by ignoring 6502 cycles, I would expect that 6502 CPU run faster than 1MHz while Performance Counter tells Screen Update to check for millisecond timing (1/60 frames per 1 second). It may be inaccurate speed.
    What do you think?

It depends on what you're trying to achieve.

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).

-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."