Win 9x/ME installation
Just unpack / copy the files into a directory of your choice. In order to activate GUSemu32, just run GUSemu32.exe.
Some programs read the configuration out of the
ULTRASND= environment variable, in this case type e.g.
SET ULTRASND=220,1,1,5,5 after starting up a DOS box or use a batch file for it (you may use the batch file in conjunction with a shortcut file, if you want). The first number identifies the base address of the emulated GUS, the second and third the DMA channel used for sampling and wavetable access, the last two indicate the wavetable and MIDI IRQs. Note that GUSemu32 supports only one IRQ and only one DMA, so set both DMA channels and both IRQ channels to the same values.
Win 2000 installation
Unpack / copy the files into a directory of your choice.
GUS emulation is instantly available whenever GUSemu32.exe is running.
Using the GUSemu32 GUI

This is the control panel of the GUSemu32 application. Using the minimize button, you can put it into the taskbar as a tray icon.
The titlebar always shows the currently selected base address, IRQs and DMA channels.
In the main area, the currently playing out of the maximum voices enabled are shown, followed by the number of interrupts scheduled into the DOS box per sound buffer update (not per second - in order to get the interrupts per second multiply this value with the selected Soundbuffer Update Rate).
Under Win95/98/ME, a more detailed statistic is available using the system monitor.
Whenever the tray icon gets red, GUSemu32 is active. This happens as soon as the first access to the GUS takes place. After 3 seconds of inactivity, the mixing engine is suspended and the tray icon gets blue again.
The Menus
- Shutdown:
Stops GUS emulation and closes the GUSemu32 application.
- Clear GUS DRAM:
Overwrites all sample data stored in RAM with zeroes, stops noise due to looped voices left running.
- Reset GF1 Registers:
Sets all GF1 internal registers back to their default state, stopping voice playback and IRQ generation.
- Reset GUSemu32:
Restarts the complete mixer / sound playback code.
- Permanent Statistics:
Updates, if enabled, the shown status of voices and IRQ numbers several times per second instead of only at time of window redrawal. Eats pretty much CPU time.
- Wavetable RAM
- Dump to Disk:
Stores the current content of the GUS Wavetable DRAM into a file sized 1MB as raw data to disk (useful for sample ripping). Shows a SaveDialog for filename selection.
- Load from File:
Loads the content of an user-selected file as raw data into the GUS Wavetable DRAM. The file content is stored from the beginning of the GUS Wavetable DRAM up to the end of the selected file, file content above 1MB is ignored.
The following settings are stored permanently within the registry and can be changed on-the-fly even when GUSemu32 is playing back sound:
- Change GUS Port, DMA, IRQ:
Opens a Dialog for changing the Base Address, the IRQ and the DMA channel.
Valid Ports range from 210h - 290h (usually set to 220h, 240h or 260h),
IRQ can be any IRQ between 0 and 15 (IRQ 3,5,7,9 preferred),
DMA can be any number between 0 and 7 (channel 1 or 3 preferred).
IRQs and DMA channels are completely virtualized within a DOS Box, it is possible to use DMA and IRQ channels which are also used by other devices.
However, port addresses cannot be shared and are thus not available if another driver already reserves or them.
- Set GF1 Framerate / Samples per Frame:
Sets the frequency at which the sounddata is recalculated and mixed. Higher frequencies and thus lower mixing buffer sizes increase playback quality and latency but need more CPU time. Unless your PC is too slow or its configuration is somewhat mixed up, use 100 Hz or more.
- Set Soundbuffer update rate / Block length:
Sets the update rate of the DirectSound buffer. Increasing the update rate decreases latency, but may cause clicks in the playback. The best setting depends on the OS (9x/ME or 2000), the program running within the DOS box and the soundcard driver.
- Set number of prebuffers:
Determines the number of prebuffers. A value of 1 indicates double buffering, 2 triple buffering and so on. 1 or 2 prebuffers should be enough on nearly all PCs.
- Buffer update using DSound event:
If checked, DirectSound notifies the mixer whenever a new block is needed. If it is not enabled, a separate thread is used to query the soundbuffer state. Try out which one works better on your PC (this depends on the driver and OS).
The average latency is calculated by:
AverageLatency = ( (Number of prebuffers - 0.5 ) / Soundbuffer update rate) + (0.5 /GF1 Framerate)
Replace
0.5 with
0 to get the minimum latency or by
1 to get the maximum latency using the current settings.
- Well... these items are pretty self-explanatory.
An emulation of a hardware device cannot provide a completely equal environment like the hardware itself. The main problems are:
- Hardware works asynchronous parallel to the program using it while the emulator works in concurrence with the program using it (at least in single-CPU environments). Thus, the program using the emulation grabs CPU time needed by the emulation and vice versa. Thus critical-timed programs may not work correctly.
- The maximum timer frequency of a real GUS is 0.08ms compared to 1ms, the maximum timer frequency offered by Win32. Additionally, the interrupts can be delayed by some milliseconds by the OS. This affects only few programs, usual timer rates are above 1ms.
- Emulating the registers and mixing the sample data takes some time. On today's machines... who cares about these few percent, the impact by running the programs within a multitasking systems DOS-Box is much higher.
- The DMA-Controller works asynchronously while the emulator copies the entire memory block at once. This is a major problem for emulating soundblaster-type playback, but since the GUS requires the audio data copied to its local wavetable memory even in case of stream playback, it does not affect the GUS emulation.
However, there are also some benefits:
- An emulator also works if it is impossible to use the according hardware for any reason
- An emulation can provide benefits like sharing resources, built-in local data access,...
- Changing the configuration is much easier
For an emulator running under Win32 providing emulation for DOS-Boxes, the compatibility is also affected by the capabilities of the OS itself rather than the emulator itself. This applies mainly to:
- the amount and type of memory available (base memory, upper memory, XMS, EMS + VCPI, DPMI)
- access and/or virtualization of hardware not covered by GUSemu32 (e.g. InterruptController, DMA Controller, SystemTimer, VGA card (VBE2 is not available under Win2000 and XP; ModeX and VerticalBlank is not supported well))
- access violations not caught in DOS can cause the programs to be thrown out by the OS
- privileged instructions are either not available or emulated within a protected mode DOS box (note that a running EMM386 in DOS also switches into V86 mode). So programs depending on their own PMode switcher or memory manager do not run.
- STI and CLI are privileged instructions changing the Interrupt Flag (also called IF), while POPF also modifies IF without being privileged. Being in Protected/V86 mode, none of the instructions can change IF directly. However, CLI and STI can be virtualized, while POPF cannot. As a result, when a program uses POPF for changing/restoring IF, the virtualized interrupt flag in the DOS Box is not correct. Typical behaviour is IF not being activated again, causing sound playback to stop or to hang and/or program execution to hang (the programs do not react to any IRQ then, including timer/keyboard/mouse IRQs). However, most of these programs can be patched by replacing POPF with a combination of STI.
Old programs (lets better say: badly written programs) do not run if the PC is too good. If the CPU is too fast, the program can crash or execute to fast. The first case is widespread in programs written in TurboPascal and can be patched, the second case can be solved by special slowdown utilities.
And if there is more memory installed when the programmer ever thought of, memory-detection algorithms may fail due to interpreting the value as a negative or modulo number. Solve this be changing your shortcut file or the memory-manager configuration line in config.sys/config.nt