Blitter and sprites with transparency
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
Blitter and sprites with transparency
If I was to copy a 4 bitplane sprite to a 4 bitplane "screen", how would you go about having a transparent colour? e.g you copy a 32x32 sprite to a destination but you want colour 0 of that sprite to NOT overwrite the background?
Falcon with CT60 in rack mountable case. Two STFMs, one upgraded lots. My original STE from when I was a teen with Switchable TOS, 1.44Mb drive, 4MB RAM, Supra Hard Drive and very very yellow case. Mega STE with (currently none working) Crazy Dots 2. Atari 2600 and a Jag. And a mountain of commercial software and lots of hardware addons.
Re: Blitter and sprites with transparency
there are two methods:
A) two the BLiTTER passes: 1) mask AND destination; 2) sprite OR destination.
B) "compiled sprites" - where the CPU drives the BLiTTER fore every sprite's horizontal line. Endmask 1/2/3 is used for masking.
A) two the BLiTTER passes: 1) mask AND destination; 2) sprite OR destination.
B) "compiled sprites" - where the CPU drives the BLiTTER fore every sprite's horizontal line. Endmask 1/2/3 is used for masking.
Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.atari.org
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Steem SSE / Aranym / Saint
http://260ste.atari.org
Re: Blitter and sprites with transparency
if your sprite transparency color is 0, you can write a simple routine to generate the 1 bitplane mask by ORing all the 4 bitplanes together and store the result in a buffer.
then apply this 1 bitplane mask using AND operation to all of your 4 bitplane screen background, then you can OR your sprite on 4 bitplane
then apply this 1 bitplane mask using AND operation to all of your 4 bitplane screen background, then you can OR your sprite on 4 bitplane
My retro games shop including Atari ST/Falcon/Firebee games ! -- Free Atari games/demos/tools -- Free Falcon demos/tools
Atari Falcon 060 @ 75MHz 256MB/14MB + Hydra // Atari STe 2MB
Atari Falcon 060 @ 75MHz 256MB/14MB + Hydra // Atari STe 2MB