[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 17:57:39 EDT 2017


Hi Ciaran,

The reason I only start with an LEAX 8,X is so I can use small numbers for the -value,X so each STD, STA. STB instruction for the first row of sprite data for each group of two rows that I process takes 2 bytes instead of the 3 bytes when you use a value outside of the -16 to +15 range for X.  For speed though your method might have some advantages which is what matters the most to me.  Can you show me a little example of the sprite code output?

Thanks for the input,
Glen

> On May 11, 2017, at 9:28 AM, Ciaran Anscomb <cocomalt at 6809.org.uk> wrote:
> 
> Glen Hewlett wrote:
>> Currently my code writes starts with the instruction LEAX   8,X to setup the
>> index pointer to the top right of the sprite location.
> 
> You probably want to make that initial offset as large as possible while
> keeping your first screen location within an 8-bit signed offset.
> 
> So either add LEAX 127,X instead of 8,X (128 would be probably lose more
> cycles than you save later!) or, as I'm doing in my current project,
> offset all screen addresses by 128 so that the first access is always
> -128,X.
> 
> ..ciaran
> 
> -- 
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco



More information about the Coco mailing list