Atari ST OPL2 and OPL3 carts demos

I’ve hit the major milestone!

I’ve posted this news on several Atari forums (Exxos, Atari Forum, Atari Area, AtariAge), but if you didn’t read it then long story short I’ve managed to actually use OPL cartridges I’ve designed, manufactured and assembled. It was very rewarding moment. After months of development everything ‘clicked’, so I think it was worth to make small write up.

At the end of December 2023 I’ve pushed first commit to FM chips library, but everything really started much earlier, when I’ve started digging into OPL3LPT, so beginning of the project was February of 2020. Project which spiralled out of control, because when investigating existing OPL2/3 devices and connecting them to Atari ST I came to conclusion that something more tailored would be much better option. Mostly because of interfacing cpu overhead. Quite a long time, so for me it’s big, but it might not be for someone else, because end result is not perfect yet or they have done much more complicated things in the past.

Most issues were self inflicted and could be eliminated at earlier stages, but back then, when I’ve started, thought “actually it should be easy…” ;) and wanted to do this cartridge I didn’t know anything about interfacing devices with cpu, electronics, pcb design, pcb manufacturing, digital / analog circuits, SMD/SMT soldering, so it was quite bumpy learning experience.

Big thanks!

Hopefully there were some persons / individuals I could ask in Atari community, which know much more about hardware and electronics than me. So, I would like to thank all the people from Exxos / Atari Forum and several individuals / companies behind great OPL2 / OPL3 hardware products that helped me during the way (in no particular order):

BadWolf, T0ri, Sqward (best Atari development moral support everyday :)), Willy, Sporniket, Czietz, Daniel Illgen (Insane/TSCC)(who actually confessed that he had done ST OPL2 cart already several years before me, when I’ve researched OPL2/3LPT devices), Arne, Serdaco (for OPL2LPT / OPL3LPT, which was kinda proof of concept that OPL2/3 is viable on Atari), Xentax for C64 FM-YAM (main inspiration behind all of this, I liked how the cart was delivered and accompanied with cool demos), Cheerful Electronic / Maarten Janssen a.k.a DHrBaksteen for OPL3 Duo! / OPL2 Audio boards and Arduino OPL2 library, which was my point of reference when creating Atari OPL software (, but I’ve ditched C++, rewritten everything in C99 / m68k assembly and much improved it), SudoMaker for USB OPL3 Express, which I’ve used when developing / testing software on PC and reduced considerably iteration times. And anyone I’ve forgot..

I would also thank to two authors, who wrote articles about dealing with Atari ST ROM port back in the day:

Demo time

Here are prototypes, main topic of this story:

Atari ST OPL3 cart prototype
Atari ST OPL2 cart prototype plugged to 520ST+

I’ve recorded several video / audio captures of 520ST+ equipped with my two OPL2 and OPL3 cart prototypes and replayed standard OPL3/OPL2 tune playlists which I’ve used on other devices to have some kind of reference if I’m doing good or bad.

OPL3 cart demos

OPL2 cart demo

In last episode

After last post, when OPL3 prototype didn’t work I was quite confused and little frustrated, because it refused to work. After examining it with multimeter, logical analyzer and scope I came to conclusion that there might be some issues at component / electronics level (fake chips are common, badly chosen components, errors on pcb level, bad solders …). But connections looked fine, power was solid, everything looked ok on logic analyzer (I’ve added extra connectors to plug in probes to cartridge interface).

So, I thought that I will look into something much simplier. So I’ve created OPL2 cart version ,which I didn’t show last time and actually didn’t plan doing anyway. It was adapted partially from Arduino OPL2 Audio board schematics available on the web (mostly because I had some hints that DAC circuit in OPL3 version might not work as intended and I wanted to be sure that DAC/op-amps design is working ok with only+5V power supply) and combined it with exisiting OPL3 cartridge interface design.

I’ve sent it to manufacture, ordered parts, in the mean time I’ve wrote drivers for it based on those OPL3 cart. PCB prototypes arrived, I assembled the cart, tested it and guess what? It didn’t work …..

Ok, that’s bad. So, I’ve looked into FM Melody cart internals. Partially I was influenced by playing new CRPG game Skald RPG, which have really great soundtrack created (according to their website) with YM2413B chip in mind. I’ve contacted author (Surt R.) about the soundtrack in vgm form on BandCamp, it would be great OPLL showcase replayed on Atari ST, but unfortunately he didn’t respond. Game was so great that I’ve finished it right away and soundtrack to it spins non stop on my PC to this day:

Anyway FM Melody Maker Cart interface looked similar to mine, but bit arrangements were different, and it had OPLL instead of OPL2, but idea looked the same. Hybrid Arts of course didn’t supply any programming info with this cart to make things easier (package was addressed to ‘usual’ MIDI musicans, which in my opinion reduced significantly it’s user base, but on the other hand OPLL was quite limited even back in ’89). I’ve quickly adapted my vgm player to support YM2413B and I’ve added driver backend for OPLL (FM Melody Maker cart uses YM2413B clone, but both chips are pin compatible). Took some tunes from 8-bit MSX / MSX2 VGM library and turned out that I’m able to play music through it! So that was interesting, but I’ve missed several things on PCB, which existed on FM Melody Maker (like gigantic 2300uF 10V capacitor on power line +5V and reset circuit connected to power rail), so I’ve wondered if this was it or something else.

Break through

In the evening last friday I was doing something else, but I’ve accidently took schematic of OPL2 cart in hands, which layed around on desk, looked at it and wondered what is going on. After looking closely at assignments of cartridge address lines used to set up OPL data lines, it turned out that OPL dataline D0 was assigned to adress line, which I actually interpreted as a D7. Bits ordering was inverted! I couldn’t believe it, because I’ve stared on those schematics for several months, few people much experienced than me looked at it without ever noticing. Same error was copied from OPL3 cart to OPL2 cart schematic!

So, I’ve started with OPL2 cart and inverted those bits on driver level driver and finally OPL2 started to replay actual music, not random noises :)..

I’ve made similar fixes in OPL3 cart drivers, but it didn’t work. I’ve looked at schematic again and compared them to OPL2 ones. Turned out that in OPL3 version I’ve reverted also A0 / A1 assignments. Cart A0 address line was assigned to A1 on OPL, and A1 cart line assigned to A0! Reverting this on driver level did the trick. :) So, really basic error on early stage made whole device useless. In next pcb revision it needs to be amended on pcb and driver level, because it adds not needed cpu overhead, when writing to OPL chips. Main take away is that if you connect your wires correctly, then things will work. If not then not, simple. ;-)

Future plans

Probably I will try to propagate those carts to wider audience (if there will be demand), improve it, make it look more actual product with labels and case, make it more accessible, so integrating support for those carts will be very easy in demos / programs / emulators / game ports / music players/ music sequencers. I certainly need to remove all copyright protected signs from pcb to avoid legal harassments from new “Atari” and maybe find better name for those carts.

On the other hand I have to take into account expenses. Everything was self funded, testing, prototyping, parts and equipment was not cheap and took several months of development time mostly after hours / free time. So, I’m not sure at this moment if I publish all the work or will go into doing small, test production batch after finalizing design and taking preorders.

If this carts will be successful maybe there will be possibility to create something more advanced like PokeyMAX (in FPGA) or something based on OPL4 chip. We will see…

I will probably create place / site dedicated to everything I’ve learnt during development about using FM chips on Atari, so anyone will be able to use them..

So that’s basically it. I hope everyone will be able get those carts soon and make something cool with them..

In memory of one Atari ST MMU, which died during development… No other custom chips were harmed along the way :)…

About this entry