MAME Diary 002: Sound « Jamesonline


MAME Diary 002: Sound

Who is the coolest person in the hospital?
The ultra sound guy.

Who is the coolest person in I.T.?
Not the one that can get sound working in DOS that’s for sure. That person is dull and boring and has a high boredom threshold.

If you intend to get sound working in DOS then you are better off starting with a later version of it such as 6.22 or better still 7. It will help your MAME build to run better too.

As I already mentioned I used a DOS install from 2 floppies, but if you don’t actually have access to MS-DOS but you have a version of Windows 95 or 98 you can use then do a full install of that and just change the boot settings so that Windows doesn’t load up and the system stays in DOS. Failing that you could also use the excellent and, as the name would suggest, free to use FreeDOS. Just bear in mind that the file CONFIG.SYS will be called FDCONFIG.SYS and the DOS install folder will be called FDOS.

To change your Windows 95 / 98 boot settings boot into your Windows install and find the file MSDOS.SYS in the C Drive and change its attributes so that it is no longer read only.

Now open it up in Notepad and add or change the following options;

LOGO=0
BOOTGUI=0

(This will stop the Windows Logo appearing and stop Windows booting. Now save the file and make a new directory on C Drive called TEMP then check that the following lines appear in your AUTOEXEC.BAT file;

@echo off
path=c:\windows\command;c:\windows
set tmp=c:\temp
set temp=c:\temp

and if your sound card requires EMM386.EXE, also add the following to your CONFIG.SYS file;

device=c:\windows\himem.sys
device=c:\windows\emm386.exe noems novcpi

In order to save yourself a huge amount of rebooting and shouting at your equipment I would recomend you use a PCI Creative Sound Blaster card as DOS drivers are freely available and though no longer supported by the company, there are lots of forums and sites with tips on getting them to work if you hit trouble.

One such site I found invaluable was this one and there are excellent tips there. such as this;

If you plan to run MAME in pure dos you will most likely have to run the DOS initialisation application which comes with your soundcard drivers. This allows DOS to hook into the soundcards interrupt.

Some PCI soundcards, like the Pine CS4281 card do not have a DOS installation program. Instead, the drivers are installed via Windows. The DOS drivers are then installed and can be copied to your DOS configuration.

whatever your sound card and configuration, you will need the following line (or something very similar) in AUTOEXEC.BAT

SET BLASTER=A220 I5 D1 T2

This sets the sound blaster environment whre

A220 is the I/O Port address
I5 is the IRQ or Interrupt number
D1 is the DMA IRQ number
T2 is the Soundblaster type (or emulation mode)

The card I used is an Ensoniq AudioPCI and even on a different system it would require different settings so they really are individual to you, and I had a lot of trouble getting this to work.

Basically what I had to do was to disable all the hardware that I wasn’t using in the BIOS. This included things built onto the motherboard such as the serial port, the parallel port, the USB ports, the modem and the on board sound card. To get the best functionality out of these settings I flashed the BIOS with the latest version which will sometimes allow you to manually specify what IRQ a piece of hardware will use.

The reason I did that is to minimise the number of hardware conflicts and problems that my sound card settings would cause, and then any issues I was having should be easier to solve. For me this involved what seemed like a never ending cycle of booting, getting an error, typing

edit autoexec.bat

making changes and rebooting. I know the pain of an annoying BIOS beep. It hurts.

The settings in question are explained well here

Set Blaster

There can be no space between the word BLASTER and the = or the parameter will be read incorrectly, and some of these parameters (P, H, and E) are dependant on certain types of card. Some of the parameters are optional, for example, I just have the minimum requirements of A, I, D, & T configured and the other three may or may not be needed depending on what type of card you have.

The Port Address is almost always 220 but the IRQ is something that varies from system to system. The DMA sometimes causes problems if it isn’t set to 1 and can cause a system halt. The Type should be 1 if you have an older Soundblaster, or a Sound Blaster emulating card, 3 for a newer plain Soundblaster, 2 for an older Soundblaster Pro or 4 for a newer Soundblaster Pro.

All this fannying around though is truly worth it in the end. Not perhaps so I could go down to my local boozer and tell everybody that I got sound working in DOS, but I did feel a bit chuffed when it worked. What better way to celebrate then and test it fully than hitting www.486games.net and downloading a classic DOS game such as Prince Of Persia or the excellent Overlord?

Next time: Autoexec.phat

Leave a Reply

You must be logged in to post a comment.



Copyright © JamesOnline.net. All rights reserved.