Additional command line arguments

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
wolfo
Space Cadet
Posts: 3
Joined: Thu Feb 04, 2021 11:50 am

Additional command line arguments

Post by wolfo »

So, I'm using SheepShaver (SheepShaver_notarized_20210202) on macOS 11.1 and am trying to make a collection of various MacOS versions that I can run from a script, like this:

Code: Select all

#!/bin/sh

SHSH_ROM="$SHSH_ROM_DIR/79D68D63 - Power Mac G3 desktop.ROM"

$SHSH_BIN \
	--rom "$SHSH_ROM" \
	--disk "$SHSH_TMP_DIR/Mac OS 8.6.img" \
	--ramsize 68157440 \
	--jit true \
	--idlewait true \
	--ignoresegv true \
	--ignoreillegal true \
	--gfxaccel true \
	--screen window \
	--frameskip 0 \
	$@
And it's been working so far. The problem is mostly that I can't change the resolution - it's stuck at 640x480. The help page from '--help' doesn't say anything about resolution. I tried adapting the prefs file syntax to no avail...

Are there command line arguments to either
- set the resolution
- allow the resolution to be set within the VM
- specify a path to a customized prefs file (instead of ~/.sheepshaver_prefs)
- specify a path to a .sheepshaver_nvram file
- anything else that might not be listed in the --help section

OT, but network isn't working for me. Is the sheep_net thing even included in this build? Sorry if this has been asked elsewhere and I'm missing something.

Code: Select all

WARNING: Cannot open /dev/sheep_net (No such file or directory). Ethernet will not be available.
User avatar
Cat_7
Expert User
Posts: 6145
Joined: Fri Feb 13, 2004 8:59 am
Location: Sittard, The Netherlands

Re: Additional command line arguments

Post by Cat_7 »

Hi,

There was a recent post about command line arguments. Perhaps you can find it using the search function.

Your .sheepshaver_prefs file should contain most prefs items you can set, including screen size.
See the Basilisk/SheepShaver guides for additional settings not available through the GUI.

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

Re: Additional command line arguments

Post by Ronald P. Regensburg »

wolfo wrote: Thu Feb 04, 2021 12:13 pm So, I'm using SheepShaver (SheepShaver_notarized_20210202) on macOS 11.1 and am trying to make a collection of various MacOS versions that I can run from a script, like this:
Wouldn't it be much easier to set up different .sheepvm virtual machines, each with its own ROM file, MacOS version, and settings?
The problem is mostly that I can't change the resolution - it's stuck at 640x480.
Doesn't (for instance)

Code: Select all

screen win/1280/800
work?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Additional command line arguments

Post by Ronald P. Regensburg »

If I would try to do something like this, I would simply use a script that writes the desired settings to ~/.sheepshaver_prefs and then launches SheepShaver.
wolfo
Space Cadet
Posts: 3
Joined: Thu Feb 04, 2021 11:50 am

Re: Additional command line arguments

Post by wolfo »

Hi and thank you for your responses!

Yes, indeed, this works from the command line:

Code: Select all

--screen win/1024/768
Without a hint from "--help", I had tried "--screen window/1024/768" for some reason and it was therefore ignored. At the same time, my correctly syntaxed setting inside ~/.sheepshaver_prefs was ignored because of that half-baked command line argument. So that solved my most immediate problem (network aside) :-)

Ronald P. Regensburg wrote: Thu Feb 04, 2021 3:09 pm If I would try to do something like this, I would simply use a script that writes the desired settings to ~/.sheepshaver_prefs and then launches SheepShaver.
I thought about about going the route of a script that swaps out ~/.sheepshaver_prefs. Yes, that would work I suppose, but it's also pretty kludgy. Even more so when multiple machines are running simultaneously, using the same prefs path and the same nvram file.
Pretty much every other program or daemon in the Unix-oid world has a flag to simply point it to a config file. So I was kinda hoping there is a cleaner way.

Ronald P. Regensburg wrote: Thu Feb 04, 2021 3:03 pm Wouldn't it be much easier to set up different .sheepvm virtual machines, each with its own ROM file, MacOS version, and settings?
Oh ok, I haven't heard of that. Maybe that's exactly what I want. I'll read up on that, thanks for the tip!
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Additional command line arguments

Post by Ronald P. Regensburg »

Why don't you check our setup guide? It is here: https://www.emaculation.com/doku.php/sh ... os_x_setup

When you create a regular SheepShaver setup or a .sheepvm VM setup, you can easily check the syntax for the prefs in the prefs file that will be created. If you would have done that, you would not have made mistakes like the one you made with the screen entry.
wolfo
Space Cadet
Posts: 3
Joined: Thu Feb 04, 2021 11:50 am

Re: Additional command line arguments

Post by wolfo »

I will check this out, especially for the sheepvm thing, thanks.

Though this guide wouldn't have answered my question. Even if there are alternative solutions (like possibly sheepvm), Sheepshaver does have a command line interface. Which is apparently just an afterthought. The only piece of "documentation" is this cryptic hint from the help screen:

Code: Select all

  --screen STRING
    video mode [default=none]
  --windowmodes NUMBER
    bitmap of allowed window video modes [default=0]
That doesn't explain anything at all. But I guess this is not the place to complain about the official documentation or help screen.

Thanks again!
Post Reply