Sprite

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:

  • 1.8GHz Intel Atom processor
  • 2GB memory
  • Bluray/DVD player
  • WiFi and Ethernet network interfaces
  • HDMI audio/video output
  • USB ports (Only the front-left USB port works with the ZBOX BIOS during the initial stages of booting.)

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.
  • During installation, create a 2GB swap partition and a / partition that spans the rest of the disk.
  • Create a user named sprite.
  • Install the minimum set of packages.
  1. Use rpm -e to remove any unnecessary packages.
  2. 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
  1. Configure Sprite to boot in graphical mode: ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target.
  2. Install your public SSH key as /root/.ssh/authorized_keys and configure sshd to disallow password-based logins by editing /etc/ssh/sshd_config.
  3. /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
  1. /etc/sysconfig/network-scripts/keys-Auto_ExampleCom (replace ExampleCom and PSK):
WPA_PSK='PSK'
  1. /etc/hostname (replace example.com):
sprite.example.com
  1. /etc/sysconfig/network:
NETWORKING=yes
NETWORKWAIT=1
  1. /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>
  1. The first time you run Nestopia, perform the following configurations using a mouse:
  • Press escape to display Nestopia’s menu bar.
  • Configure Nestopia to use joypads for input.
  • Configure Nestopia to start in fullscreen mode.
  • Set the audio output to SDL.
  • 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.
  • 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
  • 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>.
  • Using XBMC, perform the following configuration:
    • Install video add-ons (e.g., select SystemAdd-onsGet Add-onsXMBC.org Add-onsVideo Add-onsUSTV VoDInstall).
    • Install the Rom Collection Browser (i.e., select SystemAdd-onsGet Add-onsXMBC.org Add-onsProgram Add-onsRom Collection BrowserInstall).
    • Configure the Rom Collection Browser (i.e., select ProgramsRom Collection Browser):
      • Create configuration: yes
      • Scrape game information and artwork online
      • Choose a platform: NES
      • Path to NES emulator: /usr/bin/nestopia
      • Emulator parameters: "%ROM%" (default)
      • Path to NES ROMs: ...
      • File mask: *
      • NES artwork: /home/sprite/NES
  • Turn off the RSS feed ticker (i.e., deactivate SystemAppearanceShow RSS news feeds).