[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emulator Project Question
- Subject: Re: Emulator Project Question
- From: mjmahon@aol.com (Michael J. Mahon)
- Date: 08 Dec 2001 03:39:56 GMT
- Newsgroups: comp.sys.apple2
- Organization: AOL http://www.aol.com
- References: <GcaQ7.254$td4.142515@news.uswest.net>
- Xref: archiver1.google.com comp.sys.apple2:15446
Steve Mentzer wrote:
>The *vast* majority of CPU time is spent emulating the operation of various
>silicon-based devices. For instance, the video refresh subroutine routinely
>has to perform a screen refresh 30 times per second. At 30fps, in 640x480,
>16 bit color, that is BLT'ing 18MBps to an offscreen framebuffer, which
>DirectX then handles.
>
>Keep in mind that the process of BLT'ing isn't a single CPU instruction.
A much more efficient way to do this is to keep a "backup" copy of the
Apple II video memory that retains what the video memory was the _last_
time that it was BLTed to the frame buffer. Then, when the next 1/30 second
comes around, compare the "live" video memory to the "backup" memory
and only convert and BLT the changed parts (to some convenent resolution).
Finally, either copy the "live" video memory to the "backup" memory, or,
if it is convenient in the structure of the emulator, just swap the pointers.
Typically, this will reduce video update time by a large factor.
-michael
Email: mjmahon@aol.com
Home page: http://members.aol.com/MJMahon/