#!/usr/bin/perl # # On GTA02, a screen dump can be obtained trough JTAG with # dump_image filename 0x8800000 0x96000 # # Or from a shell with: # dd if=/dev/fb0 bs=4096 count=150 of=filename # # # Usage: # scr2ppm.pl screendump >file.ppm # $d = join("", <>); print "P6\n480 640 255\n"; for ($i = 0; $i < length $d; $i += 2) { $v = unpack("v", substr($d, $i, 2)); print pack("ccc", ($v >> 11) << 3, ($v >> 5) << 2, $v << 3); }