dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: iPod's framebuffer format

Re: iPod's framebuffer format

From: <>
Date: Sat, 08 Jul 2006 11:37:36 -0400

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
#define LCD_FBWIDTH ((LCD_WIDTH+3)/4)
extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_FBWIDTH];
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
#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];

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;
typedef unsigned long fb_data;
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
Received on 2006-07-08

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy