Xbox HDTV HOWTO

From Xbox-Linux

by Oliver Schwartz, 2 Dec 2003 (Version 0.1)

Xbox-Linux now has support for some HDTV modes in the video driver. Currently the 480p (720x480) and 720p (1280x720) are supported on Xboxes using the Conexant video encoder. Support for Xboxes using the Focus video encoder is included in the latest Xebian/GentooX releases.

1080i is also supported with the newer X driver.

Table of contents

Hardware

To make use of the HDTV modes you need the Xbox High Definition AV pack or a compatible cable and (obviously) a HDTV capable TV set.

On a side note from the Xbox 1.6 page... "Currently the only video support on a version 1.6 Xbox is for Composite and Svideo output, both PAL and NTSC, 640x480 resolution, with overscan, and 480p HDTV output (this is available only in CVS at present). Overscan means the picture is too large for the screen (http://scanline.ca/overscan/); the border areas go off the edges. There is currently no way to remedy this for the 1.6 Xboxes. Do not bother trying to use the nvtv tool—it will not work!"

Software

The kernel

Latest Xebian/GentooX distributions include the HDTV support needed for both focus and conexant encoders.

If you are using another distribution, you will need to get the latest kernel patches from CVS (http://sourceforge.net/cvs/?group_id=54192) if you use an older distribution. Follow the instructions in the README.xbox (http://cvs.sourceforge.net/viewcvs.py/xbox-linux/kernel/Documentation/README.xbox?view=markup) file for building a new kernel. Make sure you select y(es) for the options "I2C XBOX" and "Xbox framebuffer support".

Important: If you're using the Xebian distro you have to remove the line "rivafb y" (or "xboxfb y" or "vesafb y") from your linuxboot.cfg, otherwise the bootloader will force the kernel to use PAL or NTSC output. Add the following statement to the "append" line in your linuxboot.cfg instead:

append= ... video=xbox:720p,nohwcursor ...

Note that if you started Xebian from an XBE (as an application) then the linuxboot.cfg that you need to edit is "E:\debian\linuxboot.cfg", not the one in "/boot".

It's also a good idea to delete or rename the script /etc/rcS.d/S75xconfig which tries to create a symbolic link for your X11 configuration file (/etc/X11/XF86Config-4). It doesn't know about HDTV and creates a link pointing nowhere.

Console video modes

Once your kernel is installed and your Xbox rebooted you need to select the desired video mode. For the console this is done using fbset: For 480p, run:

fbset -g 720 480 720 480 32 -t 37000 56 18 31 7 64 7

For 720p, run:

fbset -g 1280 720 1280 720 8 -t 13468 220 70 22 3 80 5

Alternatively you can also add the following entries to /etc/fb.modes and run "fbset 480p" or "fbset 720p" accordingly:


mode "480p"
  geometry 720 480 720 480 8
  timings 37000 56 18 29 9 64 7
endmode

mode "720p"
  geometry 1280 720 1280 720 8
  timings 13468 220 70 22 3 80 5
endmode
# WARNING!  Booting with the following modes can leave you without a screen! (Xebian/1.1.4)
# If someone has the reason, please change accordingly.  They do work with fbset.
# Samsung LN-S4095D
mode "1280x670"
  # D: 83.751 MHz, H: 47.640 kHz, V: 60.000 Hz
  geometry 1280 670 1280 670 32
  timings 11940 320 118 7 115 40 2
  accel true
endmode
# Samsung LN-S4095D alternative, doesn't work as well in X though
mode "1280x680"
  # D: 83.751 MHz, H: 47.640 kHz, V: 60.000 Hz
  geometry 1280 680 1280 680 32
  timings 11940 320 118 7 105 40 2
  accel true
endmode

X11

To use the HDTV modes in X you need to change the configuration file /etc/X11/XF86Config-4. For some yet unknown reason it's not possible to use a resolution of 720x480 in X, the image will be distorted. Reducing the resolution slightly to 704x480 will work though.

First, add the new Modelines in the "Modes" section:


Section "Modes"
        Identifier      "default"
        Modeline        "480p" 27.028  704  746  810  858 480 489 496 525 -hsync -vsync
        # alternative 480P modeline works better with a Pioneer Elite 53"
        # Modeline        "480p" 30.501 704  804  820  952 471 506 514 572 -hsync -vsync
        Modeline        "720p" 74.251 1280 1350 1430 1650 720 723 728 750 -hsync -vsync
        # On the Samsung LN-S4095D the 480p and 720p resolutions have serious over-scan, therefore
        Modeline        "1280x670" 83.751 1280 1398 1438 1758 670 785 787 794 -hsync -vsync
EndSection
    

After that add the mode you want to use in the "Screen" section, e.g. for 720p:


Section "Screen"
        Identifier      "Default Screen"
        Device          "Nv"
        Monitor         "Generic Monitor"
        DefaultDepth    24
        SubSection "Display"
                Depth           24
                Modes           "720p"
        EndSubSection
EndSection
    

You also need to add the following line inside the "Monitor" section:

UseModes        "default"

After saving your changes, restart X and enjoy your HDTV modes.

Configuration for Both HDTV and SDTV

If you're like me, you use your Xbox on more than one TV and you're not fortunate enough to have an HDTV everywhere you go. I've been trying unsuccessfully for a while to configure X to detect whether I can support the higher resolutions and default into a standard def desktop if I can't. If I learn anything or if someone else has the answer, they can post it here.

-"Matt Jones"  (mailto:kotefare@hotmail.com)

Monitor Section Fix Addendum

I had to add the folling to the monitor section of my xebian install: UseModes "default"

So it looked like:

  Section "Monitor"
       Identifier      "Generic Monitor"
       HorizSync       30-55
       VertRefresh     45-65
       Option          "DPMS"
       UseModes "default"
  EndSection

Thanks goes out to David Pye for this info.

-"Ted Gulesserian"  (mailto:tguless@bigfoot.com)