New Feature: Self-contained .sheepvm bundles

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

Myrd
Granny Smith
Posts: 107
Joined: Mon Dec 25, 2006 4:09 am

Post by Myrd »

Ronald P. Regensburg wrote: I do not see changed default preferences.
It seems you're right. I thought just changing the defaults in the GUI would do it - but it turns out it takes the default preferences that SheepShaver sets - which are the ones you see.

So should I change those defaults to make them better... or add some special code to the launcher to not read the defaults (and instead use a different set of values) when the .sheepvm bundle is created?
mschmitt
Tinkerer
Posts: 80
Joined: Sun Jul 05, 2009 10:33 pm

Post by mschmitt »

Ronald P. Regensburg wrote:With no ~/.sheepshaver_prefs file present yet (the very first time SheepShaver is started), SheepShaver will recognise a rom file in the same folder when it is named "Mac OS ROM".
Let's start by explaining why that happens -- maybe someone will fix it.

When you start SheepShaver, it checks for a ROM path preference. If the preference does not exist, then it uses the default name of ROM or Mac OS ROM, in the current directory (or in a .sheepvm folder).

If there was no preference file, then the ROM path preference doesn't exist, so it works.

If there was no preference file, it creates a new default file. The default file does not have a "rom" entry. So it still works.

As soon as you try use the preference editor, that's where it goes wrong. The preference editor has a bug: it will write out a "rom" entry no matter what. If you haven't entered anything in the ROM path field, then it just writes a line with "rom" and no value.

On the next start, SheepShaver reads this entry. The "rom" preference name does exist, so it won't use the default name logic. It tries to open the empty path, which fails.

What should happen is one or more of the following:
  • When no ROM path is entered, the prefs editor shouldn't write a rom path preference
  • When SheepShaver requests the "rom" preference value, it should return null if the pref exists but the path is empty.
  • When SheepShaver gets back the rom path preference, if it is blank it should use the default ROM name logic
This doesn't explain the NVRAM issue though. But here are some more findings:
  • If it can't find the ROM file, the only thing you get in the NVRAM file are the SheepShaver defaults. (Unless you are reusing an old NVRAM file.)
  • It only writes the NVRAM file once per minute, so if you start up and then quit faster than that, nothing will be written.
I think our problem is that the old ROM with old OS combination is expecting something in the NVRAM and can't handle if it isn't there. Maybe a real Mac's hardware would have initialized something Open Firmware related. The later ROM or OS puts it there.

If we knew what we were doing, we could debug it and watch it try to read the NVRAM during the old world/7.5.5 boot up, to see what it tries to go after before it crashes.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Myrd wrote:It seems you're right. I thought just changing the defaults in the GUI would do it - but it turns out it takes the default preferences that SheepShaver sets - which are the ones you see.
Eh, how do the SheepShaver defaults appear in the prefs editor in the SheepShaverLauncher for a new VM when SheepShaver is not launched yet?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

mschmitt wrote:I think our problem is that the old ROM with old OS combination is expecting something in the NVRAM and can't handle if it isn't there. Maybe a real Mac's hardware would have initialized something Open Firmware related. The later ROM or OS puts it there.

If we knew what we were doing, we could debug it and watch it try to read the NVRAM during the old world/7.5.5 boot up, to see what it tries to go after before it crashes.
Even when we do not know what is going on exactly, the problem can be solved easily for VMs when the Launcher would copy a nvram file that is known to work with different roms and different system versions into a new VM. I do that manually with a copy I saved and it always works.
Myrd
Granny Smith
Posts: 107
Joined: Mon Dec 25, 2006 4:09 am

Post by Myrd »

SheepShaverLauncher b4 is now ready:

http://projectmagma.net/~myrd/SheepShav ... her_b4.zip

Changes in this version:

- Better defaults for new VMs.
- Can re-arrange order of VMs in list.
- Right-click on a VM to get a contextual menu with commands.
- SheepShaver started from Launcher can edit its own prefs (using same GUI as launcher).
- SheepShaver built from current CVS, which includes several new improvements (see basilisk-devel list).

Note: The SheepShaver embedded inside the Launcher bundle is an Intel-only build, but it can be easily replaced by a different version.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Myrd wrote:SheepShaverLauncher b4 is now ready:
Getting better and better. :)
- Better defaults for new VMs.
- Can re-arrange order of VMs in list.
- Right-click on a VM to get a contextual menu with commands.
- SheepShaver started from Launcher can edit its own prefs (using same GUI as launcher).
Nice improvements!
I noticed a small cosmetic problem with the browse keycodes button while resizing the settings window:
Image
- SheepShaver built from current CVS, which includes several new improvements (see basilisk-devel list).
That is mainly the timer patch? The memory allocation error patch is not yet added. And I suppose that the changes you use for the VM and accessing the preferences editor in the Launcher are also not added yet.
Note: The SheepShaver embedded inside the Launcher bundle is an Intel-only build, but it can be easily replaced by a different version.
It will only work with SheepShaver executables that can work with VMs. The one from the 2009-07-26 build does work (but not with the settings GUI), earlier builds do not work.

Two additional observations:

- The way the processes are identified for the user is still confusing. SheepShaver and SheepShaverLauncher both appear in the Dock with the name of the bundle (SheepShaverLauncher_b4), while SheepShaver and SheepShaverLauncher appear both as "SheepShaver" in the menu bar, in the application chooser (command-tab), and in the Application Monitor.

- There should be a message when the user tries to access (Edit Settings, Launch, Reveal in Finder) a VM in the list that does not exist (anymore).
mschmitt
Tinkerer
Posts: 80
Joined: Sun Jul 05, 2009 10:33 pm

Post by mschmitt »

I'm seeing odd icons getting assigned to the sheepvm bundles. I think we need to assign real creator codes to the SheepShaver and SheepShaver Launcher applications, rather than use ????.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

mschmitt wrote:I'm seeing odd icons getting assigned to the sheepvm bundles. I think we need to assign real creator codes to the SheepShaver and SheepShaver Launcher applications, rather than use ????.
Odd icons? My sheepvm VMs appear as normal folders with SheepShaverLauncher betas. Only when a copy of the 2009-07-26 SheepShaver build is present on my HD, they show as packages with a SheepShaver icon.
mschmitt
Tinkerer
Posts: 80
Joined: Sun Jul 05, 2009 10:33 pm

Post by mschmitt »

Ronald P. Regensburg wrote:
mschmitt wrote:I'm seeing odd icons getting assigned to the sheepvm bundles. I think we need to assign real creator codes to the SheepShaver and SheepShaver Launcher applications, rather than use ????.
Odd icons? My sheepvm VMs appear as normal folders with SheepShaverLauncher betas. Only when a copy of the 2009-07-26 SheepShaver build is present on my HD, they show as packages with a SheepShaver icon.
It happens after Launch Services becomes aware of another application that also has a creator code of ????.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

I see. But I wonder if the VMs should be bundles. For use with SheepShaverLauncher the VMs do not need to be double-clickable bundles with a specific icon. They work fine as ordinary folders.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

I noticed a behaviour of the Launcher that may be or may be not intentional. Is it a feature or is it a bug?

When I create a new VM, set the prefs, remove the VM machine from the list, delete the VM from disk, and later create a new VM with the same name, the prefs are set as with with the removed and deleted VM.
Myrd
Granny Smith
Posts: 107
Joined: Mon Dec 25, 2006 4:09 am

Post by Myrd »

Here's b5 of the Launcher:

http://projectmagma.net/~myrd/SheepShav ... her_b5.zip

Changes in this version:

- Ability to rename VMs from the list. The VM's full path is now shown as a tooltip.
- Fixed default prefs for new VMs after editing another VM's prefs.
- Show warning message when trying to do something with a VM whose file no longer exists at it's location.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Beta 5 and its new features work fine here. No problems so far.

I noticed that the included SheepShaver uses the software cursor. I suppose it was not built with SDL version 1.2.10.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Preparing to post a new SheepShaver for MacOSX build and preparing to re-write most of the setup manual, I noticed a few problems with the virtual machines and the launcher that can complicate setting up a VM for the first time if it is not created by the launcher.

1. If a vm is imported that does not (yet) have a prefs file, the launcher does not create one. Instead, the launcher will crash when clicking the "Settings..." button.

2. When set up in the classical way, SheepShaver will recognize a rom file named "Mac OS ROM" or "ROM" in the same folder and can be launched, even when no ~/.sheepshaver_prefs file exists yet or when a rom file name is not yet defined in the ~/.sheepshaver_prefs file. This does not work with virtual machines that contain a "Mac OS ROM" or "ROM" and no rom file name defined yet in the settings.

Edit: I was wrong. It does work in virtual machines, but only when a "prefs" file (even when blank) exists in the bundle. That leaves the first problem of the launcher not being able to handle a imported virtual machine that happens not contain a prefs file (yet).

Especially the first problem can probably be solved easily.

If you would want make a new Launcher beta, I suggest that you include the SheepShaver executable from my latest UB build:
http://www.xs4all.nl/~ronaldpr/sheepsha ... 091004.zip
It is built with sdl 1.2.10 to enable the hardware cursor and it does not include the "sdl audio patch" that was applied to cvs last February 19th. In MacOSX that patch resulted in degradation of audio performance instead of improvement, seriously so in BasiliskII and to lesser degree in SheepShaver. I used the file src/SDL/audio_sdl.cpp as it was on February 18.
Last edited by Ronald P. Regensburg on Sun Oct 11, 2009 8:24 pm, edited 1 time in total.
MacUser
Tinkerer
Posts: 64
Joined: Thu Apr 20, 2006 7:24 am

Post by MacUser »

Hi guys,

I have a strong feeling that I miss the point why someone should use a self-contained .sheepvm bundle instead of a "old style" setup.
Can you explain me the advantages ?

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

Post by Ronald P. Regensburg »

With only one copy of SheepShaver application, you can have multiple virtual machines, each with its own settings and different MacOS versions. The preference and nvram files will not be the single invisible files in your home folder, but different for each virtual machine and easily accessible within the vm bundles. SheepShaver (the latest build, see link above) will consider a virtual machine as a SheepShaver document and double clicking a virtual machine will launch SheepShaver and start that particular virtual machine.

The SheepShaver Launcher can be used to easily create, set up, maintain, and organize virtual machines.

I intend to write a new manual for SheepShaver MacOSX that will explain how to set up and use these new developments.

(The latest SheepShaver build can also still be used the way previous versions were used.)
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

@ Myrd
I wonder if it would be better to have SheepShaverLauncher and SheepShaver as two separate applications, with no SheepShaver executable inside the Launcher application. Now, launching a VM from the Launcher launches the SheepShaver executable inside the Launcher. That is confusing for the user, as I noted earlier in this thread.

I think it would be more transparant to the user (at least for now) to have the Launcher start a VM like when the VM is double clicked, which will launch the SheepShaver application.

The Launcher application can then create, set up, import, manage, and start the virtual machines (sort of advanced replacement for the stand-alone Prefs Editor) and the SheepShaver application will actually run the virtual machines. SheepShaver builds from current CVS (like my 20091004 build) support the virtual machines.
MacUser
Tinkerer
Posts: 64
Joined: Thu Apr 20, 2006 7:24 am

Post by MacUser »

Hello Ronald,

Thanks for the explanation.
Because I only need to run SheepShaver for a single Classic app (HyperCard) I think there is no benefitt for me to run multiple VM's (at least for know).

Wim
William
Student Driver
Posts: 11
Joined: Thu Oct 01, 2009 7:29 pm

Post by William »

There might not be specific benefit to me, either, but I'd probably do it. I have an 8.6 and a 9.0.4 running. I mostly use OS 9, but if I can get some of the other old games off floppy and onto my MacBook Pro, it could be handy.
Myrd
Granny Smith
Posts: 107
Joined: Mon Dec 25, 2006 4:09 am

Post by Myrd »

Ronald P. Regensburg wrote:@ Myrd
I wonder if it would be better to have SheepShaverLauncher and SheepShaver as two separate applications, with no SheepShaver executable inside the Launcher application. Now, launching a VM from the Launcher launches the SheepShaver executable inside the Launcher. That is confusing for the user, as I noted earlier in this thread.

I think it would be more transparant to the user (at least for now) to have the Launcher start a VM like when the VM is double clicked, which will launch the SheepShaver application.

The Launcher application can then create, set up, import, manage, and start the virtual machines (sort of advanced replacement for the stand-alone Prefs Editor) and the SheepShaver application will actually run the virtual machines. SheepShaver builds from current CVS (like my 20091004 build) support the virtual machines.
I think it's a good idea - I'll see what I can do. This way, the launcher could potentially be expanded to support other emulators as well such as Basilisk and vMac.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Would be great! Looking forward to a new beta. Will you also take care of the problem that the Launcher cannot handle an imported VM bundle that does not have a prefs file?
alone
Space Cadet
Posts: 2
Joined: Wed Oct 21, 2009 6:42 am

Re: New Feature: Self-contained .sheepvm bundles

Post by alone »

Ronald P. Regensburg wrote:
Myrd wrote:This should make it much easier to have multiple OS installs (such as 8.6 and 9.0.4) at the same time.
For that purpose these changes were not really needed. I have no problem having multiple OS installs at the same time and even running them at the same time:
Image
From left to right: 9.0.4, 8.5.1, and 8.6 with new world rom, and 8.1 and 7.5.5 with old world rom. Simply put for each installation all files in the same folder with a copy of the SheepShaver application, make sure files have identical names and use those file names in preferences instead of full paths.

But I suppose that with your changes it is now possible to have a portable SheepShaver installation on a USB stick.
hello.
I want an "Unix" icon that is used in this screen shot.
How do I manually put it where?

I am sorry that the topic is not relevant please.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Post by Ronald P. Regensburg »

Paste an icon that can also be read by the old MacOS on the shared folder.
alone
Space Cadet
Posts: 2
Joined: Wed Oct 21, 2009 6:42 am

Post by alone »

Ronald P. Regensburg wrote:Paste an icon that can also be read by the old MacOS on the shared folder.
Thanks Ronald.

But I wanted to say,
This screenshot is being used to "Unix" icon image I want.
Snow Leopard is a resource was not found.

Who made you the icon image?
peter_j
Tinkerer
Posts: 61
Joined: Sat Jul 02, 2016 12:28 pm

Re: New Feature: Self-contained .sheepvm bundles

Post by peter_j »

Myrd wrote: The system is quite simple. If you create a folder with a .sheepvm extension, and put into it a file called "prefs" (what was previously in ~/.sheepshaver_prefs) and a file called "nvram" (what was previously in ~/.sheepshaver_nvram), you can then pass this folder path as an argument when launching SheepShaver - which will then use those files.
I would really like to know how that is done - is it a command-line argument? ( If I am being stupid please forgive me ).

How does that still result in this from the superb setup instructions seeing as you can have multiple prefs and nvram files:
Multiple different VMs can be set up but not more than one can be run at the same time.
Post Reply