Basilisk II GUI native to OS X/macOS

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

Basilisk II OS X native GUI with presets

Poll ended at Fri Nov 08, 2019 3:16 am

Thanks, yes please!
6
75%
Thanks for your work but not interested
1
13%
Undecided
1
13%
 
Total votes: 8
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

Thanks, I will do my testing coming weekend.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Basilisk II GUI native to OS X/macOS

Post by emendelson »

This is excellent. Thank you.

When the project is ready for use I hope you'll be willing to post the code on Github in the same way that the BasiliskII code is posted so that people can modify it for their own projects. Your project is the only one that makes prefs-file editing easy for BII, and it would be very good to be able to use it for modified BII builds.

Thank you again for the excellent work!
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Basilisk II GUI native to OS X/macOS

Post by emendelson »

Could you give us the address of the new upload. When I downloaded from the link in your October 13 message, I think I got the older version that crashes when I try to add a sparse bundle. This was the address that I used:

<download link removed>
Last edited by Ronald P. Regensburg on Sun Dec 01, 2019 1:35 pm, edited 1 time in total.
Reason:  
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

Just check in the about menu, should be version 0.13b...
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

Ronald P. Regensburg wrote:Thanks, I will do my testing coming weekend.
Thanks Ronald, I appreciate it!
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Basilisk II GUI native to OS X/macOS

Post by emendelson »

It does say 0.13b, but it still quits when I try to add a sparsebundle...
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

Well, I did not get far. Your app crashes immediately on launch. It may be something in my prefs file.

Edit: Sorry, your app does not crash, see below.

Could it be because I use relative paths (file names only) for files and folders that reside in the same folder as BasiliskII.app?

Code: Select all

disk kanjer755.dmg
disk heenenweer.dmg
extfs doorgeefluik
screen win/1024/768
seriala 
serialb 
ether slirp
udptunnel false
udpport 6066
rom MAC.ROM
bootdrive 0
bootdriver 0
ramsize 268435456
frameskip 0
modelid 14
cpu 4
fpu true
nocdrom false
nosound false
noclipconversion false
nogui false
jit true
jitfpu true
jitdebug false
jitcachesize 2048
jitlazyflush true
jitinline true
keyboardtype 5
keycodes true
keycodefile BasiliskII_keycodes
mousewheelmode 1
mousewheellines 3
dsp 
mixer 
ignoresegv true
idlewait true
Last edited by Ronald P. Regensburg on Sat Oct 19, 2019 7:59 pm, edited 4 times in total.
Reason:  
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

Very sorry. I did not pay attention and got fooled by Gatekeeper.
Your app does not crash when reading my prefs file.

However, I immediately was confronted with the issue that you were not able to replicate:
2. If the prefs file contains paths to disk image files that do not exist in that location, that path does not appear in the volumes list and subsequent saving removes the path from the prefs file. The indication "Not found" is useful, but the app should show the path as it is and not remove it without user intervention.
Maybe I should have been more specific. This does happen with just file names instead of full paths.
The same happens to the keycodes file. If only the file name is used, it is not displayed in the GUI and saving will remove it from the prefs file.

Another issue that you could not replicate:
5. I can only change RAM sizes choosing from the menu, not when I enter a value manually.
Appears to be different from what I thought. Entering a different value manually will only stick when it is followed by a return. In Mac interfaces that is usually not needed, so I did not even try that.

I did not extensively test issue 1.
3. seems to be solved
4. seems to be solved
6. Creates a proper default new prefs file when none exists


Remarks about the interface:
Some settings are not used in the macOS version of BasiliskII. Maybe better hide them for the time being. As far as I know, these are (correct me if I am wrong):
- The SCSI tab
- Audio Output Device and Audio Mixer Device
- Modem Port and Printer Port (not sure about UDP)
(I think that the SDL2 ports of BasiliskII do not use JIT, but other builds do.)
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

Ronald P. Regensburg wrote:I did not extensively test issue 1.
Threw all kinds of prefs files at it, some with unlikely content, and it just reads it. So this issue is also solved.

One remark:
If the rom item is empty, I get the expected: "Put the path to your ROM file here".
If the rom line is missing, I get: "rom false".
Maybe better to have the same message in there as when the rom item is empty.

I did not yet try to add .sparsebundle images.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

Basilisk II GUI OS X does indeed crash when I try to add a .sparsebundle image to the volumes list.

Could it be because the app expects a single file and not a bundle?
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

New version uploaded with the following fixes which were time consuming surprisingly.

1. Reads local files without a path; caveat MacOS uses URLs for file:// paths... so for example you wanted to use disk images from different folders you will have a problem without a path.

Anyway it's fixed for now, but it will rewrite your local files with a full path. This may be annoying but I could probably add a check box to show local files without the path if needed.

2. Saving text entry without an enter/tab or click... from limited testing seems to work now.

3. As for sparse bundles I originally tested by just using the command "touch test.sparsebundle" which worked. But because the way I've written it, it tries to calculate the file size which isn't working with sparse bundles because they aren't a single file. I can write a work around, but haven't had time yet.

Thanks for both of your help with debugging.

I haven't removed any of the extra options yet as I think I will wait until I have a fully working version before doing that in case someone else one day wants those options for some reason?
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

No download link yet? The existing links point to your 17 October 0.13b build.

Not sure why it is a problem to respect existing file names without path. I use those only for files and folders that are in the same folder as the BasiliskII.app. The old GUI.app leaves file names without path as they are. Also your 0.13b build left the rom file name without path and the extfs folder name without path without changing them to full paths.

If the file name is rewritten with a full path, how does the GUI.app know the full path? Will the GUI.app add its own path? If the GUI.app happens to be not in the same folder as the BasiliskII.app I launch, it will then break access from BasiliskII to all those files.

(I started using BasiliskII in MacOSX before there even was a GUI and I still use manual editing a lot. Using file names without path makes it easy to switch between different setups without the need to edit the prefs.)
Last edited by Ronald P. Regensburg on Mon Oct 21, 2019 11:30 am, edited 1 time in total.
Reason:  
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

The download was updated, I didn't change the version number, not sure why the date hasn't changed, it hasn't changed on my local executable either, even though it has definitely updated.

Well I'm not sure what to say. MacOS uses file:// URLs when selecting from a dialog.

So the assumption for files without a path is that they are either in the same folder as the GUI app or the same folder as the basilisk II app, both of which the GUI should know.

If that's not the case, then you must be using basilisk in some other way that you are not mentioning?

What I can do is make sure the prefs file is rewritten the same way as it is read for files that have no path, I can also set an option for displaying path-less files in the GUI as they are read, but I'd rather be able to verify the file exists.
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

Version 0.14 uploaded.

Includes a zero byte test.dmg file, explained below.

Found a few extra bugs myself which are fixed...

It will now read and write disk prefs without paths, and leave them unchanged. Also added an option for displaying files that don't have paths without paths in the interface called "Local Path". Had to add a debugging window for myself since I was getting different results when running the app from Xcode and when running it by itself. At the moment it just shows what it assumes to be your local path, ie. where you have the executable.

Didn't fix the rom file issue yet... will get onto it.

If you add a line to your .basilisk_ii_prefs_test file as such; "disk test.dmg", you can see the functionality of the "Local Path" checkbox. Otherwise known as the Ronald P. checkbox.

I need to rework the way it gathers file info, such as file size, resource type, icon... so that amongst other things it can handle sparsebundle files properly. That may take some time.

Let me know if you find any other bugs.

Thanks again for your help with debugging this Ronald P!

EDIT: Ronald you'll know how to fix this, I can't remember, but when I tried downloading the app and running it, it won't give the correct local directory, there was some terminal command I had to use for the original Basilisk GUI...

Note to self to fix keycodes file...
Last edited by munkymajic on Tue Oct 22, 2019 8:05 am, edited 1 time in total.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

I get the impression that you make it much more complicated than needed. I will test the new build later.
emendelson
Forum All-Star
Posts: 1706
Joined: Tue Oct 14, 2008 12:12 am

Re: Basilisk II GUI native to OS X/macOS

Post by emendelson »

munkymajic wrote:I can't remember, but when I tried downloading the app and running it, it won't give the correct local directory, there was some terminal command I had to use for the original Basilisk GUI...
The terminal command that gives the current local directory is:

Code: Select all

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

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

I appreciate your efforts, but it is now much too complex. I am sorry if I have not been clear, but this "local paths" feature is not what I asked for. It may also be confusing for the average user.

The GUI app should always write full paths when a file (or folder) is added in the interface. And it should read and display those full paths when it reads the prefs file.

But ...
When it encounters a file name in the existing prefs file without a path (and that would be a string that does not start with a "/") it should leave that string alone, it should display it as such in the GUI, and it should write it back unchanged. Unless, of course, the user chooses to remove or change the item using the GUI. Such a name without path could be labelled "No Path!" in the Kind column in the Volumes list.

It should work this way for disk images, for the ROM file, for the extfs folder, and for the keycodes file and it is how it works in the old GUI.

Explanation: File names without path can only exist in the prefs file if the prefs file was edited manually. A user who does that can be considered an advanced user who knows what he or she is doing.

Not sure what makes it difficult to add a .sparsebundle image. It is a folder (bundle or package) rather than a file.

I use an alias to the prefs file to check the changes or to edit it manually. Apparently the GUI app does not always just overwrite the content of the file, but sometimes replaces the file with a new one, which breaks the connection with the alias. Not sure when that happens.

A few other remarks:
- As you indicated, the ROM file issue is still there.
- The keycodesfile entry in the prefs file is not read by the GUI app
- For consistency with Keycodes and ROM file settings, better use "Unix" or "Unix Root" as label and add a "Browse..." button.
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

Version 0.14c uploaded.

Ronald, assuming you never tested 0.14... it wasn't complicated, it worked in exactly the same way as the original GUI file wise... anyway, have disabled that option for now.

Sparsebundles are fixed... rom is fixed... I thought I'd fixed keycodefile but still not working... also it's set to only read the keycodefile if the checkbox is ticked... perhaps I should either grey out the keycodfile box unless the checkbox is ticked or just read a keycodefile in regardless.

Bunch of other fixes....
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

munkymajic wrote:Ronald, assuming you never tested 0.14... it wasn't complicated, it worked in exactly the same way as the original GUI file wise...
I did test 0.14 for some two hours in different situations and setups before writing my comment. For a user it is unnecessarily complex and it does not work as the original GUI that does not have a "local paths" setting but that does leave file names without path (not necessarily "local" files!) untouched.

The download now appears to be 0.14c. I will test it later today.
User avatar
Ronald P. Regensburg
Expert User
Posts: 7821
Joined: Thu Feb 09, 2006 10:24 pm
Location: Amsterdam, Netherlands

Re: Basilisk II GUI native to OS X/macOS

Post by Ronald P. Regensburg »

I tested 0.14c concentrating on adding and removing files.

Disk images:
The local path feature is disabled, but not removed.
When I add a disk mage to the volumes list, the full path will be displayed, but when the file is in the same folder as the GUI, it is saved as file name only.

- The full path should be shown and saved always!

- With one exception:
If the GUI encounters in the prefs file a 'disk' string that is not a full path, it should display it as such and again save it as such. Showing "No Path!" for the kind is helpful to remind the user that it may not work if the name is not correct or if the file is not in the same folder as the BasiliskII application.

When the GUI always writes full paths otherwise, this situation can only occur when a user is experimenting and edits the prefs file manually in a text editor.

"Unix Root"
Works as I think it should:
- Both when extfs is empty or when the item is missing altogether, the message "Put an OS X path here to share it with Basilisk" is shown.
- Adding a folder for Unix Root works as it should, the full path is shown and the full path is saved.
- If only a folder name is found in the prefs file, it is correctly shown and again saved as such.

I can imagine one improvement: While browsing, don't allow files to be selected. Unix Root should be a folder.

"ROM File"
Does not work correctly with regards to the message:
When the rom item is empty, it shows an empty box.
When the rom item is missing altogether it shows "drom false".
- It should work just like "Unix Root", in both cases it should show the message "Put the path to your ROM file here".

Saving path or file name works correctly with one issue.
- Adding a file for ROM File works as it should, the full path is shown and the full path is saved.
- If only a file name is found in the prefs file, it is correctly shown and again saved as such, albeit with an extra space before the file name. Each time settings (any setting) are saved, again an extra space is added.

"Raw Keycodes"
Does not read the prefs file, regardless whether keycodes is set to true or false. Ticking "Use" and entering (the path to) a file in the box is saved correctly, but when the GUI is launched again both boxes are empty and saving sets it back to false with no (path to a) file name.
perhaps I should either grey out the keycodfile box unless the checkbox is ticked or just read a keycodefile in regardless
Greying out the keycodefile box when the checkbox is not ticked is how it works in the old GUI.

I can also imagine another solution:
Remove the checkbox and only leave the keycodefile box. When (the path to) the name of a keycodefile is saved, also keycodes is set to true. When the box is empty, saving will set keycodes to false.
Last edited by Ronald P. Regensburg on Tue Nov 12, 2019 10:45 am, edited 2 times in total.
Reason:  
gorans
Inquisitive Elf
Posts: 26
Joined: Wed Dec 16, 2015 5:10 pm

Re: Basilisk II GUI native to OS X/macOS

Post by gorans »

For me, this app crashes on launch:

Code: Select all

Process:               Basilisk II GUI OS X [69658]
Path:                  /Users/USER/Desktop/*/Basilisk II GUI OS X.app/Contents/MacOS/Basilisk II GUI OS X
Identifier:            munkymajic.Basilisk-II-GUI-OS-X
Version:               0.14c (1)
Code Type:             X86-64 (Native)
Parent Process:        ??? [1]
Responsible:           Basilisk II GUI OS X [69658]
User ID:               501

Date/Time:             2019-10-23 18:04:37.336 +0200
OS Version:            Mac OS X 10.13.6 (17G8037)
Report Version:        12
Anonymous UUID:        BCC0B601-AD8F-9800-EFE1-FAAD815A9289

Sleep/Wake UUID:       2B0B1778-C374-416D-ADE3-BBB60A77E02D

Time Awake Since Boot: 100000 seconds
Time Since Wake:       3500 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [0]

Application Specific Information:
Fatal error: Index out of range
kanjitalk755
Apple Corer
Posts: 239
Joined: Thu Nov 09, 2017 12:06 pm

Re: Basilisk II GUI native to OS X/macOS

Post by kanjitalk755 »

Ronald P. Regensburg wrote: (I think that the SDL2 ports of BasiliskII do not use JIT, but other builds do.)
I have revived JIT compiler of BasiliskII.
However, it is somewhat unstable, and the scenes that can be used may be limited.
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

gorans wrote:For me, this app crashes on launch:
Can you copy/paste the contents of your basilisk prefs file? Omiting any personal info you don't want public.

Maybe Ronald can explain what he meant by the gatekeeper issue that crashed his?
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

Ronald P. Regensburg wrote: Well, I did not get far. Your app crashes immediately on launch. It may be something in my prefs file.

Edit: Sorry, your app does not crash, see below.
Very sorry. I did not pay attention and got fooled by Gatekeeper.
Your app does not crash when reading my prefs file.
Could you please explain for others how you fixed this?

EDIT: Also what's the terminal command to apply to the app so that it can access app relative paths? Some kind of sandbox thing I guess? Will need it later for launching basilisk.
User avatar
munkymajic
Tinkerer
Posts: 47
Joined: Thu Nov 08, 2018 3:04 am

Re: Basilisk II GUI native to OS X/macOS

Post by munkymajic »

emendelson wrote: The terminal command that gives the current local directory is:

Code: Select all

pwd
Thanks, but I meant the terminal command enabling the app to access local app relative paths, it can't by default.

Sparsebundles are accessible too.
Post Reply