AmigaExamples/008.shift_blit
alpine9000 ffc5f1f93d Got build working on newer OSX, included missing ADFs 2019-06-11 13:58:03 +10:00
..
bin Got build working on newer OSX, included missing ADFs 2019-06-11 13:58:03 +10:00
Makefile Used better test image 2016-03-14 13:33:00 +11:00
README.md Update README.md 2016-03-09 14:57:13 +11:00
screenshot.png Used better test image 2016-03-14 13:33:00 +11:00
shift_blit.s A few incorrect dbra counters 2016-03-25 19:49:36 +11:00

README.md

perform a shifted blit

Extending 007.masked_blit, we now add the capability to blit to non word aligned columns.

The blitter can only address word aligned screen positions. This makes drawing something on a non word aligned boundary slightly more complex.

So the algorithm for drawing to non word aligned boundaries is as follows:

  1. The destination address is the word aligned address to the left of the desired position.
  2. Command the blitter to blit an extra word to the right of our blitter object.
  3. We mask the trailing word of each line to prevent the extra word from being blit.
  4. We right shift the data by the difference in bits between the desired column and the word aligned column from (1).
  5. We make the line modulos #-2 so blitter object data is correctly fetched.

Download disk image

screenshot

Screenshot

try it