barotto / IBMulator

The IBM PS/1 emulator.
https://barotto.github.io/IBMulator
GNU General Public License v3.0
112 stars 4 forks source link

MEGAMID hangs while resetting the SB DSP if used with the /sbmidi program argument. #57

Open barotto opened 3 years ago

barotto commented 3 years ago

After the Sound Blaster DSP reset, MEGAMID reads the DMA channel 0's current count register (port 0x01) to see if its value is 0, otherwise it waits indefinitely.

The PS/1 BIOS POST procedure tests the DMA controller writing all its registers with the 0xAA value without clearing them afterwards, so when MEGAMID reads port 0x01 looking for 0 it ends up hanging.

Verified also on DOSBox, which won't hang as it starts with all DMA registers cleared.

Not verified on real hardware (I need a Sound Blaster) but AFAIK the DMA controller won't clear its channels' registers on RESET so I expect MEGAMID to hang on a real PS/1 too.

This is a MEGAMID's bug which manifests itself on the PS/1, so everything "works" as intended.