Gripe about 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

SheepShaver:

Brilliance
5
63%
The worst thing since Windows/386
3
38%
 
Total votes: 8
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

emendelson wrote:Sorry to report that in my solution (an Applescript runs Sheepshaver with 8.6) Sheepshaver simply doesn't start with

ether en0

and either

jit false

or

jit true.

This is under OS X 10.9. I'll be running 10.9 for at least another day or two, but will probably upgrade to 10.10 over the weekend.
Its unstable at best.

You'd have to run it from a terminal and give me the full output to really have any hope on this one.. It is pretty crash happy to start, but once it does start it should be ok... try the slirp.
don't do today what you can put off until tomorrow.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Gripe about sheepshaver...!!!!!!

Post by emendelson »

Here's the terminal output with ether en0 and jit false, using all four executables:
SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
Reading ROM file...
EtherInit with [PCAP]
Pcap version [libpcap version 1.3.0 - Apple version 41]
ethernet.c: pcap_open_live error on en0!
Does this help at all?
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

emendelson wrote:Sorry to ask another favor: at some point later on, could you let us know which files are modified with your slirp fixes? I'd like to try building your slirp fixes into my own project which has some keyboard changes and a help menu. Thanks again for this.
It was pretty much everything. Some of the 'core' fixes were a few lines here and there. Like everything else it was a matter of finding the lines.

The larger change was renaming some structures that were causing Visual C++ to freak out with duplicate symbols at runtime. (socket was one, there was another I think) I figured with all the collisions and so much of this being C++ with lazy bindings it would be a good thing to rename some stuff so it didn't collide.

SLiRP is 3 clause BSD, and I'm not holding onto my changes, although you'd have to diff them to see exactly what they were... And they weren't that much but it's the difference between IE working or not. So you can use the SLiRP stuff in whatever you want.
don't do today what you can put off until tomorrow.
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

emendelson wrote:Here's the terminal output with ether en0 and jit false, using all four executables:
SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
Reading ROM file...
EtherInit with [PCAP]
Pcap version [libpcap version 1.3.0 - Apple version 41]
ethernet.c: pcap_open_live error on en0!
Does this help at all?
You need to run with elevated privileges. Use 'su' or 'sudo'. You may have to enable to root user.
don't do today what you can put off until tomorrow.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Gripe about sheepshaver...!!!!!!

Post by emendelson »

OK, it's running now, started with sudo. It started up. I ran Classilla, which took forever to load, and now doesn't open any remote sites. Here's the terminal output so far:
MacBookAir2012:NewSS edward$ sudo ./SheepShaver-gcc42-O2
Password:
SheepShaver V2.4 by Christian Bauer and Mar"c" Hellwig
Reading ROM file...
EtherInit with [PCAP]
Pcap version [libpcap version 1.3.0 - Apple version 41]
Ethernet address fe fd 00 00 fe f6
Building packet filter.........!
Using filter
(((ether dst 09:00:07:ff:ff:ff) or (ether dst ff:ff:ff:ff:ff:ff) or (ether dst fe:fd:00:00:fe:f6)))
Detected CPU features: MMX SSE SSE2 SSE3 SSSE3
PowerPC CPU emulator by Gwenole Beauchesne
pcap_next just got a packet! 110 long wait for 30->0
iCab also won't access any sites.

Then it appeared to lock up, but eventually sorted itself out and exited. And the final message from the terminal was:
SCSIExit
Does this help at all?

About your source: OK, I understand. At some point I'll try to move my menu system into your source and see if I can get it working. Meanwhile, a thousand thanks for the work you've been doing on this!
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

emendelson wrote: pcap_next just got a packet! 110 long wait for 30->0
Ugh, same deal as Cat_7.. that means one packet made it in, and that counter should go to 30 but obviously isn't incrementing.. Which is why nothing works. I can drop the 30 packets, but it won't matter much as it's obviously not processing any more packets. If you want to mess with the debugger set a breakpoint in receive_func :

Code: Select all

	if(is_pcap){
		SDL_LockMutex(slirp_queue_mutex);
		data=_pcap_next(pcap,&h);
		SDL_UnlockMutex(slirp_queue_mutex);
		if(data==0x0){goto WTF;}	//dont know why this is happening!
if(wtfcount<31){
printf("pcap_next just got a packet!\t%d long wait for 30->%d \t\t\r",h.caplen,wtfcount);
I would place a breakpoint on "data=_pcap_next(pcap,&h);" and see if it get's called more than once... Or even just trace it after the first time to see what happens..
SCSIExit
This is just from my scsi_file, which is the Basilisk II SCSI interface talking to previous's, SCSI interface. It's only useful for SCSI disk emulation (in a flat file), and *some* CD-ROM stuff. I need to finish writing TOC functions, notification and eject as I think the first two is what is holding up BII from reading normal CD-ROM's. Once booted MacOS on Sheep doesn't talk to the old SCSI manager so nothing much happens. Only one ROM I've seen can even boot from the SCSI disk file.. and I haven't been able to mount HFS images that I know work in BII, so it's kind of useless in Sheep. So yeah, that message is normal, more so to know that the exit is clean and that SCSI had a chance to dismount and shutdown nicely.
Does this help at all?
Absolutely!

Not to whine but "it doesn't work" helps nobody, the more info the better!! :mrgreen: I'm a terrible psychic, and I never really used Mac's as macs. I was always more into Unix, so A/UX nextstep/openstep/rhapsody/osx were my interest.
don't do today what you can put off until tomorrow.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Gripe about sheepshaver...!!!!!!

Post by emendelson »

I've never tried any debugging, so I'll probably stumble a lot before I can get anything useful but I'll give it a try. It's time I learned how do this stuff...
Mac8a
Student Driver
Posts: 19
Joined: Sun Nov 09, 2014 2:20 pm

Re: Gripe about sheepshaver...!!!!!!

Post by Mac8a »

I hope this helps or is encouraging...

Image

It's Mac OS 9.0.4 running in 32 bit mode on SheepShaver with System Profiler reporting a "Power Macintosh" PowerPC G4 with Machine ID: 67; all on top of a MacBook Air (13-inch, Mid 2011) 1.7 GHz Intel Core i5 running 64 bit OS X Yosemite 10.10
Not Included in the Picture: Xcode Version 6.1 (6A1052d)
[Edit]
Sound and Internet work beautifully.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Gripe about sheepshaver...!!!!!!

Post by mabam »

I've downloaded neozeed's source from this post. I actually don't know what to do with it and would appreciate any help on that.

But before I go through this (which to me would probably be quite a hassle) I have a question to those who actually run neozeed's build on OS X: Are you able to ping SheepShaver from your host system? Reason for my question is this topic.
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

Ive only been able to run under 10.6 successfully with my modifications. I don't know why it fails with later versions and more bizarre is why the same code works fine with Basilisk II.

The more I tore sheep apart the more apparent that the only way to save it, will involve a massive rewrite.

What are you trying to run? can Basilisk run it? I'd go that route if possible.

Work and real life have been keeping me busy as well. Although if I had more time effort id probably spend it on the 68000 side.

The biggest problems with sheep lie with the way it maps memory, and that it still hooks into the 68000 side of things. Much how I found out why the SCSI shim is basically only good for booting. And emulating the hardware will be Marjory involved. I forget if there is even any XNU source from pre 10 OS X floating around that includes ppc hardware. And is the payoff with it?

Sorry
don't do today what you can put off until tomorrow.
uyjulian
Apple Corer
Posts: 244
Joined: Fri Aug 27, 2010 1:02 am

Re: Gripe about sheepshaver...!!!!!!

Post by uyjulian »

Yeah, sheepshaver is a total mess... I think it pretty much requires a rewrite. It works, however! But when you try to change stuff, it's just too ugly.

Or, you could contribute to qemu/openbios ...
neozeed
Apple Corer
Posts: 293
Joined: Sun Aug 25, 2013 3:25 am
Location: Hong Kong

Re: Gripe about sheepshaver...!!!!!!

Post by neozeed »

julialy wrote:Yeah, sheepshaver is a total mess... I think it pretty much requires a rewrite. It works, however! But when you try to change stuff, it's just too ugly.

Or, you could contribute to qemu/openbios ...
Every time I've tried to do anything with Qemu it's rejected with no real explanation and bug reports are ignored if it's not linux on linux... So I'm kind of bummed out about qemu. And I dont want to do a soon to be dead end branch of Qemu (like the pc98 one). Qemu is tied to gcc, and as the compiler drifts the whole thing needs to be re-written. But needing to map memory at 0x00000000 is going to not help sheep's case any. And pulling apart the memory will be hard in how sheep relies on being able to segfault non memory pages to do IO and signal the helpers. I'm amazed it even runs.

Also the qemu people are picky about free bioses to boot and run... Linux. Itd be just so much work. And looking at UAE's portable 68000 stuff it's making basilisk look like a well behaved mac os hypervisor with kickass virtio.

Too bad the guy who was doing pearpc was killed by a train.

The only killer ppc appreciate to me was oni, and they had an OS x version that even was re targeted to x86.
don't do today what you can put off until tomorrow.
User avatar
mabam
Master Emulator
Posts: 497
Joined: Wed Apr 10, 2013 9:32 am

Re: Gripe about sheepshaver...!!!!!!

Post by mabam »

neozeed wrote:Ive only been able to run under 10.6 successfully with my modifications. I don't know why it fails with later versions and more bizarre is why the same code works fine with Basilisk II.

The more I tore sheep apart the more apparent that the only way to save it, will involve a massive rewrite.

What are you trying to run? can Basilisk run it? I'd go that route if possible.
I want to use it as AppleTalk print server (my LW 4/600 PS cannot be set to use an IP address). See this link from my previous post.
I never tried Basilisk II, though your version with networking would probably work for this purpose. The thing is that I only want to use software I officially own. That leaves the old world ROM extracted from my PowerMac 7500/100 and the new world ROM from the Mac OS ROM Update 1.0.

Neither do I have a license for IPNetrouterX. Without it I can enable AppleTalk in SheepShaver under Mountain Lion, but SS and my host machine with ML cannot see each other. I can't even ping SS from ML. In this post Cat_7 kindly tried to help a couple of months ago. But he couldn't find a way to successfully bridge the two in order to print from OS X to SS via LPD.

I'm now using an XP license with enabled AppleTalk. But I really would prefer SheepShaver.

If bridging the host OS X with SS works in 10.6, I could install SS in my 10.6 VM. But it would not be a handy way to print if I first had to startup the VM and then SS.
kikyoulinux
Tinkerer
Posts: 92
Joined: Sun Sep 28, 2014 11:53 am

Re: Gripe about sheepshaver...!!!!!!

Post by kikyoulinux »

neozeed wrote:Image

Ok, so I got it to "work" on OS X..... wel 10.6 in VMWare. I have no idea if this means it will work on your setup.

* If AppleTalk packets get passed early in the boot stage, it will crash.
* If JIT is enabled, it will crash
* Performance is horrible, I'm getting 150k/sec on my LAN, Basilisk II with no JIT blows this thing away.

Honestly I feel kind of hesitant releasing this, but I know it was desired, and I guess it'll help someone somewhere being able to have an easier conversation... So I'm going to upload my source tree, including binaries built with GCC 4.0 & 4.2 with either O2 or Os flags. I'm not sure which is more stable/faster...

So here is my source tree. Sorry you still have to deal with the changing password thing, but cancel it, and it'll tell you the password.

Other lessons learned... SheepShaver's segfault model only works when the CPU thread is the main thread. Even though you "can" stuff the CPU into a subordinate thread, it doesn't play nice once it segfaults, it'll just spin waiting for something that clearly isn't going to happen.

In config.h I added in USEGLOBALvideo as a way for main to call the screen update to end the vast majority of pool leakage. I also added SHEEPSHAVER_CURSOR to enable the hardware cursor. I was having some issues installing OS 8.x when the 'hand' was drumming the fingers waiting for the OS to install it crashed many times, while disabling the hardware cursor made it play nicer. Maybe it's my setup, I'm not sure.

Also in this version I don't read .sheepshaver_prefs but rather sheepshaver_prefs in the current working directory. I didn't want to trash any other prefs. I have to test again but I *think* this should work on 10.10 ... As I found out the hard way x86_64 binaries can nolonger mess with the zero page, so this is a 32bit only build, but I was running it with my SLiRP fixes ok on my macbook air.

This hasn't been extensively tested. I hate to even call it tested, I just copied a few MB of stuff over an NT server running AppleTalk,a nd viewed some flash video with Internet Explorer 5.1 .... I'm sure there are PLENTY of things broken. JIT should work with these binaries (Quake1 is quite playable), but DOOM crashes hard (isn't it a 68k binary?). DOOM runs ok on Basilisk II so does it matter?

If you want speed, JIT + SLiRP is the way to go. Since this is basically the same as the version I was using with BasiliskII I think it's more stable than the generic version as I could at least run all kinds of programs with some of my fixes vs the 'stock' github version.

I should add that I've been primarly testing with that PowerMac 9500 v1 ROM, along with MacOS 8.6. I found 8.0 and 8.1 too unstable, 7.x & 9.0.4 uninteresting.

To get around the early crashing while booting 8.6, I rigged it to drop the first 30 packets. I've successfully booted 10/10 times, so I'm almost OK with that. I'd rather know when the OS is ok, and go with that, but I'm not sure. I thought about a timer, and say ignore the network for the first 30 seconds, and maybe that is the better way to go. When you launch this you'll see some message updating about packets and "wait for 30->" and a number... once it reads "wait for 30->30" , the message will no longer update, and it'll start to forward packets into the machine. You probably will have to disable and re-enable AppleTalk from the chooser to see the network (or I had to). You may have to get creative to generate the needed packets on your network to get it over 30, as those are packets received. Broadcast packets work too, so maybe you can work with that... As long as Sheep Shaver isn't alone something should be looking for other devices.
Wow, any build for Windows?
Post Reply