Some Bits: Nelson's log

4 posts in November 2024

MuOS on Anbernic

I’m still tinkering with my Anbernic RG35XX, a remarkable cheap retro gaming handheld. This time around I’m looking at muOS, the most popular third party firmware. It’s a Linux distribution with emulators bundled up and a decent simple UI. It has pretty good hardware compatibility with the console, stuff like Bluetooth is said to work.

The installer takes a long time but when it finishes you’re left with a tidy system. Here’s what’s on the SD card after install

Number  Start (sector)    End (sector)  Size       Code  Name
   1           73728           90111   8.0 MiB     EF00  spare
   2           90112          155647   32.0 MiB    EF00  boot-resource
   3          155648          188415   16.0 MiB    EF00  env
   4          188416          319487   64.0 MiB    EF00  boot
   5          319488         8708095   4.0 GiB     EF00  rootfs
   6         8708096       124735484   55.3 GiB    0700  roms

More or less like the Anbernic stock OS with a bewildering array of tiny partitions related to system booting. Sensibly they put the roms on the last partition where it can be resized easily. One nice thing about muOS: when you install it, it resizes that partition to use up the rest of your SD card. The popular tiny-best-set-go collection of ROMs is about 8GB, so you can fit a full capable retrogaming system with ROMs in a 16GB SDcard.

Surprisingly that ROMS partition isn’t empty after installing the stock muOS distribution. But I don’t think it has any copyrighted games in it. It’s got 3.7GB of stuff in it though. Not sure what all is there, it looks like stuff RetroARCH needs like emulation libraries, music files, shaders, some cheats.

The root filesystem is 1.3GB. The core system seems to be based on busybox. I don’t see any evidence of apk though, so maybe not Alpine. Something custom? No systemd either, no surprise. /opt has openssh, java (?!), and a big directory for openssh with bloated things like tailscaled, syncthing, and rclone in it. Useful software but not quite in keeping with the tiny core. Odd hybrid, I wonder if it’s documented.

It seems to work to unpack the Tiny Best Set into the ROMS directory on muOS and have a bunch of playable games. No need to use the second SD slot.

Google Pixel vs. screen casting

Roku has a nice feature where you can easily mirror video from your Android or Apple phone or tablet right to your TV. Super easy from my Samsung tablet: just launch “Smart View”, select the Roku on your LAN, and off it goes. There’s some nice extra UI for mirroring vs second screen, etc.

None of this works on my Pixel phone. I launch “Cast” and it just sits there, not finding any devices, no feedback why.

I was guessing it was some sort of networking gremlins until I asked an AI. Turns out this is just Google screwing over its customers on its flagship Android phone. Details here

Rokus accept casting via Miracast and Apple Airplay. Google dropped Miracast from its Pixel phones in 2013 in order to push its own Chromecast protocol.

Thanks Google! That anti-trust action can’t happen fast enough.

I’ve never really read about Miracast before. It’s a widely adopted standard, basically “HDMI over Wi-Fi”. Seems to work great. Shame Google crippled their phones to not support it. I did find some Miracast apps on the Play Store but there’s a bunch of them, they all look dodgy, and they all want to charge me a surprising amount of money. So I’ll just stream from my Samsung tablet that works.

I was already holding off upgrading to another Pixel phone, here’s another reason to switch over to Samsung. The Android on my tablet is quite nice.

Anbernic firmware options

Still tinkering with this retrogaming handheld, an Anbernic RG35XX-H. Curious now about firmware options. Sources include here (out of date) and here and here and this AI answer.

  • Stock Anbernic firmware. Mostly running RetroArch, presumably does a good job with hardware drivers. My specific model is downloadable here. Latest seems to be dated 2024-10-18. I think the version that shipped with my device is 2024-01-12. (I updated and it seems nicer, more consistent UI.) One thing I’m clear about is whether there are 64 bit versions. The version that shipped is 32 bit.
  • MOD4, the stock firmware modified with things like an FTP server, NTP to set the clock, etc.
  • cbepx-me mods, another modified stock firmware.
  • Knulli, a fork of Batocera, an OS popular with the RPi crowd. The FAQ says it’s forked because of a license issue with closed source kernels. I couldn’t even find a Batocera download for the RG35XX. Koriki is another Batocera fork you see mentioned sometimes, made to be smaller / lighter.
  • muOS. Another full featured custom system, not sure what distinguishes it from the others. It looks like a pretty solid product though and folks on Reddit like it. Said to boot fast.
  • GarlicOS, so called to remind people of OnionOS, a firmware for a different retrogaming device. More info here. It’s.. medium sized, if I can say that? 250MB for the rootfs. Comes in 32 and 64 bit versions. The install instructions make it sound like you put it on top of the stock firmware, huh.
  • MinUI with an emphasis on being minimal. Quite small, 60MB for the whole thing (with extras) compared to 2GB for some others. Somewhat limited set of emulators for consoles. It installs on top of the Anbernic firmware.

Broadly speaking the firmware is doing two things.

  1. Booting and device drivers and basic system stuff. Also enhancements like network support, customizability of the UI, etc.
  2. A series of emulators. RetroArch is king here but there’s others.

I can imagine a lot of room for experimentation with usability, convenience features like networking, etc. Seems like a fun and vital area of hackery.

Update: a little poll on Reddit has MuOS as the popular choice by far.

Anbernic default OS

I got an Anbernic RG35XX H, a remarkable inexpensive retrogaming handheld computer. Apparently it’s an Android device at its core but it ships with an OS and GUI that is entirely about launching game emulators. And it’s really a Linux system. I hope to customize or at least upgrade the software, maybe starting with this guide.

The device was shipped to me with a 64 GB MicroSD Card that booted. Mostly it runs RetroArch and it had a wide variety of ROMS preloaded. Here’s what’s on it.

The card has six partitions:

Number  Start (sector)    End (sector)  Size       Code  Name
   1           73728        96542719   46.0 GiB    0700  Roms
   2        96542720        96608255   32.0 MiB    0700  boot-resource
   3        96608256        96641023   16.0 MiB    0700  env
   4        96641024        96772095   64.0 MiB    0700  boot
   5        96772096       113549311   8.0 GiB     0700  rootfs
   6       113549312       121063423   3.6 GiB     0700  UDISK

Partition 1, Roms, is a FAT filesystem. With a bunch of presumably unlicensed ROMs on it, naughty naughty. There’s 45 different systems here! There’s 700 ROMs for Atari 2600, for instance, although they stop at the letter H. 466 for GBA but the whole alphabet is represented. So a sort of demo collection but not carefully curated. Other big directories under Roms include bios, anbernic/bezels, and save. That save directory includes save games created by emulated ROMs I had run.

Partition 2, boot-resource, is a FAT filesystem. It contains a few images in BMP format for battery state, a boot logo, etc.

Partition 3, env is a mystery. File just says it is “data”. The first few bytes include what looks like Linux kernel command line parameters. Probably part of the boot chain.

Partition 4, the Boot, looks like a “Android bootimg”. It doesn’t have a filesystem I can boot. Maybe these tools would help.

Partition 5, the RootFS, is an ext4fs that has an ARM32 Ubuntu 18 (!) system. Presumably this is the OS for Anbernic. The directory /mnt/vendor seems to have all the interesting game related stuff in it.

  • vendor/deep/retro is the biggest software package, it’s RetroArch.
  • vendor/deep also contains PPSSPP (PSP), openBOR (side-scrollers), and drastic (Nintendo DS)
  • vendor/bin/game has what look like a bunch of emulators in it, 32 bit ARM executables.
  • vendor/ctrl looks like shell scripts for the Anbernic system, things like mounting SD cards or configuring CPU parameters.
  • vendor/oem/version.ini is handy, it tells me 20240112.

Partition 6, the UDISK, is an ext4 filesystem. It’s basically empty but has stuff called dmenu and save in it.