Login  •  Register


The time is now: Fri Feb 22, 2019 2:34 am

Emaculation wiki  •  Delete all board cookies



Post new topic  Reply to topic Page 1 of 1 [ 19 posts ]
Print view Previous topic  |  Next topic
Author Message
PostPosted: Wed Aug 10, 2016 11:01 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 161
First of all, I'm not a UI expert. But I do think we need a cross platform UI for Windows, Linux and Mac.

At least in Mac OS 10.11, I can't compile UI with 10.11 sdk. But I can compile command line BasiliskII without any issues. I'm thinking about writing a simple but ugly Python tkinter UI to wrap up command line and also save/load configuration.

It should be very straightforward but boring task. But I have two obstacles:
  • I have no windows box.
  • I'm not sure if I have a complete list of parameters. I need to dig further in source code.


Code:

Basilisk II V1.0 by Christian Bauer et al.
Unrecognized option '-h'
Usage: ./BasiliskII [OPTION...]

Unix options:
  --config FILE
    read/write configuration from/to FILE
  --display STRING
    X display to use
  --break ADDRESS
    set ROM breakpoint
  --rominfo
    dump ROM information

General options:
  --disk STRING
    device/file name of Mac volume [default=]
  --floppy STRING
    device/file name of Mac floppy drive [default=none]
  --cdrom STRING
    device/file names of Mac CD-ROM drive [default=none]
  --extfs STRING
    root path of ExtFS [default=]
  --scsi0 STRING
    SCSI target for Mac SCSI ID 0 [default=none]
  --scsi1 STRING
    SCSI target for Mac SCSI ID 1 [default=none]
  --scsi2 STRING
    SCSI target for Mac SCSI ID 2 [default=none]
  --scsi3 STRING
    SCSI target for Mac SCSI ID 3 [default=none]
  --scsi4 STRING
    SCSI target for Mac SCSI ID 4 [default=none]
  --scsi5 STRING
    SCSI target for Mac SCSI ID 5 [default=none]
  --scsi6 STRING
    SCSI target for Mac SCSI ID 6 [default=none]
  --screen STRING
    video mode [default=win/1024/768]
  --seriala STRING
    device name of Mac serial port A [default=]
  --serialb STRING
    device name of Mac serial port B [default=]
  --ether STRING
    device name of Mac ethernet adapter [default=slirp]
  --etherconfig STRING
    path of network config script [default=none]
  --udptunnel BOOL
    tunnel all network packets over UDP [default=false]
  --udpport NUMBER
    IP port number for tunneling [default=6066]
  --redir STRING
    port forwarding for slirp [default=none]
  --rom STRING
    path of ROM file [default=]
  --bootdrive NUMBER
    boot drive number [default=0]
  --bootdriver NUMBER
    boot driver number [default=0]
  --ramsize NUMBER
    size of Mac RAM in bytes [default=268435456]
  --frameskip NUMBER
    number of frames to skip in refreshed video modes [default=1]
  --modelid NUMBER
    Mac Model ID (Gestalt Model ID minus 6) [default=5]
  --cpu NUMBER
    CPU type (0 = 68000, 1 = 68010 etc.) [default=3]
  --fpu BOOL
    enable FPU emulation [default=true]
  --nocdrom BOOL
    don't install CD-ROM driver [default=false]
  --nosound BOOL
    don't enable sound output [default=false]
  --noclipconversion BOOL
    don't convert clipboard contents [default=false]
  --nogui BOOL
    disable GUI [default=false]
  --jit BOOL
    enable JIT compiler [default=true]
  --jitfpu BOOL
    enable JIT compilation of FPU instructions [default=true]
  --jitdebug BOOL
    enable JIT debugger (requires mon builtin) [default=false]
  --jitcachesize NUMBER
    translation cache size in KB [default=8192]
  --jitlazyflush BOOL
    enable lazy invalidation of translation cache [default=true]
  --jitinline BOOL
    enable translation through constant jumps [default=true]
  --jitblacklist STRING
    blacklist opcodes from translation [default=none]
  --keyboardtype NUMBER
    hardware keyboard type [default=5]

Platform-specific options:
  --keycodes BOOL
    use keycodes rather than keysyms to decode keyboard [default=false]
  --keycodefile STRING
    path of keycode translation file [default=none]
  --fbdevicefile STRING
    path of frame buffer device specification file [default=none]
  --mousewheelmode NUMBER
    mouse wheel support mode (0=page up/down, 1=cursor up/down) [default=1]
  --mousewheellines NUMBER
    number of lines to scroll in mouse wheel mode 1 [default=3]
  --dsp STRING
    audio output (dsp) device name [default=/dev/dsp]
  --mixer STRING
    audio mixer device name [default=/dev/mixer]
  --ignoresegv BOOL
    ignore illegal memory accesses [default=true]
  --idlewait BOOL
    sleep when idle [default=true]



_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 12:02 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5287
Location: Amsterdam, Netherlands
rickyzhang wrote:
First of all, I'm not a UI expert. But I do think we need a cross platform UI for Windows, Linux and Mac.
There is no cross platform BasiliskII , so why try to make a cross platform GUI? Not only some parameters differ between platforms, but also the prefs file name and location.

Quote:
At least in Mac OS 10.11, I can't compile UI with 10.11 sdk.

You are aware that BasiliskIIGUI builds exist that run fine in OSX 10.11?
The 2013 build by vasi will also support sparse bundles.
See: viewtopic.php?f=6&t=7361#p47395
(I removed the outdated comment that the 2013 GUI build will only run with X11/XQuartz installed.)


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 1:35 pm 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 161
Ronald P. Regensburg wrote:
There is no cross platform BasiliskII , so why try to make a cross platform GUI? Not only some parameters differ between platforms, but also the prefs file name and location.


That's true. I'm thinking if it is possible to use vagrant to package BasiliskII inside Linux virtual machine. I believe as long as we froze development in one specific Linux distribution, we will benefit from:
  • For developers, we will have stable development tool set and dependency library. Eg, fixed gcc version to resolve jit.
  • For end users, we will have one app that runs cross-platform

There is down sides: I'm not sure if the speed and sound can handle well in virtual machine. I will give a try and let you know.

Ronald P. Regensburg wrote:
You are aware that BasiliskIIGUI builds exist that run fine in OSX 10.11?
The 2013 build by vasi will also support sparse bundles.
See: viewtopic.php?f=6&t=7361#p47395
(I removed the outdated comment that the 2013 GUI build will only run with X11/XQuartz installed.)


I had binary one. I really appreciate your efforts to share with others.

But I want to make a modification. The sourcecan't be compiled in modern OS. That's a serious showstopper to BasiliskII project. If we don't find a way out, sooner or later this project will die.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 3:30 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
I have been working on a few - for Sheepshaver and Basilisk ( and PearPC on PC only ). I am not sure whether to release them to others, as they need more testing. You can run multiple machines, but on the Mac ( running a VM Yosemite as I have no "real" Mac ) you can run in single mode fine, but if you run in multiple machine mode the program does some dreadful hacks to the binaries to make the nvram and prefs files unique. ;)

It is written in Real Studio/Xojo, so should be able to compile for Linux too, but that is a bit beyond me.


Image
Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 3:38 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2427
Location: Emaculation.com
Peter, after a few years of hacking the binaries, I eventually switched to just "managing" the nvram file. Check this thread: viewtopic.php?f=6&t=8973

The prefs file location can be indicated on the command line, so isn't an issue.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 4:02 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Thanks for the info - I wish I had seen that a while back. ;)

I will look into using your info when time allows.

PS - does that work for Sheepshaver too?


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Wed Aug 10, 2016 5:09 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2427
Location: Emaculation.com
On OS X, you can create SheepVMs which contain all the data; I haven't looked to see whether those bits are fully available on other platforms. But you can definitely define the name/location of both the prefs and xpram file in SheepShaver.

I do a similar thing in PearPC by always running the Windows 0.5 release in WINE on all platforms.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 10:43 am 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Thanks for the info, once again. From what I can make out:

Basilisk II. You can specify the prefs file on the command line, not the nvram. Your method in the post you referred to provides a workaround.

SheepShaver. A virtual machine system has been implemented. Outside of this method you cannot specify prefs or pram/nvram on the command line and are stuck with these being hidden files in your HOME folder. If you DO use the vm system, these files live in the vm bundle and life is rosy. Except that you cannot run more than one vm at a time so I am not quite sure what the vm system achieves other than allowing storage of multiple configurations.

Personally I have no need for "self-contained" machines, but wish to have several configurations and possibly more than one simultaneous machine running. So for now I am going to continue with my hack-the-binary method.

What we really need is for someone capable to modify the sources to put the prefs and pram files in the same folder as the executable by default rather than the HOME folder, or at least allow them to be specified on the command line, for both emulators.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 11:01 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5287
Location: Amsterdam, Netherlands
peter_j wrote:
SheepShaver. [...] If you DO use the vm system, these files live in the vm bundle and life is rosy. Except that you cannot run more than one vm at a time so I am not quite sure what the vm system achieves other than allowing storage of multiple configurations.

You cannot have multiple VMs running while trying to run them with the same SheepShaver.app at te same time. But when you have multiple copies of SheepShaver, you can have each VM running with a different copy of SheepShaver at the same time. You can drag a VM on a copy of SheepShaver, or use 'Open with...' from the Finder's contextual menu, or you can create a script that will open each VM with a specific copy of SheepShaver. Use your imagination.

Edit: A very simple way, without the use of VMs, to run multiple SheepShaver installations at the same time was demonstrated by me 7 years ago: viewtopic.php?p=30406#p30406


Last edited by Ronald P. Regensburg on Thu Aug 11, 2016 11:16 am, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 11:34 am 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Ronald P. Regensburg wrote:
A very simple way, without the use of VMs, to run multiple SheepShaver installations at the same time was demonstrated by me 7 years ago: viewtopic.php?p=30406#p30406


Yes I read that - I was quite intrigued! Clever workaround.

Ronald P. Regensburg wrote:
You cannot have multiple VMs running while trying to run them with the same SheepShaver.app at te same time. But when you have multiple copies of SheepShaver, you can have each VM running with a different copy of SheepShaver at the same time. You can drag a VM on a copy of SheepShaver, or use 'Open with...' from the Finder's contextual menu, or you can create a script that will open each VM with a specific copy of SheepShaver. Use your imagination.


OK I'll try again. Possibly the guide needs updating, as I must have been misled by these bits:

Quote:
Multiple different VMs can be set up but not more than one can be run at the same time.


Quote:
The VM will not necessarily use the SheepShaver application inside.


And this is a bit icky:

Quote:
Create the disk image that will be the Mac OS startup disk inside the VM package.


I have to admit that at this point I am not attracted to the vm method, but that is personal opinion. My one attempt at opening more than one vm at one time resulted in the second instance being rejected. I'll look at what you say above, though, and try again.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 1:45 pm 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5287
Location: Amsterdam, Netherlands
peter_j wrote:
OK I'll try again. Possibly the guide needs updating, as I must have been misled by these bits:
The guide was written for the average noob user, not for inquisitive minds.

Quote:
Multiple different VMs can be set up but not more than one can be run at the same time.
That supposes starting a VM by double-clicking its icon as most users would do.

Quote:
The VM will not necessarily use the SheepShaver application inside.
A VM behaves as a SheepShaver file. If the VM is double-clicked, OSX will launch the SheepShaver.app that Launch Services has appointed to be the preferred application to open that kind of "file". Usually that is the last SheepShaver copy that is installed on that Mac, whether inside a VM or not, or whether inside that VM or inside another VM. If a second VM is double-clicked while one instance of SheepShaver is already running, OSX will not launch another SheepShaver copy. The preferred copy of the app can be changed in Finder Info for a VM or for all VMs, as you will be aware.

Quote:
Create the disk image that will be the Mac OS startup disk inside the VM package.
That supposes the VM to be portable. Otherwise, the only files that need to be inside the VM are the prefs file and the nvram file. If the VM stays on the same machine all other files can be anywhere and pointed to in prefs with full paths.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 2:29 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Thank you - that is very useful info. :smile:


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 2:33 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Ronald P. Regensburg wrote:
A very simple way, without the use of VMs, to run multiple SheepShaver installations at the same time was demonstrated by me 7 years ago: viewtopic.php?p=30406#p30406


My current hack method ( which I will have to re-think ):

Image

EDIT: Smaller pic.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 3:37 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2427
Location: Emaculation.com
If you don't want to go the direction Ronald and I went and have a unique executable for each instance, use the "open" terminal command on OS X. -n flag will open a new instance of the program, and using -W allows you to pause until the program has stopped running before continuing execution; useful for nvram cleanup when you shut down BII.

Of course, the method for doing this differs on Linux and Windows, so you'll still need to do a bit of environment checking to make this appear cross-platform.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 4:11 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
Thank you. You are all incredibly patient and helpful and I appreciate it. Especially patient with this Mac-idiot! ;)

I am going to have a re-think, but have a cold or something so my brain is a bit porridge at the moment.

Windows is my "home" system, and multi-simultaneous-runs are pretty easy to achieve. But I have not really developed on Mac since Intel came in, and the world has moved somewhat. I am downloading Linux Mint now and will set something up. More learning, on an old befuddled brain. ;)

Thanks again.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Thu Aug 11, 2016 8:33 pm 
Offline
Forum All-Star
User avatar

Joined: Fri Nov 27, 2009 5:11 am
Posts: 2427
Location: Emaculation.com
If you don't want to bother supporting older versions of Windows, as of the anniversary release of Windows 10, Windows has a Linux kernel built-in, complete with Bash -- which means that you can write something for OS X and Linux using bash scripts, and it will run everywhere.

Of course, while Windows 10 will now run ELF binaries, you still need to set up the entire environment to get it to work.


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sat Aug 13, 2016 2:29 pm 
Offline
Tinkerer

Joined: Sat Jul 02, 2016 12:28 pm
Posts: 49
adespoton wrote:
If you don't want to bother supporting older versions of Windows, as of the anniversary release of Windows 10, Windows has a Linux kernel built-in, complete with Bash -- which means that you can write something for OS X and Linux using bash scripts, and it will run everywhere.


Yes I have seen that, but not just yet, methinks. They are also saying the facility is not suitable for graphical apps, but I see others are already working on that.

Ronald P. Regensburg wrote:
You can drag a VM on a copy of SheepShaver, or use 'Open with...' from the Finder's contextual menu, or you can create a script that will open each VM with a specific copy of SheepShaver. Use your imagination.


Thanks for prodding me - I have embedded an Applescript in my program, that works! Bowl me over. About 15 years since I touched Applescript. ( It is only about 6 lines admittedly ;) )

The amazing thing about the sheepvm concept, as you have pointed out, is that you do not have to make a whole virtual machine. In fact, the only thing required in the .sheepvm folder is a file named "Prefs" - everything else can be elsewhere yet you have a unique prefs and resulting nvram file.

EDIT. Multi Macs via sheepvm setups. Putting a strain on my emulated Yosemite!

Image


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 14, 2016 4:01 am 
Offline
Mac Mechanic
User avatar

Joined: Mon Sep 15, 2014 7:59 pm
Posts: 161
Gentlemen,

There are a lot to digest after my 2nd post.

I think what I proposed here is essential to developers. For now, Mac users of Basilisk II are quite happy with what they get since they still have binary to run. If things doesn't work, they will search answers on Internet with luck.

Most people like me, who doesn't own old Mac but want to fix it, can't compile nor develop for Basilisk II in Mac OS. Sooner or later, the fate of BasiliskII will be similar to Sheepshaver -- it can't even execute in latest Mac OS. Nobody cares any more!

Basilisk II is a great open source project because it supports so many host OS platform. However, it is also open source development disaster because it has to maintain so many evolving host OS platform. I don't think we have enough resource to do that.

Originally I thought BII compile failed in El Captain because of UI. Thus, I proposed a cross platform UI using modern tool. After all, UI just interface to configuration. But it turns out that there are more issues besides UI.

We need a better solution.

Therefore, I propose to use Linux virtual machine to develop and distribute BII. I have written a vagrant script to build and make BII up and running. I need to test it further. Once it is stable and feasible, I will share with you all.

In my past experience, I have to patch sheep_net from times to times due to Linux kernel change. I'm tired of doing this. So I think VM should be a better way.

_________________
There is an App for that!
https://github.com/rickyzhang82


Top
 Profile  
Reply with quote Post a reply  
PostPosted: Sun Aug 14, 2016 7:44 am 
Offline
Expert User
User avatar

Joined: Thu Feb 09, 2006 10:24 pm
Posts: 5287
Location: Amsterdam, Netherlands
rickyzhang wrote:
Most people like me, who doesn't own old Mac but want to fix it, can't compile nor develop for Basilisk II in Mac OS. Sooner or later, the fate of BasiliskII will be similar to Sheepshaver -- it can't even execute in latest Mac OS. Nobody cares any more!

Many consider BasiliskII and SheepShaver to have no future, at least on OSX/macOS. Large parts of the code would need to be rewritten from the ground up. However, both BasiliskII and SheepShaver still run fine in latest OSX.

For 68k Mac emulation, Mini vMac is in a better position to survive longer and is still actively being developed.

For PPC Mac emulation, QEMU is the future. Lot of work is being done on it currently and progress is impressive.


Last edited by Ronald P. Regensburg on Sun Aug 14, 2016 9:47 am, edited 1 time in total.
 


Top
 Profile  
Reply with quote Post a reply  
Display posts from previous:  Sort by  
Post new topic  Reply to topic Page 1 of 1 [ 19 posts ]


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
 

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group