Some possible changes for BasiliskII

About BasiliskII, a 68k Mac emulator for Windows, MacOSX, and Linux that can run System 7.x through MacOS 8.1.

Moderators: Cat_7, Ronald P. Regensburg

Post Reply
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Some possible changes for BasiliskII

Post by emendelson »

In advance of Catalina, I've made some very slight modifications to kanjitalk755's BasiliskII code that may or may not be useful. Because I don't know how to write code, I've done these in a very incompetent way, but they seem to work, and they reduce the number of permissions that you need to give to BasiliskII to make it run smoothly under Catalina. The modifications are here:

https://github.com/emendelson/macemu/co ... dcf367e171

What they accomplish are these:

1. If no rom file is specified in the preferences file, then BasiliskII will look for a rom file named ROM in the same folder with the app.

2. If no disk file is specified in the preferences file, then BasiliskII will look for a disk image named basiliskii.sparsebundle in the same folder with the app.

3. The xpram file is visible, not hidden, and in the same folder with the app.

4. This is the one I'm doubtful about: the preferences file is now a visible file in the user's /Library/Application Support folder. This is easy to change in the code. I thought of putting the preferences file in the same folder with the app, so that you could have multiple configurations easily, and maybe that's better. But of course it would be best to support something like sheepvm's, but that's far beyond my abilities.

5. I've made some minor changes to the defaults that are useful for me, but may not be useful to anyone else.

I don't know if this is useful for anyone, but here it is if anyone wants it. A competent programmer can avoid some of the obvious kludges in my code.

EDIT: And this commit fixes a typo where I left the xpram file invisible:

https://github.com/emendelson/macemu/co ... 985f687947
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Some possible changes for BasiliskII

Post by Ronald P. Regensburg »

I understand that the changes are mostly for your own use.

Just some personal comments, from a more general user perspective:

The changes are in BasiliskII only, making it incompatible with the GUI. Most people will still use the GUI for settings, although that will end as long as we do not have a 64-bit GUI.

I do not know why you need to change locations of the prefs and xpram files. Changing the name or location of the prefs file may be a problem for people who have an existing setup.

The ~/Library/Application Support/ folder does not seem the right place for this settings file. You already put the xpram file in the same folder with BasiliskII app, why not put the prefs file there also? Name the files simply "prefs" and "xpram". I never used BasiliskII in Windows, but as far as I know, that would also be consistent with BasiliskII for Windows.

Most people will not use .sparseimage images.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Some possible changes for BasiliskII

Post by emendelson »

I've been mulling this over, and I think you're right.

The Basilisk GUI doesn't run under Catalina, as far as I can tell, so it might be useful to provide an easy way to access and edit the prefs file. I've recompiled and codesigned my Disk Image Chooser script to help make things slightly easier:

viewtopic.php?f=6&t=5455&start=0

And, yes, you're right, I made these changes for my own use. I think you are right about (1) putting the prefs file in the same folder with the application and (2) specifying a .DSK image instead of a sparse bundle.

What I'll do, in case anyone finds this useful, is combine my disk-image-creating script from an earlier thread and the Disk Image Chooser script, so that one AppleScript will create and manage disk images.

For anyone who is expert in Script Debugger and its extra features, it won't be hard to create an AppleScript application that modifies the other prefs items and replaces the GUI, but I don't think I want to make that effort now.

Thank you for those suggestions. I'll follow up on them in the next few days.
Post Reply