From mint-bounce@lists.fishpool.fi Fri Jul 30 15:13:09 2010 Message-ID: <4C5323C4.40905@online.no> Date: Fri, 30 Jul 2010 21:11:00 +0200 From: Jo Even Skarstein User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] VDI Device Independant format References: <1deef33c678b0e816d70a3ed88bec353-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUNBAjBTXF5bVkYPW0F0Alc6XF1XQUEBXV9fRA==-webmailer2@server07.webmailer.hosteurope.de> In-Reply-To: <1deef33c678b0e816d70a3ed88bec353-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUNBAjBTXF5bVkYPW0F0Alc6XF1XQUEBXV9fRA==-webmailer2@server07.webmailer.hosteurope.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: joska@online.no Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: On 07/29/2010 09:42 PM, m0n0 wrote: > base = 0x0e1024; // imaginary address where the device independent > screen data is stored > LONG img_width = 16; // dimension of device independent screen data > LONG img_height = 16; // dimension of device independent screen data > LONG plane_size = img_width * img_height; IIRC this is not quite correct. The width of the bitmap would be 1 word or 2 bytes (I think it's words, but look that up), not 16 pixels. > WORD * plane_0 = base + plane_size * 0; > WORD * plane_1 = base + plane_size * 1; > WORD * plane_2 = base + plane_size * 2; > WORD * last_word_in_plane_2 = plane_2 + plane_size - sizeof( WORD ) > > Would the pointers ( plane_0 - plane_2 ) point to the correct location? > One thing I could think of is that the plane data is not contiguous - like > the Screen Format for Atari ST in 16 color mode, but maybe it's wrong to > think about that format when working with the VDI device independent > format... Yes, that's wrong ;-) The device independent bitmaps are stored with each plane as one contiguous block, not interleaved like the ST screen format. So your code looks OK to me. Jo Even