Skip to content

Basilisk II preferences on OSX and Unix

Giancarlo Mariot edited this page Oct 10, 2013 · 47 revisions

There is no updated information concerning the pure edition of the Basilisk Preferences. I'll copy here the information I got from Basilisk II's website and the source code. With time, I hope to slowly complete this list to have a convenient reference on this matter.

Table of Contents

Configuration

General rules

Basilisk II is configured via the preferences file, which is a text file usually stored in the home directory of the user as so: ~/.basilisk_ii_prefs.

If no preferences file is present, Basilisk II will create one with the default settings upon startup.

The preferences file can be elsewhere if Basilisk starts with the --config parameter.

Preferences File Format

The preferences file is a text file editable with any text editor. Each line in this file has the format "keyword value" and describes one preferences item. For each keyword, the meaning of the "value" string may vary across platforms. The following keywords exist:


CPU

Usage:

 cpu <cpu number>

It is the processor type to be used, where 0 = 68000, 1 = 68010, 2 = 68020, 3 = 68030 and 4 = 68040.

Default value is 3.


Model

Usage:

 modelid <MacOS model ID>

Specifies the Macintosh model ID that Basilisk II should report to MacOS. The default is "5" which corresponds to a Mac IIci. If you want to run MacOS 8, you have to set this to "14" (Quadra 900). Other values are not officially supported and may result in crashes. MacOS versions earlier than 7.5 may only run with the Model ID set to "5". If you are using a Mac Classic ROM, the model is always "Mac Classic" and this setting is ignored.

The model id is based on Apple's "Gestalt selectors". The value Basilisk understands is the Gestalt Model ID minus 6. More information is available here:

http://support.apple.com/kb/TA47453?viewlocale=en_US&locale=en_US


Rom file

Usage:

 rom <ROM file path>

This item specifies the file name of the Mac ROM file to be used by Basilisk II. If no "rom" line is given, the ROM file has to be named "ROM" and put in the same directory as the Basilisk II executable.


Memory

RAM

Usage:

 ramsize <bytes>

Allocate "bytes" bytes of RAM for MacOS system and application memory.

The value given will be rounded down to the nearest multiple of 1MB.

If you are using a Mac Classic ROM, the maximum available value is 4MB and higher values will be ignored. The default is 8MB.

Tests suggest there is a limit of 1GB (1024MB).

Illegal Memory Access

Usage:

 ignoresegv <"true" or "false">

Set this to "true" to ignore illegal memory accesses. The default is "false". This feature is only implemented on the following platforms: Linux/x86, Linux/ppc, Darwin/ppc.


Disks

Hard drives (standard disks)

Usage:

 disk <volume description>

This item describes one MacOS volume to be mounted by Basilisk II. There can be multiple "disk" lines in the preferences file. Basilisk II can handle hardfiles (byte-per-byte images of HFS volumes in a file on the host system), HFS partitions on hard disks etc., and MacOS-partitioned disks (it can only access the first partition, though). The "volume description" is either the pathname of a hardfile or a platform-dependant description of an HFS partition or drive.

If the volume description is prefixed by an asterisk ("*"), the volume is write protected for MacOS.

Basilisk II can also handle some types of Mac "disk image" files directly, as long as they are uncompressed and unencoded.

HFS Partitions

To specify an HFS partition, simply specify its path, i.e. /dev/sda5.

If you want to access a MacOS-partitioned hard disk or removable volume (Jaz, Zip etc.) and your operating system doesn't understand MacOS partition tables, you can specify the block device name (e.g. "/dev/sda") to access the first HFS partition on the device. Under Linux, if you don't specify any volumes, Basilisk II will search /etc/fstab for unmounted HFS partitions and use these.

Floppy disks

Usage:

 floppy <floppy drive description>

This item describes one floppy drive to be used by Basilisk II. There can be multiple "floppy" lines in the preferences file. If no "floppy" line is given, Basilisk II will try to automatically detect and use installed floppy drives. The format of the "floppy drive description" is the same as that of "disk" lines.

CD-ROM disks

Usage:

 cdrom <CD-ROM drive description>

This item describes one CD-ROM drive to be used by Basilisk II. There can be multiple "cdrom" lines in the preferences file. If no "cdrom" line is given, Basilisk II will try to automatically detect and use installed CD-ROM drives. The format of the "CD-ROM drive description" is the same as that of "disk" lines.

Boot drive options

Usage:

 bootdrive <drive number>

Specify MacOS drive number of boot volume. "0" (the default) means "boot from first bootable volume".

 bootdriver <driver number>

Specify MacOS driver number of boot volume. "0" (the default) means "boot from first bootable volume". Use "-62" to boot from CD-ROM.


Networking

Ethernet

Usage:

 ether <ethernet card description>

This item describes the Ethernet card to be used for Ethernet networking by Basilisk II. If no "ether" line is given, Ethernet networking is disabled (although the Ethernet driver of Basilisk II will behave like a "dummy" Ethernet card in this case). If you are using a Mac Classic ROM, Ethernet is not available and this setting is ignored. The "ethernet card description" is a platform-dependant description of an ethernet card.

General note: To use TCP/IP from MacOS, you should assign a different IP address to the MacOS (entered into the MacOS TCP/IP (or MacTCP) control panel). Otherwise there will be confusion about which operating system will handle incoming packets.

OSX

In OSX, the value usually used for the ethernet setting is slirp.

For Mountain Lion upwards, a driver called tap can be used to enable AppleTalk support with the value etherhelper/tap0/bridge0/en0.

Refer to http://www.emaculation.com/forum/viewtopic.php?f=6&t=8067 for more details.

UDP tunnel

Usage:

 udptunnel <"true" or "false">

Setting this to "true" enables a special network mode in which all network packets sent by MacOS are tunnelled over UDP using the host operating system's native TCP/IP stack. This can only be used to connect computers running Basilisk II (and not, for example, for connecting to the Internet or an AppleShare server running on a real Mac), but it is probably the easiest way to set up a network between two instances of Basilisk II because the UDP tunnelling doesn't require any special kernel modules or network add-ons. It relies on IP broadcasting, however, so its range is limited. It should be fine though for doing a little file sharing or playing Spectre.

UDP port

Usage:

 udpport <IP port number>

This item specifies the IP port number to use for the "UDP Tunnel" mode. The default is 6066.

Shared folder

Usage:

 extfs <direcory path>

This item specifies the root directory for the "Host Directory Tree" file system (the "Unix/BeOS/Amiga/..." icon on the Finder desktop). All objects contained in that directory are accessible by Mac applications.

This feature is only available when File System Manager V1.2 or later is installed on the Mac side. FSM 1.2 is built-in beginning with MacOS 7.6 and can be installed as a system extension (downloadable from Apple, look for the FSM SDK in the developer section) for earlier MacOS versions.


SCSI

Usage:

 scsi0 <SCSI target> ... scsi6 <SCSI target>

These items describe the SCSI target to be used for a given Mac SCSI ID by Basilisk II. Basilisk II emulates the old SCSI Manager and allows to assign a different SCSI target (they don't even have to be on the same SCSI bus) for each SCSI ID (0..6) as seen by the MacOS. "scsi0" describes the target for ID 0, "scsi1" the target for ID 1 etc. The format of the "SCSI target" is platform specific.

Linux

The "SCSI target" has to be the name of a device that complies to the Generic SCSI driver API. On a standard Linux installation, these devices are /dev/sg0, /dev/sg1 etc. Note that you must have appropriate access rights to these devices and that Generic SCSI support has to be compiled into the kernel.

FreeBSD

The "SCSI target" has the format <id>/<lun> (i.e. "2/0").


Display settings

Usage:

 screen <video mode>

This item describes the type of video display to be used by default for Basilisk II. If you are using a Mac Classic ROM, the display is always 1-bit 512x342 and this item is ignored. The format of the "video mode" is platform specific.

Video modes

The "video mode" is one of the following (applies for Unix):

Windowed (default)
 win/<width>/<height>
 win/<width>/<height>/<bits per pixel>

Color display in an X11 window of the given size. There are several resolutions and color depths available. The set of color depths depends on the capabilities of the X11 server, the operating system, and Basilisk II compile-time options, but 1 bit and the default depth of the X11 screen should always be available.

Full-screen

If Basilisk II was configured with "--enable-xf86-dga":

 dga/<width>/<height>

Full-screen display using the XFree86 DGA extension. The color depth (8/15/24 bit) depends on the depth of the underlying X11 screen.

width and height specify the maximum width/height to use.

If both width and height are set to 0: dga/0/0 it results in a "complete screen mode".

If Basilisk II was configured with "--enable-fbdev-dga":

 dga/<frame buffer name>

Full-screen display using the frame buffer device /dev/fb. The color depth (8/15/24 bit) depends on the depth of the underlying X11 screen.

The frame buffer name is looked up in the "fbdevices" file (which path can be specified with the "fbdevicefile" prefs item) to determine certain characteristics of the device (doing a "ls -l /dev/fb" should tell you what your frame buffer name is).

Frame buffering

Usage:

 fbdevicefile <fbdevices file path>

This option specifies the file that contains frame buffer device specifications for the fbdev-DGA video mode (when Basilisk II was configured with --enable-fbdev-dga). The default location of the file is /usr/local/share/BasiliskII/fbdevices. A sample file is included with Basilisk II.

Frame skipping

Usage:

 frameskip <frames to skip>

For refreshed graphics modes (usually window modes), this specifies how many frames to skip after drawing one frame. Higher values make the video display more responsive but require more processing power. The default is "8". Under Unix/X11, a value of "0" selects a "dynamic" update mode that cuts the display into rectangles and updates each rectangle individually, depending on display changes.


Serial ports

Usage:

 seriala <serial port description>
 serialb <serial port description>

The first item describes the serial port to be used as Port A (Modem Port) by Basilisk II and the second item describes the serial port to be used as Port B (Printer Port). If no "seriala" or "serialb" lines are given, Basilisk II will try to automatically detect and use installed serial ports. The "serial port description" is a platform-dependant description of a serial port.

In Unix:

Specify the device name of a serial port (e.g. "/dev/ttyS0") or a parallel "lp" port (e.g. "/dev/lp1"; this only works under Linux and FreeBSD). See below for more information about parallel ports.

Parallel ports: If you select a parallel port it will look like a serial port to MacOS but Basilisk II will only allow data output and ignore baud rate settings etc. You should be able to get some printers to work with this method (provided that you have the right printer driver, like "Power Print" (see http://www.gdt.com)).


Keyboards and mouse

Keyboard type (physical layout)

Usage:

 keyboardtype <keyboard-id>

Specifies the keyboard type that BasiliskII should report to the MacOS. The default is "5" which is a "Apple Extended Keyboard II (ISO)", but many other numbers are understood by most versions of the MacOS (e.g. 11 is a "Macintosh Plus Keyboard with keypad", 13 is a "Apple PowerBook Keyboard (ISO)" )

For additional information, consult the source (which has absolutely nothing about this) consult these pages:

http://utopia.knoware.nl/users/eprebel/Macintosh/InternationalKeyboards/index.html http://utopia.knoware.nl/users/eprebel/Macintosh/Keyboards/

The codes in these pages are Apple's "Standard Resource Types". There are two "Reserved Resource Type Names":

  • 'KCAP' is the "Physical layout of keyboard" (used by Key Caps DA)
  • 'KCHR' is the "ASCII mapping" (software)
Basilisk's keyboard layout is the KCAP value.

Keycodes

Usage:

 keycodes <"true" or "false">
 keycodefile <keycodes file path>

By default, the X11 event handler in Basilisk II uses KeySyms to translate keyboard event to Mac keycodes. While this method is very compatible and ought to work with all X servers, it only works well if your keyboard has a US layout. If you set "keycodes" to "true", Basilisk II will use raw keycodes instead of KeySyms. The keycode depends only on the physical location of a key on the keyboard and not on the selected keymap. Unfortunately it depends on the X server being used and possibly also on the type of keyboard attached. So Basilisk II needs a table to translate X keycodes to Mac keycodes.

This table is read by default from /usr/local/share/BasiliskII/keycodes unless you specify a different file with the "keycodefile" item. A sample keycode file is included with Basilisk II.

Mouse wheel

Mode

Usage:

 mousewheelmode <mode>

If you have a mouse with a wheel, this option specifies whether moving the wheel will be reported to the MacOS as "Page up/down" (mode 0) or "Cursor up/down" (mode 1) keys.

Number of lines

Usage:

 mousewheellines <number of lines>

If "mousewheelmode" is set to mode 1 (Cursor up/down), this option sets the number of key events sent to MacOS for each wheel movement (the number of lines to scroll).


Sound

Usage:

 dsp <device name>
 mixer <device name>

Under Linux and FreeBSD, this specifies the devices to be used for sound output and volume control, respectively. The defaults are /dev/dsp and /dev/mixer.


JIT settings

JIT-specific configuration

A Just-In-Time (JIT) translation engine is available for x86. This is aimed at translating 68040 instructions to native equivalent code sequences, thus providing faster emulation speeds.

Usage:

 jit <"true" or "false">

Set this to "true" to enable the JIT compiler. Default value is "true" if the JIT compiler was compiled in. Besides, this is effective only if Basilisk II is configured to emulate a 68040.

Usage:

 jitfpu <"true" or "false">

Set this to "true" to enable translation of floating-point (FPU) instructions. Default is "true".

Usage:

 jitcachesize <size>

Allocate "size" kilobytes of RAM for the translation cache. The value given will be rounded down to the nearest multiple of a page size. Minimal value is "2048" (2MB). Default value is "8192" (8MB).

Usage:

 jitlazyflush <"true" or "false">

Set this to "true" to enable lazy invalidation of the translation cache. This is always recommended as it usually makes the system more responsive and faster, especially while running MacOS 8.X. Default value is "true".

Usage:

 jitdebug <"true" or "false">

Set this to "true" to enable the JIT debugger. This requires a build of Basilisk II with the cxmon debugger. Default is "false".


Negatives

No sound

Usage:

 nosound <"true" or "false">

Set this to "true" to disable all sound output. This is useful if the sound takes too much CPU time on your machine or to get rid of warning messages if Basilisk II can't use your audio hardware.

No CD-ROM

Usage:

 nocdrom <"true" or "false">

Set this to "true" to disable Basilisk's built-in CD-ROM driver. The only reason to do this is if you want to use a third-party CD-ROM driver that uses the SCSI Manager. The default is "false".

No GUI

Usage:

 nogui <"true" or "false">

Set this to "true" to disable the GUI preferences editor and GUI error alerts. All errors will then be reported to stdout. The default is "false".