VOGONS


First post, by LABS

User metadata
Rank Member
Rank
Member

Hello there!
This is a new design I've been working on for quite some time.

OPi is an external USB sound device that allows games and other software running in DOSBox to use an original OPL3 chip for music playback. Additionally it has a line audio input for mixing PCM sound from a computer with OPL3 music and send it to a single line output of OPi. So when you play a DOSBox game - you hear everything from one output of the OPi (original OPL3 music + PCM sound) and both signals have separate volume controls. No need in external mixer. Thus, the device is also an external volume control for the computer's line out. The device is USB-powered. It requires USB 2.0 or better. USB 3.0 is faster (~15000 OPL3 packets per second vs ~6000 on USB 2), but at this moment only Descent feels the difference (as I remember it was also choking on P100+SB16 back in 1995) 😀

The project was started during countless lock-downs when it was impossible for me to access my old PC's, but a real OPL3 experience was needed 😀 Then it was on hold for some time due to the component shortage and now it is still in prototype state.

OPi-proto.jpg
Filename
OPi-proto.jpg
File size
555.24 KiB
Views
1288 views
File license
Fair use/fair dealing exception

Here are some demos, but only showing OPL3 for now
OPL3 + PCM are upcoming 😀
These demos run a modified DOSBox, which uses OPi's programming interface.

Showing the OPi with Adlib Tracker (room sound):
https://youtu.be/0SPgaSzxr2o

A crazy OPL3 command stream (ISHTAR.A2M, line out sound):
https://youtu.be/FA_rSxOP99s

Also heavy stream (GLASS.A2M, line out sound):
https://youtu.be/eA1RuPGxlks

Actually the device is working fine, but it needs to become more mature and compatible. Currently lots of actions needed with the machine in order to prepare it for using the OPi. The device uses FTDI USB chip for communication with the host machine. So, an FTDI driver should be installed. A DLL with OPi API is already working - a DOSBox with OPi support uses it. At the moment it works only on Windows. The plans are to support Linux and macOS.

I'm open to any suggestions and ideas

I think that this is a compact and pretty idea and hope that maybe someone else could find it useful. If so - I will continue working on it, so it could be compatible with as much machines as possible, but only with mine 😉

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 4 of 16, by LABS

User metadata
Rank Member
Rank
Member
sofakng wrote on 2022-10-31, 00:33:

Hi! Is this different from RetroWave OPL3 Express (previously the RetroWave OPL3) ?

DosBox-X already have support for it too...

Thanks for the info, didn't know about it.. I made a research about something similar when started the OPi and there was no such thing

Strange that it looks ridiculously similar indeed, but it lacks line input as I understand

At least now it became clear that OPi is not something new

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 7 of 16, by Shreddoc

User metadata
Rank Oldbie
Rank
Oldbie

I concur, really neat design and features, well done.

(also - and slightly off topic - that's insanely cool what they're doing with Adlib Tracker these days - my OPL3 music didn't usually sound like that in the 90's!!)

Reply 8 of 16, by SuperDeadite

User metadata
Rank Member
Rank
Member

I quite like it. But as a Japanese speaker, I can't read the this topic without laughing as "Oh-pai" = "boobs" in Japanese. 😀

Modules: CM-64, CM-500, SC-55MkII, SC-88 Pro, SY22, TG100, MU2000EX, PLG100-SG, PLG150-DR, PLG150-AN, SG01k, NS5R, GZ-50M, SN-U110-07, SN-U110-10, Pocket Studio 5, DreamBlaster S2, X2, McFly, E-Wave, QWave, CrystalBlaster C2, Yucatan FX, BeepBlaster

Reply 10 of 16, by keropi

User metadata
Rank l33t++
Rank
l33t++

this is neat! brings emulation closer to the real thing 😀

it needs a jumper though: "thinking noises" ON/OFF 🤣

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 11 of 16, by LABS

User metadata
Rank Member
Rank
Member
SuperDeadite wrote on 2022-11-01, 04:58:

I quite like it. But as a Japanese speaker, I can't read the this topic without laughing as "Oh-pai" = "boobs" in Japanese. 😀

I like it! And my wife also prefers the Japanese reading 😁

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 12 of 16, by LABS

User metadata
Rank Member
Rank
Member
Shreddoc wrote on 2022-11-01, 01:18:

I concur, really neat design and features, well done.

(also - and slightly off topic - that's insanely cool what they're doing with Adlib Tracker these days - my OPL3 music didn't usually sound like that in the 90's!!)

BTW these youtube videos I filmed for suzb3ro (the creator of Adlib Tracker) and offered to send him a prototype to try it out himself. Incidentally he was very sceptical about it and stopped answering e-mails. A similar story was with RAD creators, who also refused to take the proto and said they are not interested. Which was very strange and unexpected, considering these are THE people who still very much into OPL FM on modern systems. Actually this made me to abandon the project in 2021, because I thought if they (!!) are not interested, then who will be?

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 13 of 16, by LABS

User metadata
Rank Member
Rank
Member
Stretch wrote on 2022-10-30, 23:56:

...Do you plan to add SPDIF output at 44.1 Khz?...

Thinking about it. Currently I'm also working on stereo version of Blasterboard and actually making an SPDIF out for it, so if that will come out production-cozy, then why not.

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 14 of 16, by LABS

User metadata
Rank Member
Rank
Member
keropi wrote on 2022-11-01, 07:11:

this is neat! brings emulation closer to the real thing 😀

it needs a jumper though: "thinking noises" ON/OFF 🤣

There actually was such kind of jumper in revision a pcb 😁👍

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card

Reply 15 of 16, by 640K!enough

User metadata
Rank Oldbie
Rank
Oldbie
LABS wrote on 2022-10-30, 22:58:

Nothing at all? 😁
Did not expect such lack of interest
Or did I miss something?

I'm always interested in such efforts. Money to actually buy the finished product, on the other hand, is an entirely different matter. 😁

So, some (hopefully helpful) questions:

  1. Do you have a command that allows you to issue a reset, eventually asserting IC# on the OPL3? With the number of sloppy timing routines out there, and the fact that this is now being done over USB, that will likely be a handy feature at some point. Of course, since it is a USB device, another solution could just be to unplug the device briefly, but I always prefer an elegant method of resetting a device, and the number of sound cards that don't have one is surprising.
  2. Are you planning to include the connected sound card's output in an eventual S/PDIF signal? Have you chosen an ADC for that purpose yet?
  3. If you want to keep the OPL3 signal fully digital, rather than OPL3-DAC-ADC-encoder-S/PDIF, wouldn't you be better off with a YMF289?

Reply 16 of 16, by LABS

User metadata
Rank Member
Rank
Member
640K!enough wrote on 2022-11-02, 03:25:
I'm always interested in such efforts. Money to actually buy the finished product, on the other hand, is an entirely different […]
Show full quote
LABS wrote on 2022-10-30, 22:58:

Nothing at all? 😁
Did not expect such lack of interest
Or did I miss something?

I'm always interested in such efforts. Money to actually buy the finished product, on the other hand, is an entirely different matter. 😁

So, some (hopefully helpful) questions:

  1. Do you have a command that allows you to issue a reset, eventually asserting IC# on the OPL3? With the number of sloppy timing routines out there, and the fact that this is now being done over USB, that will likely be a handy feature at some point. Of course, since it is a USB device, another solution could just be to unplug the device briefly, but I always prefer an elegant method of resetting a device, and the number of sound cards that don't have one is surprising.
  2. Are you planning to include the connected sound card's output in an eventual S/PDIF signal? Have you chosen an ADC for that purpose yet?
  3. If you want to keep the OPL3 signal fully digital, rather than OPL3-DAC-ADC-encoder-S/PDIF, wouldn't you be better off with a YMF289?

Hi, 640K!enough!
Thanks for your interest

1) Yes, there is an OPL3 reset command of cause. The opifm.dll library provides API for controlling OPi. It also allows sending OPL3 commands by one or to form a command queue and send it as a packet (used for sending commands that should happen at once like a single row of events in Adlib Tracker). OPi also upgrades firmware over USB. Here is a header for opifm.dll with API commands at the end:

opifm.h


// opifm.h

#ifndef __OPIFM_H__
#define __OPIFM_H__

#ifdef _WIN32
#include <windows.h>

#ifdef OPI_EXPORT
#define OPI_API __declspec(dllexport)
#else
#define OPI_API __declspec(dllimport)
#endif

#endif

// Error codes
#define OPI_OK 0
#define OPI_INVALID_HANDLE 1
#define OPI_DEVICE_NOT_FOUND 2
#define OPI_DEVICE_NOT_OPENED 3
#define OPI_IO_ERROR 4
#define OPI_INSUFFICIENT_RESOURCES 5
#define OPI_INVALID_PARAMETER 6
#define OPI_INVALID_BAUD_RATE 7
#define OPI_DEVICE_NOT_OPENED_FOR_ERASE 8
#define OPI_DEVICE_NOT_OPENED_FOR_WRITE 9
#define OPI_FAILED_TO_WRITE_DEVICE 10
#define OPI_EEPROM_READ_FAILED 11
#define OPI_EEPROM_WRITE_FAILED 12
#define OPI_EEPROM_ERASE_FAILED 13
#define OPI_EEPROM_NOT_PRESENT 14
#define OPI_EEPROM_NOT_PROGRAMMED 15
#define OPI_INVALID_ARGS 16
#define OPI_NOT_SUPPORTED 17
#define OPI_OTHER_ERROR 18
#define OPI_DRIVER_NOT_FOUND 0x80
#define OPI_RX_TIMEOUT 0x81
#define OPI_INIT_PROGRAM_ERROR 0x82
#define OPI_PAGE_RECEIVE_ERROR 0x83
#define OPI_PAGE_PROGRAM_ERROR 0x84
#define OPI_CRC_ERROR 0x85
#define OPI_NOT_READY_TO_RECEIVE 0x86
#define OPI_NOT_OPENED 0x87
#define OPI_ALREADY_OPENED 0x88

#define OPI_STATUS_NORMAL 0xAA
#define OPI_STATUS_SERVICE 0x55

#ifdef __cplusplus
extern "C"
{
#endif

// Initialize OPi device and FTDI driver before calling any other OPi functions
OPI_API int WINAPI Opi_Open(void);

// Reset OPL3
OPI_API int WINAPI Opi_Reset(void);

// Read current status of OPi operation (*status=0xAA if normal operation)
OPI_API int WINAPI Opi_ReadStatus(unsigned char *status);

// Send a single OPL3 command directly to OPL3 chip
OPI_API int WINAPI Opi_SendOPL3Cmd(unsigned short reg, unsigned char val);

// Add an OPL3 command to the internal command queue
OPI_API int WINAPI Opi_EnqueueOPL3Cmd(unsigned short reg, unsigned char val);

// Send internal command queue to OPL3 chip
OPI_API int WINAPI Opi_SendOPL3Queue(void);

// If any of the above functions fails (!= OPI_OK), this will return last error code
OPI_API int WINAPI Opi_GetLastErr(void);

// Called when finished using OPi
OPI_API int WINAPI Opi_Close(void);

#ifdef __cplusplus
}
#endif

#endif



2-3) I'm thinking of S/PDIF out, but for the mixed analog signal (OPL3 + line) only. Just received UDA1355H, it has ADC and DAC with S/PDIF in both paths. Actually I'm going to try it for stereo version of Blasterboard and to convert CD-ROM digital out to analog and then to send all mixed analog sources together to S/PDIF via its ADC. Never worked with S/PDIF before, will see.

Blasterboard: DIY SB2-compatible sound card on ATmega MCU
Sonic Buster 8: New 8-bit ISA sound card