ps3videomode.c Code: /* * Copyright (C) 2006 Sony Computer Entertainment Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published * by the Free Software Foundation; version 2 of the License. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include #include #include #include #include #include #include #include #define PS3VIDEOMODE_VERSION "1.00" #define FB_NAME "/dev/fb0" #define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) #define PS3FB_IOCTL_GETMODE _IOR('r', 2, int) struct option long_options[] = { { "help" , 0, NULL, 'h' }, { "video" , 0, NULL, 'v' }, /* video mode */ { "rgb" , 0, NULL, 'r' }, /* RGB color space */ { "full" , 0, NULL, 'f' }, /* full screen mode */ { "dither", 0, NULL, 'd' }, /* dither ON */ { "hdcp" , 0, NULL, 'H' }, /* HDCP OFF, Retail PS3 product doesn't support this */ { NULL , 0, NULL, 0 } }; static void usage(void) { printf( "Usage:\n" " ps3videomode [options]\n" "\n" "Options:\n" " --help, -h print this message\n" " --video, -v set video mode ID\n" " --full, -f use full screen mode\n" " --dither,-d use dither ON mode\n" "\n" "Video mode ID:\n" " 0:auto mode \n" " YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p\n" " YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p\n" " RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p\n" " RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p\n" " VESA 11:WXGA 12:SXGA 13:WUXGA\n" "\n" " full screen mode: