Re: A89: Re: HW1/2 Grayscale Speed (was Re: Grayscale Troubles)


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

Re: A89: Re: HW1/2 Grayscale Speed (was Re: Grayscale Troubles)




> > movem.l (a0),d0-d4        ;12+8n= 52
> > movem.l d0-d4,(a1)        ;8 +8n= 48
> > adda.w #10,a0             ;        6
> > adda.w #10,a1             ;      + 6
> >                           ;----------
> > ;[repeat 100 times]       ;      112 x 100 = 11,200 clocks
> > ;Big thanks for Niklas for helping me shave off those 2,000 clocks

> hmmm. I think you have some errors in your calculations here.
> acording to my books, adda.w  takes 8+ea calculation, wich is 8 cycles for
an
> immediate.

Wrath pointed out that I meant adda.l, which is faster - 6+ea.  But an
immediate ea takes 8 cycles?!?  I'd think it wouldn't take the hardware any
time to just gran the next word and shove it in that address. . . granted, I
don't know my ea times, but I assumed that shouldn't be taking any clocks.

>  that changes thoose 6+6 to 16+16. totals 13,200 cycles then.
> lea 10(a0),a0  and lea 10(a1),a1 takes only 8 cycles each, and needs no ea
calc.
> that takes it down to 11600 cycles.

That's why I posted my figures to the list to be checked - I always forget
about lea.  So we're now at 11,600 cycles - that's 9.67%, which sure beats
the 11% generated by direct transfer from plane to LCD_MEM.

> adda.l takes 6 cycles, maybe that is what you have seen? But if so, you
have
> forgotten to add ea calculation time anyway.

true =)

Ok, so one of these days, I need to write a new HW2 grayscale routine.
Needs to be able to detect whether it's running on the 89 or 92+, since my
original always copied the entire LCD_MEM, which can shave off a LOT of CPU
usage.  Need to make it interlaced, which, according to Tim's example,
appears to have less flicker when it conflicts with the LCD refresh.  Needs
to use this slightly updated code, with lea rather than adda.  And it'd be
best to stick it in auto-int 5 and try to come close to synching it with the
LCD refresh - but would that cause a problem for any current lib programs?
I suppose that all the programs intelligent enough to use auto-int 5 already
have their own grayscale routine anyway, so we should be fine.

Anything else?

And on a side note, either Olle or Johan sent some Exec code to the list
last week which they wanted tested on a HW2 calc.  I can't find that code
again; will the original author send it back my way again?  Something about
altering a few bytes in the Exec sring to increase the screen refresh, I
think.

    -Scott




Follow-Ups: References: