+ if ($sim eq 'bochs') {
+ if ($debug eq '') {
+ $bin = 'bochs';
+ } elsif ($debug eq 'monitor') {
+ $bin = 'bochs-dbg';
+ } elsif ($debug eq 'gdb') {
+ $bin = 'bochs-gdb';
+ }
+ $bochsbin = search_path ($bin);
+ $bochsshare = "$bochsbin/../share/bochs";
+ $romimage = "$bochsshare/BIOS-bochs-latest";
+ $vgaromimage = "$bochsshare/VGABIOS-lgpl-latest";
+
+ open (BOCHSRC, ">bochsrc.txt") or die "bochsrc.txt: create: $!\n";
+ print BOCHSRC "romimage: file=$romimage, address=0xf0000\n";
+ print BOCHSRC "vgaromimage: $vgaromimage\n";
+ print BOCHSRC bochs_disk_line ("ata0-master", $disks[0]);
+ print BOCHSRC bochs_disk_line ("ata0-slave", $disks[1]);
+ print BOCHSRC bochs_disk_line ("ata1-master", $disks[2]);
+ print BOCHSRC bochs_disk_line ("ata1-slave", $disks[3]);
+ print BOCHSRC "boot: c\n";
+ print BOCHSRC "ips: 1000000\n";
+ print BOCHSRC "clock: sync=none, time0=0\n";
+ print BOCHSRC "megs: $mem\n";
+ print BOCHSRC "com1: dev=/dev/tty\n" if $headless;
+ close (BOCHSRC);
+ run_command ($bin, '-q');
+ } elsif ($sim eq 'qemu') {