Building BasiliskII for iOS

I’ve had numerous requests for a guide to building BasiliskII on iOS. Let me know of anything is unclear or would benefit from more details!

October 2022: Updated for building with Xcode 14.0.1 on macOS 12.6 Monterey to iOS 15.7. YMMV.

Building

  1. Install Xcode from Mac App Store
  2. Clone project source from GitHub
  3. Switch to the ios branch.
  4. Open .xcodeproj file
  5. Set Product > Destination to point to your device
  6. Run

Optional Changes

I plan to add these changes into my own fork of the code. Soon, maybe!

Adding chunky screen resolutions

I added chunky “half resolution” screen modes to increase the size of user interface elements so that buttons, menu items and so on are all around the 44pt recommended in the Apple iOS HIG.

For iPad Pro 12.9” these changes were:

[videoModes addObject:[NSValue valueWithCGSize:CGSizeMake(512, 496)]]; // portrait minus keyboard
[videoModes addObject:[NSValue valueWithCGSize:CGSizeMake(512, 672)]]; // portrait "full" screen
[videoModes addObject:[NSValue valueWithCGSize:CGSizeMake(683, 502)]]; // landscape "full" screen

Enter those after line 56 in file B2ScreenView.mm

Disabling graphics smoothing

My personal preference is to disable filtering/smoothing on all graphics scaling, but only because I’ve dialled in resolutions that fit exactly so there will be no scaling happening anyway:

NSString *filter = kCAFilterNearest;
videoLayer.magnificationFilter = filter;
videoLayer.minificationFilter = filter;

Make this change around line 108 in file B2ScreenView.mm

Custom Keyboard Layouts

These are defined in JSON and compiled to a custom format:

Here’s one that I made, based on the British layout, for use with Deneba artWORKS/UltraPaint.

Enable Split View Support

This can be enabled by changing BasiliskII-Info.plist: UIRequiresFullScreen should be false in BasiliskII-Info.plist but be wary of the following problem:

  • the very top of the screen (where you’d expect the iOS status bar to be, and where part of the System 7 menu bar is) will become unresponsive to touch due to the Slide Over indicator

This would need to be managed/avoided by the screen layout of BasiliskII, but when I attempted this it raised more issues.

However, you can still use Slide Over to position Safari, Files, etc. along the edge of your screen.

Notes

There are additional capabilities that come the emulator integration. I go further into these, and more besides, in a additional posts listed at the bottom of the page.

File Sharing

A drive appears on the desktop that is mapped to the iOS file sharing folder of the app.

  • You can use Files to transfer files into or out of the emulated machine
  • Share Sheet also works for getting files into the emulated machine

Apple Pencil

This is supported the same way as regular touch so it acts as a mouse. Drawing works well and is very responsive, even at lower Hz.

  • Palm rejection is missing
  • Pressure sensitivity is missing
  • Multi touch seems to be missing
--
Comments: @gingerbeardman