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

Re: 65C02 emulation



bieling@terra.es wrote:
Charlie Springer ha escrito:


On Wed, 27 Dec 2006 21:26:55 -0800, bieling@terra.es wrote
(in article <1167283615.114007.102690@79g2000cws.googlegroups.com>):


OTOH, if things are done this way, the burden of discriminating what
has to be read/written from/to the Apple II MLB, may happen to slow
down quite a lot the emulation speed of the "processor" ARM, but about
this I have not thought very much yet...?

The ARMs have several memory access modes to handle full speed RAM and slower
ROM and FLASH plus a mode that can hold till finished. So with the right MMU
stuff one should be able to read/write at Apple bus speed when needed.


I didn't know. But please think about this very usual situation: a
program is running and doing useful things but at the same time is
polling the keyboard not *waiting* for a keypress but *checking* just
in case the user wants to halt it or whatever (control-c?). Your fast
processor is executing several tens of times faster that a regular 6502
would do, but everytime a keyboard poll apears in the program flow,
your superfast processor halts for at least 1000ns maybe up to 1999ns
because of it ? This has to be addessed somehow, don't you think so ?

Interesting.  Can you think of an application in which a long
computation is being done, and polling the keyboard constitutes
even 1% of the loop time?  This would mean that the loop time is
less than 100 cycles, despite doing something interesting.

If you can, then that application would be speeded up only 50 times
on a processor that can run the code 100 times as fast as an Apple II
(since half its time would be spent reading the keyboard latch).

If the program loop takes 1000 Apple cycles (polling the keyboard
about 1000 times per second!), then running the 999 cycles 100 times
faster and slowing to 1MHz for one cycle would result in a speedup
of "only" about 90 times.

I think that this "problem" is imaginary.

There are many other reasons for wanting to speed up accesses
with visible side effects, like stores to the frame buffer, but
I don't think polling the keyboard is one of them.

-michael

NadaNet networking for Apple II computers!
Home page:  http://members.aol.com/MJMahon/

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