VOGONS


First post, by eshaz

User metadata
Rank Newbie
Rank
Newbie

Hey all,

I recently purchased a Compaq Armada 1500c laptop which sports the ES1869 sound chip. I modded it a bit to reduce the headphone out volume and added a few extra filtering capacitors to reduce noise, and it sounds great! However, I am unable to get OPL2 / OPL3 sound to work in the Windows 98 dosbox when using the ES1869 drivers (latest VxD version). I've done the requisite ESSCFG, enabling / disabling PnP, ensuring the resources are configured properly, trying different driver versions, etc. I do have a work around, which is to use the ES1868 drivers (latest VxD version), however this disables the 3D spatializer and ability to playback 48kHz sound.

I should note that this issue has been discussed a few times on this forum, with no apparent solution. Some folks claimed to have fixed it, but myself and others are unable to reproduce the fix. If someone could share a solution that is reproducible, that would be extremely appreciated:

Similar Unresolved Topics

help getting soundcard (ES1869) working windows 98SE: help getting soundcard (ES1869) working windows 98SE
Issues getting ESS 1869 running in Win98 DOS mode: Issues getting ESS 1869 running in Win98 DOS mode

I'm thinking this is a software issue, since the ES1868 drivers enable Win9x dos box midi support just fine. I'm a software engineer by trade and would like to figure out how or if it's possible to patch the actual ES1869 drivers to resolve this issue. I tried disassembling the drivers using Sourcer and IDA, but I really don't know where to start. I'm thinking maybe compare the ES1868 and ES1869 dissassembled code side by side and look for differences, or search for the register values that control OPL3 support...

Does anyone here have experience patching or building VxD / sound card drivers?

Maybe a separate utility could be created to properly enable OPL3 that could be run before opening the Win9x dosbox?

Maybe there's the really rare chance someone has the original source code for this driver sitting around? 😀

Reply 1 of 6, by eshaz

User metadata
Rank Newbie
Rank
Newbie

It turns out that ESS Technology (https://www.esstech.com ) is still around and still making audio chips. I'm considering contacting them and asking if they are willing to open source or at least allow me to access the source code for the ES1869 windows driver with the intention of fixing this OPL3 compatibility bug and releasing a new driver build with the fix. Hopefully they still have the source code.

Does anyone here have any suggestions or pointers on how to effectively send this request? I don't want it to just end up in the junk box. 😀

I know some of you here have developed new hardware to emulate old cards and have other DOS / Windows 9x dev experience. Would any of you be interested in pairing up with me on this effort? It would be nice to have this effort be community driven, if there is interest.

Reply 2 of 6, by bakemono

User metadata
Rank Oldbie
Rank
Oldbie

I don't know much about VxDs or win9x but I don't think it disables I/O permissions for DOS programs (?) which would suggest that the ESS driver has disabled the OPL3 by way of a configuration feature in the ESS chip itself. The ESS1869 datasheet is online somewhere, and on pg. 41 it shows a power management register which contains a bit to disable the FM interface. It could be something that simple. Maybe you could just open a DOS window and then run a small QBASIC/DEBUG/Asm program to change the register value and re-enable FM. Although it's possible the driver would mess with it again after a period of time. If you need to hack the driver, looking for OUT instructions (or the equivalent API call, if there is such a thing for VxDs) and comparing them with the datasheet would be a good place to start.

again another retro game on itch: https://90soft90.itch.io/shmup-salad

Reply 3 of 6, by eshaz

User metadata
Rank Newbie
Rank
Newbie

Thanks for the input! That makes sense to use the Windows dos box to read / write to the IO ports to reconfigure the chip. I started looking into this with DEBUG, but the power register (Audio_Base+7h i.e. 0x227) had the same value 0x0A with both drivers. I'll keep experimenting.

I should note that the OPL3 still doesn't work after booting to Windows with the ES1869 drivers and then exiting Windows into DOS mode.

Reply 4 of 6, by eshaz

User metadata
Rank Newbie
Rank
Newbie

After much experimentation, I have a solution!

I have created two utilities that fix this problem: https://github.com/eshaz/essreg?tab=readme-ov-file#essreg
* essreg.exe - Used to set various unsupported registers on the ES1869 chip (3d effect amount, FM digital record, etc.)
* 1869opl3.com - Used to enable the OPL3 support for games in the Windows DOS box.

Notes:

It turns out that reading from the mixer registers (doesn't matter which one) just before running the game unmutes the FM audio. There were a few false positives along the way, since FM shares the same DAC as the wavetable chip ES689 (my machine doesn't have this) and the Zoom video I2S interface, so I experimented with that for a while. The FM volume register on the card was being changed with the IIS (Zoom video) slider on the Windows mixer, which was odd and maybe indicated that the Zoomed video was taking over the FM DAC. My guess is the that FM is being muted by the Windows driver when it's not active, and the game I was trying this wasn't triggering the driver to unmute the DAC. I was testing this with Cybersphere (breakout clone with really good OPL3 soundtrack), and it appears the problem is mostly limited to that game. The other DOS games (Jill of the Jungle, and a few others) I tested with worked just fine without the fix.

I also found a few other interesting features of the card, such as direct digital FM recording at 48kHz 50kHz (see below)! Check out the example here: https://github.com/eshaz/essreg/tree/main/digital_recording. I recorded this with Audacity while playing a midi file with Winamp, and then running Sierra's 3D-Ultra Pinball.

Link to Cybersphere: https://www.dosgamesarchive.com/download/cybersphere. It's a really fun game and has an awesome FM soundtrack!

Last edited by eshaz on 2024-05-04, 17:36. Edited 1 time in total.

Reply 6 of 6, by eshaz

User metadata
Rank Newbie
Rank
Newbie

I added a few more recordings of common midi files, canyon.mid and passport.mid. They sounded a bit slow to me on the recording compared to the actual midi playback. It appears the sample rate of the digital recording is actually 50kHz. After adjusting the files, the recording matched up with the playback speed. This means that the music DAC (ESFM) is running at 50kHz on the ES1869. It's also interesting that after clicking record in audacity, nothing happens until I start the midi playback. I suppose the DAC isn't running when there's no ESFM midi playback.

Information from the ES1869 datasheet (pg. 65) regarding this feature:
Music digital record
1 = Enable direct digital recording of Music DAC
data (including FM, ES689/ES69x, or I2S). In
this mode, the first DMA channel must be
enabled for stereo recording. The sample rate
is determined by the music DAC sample rate
rather than by controller register A1h.