VOGONS

Common searches


First post, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

If I set ems=false in my dosbox.conf, then type "mem" immediately upon running DOSBox, it indeed shows no expanded memory. So far so good.

However, if I then mount a drive (which, as far as I can tell, is pretty much necessary to really use DOSBox) and then switch to that drive, suddenly 1MB of expanded memory shows up when I type "mem".

The weird part is that this expanded memory disappears again if I switch back to Z:. What the heck? Why is DOSBox dynamically creating EMS when I go away from Z:? This has been the case for a while, and it still happens with DOSBox 0.70. I see nothing on this in the README; I'm running DB under Win98SE.

Reply 1 of 19, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

Doesn't happen for me and sounds quite weird, especially as if
ems really would be re-enabled for some reason it'd never be
at 1mb.
Please post screenshots (png) where the mounting is visible and the output of mem.

Reply 2 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

are you sure there isn;t a mem.com/exe on your mounted c drive that is incompatibile with dosbox ?

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 19, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

I placed a screenshot here:

http://lateblt.pdp10.org/DOSBoxEMSWeirdness.png

This is an almost-fresh install of DB0.70 on Win98SE; the only config change I've made is, I set xms=, ems=, and umb= all to false in dosbox.conf.

Pretty sure it's not a problem with some other mem command getting run, as the output of Win98's mem command looks very different.

Reply 4 of 19, by kruwi

User metadata
Rank Member
Rank
Member

Are you sure you do not have any sensitive files in your d:\ directory?

In my experience it is rather dangerous to mount a complete physical harddrive as dosbox' virtual harddisk.

Visit the end of the internet: www.groskreutz.de

Reply 6 of 19, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

Yes, you have a point... But I was just doing that as a quick proof-of-concept demonstration. 😀 This is not my usual full DOSBox setup, I just got DOSBOX 0.70, and I am just trying this to see if this same weird EMS bug exists in this version (which it apparently does).

Reply 9 of 19, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

Not here.

Attachments

  • mem.PNG
    Filename
    mem.PNG
    File size
    16.9 KiB
    Views
    3684 views
    File license
    Fair use/fair dealing exception

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 10 of 19, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

Nope, D: is my second hard drive... I only get the warning message when mounting C:\, but not any other letters or locations. Oh well, it's obviously kinda weird, but thanks anyway... And thanks for making the greatest program ever! 😁

Reply 11 of 19, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

From the looks of your window title bar, it looks like you're using either XP or Vista... I should just try it with XP and see if that fixes it.

Reply 12 of 19, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

And if instead of just mem, you run Z:mem ?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 14 of 19, by LateBlt

User metadata
Rank Newbie
Rank
Newbie

Just as an update to anyone reading this thread: I tried a completely different install of Windows 98 with both DOSBox 0.70 and 0.65, but got exactly these same results. Seems like a Win98 thing. Is there seriously nobody else who has ever noticed this on Win98?

Tried it with Windows XP and it works fine.

Reply 15 of 19, by DosFreak

User metadata
Rank l33t++
Rank
l33t++

Well most people on these forums only use 98 on an older computer with DOS already included. Amount of 98 users here is pretty sparse. I have a couple of laptops that might have 98 on 'em, haven't booted them in about a year tho. If not then I might install 98 this weekend. (Probably not, gotta work).

How To Ask Questions The Smart Way
Make your games work offline

Reply 16 of 19, by `Moe`

User metadata
Rank Oldbie
Rank
Oldbie

I've got a Win98SE virtual machine lying around, tested it, no problems. I get no mysterious EMS. (clean install, default config except for ems/xms/umb=false)

It sounds a bit like a buffer overflow or something, but since it happens only on a few machines, could it be the video driver of your system or something like that messing around?

Reply 17 of 19, by franpa

User metadata
Rank Oldbie
Rank
Oldbie

why run a superior emulator (in terms of accuracy) inside a virtualized environment?

AMD Ryzen 3700X | ASUS Crosshair Hero VIII (WiFi) | 16GB DDR4 3600MHz RAM | MSI Geforce 1070Ti 8GB | Windows 10 Pro x64.

my website

Reply 18 of 19, by dvwjr

User metadata
Rank Member
Rank
Member

Why does DOSBox create EMS when switching from Z:? [edit: on Win98]

Dosbox v0.70 does not really 'create' any EMS memory with the 'ems=false' setting in the dosbox.conf file when changing to a mounted drive on the Win 98, Win 98SE and Win ME operating systems.

It just looks that way. 😁

While the problem can easily be fixed in the dos_programs.cpp file, the underlying problem would have to be corrected in the DOS_OpenFile function located in the dos_files.cpp file. A few more host file-system dependent functions would also probably have to be fixed to eliminate similar behavior in the future. Looks like another minor change for a possible v0.71 release.

Current Dosbox code is written such that any Dosbox created DOS devices are checked or filtered for the DOS_Openfile() function. This works quite well for DOS_OpenFile() on most all of the host operating systems which Dosbox supports, since DOS devices are not returned as existing by the underlying host file-system. However, this does not hold true for the Win9x family of Win32 operating systems, since for example the XMSXXXX0 and EMSXXXX0 DOS devices ARE returned as existing (or openable) by the Win9x host file-system to Dosbox on DOS_Openfile() calls. So even though the Dosbox EMSXXXX0 DOS device may not exist, the Win9x EMSXXXX0 DOS device will most certainly exist and hence the bogus information returned by the Dosbox internal MEM command on Win9x when the underlying host file-system is accessed.

Sitting on the Dosbox virtual drive "Z:" the MEM command does not display any EMS memory when executing on Win9x with the 'ems=false' dosbox.conf setting - as expected. Now mount a host file-system Win9x sub-directory to a Dosbox drive, change drives, then execute MEM and you will see the bogus 'EMS memory' report where no EMS memory should exist.

Bottom line: Not a Win9x problem, but a Dosbox coding problem which just became unmasked. Chalk it up to the low Win9x user-base. Only problems for the future is that all Win9x DOS devices might continue to 'leak' through to the Dosbox VM without some attention being paid to the DOS_xxx() functions.

Problem
File: dos_programs.cpp, line ~339 from Dosbox v0.70 source

/* Test for and show free EMS */
Bit16u handle;
char emm[9] = { 'E','M','M','X','X','X','X','0',0 };
if (DOS_OpenFile(emm,0,&handle)) { //DOS_FindDevice use instead!
DOS_CloseFile(handle);
reg_ah=0x42;
CALLBACK_RunRealInt(0x67);
WriteOut(MSG_Get("PROGRAM_MEM_EXPAND"),reg_bx*16);
}

Fix
File: dos_programs.cpp, line ~339 from modified Dosbox v0.70 source

/* Test for and show free EMS */
char emm[9] = { 'E','M','M','X','X','X','X','0',0 };
if (!(DOS_FindDevice(emm)==DOS_DEVICES)) {
reg_ah=0x42;
CALLBACK_RunRealInt(0x67);
WriteOut(MSG_Get("PROGRAM_MEM_EXPAND"),reg_bx*16);
}

Just my 2 cents,

dvwjr

Reply 19 of 19, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm yes. that should use dos_finddevice although
I wonder if it goes allright if a game tries to open emmxxx0 in dosbox on win98
We don't have an inactive list of devices.

Water flows down the stream
How to ask questions the smart way!