QEMU
Features
- two operating modes: full system emulation (which interests us) and Linux user process emulation ( which interests other people ;) and is a NxM platform emulator (multiple host, multiple targets).
- it is faster than Bochs because it uses 'just in time' code compilation technique (allowing reuse of previous interpretation)
- lacks technical documentation so far (imho), which probably makes it less suitable for "baby steps".
- provides native GDB support and you can attach it to GDB/DDD by adding the "-s -S" switches to the command line and from the GDB window start the debugging session with "target remote :1234" if QEMU is waiting on local port 1234.
- support VBE 2.0. This can be checked if you use the GRUB floppy image ready for use and tyiping the command vbeprobe. The test returns:
Supported VBE modes:
0x101 | Packed pixel | 640x480x8 |
0x110 | Direct Color | 640x480x15 |
0x111 | Direct Color | 640x480x16 |
0x112 | Direct Color | 640x480x24 |
0x103 | Packed pixel | 800x600x8 |
0x113 | Direct Color | 800x600x15 |
0x114 | Direct Color | 800x600x16 |
0x115 | Direct Color | 800x600x24 |
0x105 | Packed pixel | 1024x768x8 |
0x116 | Direct Color | 1024x768x15 |
0x117 | Direct Color | 1024x768x16 |
0x118 | Direct Color | 1024x768x24 |
0x107 | Packed pixel | 1024x768x8 |
0x119 | Direct Color | 1024x768x15 |
0x11A | Direct Color | 1024x768x16 |
Supported Devices
- built in NE2000 support
- PCI SVGA card (Cirrus Logic 5446)
- PCI support (With BIOS32).
Usage
QEMU is easy to use, it does not have a configuration script like Bochs. To use QEMU with your OS,
qemu -L .\ -fda my_disk_image.img -m 32
Or, if you use UNIX,
qemu -fda my_disk_image.img -m 32
The -L tells QEMU where to find its BIOS images, which is not necessary in a standard unix installation. The -m tells how many megabytes of memory to use; the default is 128
You can use -fda/-fdb for disk image files, and -hda/-hdb/-hdc/-hdd for hard disks. To change boot devices, use -boot {a/b/c/d}. a/b tell it to boot floppy a or b. c for hard disk and d for CDROM.
Alternativly you can point -hdc or use -cdrom to an ISO image file (2048 bytes per sector ISO format).
Whilst inside the emulator you can use CTRL-SHIFT-{1,2,3} to swap in/out of the emulation screen, the QEMU console and a serial console. The system console lets you change disk images and other things and do memory dumps etc.