[Coco] Impossibly-fast CoCo 3 sprites :)

Roger Taylor operator at coco3.com
Mon Feb 4 21:06:56 EST 2008


At 07:30 PM 2/4/2008, you wrote:
>Roger Taylor wrote:
>
>>Another milestone was reached this evening when I finished the 
>>routines that take bitmapped sprite/mask tables and convert them 
>>into 6809 opcodes, at run-time.
>
>Nice work Roger! Do the conversion routines actually run on the coco 
>at run-time (program start-up time), or are are they 
>"pre-processing" routines that run on the development platform and 
>spit out assembler source for each sprite?
>
>And in the case of the former, can you re-initiate the routines for 
>sprites that might change shape???
>
>Regards,


The conversion is done by the game only once at run-time.  The sprite 
data is present in the source code AND final codestream and the 
run-time converter assumes nothing about the sprites while it builds 
the opcode models.  Each sprite gets it's own subroutine that uses 
direct values written to the screen with indexed addressing.  For now 
I'm building a contiguous stream of code and just saving the pointer 
to the start of each sprite routine.  When things get much serious 
later I'll use the MMU to handle larger sprites and more sprites.

Yes, if you were to have a need to change the sprite data while a 
game is running, the opcode builder could be called again.  However, 
the length of the new sprite subroutines could end up smaller or 
larger, so I'd want to reserve a big enough buffer to handle this.





More information about the Coco mailing list