Jump to content

AutoDMA - automatically sets DMA access to HDs


Recommended Posts

Hey there,

NEWS:

MDGx has gone the extra mile to make it easy to install and uninstall this so grab his version here. His also allows for many more drives than mine did. So grab it now!

old post text:

I've gone and put a hotfix together for this to add to the UBCD because Win98 doesn't turn on DMA by default and so this is now a must have hotfix for my project. this is a properly iexpressed hotfix. when you run it, you can back out before installation, there's a text file that explains stuff (masquerading as the license), and you get the normal boot prompts at the end. the silent switch also works. why oh why didn't i get around to learning this earlier. someone please organise someone to come to my house to kick me, please.

Please note: most of what this does is do stuff you can very very very easily do yourself. To manually do what the hotfix does, you would go into device manager, go to the Disk drives section, and open up the properties of any drives you want to turn DMA access on for, and then select the DAM access checkbox. Then, you'd go into SYSTEM.INI and under the [386Enh] section, you would add DMABufferSize=64

How simple is that? Still, this does it for you. Good for unattended boot cds.

The other thing is does do is automatically set DMA access for any drives you add in the future (up to 3). That's a good reason for running it anyway, hey.

the readme.txt inside the hotfix:

AutoDMA for Windows 95/98/ME

Version 1.0

Hey there, this will automatically configure your computer for DMA access to your hard disks and CD/DVD drives which should improve system performance ... DMA access will be added to up to three storage devices per channel, and a DMA setting of 64 will be added to your SYSTEM.INI file.

*** NO AUTOMATIC UNINSTALLATION *** to uninstall, go to your device manager, open the properties of the hard drives listed in the Disk drives section, and un-select the DMA setting. Also, you should delete the following entry in SYSTEM.INI --- DMABufferSize=64

This is usually a safe thing to run even if your hard drives can't accept DMA access, which these days is pretty rare. Still no warranty though! You were hoping weren't you :)

AutoDMA.EXE

Edited by soporific
Link to comment
Share on other sites

  • 4 weeks later...

nice work, soporific. can you also make one for turning on DMA access for CD/DVD drives?

i know for sure win98fe, win98se and win95 osr2 does not automatically turn on the DMA option for BOTH hard drives AND CD/DVD drives

Edited by erpdude8
Link to comment
Share on other sites

On my real computer I found out the hard way that if I don't first give the computer a DMA buffer to work with disaster is sure to follow soon when then adjusting DMA checkboxes in the Device Mangler proper. Seems to be an academic point really but somehow later machines than mine DON'T need the buffer set to exist first - but mine DOES or Windows dies a horrible death. Mine also needs the following debug script method each time it boots in order to have and enjoy DMA speeds and later machines may need it but ONCE if EVER. I have no explaination for these discrepancies but they are real.

DMA Check Box Does Not Remain Checked

http://support.microsoft.com/?kbid=159560

Further info - substitue 2x (DMA) modes as follows

UDMA mode 0 is 40

UDMA mode 1 is 41, etc.

Setting up a DMA buffer is as simple as adding this line to the [386Enh] section of the System.ini file.

DMABufferSize=64

That would set up the maximum size (64k) DMA buffer using a tiny snippet of ram for that. My installed 128 Megs of ram shows as 127.0MB when pressing Win and Pause Key together. The buffer can also be set by using the Device Mangler|system devices|direct memory access controller settings applet which actually does the very same thing to the System.ini file.

Although mine is not the oldest motherboard to run 98se, it's old enough. It is a 1430TX el cheapo chaintech 5ttm1 with a BIOS date of 4/13/98. The 1430TX in particular had problems allocating large memory properly according to some web sites, perhaps that explains my unique DMA situation?

Unless one a third drive on either the primary or secondary channels exists the entry under IDEDMADRIVE2 is superfluous as there is only drive 0 (1st) and drive 1 (2nd) on either/both the primary and/or secondary IDE channels - at least that's the way it was the the last time I looked. Or did I miss another memo or something? Someone somewhere is using three drives on each IDE channel?

At any rate, here is my attempt at doing the same thing via an inf file which has the advantanage of being able to directly write the required string to the system.ini file with no more hassle than adding three lines to the inf file, the updateinis line and the Getmeabuf section of two lines total.

This file calls itself after copying itself to the Windows\INF folder. There is no real advantage to doing it this way except for taking use of the reboot features of the 2nd time around advpack call denoted by the trailing 'A' which stands for Always reboot. The Reboot=1 line under the defaultinstall section only works when the inf file is 'install'ed by using iexpress.exe or NT5's right click 'Active Install' method which also uses advpack.dll file. The standard 9x right click 'Install' method uses setupx.dll file and as such has no extra reboot mode modifiers like advpack does. In other words - reboot=1 don't work if right clicked and 'Install'ed. But you will reboot twice if you have NT5's Active Install right click choice, once right now and once again at the next reboot. Reboot=1 causes the reboot right now and the hdc registry info is written at the next boot just before you are asked to reboot again before even getting to your desktop.

The reason for why I set it up like this is a bit complex but it turns around a problem using the standard right click setupx.dll method of inf file installations. Setupx.dll method will always run the RunOnce key just before it closes thus clearing the key and the advpack.dll method does NOT. Reboot modifier strings like SmartReboot = A and Reboot=1 only work with advpack method. Since standalone inf files are the most likely to be right clicked and 'Install'ed with that method and there is no way to make the file then reboot, I had to invoke advpack in it's Always reboot mode so when setupx.dll clears the RunOnce key, Advpack also runs and we get the reboot box in spite of setupx.dll's shortcomings.

A fair question might be then 'why include the reboot=1 line?' - to diseminate gathered info on what works, when and why. Here is a harmless example to play around with, learn about reboot=1 and setupx method.

The standard 9x right click install option for inf files comes from this key:

[HKEY_LOCAL_MACHINE\Software\CLASSES\inffile\shell\install]

@="&Install"

[HKEY_LOCAL_MACHINE\Software\CLASSES\inffile\shell\install\command]

@="C:\\WINDOWS\\rundll.exe setupx.dll,InstallHinfSection DefaultInstall 132 %1"

The 'NT5 Active Install' right click install option comes from this key:

[HKEY_LOCAL_MACHINE\Software\CLASSES\inffile\shell\APInst]

@="Active I&nstall"

[HKEY_LOCAL_MACHINE\Software\CLASSES\inffile\shell\APInst\command]

@="rundll32.exe advpack.dll,LaunchINFSection %1, DefaultInstall"

I seem to have lost the source for this last registry entry and I can't find out where I got it from. Which is another reason to post it before it's lost for good completely.

For more info on inf files see WillyPad's help file and get WillyPad here:

http://snoopy81.ifrance.com/snoopy81/download.htm

My comment on your method used is *brilliant* considering it's all done with batch files, but my inf file is shorter and marginally does more. But that's only true because the inf file method was made for this kind of work specifically, so it's very easy to be ahead of the game when using inf files for installations, registry work and piddling around with ini file sections. Feel free to use as much or as little of my code as you care to in this or any future project - I wouldn't have posted it if I didn't want people to use it.

Erpdude8

The IDEDMADRIVE registry values added by Soporific's batch file and my inf file ARE the DMA checkboxes for both hard drives and CDROM/DVD drives as near as I can tell. I do know that there are similar entries and values from previous setups where I had other hard drives hooked up but have since been removed and yet their values remain in the registry so I don't think it hurts anything to have excess info in the registry other than the obvious bloat issue.

Dmainf.zip

Link to comment
Share on other sites

  • 1 month later...

Hi ya'll

I've gone and put a hotfix together for this to add to the UBCD because Win98 doesn't turn on DMA by default and so this is now a must have hotfix for my project. See the first post for more details

Link to comment
Share on other sites

soporific:

I took the liberty and created an INF based iexpress installer for this purpose [enable and disable DMA at will for all IDE HDs]:

Enable DMA for all (E)IDE/(P)ATA Hard Disks installer [106 KB, English]:

http://www.mdgx.com/files/DMA_ON.EXE

MUST reboot at end of install for these settings to start working !

How to disable/remove DMA for all (E)IDE/(P)ATA Hard Disks:

Start button -> Settings -> Control Panel -> Add/Remove Programs -> select "Disable/remove DMA for all (E)IDE/(P)ATA Hard Disks" -> click Add/Remove button -> reboot.

This installer adds (if not present) or modifies (if present) these settings for better performance into your:

* SYSTEM.INI [located in %windir% = usually C:\WINDOWS]:

http://www.mdgx.com/lastweek.htm#SYSINI

[386enh]

DMABufferSize=64

* Registry [for the 1st 6 (E)IDE/(P)ATA Hard Disks]:

http://www.mdgx.com/98-2.htm#W98DMA

http://www.mdgx.com/newtip10.htm#DMAOFF

http://www.mdgx.com/newtip18.htm#EUHDD

-----Begin cut & paste here-----

REGEDIT4

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc000]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc001]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc002]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc003]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc004]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc005]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Class\hdc006]

"IDEDMADRIVE0"=hex:01

"IDEDMADRIVE1"=hex:01

"IDEDMADRIVE2"=hex:01

"IDEDMADRIVE3"=hex:01

------End cut & paste here------

This is meant as replacement for AutoDMA.exe + Dmainf.zip .

I can rename it to something else, like AutoDMA.exe or Dmainf.exe if you wish.

HTH

Link to comment
Share on other sites

I took the liberty and created an INF based iexpress installer for this purpose [enable and disable DMA at will for all IDE HDs]:
Enable DMA for all (E)IDE/(P)ATA Hard Disks installer [106 KB, English]:

http://www.mdgx.com/files/DMA_ON.EXE

Yay, i was wondering if it was sort of easy to make a proper INF install file, and you have just proved that it is. I now have an example INF file that i can modify for all my other registry tweaks. Thanks a billion man.

PS - You can always take liberties with me MDGx! Meow !!!

PPS - i've tested it and it works great. I can't spot a thing wrong, i can't even suggest better wording for any of the text ... I am suitably humbled, master.

PPPS - ProblemAdolescent, your question should be answered. Chuck all mine in the bin and use the masters'.

Edited by soporific
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...