[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The Perfect Emulator?
Sheldon Simms replied:
>On Mon, 29 Sep 2003 20:24:29 +0000, Michael J. Mahon wrote:
>
>> Bryan Parkoff asked:
>>
>>> Do you think that you will be able to program Apple II Emulator into
>>>perfection with accuracy?
>>
>> Accuracy of emulation is relative to the objectives of the emulator.
>>
>> Most Apple II emulators have the objective of running most Apple II
>> software unchanged, so that it appears to be running on a real Apple.
>> They generally achieve this objective well.
>
>More to the point, timing at sub-instruction granularity is generally
>not visible to software, so there's not much point implementing it.
That was my point. ;-)
>> One of the very few examples of a program which would require this
>> detailed accuracy for correct appearance is a program which uses
>> software to synchronize with the video refresh in order to perform
>> synchronous video mode switches. Although there are a few demo
>> programs that use this technique, to my knowledge it has never been
>> used in commercially-released software.
>>
>> Therefore, providing support for this level of cycle-counting accuracy
>> would reduce emulator performance for very little practical gain.
>
>Many emulators accurately emulate the video refresh without counting
>every CPU cycle. My emulator does this by clocking through the appropriate
>number of 14Mhz video cycles after every instruction. I have written
>some test software that uses refresh-synchronized video mode switching
>to display various patterns on a real IIe, and it works on my emulator
>as well.
This is interesting. So you accurately model the extra two 14MHz
cycles at the end of each line (the "stretched" cycle)? You must
employ some optimizations so as not to have to re-scan the "screen"
on each refresh--or maybe your objective was extreme accuracy, not
speed.
Please say more!
-michael
Check out amazing quality sound for 8-bit Apples on my
Home page: http://members.aol.com/MJMahon/