Page 1 of 1
Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 00:52
by ThinkPadAndChill
Hello everyone,
This is my first post here so sorry if this doesn't quite fit in with the forum itself.
I want to replicate an IBM PC XT, with 640 KB RAM and an 8088. Is it at all possible for me to a) assign less than 4MB of RAM to a VM and b) replicate the 8088's specs exactly? If not what's the closest I can get?
Thanks!
Re: Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 01:51
by socratis
ThinkPadAndChill wrote:a) assign less than 4MB of RAM to a VM
Actually, no, 4 MB is the minimum in the GUI and from the command line:
$ VBoxManage modifyvm "<VM name>" --memory 1
VBoxManage: error: Invalid RAM size: 1 MB (must be in range [4, 2097152] MB)
VBoxManage: error: Details: code NS_ERROR_INVALID_ARG (0x80070057), component SessionMachine, interface IMachine, callee nsISupports
VBoxManage: error: Context: "COMSETTER(MemorySize)(ValueUnion.u32)" at line 608 of file VBoxManageModifyVM.cpp
ThinkPadAndChill wrote:b) replicate the 8088's specs exactly?
I don't think that you can go as low as an 8088. There is a command to change the CPU presented to the OS:
but the available options for you are "Intel 8086" and "Intel 80186", not 8088. And I'm not even sure how accurate representation that is...
What is it that you want to do? Why did you post in the "Windows Guests" section? Are you planning for a Win 1.0 installation?
Re: Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 10:39
by mpack
To perhaps clear up a potential source of confusion: a hypervisor (VM) platform does not emulate a CPU. It can intercept the CPUID call and provide a false ID, but it can't really change the fundamentals of the CPU: it will not behave exactly like an 8088. And in any case the 8088 didn't have a CPUID instruction, so the guest OS isn't going to be fooled by that anyway. It's going to use the old fashioned pushf and popf tricks and who knows what CPU it'll decide that it sees. ISTR things like the wraparound at the top of the 16bit address range won't work the same either.
Incidentally, the maximum RAM addressable by an 8088 was 1MB, not 4MB. However it's quite easy to achieve this: if no extended/expanded memory driver is installed in DOS then it automatically can't access more than 1MB.
Re: Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 10:49
by Martin
Maybe an emulator like
https://sourceforge.net/projects/fake86/ would be a better choice then VirtualBox in this case.
Re: Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 11:22
by mpack
Or even DOSBOX, depending on what the goal is.
Re: Less than 4MB RAM and processor specific emulation in a VM?
Posted: 17. Apr 2019, 14:10
by michaln
Of if you want to keep it simple, you could try
https://www.pcjs.org/docs/pcx86/ -- nothing to install, works pretty well.
VirtualBox can actually emulate an 8086 or 80286 CPU, using VBoxManage modifyvm <vm> --cpu-profile "Intel 8086" or --cpu-profile "Intel 80286". It is probably broken and it is certainly unsupported. It's also not exactly an XT emulator, though with the 286 CPU VirtualBox behaves reasonably close to a PC/AT clone.