Get Ready to Feel Nostalgic: Run a System 7 Emulator on PocketC.H.I.P.

Spoiler: it's an apple

Puzzle like it’s 1991 in System 7

Last week, forum users Nojjy and elijah were working on getting Mini vMac working on PocketC.H.I.P.. I decided to pick up where they left off and see how far I could get.

Taking some tips from the Adafruit guide and using their Mini vMac binary, I was able to get an System 7.0.1 up and running. Plus, the Mini vMac creator, Paul C. Pratt has a number of applications that will run in the emulator. Also, there’s a cool trick on how to work with remote displays in Step 6 that’s not to be missed.

Here’s how to get Mini vMac setup on your PocketC.H.I.P..

1. Connect to PocketC.H.I.P. Using SSH

While you can type all of this project into PocketC.H.I.P. directly, I prefer to connect my laptop wirelessly to PocketC.H.I.P. use SSH.

Run the command below to install SSH and follow the directions in the docs to learn how to connect to PocketC.H.I.P. using SSH.
sudo apt update && sudo apt install ssh


2. Prepare a Directory

Since you’ll be decompressing a lot of files, make a dedicated directory for your hacking. It’s good to keep directory clutter in check. ᕙ( ~ . ~ )ᕗ
mkdir Mac-vMac

Change directories to the one you just created.
cd Mac-vMac

Note: The rest of the tutorial assumes you’re in the /home/chip/Mac-vMac/ directory unless mentioned otherwise.


3. Download the Software

Download the zip file from Adafruit by typing the following command, then press enter.
wget http://www.adafruit.com/downloads/pitft_minivmac.zip

Next download another zip file, this one with important system files. Unfortunately the file is hosted on a download network and there isn’t a reliable static URL to link to. On your laptop browse to this site. Right click on the Download button and Copy Link Address. On your PocketC.H.I.P., type in wget and then press the spacebar, and then paste in the URL.


4. Decompress the Files

Unzip the application Mini vMac.
unzip pitft_minivmac.zip

Do the same with the vmac.zip files.
unzip vmac.zip


5. Change a Filename & Make minivmac Executable

The minivmac application expects the directory it’s in to contain a file called vMac.ROM. Though you have the correct file, it is incorrectly named vmac.rom. Use the command below to change the filename to the one that minivmac expects.
mv vmac.rom vMac.ROM

Important: In Linux case matters! Double-check that you changed the case in the command above and have a file called vMac.ROM. (You can test this by typing ls and looking for the filename.)

Linux treats everything as a file, but not everything as an executable file i.e. a program that you can run. To make minivmac executable, which means you can type the filename and Linux will run the file as an application, use the utility chmod as written below.
chmod +x ./minivmac

Note: Here is a good tutorial about Linux file permissions if you’re interested.


6. Export Your Display

The default behavior for a graphical program when you start it in an SSH session is to fail. You’ll get a complaint from the program that no display is available for use. Of course PocketC.H.I.P., it’s just that the shell doesn’t know how to access it.

To alert the SSH session to the PocketC.H.I.P. display, type in the following command and press enter. Running this command will let you start a graphical program from the SSH session and have the graphics display on PocketC.H.I.P.. It’s a great trick and works in most Linux and UNIX environments with a display (or more technically, where a display is running at :0).
export DISPLAY=:0

Note: Exporting a variable like this will only last as long as your terminal session. If you start a new SSH session, you’ll need to re-enter the command for it to work. If you’d like to setup a persistent variable in your shell session, you’ll need to consult the BASH manual and likely add a line to your ~/.bashrc file.


7. Run Mini vMac

Mini vMac loading without a startup disk on PocketC.H.I.P.

Mini vMac loading without a startup disk on PocketC.H.I.P.

Load minivmac and the system installation files.
./minivmac hfs20M.DSK Install\ 1.image Install\ 2.image Tidbits.image Fonts.image

Double-click on the Install 1 floppy disk image, then do the same on the Installer icon. You’ll then just need to follow the on-screen prompts for the installation.

Note: Type CTRL + F to toggle fullscreen mode, unfortunately the software doesn’t communicate with the touchscreen and the controls get a bit funky. Simply press the same key combo to return to a windowed mode.


Software

apple

There are a few applications that are included in System 7.0.1. You’ll find Calculator and a sliding tile puzzle game under the Apple menu in the top-left of the desktop. For all other applications you’ll need to launch them when you launch minivmac in the following syntax.
./minivmac hfs20M.DSK PATH-TO-APPLICATION

Replace PATH-TO-APPLICATION with the path to the the application that you want to launch. Applications will load in a disk image that appears on the desktop. Remember, the MAC Plus and SE both required you to load applications from the floppy drive.

For example: To install VIM, visit the software page and downloand the zipped hfs disk image by typing in the following command on your PocketC.H.I.P.. Then decompress the file using unzip.
wget http://www.gryphel.com/d/sw/text/vim/c/vim.zip
unzip vim.zip

Finally, run VIM on your emulator.
./minivmac hfs20M.DSK vim/vim.dsk

Note: The vim/vim.dsk portion of the command above is the relative path to the .dsk image. The full path is /home/chip/Mini-vMac/vim/vim.dsk.

Nothing quite like running VIM

Nothing quite like running VIM

Paul C. Pratt, the creator of Mini vMac, has bundled up a number of applications that work. Make sure you download the zip files with the disk image in them, which is denoted with the .dsk file suffix.


Taking it to the Next Level

Using Orion to fly through the galaxy

Using Orion to fly through the galaxy

If you’re looking to take this emulator further, you’ll want to configure networking. The Adafruit guide suggests setting up another computer with Basilisk 2 (another Mac emulator) and configuring a network between the Mini vMac emulator (on PocketC.H.I.P.) and the Basilisk 2 emulator (running on your laptop).

Let us know if you’re able to get networking up and running for the Mini vMac on PocketC.H.I.P. or just want to share your progress. The best place to chat is in the comments below or in our forums. You can also find us on Twitter and Facebook. And make sure to let us know what you want to see running on PocketC.H.I.P.!

About the Author

Posted by

I'm busy writing and editing content at Next Thing Co.

Categories:

PocketC.H.I.P.

Tags:

8 Comments

That’s System 7, please, not Mac OS 7! The “Mac OS” name was adopted only in 1996 (IIRC), five years after 7.0.

minivmac is pretty aggressively monochrome. You *can* build it with colour support, but it’s very limited. It should be possible to build and install Basilisk II directly on the CHIP. It has colour support, along with more than 4 MB RAM and 68020/68030 emulation.

Is it possible to get minivmac to use the PChips full screen resolution in fullscreen mode? Eg. by editing a config file? Although the emulator works quite awesome, on many screens you can see that the current screen size is much too small and sometimes buttons even can’t be reached.

Btw. it’s working perfectly well with an external mouse. The touchscreen indeed acts a bit funny (like over-sensitive).

Add a Response

Your name, email address, and comment are required. We will not publish your email.

The following HTML tags can be used in the comment field: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">