Re: A89: Re: Re: Re: Re: Grayscale troubles


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

Re: A89: Re: Re: Re: Re: Grayscale troubles




On Thu, Aug 03, 2000 at 07:43:08PM -0400, James Darpinian wrote:
> 
> Interesting...

Take a look at this math (or skip down to the conclusion if you don't care):

The screen is 160x100 pixels = 2000 bytes = 1000 words. Each word takes 4
clocks to read and 4 clocks to write, i.e. copying a whole screen would take
8,000 clocks -- let's say 10,000 just to be sure. Now, assume that the
refresh rate is 100Hz, giving a total of 1,000,000 clocks per second. The
CPU speed is 12MHz, or 12,000,000 cycles per second, so this copying would
take 1/12, or about 8%, of the CPU time.
  As "normal" grayscale is 0-1-1 (or whatever, you get the idea), only 2/3
of the transfers need to occur since it would be stupid to overwrite plane 1
with itself... Wasted CPU time is 1/12*2/3 = 6%.
  To make things run more smoothly, each memory transfer can be split up
into smaller pieces, as long as it remain synchronized with the updating of
the screen (easy if HW2 works as I believe it does, but must reprogram
AutoInt 5).

On a HW1, the LCD controller DMA is reading the pixel data from RAM, one
byte at a time. Again, assume a 160x100 screen (it must've been reprogrammed
for this, otherwise it will read all 240x128 pixels!!!). Each byte need only
to be read, not written back. Anyway, it's a total of 800,000 clocks per
second assuming 100Hz (160Hz is possible, but let's stick to the same
figures as above). Luckily, the CPU doesn't need to know about this going on
in the background, except that the DMA steals memory cycles from it! [In my
test program] the CPU seems to use ~70% of the bus bandwidth; the 8% that
the LCD uses turns into 6% lost for the CPU.

6% on both HW1 and HW2?

CONCLUSION: Grayscale "in software" on HW2 is just (or not far from) as fast
as grayscale "in hardware" on HW1. (And don't forget that when the HW2 CPU is
doing something "useful", it's doing it 20% faster than the HW1 CPU.)

(Right? Wrong?)


> Or maybe that's just wishful thinking.  Why doesn't TI release that SDK so
> we can all stop poking and prodding our TI-89s to find stuff out?

If^H^HWhen the SDK is released, it will describe the software interface
only. The hardware may change (HW1->HW2), but the software interface will
stay the same.

A friend told me (more like a joke) that the Linux team that tried/s to
target (I think it was) the Apple Macintosh, have had (or still have) a hard
time getting information about its hardware. From what they do know about
it, they guess that Apple refuses to release any information because they're
so ASHAMED of its INCREDIBLY poor design...


/Johan



Follow-Ups: References: