I’m starting to dust off some seasonal projects and realized I hadn’t made this simple tool public which others may find handy. With projects like the NeoPixel Tree it can be much quicker to code visual sequences locally instead of waiting for new firmware to upload to the MCU every time you want to tweak something.
Initially I didn’t want to mess with the internal drive of the iMac since I had both Mac OS 9 and Mac OS X installed, so I tried to install to a USB drive. Although the installation succeeded (albeit extremely slowly due to USB 1.1), the boot into the system failed due to the following error:
panic: rootfilesystem has size 0
Looking at the trace of the kernel boot process it was evident why: Even though we installed the OS to sd0 (the mounted USB device), the kernel kept trying to mount wd0 which is the internal IDE drive.
I tried what I knew:
Tweaking the boot-device variable in Open Firmware
Using a different USB slot
Booting into the recovery kernel (bsd.rd) and mounting the USB to see if I could tweak fstab
Supposedly if we get to the boot prompt we can pass a -a flag for the root device (docs), but I couldn’t figure out how to get there.
Ultimately I decided to install OpenBSD to the main internal drive for now. If I get a hankering for Mac OS 9 I still have the trusty Power Mac G4.
The best setup will eventually be a dual or triple-boot. Trying to make the super-slow USB drive work is probably a terrible idea unless we plan to run it in a ramdisk mode the entire time.
The graphics driver kinda works
As you can see from the glxgears output above graphics are not accelerated. I’ve mostly played with the machine over SSH in a headless state so this hasn’t bothered me too much. I did glance at dmesg and saw that the expected driver, nv, was loaded and detected the card so I’m not totally sure what’s happening. I’m having flashbacks of when I used to spend hours tweaking xorg.conf and that may be on the horizon again.
If just running the console we still want the screen to sleep and I found I needed to make a couple tweaks for that to work.
First I needed to shut down X Windows:
rcctl stop xenodm
Then I needed to disable output activity from waking the screen:
After that the screen would shut off after however many milliseconds were set for display.screen_off.
Copying over /etc/examples/wsconsctl.conf to /etc/ is a great starter config.
Oh yeah, it runs DOOM
(Very poorly, presumably until the graphics driver is tweaked)
Running Chocolate Doom was painful. Even the setup utility had a good second or so input lag!
I first want to acknowledge that I did the thing that I try to never do: I showed off a snazzy project, left some hints here and there of how it worked, said I would follow up with full details… and never did. That’s lame.
I’ve had multiple people reach out for more info and I’m glad they did, since that’s pushed me to finally get some repos public and this belated follow-up written. Apologies!
To jump straight to it, I’ve published these two repos:
Let’s first go over the hardware involved. The most important piece, of course, is the Alfa-Zeta XY5.
In my case, the 14×28 board was made up of two 7×28 panels connected together via RJ-11.
The panels are pricey, but they can be thought of as “hardware easy-mode”. Alfa-Zeta has done the hard job building the controller that drives the hardware and all we have to do is supply power and an RS-485 signal that abides by their protocol.
If you purchase a panel from them there are two important documents to request:
The main manual that describes the specs, features, and things like the DIP switch settings.
The protocol for sending commands to the controllers (which is really simple).
These can easily found by searching around, but if you own a panel the company should supply them. Most of the protocol can be deduced by looking at open source code.
I’m really happy that most modern monitors support DDC so that we can programmatically change settings rather than go through clunky OSDs.
At my desk I have my Mac Studio and my latest gaming PC and they both share a triple monitor setup. When I want to switch the monitors between the two, I either need to:
Turn on auto-switching mode
Manually change the input x 3
Auto-switching kinda worked, but has quirks I can’t live with. One is when I’m playing a game on the PC and the Mac wakes up for whatever reason, the PC receives a signal that hardware has been connected or disconnected and the screen freezes. It seems like a firmware bug to me – if an input is being actively used the others should be ignored.
The manual route is pretty bad as well. The M32U‘s input switchers are on the back of the monitor, which is pretty much the worst spot possible. Only the far right monitor is slightly more convenient to access.
How DDC solves it
By using m1ddc on the Mac we can easily script a way to switch between the two machines. 🎉 This means I can create a keyboard shortcut to toggle the inputs, a physical button, or even run it from an external computer. Hooray!
Edit: Now with web appi-ness!
I threw together a quick Flask app that can be accessed from any device on my network to switch inputs. Neato!