To put it in really short words: Usually it doesn't translate one instruction to another, but decodes one instruction (or a batch of instructions) looks at what it does and achieves the same result in software. In this case it probably has a context (GPRs and so on) of the x86 CPU that a Win32 application expects. When it encounters an instruction, let's say
mov eax, [ebx]
It will take the value from ebx, treat it as a memory address (this implies validation on that address, but that's outside of the scope of this talk), take it's contents and store it in eax (the plaftom has no ebx or eax, so it's all in how the emulator manages that fake x86 context). This is most likely done in software and not through something like binary translation.
Vmware used (or maybe still uses) something called binary translation when doing software emulation. They would replace some instructions with others.
They could also use a combination of more of these methods. Intel argues that any emulation is patent infringement, regardless of the way it is done.
EDIT: fixed some typos.
If anyone wants to know more about how emulators work, Unicorn is a pretty cool emulator framework. And there's also Bochs which focuses only on x86 but is very powerful.
A long time ago I found out how to turn off RAM refresh by altering the configuration of the PIT (thanks PORTS.LST), and used a RAM viewer I'd written to see how areas of RAM I hadn't accessed in a while alternately decayed to all 1s or 0s depending on the block.
Depends on what you mean by VMware. VMware produces a number of different virtualization products. I work with Workstation and vSphere (aka ESX) on a daily basis. Both support floppy images just fine. Simply configure the VM's floppy drive to use the image on your local machine.
I would suggest looking into Bochs rather than VMware for this sort of thing. I did some hobby OS dev back in high school and if I remember correctly VMware is not ideal for this sort of low level work. Can't recall the specifics but some searching should turn up details. You might try asking around in r/osdev.
Take a look at Bochs.
If you want a resource with information about how to program I/O directly on the metal on a PC, try the OSDev wiki.
> I don't totally grasp the concept you're suggesting/Bochs used - is it effectively lazy evaluation of the conditional flags? I'm trying to put it in the context of how it would be used in Bochs, but the lightbulb still isn't clicking in my head.
Slides 17ff in [4] and the "Lazy flags handling" section in [5] explain that quite well. Indeed, it's effectively lazy evaluation of those flags.
[4] http://bochs.sourceforge.net/VirtNoJit.pdf
[5] http://bochs.sourceforge.net/How%20the%20Bochs%20works%20under%20the%20hood%202nd%20edition.pdf
I don't know QEMU, so I don't know how to handle its emulated disks. But for code on your OS, I'd say start with interrupt 13h, which is the old ROMBIOS routine for accessing disks. You can start with the CHS methods, and then move on to LBA. Ultimately, you'd be using the I/O ports on the disk controllers to bypass the ROMBIOS, which would mean IN and OUT statements to the disk controllers and likely DMA controllers. (I admit, I haven't learned that far yet...) From the osdev-wiki article below and the Bochs team's handy I/O port list, it looks like the ATA controllers are in the port ranges of 0x01F0-0x01F7
Thanks! For the CPU, there are a lot of different references online for the instruction set. I also had the 8086 datasheet.
For the Intel chipset stuff, it was mostly the official datasheets I used and sometimes programming references found on Google. wiki.osdev.org is also a decent reference for chipset components, but it usually doesn't go into all of the details.
Another great general reference for I/O ports is this: http://bochs.sourceforge.net/techspec/PORTS.LST
For the various other components like mouse protocol, Sound Blaster or whatever else, I typically could find most of what I needed by googling "sound blaster programming" or "microsoft serial mouse protocol" and stuff like that.
https://www.qemu.org/ might be your best shot at this. http://bochs.sourceforge.net/ is also an option, but more focused on emulation.
http://arstech.com/install/ecom-prodshow/usb2isar.html per what others suggested on getting the card to connect.
Well, duh.
Why would you suspect otherwise? The BIOS is software as well as the operating system is.
The exact method of writing to the bios config area will vary based on the BIOS vendor and/or chipset, but in general you'd write to a certain I/O port mapped to the BIOS CMOS settings space, e.g. look here for older ISA Phoenix and AMI cfg registers to get an idea.
I can't seem to find where to download it. Their download page only has info about the latest release...
EDIT: Unless I'm supposed to download this "SVN Snapshot"?
Try Bochs http://bochs.sourceforge.net/
It is open source, and in the repositories of most linux distros. You can boot ANY OS image while emulating any version of x86 processor or processors. You can even emulate an x86 on a big endian host!
I recently made some mods to it so it can emulate and fully use a lot more memory than is physically present in the host system by using a temporary swap file.