![its apples, and we’re about to learn how to use an Apple ]…. i dunno…

Photo by Liana Mikah on Unsplash

Long before the iPad, iPhone, and MacBook, Apple’s most successful product was the Apple ii. The Apple ii (or Apple ][, if you’re feeling stylish) is a personal computer from 1977 that sold exceptionally well for Apple, becoming the first personal computer to achieve commercial success. This was, in part, due to its appeal to not only hobbyists but also “normal” people. What this success means for us is that there are a huge amount of games and programs that can run on the hardware. In this article, we will go through the process of emulating the Apple ii and look at how to load programs onto it. The program we will load will be a small piece of code that we will write ourselves. However, this process could also be used to load on The Oregon Trail game, Ultima 1, Lode Runner, or any other piece of famous Apple ii software.

This is a multi-step process. We will focus on how to get this to run on Linux or Mac, but this should also be transferable to Windows. Let’s quickly break the process down:

  • We will need to find a way to emulate the Apple ii (we’ll use AppleWin)
  • For those of us without a Windows machine, we will need a way to run the emulation (we’ll use Wine for this)
  • We will communicate between our modern machine and the emulator by using CiderPress
  • We will compile 6502 Assembly code using cc65

I will also assume a basic knowledge of how to navigate the terminal. If you aren’t familiar with ls-ing and cd-ing you can find some tips here. This is part 5 of my learning assembly series, but whether or not you have read the rest should not matter (hopefully). If all you want to know is how to emulate the Apple ii this should be a groovy read as well.

![Some people from like 40 years ago playing with an Apple ]

A 1976 ad for the Apple ii — Source


Wine

If you run Mac or Linux, obviously, you cannot natively run Windows programs. However, the programs that we want to use in this article are exclusively on Windows. We don’t want to install and pay for a large emulator or dual-boot our laptops so to avoid this we can use Wine. Wine (an acronym of Wine Is Not an Emulator) is described as not being an emulator or virtual machine. Instead, it is described as a “compatibility layer capable of running Windows applications”. Honestly, I don’t know what that means but — nevertheless — it will allow us to run the Window’s programs required. To install:

Mac

Open the terminal and enter the following commands:

  • brew cask install xquartz
  • brew cask install wine-stable

Linux

Go to the terminal and enter:

  • sudo apt-get install wine-stable

Some websites give instructions on how to install newer versions of Wine on Linux, but the above command works correctly as well.

Let’s get installing!

We need to download the two Windows programs we need. They are available here:

Find a version that you like the look of (the newest, probably) and download the .zip file under that “Assets” dropdown.

Let’s get these both working, starting with Ciderpress:

  1. Unzip the downloaded file.

  2. Navigate to the folder in the terminal.

  3. Using the magic on Wine we can install the .exe file provided. To do this type the command wine Setup403.exe. If the .exe is not called the same thing for you then enter the appropriate name instead.

  4. Go through the installation process.

  5. Now, with Ciderpress installed navigate to: ~/.wine/drive_c/Program\ Files/. For me, this was where it was however it could be in another folder, potentially Program Files (x86).

  6. Inside you should be able to navigate to a Ciderpress folder. For me, it was located at Faddensoft/Ciderpress

  7. Finally, to run Ciderpress just type wine Ciderpress.exe

And like magic, Ciderpress, a Windows program, should be running on your Mac or Linux machine. The process to get AppleWin installed is even easier:

  1. Unzip the downloaded AppleWin file.

  2. Navigate to the folder in the terminal.

  3. The command wine applewin.exe should launch the application.

#software-engineering #apple #learning-to-code #gaming #programming

How to use an Apple ii!
1.25 GEEK