SDL 2.0

About SheepShaver, a PPC Mac emulator for Windows, MacOS X, and Linux that can run System 7.5.3 to MacOS 9.0.4.

Moderators: Cat_7, Ronald P. Regensburg, ClockWise

Post Reply
enryfox
Inquisitive Elf
Posts: 36
Joined: Tue Oct 13, 2009 10:55 am

SDL 2.0

Post by enryfox »

I have not checked nor SS neither BII source code, but I was just wondering if anyone has ever investigated the feasibility of migrating the two emulators from SDL 1.2.15 to 2.0.x. This would help extend the life of both SS and BII as SDL 1.2.x is obsoleted and no longer maintained and might stop working in future OSX version.
I had a quick look to the SDL migration guide and there are very likely several required code changes, but they looks mostly just adapting to a new syntax. Not sure SDL 2.0 would improve performances, but it would make easier to maintain BII and SS in the future.

bye
Enrico
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SDL 2.0

Post by adespoton »

It's worth a try, but SS and BII are also both obsoleted source, and depend on things that are quickly becoming deprecated. BII should hang on a bit longer than SS, as it doesn't depend on running at address 0.

Basically, if someone has the spare cycles, it might be worth refreshing them to use SDL2, but I think most of the effort now is being put into getting QEMU running 8.6+ since it has an active developer base and uses non-deprecated techniques.

If I had a spare month or two, I'd probably go through and re-work the emulator core for BII and SS, as cleaning that up would give them both a new lease on life.
enryfox
Inquisitive Elf
Posts: 36
Joined: Tue Oct 13, 2009 10:55 am

Re: SDL 2.0

Post by enryfox »

adespoton wrote:It's worth a try, but SS and BII are also both obsoleted source, and depend on things that are quickly becoming deprecated.
What are those obsolete dependencies ? I see the windows build depends on drivers which are quite obsolete, but the osx build is quite clean...

thanks for any info.
bye

Enrico
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SDL 2.0

Post by adespoton »

Actually, one of the original developers of the drivers popped up a while back, and created a patch that obviates the need for the drivers on modern systems; the code's still in the source though I believe.

It's the entire structure of the emulation cores that is obsolete; specifically, in SheepShaver's case, it emulates by mapping directly to address 0, and setting debug traps to halt and modify the process on the fly. Running from address 0 won't even work under many architectures today, and the debug trick depends on a number of assumptions that just aren't necessarily true anymore. Neither BII nor SS are pure emulators; they're one part emulation to one part simulation to one part virtualization, and all of that is tied together with bailing wire. None of the original developers are still working on the code, and any changes that have been made in recent years are generally OS-facing tweaks that don't disturb the main body of code.

That said, modifying it from 1.2 to 2 would definitely make it easier to see what bugs are caused by SDL issues and what are caused by other components.
enryfox
Inquisitive Elf
Posts: 36
Joined: Tue Oct 13, 2009 10:55 am

Re: SDL 2.0

Post by enryfox »

Thanks for the info.

For work I write software for an embedded controller based on a freescale PPC controller and the memory address 0x0 is valid due to the lack of memory protection in the OS. Any null pointer results in an operation on the memory stored at 0x0 (typically boot stuff). Any sensible OS would not allow a program to address the 0x0 memory location.

Last year I had to update the UI toolkit for a linux application from wxWidgets 2.8 to 3.0. In that case it was a super-easy job as backward compatibility was almost 99% and in a day I had it working. Moving from SDL 1.2 to 2.0 looks a bit more complicated as the video section has been heavily modified and most calls have to be rewritten; luckily other sections (audio, I/O ...) seem to have only marginal modifications and back-compatibility is good.

Any work that can be done to abstract the emulators from the underlying OS is beneficial in terms of longevity: nowadays CPU's are pretty fast and we can allow an intermediate layer if that helps making the code less OS-dependant (basilisk II on my iMac runs hundred of times faster than a 68040 CPU and sheepshaver is also much faster then a PPC mac of the mid-late 90's).

I think both SS and BII should be maintained (and possibly improved) at least for historical reasons; other platforms have excellent emulators (e.g. UAE for Amiga) which really gives a feel of the old hardware/software.

I would like to provide some help, but for the foreseeable future I really have no time for such a project.

bye
Enrico
TiddK
Granny Smith
Posts: 106
Joined: Wed Jan 27, 2016 12:25 pm

Re: SDL 2.0

Post by TiddK »

enryfox wrote: Any work that can be done to abstract the emulators from the underlying OS is beneficial in terms of longevity: nowadays CPU's are pretty fast and we can allow an intermediate layer if that helps making the code less OS-dependant (basilisk II on my iMac runs hundred of times faster than a 68040 CPU and sheepshaver is also much faster then a PPC mac of the mid-late 90's).
Same here. Scrolling is near impossible - I have to subtly 'nudge' the scrollbar to go down a mere page instead of right to the bottom.
enryfox wrote: I think both SS and BII should be maintained (and possibly improved) at least for historical reasons; other platforms have excellent emulators (e.g. UAE for Amiga) which really gives a feel of the old hardware/software.
I agree. Right now, all Apple systems between the original Mac and OS 9 can be run on modern Macs using MvM, BII, and SS. It would be good (and I've thought, easier?*) if a way to run earlier versions of OS X could be developed, especially as 10.1 is now 15 years old.

*especially if Apple were ever to release the Intel versions they developed for every OS X right from the beginning.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: SDL 2.0

Post by emendelson »

enryfox wrote: I would like to provide some help, but for the foreseeable future I really have no time for such a project.
If no one has time to help, then no one is going to maintain these projects, unfortunately. It doesn't do much good to ask other people to do the work.
enryfox
Inquisitive Elf
Posts: 36
Joined: Tue Oct 13, 2009 10:55 am

Re: SDL 2.0

Post by enryfox »

I'm not asking anyone to do anything. I was just wondering if anyone has ever considered upgrading SDL library to version 2.

Moreover I honestly think the reason these projects are not advancing is the lack of interests from the user base. There is a lot of interest in emulating arcade machine, game computers but the mac of the 90's attract very little attention. All projects dealing with mac emulations are somehow abandoned by their original authors and the source codes are mostly untouched since 2005~2006. I'm hoping showing some interest might motivate someone who is more familiar with the emulators than me (my know-how of an emulator in general and the inner working of an original mac is essentially zero, I bought my first mac in 2005 !)

bye
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SDL 2.0

Post by adespoton »

TiddK wrote:
enryfox wrote: Any work that can be done to abstract the emulators from the underlying OS is beneficial in terms of longevity: nowadays CPU's are pretty fast and we can allow an intermediate layer if that helps making the code less OS-dependant (basilisk II on my iMac runs hundred of times faster than a 68040 CPU and sheepshaver is also much faster then a PPC mac of the mid-late 90's).
Same here. Scrolling is near impossible - I have to subtly 'nudge' the scrollbar to go down a mere page instead of right to the bottom.
enryfox wrote: I think both SS and BII should be maintained (and possibly improved) at least for historical reasons; other platforms have excellent emulators (e.g. UAE for Amiga) which really gives a feel of the old hardware/software.
I agree. Right now, all Apple systems between the original Mac and OS 9 can be run on modern Macs using MvM, BII, and SS. It would be good (and I've thought, easier?*) if a way to run earlier versions of OS X could be developed, especially as 10.1 is now 15 years old.

*especially if Apple were ever to release the Intel versions they developed for every OS X right from the beginning.
On my MBP running El Cap, I have every major point release of Mac OS from System 0.85 through 9.0.4 running in parallel, but also have every OS X version from 10.1.5 through 10.11.4 (current) running, with the exception of 10.5.8, which is currently broken for me on both Intel and PPC (Intel I haven't figured out the correct CPUID patch; the Tiger one won't work, so it won't run on my CPU).

The trick is to run OS X under PearPC or QEMU (PPC versions) or VirtualBox or VMWare (Intel versions), not SheepShaver. PearPC and QEMU both have their own forums on this site.

So the only public releases currently missing are 9.1, 9.2 and OS X 10.0 -- 9.1 and 9.2 will eventually be supported by QEMU; I'm not sure whether 10.0 is really worth emulating as it's really just a beta version of 10.1 pushed out for business/political reasons.

But there's really no reason to try and get SheepShaver running these, as QEMU is a much better solution, and it has lots of developer support.
TiddK
Granny Smith
Posts: 106
Joined: Wed Jan 27, 2016 12:25 pm

Re: SDL 2.0

Post by TiddK »

adespoton wrote: On my MBP running El Cap, I have every major point release of Mac OS from System 0.85 through 9.0.4 running in parallel, but also have every OS X version from 10.1.5 through 10.11.4 (current) running, with the exception of 10.5.8, which is currently broken for me on both Intel and PPC (Intel I haven't figured out the correct CPUID patch; the Tiger one won't work, so it won't run on my CPU).

The trick is to run OS X under PearPC or QEMU (PPC versions) or VirtualBox or VMWare (Intel versions), not SheepShaver. PearPC and QEMU both have their own forums on this site.
I thought Parallels, VMWare, etc, wouldn't install any version of OS X except for the Server versions, due to the EULA enforced by Apple?
adespoton wrote: So the only public releases currently missing are 9.1, 9.2 and OS X 10.0 -- 9.1 and 9.2 will eventually be supported by QEMU; I'm not sure whether 10.0 is really worth emulating as it's really just a beta version of 10.1 pushed out for business/political reasons.
I thought I read somewhere that OS X 10.0 was just an enhancement of Rhapsody - i.e. it had much of the look of 9.2.2 but the underlying structure of what would be the Unix-based OS X from 10.1? I'm sure I saw a picture of its desktop which was 'Classic' in its appearance.

I may try giving QEMU a try but I'm not sure how easy it is to set up?
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: SDL 2.0

Post by emendelson »

TiddK wrote: I thought Parallels, VMWare, etc, wouldn't install any version of OS X except for the Server versions, due to the EULA enforced by Apple?
That was true up to 10.6 or 10.7. Recent versions are perfectly legal under Parallels and VMware and both those programs can even automatically set up an OS X VM from the recovery partition on the latest OS X versions.
enryfox
Inquisitive Elf
Posts: 36
Joined: Tue Oct 13, 2009 10:55 am

Re: SDL 2.0

Post by enryfox »

adespoton wrote: On my MBP running El Cap, I have every major point release of Mac OS from System 0.85 through 9.0.4 running in parallel

I guess that requires sheepshaver, i do not know of any other emulator capable of running MacOS 9
adespoton wrote: but also have every OS X version from 10.1.5 through 10.11.4 (current) running, with the exception of 10.5.8, which is currently broken for me on both Intel and PPC (Intel I haven't figured out the correct CPUID patch; the Tiger one won't work, so it won't run on my CPU).
Leopard (10.5.x) was a transitional OS X version, the first of the "modern" OS X which introduced most of the tools still present in today's OS X. It was radically different from tiger both above and under the hood. Tiger belongs to the first wave of OS X, together with 10.1, 10.2 and 10.3: they look terribly outdated and lack several modern features (but they have classic !). Leopard has also a huge footprint, almost twice as tiger; I remember that was a sort of mistake as they released the golden master with a lot of debug code enabled. They fixed than in 10.6 (Snow Leopard), the first real modern OS X which, finally of sadly, got rid of PPC support.
adespoton wrote: So the only public releases currently missing are 9.1, 9.2 and OS X 10.0 -- 9.1 and 9.2 will eventually be supported by QEMU; I'm not sure whether 10.0 is really worth emulating as it's really just a beta version of 10.1 pushed out for business/political reasons.
10.0 can only have historical value as it was a half-baked beta lacking features and under-performing.
I hope QEMU will be able to have MacOS 9.22 running; as of now the only options are real hardware or classic on a PPC mac, and classic is terribly slow and hangs way too often (at least on my mini running tiger).
Last edited by enryfox on Mon Apr 25, 2016 5:20 pm, edited 1 time in total.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SDL 2.0

Post by adespoton »

Just to avoid confusion, everywhere that enryfox said Lion in the previous post, he meant Leopard. When he said "Mountain Lion" he meant "Snow Leopard". :) Also worth pointing out that both Tiger and Leopard had Intel and PPC builds, but both the PPC and Intel builds of Leopard had further restrictions on specific CPU models that would work. Intel version requires a CPUID value to be passed that Haswell and later chips set to 0, preventing them from running 10.5, even under virtualization.

Officially, 10.4 and 10.5 cannot legally be run under virtualization, but 10.4 and 10.5 server can. However, the client and server versions both have the same hardware dependencies.

For general usability, Mini vMac is best for anything pre-7.1. Basilisk II is best for 7.1 through 8.1, although you can also use ShoeBill for some, as well as Mini vMac, FusionPC, SoftMac, and a few others. SheepShaver is currently the only option for running 8.5.1, 8.6 and 9.0.4 -- it will run all the way back to 7.1.2PPC, but that isn't recommended (and isn't really useful, since the OS itself is all 68k instructions, with some PPC shims slapped on to make it work on PPC systems).

See http://apple.wikia.com/wiki/List_of_Mac_OS_versions for a list of OS versions and what hardware they'll run on.

Maybe we should build a similar list on the wiki here, but focusing on what emulator can emulate each OS version, and with what patches, if they are needed?
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: SDL 2.0

Post by neozeed »

SDL is the least of either emulators issues...

I need to take another shot at making WinUAE into a 'brain in a jar' I'm kind of motivated after finding the source code to UAE 0.1, and some other derivative UAE based 68000 projects, like System-16, and some old TI calculators.
don't do today what you can put off until tomorrow.
User avatar
adespoton
Forum All-Star
Posts: 4227
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: SDL 2.0

Post by adespoton »

If you're talking 68k, there's also the MESS source, which compartmentalizes the hardware logic nicely. The PPC code is still unfinished in there though, as far as I know.
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: SDL 2.0

Post by Jorpho »

neozeed wrote:I need to take another shot at making WinUAE into a 'brain in a jar' I'm kind of motivated after finding the source code to UAE 0.1, and some other derivative UAE based 68000 projects, like System-16, and some old TI calculators.
Executor used to bill itself as having the fastest synthetic 68k CPU, but hardware is so fast nowadays that there's probably no point in seeing if it actually compares to the WinUAE core (assuming that component of Executor's emulation can even be decoupled from the rest of the program).

On that note, it's also amusing to ponder if all of the work that went into improving Dolphin's PPC emulation could benefit Sheepshaver – but that's even more fantastical pie-in-the-sky stuff.
Post Reply