Skip to content

PearPC Configuration File

Krzysztof Hasiński edited this page Aug 13, 2016 · 3 revisions

Dissecting the PearPC Configuration File

This article describes PearPC's configuration file format.

Sample Configuration File

To get started, here is an example configuration file

ppc_start_resolution = "800x600x32"
ppc_start_full_screen = 0
redraw_interval_msec = 20
key_change_cd_0 = "none"
key_toggle_mouse_grab = "F12"
key_toggle_full_screen = "Alt Return"
prom_bootmethod = "select"
#prom_bootmethod = "force"
#prom_loadfile = "test/yaboot"
#prom_env_bootpath = "disk"
#prom_env_bootargs = ""
#prom_env_machargs = "-v"
prom_driver_graphic = "video.x"
#page_table_pa = 104857600
#cpu_pvr = 0x00088302
#cpu_pvr = 0x000c0201
memory_size = 0x8000000
pci_ide0_master_installed = 1
pci_ide0_master_image = "c:\PearPC\6gb.img"
#pci_ide0_master_type = "hd"
pci_ide0_slave_installed = 1
pci_ide0_slave_image = "d:\"
#pci_ide0_slave_image = "2,0,0"
#pci_ide0_slave_image = "/dev/cdrom"
pci_ide0_slave_type = "nativecdrom"
pci_3c90x_installed = 0
pci_3c90x_mac = "de:ad:ca:fe:12:34"
pci_rtl8139_installed = 0
pci_rtl8139_mac = "de:ad:ca:fe:12:35"
pci_usb_installed = 1
nvram_file = "nvram"

Graphics

The first few lines of this configuration file relate to graphics in PearPC.

ppc_start_resolution = "800x600x15"

This specifies the resolution which PearPC starts at. This is in the form widthxheightxdepth, where width and height can be any resolution supported by the client, and depth can be either 15 bits per pixel or 32 bits per pixel (note that other color depths are not supported).

ppc_start_full_screen = 0
redraw_interval_msec = 20

ppc_start_full_screen is reasonably self-explanatory. If set to zero, PearPC will start in a window, while if set to 1, PearPC will start in full screen mode. redraw_interval_msec changes the frequency at which PearPC refreshes its screen. Lowering this number will make PearPC feel more responsive, while increasing it will reduce the number of times PearPC refreshes the screen and allow those CPU cycles to be used by the guest operating system.

PearPC Keyboard Shortcuts

key_change_cd_0 = "none"
key_toggle_mouse_grab = "F12"
key_toggle_full_screen = "Alt Return"

These all set the keyboard shortcuts used for various functions within PearPC. If you need to use any of these keys inside MacOS or another guest operating system, they may be changed to a more convenient key combination. Please note that key_change_cd_0 will not have any effect on PearPC 0.4final or earlier, as those builds do not support changing CDs while the system is running.

Boot Method

prom_bootmethod = "select"

This configuration option sets the way PearPC boots the client operating system. It can be set to three options: auto, select, and force. Auto will make PearPC boot off of the first bootable disk it finds when starting. Select will show a screen allowing the disk to be chosen. Force makes PearPC boot from a file on the host machine, and is described in more detail below. Select is the recommended boot method, as it gives you a choice of which disk to boot from.

"Force" Boot Method

prom_bootmethod = "force"
prom_loadfile = "test/yaboot"
prom_env_bootpath = "disk"

If the boot method is set to "force", there are two more configuration options that need to be set. prom_loadfile is the file that you want to boot from, and prom_env_bootpath is the bootpath PROM should set. You should not use this option unless you know what you are doing.

Graphics Driver

prom_driver_graphic = "video.x"

This line specifies the video driver PearPC will use. Video.x is the only video driver available right now for PearPC and is required to run Mac OS X, so you should not change this line.

Memory and CPU

#page_table_pa = 104857600
#cpu_pvr = 0x00088302
#cpu_pvr = 0x000c0201
memory_size = 0x8000000

These options relate to the memory size and CPU emulation in PearPC. The first line, page_table_pa, should be left commented out and not changed, as any setting other than the default may cause problems. The next line, cpu_pvr, specifies the processor that PearPC tries to emulate. There are two processors PearPC can emulate:

  • **0x00088302** - G3 processor; this is the default and the only one that works correctly under Tiger.
    
  • **0x000c0201** - G4 processor with Altivec; Tiger does not work correctly on this processor, but some apps (specifically Photoshop) require a G4 processor and may be usable under Panther. 
    

The memory_size option changes exactly what its name says: it sets the amount of memory given to the guest OS in PearPC. This option must be specified in hexadecimal format, so here are some common memory sizes:

  • 128 MiB = 0x8000000
    
  • 256 MiB = 0x10000000
    
  • 384 MiB = 0x18000000
    
  • 512 MiB = 0x20000000
    
  • 1 GiB = 0x40000000 
    

More memory typically makes PearPC run faster since it uses the host's virtual memory rather than the guest's. However, in many cases, Tiger will not install when using a memory size greater than 128 MiB, so it should be set to 128 for the install, then changed to the desired value.

Disks

pci_ide0_master_installed = 1
pci_ide0_master_image = "c:\PearPC\6gb.img"
#pci_ide0_master_type = "hd"
pci_ide0_slave_installed = 1
pci_ide0_slave_image = "d:\"
#pci_ide0_slave_image = "2,0,0"
#pci_ide0_slave_image = "/dev/cdrom"
pci_ide0_slave_type = "nativecdrom"

These options tell PearPC what types of disks you're using and where they are located. PearPC emulates two IDE drives, one a master and one a slave. Both can hold any type of supported disk, so you can have two hard disks installed at the same time within PearPC (if you need to copy from disk to disk) or you can have a CD and a hard disk at the same time (the most common situation).

Disk Types

PearPC supports the following disk types:

  • hd - Specifies a hard disk image. The path to the image file should be also be specified.
  • cdrom - Specifies a CD or DVD image. As with a hard disk, you must specify the path to the image. On linux, you may also specify a device name (such as /dev/cdrom) to use the CD-ROM/DVD-ROM drive on the host machine.
  • nativecdrom - Uses the host's CD/DVD drive under Windows. The drive letter should be specified as the image location. Under Linux, you may use the "cdrom" type to achieve the same effect, as specified above.

Network Card

pci_3c90x_installed = 0
pci_3c90x_mac = "de:ad:ca:fe:12:34"
pci_rtl8139_installed = 0
pci_rtl8139_mac = "de:ad:ca:fe:12:35"

Here you can tell PearPC which network card (if any) you would like emulated. To enable a network card, set the value of pci_**_installed for the card you would like to 1. You shouldn't need to change the MAC address (pci_**_mac) unless you find that it's conflicting with your computer or another computer on the network. See the Networking Guide for more information on setting up networking in PearPC. (TODO)

Miscellaneous Options

pci_usb_installed = 1
nvram_file = "nvram"

You most likely will not need to change these settings as the default works fine with virtually all setups. pci_usb_installed tells PearPC to simulate a sort of placebo USB hub. Note that this does not provide the guest OS with access to your real USB ports. nvram_file specifies where the contents of the emulated system's NVRAM should be stored, and you shouldn't find a situation where the default does not work.