wcb
12-01-2007, 11:02 PM
The OLED image is stored in the gzipped portion of the Series3 PROM image. It is a 4-bit 48x48 grayscale image stored in a proprietary format, and downloaded to the display via I2C. The first few bytes look like this:
0000000: 4000 0000 0000 0000 4000 0000 03d0 0000 @.......@.......
0000010: 4000 0000 0000 005b 4040 0000 0000 0bda @......[@@......
0000020: 4000 0000 0000 0000 4000 dbc0 0000 0000 @.......@.......
0000030: 4013 db40 0000 0000 4000 0001 dbd0 0000 @..@....@.......
If you extract this image (hint: it is exactly 0x370 bytes long), you can decode it into a PGM file called out.pgm with the oled_decode.pl utility:
$ ./oled_decode.pl tivoguy.raw
XX:
.XX. .XXX:
XXXX :XXXX.
.XXXX: :XXXXX
.:XXXXX: :XXXXX
.:XXXXXXX .XXX::.
: :X:.:XXX. XX:
.XX. :XX :XX
:XX .XX
XX. XX.
:X: .XX
.X: XX.
.XX XX
...XX .XX
.::XXXXXXXXXXXXX::......
:XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXX::XXXXXXXXXXX .XXXXXXXX
XXX.. .: X:XXXXX: :XXXXXXXX
XXX .. : XXXX XXXXXXXXX
XXXXX :XX::X. :XX: .X. .:XXX:
:XXXX. :XXXXX: .XX. :. .XX:
:XXXX. :XX.:XX X: X X .XX.
.XXXX. :XX XX. X :X : XXX
XXXX. :XX XX. XX. .XXX
XXXX. :XX XX: .XXX...XXX:
.XXX: :XX. XXX XXXXXXXXXX.
XXXXXXXXXXXXX: :XXXXXXXXXX
:XXXXXXXXXXXXXXXXXX::XXXXX
.XXXXXX .:XXXXXXXX. XXXXX.
XXXXXX ::::. XXXXXX
.XXXXXX:. .XXXXXX:
XXXXXXXXX:...:XXXXXXXX
XXXXXXXXXXXXXXXXXXXXX:
.XXXXXXXXXXXXXXXXXXXX
::::.:XXX::XXXXXXXX
XXX .XX. ...
:XX .XX
:X: .XX
:X: .XX
::. :X: .XX
:XXXXXXXX XXXXXXX.
XXXXXXXXXX.XXXXXXXX:
:XXXXXXXXX. XXXXXXXXX
XXXXXXX:. :XXXXXXX.
.:XXX. .:XXXX.
You can then edit the PGM file, convert it to/from other formats, etc. You may then re-encode it using the oled_encode.pl script:
$ ./oled_encode.pl out.pgm > new.bin
And then patch it back into the PROM using a hex editor, gzip, etc.
oled_encode.pl uses ImageMagick/PerlMagick so it can accept other file formats, like PNG, BMP, etc. You can use the netpbm tools (e.g. pnmtopng, pnmtoppm | ppmtobmp) to manipulate this file.
Note that the startup logo does not fill the entire OLED display, as the display is more than 48 pixels wide.
0000000: 4000 0000 0000 0000 4000 0000 03d0 0000 @.......@.......
0000010: 4000 0000 0000 005b 4040 0000 0000 0bda @......[@@......
0000020: 4000 0000 0000 0000 4000 dbc0 0000 0000 @.......@.......
0000030: 4013 db40 0000 0000 4000 0001 dbd0 0000 @..@....@.......
If you extract this image (hint: it is exactly 0x370 bytes long), you can decode it into a PGM file called out.pgm with the oled_decode.pl utility:
$ ./oled_decode.pl tivoguy.raw
XX:
.XX. .XXX:
XXXX :XXXX.
.XXXX: :XXXXX
.:XXXXX: :XXXXX
.:XXXXXXX .XXX::.
: :X:.:XXX. XX:
.XX. :XX :XX
:XX .XX
XX. XX.
:X: .XX
.X: XX.
.XX XX
...XX .XX
.::XXXXXXXXXXXXX::......
:XXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXX::XXXXXXXXXXX .XXXXXXXX
XXX.. .: X:XXXXX: :XXXXXXXX
XXX .. : XXXX XXXXXXXXX
XXXXX :XX::X. :XX: .X. .:XXX:
:XXXX. :XXXXX: .XX. :. .XX:
:XXXX. :XX.:XX X: X X .XX.
.XXXX. :XX XX. X :X : XXX
XXXX. :XX XX. XX. .XXX
XXXX. :XX XX: .XXX...XXX:
.XXX: :XX. XXX XXXXXXXXXX.
XXXXXXXXXXXXX: :XXXXXXXXXX
:XXXXXXXXXXXXXXXXXX::XXXXX
.XXXXXX .:XXXXXXXX. XXXXX.
XXXXXX ::::. XXXXXX
.XXXXXX:. .XXXXXX:
XXXXXXXXX:...:XXXXXXXX
XXXXXXXXXXXXXXXXXXXXX:
.XXXXXXXXXXXXXXXXXXXX
::::.:XXX::XXXXXXXX
XXX .XX. ...
:XX .XX
:X: .XX
:X: .XX
::. :X: .XX
:XXXXXXXX XXXXXXX.
XXXXXXXXXX.XXXXXXXX:
:XXXXXXXXX. XXXXXXXXX
XXXXXXX:. :XXXXXXX.
.:XXX. .:XXXX.
You can then edit the PGM file, convert it to/from other formats, etc. You may then re-encode it using the oled_encode.pl script:
$ ./oled_encode.pl out.pgm > new.bin
And then patch it back into the PROM using a hex editor, gzip, etc.
oled_encode.pl uses ImageMagick/PerlMagick so it can accept other file formats, like PNG, BMP, etc. You can use the netpbm tools (e.g. pnmtopng, pnmtoppm | ppmtobmp) to manipulate this file.
Note that the startup logo does not fill the entire OLED display, as the display is more than 48 pixels wide.