TG100 sample ROMS
Technical discussion which is not directly related to VGM files. Talk about Hardware and Software.
Moderator: Staff
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
Re: TG100 sample ROMS
the tg100 has a test dsp program to output a sine wave, maybe you can trigger that in test mode
Re: TG100 sample ROMS
Agreed, that would be something to try (when I get myself a TG100
). As an alternative I guess I could try to disassemble the TG100 program ROM, as the DSP test program should be there.

Re: TG100 sample ROMS
I have a working TG100; let me know if you need anything.
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
Re: TG100 sample ROMS
If you're trying to reverse engineer the DSP chip, you might want to start by hooking up a 16 channel logic analyzer to the bus between it and the CPU, or if I recall correctly, there's also a bus between it and the synthesis chip. Then, record a normal startup and a test mode startup, where you make it play a sine wave. And then turn the capture into a byte stream and somehow figure out which of the bytes are instruction bytes and which are data bytes and so on.
Re: TG100 sample ROMS
The LDSP is exclusively controlled by the YMW258. I have documented the protocol here:
viewtopic.php?t=5745
In a nutshell, the YWM sends 32-bit serial command data from the DSPCDS pin, to the CDI pin on the LDSP.
The LSB 16-bit word has an identifier (0x8000 in the case of the YM3413). This is useful as you can chain the LDSP with a LEF (YM3415) and the chips need to know who should process the command. The MSB 16-bit word is a register / value combo, both 8-bit. I have observed 7 different registers, but most of their purpose is currently unknown.
I don't think much more information can be gathered from actual testing with the TG100 (except from maybe the LFO hold MIDI command... I don't know if it holds or resets the LFO).
De-soldering the YMW (and LDSP) and connecting them to an Arduino or something will be required for full hardware testing, as we need to be able to send custom data to the YMW in order to reverse-engineer the unknowns / blanks.
viewtopic.php?t=5745
In a nutshell, the YWM sends 32-bit serial command data from the DSPCDS pin, to the CDI pin on the LDSP.
The LSB 16-bit word has an identifier (0x8000 in the case of the YM3413). This is useful as you can chain the LDSP with a LEF (YM3415) and the chips need to know who should process the command. The MSB 16-bit word is a register / value combo, both 8-bit. I have observed 7 different registers, but most of their purpose is currently unknown.
I don't think much more information can be gathered from actual testing with the TG100 (except from maybe the LFO hold MIDI command... I don't know if it holds or resets the LFO).
De-soldering the YMW (and LDSP) and connecting them to an Arduino or something will be required for full hardware testing, as we need to be able to send custom data to the YMW in order to reverse-engineer the unknowns / blanks.
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
TG100 samples groups by instrument
After some tinkering, I’ve come to understand the YRW801 structure better. It starts with a 12-byte header for each sample, followed by 12-bit sample data. Looking at the Linux driver (midi_opl4_yrw801.c), I was able to see how the samples are grouped by instrument.
I also noticed that the YRW801 ROM contains a lot of empty space. At first, I thought it might have been a bad dump, especially since in the TG100 ROM, all headers and samples appear to be fully populated. But I later realized this is likely due to limitations in the hardware where OPL4 was used.
This investigation raised a question for me: if the YRW801 can already reproduce all the instruments listed in midi_opl4_yrw801.c, are there additional instruments in the TG100?
I searched the GitHub repository for something similar to midi_opl4_yrw801.c that maps instruments to their sample data, but I couldn’t find anything quite like it. The closest thing I found was samples.ods, but I wasn’t able to fully understand it.
Does anybody know if there’s a resource that shows how the TG100 samples are grouped into key ranges for each instrument, similar to how it’s done in midi_opl4_yrw801.c? For example Grand piano, key_min=0x16, key_max=0x2e, sample=300, key_min=0x2f, key_max=0x36, sample=301
I also noticed that the YRW801 ROM contains a lot of empty space. At first, I thought it might have been a bad dump, especially since in the TG100 ROM, all headers and samples appear to be fully populated. But I later realized this is likely due to limitations in the hardware where OPL4 was used.
This investigation raised a question for me: if the YRW801 can already reproduce all the instruments listed in midi_opl4_yrw801.c, are there additional instruments in the TG100?
I searched the GitHub repository for something similar to midi_opl4_yrw801.c that maps instruments to their sample data, but I couldn’t find anything quite like it. The closest thing I found was samples.ods, but I wasn’t able to fully understand it.
Does anybody know if there’s a resource that shows how the TG100 samples are grouped into key ranges for each instrument, similar to how it’s done in midi_opl4_yrw801.c? For example Grand piano, key_min=0x16, key_max=0x2e, sample=300, key_min=0x2f, key_max=0x36, sample=301
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
Re: TG100 samples groups by instrument
Check out earlier in this very thread: viewtopic.php?p=8823#p8823
Re: TG100 sample ROMS
After reviewing the samples.ods file from the referenced thread, I noticed that the Regions tab contains the information I was looking for. In particular:
Column 'Instrument': This indicates the instrument number according to the MIDI standard.
'Sample': This represents the sample number, which is identified by the 12-bit header.
'Key_min' and 'Key_max': These columns define the tone range for the sample.
However, while listing the sample numbers in the Regions tab, I noticed that some samples appear to be missing. From what I understand, there isn't a dedicated file for the TG100, similar to midi_opl4_yrw801.c for the YRW801. It seems like the file for the TG100 is based on educated guesses, drawing on the similarities between the YRW801 and TG100.
I’d be interested to hear if anyone has more details or insights on the missing samples or any other resources that might help clarify the differences between the YRW801 and TG100. Any suggestions or clarifications would be much appreciated!
Column 'Instrument': This indicates the instrument number according to the MIDI standard.
'Sample': This represents the sample number, which is identified by the 12-bit header.
'Key_min' and 'Key_max': These columns define the tone range for the sample.
However, while listing the sample numbers in the Regions tab, I noticed that some samples appear to be missing. From what I understand, there isn't a dedicated file for the TG100, similar to midi_opl4_yrw801.c for the YRW801. It seems like the file for the TG100 is based on educated guesses, drawing on the similarities between the YRW801 and TG100.
I’d be interested to hear if anyone has more details or insights on the missing samples or any other resources that might help clarify the differences between the YRW801 and TG100. Any suggestions or clarifications would be much appreciated!
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
Re: TG100 sample ROMS
You'll have to look in the ROM itself, since the spreadsheet might be incomplete.
Re: TG100 sample ROMS
But in the ROM, if it is similar to the YRW801, there is only the Wave information: 12 bytes for each sample at the beginning of the ROM.
But there isn't information on how to group them to form instruments. Am I right? For example in YRW801, the Acoustic Grand Piano and Bright Acoustic Piano have the same samples but are two different instruments. Is this information in the ROM?
Maybe in the dump of the program I could get more information. I'll give it a try although my knowledge of assembler is low.
But there isn't information on how to group them to form instruments. Am I right? For example in YRW801, the Acoustic Grand Piano and Bright Acoustic Piano have the same samples but are two different instruments. Is this information in the ROM?
Maybe in the dump of the program I could get more information. I'll give it a try although my knowledge of assembler is low.
- vampirefrog Offline
- Webmaster
- Posts: 827
- Joined: 2014-01-28, 5:51:54
Re: TG100 sample ROMS
You don't need assembler knowledge, just a hex editor and if you take a look earlier in this thread I even listed the locations of the instrument data in the ROM. You can also find the ROM dumps in this thread.