What about an unified Emulator?

Anything about Mac emulation that does not belong in the above categories.

Moderators: Cat_7, Ronald P. Regensburg

User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

What about an unified Emulator?

Post by SistemaRayoXP »

Some time ago, I had the idea of making something like Virtual PC but for eMaculation called Virtual Mac, which basically uses mini vMac, Basilisk, SheepShaver and PearPC in a simple user interface that helps creating Virtual Machines that are configured by the user with a GUI. The way of working of this is very simple: Uses some commands to mount Hard Disks in Mini vMac, uses a function to modify the prefs file in Basilisk and SheepShaver, but for PearPC I'll see how (I've not used it) And uses the right emulator using the user choose when creating a Virtual Machine. I think It's a nice idea. And before you all will start saying that why a Virtual PC-oriented UI the project could be similar to VirtualBox or VMWare, but the Virtual PC UI is way easier for me, and after the final product is finished, I could make forks of it and make it in VirtualBox or VMWare appearence style (Of course if you like other style you could tell me to make it so or I you can do it by yourself).

So the point is what do you think? Is it a good idea to make it? I could make it because it's licenced under GPL, but I woudn't be sure if it's nice
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

What you're basically talking about is a unified preferences editor/launcher, which should work just fine :) I've used a number of those over the years by using arcade front ends with an applescript that they launch that does custom configuration for each emulator I select. Eventually I reverted to just creating bash script launching application bundles because once I'd configured a setup once, I don't tend to mess with it much.

Are you thinking of creating the front end for OS X only, or for other platforms as well? These days you could probably even do it in HTML5, although you may need some back-end scripts to create image files etc. like what we've been discussing for a BII/SheepShaver Prefs Editor re-do.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

I'm talking about one for Windows (All versions, or when less for Windows 95+), MacOS (Maybe 8 or 9+) and Linux (Kernel 4+), and posteriorly for Android 2.3+ because I need to study about Android Coding. Basically it's what you're saying, just with the difference to make several "VM's", what is that you could have an English and Spanish installation of MacOS 8.5 with SheepShaver with different prefs for every system without have to reconfigure before booting between every system (Just like an example). That's basically what I mean, with the ability for creating several systems with same emulators. The trick (In Windows, in Mac OS X is pretty similar) is to start the emulator with the option of booting into the VM directory, which contain the prefs for the machine. If you know Virtual PC, you understand what I mean
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

So you're looking at creating a universal front-end that'll run on any OS, and will run multiple emulators on the back end.

There are a number of hurdles to clear here... you want to set up a framework that can handle all the configuration but have multiple UIs dropped on the front so it'll look right on different host OSes. You'll also need some switching logic on the back end to handle how those emulators operate under different host OSes -- under OS X, SheepShaver has .sheepvm containers that hold all the settings, images, etc., but Windows uses command-line flags to do it. Android and OS X use "/" paths where Windows uses "\" paths.

For Basilisk II, all the configuration can be set from the command line, which makes things easier, but the settings differ between host OSes.

Mini vMac is easy between OS X, Windows and Linux, as you set your configuration values at compile time. Android is a forked build, and operates differently.
Since you can't actually reconfigure Mini vMac at runtime though, you might be better off using pce/Macplus for 24-bit Mac emulation. Or, you could just use the PCE framework and run the other emulators from a forked version of it, as it already does essentially what you're proposing, but can run other hardware types as well, not just Mac hardware.

Qemu is likely the easiest to set up, as it runs the same way on all platforms, even though some build features differ.

Your best bet for most of these is to use the SDL builds to keep things as similar as possible.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

I know how to compile in all plataforms I've metioned I knew, in those that I don't know (Android, specifically) I just will make an UNIX port since Android is Linux with the edges cutted-off (For this I will make a research). But I know the differences between OSes (I've used them all in almost all versions) and I have free time so I can make it without any problems
Hill radio station first attempt: Failure. Retrying...
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: What about an unified Emulator?

Post by Jorpho »

Sounds pretty much like what Softmac tried to do, back in the day.

It doesn't strike me as very useful, personally – PearPC in particular has specific uses that are entirely unrelated to anything you might do with mini vMac, Basilisk, or SheepShaver.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

It's useful for people who dooesn't want to read about how does every emulator work and to use one for one for emulating Classic Macs. Everything will be familiar and in some languages for international uses, this is because I think all of these emulators are pretty good but need refine themselves for an easier and familiar use
Hill radio station first attempt: Failure. Retrying...
User avatar
24bit
Forum All-Star
Posts: 1424
Joined: Wed Nov 11, 2009 5:47 pm
Location: Germany

Re: What about an unified Emulator?

Post by 24bit »

It can´t harm to have some improvements regarding Mac emulation in general.
A unified egg-milk-meat-wool producing beast would not be my first priority though. ;)
64-bit implementation in macOS would be, same for System 6 support in Basilisk II and a Android port of SheepShaver.
If SheepShaver would gain an Android port, the unified beast might even come true with something like BlueStacks
having MiniVMac II, BasiliskII and Sheepshaver ready to go in its guts.
Just my two € cents. :)
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

That could be possible, I can make the application by myself and share it, so you won't waste any of your time, I could make the the Android port for SheepShaver, since it's Linux based, it won't be as hard as it may seems, and make an Android port then for this "beast". Once the 64 bit of Basilisk for macOS will be released, update the "beast" to 1.1 or by the way (For x86-64 architecture).
Hill radio station first attempt: Failure. Retrying...
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

Not all of them will have the same options (Example: A function avaible in PearPC will be avaible when choosen to emulate Mac OS X 10.1-10.4, butwhen choosen to emulate MacOS 8.5, that feature won't be avaible). And what I meant mainly was to make the macemulation easier, so you won't need to load with every emulator, just one beast using them all, and in portable and installable versions
Hill radio station first attempt: Failure. Retrying...
ArtiomWin
Student Driver
Posts: 13
Joined: Mon Jun 26, 2017 7:48 am

Re: What about an unified Emulator?

Post by ArtiomWin »

Hello. I've heard of your idea. It's good, but why not create instead of front-end to existing emulators a whole new emulator that would emulate nearly every Mac (68k and PPC ones)? I've proposed earlier on this forum such idea of emulator which would be based mostly on WinUAE, so it would be able to emulate both 68k and PPC (via QEMU library plugin) Macs, along with some peripherals.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

That sounds fine! And I'd love to make something like that, we must start that project when I'll have in Beta VirtualMac! (Work in progress :wink: )
Hill radio station first attempt: Failure. Retrying...
Jose64141
Inquisitive Elf
Posts: 31
Joined: Mon Feb 22, 2016 10:34 pm

Re: What about an unified Emulator?

Post by Jose64141 »

I had the sane idea too!!
My idea is tu make the GUI based in the Mac OS X Puma Setup Assistant
Just saying
ArtiomWin
Student Driver
Posts: 13
Joined: Mon Jun 26, 2017 7:48 am

Re: What about an unified Emulator?

Post by ArtiomWin »

SistemaRayoXP wrote:That sounds fine! And I'd love to make something like that, we must start that project when I'll have in Beta VirtualMac! (Work in progress :wink: )
I'm glad to hear it. Especially because code of most of Mac emulators is a bit outdated.

So, once again my proposals on new emulator:

1. The product should be based on WinUAE (like most of other emulators of 68k systems) with some borrowings from other emulators (like Shoebill or Previous).
2. It should be able to emulate the entire range of 68k Macs (from Twiggy prototypes to Quadra AV)
3. It should have support of essential components like MMU, SCSI or NuBus (so it would be able to run systems like A/UX or 68k Linux)
4. With QEMU library plugin that emulator should also support emulation of PowerPC Macs (both Old World and New World systems) up to G4 (incl. NuBus-based PowerMacs that cannot be emulated by SheepShaver)
5. VirtualMac also should support emulation of peripherals for Macs like video cards, network cards, PC cards, etc.
6. It should be both 32-bit and 64-bit capable, especially since Apple dropping support for 32-bit apps in macOS.
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

That's a great list of requirements, but it'll need information we currently don't have, and a dedicated army of coders. Good to get the requirements all in one place though, so we can prioritize and document.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

As another idea, I think I could use Qemu instead of PearPC, since it runs OS 9 from 9.0 to 9.2, what SheepShaver can't, and it runs OS X 10.0, what PearPC can't, and of course it runs OS X 10.1-10.4. What I wonder is, if does the Qemu m68k emulator runs System Software, I'll test it tomorrow and see what happens :wink:
Hill radio station first attempt: Failure. Retrying...
ArtiomWin
Student Driver
Posts: 13
Joined: Mon Jun 26, 2017 7:48 am

Re: What about an unified Emulator?

Post by ArtiomWin »

SistemaRayoXP wrote:As another idea, I think I could use Qemu instead of PearPC, since it runs OS 9 from 9.0 to 9.2, what SheepShaver can't, and it runs OS X 10.0, what PearPC can't, and of course it runs OS X 10.1-10.4. What I wonder is, if does the Qemu m68k emulator runs System Software, I'll test it tomorrow and see what happens :wink:
Good luck, but I think it will be flopped as QEMU's m68k emulation is imperfect, and QEMU is not going to support proprientary BIOS (incl. Apple firmware). As for qemu-system-ppc, of course you can. Actually, my proposition provides usage of QEMU (see p.4) in the form of plugin library (which should be adopted for both Old World ROM and New World ROM configurations).
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

Just that this time I'll have to mess around to get Mac OS 8 working with Qemu (The official documentation says that Qemu will crash with Mac OS 8)
Hill radio station first attempt: Failure. Retrying...
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

Just a reminder that there's a separate build of QEMU that runs 10.5 as well.

As for the unified roundup: I suggest using a framework like RetroArch/LibRetro and compiling libraries for PCEm/Macplus, Mini vMac, BII, SheepShaver, PearPC, QEmu-ppc and QEmu-ppc-pmmu. They all overlap, but have different strengths and weaknesses, and get updated on different schedules.

OpenEmulator already uses RetroArch on OS X, and supports arcade consoles, computer systems and UME. Plus, the RetroArch front-end can run these on multiple platforms, including phones. LibRetro also includes an updating pipeline using git, so people can upgrade their individual emulator libraries as needed.

Seems to me you could create "AppleEmulator" on a similar format, and even include libraries for Apple ][ emulation, //GS emulation, Apple /// emulation, Lisa emulation, and possibly even Newton MessagePad emulation. You could even include the Apple parts of UME in such a thing (including the Pippin emulation code).
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

SistemaRayoXP wrote:Just that this time I'll have to mess around to get Mac OS 8 working with Qemu (The official documentation says that Qemu will crash with Mac OS 8)
Qemu-PPC is still missing some features at the chip emulation level that are needed to get Mac OS 8 working. It's in progress, but moving slowly. The m68k fork is also currently moving again, but it's not official, and you'll have to provide your own ROMs -- official QEMU doesn't support third party proprietary code drop-ins, which is what ROMs are.

There's been some discussion about creating a clean room ROM using ARDI's Executor code to get around the ROM issue; this code could be embedded right into qemu to allow for a clean m68k emulation.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

Well, by what I've seen, this is going to be harder than what I originally had in mind, since I require the ShapeShifter and Basilisk (Amiga) source code in order to understand what they do, so here goes a mini guide of what I have in mind to code VirtualMac (Engine):

The first step is to make a Basilisk fork based on the Amiga chipset (Which are very similar to the Mac ones and are even better than the Basilisk ones because they use emulation) and then get the Mini vMac source code to attempt to merge it into this Basilisk Fork and then supporting system 0-7.

Second step is with the help of the PPC plugin, to avoid mixing code keep it as a plugin temporary. Use it to build around another emulator based in SheepShaver and QEMU code (As QEMU doesn't supports Mac OS 7.6 and 8)and then with QEMU code perfectioning a bit more the SheepShaver code)in order to run Mac OS 7.5-9.0.4, and finally merging to the code QEMU code to run Mac OS 9.1-9.2.2 and possibly 10.

When the plugin is enough stable, merge it into the fork, so no more deal with plugins

So there it is, the plan to code VirtualMac, a Basilisk and WinUAE fork that can become something better.

After all this gets right started (This means at least getting booted System 6 and 7 without needing Amiga OS), I'd like to use a bit of virtualization (Virtualization+Emulation), so the emulation gets a little speed up, but stays compatible.
Hill radio station first attempt: Failure. Retrying...
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

That sounds like around a decade's worth of work, if it can be accomplished at all. The refactoring of the WinUAE code with BII sounds like an excellent idea, but I'd recommend going the MESS / RetroArch method and just wrapping around the features that already exist with a framework you can call from the UI.
User avatar
SistemaRayoXP
Tinkerer
Posts: 82
Joined: Fri Oct 13, 2017 4:34 pm
Location: Mexico
Contact:

Re: What about an unified Emulator?

Post by SistemaRayoXP »

Look at, adespoton!

viewtopic.php?f=6&t=9652
Hill radio station first attempt: Failure. Retrying...
User avatar
adespoton
Forum All-Star
Posts: 4226
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: What about an unified Emulator?

Post by adespoton »

Yeah; I saw that! Leave it to Julia to get the details sorted out :)

Definitely worth trying for round one.
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: What about an unified Emulator?

Post by uyjulian »

I personally want to do the following:
1. remove all support code for other platforms for BasiliskII except macOS/Linux/SDL2 (already done)
2. convert BasiliskII build system to CMake, like Hatari, Previous, and fs-uae are doing (in progress)
3. Backport CPU from old BasiliskII (this will reduce the amount of differences when porting a new CPU core)
4. Port JIT from Hatari, Previous, or fs-uae
5. Port JIT from uae4arm-rpi for fast CPU on Raspberry Pi
6. Modularize the Toolbox hooks, so that it's easy for anybody to accelerate Toolbox functions without full hardware emulation (HLE emulation)

These are "far off" ideas:
Port Dolphin JIT to SheepShaver
AOT compiler with LLVM
UAE emulation when 68k code is executed in Sheepshaver
Boot from folder in shared directory instead of disk image
Toolbox windows managed by WindowServer/Wayland/X compositor

I'm curious if there's currently any abstraction library for handling resource forks/creator codes/type codes/other MacOS special information. If not, I'm probably going to write one myself, with support for macOS-style file forks, Linux and macOS xattrs, and for all other filesystems, AppleDouble files.

Mac OS X 10.6 can do PPC emulation of PPC applications on Intel processors, so I'm currently not interested in Mac OS X. Hybrid PPC Carbon applications will probably run better in Sheepshaver, especially since Apple is dropping support for 32-bit applications, and Carbon is 32-bit only.
Post Reply