[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 64/65 Cycle Rule?
- Subject: Re: 64/65 Cycle Rule?
- From: Sheldon Simms <sheldonsimms@yahoo.com>
- Date: Sun, 24 Aug 2003 00:13:23 -0400
- Newsgroups: comp.sys.apple2
- Organization: Posted via Supernews, http://www.supernews.com
- References: <7tCdnXV31LzuhNWiRTvUrg@texas.net>
- User-agent: Pan/0.14.0.90 (Face-down once more on the greasy boardwalk of love)
- Xref: archiver1.google.com comp.sys.apple2:34342
On Sat, 23 Aug 2003 20:48:51 -0500, Bryan Parkoff wrote:
> The problem is that Emulator has to use serial instead of parallel so
> 6502 CPU must be executed first before Video must be executed second at
> another time so they can't be done at same time.
> Have someone tried to use MMX or SIMD Technology that will help Emulator
> to run faster without needing to have turn by turn between 6502 CPU and
> Video.
I question whether SIMD instructions will help, because to emulate
Apple II video, you have to do a lot of bit twiddling operations on
single bytes.
My IIe emulator maintains an emulated raster beam and, after every
instruction, updates the portion of the video screen scanned by the
beam during the execution of the instruction. With appropriate checks
to make sure that you aren't redrawing unchanged pixels, this approach
is fast enough. As an example, my emulator runs at around 45Mhz on my
Athlon XP 1800+ and at around 8Mhz on a Pentium II/300.
I could make it faster by simply waiting until the end of a scan line
and updating the entire scan line at once, but then I would have to
keep track of where in the scan line the beam was when the video
mode changed (perhaps more than once) in order to accurately simulate
the display.
I find the main slowdown for my emulator is the double-indirection on
all memory references required(*) to simulate the bank-switching
capabilites of the IIe.
(*) I have just recently thought of an alternate approach that may
remove one level of indirection but I haven't coded it yet so I don't
know if will be better (or even work at all) in fact.
-Sheldon