AtarimaniaAtarimania

Atari ST - 1992

Pixelize

Pixelize — screenshot 1
Genre
Programming - Aids / Routines / Tools
Year
1992
Language
Compiled C
Publisher
[no publisher]
Controls
Keyboard
Distributor
—
Resolution
Low / Medium / High
Developer
Atari Corporation
ST Type
ST, STe, TT, Falcon030 / 0.5MB
Licensed from
—
Programmer(s)
Stedman, Roy
Country
USA
MIDI
—
Software
English
Version
0.6
Box/Instructions
English
Number of Disks
1 / Double Sided / HD Installable
License
PD / Freeware / Shareware
Dump
Download
Serial
—
Dump format
MSA
Protection
—

ADDITIONAL COMMENTS

Found from ex-Atari employee's hard disk. C sources included.

INSTRUCTIONS

Pixel Stuff - convert ST style bitplanes to packed pixel format for the Falcon

Algorithm used is to shift bits out of planes and into packed pix register
one at a time, high bit first. 

Note: Don't do this with 1 bpp data, it wastes time & confuses things.

Pseudo-Code to convert 16 pixels (2 4 or 8 bpp) to packed pixels
--------------------------------------------------------------------------------
LOAD PLANES[1..NUMBITPLANES] WITH one bitplane word (16 bits) each 
						; (sequential out of memory) 
FOR k = 1 to (NUMBITPLANES/2)			; save every 32 bits of ppix

	FOR i = 1 to (32/NUMBITPLANES)		; create 32 bits of packedpixels
		FOR j = NUMBITPLANES downto 1	; Get MSB of the pixel first	
			LSL.L PLANE[j]		; shift bit left into X bit
			ROXL.L PACKEDPIX 	; Rotate X bit left into dest.
		ENDFOR j
	ENDFOR i

	SAVE PACKEDPIX				; save 32 bits of ppix
ENDFOR k
--------------------------------------------------------------------------------