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

Re: Recode to Play MP3?



On May 23, 6:44 am, "Michael J. Mahon" <mjma...@aol.com> wrote:
>
> If you want the benefits of an accelerator, the move loop (for both
> reading and writing) should be put into the Csxx space of the CFFA,
> and some of the less important initialization code moved up to the
> $C800..$CFFE space.
>
> In looking briefly at the CFFA firmware, it's clear that this was
> not a consideration in laying out the code.
>

The slightly unrolled version is 30 bytes long. Non-unrolled it's just
16 bytes long.
Somebody should have a look and see if it still fits in there.

The STA indirections should have to stay, though, adding 2 cycles
each.. :-(
Non-accelerated rates would be
((6+4+2)*4+3)/4=12.75 cycles/byte -->> 78.43 KB/s (slightly unrolled)
((6+4+2)*2+3)/2=13.50 cycles/byte -->> 74.07 KB/s (non-unrolled)

Note that because this code is called from c800.cfff ROM space, and it
has to return back afterwards, moving the code adds a JSR+RTS
overhead, or 2 JMPs.

I'd say that it should be unrolled as much as possible, as much as
fits in cn00..ff.

--Jorge.