News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

emm386.exe and dma

Started by locche, May 28, 2012, 04:53:23 AM

Previous topic - Next topic

locche

Hello all
wrote a floppy reader using fc and dma ports.  Tested on a 386sx, 486sx, no issues. However, the 486 had emm386.exe in the config.sys. So first time testing I got this unfriendly "dma not supported - emm386 do a restart locche".   Fair enough, went to MS and read up on the dma switched. Changed it accordingly in the config.sys file, nada, nichts da.  Same crash, same message.  Ms docs say message means user accessed dma in the wrong mode.  I don't know. Used mode 2 for floppy. 
So commented it out of the config file, no issues, Blood runs great, Windows boots, etc... The computer boots better...
My question, does anyone have an idea about why the crash?  I mean, it seems the BIOS uses dma for 13 and co and no issues.  Just curious, it's nice to know such things.  Btw.. the dma init code used is basically the same as I found all over.   
Thanks,
locche

Tedd

The DMA code you found all over assumes you have full control of the machine, specifically that nothing else is touching interrupts, IRQs, or DMA.
With EMM386 loaded, that's no longer true, so behaviour will vary depending on what it allows you to access and how it expects you to do that; for many things, that means you won't have direct access.
Potato2

locche

Ay,  virtual x86.  Should have thought of that.  Memory manager, it's in the name.  Thanks for the reply.