by February 10, 2005 0 comments



In our last issue we talked about emulating Linux on your Windows PC using Qemu (Multi-OS Emulation, page 50). This time, we will emulate a Mac on Windows. For this we will use Pear PC, an open-source emulator that can run Mac OSX. It works on image files, to emulate the hard drive and CD/DVD ROM drives. You need a licensed copy of a Mac OSX DVD and convert it to an ISO image file.

First you need to create a Mac OSX installation DVD ISO image. For that, put the Mac OSX installation DVD into the drive and launch Nero CD burning software. Here select Extras>Save Tracks. You will get Save Tracks window. Here go to ‘Output File Format’ select ‘ISO Image File (*.iso)’. set its path to where you would want to save the image. Click on Go to create a DVD ISO image. We named it as ‘Mac1.ISO’. After this, you need to create a raw image of a hard drive for use in your emulator.

Direct Hit!
Applies to: Windows users wanting to run Mac applications
USP: Learn to use the Pear PC emulator to run Mac OS on Windows
Links:
http://pearpc.sourceforge.net/ 
On PCQXtreme CD: makedsk.zip, pearpc-0.3.1-win32-sdl-jitc.zip 

Create a Mac disk image 
To create a pre-formatted (HPFS) Mac disk image we will use the MAKEIMG utility, given on this month’s PCQXtreme CD. Copy makedsk.zip from the CD to your desktop and unzip it. You will get two files MAKEDSK.EXE and MAKEIMG.EXE. Double click on MAKEIMG.EXE and it will open the utility in a command window. Enter the complete path for the blank image file (c:\pearpc\mac.img). Then enter the size of the image file that you want to create (enter 2064384). It will take a few minutes to create a blank image file. This utility can create an image only up to 2 GB. The Mac emulator requires IMG files sized in multiples of 516096 (roughly 500 MB) bytes. So to create an image of 2 GB, it would require 4 x 516096 bytes=2064384 MB=1.96 GB (approx 2 GB). 

Configure Pear PC 
Copy pearpc-0.3.1-win32-sdl-jitc.zip from this month’s PCQXtreme CD to your desktop and unzip it in a separate folder. To create a config file in the same folder, open the notepad and write the entries as shown in the box on the next page. Save this file as Macconf.cfg and make sure that the .img and .iso images file that you are using in the config file, are written correctly. 

Run the Pear PC emulator 
Open a command window and go to the folder where you unzipped the Pear PC and issue:

C:\ppc>ppc.exe Macconfig.cfg 

Mac OS is not running on a VNC window it is actually running on Windows through the Pear PC emulator

This will open a Pear PC emulator interface and boot the emulator from the DVD ISO. After a few minutes, you will get an installation screen of Mac OSX. Select Installer>Open Disk Utility. From the left window panel of Disk Utility window, select the 2.0 GB disk and on the corresponding right window panel you will get its settings. Select the Erase tab and give a name to this disk. Then click on the Erase button. This will format the disk according to Mac OSX. After this close the Disk Utility window and return to the installer. 

Select the language preferences and click on Continue. After agreeing to the license agreement, you will be shown a disk that has been formatted for the Mac, in the ‘Select Destination’ window. Select the disk and click on Continue. Now, select the packages that you want to install. 

By default, Mac OSX needs more then 2 GB for a complete install. But unfortunately, we could make only 1.96 GB of blank disk image from the ‘MAKEIMG’ utility. So to fit in Mac OSX in 1.96 GB, you need to omit few packages. You can skip Fonts, Speech Software, Printer Drivers, iMovies and iPhoto packages. Select the packages that you want and click on Install. 

Installation will take a few hours for Mac OSX. After that it will reboot your emulated Mac. Now, open the config file (‘Macconfig.cfg’) again in the notepad and change the entry shown below. 

The ‘macconfig.cfg’ file 

## PearPC Configuration File
## Start Resolution
ppc_start_resolution = “800x600x15”
redraw_interval_msec = 40
## Key codes
key_toggle_mouse_grab = “F12”
key_toggle_full_screen = “Alt+Return”
## Loader (booting sequence) 
prom_bootmethod = “auto”
prom_env_Machargs = “-v”
## This is needed if you want to boot Mac OSX
prom_driver_graphic = “video.x”

## PCI IDE Config (Here, specify disk image name, which we have created above) give the image file 
pci_ide0_master_installed = 1
pci_ide0_master_image = “c:\Mac.img”
pci_ide0_master_type = “hd”
# The above entries will emulate ‘Mac.IMG’ as primary master disk 
# PCI IDE Config 
pci_ide0_slave_installed = 1
pci_ide0_slave_image = “c:\Mac1.iso”
pci_ide0_slave_type = “cdrom”
# Above entries will emulate ‘Mac1.ISO’ as primary slave DVD drive
## Configure Network Cards
pci_rtl8139_installed = 0
pci_rtl8139_Mac = “de:ad:ca:fe:12:35”

##Configure USB port
pci_usb_installed = 1
##NVRAM
nvram_file = “nvram” 

prom_bootmethod = “select” 

Save this file and run the emulator again as before. You will get the boot selection menu (hard disk or CD-ROM). In this selection screen, select the hard disk option, and the Pear PC emulator will automatically boot from emulated MAC hard drive. And in few minutes, you will see MAC OSX running on your Windows Machine. 

Sanjay Majumder

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

Your data will be safe!Your e-mail address will not be published. Also other data will not be shared with third person.