Improving The Atari VCS (VCS Steam Machine v1.0)

Let me just start this number by admitting that, no, the Atari VCS isn’t a great value proposition on paper. It’s under-powered and the software support is lacking (at best). For $300, it’s not worth the money compared to a dedicated console or even a used enterprise small form-factor PC. That being said, the VCS is a fantastic little tinkering and casual gaming platform if you can find it on sale!

I grabbed an “All-In” bundle and an extra classic controller (I already had a modern controller on hand) for under $200US after Thanksgiving with the intent to see what it was all about. There’s a lot of hate surrounding this little console, and I feel like much of it is undeserved–especially comparing it to something like the Steam Deck. While the Steam Deck is slightly more powerful on paper (and portable), the VCS is still a gorgeous piece of hardware that is not only upgradeable, but also significantly less expensive even factoring in those upgrades. The VCS does have its problems, though: AtariOS looks pretty good, but it’s hobbled by virtually nonexistent software support. Thankfully, Atari had the foresight to allow alternative operating systems to be installed (remember when you could officially run Linux on a PlayStation 2?). It’s in this spirit that I’m documenting my journey to build a custom TV-based gaming console. The hardware is mostly settled: I have a VCS with 2 modern controllers and 2 classic controllers. I’ve already installed 32GB of RAM and once I’m finished, I’ll install an SSD for internal storage (there are myriad videos showing the process for both, so I won’t detail them here). For now, development will take place on an external HDD.

Extracting the bits I want to keep

AtariOS is pretty slick, but it does leave a bit to be desired in the software department. Since this is a Debian-based system, I want to be able to add my own games (or, at least, launchers such as Steam, Epic, or–ick–Amazon, but the only way I’ve found to do so is through Atari’s homebrew portal. Unfortunately, my research tells me that homebrew is only available to developers who have submitted work to Atari for inclusion in their store. Even still, I prefer to have all my games under one unified interface instead of trying to remember which ones I bought through Steam or GoG and which ones I got free from Epic and Amazon, so the best option is to try and use it as the basis for a frontend theme under an alternative OS.

First off, I absolutely love the boot animation featuring Asteroids, so I need to find it hidden in the firmware. It’s a pretty bog-standard Debian partition, so I can fire up a Kubuntu Live USB and dig around the file system. Except that I can’t because Secure Boot is active on the BIOS.

Disabling Secure Boot in BIOS

Spamming the Escape key during boot will drop you into the BIOS menu, but evidently I updated the BIOS on my fresh boot of the VCS, so I can’t access any of the settings without the right password. This isn’t too big a problem to solve, but finding the firmware flasher is the difficult part as Atari saw fit to remove it from their servers. Fortunately, someone has posted the image to the Internet Archive, so it’s still available until it’s not. Burn it to a USB stick and boot it up to revert the BIOS to the previous version. From here, use the BIOS password Atar!C3l3br8te$50Ye4r$ to disable secure boot (and change the BIOS password while you’re at it).

Locating the boot animation

Now that I’ve got a Kubuntu Live instance running, I can fire up Dolphin and dig around the embedded file system to see if I can locate any goodies. The Asteroids boot animation is located at rootfs/usr/local/dashboard/Dashboard_Data/StreamingAssets/BootSplashHD.webm, so I can copy that for use later.

The Atari VCS Vault

The other piece of embedded software that I want to keep is the VCS Vault, a rebranded version of the Atari Vault software package from 2016. There’s no DRM on it, so it can easily be copied from storage/games/vault. There are also some artwork assets in rootfs/usr/local/dashboard/Dashboard_Data/StreamingAssets/LocalPortalsData that might prove useful later as well. There are a few other bits and bobs, such as the embedded Stella, MAME, and DOSBox emulators that can be made visible on the main menu, but nothing unique that I really need before building the new system.

SteamDeck as inspiration

Atari offers an optional USB with a custom Debian distro for their “PC Mode”. It’s pretty, but I’m really only interested in the wallpaper. For my custom VCSOS, I’m going to take the Steam Deck as inspiration and attempt to boot directly into a games launcher with a desktop mode accessible underneath. The Steam Deck uses a custom distribution of Arch Linux which is a bit of a departure for me, so I’ll stick with an Ubuntu-based installation that I’m more comfortable with. For the desktop environment, I’ll use KDE Plasma like the Steam Deck (because it looks good and works well). I could use HoloISO, but I’m not trying to build an exact Steam Deck clone and I’m not sure what kind of jiggery-pokery the developer employed to “reverse engineer” SteamOS3, so I’ll stick with the ground-up approach.

Backing up AtariOS

Redo Rescue is a Debian-based live USB that can be used to image hard drives for backup and restore purposes. Boot the live USB and follow the directions to image the embedded flash memory to a separate USB drive. This image can be restored to a USB flash drive later through the Redo Rescue interface if you need to access AtariOS.

Install Kubuntu

The one thing I don’t like about Kubuntu is the fact that it installs with quite a lot of bloatware, but the current version of Ubuntu Server Edition has a problem with WiFi radio drivers otherwise I would’ve just installed KDE Plasma on top of it and have a beautiful minimal OS installation. Instead, I needed to take a few minutes to uninstall all the unnecessary packages (games, LibreOffice, etc.).

Install kio-admin

Now, call me spoiled or lazy, but I prefer to do my file management through the GUI instead of typing lines upon lines of commands. As such, I’ll need to install the kio-admin package which gives me a context menu option to open folders as admin. It’s just one of those little things that makes life a little easier when messing around with protected system files. To install, you’ll need to add the backports repo to apt:
sudo add-apt-repository ppa:kubuntu-ppa/backports
sudo apt-get update
sudo apt install kio-admin

Install AMD GPU Drivers

sudo apt update
sudo apt dist-upgrade
dpkg --add-architecture i386
sudo apt update
sudo apt install mesa-vulkan-drivers mesa-vulkan-drivers:i386

Quieting the boot log

Part of the Linux aesthetic is the firehose of system log entries that post during boot, but I’m trying to get this system as close to a “console” as possible (despite the longish cold boot time) so I need to change a couple of kernel options in the GRUB bootloader. To do this, open /etc/default/grub in a text editor and change the following values:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=0"
GRUB_CMDLINE_LINUX="loglevel=0"

Once the changes are saved, invoke sudo update-grub at the command prompt and reboot. The Atari logo and Kubuntu splash animation should show with no other text displayed.

Install Steam

sudo apt install steam steam-devices x11-utils

Customize Kubuntu

At this point, we start making Kubuntu look more like a polished product. The easiest way is to customize the Plasma desktop environment to make everything a little more polished. Since most of my games are on Steam (and because it already has Proton integrated), I’ll use that as the main UI. I attempted to boot directly into Steam, but it proved more trouble than it was worth, so we’ll stick with launching Big Picture Mode from the Plasma desktop. Other customizations that I recommend:

  • Disable lock screen
    system settings>workspace behavior>screen locking
  • Paste the wallpapers from AtariOS in /usr/share/wallpapers and enable in settings
  • Disable blink LED on sleep
    BIOS>Setup Utility>AMD PBS>BLINK LED>Disable
  • Enable NumLock on boot
    BIOS>Setup Utility>Advanced>Boot Configuration
  • Copy VCS Vault to storage and add to Steam (Make LauncherScript executable and change ownership)
  • Install SGDBoop
  • Configure fstab to mount drives automatically
  • Disable Plasma Splash Screen
  • Automatically log in

Install Custom Plymouth Theme

While I’m not opposed to the Atari “Fuji” logo hanging out during the boot sequence, I take some umbrage at the Kubuntu logo flashing below it. It’s nothing extremely bothersome, but I would prefer to minimize the OS branding to keep the system looking as much like a “console” as possible. As such, I put together a simple boot animation using the Atari VCS logo rotating through its color scheme that shows for a few seconds while everything loads from the internal memory. To get the theme installed, copy it to the /usr/share/plymouth/themes/ folder, then invoke the following command to actually install it:
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth /usr/share/plymouth/themes/mytheme/mytheme.plymouth 80
That last number is a way to indicate to Kubuntu what priority the particular theme should take if there are multiple themes installed–just in case something goes wrong. It’s essentially arbitrary since we’re going to manually select it:
sudo update-alternatives --config default.plymouth
Optionally, you can delete any other themes that are installed if you’re not going to use them using the following command:
sudo update-alternatives --remove default.plymouth /path/folder/theme/to/uninstall/file-theme.plymouth
Finally, you just have to update the initial RAM file system to activate the new theme on boot:
sudo update-initramfs -u

Wake from Bluetooth

One last thing we need to do is re-enable the wake with controller function that AtariOS had. Unfortunately, this functionality still isn’t baked into Ubuntu yet. To do this, we need to drop a couple of scripts in /usr/local/sbin/ to handle selecting the device for wakeup (the Bluetooth radio) and the wakeup function itself. Full credit for this goes to Nicholas Bernaerts whose defunct website  outlined the process in detail. The first thing is to make sure that “Wake On USB” is enabled in BIOS (unless you changed this, it should be). Once that is confirmed, you’ll also need to verify that the Zenity package (sudo apt install zenity) is installed. At this point, we can put our scripts together:
sudo nano /usr/local/sbin/enable-wakeup
sudo nano /usr/local/sbin/select-resume-devices
sudo chmod +x /usr/local/sbin/enable-wakeup
sudo chmod +x /usr/local/sbin/select-resume-devices

Copy the code for each of the scripts to the correct file using either Nano or (my preference) Kate, then you can launch the select-resume-devices script (sudo /usr/local/sbin/select-resume-devices). This will bring up a window where you can select which USB device(s) you want to enable wake with. Once finished, you can verify the process by checking the 90-hid-wakeup-enable.rules file created in /etc/udev/rules.d/. Finally, reboot the system for everything to take effect.

enable-wakeup

#!/bin/bash
#
# Script to enable a USB devices to be used to resume computer from sleep
#
# Depends on udevadm package
# 09/05/2012 - V1.0 by Nicolas Bernaerts

# if device has been removed, exit
[ "$ACTION" = "remove" ] && exit 0

# set PATH as it is not set for udev scripts
PATH="/usr/sbin:/usr/bin:/sbin:/bin"

# set device SYSFS path
DEVICE_SYSFS="/sys$1"
CURRENT_SYSFS=$DEVICE_SYSFS

# get device product and vendor name from parent SYSFS
DEVICE_VENDOR=`udevadm info --query=all -p "$CURRENT_SYSFS/../" | grep "ID_VENDOR_ID=" | cut -d "=" -f 2`
DEVICE_PRODUCT=`udevadm info --query=all -p "$CURRENT_SYSFS/../" | grep "ID_MODEL_ID=" | cut -d "=" -f 2`
DEVICE_LABEL=`lsusb | grep "${DEVICE_VENDOR}:${DEVICE_PRODUCT}" | sed 's/^.*[0-9a-f]\:[0-9a-f]* \(.*\)$/\1/g'`

# loop thru the SYSFS path, up to PCI bus
CARRY_ON=1
while [ $CARRY_ON -eq 1 ]
do
  # get the first three letters of current SYSFS folder
  FIRST_LETTERS=`basename $CURRENT_SYSFS | sed 's/^\(...\).*$/\1/g'`

  # if current SYSFS is PCI bus, stop the loop
  if [ "$FIRST_LETTERS" = "pci" ] || [ "$FIRST_LETTERS" = "/" ] ; then
    CARRY_ON=0

  # else,
  else
    # if possible, enable wakeup for current SYSFS
    WAKEUP_FILE="${CURRENT_SYSFS}/power/wakeup"
    if [ -f $WAKEUP_FILE ]; then
      echo "enabled" > $WAKEUP_FILE
    fi

    # go to father directory of current SYSFS
    CURRENT_SYSFS=`dirname $CURRENT_SYSFS`
  fi
done

# log the action
LOG_HEADER="USB device ${DEVICE_VENDOR}:${DEVICE_PRODUCT}"
logger "${LOG_HEADER} - Description : ${DEVICE_LABEL}"
logger "${LOG_HEADER} - SysFS path  : ${DEVICE_SYSFS}"
logger "${LOG_HEADER} - Device is enabled to handle suspend/resume"

select-resume-devices

#!/bin/bash
#
# Script to create resume udev rules for USB devices
#
# Depends on zenity
# 09/05/2012 - V1.0 by Nicolas Bernaerts

# udev file to generate
UDEV_FILE="/etc/udev/rules.d/90-hid-wakeup-enable.rules"

# set separator as CR
IFS=$'\n'

# list all USB devices, excluding root & hubs
LIST_DEVICE=(`lsusb | grep -v "0000:0000" | grep -iv "hub" | sed 's/^.*[0-9a-f]\:[0-9a-f]* \(.*\)$/\1/g'`)

# loop thru the devices array to generate zenity parameter
for DEVICE in "${LIST_DEVICE[@]}"
do
  # if needed, remove [xxx] from device name as it gives trouble with grep
  DEVICE=`echo "$DEVICE" | sed 's/\[.*\]//g'`

  # add it to the parameters list
  ARR_PARAMETER=( FALSE ${DEVICE} ${ARR_PARAMETER[@]} )
done

# display the dialog box to choose devices
TITLE="Wakeup - Enable USB devices"
TEXT="Please, select USB devices you want to use to resume your computer"
CHOICE=`zenity --list --width=600 --height=250 --text=$TEXT --title=$TITLE --checklist --column "Select" --column "Device name" "${ARR_PARAMETER[@]}"`

# slit the device choice into an array
IFS="|" read -a ARR_CHOICE <<< "$CHOICE"

# if at least one device has been selected, initialise udev rules file
[ ${#ARR_CHOICE[@]} -gt 0 ] && echo "# udev rule for USB wake-up of selected devices" > $UDEV_FILE
[ ${#ARR_CHOICE[@]} -gt 0 ] && echo "#" >> $UDEV_FILE

# loop thru the selected devices to create udev rules
for DEVICE_NAME in "${ARR_CHOICE[@]}"
do
  # get current device data
  DEVICE_DATA=`lsusb | grep "${DEVICE_NAME}" | sed 's/^.*ID \([0-9a-f]*\):\([0-9a-f]*\).*$/\1|\2/g'`
  DEVICE_VENDOR=`echo $DEVICE_DATA | cut -d"|" -f1`
  DEVICE_PRODUCT=`echo $DEVICE_DATA | cut -d"|" -f2`

  # create udev rule for current device
  DEVICE_RULE="SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"$DEVICE_VENDOR\", ATTRS{idProduct}==\"$DEVICE_PRODUCT\" RUN+=\"/usr/local/sbin/enable-wakeup \$env{DEVPATH}\" "

  # add udev rule for current device
  echo "# ${DEVICE_NAME}" >> $UDEV_FILE
  echo ${DEVICE_RULE} >> $UDEV_FILE
done

# if at least one device has been selected, display notification
TITLE="USB resume enabled"
TEXT="Your USB devices are resume enabled.\nTo finalize configuration you have to do one of these actions :\n- replug USB devices\n- reboot the computer"
[ ${#ARR_CHOICE[@]} -gt 0 ] && notify-send --icon=media-eject $TITLE $TEXT

Customize Steam

At this point, the VCS is ready to go. You can fire up Steam from the desktop and go to town, but there are 2 more tweaks that I want to make to Steam for the full console effect. The first is simply getting Steam to run at boot. You can do this easily by adding Steam to the Autostart list in Plasma’s system settings, but you’ll want to make sure to add the -bigpicture flag to the command so that it opens in Big Picture mode. The last thing is to add the Asteroids boot animation that we scavenged from AtariOS to Steam’s startup. In the Steam installation’s configuration folder (~/.steam/steam/config/), create a folder called uioverrides, then inside it create a folder called movies. Copy the video file to this location. In Steam’s configuration menu, you should see a dialog where you can select the startup animation as well as select whether you want to play the video when you wake from sleep or not. Now, you’re ready to go–reboot, install some games, and get to playing!

Have you played Atari today?