[Coco] real-time mouse cursor
Roger Taylor
operator at coco3.com
Sat Jan 26 03:30:58 EST 2008
It's also obvious that to eliminate cursor flicker it has to be drawn
on each screen refresh which is taking up a lot of CPU time. It's
probably a waste of time to pursue this further, but if I can move as
much code into the IRQ service routine and just use FIRQ to increment
the raster line counter, there might be a trick in that idea somehow.
If there was a way to trigger an interrupt at a certain raster line,
this would be solved, but still there's 19 sprite lines each of the
save, draw, and restore code. I'm doing these in sequence, btw,
first saving the entire cursor area, drawing it, then erasing it.
Maybe if I save/draw/restore each line instead of the entire cursor,
my timing will be more uniform to the raster beam and I can pad out
each line's cycles to 144, but the total cycles needed to draw the
cursor is still the killer.
I'm using what I think can be improved which is spaghetti code with
stack blasting, but if it helps to keep it like it is to help with
automatic padding to 144 cycles per scanline, then it should be ok like it is.
Padding my sprite code to 144 cycles x 19 lines, plus a little
overhead all happening 60 times a second... oh boy.
More information about the Coco
mailing list