Page 1 of 3

BasiliskII for iOS

Posted: Wed Mar 31, 2021 10:24 pm
by gingerbeardman
Is anybody else using this?

https://github.com/zydeco/macemu/tree/i ... II/src/iOS

note: use ios branch

It's not well advertised and I only found out about this fork & branch after filing some issues/requests for minivmac4ios.

I built the code using Xcode 11.3.1 on Mojave 10.14.6 and had to add in one missing #ifdef __IPHONE_13_4 for it to build:
https://github.com/zydeco/macemu/blob/e ... mm#L82-L85

But it's quite amazing on an iPad! Thanks to @zydeco

I made some changes to run it in chunky mode (iPad Pro 12.9" fits 512x342@4x resolution very nicely) and I also added double height mode (well, pretty much it needs to have room left for the iPad home indicator).

It supports File Sharing, so you can download an hqx/sit/bin in Safari to Files and then send it to BasiliskII using iOS Share Sheet mechanism and the file is then accessible from a drive on the emulated Mac.

Monitor resolution changing without rebooting (via System 7.5 Monitors panel or equivalent) for switching between portrait and landscape orientations.

Apple Pencil is supported as a regular touch, feels very nice to draw with.

I'd love to see:
- proper Apple Pencil StrokeGestureRecognizer support
- which would bring with it support for palm rejection (for drawing)
- support for multi touch to be able to do one finger panning whilst drawing

bug asks:
- Apple Pencil pressure support masquerading as a Wacom
- support for Split View (I can enable it but it presents some issues with menu bar touch recognition)

Image

Re: BasiliskII for iOS

Posted: Wed Mar 31, 2021 10:43 pm
by gingerbeardman
Second image showing "full resolution" of 1024x1366 portrait mode on iPad Pro 12.9"

Image

Re: BasiliskII for iOS

Posted: Thu Apr 01, 2021 5:21 pm
by adespoton
That's great! I'll have to see if I can get it to build/run on my iPad 2 -- that's currently my Mini vMac "Mac".

Re: BasiliskII for iOS

Posted: Thu Apr 01, 2021 7:35 pm
by gingerbeardman
adespoton wrote: Thu Apr 01, 2021 5:21 pm That's great! I'll have to see if I can get it to build/run on my iPad 2 -- that's currently my Mini vMac "Mac".
Please do!

I have Mini vMac on here too, but Basilisk allows so much more.

Could easily be a daily driver with safari in Slide Over for web browsing and downloading.

Re: BasiliskII for iOS

Posted: Sat Apr 03, 2021 4:22 pm
by adespoton
gingerbeardman wrote: Thu Apr 01, 2021 7:35 pm
adespoton wrote: Thu Apr 01, 2021 5:21 pm That's great! I'll have to see if I can get it to build/run on my iPad 2 -- that's currently my Mini vMac "Mac".
Please do!

I have Mini vMac on here too, but Basilisk allows so much more.

Could easily be a daily driver with safari in Slide Over for web browsing and downloading.
Couple of questions: first, how did you get around:
error: Build input file cannot be found: '/Users/<user>/Projects/macemu4ios/BasiliskII/src/uae_cpu/cpustbl.cpp' (in target 'BasiliskII' from project 'BasiliskII')

Second, where exactly where you adding the ifdef? around the highlighted conditional?

Re: BasiliskII for iOS

Posted: Sat Apr 03, 2021 4:47 pm
by gingerbeardman
I didn't get that uae error.

Did you clone the repo and are you on the iOS branch?
Just downloading the code won't work.

Regarding the ifdef, yes, around the conditional.

Re: BasiliskII for iOS

Posted: Mon Apr 05, 2021 2:43 pm
by adespoton
Yeah; seems like even though I thought I was in the IOS branch, I checked out MAIN. So after adding that IFDEF, everything's great! A bit slow on the iPad 2, but works fine at 15fps. Seems like some of the later fixes from kanjitalk755's fork would improve things significantly here.

I'm also curious to see if this iOS build can be spun out to work on macOS, as the UI is pretty useful.

Re: BasiliskII for iOS

Posted: Wed Apr 07, 2021 7:47 pm
by gingerbeardman
Indeed, we'll have to see what happens

Re: BasiliskII for iOS

Posted: Mon Apr 19, 2021 8:57 pm
by gingerbeardman
I started a blog and am writing about this System 7 on iPad journey.

https://blog.gingerbeardman.com

Re: BasiliskII for iOS

Posted: Mon Apr 19, 2021 10:52 pm
by adespoton
I fell down a rabbit hole there... https://blog.gingerbeardman.com/2021/04 ... le-events/ outlines how to do something I've been attempting (but failing) to do for 31 years! I always found QuicKeys too bulky (and expensive), but KeyQuencer just didn't provide me with a decent way to handle apple events. So I always fell back on AppleScript and xcmds/xfcns to do my dirty work.

But the combination of QuicKeys as a discovery tool and KeyQuencer as the execution platform looks like the perfect combination! Thanks for the blog... too bad I didn't read it 31 years ago ;)

Any chance you could whip up some handlers for SuperPaint as well?

Re: BasiliskII for iOS

Posted: Fri Apr 23, 2021 7:00 pm
by gingerbeardman
31 years! Better late than never, eh? :lol:

I'll take a look at SuperPaint. It's too old for Apple Events but it's toolbar is attached to the window so it should be possible to use the clicking method with window-relative coordinates.

Re: BasiliskII for iOS

Posted: Tue May 11, 2021 1:37 pm
by jrdpizzo
Just found this and it’s awesome. I’m not a developer… so it took a little work to get it to compile with Xcode. But, I’ve loaded up 7.5.5 with the tools I used to use in college: WriteNow, ClarisWorks, Star Trek the 25th Anniversary Game and more. On my iPad Air 3 it’s really, really fast.

Two questions:
1 - Has anyone been able to get the audio to work. I don’t have any sound.
2 - Is there a virtual keyboard? I have a Bluetooth keyboard so it works that way…. but there doesn’t seem to be an onscreen one.

Re: BasiliskII for iOS

Posted: Tue May 11, 2021 4:51 pm
by adespoton
jrdpizzo wrote: Tue May 11, 2021 1:37 pm Just found this and it’s awesome. I’m not a developer… so it took a little work to get it to compile with Xcode. But, I’ve loaded up 7.5.5 with the tools I used to use in college: WriteNow, ClarisWorks, Star Trek the 25th Anniversary Game and more. On my iPad Air 3 it’s really, really fast.

Two questions:
1 - Has anyone been able to get the audio to work. I don’t have any sound.
2 - Is there a virtual keyboard? I have a Bluetooth keyboard so it works that way…. but there doesn’t seem to be an onscreen one.
There's a great virtual keyboard; I use that all the time. I always work with sound turned off, but I just turned my ringer on to test, and sound seems crystal clear on my iPhone 6+.

Re: BasiliskII for iOS

Posted: Tue May 11, 2021 4:54 pm
by gingerbeardman
Swipe up/down with two fingers to show/hide the on-screen keyboard.

Shake your device at any time to show settings interface (same one that appears when you first launch).

Sound works for me. Mostly error beeps!

Re: BasiliskII for iOS

Posted: Sat Jun 19, 2021 10:41 pm
by Halcyon
Whoa, this is awesome. I had no idea it was possible to run BasiliskII on iOS. I'm not an Xcode user so I had to fumble my way through some of the setup steps that aren't mentioned in @gingerbeardman 's excellent blog post, but I was able to get Mac OS 7.6 running on my 11" iPad Pro without too much fuss. I'm running at the default 1194x834 resolution and it looks great. With the keyboard case and a paired bluetooth trackpad, input feels great.

Sound is _not_ working for me, not sure what to try there. I'll experiment with different OS versions maybe.

Big thanks to @zydeco for making this happen and @gingerbeardman for helping me learn about it!

Re: BasiliskII for iOS

Posted: Sat Jun 19, 2021 10:49 pm
by gingerbeardman
I'm interested to know the steps that may be missing! I'll add them to the guide.

Have fun.

Re: BasiliskII for iOS

Posted: Sat Jun 19, 2021 11:11 pm
by Halcyon
gingerbeardman wrote: Sat Jun 19, 2021 10:49 pm I'm interested to know the steps that may be missing!
Hi! My setup is Xcode 12.5 on Big Sur 11.4 and I ran into build failures that required two changes:

1. In Xcode preferences, I had to add my Apple ID under Accounts. I've previously played around with Xcode enough that my Apple ID is associated with a "Personal Team" and certificate, but I totally forget how all that stuff works, so I assume someone using Xcode for the first time would have some additional steps to get this part setup.

2. In the BasiliskII.xcodeproject settings under Signing & Capabilities, I had to change the default Bundle Identifier to something unique. I may have also had to set the Team field to my "Personal Team" but I don't remember now if I actually changed this field.

This is probably obvious stuff to someone who has used Xcode before.

Re: BasiliskII for iOS

Posted: Sun Jun 20, 2021 1:23 am
by Halcyon
I finally got sound working, but the solution was unexpected. While troubleshooting I noticed that something was wrong with sound in iPadOS overall: while I could play music from the Music app and test the ringer sounds in Settings, the keyboard click and Lock Screen sound effects would not play even when I explicitly enabled them. I don't use my iPad often, so maybe it's been like this for some time. I couldn't figure out why this was happening and eventually gave up and tried "Reset Settings". For whatever reason, this fixed both my keyboard/Lock Screen sounds as well as Basilisk.

Along the way I also ran into the issue described in the "System Alert sounds with BII and system 7.5.3 on Win10 64bit" thread where all of the Alert Sounds in the system control panel were playing the default beep sound effect, which I was able to fix by using the Quadra, Centris 610,650 ROM w/ checksum F1A6F343.

Hope this helps someone else or future self when I forget how I set this up :P

Re: BasiliskII for iOS

Posted: Mon Jun 21, 2021 4:02 pm
by adespoton
One other thing to note is that in a lot of emulators, the ringer switch toggles audio -- so if your device is in vibrate only mode, you won't have sound. Turning it to ring mode will enable sound. I haven't checked if that's the case with BII, but I suspect it is.

Re: BasiliskII for iOS

Posted: Mon Jun 21, 2021 7:38 pm
by Halcyon
adespoton wrote: Mon Jun 21, 2021 4:02 pm One other thing to note is that in a lot of emulators, the ringer switch toggles audio -- so if your device is in vibrate only mode, you won't have sound. Turning it to ring mode will enable sound. I haven't checked if that's the case with BII, but I suspect it is.
In the case of the iPad there's no hardware ringer toggle, but now that you mention this I bet I had the software silent mode enabled. :facepalm

Re: BasiliskII for iOS

Posted: Tue Jun 22, 2021 9:41 pm
by adespoton
Halcyon wrote: Mon Jun 21, 2021 7:38 pm
adespoton wrote: Mon Jun 21, 2021 4:02 pm One other thing to note is that in a lot of emulators, the ringer switch toggles audio -- so if your device is in vibrate only mode, you won't have sound. Turning it to ring mode will enable sound. I haven't checked if that's the case with BII, but I suspect it is.
In the case of the iPad there's no hardware ringer toggle, but now that you mention this I bet I had the software silent mode enabled. :facepalm
I usually have my lock switch set to silent mode toggle -- I know most people have it set to rotation lock though.

Re: BasiliskII for iOS

Posted: Thu Jun 24, 2021 9:17 pm
by jrdpizzo
So, yes, I'm an idiot... while the volume up was on my iPad, the sound toggle was off in the Control Center preventing me from getting any sound. Hit the toggle and the sound came through loud and clear.

Thanks for the double-finger-swipe-up tidbit. Now I have a keyboard.

Lastly, I hadn't used the emulator in a while. When I tapped on it the other day, it wouldn't start. I had to reinstall. Is there a built in time-out I need to tweak?

Re: BasiliskII for iOS

Posted: Fri Jun 25, 2021 1:33 pm
by adespoton
jrdpizzo wrote: Thu Jun 24, 2021 9:17 pm So, yes, I'm an idiot... while the volume up was on my iPad, the sound toggle was off in the Control Center preventing me from getting any sound. Hit the toggle and the sound came through loud and clear.

Thanks for the double-finger-swipe-up tidbit. Now I have a keyboard.

Lastly, I hadn't used the emulator in a while. When I tapped on it the other day, it wouldn't start. I had to reinstall. Is there a built in time-out I need to tweak?
If you're using ad-hoc deployment, the certificate only lasts 7 days. You can use AltStore to auto-resign though.

Re: BasiliskII for iOS

Posted: Sat Jun 26, 2021 11:33 pm
by Halcyon
I just hit the 7 day signing profile expiration too. Oops! I didn't understand this aspect of using a free developer account.

I understand it the options for using BasiliskII on iOS for > 7 days are:

1. use a sketchy looking AltStore to manage app re-signing
2. plunk down $100 a year for a full registered Apple dev account, which would let me generate a signing profile for 1 year duration
3. manually create a new signing profile and rebuild once a week

Any other options I'm missing?

Re: BasiliskII for iOS

Posted: Tue Jun 29, 2021 1:34 pm
by adespoton
Halcyon wrote: Sat Jun 26, 2021 11:33 pm I just hit the 7 day signing profile expiration too. Oops! I didn't understand this aspect of using a free developer account.

I understand it the options for using BasiliskII on iOS for > 7 days are:

1. use a sketchy looking AltStore to manage app re-signing
2. plunk down $100 a year for a full registered Apple dev account, which would let me generate a signing profile for 1 year duration
3. manually create a new signing profile and rebuild once a week

Any other options I'm missing?
Nope, that's it.

AltStore's actually pretty reasonable as all the account info and certs stay on your own systems -- but I agree it has the sketchy smell, and the way it's set up, any update could introduce something in one of the three moving parts that does something dodgy. I had a year with the registered dev account due to other projects that required it; before that, I just re-signed my apps when I wanted to use them; now I've resigned myself to AltStore.

The other alternative is to use a completely sketchy sideloading service that uses a Chinese provisioning profile to install stuff on your device and incidentally give them full control/access to the device.