winevdm DOS memory range mmap() shenanigans...
andi at lisas.de
Tue Mar 24 17:25:34 CDT 2015
for fun I just tried to run a Lemmings demo downloaded from
Picture my not overly amused face when I then got the message
winevdm: Cannot start DOS application C:\lemmings\VGALEMMI.EXE
because the DOS memory range is unavailable.
You should install DOSBox.
After some wild fprintf trickery in various winevdm / virtual.c / mmap.c parts
and subsequent mmap() Internet research
it turned out that this message is annoyingly imprecise:
echo 0 > /proc/sys/vm/vmmap_min_addr
(original value here: 65536)
will allow the corresponding mapping, thereby enabling the game to
(partially - then seems to have interesting issues at some VGA register parts)
I would therefore strongly suggest adding per-platform hint strings
in failure case (either passed directly out of the inner reserve_dos_area() helper,
or perhaps near the winevdm message).
In the Linux case, this message would obviously be something like:
...range is unavailable (you might need to specially tweak
/proc/sys/vm/vmmap_min_addr - note that this is a risky operation...).
Since this is an important tweak (otherwise tons of DOS applications
will bail out, thus rather negatively affecting Wine implementation
debugging/reliability progress since nobody will make it there),
it would be useful to add such hinting one way or another
(I might find the time to do so, and possibly given some additional counseling
I might even be able to come up with a sufficiently perfect patch).
More information about the wine-devel