Bochs PC Emulation on MacOS X
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:
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
I will create a 'growing' hard disk image with
sectors per track=63
total size=4095.98 megabytes
What should I name the image?
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):
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
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.
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" ;)
Blog Categoriessoftware (40)
..heads up 'tunes (5)
..black and white (6)
..A day in Sydney (18)
..The Daily Shoot (6)
Book Review (2)