I dunno about the nano, but on the ipod video, the framebuffer's just
a/an (two dimensional) array of short.
The defines for all lcd types are in lcd.h, starting on line 203 or
there abouts. I reproduce them here:
/* Memory copy of display bitmap */
#if LCD_DEPTH == 1
extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
#elif LCD_DEPTH == 2
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
#define LCD_FBWIDTH ((LCD_WIDTH+3)/4)
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_FBWIDTH];
#else
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
#endif
#elif LCD_DEPTH == 16
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
#elif LCD_DEPTH == 18
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH];
#endif
----
fb_data is defined around line 39:
#if LCD_DEPTH <=8
typedef unsigned char fb_data;
#elif LCD_DEPTH <= 16
typedef unsigned short fb_data;
#else
typedef unsigned long fb_data;
#endif
-----
Looking in config-ipodnano.h, we find at line 21:
/* LCD dimensions */
#define LCD_WIDTH 176
#define LCD_HEIGHT 132
#define LCD_DEPTH 16 /* 65536 colours */
#define LCD_PIXELFORMAT RGB565SWAPPED /* rgb565 byte-swapped */
Jacob Rau wrote:
Hey list,
I''ve been thinking about writing a plugin that will play movies on the
iPod Nano, but what I don't understand is the frame buffer format. I see
a few of the plugins fill it full of hex, but I don't know how to
decode/encode to/from this format. I realize I may have missed a wiki
page, but seeing as twiki is down now even the briefest of explanations
will do. Example code would be nice, but I guess that's what the other
plugins are for.
Thanks for putting up with my ignorance...
Jake