A Bit of History

Excited to embark on a new electronics project: delving into the RBSC SFG05/01 cartridge for MSX computers!

This work was originally created by the RBSC group, all files are available on their GitHub repository here RBSC/SFG_Cartridge: Yamaha SFG 05/01 OPM/OPP cartridge (github.com)

But what exactly is this SFG05/01 cartridge all about? Let’s rewind to the mid-80s, the heyday of MSX computers, and Yamaha introduces the CX5M – not just your average MSX1 computer, but a music lover’s dream, equipped with a music expansion module featuring Yamaha’s iconic chips straight from their top-of-the-line synths and arcade machines.

The CX5M came in three flavors. The original version rocked the FM module SFG-01 with the YM2151 OPM chip. But here’s the catch – it couldn’t sync up with external MIDI devices and needed its own special keyboard. Then after some time Yamaha released the CX5M II (or CX7M/128 in Japan), boasting the upgraded FM system, SFG-05, powered by the YM2164 OPP chip. That beauty could harmonize with any MIDI keyboard, unlocking a whole new world of musical possibilities.

The music module was the heart of the computer music soul. Initially the SFG01 module, based on the YM2151 (OPM) and later the SFG05 module, based on the YM2164 chip (OPP).

Originally bundled with Yamaha CX5M MSX (and other Yamaha computers), these SFG05 and SFG01 modules were renowned for their stellar sound quality. But here’s the kicker – they only played nice with Yamaha computers sporting the right slots, leaving other MSX users out in the cold.

But how to have those features with the rest of the MSX compatible computers? The Russion RBSC group heard the pleas of MSX enthusiasts worldwide and came up with a brilliant solution – transforming those SFG05/01 modules into a standard MSX cartridge. Voila! Suddenly, everyone could experience the magic of Yamaha’s sound, regardless of their MSX model.

So, what’s next? This article is your guide. We’ve got the full rundown of materials you’ll need, along with handy links to get you started. Plus, we’ll walk you through the setup process step by step, so you can transform your standard MSX computer into a musical powerhouse.

Get ready to unleash your creativity!

Hardware

The cartridge is based on two printed circuit boards. The main board implements the basic logic, has the flash memory with the basic software for both the SFG01 and SFG05 modules, and hosts the Yamaha chips required. The extension board implements the appropriate connectors to link MIDI devices as well as speakers.

The SFG05 software/ROM has some changes as only the YM2151 chip is present. Originally the SFG05 module had a ROM to use the YM2164 OPP chip, but this cartridge leverage only the OPM version.

Main Board – Electronics Schema

Main Board – Bill of Materials

ReferenceValueDescriptionQtyLink
SFG05/01 OPM Cart Main PCBN/ACustom SFG05/01 Printed Circuit Board available on the project GitHub repository1GitHub
IC103EPM7160STC100 TQFP100EPM7160STC100 CMOS EEPROM-based programmable logic devices (CPLD) – 5V1AliExpress
IC10874ALS04BDRHex Inverters 14-SSOP1AliExpress
AU1, AU2, AU34558 SMD SOP-8Dual Operational Amplifier3AliExpress
C1, C2, C4, C5, C6, C7, C9, C29, C30, C32, C33100nF 06030603 100NF Ceramic Capacitor (104)11AliExpress
C2027nF 06030603 27nF Ceramic Capacitor1AliExpress
C25, C271nF 06030603 1nF Ceramic Capacitor (102)2AliExpress
C21, C231.8nF 06030603 1.8nF Ceramic Capacitor2AliExpress
C31, C34, C35, C36, C37, C38, C39, C40, C41, C42, C43, C44, C45, C46, C47, C48, C49100pF 06030603 100pF Ceramic Capacitor (101)17AliExpress
C14, C15390pF 06030603 390pF Ceramic Capacitor (391)2AliExpress
C16, C17, C18, C19, C22, C244.7uF 25v 1206/ATantalum Capacitor SMD Case A 25V 4.7uF (475E)6AliExpress
*C50 (only if using 74HCT04)47pF 06030603 47pF Ceramic Capacitor (470)1AliExpress
R26, R27, R49, R50, R51, R521KR 06030603 1K R Resistor6AliExpress
R18, R22, R241.8KR 06030603 1.8K R Resistor3AliExpress
R81MR 06030603 1M R Resistor1AliExpress
R21, R23, R252.2KR 06030603 2.2K R Resistor3AliExpress
R9, R10, R11, R12, R14, R344.7KR 06030603 4.7K R Resistor6AliExpress
R6, R7, R13, R15, R38, R40, R41, R42, R43, R44, R45, R46, R47, R4810KR 06030603 10K R Resistor14AliExpress
R35, R3622KR 06030603 22K R Resistor2AliExpress
R4, R5, R17, R19, R30, R32, R33220R 06030603 220 R Resistor7AliExpress
R31330R 06030603 330 R Resistor1AliExpress
R37390R 06030603 390 R Resistor1AliExpress
R16, R20560R 06030603 560 R Resistor2AliExpress
T32SA733 SOT-23PNP SILICON TRANSISTOR1AliExpress
T1, T2, T4, T5, T62SC945 SOT-23NPN Silicon Planar Epitaxial Transistor5AliExpress
C10, C11100uF 16V Case C Tantalum Capacitor SMD Case C 16V 100uF2AliExpress
D1, D2, D31N4148SSWITCHING DIODE3AliExpress
C1347uF 6.3V Case BTantalum Capacitor SMD Case B 6.3V 47uF (476J)1AliExpress
C12, C2610uF 16VTantalum Capacitor SMD Case B 16V 10uF (106C)2AliExpress
C3, C2847uF 16VTantalum Capacitor SMD Case B 16V 47uF (476C)2AliExpress
L1820 uHCD54 SMD Wound Power Inductor1AliExpress
AX1PJ-3073.5mm Stereo Jack Socket Audio Jack Connector PCB 3F07 PJ-3071AliExpress
IC109TLP552TOSHIBA Photocoupler IRED & Photo IC1AliExpress
IC102YM30122-Channel Serial Input DAC1AliExpress
IC104W27C512P64K X 8 ELECTRICALLY ERASABLE EPROM1AliExpress
IC101YM2151Yamaha FM Operator Type-M(OPM)1AliExpress
CN4IDC2X20MAngled 40 PIN (2×20) 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW1AliExpress
CN3IDC10MAngled 10 PIN (2×5) 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW1AliExpress
JP1Jumper2.54mm 1 x 40 Pin Male Single Row Pin Header Strip Black1AliExpress
XTL1CRY-4MHZ-HC-49S4M 4MHZ 20PF QUARTZ CRYSTAL RESONATOR HC-49S1AliExpress

Extension Board – Electronics Schema

Extension Board – Bill of Materials

ReferenceValueDescriptionQtyLink
SFG Cartridge Expansion BoardN/ACustom SFG Cartridge Expansion Printer Circuit board available on the project GitHub repository1GitHub
X1PH-254-D-F-2×20-RA2.54mm 2 x 20 Pin Female Double Row Pin Header Strip Black Right Angle1AliExpress
X2BOXED-2x20P-2.54-180Straight 40 PIN 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW1AliExpress
X3, X4RCA-D-WHITE-2PAV2-8.4-12 Gold Plated RCA Core Socket 6 Hole STB TV Plug AV JACK RCA Socket Input Audio And Video Socket AV2 Connector1AliExpress
X6, X7DIN5-FTerminal DIN5 Female Socket Connector 5P PCB Panel Mount2AliExpress
X5BOXED-2x10P-2.54-90Right angle 20 PIN 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW1AliExpress

Programming

The cartridge is powered by the Altera Max EPM7160 CPLD, housing all the essential logic circuits alongside the YM2148 emulation. The board offerts a switch mechanism (via jumper), empowering users to select their preferred firmware version. Both firmware iterations were included – SFG-01 or SFG-05.

A customized patch was applied to the SFG-05 firmware, enabling seamless compatibility with the older YM2151 OPM chip.

CPLD Firmware

To program the Altera Max EPM7160 CPLD, you need to power the board. You can do that by connecting a 5V power supply to the appropriate pin on the PCB or by inserting the cartridge to a MSX computer. I do recommend the first option over the second, as mistakes during the soldering job may create shorts and damage your computer.

If you decide to connect the cartridge to your MSX before programming the CPLD, be aware that it is not going to boot up until the chip is programmed.

The software required is the Quartus Programmer, you will also need a Altera USB blaster adapter to connect to the JTAG connector present on the PCB.

  1. Clone the RBSC repository to your PC with the Altera Quartus software installed.
  2. Connect the USB blaster to your PC.
  3. Open the Quartus Programmer and click Add File, select the sfg_cart.pof file that is located inside the Firmware folder. Make sure you select the Program/Configure option.
  1. While connecting the USB blaster adapter to the board, click Start to initiate the programming of the CPLD. On the pictures below you can see the USB blaster connected to the complete board with the boxed JTAG connector and how to handle the connection with the hand during the programming (on the incomplete board – right side).

After programming the CPLD, the MSX will be able to boot with the card inserted.

BIOS (ROM)

The SFG-01 and SFG-05 ROMs were created by Yamaha Corporation. The SFG-05 ROM was altered to work with SFG-01 hardware.

To program the 27C512 flash memory you will need a simple programmer like the TL866 or T48 with the appropriate adapter.

You need to insert the PLCC32 chip into the adapter and then insert the adapter into the programmer. I’m using the simple TL866 programmer from Xgecu to load the rom file into the flash.

  1. Open the Xgecu programmer software and select the 27C512 device.
  1. Load the SFG-64K.ROM file that is available on the BIOS folder and click OK.
  1. Click Prog to flash the content of the ROM file into the PLCC32 flash chip.

Case ans Labels

One thing that is still missing from the RBSC GitHub repository is an appropriate case for the cartridge. I went ahead and created one. This case not only accommodates the 2×20 boxed connector located on the top of the PCB but also facilitates the adjustment of the jumper settings without necessitating the removal of the PCB from the case.

Using the Catridge

The cartridge offers many possibilities for MSX enthusiasts. You can dive into playing direct tunes tailored for the YM2151, such as the iconic arcade melodies from games like Out Run, the masterful compositions from the X68000, or even specific VGM mod files crafted for this chip.

But wait, there’s more! A group of passionate MSX fans has been hard at work porting original tracks from arcade games to the MSX platform, breathing new life into beloved classics. In some cases, they’ve gone above and beyond, creating entirely new track sets exclusively for our cherished MSX games, elevating the gaming experience to new heights. THANKS ToughkidDev (ToughkidDEV) (github.com)!!!!

And let’s not forget about the music creation aspect. With the cartridge, you can connect your MIDI equipment, like keyboards, and compose your own tunes. Whether you prefer the classic SFG01 standard software, the enhanced capabilities of the SFG05, or new music software tailored specifically for creating melodies from MIDI-compatible instruments, the possibilities are endless. It’s time to unleash your inner composer and make some magic!

YM2151 Tunes Playing

VGMPLAY is a really good tool for MSX fans, letting you dive into the world of retro gaming tunes. It plays VGM files, which are like blueprints for creating game music. These files hold everything from melody lines to instrument setups, making sure the music sounds just like it did in the old games.

With VGMPLAY, you can relive those YM2151 tunes by playing VGM files straight on your MSX computer. Just fire up VGMPLAY and tell it which VGM file you want to hear.

The best part? VGMPLAY automatically detects your just built cartridge and gets the tunes rolling, giving you that sweet blast from the past with the authentic YM2151 sound.

Here are some videos of my uMSX FPGA playing YM2151 songs using my RBSC SFG05/01 cartridge.

MSX Modded Games

In recent times, there’s been this cool movement to jazz up some classic MSX games with more complex YM2151 based tunes, similar to what you’d hear in the arcade versions. Remember back in the day, all we wanted was to play those MSX games as if we were at the arcade, right?

Well, guess what? Now we can relive that dream, over 40 years later! Playing these games with fresh tunes brings back all those nostalgic feels. So, I’ve rounded up some videos and tips for you to check out these modded versions and dive back into the good old days with your shiny new cartridge. Let’s get gaming!

Kudos to ToughKidDev from South Korea! mglOcm/ArcadeEnhanced at master · ToughkidDev/mglOcm (github.com)

Arkanoid 2

Arkanoid 2 for the MSX, released in 1987, continued the saga of the paddle-controlled spaceship, battling through a maze of bricks and alien threats. Building upon the success of its predecessor, it brought refined mechanics, new power-ups, and expanded levels, captivating gamers with its addictive gameplay and solidifying its status as a beloved classic in the MSX gaming library. Now with new arcade tunes!!!

mglOcm/ArcadeEnhanced/Arkanoid2 at master · ToughkidDev/mglOcm (github.com)

Commando – Senjyo no Ookami 

Commando – Senjyo no Ookami for the MSX emerged in 1985 as a pioneering force in the realm of arcade-style shooters. Translating the intense action of the arcade original onto the MSX platform, it thrust players into the heart of World War II battles, challenging them to navigate treacherous landscapes and decimate enemy forces with precision and skill. Now the sound compensates the “high quality” MSX1 graphics. 🙂

mglOcm/ArcadeEnhanced/Commando – Senjyo No Ookami at master · ToughkidDev/mglOcm (github.com)

Fantasy Zone

mglOcm/ArcadeEnhanced/FantasyZone at master · ToughkidDev/mglOcm (github.com)

Gradius

Gradius, the iconic shoot ’em up masterpiece, debuted on the MSX in 1986, introducing players to the thrilling world of side-scrolling space shooters.

mglOcm/ArcadeEnhanced/GradiusNemesis at master · ToughkidDev/mglOcm (github.com)

And… Space Manbow!!!

(Still unfinished by the time of this article writing…)

Connecting a MIDI Keyboard

To connect a keyboard to the RBSC SFG05/01 cartridge, you’ll need a MIDI compatible keyboard or a MIDI adapter compatible with your keyboard. My test configuration has an AKAI MPK Mini MK3 connected to the cartridge via a DOREMIDI USB MIDI Host Box High Speed USB to MIDI Converter Interface. That converter is required as the AKAI keyboard doesn’t have an old traditional DIN5 MIDI interface, using a more modern USB connection.

The below diagram represents the connections used with my setup:

Here is a video showing my “musical talent” 🙂

To run the appropriate version of the software you need to use the board jumper to activate the first or the second half of the flashROM and then type “call musica” on the basic prompt. With the jumper connected, the board is configured to run as SFG05, without the jumper it behaves like the SFG01 module.

The correspondent ROM is also available depending on how the jumper is configured.

SFG-01 ROM

SFG-05 ROM

Playing MIDI songs

The only tool that I found capable to play MIDI songs on the SFG05/01-S cartridge was SZMMP v0.69. I tried many tools with no success, including the famous ROBOPLAY, MIDRY, etc. SZMMP can be downloaded from SZMMP(鈴見咲MIDIファイルプレイヤー)の詳細情報 : Vector ソフトを探す!

References

Below you can find links that helped me to understand the board, history behind, MIDI on MSX and Yamaha computers created to compose music.

You can purchase the same keyboard and adapter I used on the following links:

Leave a Reply

Your email address will not be published. Required fields are marked *