April 7, 2021

Retrogaming on a Mac

 I’m a gamer.  I’m into video games since the 80s & the path I’ve walked is littered with the remnants of game consoles-- Game & Watch, Game Boy, Game Boy Color (playing games like Tetris, Pokemon, Zelda, Super Mario Bros., etc.), the 80s one-peso arcade machines (Galaxian and Pacman), the NES (Nintendo Entertainment System)— better known in these parts as Chinese Family Computer knockoffs.  I even experimented with the Commodore 64 to make my own games.

Then I bought my first PlayStation One, playing arcade games until I discovered Metal Gear Solid (and later Silent Hill). I jumped back into PC gaming for a while then I moved on to the PlayStation 2—which, honestly, I bought specifically to play the sequels— and at least one prequel, of the Metal Gear saga (— just like when I bought a Switch specifically to play Zelda, but that’s another story). 

At the office, I used my computer— an XT with a green monitor, to play virus laden “cracked” DOS games (bought for P50.00 at the Makati Cinema Square) on floppy disks.  I also experimented with different word processors and mini DOS programs and PC viruses. It wasn’t long before the 286s (with black & white monitors) came along, then 386s and 486s with colored monitors. It was at this time that I saved up enough to get my own PC to play Red Alert, StarCraft, Commando and other RPGs (and strategy games), which, by the way, is my preferred type of gaming.  The thing with PC gaming though is that your machine becomes obsolete each time a new game comes out. You’ll need more RAM, faster CPUs, faster video cards, GPUs, higher definition and bigger screens to keep up to par with the latest games— it was an endless catch up to a technology that keeps evolving. It’s a rabbit hole if not an economically viable endeavor to say the least.  Thus, I limited my gaming to consoles. For my personal computing needs, I switched to a Mac— which obviously is NOT a gaming machine.

While I’ve now limited my gaming on the PlayStation 4 (and the Switch— and  the RG350, a cheap Chinese emulator game console that is unbelievably capable of emulating the PSOne, NES, GameBoy, etc.) it would be a blast to once again play the original Metal Gear Solid (and perhaps even Silent Hill) in the exact same way I originally played it in the PlayStation One.  I’ve given up on that (as I’ve also given up playing StarCraft once again since I do not see myself switching back to PC anytime soon).

Until I discovered OpenEmu— an open-source multi-game front-end interface designed for the Mac OS X that is capable of emulating various consoles’ hardware.

Installing OpenEmu is as simple as installing any other Mac application. Installing games on the OpenEmu is even easier— simply drag and drop the game files on the OpenEmu window and the game will be magically placed into their correct system heading. Configuring the input device of your choice— I’m using a PlayStation 4 DualShock controller, is likewise a cinch. The gameplay? Smooth as silk. 

N.B. I should mention that I also have Retro Pie running— initially as an experimental project, on a Raspberry Pi 3 (with the official Raspberry Pi 7-inch touchscreen Display) with the same games I have on the OpenEmu.

I love gaming. And yes, even on a Mac— maybe especially so.

Headless Set-up: Raspberry Pi Zero W

This is to document what works for me when setting up a Raspberry Pi headless.  This is by no means the product of my techie know-it-all mind, but rather a mash-up of the resources I gathered in the internet as I explored & struggled the first few times I set up a Raspberry Pi.  There are a lot of mistakes/misinformation out there which threw me off a few times, what I’ve done is merely to filter out the garbage to come up with this mainly for my own guidance & reference.  I’m using a macbook pro with Big Sur & setting up a Raspberry  Pi Zero W (but this guide worked just as well for my RPi 2 & RPi3 model B). 

Format the microSD card with the SD Formatter app (it’s free, & can be found on the SD Association’s website). The app is very straightforward to use.  I prefer the “Overwrite Format” option— “This deletes file/directory entries by initializing file system parameters of the card & erase all data by overwriting the user data area completely.” This option is more thorough, but it’s also much slower.

Download your choice of the official Raspberry Pi OS zipped image from their website— I prefer the Lite version.   There are several ways to flash the RPi OS onto a MicroSD card, you could go all out poser unix-show off & go all the way DD= but if you’re lazy like me—  perhaps the simplest in my experience is to do so by using Balena Etcher.   Following a three-step process, the RPi OS image is easily loaded in 5 minutes tops.  You need not even unzip the file, the app will conveniently do it for you.

Next, we’ll set up the network interface so we can ssh onto the RPi via wireless connection.


$ touch /Volumes/boot/ssh


We also need to define a wpa_supplicant.conf file for our

particular wireless network. Put this file in the boot folder, so

when the RPi first boots, it will copy that file into the correct 

location & use those settings to start up wireless networking.

Open the Terminal & create/edit:


$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf


Add the following at the bottom of the file:


country=PH

ctrl interface=DIR=/var/run/wpa_supplicant GROUP=netdev

update_config=1


network={

ssid=“your-internet-ssid-name”*

psk=“your-network-password”*

}


SSH is built into the MacOSX so no additional software need to be installed.

On startup, the RPi OS checks the contents of the boot directory, if it detects a wpa_supplicant.conf file, the RPi OS will copy the file into

/etc/wpa_supplicant, replacing any existing wpa_supplicant.conf file that may be there. The file on the boot directory is then deleted.  Likewise, if an ssh file is detected, the RPi OS will adjust it’s settings to accept SSH connections. The ssh file is likewise thereafter deleted. (This means that if something goes wrong we can always get the RPi back onto a wifi network by repeating the steps we’ve taken.)

Specific to the Raspberry Pi Zero W, put the edited SD card into the RPi0w SD slot, plug a Micro-USB power cable into the power port (the one closest to the end of the board). 

Run the following commands on the Terminal:


$ ssh-keygen -R raspberry.local

$ ssh pi@raspberrypi-local


The first command clears out any previous references to raspberrypi.local.  If the RPi did not respond, press Ctrl-C & try the last command again. When the connection works you will see a security/authenticity warning. Type yes to continue. You will see this warning only on the first time you connect.  Next, you will be prompted for the password for the RPi login: the default password is "raspberry". You should now be able to see the RPi prompt.

Proceed to configure the RPi by sudo-ing into raspi-config, then update the RPi OS. Your RPi should be good to go.