I'm building a sort of mini arcade machine out of a Mac Classic and a Raspberry Pi, with a pair of SNES controllers and wireless keyboard and mouse. This blog documents my progress.
Don't wanna be here? Send us removal request.
Text
Installing the BasiliskII 68K Macintosh Emulator on the Raspberry Pi - Part 3
If you've been following the first two parts, you should now be able to launch BasiliskII from within X11. At this point I was also able to launch BasiliskII from the command line but only when connected to HDMI, and not at all on my RetroPie image. I'm not sure what the reason for this was, but I was getting errors that essentially said it wasn't able to initialize the display. As it turns out, Basilisk requires that the X server be running even when run from the command line, and in some cases it wasn't able to start it on its own.
xinit starts the X server and a single X11 app without the overhead of a window manager. I've found this to be the most reliable way to launch BasiliskII on the Pi. The following command should do it:
xinit `which BasiliskII`
I found on one of my SD cards that running BasiliskII from the command line caused it to complain that the audio device was missing. I solved that by first running "sudo modprobe snd_pcm_oss" and then the command.
My goal was to be able to launch BasiliskII from the EmulationStation interface, the same as any other emulator in RetroPie. For this, we needed two things: an entry in the .es_systems.cfg file, and an EmulationStation theme for the system.
Here's a copy of my theme files. Feel free to replace the image with your own.
Download and unzip the theme file in the ~/.emulationstation folder.
Add the following to your es_systems.cfg file:
DESCNAME=Basilisk II
NAME=basiliskii
PATH=/home/pi/RetroPie/roms/basiliskii
EXTENSION=.txt
COMMAND=sudo modprobe snd_pcm_oss && xinit `which BasiliskII`
# Or possibly just COMMAND=xinit `which BasiliskII`
Also, create a "basiliskii" folder in your RetroPie/roms directory, and inside that create a txt file called Start.txt.
Now restart EmulationStation. You should now be able to launch Basilisk from the menu, and have a nice looking theme as well!

2 notes
·
View notes
Photo

This'll have to do until I have the time to take some better photos. Here's the nearly finished PiMac running the BasiliskII emulator, enjoying a game of Lode Runner.
2 notes
·
View notes
Text
Installing the BasiliskII 68K Macintosh Emulator on the Raspberry Pi - Part 2
Our next task now that Basilisk II is installed is to create a hard disk image and install System 7. Fortunately, all the classic Mac software we will need is freely available online. You will need:
A bootable DiskTools image. Download it here.
A compatible ROM file. I used a Color Classic ROM. Quadra & Performa machines are also good. A quick google search turns up many sources. I found mine here.
The 19 installer parts files for System 7.5, provided by Apple at their website.
Place your ROM and the DiskTools image into the same folder as BasiliskII. Next, create a folder somewhere convenient on your Pi and place the installer parts into it. This will be the shared folder that will allow us to move files from Linux to the emulated Mac, and it will show up as a disk on the Mac desktop.
Start X11 on your Pi. Run BasiliskII and configure its options using the GUI. In the Volumes tab, click Add and select the DiskTools image. This will be our initial boot disk.
Next we'll create a file that will be used as the main hard drive for the Mac. Click create and select a folder to place the file in. Set a size somewhere around 100mb-500mb depending on how much space you think you'll need. Give it a name and click OK
Now we'll create one more disk with a size of 100mb. Name it InstallerParts.
Now, type the path to your shared folder (with the 19 System 7 installer parts in it) into the "Unix Root" field in the GUI. This will be something like /home/pi/macemu/shared. Make sure the path is accurate.
Now switch to the Graphics/Sound tab. Leave the video type set to Window (for now) and set 30HZ and 640x480 resolution.
Next move on to the Serial/Network tab. Set the Ethernet interface to slirp. Ignore the rest of the settings.
Now move on to the Memory/Misc tab. Set the amount of memory available to BasiliskII. I used 32, the largest amount that would fit in a Color Classic. Set the Mac Model to Quadra 900 and set the CPU type to 68040. (We will be changing these after we finish with DiskTools.) Also select your ROM file. Check both boxes for "Don't use CPU when idle" and Ignore Illegal Memory Access."
Ok, we're done with those for now. Click Start and watch it boot!
Once it boots it will discover the hard drives we created and offer to initialize them. Give the first disk (your main hard drive image) an appropriate name and initialize it. Do the same for the second, 100Mb disk, and name it Installer Parts.
On your desktop you'll see icons for the DiskTools floppy (our startup disk), your new hard drive, the Installer Parts drive, and "Unix" which is your shared folder within Linux.
Open the "Unix" hard drive and copy all 19 files into "Installer Parts."
On the “Installer Parts” disk, start the installation of Mac OS 7.5 by double-clicking the first part called “System 7.5.3 01of19.smi”. A CD image icon will appear on your desktop. Double-click it and start the installer contained in the folder that opens.
Follow the prompts to install System 7.5 onto your hard drive. When it's finished, quit the installer.
Now shut down the emulated Mac. You should be able to just close the window.
Now to finish up, open BasiliskII again (still in X11) and remove the DiskTools image and the InstallerParts image from your Volumes list. Next click over to the Memory/Misc section and change the Mac Model ID to support System 7.x. (I chose Mac IIci.) Also switch to the Graphics/Sound section and choose Fullscreen.
Click start. You should see some super awesome boot-up action!
Last you may wish to disable the GUI. In the next part we'll be setting up a shortcut to launch Basilisk from the EmulationStation menu, so disabling the GUI screen means it'll jump straight to the Mac desktop. Basilisk II stores its preferences in the home folder in a file called .basilisk_ii_prefs. In that file you just want to change "nogui false" to nogui true". You can do this with whichever text editor you prefer. For example, from the command line you could type "nano ~/.basilisk_ii_prefs
If your only goal was to be able to run BasiliskII from the command line or X11, you're done! If, like me, you want to integrate it into the EmulationStation menu along with the other emulators in the RetroPie image, continue on to Part III!
2 notes
·
View notes
Photo

Progress! I got the screen installed. More photos to come as the work continues.
1 note
·
View note
Text
Installing the BasiliskII 68K Macintosh Emulator on the Raspberry Pi - Part 1
BasiliskII is an open source 68000 Macintosh emulator that can run on a variety of operating systems and processor types. Since I'm building my PiMac in the body of a Macintosh Classic, I very much wanted it to be able to run some of the great software I remember from that venerable machine. I've been able to install BasiliskII with Macintosh System 7 alongside the rest of the RetroPie emulators under Raspbian and I'll be detailing my process here.
cd to the directory where you want to download the source, and clone the github. I installed alongside the other emulators in the ~/RetroPie/emulators/ directory
# cd ~/RetroPie/emulators/ # git clone git://github.com/cebix/macemu.git
Next, cd into the source directory
# cd macemu/BasiliskII/src/Unix
Run autogen.sh
#./autogen.sh
Now run configure with the following flags. There is no JIT compiler for ARM so we must disable it.
# ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler
Edit: Apparently in the above line, Tumblr is replacing two "-" characters with a single long dash. If you're copying and pasting, each argument (such as enable-sdl-video) should begin with "dash dash".
Now make, and make install. This will likely take a while.
# make # make install
BasiliskII is now ready to run.
You may be able to run it from the command line with the command "BasiliskII", but initially I was only able to get it to run from within the window manager. Eventually I discovered I could run it from the command line with the command:
#xinit `which BasiliskII`
In the next part, we'll talk about configuring BasiliskII and installing System 7 from the disk images Apple kindly provides on its website.
3 notes
·
View notes
Photo


Getting started with building. Here you can see the screen I am using (I'll be adding a bezel, but it's a great size) as well as one of the SNES controller ports, which fit well in the SCSI and Disk port cut outs.
1 note
·
View note
Photo

I’ll be connecting the SNES controllers to my Pi with the RetroPie GPIO adapter. GPIO is short for General Purpose Input-Output. I could do this with USB as well, but GPIO makes the whole thing accessible to Python code and means I can be more flexible with how the controllers actually work. And since this adapter is made by the creator of the RetroPie project, it’s well supported by the software with lots of example code. This is one of the little touches I hope will put my PiMac a cut above other similar projects.
0 notes
Text
Installing and configuring PiSNES
Currently, the best SNES emulator available for the Raspberry Pi is PiSNES, a nicely done port of an early (faster, less accurate) version of SNES9x. It's recently been incorporated into the RetroPie-Setup script, though it's not (as far as I know) currently the default. I highly recommend installing and configuring it. You can either install it from their Google Code page, or from RetroPi-Setup. I'll be going over the latter.
Start the RetroPie-Setup script.
cd RetroPie-Setup
./retropie-setup
Select Install from sources and deselect everything except Install PiSNESEmulator. Then run the installation, and exit RetroPie-Setup.
PiSNES is installed in ~/RetroPie/emulators/PiSNES. Inside you'll find two executables: snes9x and snes9x.gui. As you may have guessed, the .gui version has its own interface and is meant to be run from x11 or directly from the terminal, whereas snes9x is meant to be run from RetroPie or as part of a command line argument like "snes9x /path/to/your/rom/".
To run PiSNES from EmulationStation, you'll need to edit the ~/.emulationstation/es_systems.cfg file to point to it instead of RetroArch. Fortunately, the RetroPie-Setup script adds the command for you as an alternative. Just comment out the COMMAND line that's currently in use and uncomment the one that points to PiSNES.
You'll also need to configure PiSNES to work with your gamepad, and possibly to fit your display. Its configuration file is in the same directory as te executables, and is called snes9x.cfg. Configuration is fairly straightforward if you know the numeric codes for all the buttons on your gamepad.
[Keyboard]
# Get codes from /usr/include/SDL/SDL_keysym.h
A_1=100
B_1=99
X_1=115
Y_1=120
L_1=97
R_1=102
START_1=13
SELECT_1=9
LEFT_1=276
RIGHT_1=275
UP_1=273
DOWN_1=274
QUIT=27
ACCEL=8
[Joystick]
# Get codes from "jstest /dev/input/js0"
# from package "joystick"
A_1=1
B_1=2
X_1=0
Y_1=3
L_1=4
R_1=5
START_1=9
SELECT_1=8
QUIT=10
ACCEL=10
QLOAD=10
QSAVE=10
A_2=1
B_2=2
X_2=0
Y_2=3
L_2=4
R_2=5
START_2=9
SELECT_2=8
QUIT=10
ACCEL=10
QLOAD=10
QSAVE=10
[Graphics]
StretchVideo=1
MaintainAspectRatio=0
DisplayBorder=0
AutoFrameskip=1
Frameskip=200
Transparency=1
CPUCycles=100
[Sound]
APUEnabled=1
# Sound rates below as index, i.e. 7=44100 (some of these produce static)
# 0, 8192, 11025, 16000, 22050, 29300, 32000, 44100
SoundPlaybackRate=7
InterpolatedSound=0
On my screen, StretchVideo=1 and MaintainAspectRatio=0 allowed the image to fill my screen edge to edge, but you may prefer different settings, particularly if you are using a widescreen display.
0 notes
Link
Since its release, the $35 Raspberry Pi mini-computer has been hailed as the perfect all-in-one retro game console. Now, it’s easier to do than ever, and it doesn’t take any advanced Linux knowledge. Here’s how to make your own retro game console in about 30 minutes.
This is a competent overview from Lifehacker (the New York Times of the competent if painfully obvious overview article) that does a pretty good job of getting you started with the Raspberry Pi as a gaming console with RetroPie. Hopefully it’ll get you past the pouring-through-forums stage and into the playing-some-damn-Mega-Man stage!
0 notes
Photo

System 7!
Thanks to Derek Warren, I was able to get BasiliskII running over composite on my Pi. It's emulating a Color Classic running System 7.5. This was a photo of the first boot; I'll post higher quality photos and instructions soon.
0 notes
Text
Adding the gpSP Game Boy Advance emulator to RetroPie
The Game Boy Advance is perhaps my favorite video game system of all time. The games are similar to the SNES, but with subtle technical advancements like great sprite scaling and rotation, great sound, and there is a really huge library of games in all genres. It’s kind of like a console from another dimension, where they didn’t quit developing for the SNES until the mid 2000’s.
That’s why I was a bit disappointed that the default GBA emulator in RetroPie is the RetroArch GBA core that runs intolerably slowly on the Pi. Fortunately, a good alternative is available. gpSP is a GBA emulator targeted at lower end portable devices, and it prioritized speed over accuracy. It runs full speed on the Pi, and now is a part of the RetroPie-Setup script, though you must specifically choose to install it.
I installed and configured it before it was added to RetroPie-Setup. I will describe my process here. Perhaps later I will try installing from the script and update these instructions if that method is easier.
cd /home/pi/RetroPie/emulators
git clone git://github.com/DPRCZ/gpsp.git
cd gpsp/raspberrypi
make
This will take a while. If you have any crashes while it is compiling or if it exits with an error, try increasing the memory available to your Pi’s CPU (by using “sudo rasp-config” and decreasing the memory allocated to the GPU) and trying again.
You have now built the gpSP binary. Our next task is to edit the es_systems.cfg file to start gpSP.
cd ~/.emulationstation
nano es_systems.cfg
Find the COMMAND line for Game Boy Advance and replace it with this:
COMMAND=$home/pi/RetroPie/emulators/gpsp/raspberrypi/gpsp %ROM%
Now you should be able to launch gpSP from the EmulationStation menu, but it may only be set up for keyboard control. Launch a game, and press the F10 key to bring up gpSP’s menu screen. This is gpSP’s GUI for making and loading savestates, changing settings, etc.
Use the GUI to remap the gamepad to your tastes. Once you’ve set up your gamepad, you can return to this menu with the gamepad shortcut Select+Right Trigger. This is how you’ll exit the emulator, or save and load states.
Now you’re set up with a fast and feature packed GBA emulator on your Raspberry Pi!
2 notes
·
View notes
Photo

Here's a quick diagram of what parts I'm connecting to what, and how.
0 notes
Video
vimeo
Basilisk II is a 68K Mac emulator that can emulate pretty much any Mac OS up through Mac OS 8.1. A bit complicated to set up, but very cool.
To download and compile it on a Pi, you need to run the following:
# apt-get install git libsdl1.2-dev
# git clone https://github.com/cebix/macemu.git
# cd macemu/BasiliskII/src/Unix
# ./autogen.sh
# ./configure --enable-sdl-video --enable-sdl-audio --disable-vosf --disable-jit-compiler
# make install
At the moment, I can only get it to work over HDMI, which will present a problem with the composite screen I'm planning to use, but I am working on the issue. It works over Composite video if I run it from within X11, but the additional overhead makes it a bit too slow to be much fun.
Looking forward to playing some Sim City Classic and Glider on my PiMac!
3 notes
·
View notes
Link
The heart of the software for my project is the Raspbian Linux distribution, and the RetroPie Project. RetroPie started as a script to automate the installation of various emulators and related software on the Raspberry Pi single board computer, but has grown to also include a full downloadable SD card image with most emulators preinstalled. Included are emulators for tons of computers and consoles, as well as a relatively simple to use menu interface called EmulationStation for launching emulators and roms. The creator of the RetroPie project also makes and sells a GPIO adapter to make it easy to attach legitimate SNES or NES controllers to your Raspberry Pi. I hope to be able to incorporate that adapter into the design of my PiMac, to enable attaching two real SNES controllers to the machine.
0 notes
Photo

The RetroPie EmulationStation interface, with the TurboGraphx16 selector screen showing. This is a bench test with a $3 CRT TV from Goodwill. The SNES controller in the shot is a USB version; I haven’t yet wired it up for real SNES controllers yet.
0 notes
Photo




This is the LCD screen I chose for the project. It’s 8”, close to the 9” of the original Macintosh screen, and most importantly, it’s 4:3 instead of widescreen, which is getting difficult to find. I ordered it on eBay from a seller in China, but expect it to take up to 3 weeks to arrive. I’ll update with my experiences with it once I receive it.
0 notes
Text
Shopping list
I’m still in the shopping for parts phase of the project. This is my current parts list. I’ll try to update it as I acquire things or my needs change.
Have:
Macintosh Case - free from a friend
Raspberry Pi running Raspbian
Powered USB hub
Ordered:
Monitor - ordered from eBay $50
12v power supply for monitor -$5
RetroPie GPIO adapter - $17
Need:
SNES extension cables (for the female connectors) - $4 on Amazon
Soldering equipment & supplies - $13 on Amazon
26-conductor ribbon cable - ~ 2 feet
2x13 IDC connectors - 1 male 1 female
10-conductor ribbon cable - ~ 2-3 feet
USB wifi adapter - $10
Some means of power management (small power strip)
Wireless USB keyboard & mouse
Mounting hardware for inside of case
0 notes