[Libdlo] [Fwd: Re: libtubecable 0.1.4]

Florian Echtler floe at butterbrot.org
Thu Jun 11 01:31:27 PDT 2009


> But i have quite a lot of experience in writing a tile-based display (from
> my BlinkenSisters game). Can you give me a quick pointer on a few things:
> * You add operations to a queue and then you call dl_cmd_sync() and send() -
> what do these do? Why are there two commands?
The dl_cmd_sync() just appends 0xAF 0xA0 to the queue, which is the
"flush" command for the device. send() actually transmits the data as
USB bulk messages. I've split this into two because there might be
occasions where you want to flush the queue in the middle of a longer
datastream.

> * the "cs" handle is the queue handle, right?
Yes.

> * What is the exact memory layout used in the demo and how exactly are the
> colors defined (for my demo, i did trial&error)
The memory layout currently is: 16-bit framebuffer at 0x000000, 8-bit
framebuffer at 0x555555. The 16-bit framebuffer contains the most
significant bits of the color as RGB565 in big-endian, the 8-bit
framebuffer contains the rest as single bytes with RGB323. I'm only
using the 16-bit FB at the moment (this is controlled by register 0x00,
set to 1 for 24-bit mode).

> * how to load various 32x32 Pixel Bitmaps into the memory. Is there a
> function i can just point to a Pixel datastream and have it uploaded to a
> specific memory location?
Yes, that's dl_gfx_write( queue, address, count, data ) Address is
simply the location inside the framebuffer (only the lowest 24 bits are
used). Count is an uint8_t and describes how many pixels should be
written - this is modulo 256, so at most 256 pixels can be written per
command by setting count to 0. And data is a pointer to the raw pixel
data - in this case, 2 bytes are read for each pixel.

> * I'm not sure how the in-device copy command works. It's handle, source
> address, dest adress and length, right.
Exactly. Length/count is again % 256.

> If i manage to understand these things, i'd like to write a little 2-way
> tile-based scrolling demo.
Cool, I'm curious :-)

Yours, Florian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://lists.freedesktop.org/archives/libdlo/attachments/20090611/f8b69e13/attachment.pgp 


More information about the Libdlo mailing list