[Coco] Let's figure out the best method to compile sprites for the CoCo - Please add your input

Glen Hewlett glen.hewlett at sympatico.ca
Thu May 11 18:35:50 EDT 2017


Hi Torsten,

Thanks for the link and suggestion of looking at the Dynosprite code.  I looked at this code quite a few months ago but not deep enough at the time.  Back then I incorrectly thought Stack blasting was the fastest way to get sprites on the screen and I thought I saw mention of Dynosprite using stack blasting but I didn’t look closely enough at the source code until today.

So far I see a neat idea is to compare the old values in the A and B registers against the new values and if you can use the following 1 byte instructions use them to modify the accumulators.

CLR
COM
NEG
INC
DEC

It’s always faster to load both A & B together with a LDD instruction if both values are changing.  But if you are going to change only the A or the B accumulators individually and you can use the above instructions to get your desired value then these one byte instructions will reduce your sprite size.

Cheers,
Glen

________________________________
Direct link to the documentation:

https://github.com/richard42/dynosprite/blob/master/doc/DynoSpriteUsage.txt <https://github.com/richard42/dynosprite/blob/master/doc/DynoSpriteUsage.txt>

________________________________
Von: Dittel, Torsten
Gesendet: Donnerstag, 11. Mai 2017 12:49
An: coco at maltedmedia.com <mailto:coco at maltedmedia.com>
Betreff: [Coco] Let's figure out the best method to compile sprites for the CoCo - Please add your input


?For those interested in Sprites I recommend to have a look at Richard Goedeken's Game Engine "Dynosprite" here:
https://github.com/richard42/dynosprite? <https://github.com/richard42/dynosprite?>


Regards,

Torsten


More information about the Coco mailing list