FPU emulation in Sheepshaver?

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
dnwills17
Space Cadet
Posts: 4
Joined: Fri May 29, 2015 1:28 pm

FPU emulation in Sheepshaver?

Post by dnwills17 »

I'd like to run M68k software in SheepShaver under OS X Yosemite that uses floating point instructions. When I run a little assembly language program that tests for the fpu, it reports that no coprocessor is present, and indeed floating point instructions fail. With Basilisk II, the fpu is recognized, and floating point instructions run fine.

I couldn't find anything in the SheepShaver docs that indicated whether the fpu is or is not emulated. Is it?

-- David
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: FPU emulation in Sheepshaver?

Post by Ronald P. Regensburg »

Any special reason why you want to run that 68k software in SheepShaver (which is a PPC emulator)?
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: FPU emulation in Sheepshaver?

Post by uyjulian »

The built in m68k emulator in the Mac OS ROM doesn't support floating point instructions, so go use BasiliskII.
dnwills17
Space Cadet
Posts: 4
Joined: Fri May 29, 2015 1:28 pm

Re: FPU emulation in Sheepshaver?

Post by dnwills17 »

I can't believe I never knew that the Classic Environment did not emulate floating point! For example, that is not mentioned on the Wikipedia page:

http://en.wikipedia.org/wiki/Classic_Environment

Unless you happen to know that the M68LC040 that it emulates has no floating point. (I didn't have a clue.) I finally dug it out here:

http://en.wikipedia.org/wiki/Mac_68k_em ... k_emulator
http://en.wikipedia.org/wiki/Motorola_68040#Variants

I prefer to use SheepShaver partly from inertia, having started out with it, and having been used to OS 9, but mostly because the mouse cursor works better for me under Yosemite than it does with Basilisk II. The Basilisk cursor is actually okay on my Mid 2011 Mac mini, but not so much on my Late 2013 Retina 15" MacBook Pro.

Could someone clarify how the PPC New World ROM interacts with the M680x0 emulation engine, and how that limits the addition of a floating point engine?

I was somehow thinking that the M680x0 engine in SheepShaver might be the same as that in Basilisk II. If so, one could wonder about the feasibility of including the fpu emulation used by Basilisk in a SheepShaver build.

I'm guessing it's not that simple.

-- David
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: FPU emulation in Sheepshaver?

Post by Cat_7 »

Hi,

You can read this: https://tidbits.com/article/951
Also note that the article mentions using SoftwareFPU or PowerFPU for those in need of FPU support.

SheepShaver provides experimental support for the dynamic recompiling 68k emulator.

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

Re: FPU emulation in Sheepshaver?

Post by adespoton »

I recall trying PowerFPU under Sheepshaver once upon a time, but I can't recall the results; I do remember that I went back to just using Basilisk II and OS 8.1 with a Quadra ROM, so I'm guessing that while it fixed some of the FPU issues (if it worked), there were a few other architectural gotchas.
dnwills17
Space Cadet
Posts: 4
Joined: Fri May 29, 2015 1:28 pm

Re: FPU emulation in Sheepshaver?

Post by dnwills17 »

Many thanks for all the responses. I tried PowerFPU, but couldn't get it to work. Maybe I had the same problem mentioned above. When I copied the .hqx version at Macintosh Garden

http://macintoshgarden.org/apps/powerfpu

(after de-hqx-ing) directly into the OS 9 Control Panels folder in SheepShaver, I got the apparently infamous "red X" problem, which I could not overcome with reboots, as suggested on the web. When I ran the installer in the .sit version, which is also supposed to fix the red X problem, it simply crashed SheepShaver, and I had to roll in a backup copy of MacOS.dsk to recover.

It took awhile to learn how to convert the legacy .img that resulted from the .sit, and which would mount neither in OS X nor in OS 9, into a .dmg, which could be copied into a folder.

The upshot is that for now I'll stick with Basilisk II when I need the 68k fpu.

But PowerFPU sounds so nice that I wish I could get it to work:

http://www.toddp.com/classic/Software%2 ... werFPU.pdf

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

Re: FPU emulation in Sheepshaver?

Post by adespoton »

Yeah; PowerFPU likely takes advantage of instructions that SheepShaver doesn't emulate. BII is definitely the better way to go.
dnwills17
Space Cadet
Posts: 4
Joined: Fri May 29, 2015 1:28 pm

Re: FPU emulation in Sheepshaver?

Post by dnwills17 »

Funny though, that the Macintosh Garden site http://macintoshgarden.org/apps/powerfpu claims
that PowerFPU *does* work with SheepShaver.

-- David
Post Reply