[Coco] Help with speeding up sprite rendering

Derek John Evans derek.john.evans at hotmail.com
Fri Mar 17 02:29:30 EDT 2017


I do believe the author of Donut Dilemma is on this list.


Some years back I remember reading him say he expanded the sprites to inline code

ie: LDA #123 STA ,X+ LDA #124 STA ,X+


or, stuff like: LDD #123 STD ,X+


That was a mind shift for me.


________________________________
From: Coco <coco-bounces at maltedmedia.com> on behalf of Glen Hewlett <glen.hewlett at sympatico.ca>
Sent: Friday, 17 March 2017 4:33 PM
To: CoCoList for Color Computer Enthusiasts
Subject: [Coco] Help with speeding up sprite rendering

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.

--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
CoCoList for Color Computer Enthusiasts - pairlist5.pair.net<https://pairlist5.pair.net/mailman/listinfo/coco>
pairlist5.pair.net
This is a list for enthusiasts of the Color Computer in all its forms, its clones, and its software. To see the collection of prior postings to the list ...




More information about the Coco mailing list