Monday, April 7, 2008

Buggy Blitting



Ahhhh back at work again - after a nice 'stay-cation' of a week, the first in 2 years - I'm nearly glad to be back.  Backwards as it sounds, development time should INCREASE now that I'm back at work.

Spending an hour or two after the stresses of work to 'wind down' is quite acceptable... spending 12 - 18 hours locked in 'the manfort' isn't.... besides, timing my vacation to coincide with my birthday (42) and my wedding anniversary (11) sort of took care of a lot of the 'spare time' I'd have on my hands.

So - buggy blitting.. most my coding time was spent re-aquainting myself with the blitter.  It's little quirks (being one of the first of it's kind - it's allowed to have some) like it only blitting to short word (2 byte) boundries, and the barrel shifting needed to make pixel adjustments are in the very top 4 bits of it's control register....  while the math to pull round the address and pull the pixel offset is in th every BOTTOM 4 bits of an 'x-coordinate'... that all screen offsets and modulos are given in BYTES and all blitter start locations are on WORD boundries...  lots of little problems to scratch your head over - none of them huge - but each one time consuming.

Anyways - we now have buggy motion forward and back - linear at the moment - and the background scrolls accordingly... speeding up and slowing down as needed.

Starting to look more like a game now!

No comments: