Mysteries of Basilisk II

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
User avatar
sentient06
Mac Mechanic
Posts: 188
Joined: Tue Mar 29, 2011 8:57 pm
Location: London, UK

Mysteries of Basilisk II

Post by sentient06 »

Hello!

I was reading the Basilisk II official support files and the codes and all, trying to understand the whole workflow of the emulator and I've been doing a few tests and I came to some crazy information I never saw written anywhere. I suppose these are old news, but I had to dig a lot the internet for some of the preferences options to understand what they were about, so I suppose more people would like to learn a few tricks!

Model mystery

One of these tests I made is related to the Macintosh model. For example, I got a Quadra 800 ROM file (F1ACAD13) and, if I define a specific set of preferences like.. modelid to 29 (same as ROM), cpu to 68040 with floating-point instructions (FPU) enabled, I can make Mac OS 8.1 run the System Profiler flawlessly! Any other combination with the same ROM will not allow the system profiler to work properly.

I had success with Quadra 605 too.

But the documentation states that "other [model] values are not officially supported and may result in crashes". This is weird, I tried to search the code for details and all I found is that here and there the "Mac IIci" and "Quadra 900" have some honourable mentions in the logs but everything else looks basically the same.

The technical manual also says that B2 emulates a "Mac II series computer", meaning "all 68020/30/40 based Macs with 32-bit clean ROMs". So why is Quadra 900 and the IIci supposed to work best? What's the difference?

Keyboard

I was also playing with the keyboard. If I set the keycodes to "true", being on a mac, my keyboard is basically the same in the virtual machine. Except that the "option" key won't work all the time. No idea why. I can't drag&drop the goddamn control strip. Any ideas?

Running from console

Try it! Try to run the unix executable from console with incomplete parameters like "./BasiliskII --" and wait for the feedback. It seems all preferences can be given using console parameters, for example:
./BasiliskII --disk ./mydisk.dmg --cpu 3 --rom ./myrom.rom
'True' or 'yes'?

Doing the one above I learned that, so far, it seems that in the preferences file one can use "yes", "true", "on", "false", "off" and "no" for booleans. All means the same.

Memory limit

As far as I tested, memory seems to have a limit of 1,024 MB / 1 GB. Is it true?

Classic, anyone?

Basilisk II officially also supports Classic emulation. Actually, there are plenty of code exceptions for this specific model. For example: the computer model and processor type are forced by just having the rom file identified as a classic. I still didn't try it. Does anyone here plays with Classic? How is it?

Force quit without Cmd+Opt+Esc

You can force-quit anything on OSX by using Cmd+Opt+Esc. I actually do this a lot since I work with programming. But Basilisk II can be neatly killed by doing Ctrl + Esc on OSX. I think there used to be a similar command in Windows. Ctrl + F11 or something similar. Also there was an option to quit fullscreen.

So.. what else do you folks know? Any more hidden/forgotten/weird features anywhere?

We could make a compilation of these things!

All the best!
emendelson
Forum All-Star
Posts: 1726
Joined: Tue Oct 14, 2008 12:12 am

Re: Mysteries of Basilisk II

Post by emendelson »

Excellent! Thank you!

Also, in recent OS X builds (if I remember correctly):

Ctrl-Return toggles between full-screen and windowed mode.

Ctrl-F5 captures and releases the mouse.
Jorpho
Master Emulator
Posts: 380
Joined: Fri Sep 17, 2004 4:22 am

Re: Mysteries of Basilisk II

Post by Jorpho »

I dimly recall reading something here about something unusual happening when the amount of RAM is set to exactly 256 MB, but alas, my memory is all fuzzy on the subject and I might even be thinking of Sheepshaver instead. How frustrating. Does this ring a bell with anyone else?
User avatar
adespoton
Forum All-Star
Posts: 4273
Joined: Fri Nov 27, 2009 5:11 am
Location: Emaculation.com
Contact:

Re: Mysteries of Basilisk II

Post by adespoton »

Answers inline below...
sentient06 wrote:Hello!

I was reading the Basilisk II official support files and the codes and all, trying to understand the whole workflow of the emulator and I've been doing a few tests and I came to some crazy information I never saw written anywhere. I suppose these are old news, but I had to dig a lot the internet for some of the preferences options to understand what they were about, so I suppose more people would like to learn a few tricks!

Model mystery

One of these tests I made is related to the Macintosh model. For example, I got a Quadra 800 ROM file (F1ACAD13) and, if I define a specific set of preferences like.. modelid to 29 (same as ROM), cpu to 68040 with floating-point instructions (FPU) enabled, I can make Mac OS 8.1 run the System Profiler flawlessly! Any other combination with the same ROM will not allow the system profiler to work properly.

I had success with Quadra 605 too.

But the documentation states that "other [model] values are not officially supported and may result in crashes". This is weird, I tried to search the code for details and all I found is that here and there the "Mac IIci" and "Quadra 900" have some honourable mentions in the logs but everything else looks basically the same.

The technical manual also says that B2 emulates a "Mac II series computer", meaning "all 68020/30/40 based Macs with 32-bit clean ROMs". So why is Quadra 900 and the IIci supposed to work best? What's the difference?

There are a few things going on here -- the Quadra 900 and IIci are supposed to work best because Basilisk (II) was designed around those hardware models -- the authors put in handlers for the code found in their ROM files, and put in hardware emulation for the hardware as found on those models. This means that all other models are untested, and if anything is significantly different from those two, you will experience unpredictable results.

Keyboard

I was also playing with the keyboard. If I set the keycodes to "true", being on a mac, my keyboard is basically the same in the virtual machine. Except that the "option" key won't work all the time. No idea why. I can't drag&drop the goddamn control strip. Any ideas?

I've always had this problem when using the Windows build on a Mac, but never had it with the Mac build. Something to point you in the right direction though... the keyboard emulated is the old Apple ADB Extended Keyboard. This keyboard doesn't service interrupts in quite the same way as a modern USB keyboard; the keycodes should be compatible, but it may not receive them accurately in all circumstances. Also, the ADB had a slower and slightly different laid out architecture than USB, which means that it could only handle certain keycodes in certain ways. If the option key is being passed in as a regular key, ADB may not be putting it in its own channel as it is supposed to, causing some confusion. That's just a guess though, as I've never had this exact problem. You'd need to run BII from terminal with debug on to find out exactly what's happening.

Running from console

Try it! Try to run the unix executable from console with incomplete parameters like "./BasiliskII --" and wait for the feedback. It seems all preferences can be given using console parameters, for example:
./BasiliskII --disk ./mydisk.dmg --cpu 3 --rom ./myrom.rom
'True' or 'yes'?

Doing the one above I learned that, so far, it seems that in the preferences file one can use "yes", "true", "on", "false", "off" and "no" for booleans. All means the same.

I build my own clickable builds based on Platypus and command-line arguments -- this way I can script more of what's happening when BII runs, and depend less on default files and their limitations.

Memory limit

As far as I tested, memory seems to have a limit of 1,024 MB / 1 GB. Is it true?

This depends on the ROM you're using -- the limit is set by the addressing space available in the ROM IIRC. However, I think BII is designed with the limitations of the IIci and Q900 ROMs in mind, as that's what it was built around.

Classic, anyone?

Basilisk II officially also supports Classic emulation. Actually, there are plenty of code exceptions for this specific model. For example: the computer model and processor type are forced by just having the rom file identified as a classic. I still didn't try it. Does anyone here plays with Classic? How is it?

By Classic, do you mean Mac Classic (the bootable ROM), or do you mean Pre-Mac II with the 24-bit addressing? I've done both, with mixed results. The hardware emulation is a bit spotty, and you sometimes end up with unexpected results for specific apps.

Force quit without Cmd+Opt+Esc

You can force-quit anything on OSX by using Cmd+Opt+Esc. I actually do this a lot since I work with programming. But Basilisk II can be neatly killed by doing Ctrl + Esc on OSX. I think there used to be a similar command in Windows. Ctrl + F11 or something similar. Also there was an option to quit fullscreen.

So.. what else do you folks know? Any more hidden/forgotten/weird features anywhere?

We could make a compilation of these things!

All the best!
I guess some time when I've got a few hours, I should sit down and document what I know about BII... most of it I've forgotten over the past decade, to tell you the truth.
Adam P
Tinkerer
Posts: 67
Joined: Wed Mar 31, 2010 11:55 pm
Location: Maine, U.S.
Contact:

Re: Mysteries of Basilisk II

Post by Adam P »

Model mystery

For much of the Mac OS software, the model no. was used as means of determining built-in features, expecting it to be correct (this sensitive software will require you to match your settings to the model).  And bugs: I remember the System Profiler crashing under System 7— Mac OS 8 required.

Keyboard

The key reading code has its share of bugs, or at least one: using an external file, the high bit would vanish in the mapping, as if Num Lock is off— KP-Enter would come out Enter, 7 as Home.  I’ve managed to get the option key to work for some keyboards, only to face that problem :sad: .

The good part is that the Basilisk II build 142/143 has no problem with my home keyboard; virtual force quitting Alt-Win-Esc as Cmd-Opt-Esc works every time, just as Cmd-F15 as Cmd-Power to enter MacsBug (build 142/OS 7.5.5 only).

Memory limit

With expectations (of the programs, the OS), the memory limit should be regarded as 1GB, given the ROM on a pre-OS 9 32-bit model Mac is hardwired to map the ROM at 40800000 (slightly above 1GB, absolute address).  It wasn’t until OS 9 that the nominal 2GB limit was used, hardware and all.  Forcing anything above that 1032 MB size (including virtual VRAM) isn’t recommended.

Classic, anyone?

I think I’ve tried the Classic ROM; it never would bite— though some old code remains, the II in Basilisk II pretty much means MacII+.  As even Softmac can’t deal with Classic under OS 7 (OS 6 expected, the mouse cursor—messed up), Classic-specific emulators like Basilisk I or vMac/Mini vMac for Classic, ultimately.
Post Reply