[Coco] Help with speeding up sprite rendering

Glen Hewlett glen.hewlett at sympatico.ca
Fri Mar 17 02:03:18 EDT 2017


Hi All,

I’m working on some routines to draw sprites on the screen faster and I have a lot of it working fine.
If I use PULS and PSHU commands I can really improve the speed of my sprite rendering.

For example instead of using a bunch of
LDD		,X++
STD		,U++
...
I’m using
PULS	A,B,X,Y,DP
PSHU	A,B,X,Y,DP
…

That’s all great for sprites that are 7 bytes wide, but I also need to move sprites that are 8 bytes wide.  I’ve read on the net about using the condition code (CC) in the same way I described above but it breaks my program.  I couldn’t find some example code, just some talk about doing it.

I’ve tried:
ANDCC	#$00
PULS	A,B,X,Y,DP,CC
PSHU	A,B,X,Y,DP,CC
…
ANDCC	#$EF	- re-enable the IRQ

I’m not sure what this is doing, as the computer is still running and the IRQ is triggering but it’s not generating the sprites when I do this.  In fact the computer seems to be stuck in the IRQ loop.

Normally my program is moving the sprites around while in the IRQ routine, is this the part of the problem when using the CC register?  Or am I just handling the CC register improperly?

If anyone has some sample code or can offer some advice I sure would appreciate it.

Cheers,
Glen.


More information about the Coco mailing list