Begin main content

Bochs PC Emulation on MacOS X

Well, I am progressing on my journey back into MacOS land, setting up my newly rejuvinated TiBook. You know it's old because I call it a TiBook - no-one calls the new G4 powerbook an AlumBook...

I thought I would blog my Bochs 2.1 installation experience on MacOS X since there is no disk image available yet.

Bocsh is not dissimilar from VirtualPC et al. (don't talk to me about Microsoft) and provides Intel/AMD x86 processor and standard BIOS/VGA emulation. In otherwords a virtual PC ;) Bochs is opensource, fairly unpolished compared to VPC (come on, it's free!) and quite slow in comparison. From what I can tell it's a fairly pure emulator without the heinous caching, prediction, client OS drivers etc. required to make PC emulation zip.

Compilation on Panther (10.3) was really very easy. With the developer tools installed I kjust downloaded the bosch 2.1 source tarball, untarred it, did a ./compile --enable-cdrom ; make ; sudo make install dance and bob's your uncle - bosch.app !

I relocated it before I tried launching it and discovered that a buch of support files (like the bios) are required. The easiest thing to do is to do a make clean and just leave the whole source tree hanging around - makes recompiles nice and easy.

The next step is the config file. Unless you want to be lanching bosch from the command line every time, you want to be editing the .bochsrc config file (invisible in the finder unless you have used tweakUI to show hidden files etc.).

The MacOS X version also doesn't seem to support native cdrom access, so I had to image a win98 SE install CD - you can do it with Apple's Disk Tool (in your Applications/Utilites folder), just make a non-encrypted .dmg file and you'll be sweet.

I made a "images" folder in the bocsh-2.1 folder and copied the cd image (im my case win98-cd.dmg) there. Now we need a hard drive image file, and the bochs suite provides a commandline program bximage to do just that. I gave the following responses:

$ ./bximage
...
Do you want to create a floppy disk image or a hard disk image?
Please type hd or fd. [hd] hd

What kind of image should I create?
Please type flat, sparse or growing. [flat] growing

Enter the hard disk size in megabytes, between 1 and 32255
[10] 4096

I will create a 'growing' hard disk image with
cyl=8322
heads=16
sectors per track=63
total sectors=8388576
total size=4095.98 megabytes

What should I name the image?
[c.img] win98-hd.img

Writing:[] Done.

I wrote 4294950912 bytes to win98-hd.img.

The following line should appear in your bochsrc:
ata0-master: type=disk, path="win98-hd.img", mode=growing, cylinders=8322, heads=16, spt=63

I moved this win98-hd.img file to the images folder as well. Note the line at the end where bximage gives you the config options for the drive you just created - copy that into your clipboard because we are about to make the following amendments to the .bochsrc config file (changes in bold - look for similar lines in the default config):

romimage: file=$BXSHARE/bios/BIOS-bochs-latest, address=0xf0000
vgaromimage: $BXSHARE/bios/VGABIOS-elpin-2.40
ata0-master: type=disk, path="images/win98-hd.img", mode=growing, cylinders=8322, heads=16, spt=63
ata0-slave: type=cdrom, path="images/win98-cd.dmg", status=inserted
mouse: enabled=1
boot: cdrom

Double click Bochs, and do a normal win98 install! Don't go make a coffee, go for a drive to your favourite cafe and read the news paper—this is going to take a LONG time!

When you're all done, you just want to change the boot: config line to disk and commend out the line that mounts your cd image.

Enjoy!

08:22 AM, 02 Feb 2004 by Mark Aufflick Permalink | Comments (3)

Other's misfortune == my gain :)

Readers of my version 0.1 Blog will remember seeing sad photos of my G4 laptop with crazy post-modern coloured stripes on it's screen (fault not feature). Well since my friend Ian's G4 laptop just blew it's motherboard he has kindly donated me his (nearly fully functional) screen!

After a bit of fun with a torx T8 and T6 I now have a fully working G4 laptop! (I hope I used enough heatsink compound...)

The screen does have a few bodgy lines at the bottom of the screen which appears to be caused by the cracked frame (a common problem on original TiBooks) - I need to use some super-super glue or something to keep the hinge together.

The google search you can see is a few million results for "powerbook G4 cracked screen frame" ;)

01:33 AM, 02 Feb 2004 by Mark Aufflick Permalink | Comments (0)

XML

Blog Categories

software (40)
..cocoa (21)
  ..heads up 'tunes (5)
..ruby (6)
..lisp (4)
..perl (4)
..openacs (1)
mac (21)
embedded (2)
..microprocessor (2)
  ..avr (1)
electronics (3)
design (1)
photography (26)
..black and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
food (2)
Book Review (2)

Notifications

Icon of envelope Request notifications

Syndication Feed

XML

Recent Comments

  1. Unregistered Visitor: mmh
  2. Mark Aufflick: Thank you
  3. Unregistered Visitor: Filenames with hyphens
  4. Unregistered Visitor: normal
  5. Unregistered Visitor: mel kaye that died in 2011
  6. Unregistered Visitor: Contacts cats vs. email cats
  7. Mark Aufflick: Thanks for the update
  8. Unregistered Visitor: Correction...
  9. Unregistered Visitor: Update on Mel...
  10. Unregistered Visitor: Error