VOGONS


DOS driver for RetroWave OPL3

Topic actions

First post, by crazii

User metadata
Rank Oldbie
Rank
Oldbie

The RetroWave OPL3 board has a ymf262 chip with genuine OPL3. It's intended for DOSBOX-X on modern system, I bought one piece and tested it in DOSBOX-X then an idea pops to me: how about making it work in real dos, like OPL3LPT? I'm not a hardware guy so If anyone capable & interested in the hardware, you can make a similar board. My ideal hardware is either a PCMCIA sound card with sound blaster & OPL3 working in DOS and 9x, or a USB audio with sound blaster & OPL3, so that there're more choices to pick a laptop, like one of late win98 era. Unfortunately RetroWave OPL3 is like OPL3LPT, it only have FM but no digital audio.
If anyone here happens to have a RetroWave OPL3, you can test the driver with it. There's a video about the device: https://www.youtube.com/watch?v=dg33QLkHAu4

I put the binary here for now. It will be open sourced later.
It is basically working. I've tested it in VirtualBox with OHCI. the UHCI (USB1.1) support is just added and tested on real hardware (a laptop). I only tested a few games. and some stereo OPL3 game might have glitches and L/R channel switched. but overall it's working and need more tests.

Filename
USBDDOS.zip
File size
43.22 KiB
Downloads
158 downloads
File license
CC-BY-4.0

RWDDOS.EXE: RetroWave Driver for DOS.
USBDDOS.EXE - USB driver for DOS.
Retrowave OPL3 Requirement: HIMEM.SYS; EMM386 4.46+
Memory usage: ~10K conventional memory; ~200K himem(XMS).

Filename
USBDDOSP.zip
File size
138.62 KiB
Downloads
146 downloads
File license
CC-BY-4.0

USBDDOSP is a driver uses DPMI (EMM386 still needed ). The zip file also contains a modified HDPMI32i.exe that support protected mode io port trap, allowing the driver to have support for protected mode games. Add 'HDPMI32i -r' to your autoexec or do it manually.

Memory usage: <2K conventional memory (when using HDPMI); ~4M himem.

Notes: It's NOT an official driver; working through port 388h~38bh, Adlib interface driver; real mode games only. DOS/4GW games may work.
Warnings:
Do not use it if you have other USB driver (storage/cdrom etc) installed, this driver will take over control of the USB controller and do nothing about other devices;
It's test only and might freeze your PC or even damage your data (in a very rare chance but still possible). use at your own risk.

UPDATE:
Now the driver supports protected mode games. Tested doom on my laptop and it's working. RWDDOS.EXE only support real mode games. RWDDOSPM support both real mode and protected mode games.
This source code could be found here: https://github.com/crazii/USBDDOS
The source of modified HDPMI could be found here: https://github.com/crazii/HX

UPDATE: 12/25/2022
Merry Christmas!

New feature added, name changed to USBDDOS.EXE/USBDDOSP.EXE. new feature available in USBDDOSP.EXE (new download uploaded) only, the USBDDOS.EXE has some function to be implemented, not it is not available yet is ready and uploaded.

1. USB disk support, using switch "/disk" (default off).
FAT16 & FAT32 tested, size ranging from 2G~64G. For large disk (8G+), using DOS7.0+(win95osr) with FAT32 is recommended, because it will boost the initial DIR command, otherwise it may take very long to calculate free disk space on the first DIR command each time system reboots. If BIOS supports the disk as a DOS drive, the drive will be remounted using new driver.

2. USB keyboard & mouse support, using switch "/hid" (default off)
I tested the USB keyboard & mouse driver with Retrowave driver (Adlib Gold setting) together in Warcraft2 on my DOS7.1(win98se) laptop and it works, but maybe more test needed, since I only played the human scenario 1, with some harvesting & building stuff.
the mouse driver only works with CTMOUSE (cute mouse), ohter driver like MOUSE.COM not tested.

The original Retrowave support uses switch "/RW" (default off), and the three switches can combine and not case sensitive. For example USBDDOSP.EXE /rw /hid /disk
If you want use it only as an thumb drive driver or keyboard driver, that's OK.

Last edited by crazii on 2023-01-07, 13:11. Edited 17 times in total.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 1 of 37, by sofakng

User metadata
Rank Member
Rank
Member

Hey, thanks for this! I've been hoping that SudoMaker would release a DOS driver (and I asked them via e-mail but they said no).

Do you think it would be possible to connect the device to a serial port or parallel port so the USB ports still work?

Reply 2 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-10-04, 02:33:

Hey, thanks for this! I've been hoping that SudoMaker would release a DOS driver (and I asked them via e-mail but they said no).

Do you think it would be possible to connect the device to a serial port or parallel port so the USB ports still work?

Hi, I've no idea if any USB to parallel converter exists, if they do it still needs another driver to work.
But I was planning to add more device drivers to the USB stack, like mass storage / audio / midi stuff, so that it can be an all-in-one USB driver for DOS, but it involves too much work and might take long time.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 3 of 37, by sofakng

User metadata
Rank Member
Rank
Member

OK - No problem... Thanks for the information.

However, I'm trying to use this on my weeCee x86 PC and when I plug the RetroWave into the PC, it causes the PC to reboot.

After the reboot, if I attempt to run RWDDOS.EXE it throws an assertion error:
Q6DQDmm.jpg

After a few seconds, EMM386 also throws an error:
hp18aKQ.jpg

Sorry for the photos instead of screenshots.

Do you have any ideas?

Reply 4 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-10-07, 19:06:
OK - No problem... Thanks for the information. […]
Show full quote

OK - No problem... Thanks for the information.

However, I'm trying to use this on my weeCee x86 PC and when I plug the RetroWave into the PC, it causes the PC to reboot.

After the reboot, if I attempt to run RWDDOS.EXE it throws an assertion error:
Q6DQDmm.jpg

After a few seconds, EMM386 also throws an error:
hp18aKQ.jpg

Sorry for the photos instead of screenshots.

Do you have any ideas?

I never tested OHCI on a real hardware. 🤣 I guess there's some bug in my code and it only works for VirtualBox emulation. Same thing happened when I test on QEMU and it works but crashes on real hardware and I fixed that.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 6 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-10-08, 16:01:

Ahh, OK... Can you provide the source code so I can maybe take a look and troubleshoot?

Hey I'd like to provide the code but my NUC is dead and I have it returned for factory repair. It might take a couple of weeks to get it back. I'm using phone now and other old laptops don't have network access 🤣. Meanwhile I will try to get an OHCI controller to test with.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 8 of 37, by TOMMY_THE_DOG

User metadata
Rank Newbie
Rank
Newbie

I just received my RetroWave OPL3 -Express-, the currently-shipping USB-only version. The original is not going to be made anymore because of parts shortages or something. But I'm fixing to test it today in DOSBox-X on my mac. My eventual goal is to get it working on a small Pi-like ARM SBC in DOSBox-X and ScummVM. It would be great to have an SBC with the Retrowave in a small project box with a 5 inch LCD. I'll fit one of Raphnet-Tech's gameport-to-USB adapters inside that case. I'm a huge fan of Yamaha-style FM synthesis! Nothing beats the DX7 for raw tone, and nothing beats the Sega Genesis for quality full FM tunes. Sega really had developed some great tools for programming their OPL-like YM2612. https://segaretro.org/GEMS . It is fun to compare the Genesis soundtrack of Sonic 3 to the OPL3 soundtrack for the Win95 release. They're both great.

But the PC also had a huge amount of great music for Yamaha-style FM, and I am thrilled to have a genuine OPL3 on a small board addressable by modern OSes over USB.

To SudoMaker: Please make one for ESS-FM! ESS was the best alternative to Yamaha's FM, and it is great in its own way. Listen to the soundtrack from Age of Empires on a Solo-1. That bass! ESS was, in my mind, the only OPL-compatible that was every bit as good as the orthodox Yamaha. Wrestlemania Arcade and NBA-Jam Tournament Edition both have soundtracks that can take advantage of the added capabilities of the ESS FM.

Reply 10 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-10-19, 03:22:

OK - Thanks! I'm hoping that we can get this working and then develop alternate boards for YM2151, SN76496, etc.

Yeah, it's almost working and I believe that it's probably a delay/timing issue during the reset/init routine as I encountered UHCI on a real hardware vs QEMU. I think we'll surely fix it eventually 😸.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 11 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
TOMMY_THE_DOG wrote on 2022-10-31, 17:21:

Someone please tell me how to get this working in DOSBox-X. The Mac recognizes the OPL3 Retrowave Express in the system profiler on the USB bus.

Have you checked the YouTube video I pasted? just watch carefully or you will miss it. The video is for Windows only and you need to change the com# port to some other dev string. I don't know what it is but you may check their GitHub source code, I remember they have Mac support - a VGM player dedicated to Retrowave.

BTW it's the express edition I've got too. But I think the original one is smaller and smarter.

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 12 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-10-08, 16:01:

Ahh, OK... Can you provide the source code so I can maybe take a look and troubleshoot?

Hi, I've uploaded my code to github: https://github.com/crazii/USBDDOS, feel free to modify, PRs are welcomed. 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 14 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
sofakng wrote on 2022-11-06, 00:57:

Thanks very much!

I'll fool around with it and see what I can get working and submit a PR if I can fix anything 😀

Cool, looking forward to hearing good news 😁

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 15 of 37, by crazii

User metadata
Rank Oldbie
Rank
Oldbie
TOMMY_THE_DOG wrote on 2022-10-31, 17:21:

Someone please tell me how to get this working in DOSBox-X. The Mac recognizes the OPL3 Retrowave Express in the system profiler on the USB bus.

Hi, I checked the code from sudomaker, you can probably try the "ttyACM0" (without the quotes).

Toshiba Satellite Pro 4300 - YMF744, Savage IX
Toshiba Satellite 2805-S501 - YMF754, GeForce 2Go
IBM Thinkpad A21p - CS4624, Mobility Radeon 128
main: Intel NUC11PHKi7C Phantom Canyon: i7-1165G7 RTX2060 64G 2T760PSDD

Reply 16 of 37, by ClassicOldSong

User metadata
Rank Newbie
Rank
Newbie
TOMMY_THE_DOG wrote on 2022-10-31, 17:21:

Someone please tell me how to get this working in DOSBox-X. The Mac recognizes the OPL3 Retrowave Express in the system profiler on the USB bus.

Hi, in macOS it’s not ttyACM*, but cu.usbmodem*

You may try “ls /dev/cu.usbmodem*” and get the correct device name.

Reply 17 of 37, by matze79

User metadata
Rank l33t
Rank
l33t
sofakng wrote on 2022-10-07, 19:06:

Do you have any ideas?

Did you try without unisound loaded ?

https://www.retrokits.de - blog, retro projects, hdd clicker, diy soundcards etc
https://www.retroianer.de - german retro computer board

Reply 18 of 37, by sofakng

User metadata
Rank Member
Rank
Member
matze79 wrote on 2022-11-07, 07:54:

Did you try without unisound loaded ?

I've just re-tested it without unisound and it still has the same problem:

When I plug the RetroWave into the weeCee USB port, it immediately reboots the computer. (I'm using a 4 amp PSU so I don't think power is the issue)

Afterwards, if I try to run RWDDOS it throws an assertion failed message. 🙁

Reply 19 of 37, by Duffman

User metadata
Rank Member
Rank
Member

@sofakng

I wouldn't rule out a power issue just yet, try with a separate powered USB hub and see if that works with it.

MB: ASRock B550 Steel Legend
CPU: Ryzen 9 5950X
RAM: Corsair 64GB Kit (4x16GB) DDR4 Veng LPX C18 4000MHz
SSDs: 2x Crucial MX500 1TB SATA + 1x Samsung 980 (non-pro) 1TB NVMe SSD
OSs: Win 11 Pro (NVMe) + WinXP Pro SP3 (SATA)
GPU: RTX2070 (11) GT730 (XP)