I dont mind elaborating, if you dont mind slight topic derailment...for a little moment!exxos wrote: Sun Jun 29, 2025 11:00 pm I don't know much about Blitter coding.. I did read your other blitter post, but still no wiserof course I'm always open to improving things if it's simple and not likely to break anything..

So, lets look at how to display a typical 'sprite' or more correctly (as we are not using a C64 and the subject matter is relevant) blitter object - BOB - over a non blank background.
This is how it works for most 'frame buffer' type computer systems with no custom/game optimised sprite/BOB hardware. That includes the ST/F030/TT/MegaST/e of course!

Also, Im describing things from a chunky (otherwise known as 'packed pixel') screen arrangement, as this is also part of the speedup process and avoids confusing matters with planar complications.
Anyway, lets get to it...
We have to do 3 blits:
1. The BOB single colour mask:
As the ST doesnt have the operation I am proposing to add, we have to add a mask to draw any image over the background that isnt a square shape. (This is also known as a cookie cutter mask). What this is, is a single mask colour of the BOB/sprite.
[THIS IS THE STEP THAT CAN BE REMOVED WITH THE PROPOSED EXTRA OPERATION ADDED!]
2. The BOB image:
This is the actual 'full colour' version of the above image. Same shape, but now with colours. We can apply this without also drawing the square shaped BOB border because we do infact have a blit operation (the AND op.) that says 'copy data if the source AND destination are true.
Of course, as long as the mask (step 1) had all the actual pixels to display set to the value that would cause both source and destination to flag as both being set (or true), this would then draw *just* the pixels inside the square BOB block (and not the borders).
3. The background restore image:
This is only needed if the overlaid BOB image is either moved, or changes its animation frame and just basically restores the background (and essentially makes the BOB disappear!)
We then rinse and repeat steps 1-3 ad infinitum...

Hope that makes sense?
Obviously, Ive missed out draw timing, as you want to keep step 2 on screen as long as possible and only do the rest at the appropriate screen raster position to avoid the image flickering, but lets not go overboard with the unnecessary (from an explanation of the blit cycle perspective) details.