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
Reference | Value | Description | Qty | Link |
SFG05/01 OPM Cart Main PCB | N/A | Custom SFG05/01 Printed Circuit Board available on the project GitHub repository | 1 | GitHub |
IC103 | EPM7160STC100 TQFP100 | EPM7160STC100 CMOS EEPROM-based programmable logic devices (CPLD) – 5V | 1 | AliExpress |
IC108 | 74ALS04BDR | Hex Inverters 14-SSOP | 1 | AliExpress |
AU1, AU2, AU3 | 4558 SMD SOP-8 | Dual Operational Amplifier | 3 | AliExpress |
C1, C2, C4, C5, C6, C7, C9, C29, C30, C32, C33 | 100nF 0603 | 0603 100NF Ceramic Capacitor (104) | 11 | AliExpress |
C20 | 27nF 0603 | 0603 27nF Ceramic Capacitor | 1 | AliExpress |
C25, C27 | 1nF 0603 | 0603 1nF Ceramic Capacitor (102) | 2 | AliExpress |
C21, C23 | 1.8nF 0603 | 0603 1.8nF Ceramic Capacitor | 2 | AliExpress |
C31, C34, C35, C36, C37, C38, C39, C40, C41, C42, C43, C44, C45, C46, C47, C48, C49 | 100pF 0603 | 0603 100pF Ceramic Capacitor (101) | 17 | AliExpress |
C14, C15 | 390pF 0603 | 0603 390pF Ceramic Capacitor (391) | 2 | AliExpress |
C16, C17, C18, C19, C22, C24 | 4.7uF 25v 1206/A | Tantalum Capacitor SMD Case A 25V 4.7uF (475E) | 6 | AliExpress |
*C50 (only if using 74HCT04) | 47pF 0603 | 0603 47pF Ceramic Capacitor (470) | 1 | AliExpress |
R26, R27, R49, R50, R51, R52 | 1KR 0603 | 0603 1K R Resistor | 6 | AliExpress |
R18, R22, R24 | 1.8KR 0603 | 0603 1.8K R Resistor | 3 | AliExpress |
R8 | 1MR 0603 | 0603 1M R Resistor | 1 | AliExpress |
R21, R23, R25 | 2.2KR 0603 | 0603 2.2K R Resistor | 3 | AliExpress |
R9, R10, R11, R12, R14, R34 | 4.7KR 0603 | 0603 4.7K R Resistor | 6 | AliExpress |
R6, R7, R13, R15, R38, R40, R41, R42, R43, R44, R45, R46, R47, R48 | 10KR 0603 | 0603 10K R Resistor | 14 | AliExpress |
R35, R36 | 22KR 0603 | 0603 22K R Resistor | 2 | AliExpress |
R4, R5, R17, R19, R30, R32, R33 | 220R 0603 | 0603 220 R Resistor | 7 | AliExpress |
R31 | 330R 0603 | 0603 330 R Resistor | 1 | AliExpress |
R37 | 390R 0603 | 0603 390 R Resistor | 1 | AliExpress |
R16, R20 | 560R 0603 | 0603 560 R Resistor | 2 | AliExpress |
T3 | 2SA733 SOT-23 | PNP SILICON TRANSISTOR | 1 | AliExpress |
T1, T2, T4, T5, T6 | 2SC945 SOT-23 | NPN Silicon Planar Epitaxial Transistor | 5 | AliExpress |
C10, C11 | 100uF 16V Case C | Tantalum Capacitor SMD Case C 16V 100uF | 2 | AliExpress |
D1, D2, D3 | 1N4148S | SWITCHING DIODE | 3 | AliExpress |
C13 | 47uF 6.3V Case B | Tantalum Capacitor SMD Case B 6.3V 47uF (476J) | 1 | AliExpress |
C12, C26 | 10uF 16V | Tantalum Capacitor SMD Case B 16V 10uF (106C) | 2 | AliExpress |
C3, C28 | 47uF 16V | Tantalum Capacitor SMD Case B 16V 47uF (476C) | 2 | AliExpress |
L1 | 820 uH | CD54 SMD Wound Power Inductor | 1 | AliExpress |
AX1 | PJ-307 | 3.5mm Stereo Jack Socket Audio Jack Connector PCB 3F07 PJ-307 | 1 | AliExpress |
IC109 | TLP552 | TOSHIBA Photocoupler IRED & Photo IC | 1 | AliExpress |
IC102 | YM3012 | 2-Channel Serial Input DAC | 1 | AliExpress |
IC104 | W27C512P | 64K X 8 ELECTRICALLY ERASABLE EPROM | 1 | AliExpress |
IC101 | YM2151 | Yamaha FM Operator Type-M(OPM) | 1 | AliExpress |
CN4 | IDC2X20M | Angled 40 PIN (2×20) 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW | 1 | AliExpress |
CN3 | IDC10M | Angled 10 PIN (2×5) 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW | 1 | AliExpress |
JP1 | Jumper | 2.54mm 1 x 40 Pin Male Single Row Pin Header Strip Black | 1 | AliExpress |
XTL1 | CRY-4MHZ-HC-49S | 4M 4MHZ 20PF QUARTZ CRYSTAL RESONATOR HC-49S | 1 | AliExpress |
Extension Board – Electronics Schema
Extension Board – Bill of Materials
Reference | Value | Description | Qty | Link |
SFG Cartridge Expansion Board | N/A | Custom SFG Cartridge Expansion Printer Circuit board available on the project GitHub repository | 1 | GitHub |
X1 | PH-254-D-F-2×20-RA | 2.54mm 2 x 20 Pin Female Double Row Pin Header Strip Black Right Angle | 1 | AliExpress |
X2 | BOXED-2x20P-2.54-180 | Straight 40 PIN 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW | 1 | AliExpress |
X3, X4 | RCA-D-WHITE-2P | AV2-8.4-12 Gold Plated RCA Core Socket 6 Hole STB TV Plug AV JACK RCA Socket Input Audio And Video Socket AV2 Connector | 1 | AliExpress |
X6, X7 | DIN5-F | Terminal DIN5 Female Socket Connector 5P PCB Panel Mount | 2 | AliExpress |
X5 | BOXED-2x10P-2.54-90 | Right angle 20 PIN 2.54MM pitch MALE SOCKET idc box headers PCB CONNECTOR DOUBLE ROW | 1 | AliExpress |
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.
- Clone the RBSC repository to your PC with the Altera Quartus software installed.
- Connect the USB blaster to your PC.
- 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.
- 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.
- Open the Xgecu programmer software and select the 27C512 device.
- Load the SFG-64K.ROM file that is available on the BIOS folder and click OK.
- 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.
- RBSC/SFG_Cartridge: Yamaha SFG 05/01 OPM/OPP cartridge (github.com)
- home – CX5M.net (file-hunter.com)
- FSW Warehouse Music (MIDI) (sakuramail.net)
- Retro Yamaha Music Computer – Testing out the CX5M (youtube.com)
- MIDI Players – MSX Wiki
- Yamaha SFG-05 – MSX Wiki
- SFG-01/05 module clone | MSX Resource Center (Page 1/9)
- Zip with some SFG05/01 software
You can purchase the same keyboard and adapter I used on the following links:
Sensacional Cristiano, parabéns pelo projeto!
Estou muito interessado na aquisição do cartucho, já sou cliente seu e estou muito satisfeito com a qualidade dos seus produtos e se já existe uma lista de espera para este item, por favor me inclua.
Forte abraço!
Great project !
Some small correction on the history:
The SFG05 module was also included in later iterations of the CX5M version 1, it didn’t need a CX5MII.
I have definitely seen some CX5M on eBay with SFG-05, but they were too expensive, so I bought a CX5MII/128 when it was on sale.
It is also not quite clear if the CX7 is just a Japanese C5MII. It seems to be, but there are sites that say that the CX7M is an MSX-2 machine (128k VRAM), while the CX5MII is still an MSX-1 (16k VRAM). They certainly look very similar. CX7M must be very rare.
Also, there are claims (by Yamaha themselves) that the SFG modules do work on any MSX computers that have the big expansion port.
I would like to purchase a finished product that you made, as I do not have the ability to make these cartridges myself. Is that possible?
I have 10 units in stock at this moment at https://theretrohacker.com/shop/
Hi Cristiano, I would like to to order one or two units but i can’t find the product on your product page…
Hi Emmanuel, unfortunately I don’t have those available for sale.