Home
Download

Open Source

Projects
Patches

System Integration

Notes
SRPMs

The Sprite home entertainment system

This document describes how to build Sprite, a home entertainment system.

Sprite is designed to run on a Zotac ZBOX Blu-ray, which provides the following:

Sprite also makes use of two SNES-style USB joypads and a Rii mini wireless keyboard with touchpad.

Follow the instructions below to build Sprite:

  1. Install Fedora using a CD-ROM containing a disk image such as Fedora-20-x86_64-netinst.iso.
    1. During installation, create a 2GB swap partition and a / partition that spans the rest of the disk.
    2. Create a user named sprite.
    3. Install the minimum set of packages.
  2. Use rpm -e to remove any unnecessary packages.
  3. Use
    rpm -Uvh \
    http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-20.noarch.rpm \
    http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-20.noarch.rpm \
    http://rpm.livna.org/livna-release.rpm
    to install the RPM Fusion and livna repositories.
  4. Install the required packages using
    yum install \
    ConsoleKit \
    gdm
    kernel-modules-extra \
    mesa-dri-drivers \
    xorg-x11-drv-nouveau \
    xorg-x11-drv-evdev \
    libdvdcss \
    nfs-utils \
    nss-mdns \
    Nestopia \
    snes9x \
    xbmc
    
  5. Configure Sprite to boot in graphical mode: ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target.
  6. Install your public SSH key as /root/.ssh/authorized_keys and configure sshd to disallow password-based logins by editing /etc/ssh/sshd_config.
  7. /etc/sysconfig/network-scripts/ifcfg-Auto_ExampleCom (replace ExampleCom, UUID [uuidgen], and MACADDRESS [ip link]):
    ESSID="ExampleCom"
    MODE=Managed
    KEY_MGMT=WPA-PSK
    TYPE=Wireless
    BOOTPROTO=dhcp
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=yes
    IPV6_AUTOCONF=yes
    IPV6_DEFROUTE=yes
    IPV6_FAILURE_FATAL=no
    NAME="Auto ExampleCom"
    UUID=UUID
    ONBOOT=yes
    HWADDR=MACADDRESS
    WPA_ALLOW_WPA=yes
    WPA_ALLOW_WPA2=yes
    PEERDNS=yes
    PEERROUTES=yes
    IPV6_PEERDNS=yes
    IPV6_PEERROUTES=yes
    
  8. /etc/sysconfig/network-scripts/keys-Auto_ExampleCom (replace ExampleCom and PSK):
    WPA_PSK='PSK'
    
  9. /etc/hostname (replace example.com):
    sprite.example.com
    
  10. /etc/sysconfig/network:
    NETWORKING=yes
    NETWORKWAIT=1
    
  11. /home/sprite/.snes9x/snes9x.xml:
    <?xml version="1.0"?>
    <snes9x>
     <preferences>
      <option name="default_esc_behavior" value="2"/>
      <option name="hires_effect" value="0"/>
      <option name="full_screen_on_open" value="1"/>
      <option name="video_mode_width" value="1920"/>
      <option name="video_mode_height" value="1080"/>
      <option name="window_width" value="1920"/>
      <option name="window_height" value="1080"/>
      <option name="prevent_screensaver" value="1"/>
      <option name="aspect_ratio" value="1"/>
      <option name="maintain_aspect_ratio" value="1"/>
      <option name="ui_visible" value="0"/>
      <option name="statusbar_visible" value="0"/>
      <option name="modal_dialogs" value="1"/>
      <option name="sync_to_vblank" value="1"/>
      <option name="joystick_threshold" value="40"/>
      <option name="sound_buffer_size" value="32"/>
      <option name="sound_driver" value="0"/>
      <option name="sound_input_rate" value="31950"/>
      <option name="sound_sync" value="1"/>
      <option name="transparency" value="1"/>
      <option name="frameskip" value="200"/>
      <option name="16bit_sound" value="1"/>
      <option name="stereo" value="1"/>
      <option name="playback_rate" value="5"/>
      <option name="block_invalid_vram_access" value="1"/>
      <option name="sram_directory" value="/home/sprite/.snes9x"/>
     </preferences>
     <controls>
      <calibration joystick="0">
       <axis number="0" min="-32767" max="32767" center="0"/>
       <axis number="1" min="-32767" max="32767" center="0"/>
      </calibration>
      <calibration joystick="1">
       <axis number="0" min="-32767" max="32767" center="0"/>
       <axis number="1" min="-32767" max="32767" center="0"/>
      </calibration>
      <joypad number="0">
       <binding name="Up" binding="556270082"/>
       <binding name="Down" binding="556270083"/>
       <binding name="Left" binding="556270080"/>
       <binding name="Right" binding="556270081"/>
       <binding name="Start" binding="553648135"/>
       <binding name="Select" binding="553648134"/>
       <binding name="A" binding="553648129"/>
       <binding name="B" binding="553648128"/>
       <binding name="X" binding="553648131"/>
       <binding name="Y" binding="553648130"/>
       <binding name="L" binding="553648132"/>
       <binding name="R" binding="553648133"/>
      </joypad>
      <joypad number="1">
       <binding name="Up" binding="573047298"/>
       <binding name="Down" binding="573047299"/>
       <binding name="Left" binding="573047296"/>
       <binding name="Right" binding="573047297"/>
       <binding name="Start" binding="570425351"/>
       <binding name="Select" binding="570425350"/>
       <binding name="A" binding="570425345"/>
       <binding name="B" binding="570425344"/>
       <binding name="X" binding="570425347"/>
       <binding name="Y" binding="570425346"/>
       <binding name="L" binding="570425348"/>
       <binding name="R" binding="570425349"/>
      </joypad>
     </controls>
    </snes9x>
    
  12. The first time you run Nestopia, perform the following configurations using a mouse:
    1. Press escape to display Nestopia's menu bar.
    2. Configure Nestopia to use joypads for input.
    3. Configure Nestopia to start in fullscreen mode.
    4. Set the audio output to SDL.
    5. After quitting Nestopia, edit /home/sprite/.nestopia/nstcontrols and replace the line STOP _ESCAPE with EXIT _ESCAPE. From this point on, you can access the Nestopia menu by pressing f.
  13. Modify /etc/asound.conf so that the HDMI sound device is the default:
    defaults.ctl.card	1
    defaults.pcm.card	1
    defaults.pcm.device	7
    defaults.timer.card	1
    
  14. XBMC's default behavior allows the use of the backslash key to toggle full-screen mode, but this is rarely useful. Copy /usr/share/xbmc/system/keymaps/keyboard.xml to /home/sprite/.xbmc/userdata/keymaps/, and edit the file to replace <backslash>ToggleFullScreen</backslash> with <backslash>OSD</backslash>.
  15. Using XBMC, perform the following configuration:
    1. Install video add-ons (e.g., select System→Add-ons→Get Add-ons→XMBC.org Add-ons→Video Add-ons→USTV VoD→Install).
    2. Install the Rom Collection Browser (i.e., select System→Add-ons→Get Add-ons→XMBC.org Add-ons→Program Add-ons→Rom Collection Browser→Install).
    3. Configure the Rom Collection Browser (i.e., select Programs→Rom Collection Browser):
      1. Create configuration: yes
      2. Scrape game information and artwork online
      3. Choose a platform: NES
      4. Path to NES emulator: /usr/bin/nestopia
      5. Emulator parameters: "%ROM%" (default)
      6. Path to NES ROMs:
      7. File mask: *
      8. NES artwork: /home/sprite/NES
    4. Turn off the RSS feed ticker (i.e., deactivate System→Appearance→Show RSS news feeds).
Email: www@flyn.org — ✉ 6110 Campfire Court; Columbia, Maryland 21045; USA