Audio balance levels in the NES and Famicom can cause some consternation and official hardware is not always consistent. Here I will discuss some simple modifications you can do to your console to restore the balance between internal audio channels and internal audio channels and external cartridge audio.
Showing posts with label Game Audio. Show all posts
Showing posts with label Game Audio. Show all posts
Wednesday, January 10, 2018
Friday, January 5, 2018
OPL2/3 Frequency - The 1Hz-ish Difference
The nature of FM Synthesis sound is based on sine waves. Sine waves create sound by oscillating at a certain frequency and amplitude. So a sine wave oscillating at a frequency of 440Hz (the pitch) would sound like an A note (A4) hit above the middle C (C4) on the 4th octave of a full 88-key keyboard. But a sine wave in and of itself is not very interesting musically, so FM synthesis modulates two or more sine waves to create a much more complex sound. The sine wave's frequency is programmed into the FM Synthesis chip and the modulation of the two frequency, combined with other methods to shape the waveform such as ASDR envelopes, make a sound more complex and realistic than the Programmable Sound Generators that were used in computer and video game music before FM Synthesis became popular in computer music.
Monday, October 16, 2017
NES Clones Reversed Duty Cycles - Why you should Reject them
Clones of the Famicom have been around since the mid-1980s, but clones of the Nintendo Entertainment System were very rare until Nintendo's patents expired in 2005. Since then, clones have become quite common, all advertising such features as improved cartridge insertion mechanisms, lower cost (compared to the official NES top loader), x-in-1s with Genesis or SNES hardware and more recently built-in HDMI support. However, the hardware in many of these clone consoles is fatally flawed and will not give a genuine experience. The flaw comes in the reproduction of the NES's audio in the form of reversed duty cycles. In this blog post, I will explain why this is an issue, how to detect it and why you should not buy second-rate clone consoles.
Saturday, September 10, 2016
Recording the IBM PC Speaker's Sound
The PC Speaker was the first audio device that PCs used. In some form or another, it is contained in almost every PC ever made. In the original IBM PC, the Model 5150 released in 1981, the speaker was a distinct cone 2.25" in diameter. And it was loud, but it had to be in order to compete with the noisy power supply fan and the seeking of the disk drives! The tones it output were pure, and while they were rather harsh they were also clear.
However, eventually the PC Speaker began to shrink in size and eventually give way to the tiny piezoelectric tweeters that are just too quiet to do justice to any kind of complicated audio. (You can blame IBM for putting the idea into other manufacturer's heads because the IBM PCjr., released in 1983, used a piezo tweeter for the PC Speaker.)
When emulators like DOSBox became mature, they could easily output basic PC Speaker audio. Basic PC Speaker audio is essentially a square wave with a fixed volume level and a 16-but frequency selector. They can have difficulty with the more complex sounds produced by Pulse Width Modulation, which essentially sends changes to the frequency of the square wave to the speaker faster than the speaker cone's driving circuitry was intended to handle. This requires a much more rigorous emulation of the CPU, the timer and the "analog" characteristics of the audio generation.
However, eventually the PC Speaker began to shrink in size and eventually give way to the tiny piezoelectric tweeters that are just too quiet to do justice to any kind of complicated audio. (You can blame IBM for putting the idea into other manufacturer's heads because the IBM PCjr., released in 1983, used a piezo tweeter for the PC Speaker.)
When emulators like DOSBox became mature, they could easily output basic PC Speaker audio. Basic PC Speaker audio is essentially a square wave with a fixed volume level and a 16-but frequency selector. They can have difficulty with the more complex sounds produced by Pulse Width Modulation, which essentially sends changes to the frequency of the square wave to the speaker faster than the speaker cone's driving circuitry was intended to handle. This requires a much more rigorous emulation of the CPU, the timer and the "analog" characteristics of the audio generation.
Thursday, September 8, 2016
Famciom vs. AV Famicom External - Internal Audio Mixing
There is a myth that the AV Famicom is too quiet when it mixes internal audio with external audio. The myth goes that the external cartridge audio drowns out the internal audio from the console and gives an unbalanced and unfair impression of what the programmer intended the music and sound effects to sound like. The conclusion is that an original Famicom, preferably an earlier model, is the ideal way to experience Famicom audio. However, this conclusion is too simplistic and the internal/external mix is not as extreme on standard Nintendo Famicoms and AV Famicoms as one may be led to believe.
Of course Famicom audio has its own problems. The first problem is that genuine Famicom audio is encoded into RF and decoded in a TV. The baseline audio has a buzz and the output of the audio sounds like it was run through an oppressive low-pass filter. The second problem is that playing a Famicom with its RF video and hardwired controllers is something of a chore.
I have made some recordings of several games which use Famicom expansion audio and internal Famicom audio. The games in question are :
Zelda no Densetsu (Famicom Disk System, The Legend of Zelda)
Akumajou Densetsu (Konami VRC6, Castlevania III: Dracula's Curse)
Of course Famicom audio has its own problems. The first problem is that genuine Famicom audio is encoded into RF and decoded in a TV. The baseline audio has a buzz and the output of the audio sounds like it was run through an oppressive low-pass filter. The second problem is that playing a Famicom with its RF video and hardwired controllers is something of a chore.
I have made some recordings of several games which use Famicom expansion audio and internal Famicom audio. The games in question are :
Zelda no Densetsu (Famicom Disk System, The Legend of Zelda)
Akumajou Densetsu (Konami VRC6, Castlevania III: Dracula's Curse)
Saturday, October 10, 2015
The Journey of the "PCjr./Tandy Sound Chip"
The TI SN 76496, what we today typically refer to as the PCjr./Tandy sound chip, is a long and varied one as it pertains to the IBM PC platform. Texas Instruments originally developed this simple music chip for use in its TI/99 4 computer, where it was called the TI TMS9919. Texas Instruments offered the core of this chip as the TI SN79426 and later the TI SN76489 as an off-the-shelf part. The TI SN76489 found its way into the Colecovision and the Coleco Adam computer as well as many arcade machines. Additionally, a clone of the chip is integrated into the Sega Master System and Sega Genesis and the Sega Game Gear.
The TI SN76489 can generate three square waves at different frequencies. The input clock is typically 3,579,545MHz. For the square wave channels, the input clock is divided by 32 by the chip and then by a 10-bit number in a register to obtain the output frequency for the square wave. The human ear can perceive sound waves in the range of 20KHz to 20Hz, but the lowest square wave tone the chip can produce at this input clock is about 109.24Hz.
The chip can also generate periodic or white noise for sound effects and percussion. The channel divides the clock rate by 64, 128 or 256 or uses the rate of square wave generator 3 which drives a linear feedback 15-bit shift register (1 bit is shifted every clock cycle) to produce a pseudo-random pattern of 1s and 0s at a high rate of frequency. The periodic noise option is output only once every 15 clock cycles compared to the white noise option.
The chip has eight registers, two for each square wave channel and two for the noise channel. Any write to the chip will select a register and send data to the chip. However, the frequency for each square wave channel is controlled by two registers, and if the register is not changed, the lower six bits of the frequency for a square wave channel can be updated quickly for frequency sweeps.
The chip uses a 4-bit number to attentuate the amplitude/volume of the each channel and then mixes all four channels into the single output pin on the chip.
Usage in the IBM PCjr.
The IBM PCjr. uses a discrete TI SN76496 (or TI SN76496A) at ZM26. The TI SN76496 is the same chip as the TI SN76489A except that it has an audio in pin on pin 9 to allow for an external audio source, like a speech synthesis chip, to be mixed into the chip for a combined output. The TI SN79494 has the audio input pin but only divides the input clock by 4 instead of 32, so it is not a drop in replacement.
IBM did not connect the audio in on pin 9 to anything in the PCjr. Instead, all sources of audio, the PC Speaker, the TI SN76496 and the audio output pins from the cassette connector and from the sidecar bus (used for the IBM PCjr. Speech Attachment) all go to a audio multiplexer chip called the MC14529. This chip will determine which of these four sources will be heard at the RCA audio jack, through the TV RF Modulator and through the IBM 4893 PCjr. Display. Note that the internal speaker in the PCjr. only outputs PC Speaker audio.
IBM assigned I/O ports C0-C7 to the chip in the PCjr., even though it only needs one port. The chip is write-only and cannot be reliably detected, the system it is part of is what gets detected.
Usage in the Tandy 1000A/HD
The Tandy 1000A/HD use a discrete TI SN76496 at U96. The first difference in the implementation from the PCjr. is that the audio input pin is used to mix in PC Speaker sound. This allows both the PC Speaker and SN76496 sound to be heard from the audio multiplexer chip. The second difference is that you can hear the SN76496 through the Tandy's internal speaker as well as through its RCA audio output. In fact, the audio selector chip is only connected to the RCA audio jack, so you will always hear the PC Speaker and SN76496 from the internal speaker, which is pretty large and loud.
Unfortunately, the default setting for the multiplexer chip will output only PC Speaker audio to the RCA jack. Some games, like LucasArts' SCUMM games, will not touch the multiplexer chip, leaving you with only the internal speaker for music and sound effects. You can avoid this by running a Sierra AGI game or finding a program that will let you set the multiplexer accordingly.
Usage in the Tandy 1000EX, SX, HX, TX
The Tandy 1000EX and 1000SX are similar to the earlier 1000s except now they are using NCR8496 clones of the TI SN76496 as well as the real TI SN76496s. It is a crapshoot as to which chip you will find in any given EX or SX. You can find the chip at U15 in the EX and U37A in the SX.
While the two chips work almost identically, there are two differences. First, the NCR chip requires a 2K resistor instead of a 2.7K resistor for mixing in the PC Speaker audio into pin 9. Second, the TI chip and the NCR chip behave slightly, but at times audibly differently when it comes to the noise channel. In the TI chip, any change to the noise control register will reset the shift register. In the NCR chip, this does not appear to happen. (This difference in behavior also appears to be true for the registers governing the square wave channels) The bits used for the feedback register are not the same for the TI and NCR chips.
The SX has a complex connection to the audio multiplexer chip and will require a write to hear the TI/NCR audio from the RCA jack. This machine has the same problem with the LucasArts' SCUMM games described above. See here for more details : http://nerdlypleasures.blogspot.com/2013/06/ibm-pcjr-and-tandy-1000-sound.html
The EX has a simplified connections to the audio multiplexer chip so that by default PC Speaker and TI audio will always be heard without needing to write to the audio multiplexer chip. The HX and TX give identical output options to the EX, except its highly likely that in these machines Tandy was exclusively using the NCR chips. In the HX, U19 contains the chip. In the TX, it's at U7.
While real TI SN 76496 chips can still be sourced from chip vendors, the NCR 8496 chips seem impossible to find, except in these Tandys.
Usage in the Tandy 1000 SL, SL/2, TL, TL/2, TL/3, RL, RL-HD
These machines embed the NCR version of the TI chip into a custom Tandy chip called the PSSJ (Parallel, Serial, Sound & Joystick). The PSSJ has acquired a DMA-fed, IRQ-driven DAC/ADC, which uses ports C4-C7. The DMA used is 1 and the IRQ used is 7, making it impossible to coexist with a Sound Blaster.
The audio multiplexer chip no longer exists in these machines.
The PSSJ chip has an option to allow an extra divisor bit (for an 11-bit divider) to be enabled for the TI/NCR chip, but it is unknown if this feature was ever used.
For some reason, the first note of Greensleeves in the opening of King's Quest I & II is not heard in these systems.
Usage in the Tandy 1000RLX & RLX-HD
The PSSJ chip in these machines is accessed identically to the other Tandy machines, but because these machines have VGA built-in instead of Tandy video, certain games will refuse to play audio through the chip. Electronic Arts games like Skate or Die and Kings of the Beach will not work with Tandy audio in these machines. AGI games with interpreter versions below 2.917 will show graphical glitches in the form of "trails" on these machines, but will still produce Tandy sound.
Usage in the Tandy 1000RSX & RSX-HD, 2500 and Sensation!
In addition to the VGA issue of the RLX, these systems are fully AT compatible. This required them to relocate the PSSJ audio to I/O 1E0-1E7. IBM decided when it made the IBM PC AT to put the second DMA controller at C0-DF. It did not appreciate or care that its PCjr. had its TI chip there as well. The IBM AT was a success and the PCjr. was not, so other companies followed IBM's lead. Hence Tandy had to relocate the chip.
The result of the relocation broke Tandy music compatibility with most games because they were expecting the chip to be at C0-C7. The TI chip was always programmed through direct register writes, neither IBM nor Tandy wrote BIOS routines to program the chip. A few later games, mostly from Sierra, have drivers that support these machines.
The chip's presence is not advertised on the Sensation!, which contains an Adlib Gold clone. It is there, but it sounds very muffled compared to the earlier computers.
Usage in the IBM PS/1 Model 2011 and 2121
IBM released the PS/1 Audio/Joystick Card as an upgrade for one of the proprietary sockets on the motherboards of these machines. The PS/1 line was introduced in 1990 with the Model 2011, which uses a 10MHz 286 CPU. The basic functionality of the TI chip is integrated into the Card, even though its musical capabilities were very unimpressive to everybody by this time. Adding ISA slots to these machines requires an external expansion box. It uses I/O address 205. It can use interrupts, namely IRQ7, but does not use DMA. Later the Model 2121 was released with support for the Card, it uses a 386SX @ 16MHz. None of the later PS/1s support the Card.
Interestingly, while the system board supplies a 10MHz Clock signal to the Card, the integrated TI chip is based off an 8MHz signal, which means the clock rate is stepped down somewhere on the Card. The 8MHz signal is divided by 64 and then by the 10-bit number. Therefore, if you put the maximum value of 1,024 into the square wave generator, you will end up with a square wave being output at 122.07Hz.
The PS/1 Audio Card has a problem then if fed with pure Tandy music data, it is running the same notes at 11.74% higher frequencies! Unfortunately, the Tandy is no master of the lower octaves, and IBM's version is even less capable of reaching the lower notes. The Game Blaster can get all the way down to 28Hz and has three times the channels.
Now this frequency difference can be accounted for the most part if the programmers write a driver that adjusts the speed of the music playback. However, this was not always done, as can be seen when running the special PS/1 version of Silpheed running on a real IBM PS/1.
Now for some audio comparisons :
Audio Comparison #1 - TI vs. NCR Noise Channel
IBM PCjr Maniac Mansion (low resolution version) :
Tandy 1000TL Maniac Mansion (low resolution version) :
Audio Comparison #2 - PCjr. Discrete Chip vs. Tandy Integrated Chip
IBM PCjr. King's Quest :
Tandy 1000TL King's Quest :
Audio Comparison #3 - Tandy vs. IBM PS/1
Tandy 1000 Prince of Persia (via DOSBox SVN)
IBM PS/1 Prince of Persia (via IBMulator 0.7)
The TI SN76489 can generate three square waves at different frequencies. The input clock is typically 3,579,545MHz. For the square wave channels, the input clock is divided by 32 by the chip and then by a 10-bit number in a register to obtain the output frequency for the square wave. The human ear can perceive sound waves in the range of 20KHz to 20Hz, but the lowest square wave tone the chip can produce at this input clock is about 109.24Hz.
The chip can also generate periodic or white noise for sound effects and percussion. The channel divides the clock rate by 64, 128 or 256 or uses the rate of square wave generator 3 which drives a linear feedback 15-bit shift register (1 bit is shifted every clock cycle) to produce a pseudo-random pattern of 1s and 0s at a high rate of frequency. The periodic noise option is output only once every 15 clock cycles compared to the white noise option.
The chip has eight registers, two for each square wave channel and two for the noise channel. Any write to the chip will select a register and send data to the chip. However, the frequency for each square wave channel is controlled by two registers, and if the register is not changed, the lower six bits of the frequency for a square wave channel can be updated quickly for frequency sweeps.
The chip uses a 4-bit number to attentuate the amplitude/volume of the each channel and then mixes all four channels into the single output pin on the chip.
Usage in the IBM PCjr.
The IBM PCjr. uses a discrete TI SN76496 (or TI SN76496A) at ZM26. The TI SN76496 is the same chip as the TI SN76489A except that it has an audio in pin on pin 9 to allow for an external audio source, like a speech synthesis chip, to be mixed into the chip for a combined output. The TI SN79494 has the audio input pin but only divides the input clock by 4 instead of 32, so it is not a drop in replacement.
IBM did not connect the audio in on pin 9 to anything in the PCjr. Instead, all sources of audio, the PC Speaker, the TI SN76496 and the audio output pins from the cassette connector and from the sidecar bus (used for the IBM PCjr. Speech Attachment) all go to a audio multiplexer chip called the MC14529. This chip will determine which of these four sources will be heard at the RCA audio jack, through the TV RF Modulator and through the IBM 4893 PCjr. Display. Note that the internal speaker in the PCjr. only outputs PC Speaker audio.
IBM assigned I/O ports C0-C7 to the chip in the PCjr., even though it only needs one port. The chip is write-only and cannot be reliably detected, the system it is part of is what gets detected.
Usage in the Tandy 1000A/HD
The Tandy 1000A/HD use a discrete TI SN76496 at U96. The first difference in the implementation from the PCjr. is that the audio input pin is used to mix in PC Speaker sound. This allows both the PC Speaker and SN76496 sound to be heard from the audio multiplexer chip. The second difference is that you can hear the SN76496 through the Tandy's internal speaker as well as through its RCA audio output. In fact, the audio selector chip is only connected to the RCA audio jack, so you will always hear the PC Speaker and SN76496 from the internal speaker, which is pretty large and loud.
Unfortunately, the default setting for the multiplexer chip will output only PC Speaker audio to the RCA jack. Some games, like LucasArts' SCUMM games, will not touch the multiplexer chip, leaving you with only the internal speaker for music and sound effects. You can avoid this by running a Sierra AGI game or finding a program that will let you set the multiplexer accordingly.
Usage in the Tandy 1000EX, SX, HX, TX
The Tandy 1000EX and 1000SX are similar to the earlier 1000s except now they are using NCR8496 clones of the TI SN76496 as well as the real TI SN76496s. It is a crapshoot as to which chip you will find in any given EX or SX. You can find the chip at U15 in the EX and U37A in the SX.
While the two chips work almost identically, there are two differences. First, the NCR chip requires a 2K resistor instead of a 2.7K resistor for mixing in the PC Speaker audio into pin 9. Second, the TI chip and the NCR chip behave slightly, but at times audibly differently when it comes to the noise channel. In the TI chip, any change to the noise control register will reset the shift register. In the NCR chip, this does not appear to happen. (This difference in behavior also appears to be true for the registers governing the square wave channels) The bits used for the feedback register are not the same for the TI and NCR chips.
The SX has a complex connection to the audio multiplexer chip and will require a write to hear the TI/NCR audio from the RCA jack. This machine has the same problem with the LucasArts' SCUMM games described above. See here for more details : http://nerdlypleasures.blogspot.com/2013/06/ibm-pcjr-and-tandy-1000-sound.html
The EX has a simplified connections to the audio multiplexer chip so that by default PC Speaker and TI audio will always be heard without needing to write to the audio multiplexer chip. The HX and TX give identical output options to the EX, except its highly likely that in these machines Tandy was exclusively using the NCR chips. In the HX, U19 contains the chip. In the TX, it's at U7.
While real TI SN 76496 chips can still be sourced from chip vendors, the NCR 8496 chips seem impossible to find, except in these Tandys.
Usage in the Tandy 1000 SL, SL/2, TL, TL/2, TL/3, RL, RL-HD
These machines embed the NCR version of the TI chip into a custom Tandy chip called the PSSJ (Parallel, Serial, Sound & Joystick). The PSSJ has acquired a DMA-fed, IRQ-driven DAC/ADC, which uses ports C4-C7. The DMA used is 1 and the IRQ used is 7, making it impossible to coexist with a Sound Blaster.
The audio multiplexer chip no longer exists in these machines.
The PSSJ chip has an option to allow an extra divisor bit (for an 11-bit divider) to be enabled for the TI/NCR chip, but it is unknown if this feature was ever used.
For some reason, the first note of Greensleeves in the opening of King's Quest I & II is not heard in these systems.
Usage in the Tandy 1000RLX & RLX-HD
The PSSJ chip in these machines is accessed identically to the other Tandy machines, but because these machines have VGA built-in instead of Tandy video, certain games will refuse to play audio through the chip. Electronic Arts games like Skate or Die and Kings of the Beach will not work with Tandy audio in these machines. AGI games with interpreter versions below 2.917 will show graphical glitches in the form of "trails" on these machines, but will still produce Tandy sound.
Usage in the Tandy 1000RSX & RSX-HD, 2500 and Sensation!
In addition to the VGA issue of the RLX, these systems are fully AT compatible. This required them to relocate the PSSJ audio to I/O 1E0-1E7. IBM decided when it made the IBM PC AT to put the second DMA controller at C0-DF. It did not appreciate or care that its PCjr. had its TI chip there as well. The IBM AT was a success and the PCjr. was not, so other companies followed IBM's lead. Hence Tandy had to relocate the chip.
The result of the relocation broke Tandy music compatibility with most games because they were expecting the chip to be at C0-C7. The TI chip was always programmed through direct register writes, neither IBM nor Tandy wrote BIOS routines to program the chip. A few later games, mostly from Sierra, have drivers that support these machines.
The chip's presence is not advertised on the Sensation!, which contains an Adlib Gold clone. It is there, but it sounds very muffled compared to the earlier computers.
Usage in the IBM PS/1 Model 2011 and 2121
IBM released the PS/1 Audio/Joystick Card as an upgrade for one of the proprietary sockets on the motherboards of these machines. The PS/1 line was introduced in 1990 with the Model 2011, which uses a 10MHz 286 CPU. The basic functionality of the TI chip is integrated into the Card, even though its musical capabilities were very unimpressive to everybody by this time. Adding ISA slots to these machines requires an external expansion box. It uses I/O address 205. It can use interrupts, namely IRQ7, but does not use DMA. Later the Model 2121 was released with support for the Card, it uses a 386SX @ 16MHz. None of the later PS/1s support the Card.
Interestingly, while the system board supplies a 10MHz Clock signal to the Card, the integrated TI chip is based off an 8MHz signal, which means the clock rate is stepped down somewhere on the Card. The 8MHz signal is divided by 64 and then by the 10-bit number. Therefore, if you put the maximum value of 1,024 into the square wave generator, you will end up with a square wave being output at 122.07Hz.
The PS/1 Audio Card has a problem then if fed with pure Tandy music data, it is running the same notes at 11.74% higher frequencies! Unfortunately, the Tandy is no master of the lower octaves, and IBM's version is even less capable of reaching the lower notes. The Game Blaster can get all the way down to 28Hz and has three times the channels.
Now this frequency difference can be accounted for the most part if the programmers write a driver that adjusts the speed of the music playback. However, this was not always done, as can be seen when running the special PS/1 version of Silpheed running on a real IBM PS/1.
Now for some audio comparisons :
Audio Comparison #1 - TI vs. NCR Noise Channel
IBM PCjr Maniac Mansion (low resolution version) :
Tandy 1000TL Maniac Mansion (low resolution version) :
Audio Comparison #2 - PCjr. Discrete Chip vs. Tandy Integrated Chip
IBM PCjr. King's Quest :
Tandy 1000TL King's Quest :
Audio Comparison #3 - Tandy vs. IBM PS/1
Tandy 1000 Prince of Persia (via DOSBox SVN)
IBM PS/1 Prince of Persia (via IBMulator 0.7)
Wednesday, August 26, 2015
Famicom Expansion Audio Carts - Best Examples
During the Famicom's lifespan, 26 cartridge games were known to support expansion audio. The Famicom directed its audio to cartridge port and games that did not use expansion audio would simply loop it back to the RF modulator. The expansion audio that these 26 games would generate would intercept the internal audio and mix it with the expansion audio and send the combined signal to the RF modulator. In addition, 75 Famicom Disk System games (4 of them unlicensed) are also known to use expansion audio generated in the FDS RAM Adapter.
Here is a list of all Famicom games known to use Expansion Audio : http://wiki.nesdev.com/w/index.php/List_of_games_with_expansion_audio
In this post, I identify the most accessible games for English speakers using each expansion audio chip and describe what needs to be done to play it.
Sunsoft 5B
Gimmick! - The original cart alone can go for $200 easily, however, there is at least one other more common Famicom cart (Gremlins 2) with a Sunsoft 5B chip, but obtaining one is something of the luck of the draw. Additionally, one can make a donor NES cart with a Batman Return of the Joker and an AY-3-891x chip, or you can get a INL-ROM NES reproduction board with an AY chip on it.
Konami VRC-VII
Lagrange Point - This is the only game that uses the expansion sound capabilities found in this chip, which is exclusive to this game and Tiny Toons 2 Japanese version. Tiny Toons 2 does not have an SRAM chip, battery or any of the passive components to mix the audio, so it would be a large undertaking to get it to work in a NES cart. I am not sure whether the Largange Point board plus a pin converter would fit inside a NES cartridge shell because the game's board is very tall. You may need an external pin converter. Interest in this game has also increased substantially because of a full translation patch.
Nintendo MMC5
Just Breed - This is a large strategy RGB from Enix and one of the three games that use the expansion audio of the MMC5. Because of its translation patch, it is by far the most accessible of those games. The original cartridge can have its ROM replaced with a translated ROM burned onto an EPROM, some minor reworking will be required. Because it uses Nintendo's MMC5 board, this can work with a reproduction cart in a NES. The most suitable NES cart is Gemfire, but I suspect that any of the battery backed MMC5 boards will work with some minor reworking. Castlevania III and Laser Invasion will require the addition of an SRAM chip and a battery, not a beginner mod.
Konami VRC-VI
Akumajou Densetsu - This is the Japanese version of Castlevania III, and does not have so much Japanese text that it requires a ROM swap to enjoy it. The Famicom board is small enough to fit inside a NES cartridge shell with a converter without difficulty. Madara and Esper Dream 2, the other games that use the chip, do have translation patches.
Namcot 109/163
Rolling Thunder - Most Namcot 109/163 games with expansion sound are not very English friendly. This game is basically the NES Tengen version with better sound. Additionally, Namcot almost always used epoxy-bonded ROMs on their boards because they were cheap. Unfortunately, this makes replacing these ROMs with translated ROMs on EPROMs very, very difficult.
NEC µPD7755C/µPD7756C & Mitsubishi M50805
The NEC ADPCM Speech chip was found in Jaleco's Japanese baseball games, virtually all of which were ported to the NES in the Bases Loaded series. The chip stored and could play back voice samples on command. Grab any one of them, games like Moero!! Pro Yakyuu are as common as they get in Japan, but realize its only a novelty. Of course, the speech samples are in Japanese for the Famicom cartridge and English for Bases Loaded. The NES versions had more PRG-ROM space to store the samples in ROM instead of on a special chip and used the NES's internal PCM channel to play them. The Mitsubishi chip was found in Family Trainer 3: Aerobics Studio, which was similarly ported to the NES as Aerobics Studio. Roll out your Power Pad for that one.
Famicom Disk System
FDS RAM Adapter + FDSStick
Read my review of this product for reasons why you should get one : http://nerdlypleasures.blogspot.com/2015/07/the-fdsstick-compact-solution-to-your.html
See also my list here of games for the Famicom Disk System where I give instructions how to clean the saves, all are easily accessible to English speakers : http://nerdlypleasures.blogspot.com/2015/06/cleaning-saved-information-from-famicom.html
Finally, I have generated a list of all Famicom and Famicom Disk System games that use expansion audio and were ported to the cartridge format :
Here is a list of all Famicom games known to use Expansion Audio : http://wiki.nesdev.com/w/index.php/List_of_games_with_expansion_audio
In this post, I identify the most accessible games for English speakers using each expansion audio chip and describe what needs to be done to play it.
Sunsoft 5B
Gimmick! - The original cart alone can go for $200 easily, however, there is at least one other more common Famicom cart (Gremlins 2) with a Sunsoft 5B chip, but obtaining one is something of the luck of the draw. Additionally, one can make a donor NES cart with a Batman Return of the Joker and an AY-3-891x chip, or you can get a INL-ROM NES reproduction board with an AY chip on it.
Konami VRC-VII
Lagrange Point - This is the only game that uses the expansion sound capabilities found in this chip, which is exclusive to this game and Tiny Toons 2 Japanese version. Tiny Toons 2 does not have an SRAM chip, battery or any of the passive components to mix the audio, so it would be a large undertaking to get it to work in a NES cart. I am not sure whether the Largange Point board plus a pin converter would fit inside a NES cartridge shell because the game's board is very tall. You may need an external pin converter. Interest in this game has also increased substantially because of a full translation patch.
Nintendo MMC5
Just Breed - This is a large strategy RGB from Enix and one of the three games that use the expansion audio of the MMC5. Because of its translation patch, it is by far the most accessible of those games. The original cartridge can have its ROM replaced with a translated ROM burned onto an EPROM, some minor reworking will be required. Because it uses Nintendo's MMC5 board, this can work with a reproduction cart in a NES. The most suitable NES cart is Gemfire, but I suspect that any of the battery backed MMC5 boards will work with some minor reworking. Castlevania III and Laser Invasion will require the addition of an SRAM chip and a battery, not a beginner mod.
Konami VRC-VI
Akumajou Densetsu - This is the Japanese version of Castlevania III, and does not have so much Japanese text that it requires a ROM swap to enjoy it. The Famicom board is small enough to fit inside a NES cartridge shell with a converter without difficulty. Madara and Esper Dream 2, the other games that use the chip, do have translation patches.
Namcot 109/163
Rolling Thunder - Most Namcot 109/163 games with expansion sound are not very English friendly. This game is basically the NES Tengen version with better sound. Additionally, Namcot almost always used epoxy-bonded ROMs on their boards because they were cheap. Unfortunately, this makes replacing these ROMs with translated ROMs on EPROMs very, very difficult.
NEC µPD7755C/µPD7756C & Mitsubishi M50805
The NEC ADPCM Speech chip was found in Jaleco's Japanese baseball games, virtually all of which were ported to the NES in the Bases Loaded series. The chip stored and could play back voice samples on command. Grab any one of them, games like Moero!! Pro Yakyuu are as common as they get in Japan, but realize its only a novelty. Of course, the speech samples are in Japanese for the Famicom cartridge and English for Bases Loaded. The NES versions had more PRG-ROM space to store the samples in ROM instead of on a special chip and used the NES's internal PCM channel to play them. The Mitsubishi chip was found in Family Trainer 3: Aerobics Studio, which was similarly ported to the NES as Aerobics Studio. Roll out your Power Pad for that one.
Famicom Disk System
FDS RAM Adapter + FDSStick
Read my review of this product for reasons why you should get one : http://nerdlypleasures.blogspot.com/2015/07/the-fdsstick-compact-solution-to-your.html
See also my list here of games for the Famicom Disk System where I give instructions how to clean the saves, all are easily accessible to English speakers : http://nerdlypleasures.blogspot.com/2015/06/cleaning-saved-information-from-famicom.html
Finally, I have generated a list of all Famicom and Famicom Disk System games that use expansion audio and were ported to the cartridge format :
| Japanese Name | Expansion Sound Type | US Name |
| Gimmick! | Sunsoft 5B | Mr. Gimmick! (Europe/Scandanavia Release, US Proto) |
| Moe Pro! '90: Kandou-hen | D7756 | Bases Loaded 3, Ryne Sandberg Plays |
| Moe Pro!: Saikyou-hen | D7756 | Bases Loaded 4 |
| Moero!! Pro Tennis | D7756 | Rad Racket |
| Moero!! Pro Yakyuu | D7756 | Bases Loaded |
| Moero!! Pro Yakyuu '88: Kettei Ban | D7756 | Bases Loaded 2: The Second Season |
| Bio Miracle Bokutte Upa | Famicom Disk System | None (Japan Cartridge Release Only) |
| Doki Doki Panic | Famicom Disk System | Super Mario Bros. 2 (also Japan) |
| Dracula 2 - Noroi no Fuuin | Famicom Disk System | Castlevania II: Simon’s Quest |
| Egger Land | Famicom Disk System | The Adventures of Lolo (different levels) |
| Exciting Baseball | Famicom Disk System | Double Dribble |
| Famicom Golf - Japan Course | Famicom Disk System | Golf (different courses) |
| Famicom Golf - Japan Course Prize Card | Famicom Disk System | NES Open Tournament Golf |
| Famicom Golf - US Course | Famicom Disk System | Golf (different courses) |
| Famicom Golf - US Course Prize Card | Famicom Disk System | NES Open Tournament Golf |
| Gyruss | Famicom Disk System | Gyruss |
| Hao-kun no Fushigi na Tabi | Famicom Disk System | Mystery Quest |
| Hikari Shinwa: Parutena no Kagami | Famicom Disk System | Kid Icarus |
| Kaettekita Mario Bros. | Famicom Disk System | Mario Bros. |
| Link no Bouken: The Legend of Zelda 2 | Famicom Disk System | Zelda II: The Adventure of Link |
| Metroid | Famicom Disk System | Metroid |
| Tobidase Daisakusen | Famicom Disk System | The 3-D Battles of the Worldrunner |
| Vs. Excitebike | Famicom Disk System | Excitebike |
| Zelda no Densetsu (Zelda) | Famicom Disk System | The Legend of Zelda (also Japan) |
| Family Trainer 3: Aerobics Studio | M50805 | Dance Aerobics |
| Rolling Thunder | Namco 163 | Rolling Thunder (Unlicensed Tengen Release) |
| Akumajou Densetsu | Konami VRC6 | Castlevania III: Dracula’s Curse |
Tuesday, February 24, 2015
Digital OPL2 and OPL3 Recording
The Yamaha YM-3812 OPL2 chip, used on the Ad Lib Music Feature Card and the early Sound Blasters and their clones, is fairly unique among computer and video game music chips because the output of the chip is still digital. That output is intended to be fed into a YM-3014 DAC, then sent to the pre-amplifier (for line output to powered speakers) and amplifier (for amplified output to passive speakers and headphones). This makes it possible to capture digital audio from the card. Its successors, the YMF-262 OPL3 and its Yamaha descendants (YMF-278 OPL4, YMF-289B OPL3-L, YMF-7xx DS-1, CT-1747) also output digital data which is fed through a Yamaha DAC. There have been several devices which can output some form of the digitized sound generated by an OPL2 or OPL3 chip.
Adlib Digi-Snap
The original PC compatible implementation of the OPL2 chip, the Ad Lib MSC, was not designed to provide the user with digital output. However, the OPL2 and the DAC were discrete components, so by removing the DAC the data from the OPL2 could be captured. This is what the Digi-Snap device does. It requires the DAC, an 8-pin chip, to be removed and a small ribbon cable soldered or socketed in its place. The other end of that ribbon cable connects to a parallel port in a second computer. The digital data from the OPL2 chip can be read off the parallel port using a special program. You can piggyback the DAC chip on top of the cable going out of the computer to retain the ability to hear the sound you are trying to record.
The YM-3812 OPL2 chip outputs a 16-bit serial monaural digital signal at a sample rate of 49,716Hz. This odd sample rate is based on the input clock, 3,579,545Hz (a.k.a. the NTSC color burst frequency). Essentially this signal is divided by 72 to get the sample rate.
The Digi-Snap requires an Enhanced Parallel Port (EPP) set to I/O 278 and IRQ5, MS-DOS in the recording PC. The software requires 32MB of RAM (which should indicate the speed of the PC you should be using, a Pentium) and will record nine minutes of sound before overwriting the oldest data. The resulting data is in a raw, signed 16-bit data format. You will need to tell any playback software like Audacity the bit depth (16-bit signed), sampling rate (49,716) and number of channels (one/mono) to be used. Audacity can easily convert RAW files to WAV files without any loss in quality, since both are uncompressed formats.
While I cannot recall ever seeing a true Ad Lib card with a socketed DAC, many Sound Blaster 1.0, 1.5, 2.0 and Pro 1.0s have socketed OPL2 and DAC chips. Whatever differences there may be in their analog outputs, for the Digi-Snap's purpose, they will sound exactly the same (unless a game detects a Sound Blaster and uses its digitized audio output capabilities).
The sole limitation to the Digi-Snap is that it only works on OPL2 chips. In theory it could be adapted to the YMF-262 OPL3 chip and its DAC, the YAC-512. However, the YAC-512 is surface mounted instead of a through-hole chip like the YM-3014. This makes it much more difficult to solder wires to it. Also, the YMF-262 in its OPL3 mode acts like two OPL2 chips, so the amount of data that would be stored would be cut in half. Finally, there are enough differences between the two DAC chips that the design may have to be changed.
There is no reason why the Digi-Snap could not be used with a Sound Blaster Pro 1.0 or a Pro Audio Spectrum. Both have two OPL2 chips and two DACs and function completely independently in stereo mode. You would need a second Digi-Snap board and a third PC to use them. Essentially, each PC would record one of the OPL2 chip's outputs and you could recombine them in your audio editing program. Synchronization may be an issue, however.
The instructions for building the Digi-Snap and the software for it can be found here.
Sound Blaster AWE32
The AWE32 was the first device that provided official support for obtaining digital output from an OPL chip. The early AWE32s have a CT-1747 bus interface chip. This chip contains a YMF-262 core. An YMF-262 or CT-1747 OPL3 has a 14,318,180Hz master clock and divides this by 288 to obtain the same sample rate, 49,716Hz, as the OPL2.
The Sound Blaster AWE32 and Sound Blaster 32 cards which have a YMF-262, YMF-289 or a CT-1978 do not support OPL through their SPDIF connectors. Instead they have discrete DAC chips that only go to the analog outputs.
CT-1978 is Creative Lab's clone/improvement that uses Creative Quadrature Modulation Synthesis (CQM) instead of Yamaha Frequency Modulation (FM) Synthesis of the OPL line to approximate the OPL2 and OPL3. CQM usually is pretty close to the original, but common opinion is that it can sound harsher compared to FM synthesis. If a card is marked as an AWE32 or SB32 and either has a CT-1978 or does not have a CT-1747 or YMF chip, then it will have CQM. CQM was integrated into larger chips on Creative's later cards.
Unlike the Sound Blaster 16s with the CT-1747 bus interface chip, the AWE32s, including the "value" cards without SIMM sockets, have a 2-pin Sony/Phillips Digital Interface Feature (SPDIF) header. SPDIF signals come in three main varieties. First is the signal that the AWE32 and CD-ROM drives with a 2-pin digital out header and Sound Blaster Live! cards with a digital output mini-jack have, a +5v TTL signal. Second is an optical signal, which converts a +5v TTL signal into digitized optical signal through the use of a TOSLINK transmitter. The TOSLINK transmitters are those black, boxy SPDIF ports. The signal is turned back into a +5v TTL signal by a TOSLINK receiver. Third are coaxial SPDIF connectors, they use RCA connectors but use a 1v Peak to Peak signal.
There are two ways to make the SPDIF connector on an AWE32 useful. First, you can connect the 2-pin header from an AWE32 to a 2-pin header on a sound card with a CD/SPDIF digital in. Most Sound Blaster Live! and Audigy cards have this header on their boards or have it on their feature connectors. The second is to use an I/O bracket with an optical connector on it. You may need to fiddle with the wiring a bit, just remember that the O pin on the AWE32 is the digital output signal and the I pin is the ground.
In the YMF-289B OPL3-L and YMF-278 OPL4, these chips are fed by a 33,868,800Hz clock. In this case, instead of a single divider like the OPL2 and OPL3, two different dividers are used. One divider, for the waveform/phase/envelope/timer, uses a 684 divider to get a very close approximation of the 49.716Hz signal. This ensures that the same data can be used for an OPL3 or OPL3-L chip and the user can expect it to sound the same. Any differences in frequencies between the two chips would produce negligible error. The output sample rate uses a 768 divider to obtain a 44,100Hz output rate. In a sense, this may lead to a coarser output, but human ears cannot tell the difference between a sample played back at 44,1000Hz and 49,716Hz. The benefit to Yamaha and the companies that produced sound cards meant that one less clock crystal was needed.
Sound Blaster AWE64 Gold
The AWE64 Gold uses the same 2-pin header as an AWE32 for its SPDIF output, but this connector will connect to a standard coaxial I/O bracket. It uses 1v Peak to Peak signaling, making it slightly more convenient than the AWE32. However, the AWE64 Gold also provides the digitized audio from the Sound Blaster, but this is limited to Windows and may only work when the Windows drivers are invoked, something no DOS program would do.
Non-Gold AWE64s often have solder pads for the header, but they would only provide a +5v TTL signal and would not include the digitized Sound Blaster audio. All AWE64s use CQM.
Yamaha YMF-7x4 Cards
Yamaha supplied low cost YMF-71x chips for OEMs to use for cheap ISA sound cards. These chips included everything an ISA sound card typically needed, including a true OPL3 core, Sound Blaster Pro 2.0 and Windows Sound System compatibility, a gameport and and a UART compatible MPU-401 interface. Later, the Yamaha WF-192 Waveforce was among the first PCI sound cards, and it used the Yamaha YMF-724 chip. This chip replaced WSS compatibility with a cut-down XG MIDI synthesizer core. The The YMF-744 was a similar PCI chip that supported 4-channel analog audio output for surround sound and DirectSound 3D. As these cards are based off a YMF-289 core and use the same 33,868,800Hz clock and they would output to the same sample rate.
Some YMF-7x4 cards have a coaxial or optical digital output. The digital output can be used for anything generated by the chip, including OPL2 and OPL3 music. It can also be used for Dolby Digital AC-3 passthrough. The digital SPDIF output has a fixed sample rate of 48,000Hz and the only clock crystal on these cards is 24,576,000Hz. However, it appears from the YMF-724 datasheet that the OPL3 core is still using the 44,100Hz sampling frequency because there is a digital phase locked loop in the chip that converts the 24,576,000Hz master clock to 33,868,800Hz. This would square with the claim that the OPL3 core in these chips is register compatible with the YMF-289B. While it is beyond question that the OPL sample rate has been converted from 44,100 to 48,000 when output via the SPDIF connector, it is unknown whether the same is true for the analog output but it probably is when mixed with samples from other sources.
Samples
All other consumer PCI sound cards of the late 1990s, most of them adhering to the AC'97 specifications, also sample all input at 48,000Hz. Unfortunately, the Sound Blaster Live! and Audigy cards have a poor reputation when it comes to their resampling. But is it deserved? I have an Sound Blaster AWE32 CT2760 and a Sound Blaster Live! CT4760. On one PC, I played Wolfenstein 3D and DOOM with the AWE32. I ran a 2-pin cable from the AWE32's SPDIF out to the CD Digital Input on the Sound Blaster Live!, which was installed in a second PC. The second PC recorded the digital input through an old version of Audacity (1.2.6) running on Windows 98SE. Here are the results :
DOOM Episode 1, Mission 1 :
Wolfenstein 3D Episode 1, Mission 1 :
Conclusion
There is no such thing as a perfect digital recording from an OPL2 or OPL3 chip. The 49,716Hz frequency is odd and except for the Digi-Snap device, is not something you are going to record digitally. Even so, nothing but an OPL chip is likely to output at that frequency. The typical ideal will be a 44,100 frequency, but most recording devices will resample this to 48,000Hz. (DOSBox supports the 49,716 frequency to improve the OPL emulation, but your system will resample it). Ultimately, all audio is analog, and the methods discussed in my previous post, about capturing the data writes to the OPL chips should, if nothing else, make your file sizes smaller.
Adlib Digi-Snap
The original PC compatible implementation of the OPL2 chip, the Ad Lib MSC, was not designed to provide the user with digital output. However, the OPL2 and the DAC were discrete components, so by removing the DAC the data from the OPL2 could be captured. This is what the Digi-Snap device does. It requires the DAC, an 8-pin chip, to be removed and a small ribbon cable soldered or socketed in its place. The other end of that ribbon cable connects to a parallel port in a second computer. The digital data from the OPL2 chip can be read off the parallel port using a special program. You can piggyback the DAC chip on top of the cable going out of the computer to retain the ability to hear the sound you are trying to record.
The YM-3812 OPL2 chip outputs a 16-bit serial monaural digital signal at a sample rate of 49,716Hz. This odd sample rate is based on the input clock, 3,579,545Hz (a.k.a. the NTSC color burst frequency). Essentially this signal is divided by 72 to get the sample rate.
The Digi-Snap requires an Enhanced Parallel Port (EPP) set to I/O 278 and IRQ5, MS-DOS in the recording PC. The software requires 32MB of RAM (which should indicate the speed of the PC you should be using, a Pentium) and will record nine minutes of sound before overwriting the oldest data. The resulting data is in a raw, signed 16-bit data format. You will need to tell any playback software like Audacity the bit depth (16-bit signed), sampling rate (49,716) and number of channels (one/mono) to be used. Audacity can easily convert RAW files to WAV files without any loss in quality, since both are uncompressed formats.
While I cannot recall ever seeing a true Ad Lib card with a socketed DAC, many Sound Blaster 1.0, 1.5, 2.0 and Pro 1.0s have socketed OPL2 and DAC chips. Whatever differences there may be in their analog outputs, for the Digi-Snap's purpose, they will sound exactly the same (unless a game detects a Sound Blaster and uses its digitized audio output capabilities).
The sole limitation to the Digi-Snap is that it only works on OPL2 chips. In theory it could be adapted to the YMF-262 OPL3 chip and its DAC, the YAC-512. However, the YAC-512 is surface mounted instead of a through-hole chip like the YM-3014. This makes it much more difficult to solder wires to it. Also, the YMF-262 in its OPL3 mode acts like two OPL2 chips, so the amount of data that would be stored would be cut in half. Finally, there are enough differences between the two DAC chips that the design may have to be changed.
There is no reason why the Digi-Snap could not be used with a Sound Blaster Pro 1.0 or a Pro Audio Spectrum. Both have two OPL2 chips and two DACs and function completely independently in stereo mode. You would need a second Digi-Snap board and a third PC to use them. Essentially, each PC would record one of the OPL2 chip's outputs and you could recombine them in your audio editing program. Synchronization may be an issue, however.
The instructions for building the Digi-Snap and the software for it can be found here.
Sound Blaster AWE32
The AWE32 was the first device that provided official support for obtaining digital output from an OPL chip. The early AWE32s have a CT-1747 bus interface chip. This chip contains a YMF-262 core. An YMF-262 or CT-1747 OPL3 has a 14,318,180Hz master clock and divides this by 288 to obtain the same sample rate, 49,716Hz, as the OPL2.
The Sound Blaster AWE32 and Sound Blaster 32 cards which have a YMF-262, YMF-289 or a CT-1978 do not support OPL through their SPDIF connectors. Instead they have discrete DAC chips that only go to the analog outputs.
CT-1978 is Creative Lab's clone/improvement that uses Creative Quadrature Modulation Synthesis (CQM) instead of Yamaha Frequency Modulation (FM) Synthesis of the OPL line to approximate the OPL2 and OPL3. CQM usually is pretty close to the original, but common opinion is that it can sound harsher compared to FM synthesis. If a card is marked as an AWE32 or SB32 and either has a CT-1978 or does not have a CT-1747 or YMF chip, then it will have CQM. CQM was integrated into larger chips on Creative's later cards.
Unlike the Sound Blaster 16s with the CT-1747 bus interface chip, the AWE32s, including the "value" cards without SIMM sockets, have a 2-pin Sony/Phillips Digital Interface Feature (SPDIF) header. SPDIF signals come in three main varieties. First is the signal that the AWE32 and CD-ROM drives with a 2-pin digital out header and Sound Blaster Live! cards with a digital output mini-jack have, a +5v TTL signal. Second is an optical signal, which converts a +5v TTL signal into digitized optical signal through the use of a TOSLINK transmitter. The TOSLINK transmitters are those black, boxy SPDIF ports. The signal is turned back into a +5v TTL signal by a TOSLINK receiver. Third are coaxial SPDIF connectors, they use RCA connectors but use a 1v Peak to Peak signal.
There are two ways to make the SPDIF connector on an AWE32 useful. First, you can connect the 2-pin header from an AWE32 to a 2-pin header on a sound card with a CD/SPDIF digital in. Most Sound Blaster Live! and Audigy cards have this header on their boards or have it on their feature connectors. The second is to use an I/O bracket with an optical connector on it. You may need to fiddle with the wiring a bit, just remember that the O pin on the AWE32 is the digital output signal and the I pin is the ground.
In the YMF-289B OPL3-L and YMF-278 OPL4, these chips are fed by a 33,868,800Hz clock. In this case, instead of a single divider like the OPL2 and OPL3, two different dividers are used. One divider, for the waveform/phase/envelope/timer, uses a 684 divider to get a very close approximation of the 49.716Hz signal. This ensures that the same data can be used for an OPL3 or OPL3-L chip and the user can expect it to sound the same. Any differences in frequencies between the two chips would produce negligible error. The output sample rate uses a 768 divider to obtain a 44,100Hz output rate. In a sense, this may lead to a coarser output, but human ears cannot tell the difference between a sample played back at 44,1000Hz and 49,716Hz. The benefit to Yamaha and the companies that produced sound cards meant that one less clock crystal was needed.
Sound Blaster AWE64 Gold
The AWE64 Gold uses the same 2-pin header as an AWE32 for its SPDIF output, but this connector will connect to a standard coaxial I/O bracket. It uses 1v Peak to Peak signaling, making it slightly more convenient than the AWE32. However, the AWE64 Gold also provides the digitized audio from the Sound Blaster, but this is limited to Windows and may only work when the Windows drivers are invoked, something no DOS program would do.
Non-Gold AWE64s often have solder pads for the header, but they would only provide a +5v TTL signal and would not include the digitized Sound Blaster audio. All AWE64s use CQM.
Yamaha YMF-7x4 Cards
Yamaha supplied low cost YMF-71x chips for OEMs to use for cheap ISA sound cards. These chips included everything an ISA sound card typically needed, including a true OPL3 core, Sound Blaster Pro 2.0 and Windows Sound System compatibility, a gameport and and a UART compatible MPU-401 interface. Later, the Yamaha WF-192 Waveforce was among the first PCI sound cards, and it used the Yamaha YMF-724 chip. This chip replaced WSS compatibility with a cut-down XG MIDI synthesizer core. The The YMF-744 was a similar PCI chip that supported 4-channel analog audio output for surround sound and DirectSound 3D. As these cards are based off a YMF-289 core and use the same 33,868,800Hz clock and they would output to the same sample rate.
Some YMF-7x4 cards have a coaxial or optical digital output. The digital output can be used for anything generated by the chip, including OPL2 and OPL3 music. It can also be used for Dolby Digital AC-3 passthrough. The digital SPDIF output has a fixed sample rate of 48,000Hz and the only clock crystal on these cards is 24,576,000Hz. However, it appears from the YMF-724 datasheet that the OPL3 core is still using the 44,100Hz sampling frequency because there is a digital phase locked loop in the chip that converts the 24,576,000Hz master clock to 33,868,800Hz. This would square with the claim that the OPL3 core in these chips is register compatible with the YMF-289B. While it is beyond question that the OPL sample rate has been converted from 44,100 to 48,000 when output via the SPDIF connector, it is unknown whether the same is true for the analog output but it probably is when mixed with samples from other sources.
Samples
All other consumer PCI sound cards of the late 1990s, most of them adhering to the AC'97 specifications, also sample all input at 48,000Hz. Unfortunately, the Sound Blaster Live! and Audigy cards have a poor reputation when it comes to their resampling. But is it deserved? I have an Sound Blaster AWE32 CT2760 and a Sound Blaster Live! CT4760. On one PC, I played Wolfenstein 3D and DOOM with the AWE32. I ran a 2-pin cable from the AWE32's SPDIF out to the CD Digital Input on the Sound Blaster Live!, which was installed in a second PC. The second PC recorded the digital input through an old version of Audacity (1.2.6) running on Windows 98SE. Here are the results :
DOOM Episode 1, Mission 1 :
Wolfenstein 3D Episode 1, Mission 1 :
Conclusion
There is no such thing as a perfect digital recording from an OPL2 or OPL3 chip. The 49,716Hz frequency is odd and except for the Digi-Snap device, is not something you are going to record digitally. Even so, nothing but an OPL chip is likely to output at that frequency. The typical ideal will be a 44,100 frequency, but most recording devices will resample this to 48,000Hz. (DOSBox supports the 49,716 frequency to improve the OPL emulation, but your system will resample it). Ultimately, all audio is analog, and the methods discussed in my previous post, about capturing the data writes to the OPL chips should, if nothing else, make your file sizes smaller.
Monday, February 16, 2015
Will Harvey's Music Construction Set - PC Sound Device Support
In 1984 Electronic Arts introduced a program called Music Construction Set. It was originally written by 15 year old Will Harvey for his Apple II computer. Electronic Arts liked what it saw and published it to great success. It also ported the program to every popular U.S. computer with any kind of sound hardware, the Atari 8-bit machines, the Commodore 64, the Atari ST, the Apple IIgs and the IBM PC. An upgraded version called Deluxe Music Construction Set was released for the Macintosh and Amiga. Each version would take advantage of the native sound capabilities of the hardware.
Unfortunately, the Apple II and the IBM PC's hardware was unimpressive compared to the other machines. They only have a speaker. The Apple II's CPU must directly drive the speaker, so there was no CPU time left over for scrolling the screen on the Apple II version using the built-in speaker. The IBM PC's speaker was timer driven, so it could still scroll the screen using the 1-note speaker option.
Fortunately, both the Apple II and the IBM PC supported alternatives. The Apple II version supported a Mockingboard card for six voices of stereo sound. Using the timer-supplied Mockingboard allowed the CPU to scroll the note sheet. The IBM PC versions are much more interesting from a hardware perspective.
Original Release
The original release for the PC supported the IBM PC, XT and PCjr. and "COMPAQ" Because it calibrated itself for CPU speed, it would also work in faster machines like the IBM AT., although the loading time may be increased as a result. This program was a PC booter, and the version widely available also has Tandy 1000 support. Tandy marketed Music Construction Set, so this version may have originally have been from Tandy.
Interestingly, the program does detect the machine it is being used in on startup and will adjust its configuration options accordingly.
On the Tandy 1000, here are the options :
Input - Keyboard; Joystick (Right Port)
Sound - 3 Notes, Scroll; Speaker - 1 Note, Scroll
Printer - Tandy Graphics Printer (IBM Mode), Epson Graphics Printer, Okidata Graphics Printer, No Printer
On the IBM PCjr., here are the options :
Input - Keyboard, Koala Pad, Joystick
Sound - PCjr - 3 Notes, Scroll; Cassette - 4 Notes, Speaker - 1 Note, Scroll
Printer - IBM Graphics Printer, Epson Graphics Printer, Okidata Graphics Printer, No Printer
On the IBM PC, here are the options :
Input - Keyboard, Koala Pad, Joystick
Sound - Speaker, 4 Notes; Cassette - 4 Notes; Speaker - 1 Note, Scroll; Cassette - 1 Note, Scroll
Printer - IBM Graphics Printer, Epson Graphics Printer, Okidata Graphics Printer, No Printer
I do not own a Koala Pad, but it uses the joystick port. It probably would have been the smoothest way to control the icon-based interface of MCS. Because of the special characters, a character-based printer would not work to print Treble and Bass clefs and musical notes, so a Graphics Printer was required. Interestingly, I find no mention of the PCjr. Compact Printer in the PCjr.'s options, but if there is no parallel port sidecar, it may work as it would designated as LPT1. The Compact Printer does support bitmap modes like the listed Graphics Printers. A list of the printers it has been tested with can be found in the Reference Card. Music is printed vertically down the printer page, rather than horizontally as one would expect sheet music to print.
The 4 Notes selections used up all the available CPU time, so the music did not scroll when played with these modes. For the PCjr and Tandy, the 3 note option, using the built-in sound chip, was obviously the way to go. I do not know why they even bothered with the cassette option for the PCjr., a person with a cassette player could record the 3-voice music just as easily. I do not know if the cassette option is still selectable on an IBM PC/XT, which does not have a cassette port and can be uniquely identified. Most generic PC compatibles identify themselves as an IBM PC, so the cassette option is still there although it will not work.
Despite being deemed a PC booter, MCS is tied very much to DOS. The disk is readable in DOS, but only the song files will be seen. When loading and saving songs, a DOS prompt is used and the commands are very DOS and BASIC like. A standard DOS formatted disk can save and load more songs. Oddly, the
loading screen uses a 40-column mode, probably for the PCjr. Full instructions for use in the PC can be found in the Reference Card. The manual and reference card for the IBM PC version can be found at replacementdocs.com. Listings for the sample songs can also be found in the reference card.
IBM Music Feature Card Version
In 1987, Electronic Arts released a revised version of Music Construction Set for the IBM Music Feature Card. I was able to find a download of this program. This version of MCS is a true DOS program, although presumably still protected. If you load a mouse driver beforehand (CTMOUSE.EXE 1.91 works, make sure your COM1 settings are standard 3F8/04), you can use a Microsoft protocol-compatible mouse to control the cursor. The movement is still a bit rough and only supports one button, but better than a joystick. Using the keyboard will allow for fine placement of notes. PCjr. support was removed, but the program still works on an IMFC-less PC and a Tandy 1000.
The IBM Music Feature and mouse are autodetected, but if one or the other is not present, you still have some options. On the IBM PC, the sound options are Speaker - 1 Note, Scroll; Cassette - 1 Note, Scroll. On the Tandy 1000, the options are the same as they were for the non-IMFC version. Koala Pad support is not present, but joysticks are still supported.
The loading screen for the IMFC version is now using 80-columns and has a text based cursor select system. It was very forward thinking for EA to provide a command list on the screen. Also, if the settings button (the plug) is clicked after the program starts, a menu displays that allows you to select the instruments to be used from the 240 voice patches available on the IMFC. The program does not appear to supply custom voice patches, even though the IMFC has room for 96 of them. When you play back a song, it will show one of the voice patches assigned to the treble and bass clefs.
The Setup Screen allows to choose up to 13 voices for customization. You can customize each instrument from the IMFC by the following :
Pan : L, L+R, R
Portamento : Off, Slow, Med., Fast
Vibrato : Off, On
Octave : -2, -1, 0, 1, 2
While you can only use two instruments at a time for playback, the SO sliders allow you to select one instrument for each stave on the Music Screen. On a PCjr. or Tandy, the SO sliders had 13 steps which determined the character of the sound for each stave. With the IMFC, the name of the instrument will change if you raise or lower the respective SO slider. The VO slider does the same for the volume of the stave on either the PCjr., Tandy or IMFC. Because DOSBox does not support the IMFC, I cannot post a screenshot of the Setup Screen. Unfortunately, the instruments selected cannot be changed during the song, but this is a handy way of quickly trying out new instruments.
Most of the songs found on the original version can be found on the IMFC version, but weirdly Daisy and the Canon in D Major are not present. The modern songs are not present, but there are several other songs, such as Dixie, Yankee Doodle Dandy and the first few bars of M.U.L.E.'s theme song. Mystery, Buggy, Rhythm and Scales are present. Songs from either version will not necessarily sound the same as the song on the other version on the same hardware.
Why no further versions?
MCS had always tried to provide broad sound support, and this version for the IMFC was the first and last time the program was updated to support a PC sound peripheral. Electronic Arts did not attempt to release a version for the Adlib. In 1987, IBM was still considered a sure thing and Adlib was barely known. The IMFC filled a niche with the IMFC by providing a basic, easy to use music program. This program was especially useful to younger people. However, considering the rarity of both the IMFC and this version, it was no great seller and EA probably lost money on the conversion. By the end of 1988, when an Adlib version would have been feasible, MCS was looking a bit long in the tooth. Adlib also had its Visual Composer software that took many cues from MCS. EA itself was transitioning from a publisher-assisted producer to a fully-fledged game studio. The end result was that this was the end of the venerable MCS.
Sound Samples
All captured from real hardware. No post-processing of any sort has been done (that I know of), so you may want to turn the volume up for the Tandy recordings. For the PC Speaker recordings, I used my cassette cable to capture the equivalent of what would be heard through the speaker. I used a Tandy 1000SX for the Tandy recordings and used my IMFC in my IBM PC.
IBM PC Speaker/Cassette 1-Note Original
IBM PC Speaker/Cassette 4-Note
PCjr./Tandy 3-Note Original Version
PCjr./Tandy 3-Note IMFC Version
IBM Music Feature Card
Unfortunately, the Apple II and the IBM PC's hardware was unimpressive compared to the other machines. They only have a speaker. The Apple II's CPU must directly drive the speaker, so there was no CPU time left over for scrolling the screen on the Apple II version using the built-in speaker. The IBM PC's speaker was timer driven, so it could still scroll the screen using the 1-note speaker option.
Fortunately, both the Apple II and the IBM PC supported alternatives. The Apple II version supported a Mockingboard card for six voices of stereo sound. Using the timer-supplied Mockingboard allowed the CPU to scroll the note sheet. The IBM PC versions are much more interesting from a hardware perspective.
Original Release
The original release for the PC supported the IBM PC, XT and PCjr. and "COMPAQ" Because it calibrated itself for CPU speed, it would also work in faster machines like the IBM AT., although the loading time may be increased as a result. This program was a PC booter, and the version widely available also has Tandy 1000 support. Tandy marketed Music Construction Set, so this version may have originally have been from Tandy.
Interestingly, the program does detect the machine it is being used in on startup and will adjust its configuration options accordingly.
On the Tandy 1000, here are the options :
Input - Keyboard; Joystick (Right Port)
Sound - 3 Notes, Scroll; Speaker - 1 Note, Scroll
Printer - Tandy Graphics Printer (IBM Mode), Epson Graphics Printer, Okidata Graphics Printer, No Printer
On the IBM PCjr., here are the options :
Input - Keyboard, Koala Pad, Joystick
Sound - PCjr - 3 Notes, Scroll; Cassette - 4 Notes, Speaker - 1 Note, Scroll
Printer - IBM Graphics Printer, Epson Graphics Printer, Okidata Graphics Printer, No Printer
On the IBM PC, here are the options :
Input - Keyboard, Koala Pad, Joystick
Sound - Speaker, 4 Notes; Cassette - 4 Notes; Speaker - 1 Note, Scroll; Cassette - 1 Note, Scroll
Printer - IBM Graphics Printer, Epson Graphics Printer, Okidata Graphics Printer, No Printer
I do not own a Koala Pad, but it uses the joystick port. It probably would have been the smoothest way to control the icon-based interface of MCS. Because of the special characters, a character-based printer would not work to print Treble and Bass clefs and musical notes, so a Graphics Printer was required. Interestingly, I find no mention of the PCjr. Compact Printer in the PCjr.'s options, but if there is no parallel port sidecar, it may work as it would designated as LPT1. The Compact Printer does support bitmap modes like the listed Graphics Printers. A list of the printers it has been tested with can be found in the Reference Card. Music is printed vertically down the printer page, rather than horizontally as one would expect sheet music to print.
The 4 Notes selections used up all the available CPU time, so the music did not scroll when played with these modes. For the PCjr and Tandy, the 3 note option, using the built-in sound chip, was obviously the way to go. I do not know why they even bothered with the cassette option for the PCjr., a person with a cassette player could record the 3-voice music just as easily. I do not know if the cassette option is still selectable on an IBM PC/XT, which does not have a cassette port and can be uniquely identified. Most generic PC compatibles identify themselves as an IBM PC, so the cassette option is still there although it will not work.
Despite being deemed a PC booter, MCS is tied very much to DOS. The disk is readable in DOS, but only the song files will be seen. When loading and saving songs, a DOS prompt is used and the commands are very DOS and BASIC like. A standard DOS formatted disk can save and load more songs. Oddly, the
loading screen uses a 40-column mode, probably for the PCjr. Full instructions for use in the PC can be found in the Reference Card. The manual and reference card for the IBM PC version can be found at replacementdocs.com. Listings for the sample songs can also be found in the reference card.
IBM Music Feature Card Version
In 1987, Electronic Arts released a revised version of Music Construction Set for the IBM Music Feature Card. I was able to find a download of this program. This version of MCS is a true DOS program, although presumably still protected. If you load a mouse driver beforehand (CTMOUSE.EXE 1.91 works, make sure your COM1 settings are standard 3F8/04), you can use a Microsoft protocol-compatible mouse to control the cursor. The movement is still a bit rough and only supports one button, but better than a joystick. Using the keyboard will allow for fine placement of notes. PCjr. support was removed, but the program still works on an IMFC-less PC and a Tandy 1000.
The IBM Music Feature and mouse are autodetected, but if one or the other is not present, you still have some options. On the IBM PC, the sound options are Speaker - 1 Note, Scroll; Cassette - 1 Note, Scroll. On the Tandy 1000, the options are the same as they were for the non-IMFC version. Koala Pad support is not present, but joysticks are still supported.
The loading screen for the IMFC version is now using 80-columns and has a text based cursor select system. It was very forward thinking for EA to provide a command list on the screen. Also, if the settings button (the plug) is clicked after the program starts, a menu displays that allows you to select the instruments to be used from the 240 voice patches available on the IMFC. The program does not appear to supply custom voice patches, even though the IMFC has room for 96 of them. When you play back a song, it will show one of the voice patches assigned to the treble and bass clefs.
The Setup Screen allows to choose up to 13 voices for customization. You can customize each instrument from the IMFC by the following :
Pan : L, L+R, R
Portamento : Off, Slow, Med., Fast
Vibrato : Off, On
Octave : -2, -1, 0, 1, 2
While you can only use two instruments at a time for playback, the SO sliders allow you to select one instrument for each stave on the Music Screen. On a PCjr. or Tandy, the SO sliders had 13 steps which determined the character of the sound for each stave. With the IMFC, the name of the instrument will change if you raise or lower the respective SO slider. The VO slider does the same for the volume of the stave on either the PCjr., Tandy or IMFC. Because DOSBox does not support the IMFC, I cannot post a screenshot of the Setup Screen. Unfortunately, the instruments selected cannot be changed during the song, but this is a handy way of quickly trying out new instruments.
Most of the songs found on the original version can be found on the IMFC version, but weirdly Daisy and the Canon in D Major are not present. The modern songs are not present, but there are several other songs, such as Dixie, Yankee Doodle Dandy and the first few bars of M.U.L.E.'s theme song. Mystery, Buggy, Rhythm and Scales are present. Songs from either version will not necessarily sound the same as the song on the other version on the same hardware.
Why no further versions?
MCS had always tried to provide broad sound support, and this version for the IMFC was the first and last time the program was updated to support a PC sound peripheral. Electronic Arts did not attempt to release a version for the Adlib. In 1987, IBM was still considered a sure thing and Adlib was barely known. The IMFC filled a niche with the IMFC by providing a basic, easy to use music program. This program was especially useful to younger people. However, considering the rarity of both the IMFC and this version, it was no great seller and EA probably lost money on the conversion. By the end of 1988, when an Adlib version would have been feasible, MCS was looking a bit long in the tooth. Adlib also had its Visual Composer software that took many cues from MCS. EA itself was transitioning from a publisher-assisted producer to a fully-fledged game studio. The end result was that this was the end of the venerable MCS.
Sound Samples
All captured from real hardware. No post-processing of any sort has been done (that I know of), so you may want to turn the volume up for the Tandy recordings. For the PC Speaker recordings, I used my cassette cable to capture the equivalent of what would be heard through the speaker. I used a Tandy 1000SX for the Tandy recordings and used my IMFC in my IBM PC.
IBM PC Speaker/Cassette 1-Note Original
IBM PC Speaker/Cassette 4-Note
PCjr./Tandy 3-Note Original Version
IBM Music Feature Card
Wednesday, January 21, 2015
Extra Sound in the Nintendo Famicom (NES) and Sega Mark III (Master System) and How to Get it Overseas
In Japan, Sega tried to compete with Nintendo's dominant console, the Famicom. Among the benefits its 8-bit console, the Mark III, could boast were the ability to display more colors on the screen, a somewhat richer color palette, more built-in CPU and video RAM and a faster CPU. On the minus side, the Mark III had no pause or select buttons on its controllers, a lower screen resolution and inferior audio. The Famicom's 2A03 contained five audio channels (2x pulse, triangle, noise, PCM) to the Mark III's (integrated) TI SN-76489's four audio channels (3x square, noise). Moreover, the Famicom's audio channels were substantially more versatile in hardware than the Mark IIIs.
Sega eventually released an FM Unit for the Mark III to help combat the Mark III's audio inferiority. The FM Unit contained a YM-2143 2-op FM synthesis sound chip. After it was released, most Japanese games would support both the Mark III internal audio and the FM Unit's audio. Forty-one Japanese games supported the FM Unit. Only eighty-six games were released in Japan for the Mark III. When the system was re-released in Japan as the Sega Master System, the YM-2143 chip was built into the console.
Nintendo allowed for cartridges to contain extra sound chips. which could mix their audio with the internal Famicom audio. The first product that did this was the Famicom Disk System, whose RAM adapter included an extra sound channel. Seventy-five games for the Famicom Disk System are known to support the expansion audio channel, and about 190 games were released for the add-on.
After the fad for the Disk System had died down, other Nintendo licensees who has the license to make their own cartridges included audio hardware in some of their games : Konami, Sunsoft, Jaleco, Bandai, Jaleco, Namco(t). Even Nintendo got in the act with its MMC5 chip. Twenty-six Japanese games support some form of expansion audio. However, approximately 1,055 cartridge games were released for the Famicom. Fortunately, a list of every game and the chip they use and every disk game supporting expansion audio can be found here : http://wiki.nesdev.com/w/index.php/List_of_games_with_expansion_audio
Unfortunately, neither company thought it fit to allow expansion audio in the consoles released in the West. The Nintendo Famicom sent its internal audio to the cartridge port. Games without expansion audio would simply send this right back to the console, which then went to the output circuitry. Games with expansion audio would take the audio from the Famicom, mix it with its own audio, and send the mixed signal to the Famicom's output circuitry. When the Famicom was released as the NES worldwide, Nintendo re-routed the audio so that it did not go to the cartridge port. Instead, a game could send its audio down one of the expansion pins in the middle of the NES connector, which would appear on a pin of the expansion port. Then this pin could be bridged with a resistor on an adapter that connects to the port to a pin that provided access to the NES's internal audio, allowing for mixing.
The trouble was that Nintendo never released an adapter that bridged the necessary pins on the expansion port, so the functionality went unused. Additionally, Nintendo, which manufactured virtually all the boards for the NES, never released a board with expansion audio functionality except the MMC5 boards. No other company, licensed or unlicensed, ever did during the NES's lifespan. None of the games released for the NES using an MMC5 board use its expansion audio.
Using Famicom games on a NES requires the use of a pin converter. Not all connect Famicom pin 46 (audio out) to any of the NES expansion pins. Krikzz's pin converter connects Famicom pin 46 to NES pin 54, which is what the PowerPak and Everdrive N8 NES version use.
When Sega released the Mark III overseas as the Master System, it did not include the expansion port that would allow a user to connect an FM Unit directly. In addition, the pin connector for overseas Master System cartridges is 50-pins and the Japanese (and South Korean) cartridges use 44-pins. Sega did include a card edge version of the cartridge port on the back of the original Master Systems as an expansion port, but never released a peripheral that could connect to it.
However, Sega unintentionally was kind enough to make it relatively easy to add FM sound to an overseas Master System. One resourceful hacker was able to recreate the FM unit as a board that plugs into the SMS's expansion slot : http://etim.net.au/smsfm/smsfm.html Removal of a capacitor and soldering three wires completes the job.
Doubly fortunate for SMS owners, most US/European SMS games did not eliminate their FM Sound when they were ported over. Some games were never released in Japan but still have FM sound. The only games that removed the FM sound were Ys and Phantasy Star. PS has a retranslation hack and Ys has a renaming hack to add it back in. Some other games will require a code to enable FM sound, but most will use FM sound if it is present in the system. Here are the list of games that support FM audio : http://www.smspower.org/Tags/FM
Of these games, Battle Out Run, Double Hawk, Dynamite Dux, Summer Games and Rambo III require patches to get the FM Sound working. The available patches are for the Pro Action Replay, which is a device that patches RAM locations, not ROM locations. The Pro Action Replay may be difficult to come by. In addition, Wonder Boy III: The Dragon's Trap only gives FM music if it detects a Japanese Mark III or Master System but can be patched to always output FM music. A real Time Soldiers cartridge will crash if FM sound is detected, a patched ROM will fix this issue. The rest of the non-Japanese exclusive cartridges on that list should work in an FM-modded overseas Master System.
Approximately 114 games were released for the Sega Master System in the US, and of those 46 or so games supported FM sound, most (all but five) without any modifications. That is nearly 50% of the games released for the system. Europe received about 270 SMS games, and got nine more FM supporting games, but more require patches. Still, compared to the NES, which did not receive many games that originally had expansion sound (eight cartridge games plus about eight to ten disk games), it is one thing SMS fans can boast about.
Sega eventually released an FM Unit for the Mark III to help combat the Mark III's audio inferiority. The FM Unit contained a YM-2143 2-op FM synthesis sound chip. After it was released, most Japanese games would support both the Mark III internal audio and the FM Unit's audio. Forty-one Japanese games supported the FM Unit. Only eighty-six games were released in Japan for the Mark III. When the system was re-released in Japan as the Sega Master System, the YM-2143 chip was built into the console.
Nintendo allowed for cartridges to contain extra sound chips. which could mix their audio with the internal Famicom audio. The first product that did this was the Famicom Disk System, whose RAM adapter included an extra sound channel. Seventy-five games for the Famicom Disk System are known to support the expansion audio channel, and about 190 games were released for the add-on.
After the fad for the Disk System had died down, other Nintendo licensees who has the license to make their own cartridges included audio hardware in some of their games : Konami, Sunsoft, Jaleco, Bandai, Jaleco, Namco(t). Even Nintendo got in the act with its MMC5 chip. Twenty-six Japanese games support some form of expansion audio. However, approximately 1,055 cartridge games were released for the Famicom. Fortunately, a list of every game and the chip they use and every disk game supporting expansion audio can be found here : http://wiki.nesdev.com/w/index.php/List_of_games_with_expansion_audio
Unfortunately, neither company thought it fit to allow expansion audio in the consoles released in the West. The Nintendo Famicom sent its internal audio to the cartridge port. Games without expansion audio would simply send this right back to the console, which then went to the output circuitry. Games with expansion audio would take the audio from the Famicom, mix it with its own audio, and send the mixed signal to the Famicom's output circuitry. When the Famicom was released as the NES worldwide, Nintendo re-routed the audio so that it did not go to the cartridge port. Instead, a game could send its audio down one of the expansion pins in the middle of the NES connector, which would appear on a pin of the expansion port. Then this pin could be bridged with a resistor on an adapter that connects to the port to a pin that provided access to the NES's internal audio, allowing for mixing.
The trouble was that Nintendo never released an adapter that bridged the necessary pins on the expansion port, so the functionality went unused. Additionally, Nintendo, which manufactured virtually all the boards for the NES, never released a board with expansion audio functionality except the MMC5 boards. No other company, licensed or unlicensed, ever did during the NES's lifespan. None of the games released for the NES using an MMC5 board use its expansion audio.
Using Famicom games on a NES requires the use of a pin converter. Not all connect Famicom pin 46 (audio out) to any of the NES expansion pins. Krikzz's pin converter connects Famicom pin 46 to NES pin 54, which is what the PowerPak and Everdrive N8 NES version use.
When Sega released the Mark III overseas as the Master System, it did not include the expansion port that would allow a user to connect an FM Unit directly. In addition, the pin connector for overseas Master System cartridges is 50-pins and the Japanese (and South Korean) cartridges use 44-pins. Sega did include a card edge version of the cartridge port on the back of the original Master Systems as an expansion port, but never released a peripheral that could connect to it.
However, Sega unintentionally was kind enough to make it relatively easy to add FM sound to an overseas Master System. One resourceful hacker was able to recreate the FM unit as a board that plugs into the SMS's expansion slot : http://etim.net.au/smsfm/smsfm.html Removal of a capacitor and soldering three wires completes the job.
Doubly fortunate for SMS owners, most US/European SMS games did not eliminate their FM Sound when they were ported over. Some games were never released in Japan but still have FM sound. The only games that removed the FM sound were Ys and Phantasy Star. PS has a retranslation hack and Ys has a renaming hack to add it back in. Some other games will require a code to enable FM sound, but most will use FM sound if it is present in the system. Here are the list of games that support FM audio : http://www.smspower.org/Tags/FM
Of these games, Battle Out Run, Double Hawk, Dynamite Dux, Summer Games and Rambo III require patches to get the FM Sound working. The available patches are for the Pro Action Replay, which is a device that patches RAM locations, not ROM locations. The Pro Action Replay may be difficult to come by. In addition, Wonder Boy III: The Dragon's Trap only gives FM music if it detects a Japanese Mark III or Master System but can be patched to always output FM music. A real Time Soldiers cartridge will crash if FM sound is detected, a patched ROM will fix this issue. The rest of the non-Japanese exclusive cartridges on that list should work in an FM-modded overseas Master System.
Approximately 114 games were released for the Sega Master System in the US, and of those 46 or so games supported FM sound, most (all but five) without any modifications. That is nearly 50% of the games released for the system. Europe received about 270 SMS games, and got nine more FM supporting games, but more require patches. Still, compared to the NES, which did not receive many games that originally had expansion sound (eight cartridge games plus about eight to ten disk games), it is one thing SMS fans can boast about.
Friday, November 28, 2014
Game Boy and Headphones - Better Earpirces do not Always Give Better Sound
The original DMG-01 Game Boy are known for their superior sound quality over their successors, the Pocket, Light, Color, Advance & Advance SP. I wanted to test that with three sets of Earbuds I have.
Set one are the Samsung Earbuds that came packed with a Samsung Galaxy Note 4. These earbuds have a second ring for a micrphone (TRRS), a microphone volume dial and flat cables. Although they came free with the phone, they probably would cost you $5-6 at retail.
Set two are a pair of Earbuds branded with Disney's Phineas and Ferb cartoon show. They have rounded cables and no micrphone. They use gel Earbud tips. They probably would set you back $2-3 at retail.
Set three is a pair of Earbuds bought at the dollar store. The cables are extremely thin and the block that allowed for the Earbuds's cable to be retracted broke very quickly. $1.00. Unlike Set one and two, they do not use Earbud tips. The Earbuds Nintendo packaged with the original Game Boys looked very much like these.
Sets one and two are more comfortable in the ear than set one and can fit more snuggly. Set one, when used with a modern device like a Samsung Galaxy Note 4, sounds crisp and clear with the audio generated from that phone. Sets two and three have a hard time fitting into the headphone jack. What you hear from them sounds comparatively muffled compared to set one.
So, which set is best for listening to the Game Boy? In terms of Sound Quality, set two or three sound superior to set one. Set one will give the loudest sound, but the noise floor is also raised. The result is a constant hiss at any volume. Additionally, set one will give off a high pitched noise at high volumes and audible hum at low volumes, which can be easily be heard when no music is playing.
Set two and three will give an appropriate volume, but it won't be deafening like Set one can provide. Nor will you hear hum or the sharply pitches at the extreme ends of the volume dial. However, set two sounds way too quiet unless the earphone connector is pulled a few millimeters out of the jack. Set three doesn't have this problem, but its earpieces are far less comfortable than Set two's gel earbuds.
This is another example where the latest and greatest is not the best for vintage gaming hardware. The Samsung Earbuds deliver far more dynamic range than the cheap Earbuds, but this is a situation where an output device gives too much. I found that headphones that came with a functioning volume wheel could cut down the headphone's own volume range to mask out the worst aspects of the Game Boy's sound without lowering the volume too much. Without a volume wheel, you are left to the mercy of the earbud's default sound repoduction, and it may not sound pretty.
Even the DMG Game Boy is no audiophile's prize, it is far from it. It retailed at $100 and used a screen that was unimpressive even in its day. It did have Tetris, great battery life and a good price, so if the audio quality is less than spectacular, most people did not care. Also, after the first two years, stereo sound separation was not very noticeable with games.
Saturday, July 12, 2014
Pushing the Limits : PC Sound Chip Digitized Sound
The PC Speaker was the most limited of all sound devices for the PC. Unlike later dedicated sound chips, the timer-driven PC speaker had no programmable capability to change the volume. The typical PC Speaker outputs a square wave. A square wave is suitable for representing a musical note, but not digitized audio. A square wave is notable because the voltage level spends the same amount of time high as it does low. If the voltage period varies (it spends more time high than low, or vice versa), it is no longer a square wave. Additionally, if the frequency changes faster than the speaker can cope, you can get intermediate positions in the speaker cone between full expansion and full contraction. The end result is something approximating 6-bit digitized sound. The quality of the resulting audio varied considerably on the size of the speaker cone (IBM PC=big, Tandy = bigger, PCjr. and some PS/2s = tweeters (bad)). Some good samples of the digitized PC Speaker can be found on my friend Trixter's page : http://www.oldskool.org/sound/pc
The first practical, widely supported digital audio devices in PC games were the Tandy digital sound chip, known as the PSSJ (parallel, serial, sound and joystick), and the Sound Blaster's DSP (Digital Signal Processor) chip. Both had access to a hardware interrupt (7 for Tandy, 7 by default for Sound Blaster) and a DMA channel (1 for both) to feed a DAC without requiring much processing time. There was also a parallel port sound device called the Covox Speech Thing, which required the CPU to feed data bytes to the a resistor network attached to the parallel port. The result was a crude 8-bit DAC
Between the PC speaker and the DMA-driven Earlier music devices were generally programmable sound generators, essentially using variable frequency square waves and frequency modulated sine waves to produce sounds. None of them had natural DAC functionality. However, these could be tweaked to simulate the effect of a crude DAC.
The PCjr. and Tandy 3-Voice chip, the TI SN76496 and its clones, was quite a bit more capable than the PC Speaker. It had three square wave generators as opposed to the single square wave of the PC Speaker. Additionally, it had a 4-bit volume control for the chip's output. This volume control, combined with one of the square waves, could be used as a DAC. The Game Blaster SAA-1099 chips operated very similarly to the Tandy chip (but with six channels per chip instead of three) and thus were also capable of using this method. The Adlib YM-3812 chip used two operator frequency modulated sine waves to produce sound. There are eighteen operators in total, and each could be manipulated via multiple registers. Each operator has a 6-bit volume control, giving 6-bit DAC functionality. Similar methods could be used to produce digitized sound as with the less-advanced devices.
As a sidenote, these methods were also used for other, non-PC chips. Programmgers for the Commodore 64 used such methods to allow the MOS 6581 SID chip to produce an approximation of human voice for the classic game "Impossible Mission" and others. The impressive digitized sound effects of Dungeon Master for the Atari ST were produced solely by the high-clocked AY-3-8910 clone in that machine, the YM-2149. The Atari TIA (Quadrun) and POKEY chips could also handle digitized sound. All these chips have 4-bit volume controls like the TI and Phillips chips, so the same methods can be used to get digitized sound out of them. The NES 2A03 had a 7-bit DAC that could be fed directly by the processor and could also employ a delta modulation technique for digitized sound.
There are several disadvantages to this method. First, the result will definitely sound "lo-fi" and is often very quiet. Second, it requires a lot of processor time, because the processor has to send a lot of data directly to the device to make it work faster than it should. Third, it requires much more space to store a sample than a chiptune, and in the era of 360KB and 720KB floppy disks, the room for digitized sound was limited.
As far as PC games go, outside digitized PC Speaker, the effect was seldom used. An early use of the effect was in Imagic's Touchdown Football for the PCjr. It's digitized voice only played back properly on a PCjr., the faster Tandy 1000 would make the voice sound like a chipmunk. The game was later ported to Tandy 1000, and the voice played back at the correct speed.
Electronic Arts used Tandy digitized sound in several titles. Among them are Kings of the Beach, 688 Attack Sub and Skate or Die. My friend Cloudschatze has some comparison videos between the Tandy 3-voice sound and C64 SID sound on his Youtube Channel, see here : https://www.youtube.com/user/Cloudschatze/videos
Interplay used it for the sound effects in the original 16-color version of Battle Chess. Epyx's Storm Strike uses for voice samples in at least two places.
Capstone's Bill and Ted's Excellent Adventure utilized it for the Adlib, as did Interplay's/Delphine Software's Another World/Out of this World. Another World also supported the Sound Blaster, and the sampled sound effects sound far superior with the Sound Blaster. GameTek's Super Jeopardy supports Adlib for digitized music and it may also support digitized playback with the Innovation SSI-2001, which also used a MOS 6581 SID chip.
Sir-Tech's Wizardry : Bane of the Cosmic Forge and Wizardry : Crusaders of the Dark Savant supports digitized sound through the Adlib, even if Sound Blaster is selected. The game also supports digitized PC Speaker sound, and in DOSBox, you must select PC Speaker sound. Crusaders allows you to select a music device independently of the sound device. Some games, like Budokan, support digitized PC Speaker for sound effects regardless of sound device selected. Dragon Wars is one of many games that supports digitized PC Speaker sound even though the Tandy 1000 and other sound cards were available by the time of its PC port's release.
Activision's OmniMusic driver, used in F-14 Tomcat, BattleTech: The Crescent Hawk's Revenge and Joe Montana Football, support digitized playback with Adlib, Tandy and Game Blaster. BattleTech's PC Speaker digitized sound is more limited, because there is no voice in BattleTech whereas there is voice with every other sound chip.
While DOSBox can support digitized PC Speaker music reasonably well, it utterly fails to render digitized Tandy, Adlib or Game Blaster music. Usually the result is muted, muffled or virtually inaudible. This is one area where you still need real hardware to hear the music and sound effects as the creators intended.
The first practical, widely supported digital audio devices in PC games were the Tandy digital sound chip, known as the PSSJ (parallel, serial, sound and joystick), and the Sound Blaster's DSP (Digital Signal Processor) chip. Both had access to a hardware interrupt (7 for Tandy, 7 by default for Sound Blaster) and a DMA channel (1 for both) to feed a DAC without requiring much processing time. There was also a parallel port sound device called the Covox Speech Thing, which required the CPU to feed data bytes to the a resistor network attached to the parallel port. The result was a crude 8-bit DAC
Between the PC speaker and the DMA-driven Earlier music devices were generally programmable sound generators, essentially using variable frequency square waves and frequency modulated sine waves to produce sounds. None of them had natural DAC functionality. However, these could be tweaked to simulate the effect of a crude DAC.
The PCjr. and Tandy 3-Voice chip, the TI SN76496 and its clones, was quite a bit more capable than the PC Speaker. It had three square wave generators as opposed to the single square wave of the PC Speaker. Additionally, it had a 4-bit volume control for the chip's output. This volume control, combined with one of the square waves, could be used as a DAC. The Game Blaster SAA-1099 chips operated very similarly to the Tandy chip (but with six channels per chip instead of three) and thus were also capable of using this method. The Adlib YM-3812 chip used two operator frequency modulated sine waves to produce sound. There are eighteen operators in total, and each could be manipulated via multiple registers. Each operator has a 6-bit volume control, giving 6-bit DAC functionality. Similar methods could be used to produce digitized sound as with the less-advanced devices.
As a sidenote, these methods were also used for other, non-PC chips. Programmgers for the Commodore 64 used such methods to allow the MOS 6581 SID chip to produce an approximation of human voice for the classic game "Impossible Mission" and others. The impressive digitized sound effects of Dungeon Master for the Atari ST were produced solely by the high-clocked AY-3-8910 clone in that machine, the YM-2149. The Atari TIA (Quadrun) and POKEY chips could also handle digitized sound. All these chips have 4-bit volume controls like the TI and Phillips chips, so the same methods can be used to get digitized sound out of them. The NES 2A03 had a 7-bit DAC that could be fed directly by the processor and could also employ a delta modulation technique for digitized sound.
There are several disadvantages to this method. First, the result will definitely sound "lo-fi" and is often very quiet. Second, it requires a lot of processor time, because the processor has to send a lot of data directly to the device to make it work faster than it should. Third, it requires much more space to store a sample than a chiptune, and in the era of 360KB and 720KB floppy disks, the room for digitized sound was limited.
As far as PC games go, outside digitized PC Speaker, the effect was seldom used. An early use of the effect was in Imagic's Touchdown Football for the PCjr. It's digitized voice only played back properly on a PCjr., the faster Tandy 1000 would make the voice sound like a chipmunk. The game was later ported to Tandy 1000, and the voice played back at the correct speed.
Electronic Arts used Tandy digitized sound in several titles. Among them are Kings of the Beach, 688 Attack Sub and Skate or Die. My friend Cloudschatze has some comparison videos between the Tandy 3-voice sound and C64 SID sound on his Youtube Channel, see here : https://www.youtube.com/user/Cloudschatze/videos
Interplay used it for the sound effects in the original 16-color version of Battle Chess. Epyx's Storm Strike uses for voice samples in at least two places.
Capstone's Bill and Ted's Excellent Adventure utilized it for the Adlib, as did Interplay's/Delphine Software's Another World/Out of this World. Another World also supported the Sound Blaster, and the sampled sound effects sound far superior with the Sound Blaster. GameTek's Super Jeopardy supports Adlib for digitized music and it may also support digitized playback with the Innovation SSI-2001, which also used a MOS 6581 SID chip.
Sir-Tech's Wizardry : Bane of the Cosmic Forge and Wizardry : Crusaders of the Dark Savant supports digitized sound through the Adlib, even if Sound Blaster is selected. The game also supports digitized PC Speaker sound, and in DOSBox, you must select PC Speaker sound. Crusaders allows you to select a music device independently of the sound device. Some games, like Budokan, support digitized PC Speaker for sound effects regardless of sound device selected. Dragon Wars is one of many games that supports digitized PC Speaker sound even though the Tandy 1000 and other sound cards were available by the time of its PC port's release.
Activision's OmniMusic driver, used in F-14 Tomcat, BattleTech: The Crescent Hawk's Revenge and Joe Montana Football, support digitized playback with Adlib, Tandy and Game Blaster. BattleTech's PC Speaker digitized sound is more limited, because there is no voice in BattleTech whereas there is voice with every other sound chip.
While DOSBox can support digitized PC Speaker music reasonably well, it utterly fails to render digitized Tandy, Adlib or Game Blaster music. Usually the result is muted, muffled or virtually inaudible. This is one area where you still need real hardware to hear the music and sound effects as the creators intended.
Saturday, March 29, 2014
Working with MT-32 & Yamaha FB-01 MIDI Files and Patches
1. Description of the MT-32's Capabilities
The MT-32 consists of eight instrument parts and one rhythm/percussion part. It calls them Parts 1-8 and R. Any part can be assigned to any of MIDI channels 1-16. The default is that parts 1-8 are assigned to MIDI channels 2-9. There is a setting to change this to MIDI channels 1-8. The rhythm/percussion part is always assigned to MIDI channel 10 by default.
These parts share 32-voices/notes of polyphony, but the dynamic allocation of polyphony is not efficient over 22-24 voices, especially on a first generation unit. The MT-32 does support an Overlow Assign mode where excess polyphony can be sent to a second MT-32 unit, but operation in practice is unreliable with first generation units.
A patch, which contains all the essential information for an instrument, is assigned to each part. Each patch can require up to 4 voices/notes to play, so there are restrictions on the sounds that can be played from the module. The use of multiple parts enables the MT-32 to be called Multi-Timbral, hence the name. This is done via a Program Change MIDI message, and the MT-32 contains built-in 128 instrument patches and 30 rhythm patches. A patch is made up of a timbre plus the patch parameter. Timbres are made up of up to four partials and common parameter setting for all partials. Each partial has many settings which can be individually controlled. Each partial takes one polyphony note/voice and can use either a waveform (square, rectangle or sawtooth) or a 16-bit PCM sample (128 available) as the basis of its sound.
A patch can call on four timbre banks, A, B, M & R. Timbre bank A corresponds to the first 64 built-in patches of the MT-32, bank B the second 64 built-in patches, bank R corresponds to the 30 percussion patches of the rhythm section (and the 33 sound effects of the LAPC-I/CM-32L), and bank M corresponds to an area where up to 64 user-created timbres are stored.
The MT-32 is a synthesizer because user created patches can be stored and recalled from memory. The SC-55, by contrast, is not a synthesizer. While each of the patches used by the 16 parts of the SC-55 can be adjusted similarly to an MT-32 timbre, there is much less flexibility and you can only modify the active patch. While the SC-55 is battery backed, this is intended to store the general settings of the module.
To dump or send custom patch/timbre data to the MT-32, System Exclusive MIDI messages are required. The sysex messages for patch/timbre data are unique to the MT-32 series and sequencers do not understand what they do. Moreover, most sequencer programs assume that Program Changes correspond to General MIDI instrument assingments, but the MT-32 has very different assignments.
2. Format of MT-32 Patches
The structure of an MT-32 patch, as contained in a sysex file, is as follows :
The various areas can be in any order, since each area is separate and independent in the MT-32's memory. The temporary areas may not be required to be transmitted.
The MT-32 sends and receives data in packets no larger than 256 bytes (really 128 bytes, see below). In order to send or receive bytes to the MT-32's various memory areas, System Exclusive messages are required. Each message adds 10 bytes to the data to be transmitted. By doing the math, up to 71 (MT-32) or 72 (CM-32L) System Exclusive messages may be sent at the start of a game to a LA synthesizer. The structure of a system exclusive message is as follows :
F0 - Begin System Exclusive Message
41 - Manufacturer ID (Roland)
10 - Device ID/Unit # (Default is Unit 17)
16 - Model ID (Roland LA Device)
11 - Command ID (Request Data 1/RQ1)
This is sent from the computer to the synthesier to tell it to send the data in a memory area to the computer. Command ID 12 is Data Set 1/DT1, and it is used when writing data to the synthesizer.
10 00 00 - The address of the area of memory to be addressed
00 00 17 - The number of bytes of data to be requested with RQ1. With DT1, this can be up to 256 bytes with a single sysex command.
59 - Checksum
F7 - End of System Exclusive Message
The sysex files from Quest Studios also include an MT-32 Display Message at the beginning and at the end of the sysex file, adding approximately 58 bytes to the file. The format of these commands is as follows :
F0 41 10 16 12 20 00 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ck F7
The Display of the MT-32 supports 20 characters, but the command data need not include all twenty character places. Text is encoded in 7-bit ASCII. You will have to calculate the checksum for the message. You can find a Windows program that will avoid that tedious business here :
http://www.bwalk.com.au/Convert/Convert.html
This program can be used to convert text file containing command strings into a syx or a mid file :
http://www.bwalk.com.au/MidiUtil/FileConvert.html
Note that addresses and data never use a value above 7F, this is because these bytes are actually 7-bit bytes, not 8-bit bytes, the high bit is never used. The above program can convert decimal and hexadecimal to the 7-bit values the MT-32 uses.
With a rev. 0 MT-32, there must be a 40 microsecond delay between the sending of system exclusive messages. Thus it will take a minimum of three seconds to send a full patch bank to the MT-32. The rev. 1 MT-32 and all other MT-32 compatible LA synthesizers do not have this limitation.
There is no reason why you cannot send more than one dump receive request at one time. You can combine all the above dump receive commands into one file and use the file to obtain all the data at once. The resulting file size for the MT-32 will be 18,541 bytes. For the CM-32L, it will be 18,635 bytes. After accounting for the text messages, this dump will be 16 bytes larger than the Quest Studio's dumps. This is because QS missed the temporary patch area for the rhythm part.
Yamaha FB-01 and IBM Music Feature Card
The Yamaha FB-01 FM Sound Generator supports seven patch/voice banks. Each bank can hold up to 48 patches. Banks 1 and 2 are RAM banks and this is where users can store their custom patches. Banks 3-7 are ROM banks and have 48 patches each. As its name suggests, these are the built-in patches. Unlike the MT-32, there is no distinction between instrument and percussion channels/patches. Thus the device supports 240 built-in patches and 96 user-created patches.
A Program Change command only works with numbers 0-47, essentially confining the non-FB-01 aware device to a small subset of its available patches. To change the patch/voice bank requires a System Exclusive command to change the configuration parameters. This is how another voice bank is selected. The FB-01 has 16 RAM and 4 ROM choices for its Configuration Memory, which assigns MIDI channels, polyphony reserve, channel volume and the like.
The FB-01 receives 8 MIDI channels (8 parts), and by default uses MIDI channel 1-8. It only supports 8 simultaneous note playback (8 note polyphony). Each instrument patch can take from 1-8 notes. The core of the device is the Yamaha YM2614 FM Operator Type-P, which is musicially and (almost) functionally identical to the YM2151 chip found in many, many arcade machines. This chip supports 4-operator FM synthesis.
Sierra's games store custom patches in both RAM banks, so both will need to be dumped. The FB-01 can only receive System Exclusive messages on the MIDI channel assigned to a specific module (thus up to 16 modules can be supported via the MIDI channels) The default is channel 0/1. The system exclusive commands to do this are as follows :
F0 43 75 00 20 00 00 F7 (Voice Bank 0)
F0 43 75 00 20 00 01 F7 (Voice Bank 1)
Each resulting file will be 6,363 bytes.
Additionally, you may also need to dump the configuration memory. The command to dump all configuration memory is :
F0 43 75 00 20 03 00 F7
The file will be 2,616 bytes.
Sierra's games also use System Exclusive messages to change instruments and voice banks and adjust certain events like Note On and Note Off with a finer degree of control than possible with a standard message. This sysex is not generally large, but must be included to obtain an accurate rendition of the song.
This method works with either the IBM Music Feature Card or the FB-01. The makers of the FB-01 helpfully also decided to allow you to also send data from the module using the front panel buttons, but using the sysex above allows for saving the resulting data in one step.
The IBM Music Feature Card defaults to the memory protection function to off. It does not have a battery. The FB-01 defaults memory protection to on and has a spot-welded CR2032 battery. It needs to be set to off for custom patch data to be received by the FB-01. The IBM Music Feature Card's power on defaults allow all MIDI messages to pass from the MIDI IN (with the breakout box) to the music hardware on the card.
When the FB-01 or IBM card receives patch/configuration dumps, it will send back the following sysex : F0 43 60 0x F7. The 02 indicates an ACK, 03 indicates error, and 04 usually means you forgot to set the memory protection to off. The FB-01 will also show dump/received!! for a good dump, a dump/error for a bad dump and memory/protect if the memory protection is on. If you send all three sets of data, you will see the above sysex three times in the monitor.
If you want to send one sysex file to dump all three areas, put the configuration memory command first, then followed by the voice bank commands. I have found that the FB-01 will not acknowledge the configuration memory dump if it immediately follows a voice bank dump command. If it still doesn't work, send the dump commands as separate sysex files. A complete sysex file with all three areas will be 15,342 bytes, and should have the configuration memory sent first.
Capturing MT-32 or FB-01 Music
In order to obtain MT-32 or FB-01 song data, the following steps must be accomplished :
1. Capture the custom patches, if any
Not all games that support the MT-32 use custom patches. Games like King's Quest IV, Police Quest II, LOOM, The Secret of Monkey Island and Ultima VI do not use custom patches. However, they may still use a modest amount of sysex to modify existing patch and device parameters. Most games only load patches once, but some games like Ultima VII and Serpent Isle load three sets of patches, and each must be captured to capture all the music.
Fortunately, most games do not send an MT-32 reset once the player quits them. Additionally, MIDI cables are hot-swappable, so there are many ways to cut off a game and preserve its patches. So the first task is to start a game and let load its patches, then quit. The patches will be kept in the MT-32's memory.
The next step is to obtain those patches. If you are looking to dump a Sierra game's patches, the work has probably already been done and you can skip this step. Download the Sierra MT-32 Sound Library here : http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
The way I present here is a slightly tedious process, but typically you need only do it once per game. It requires a windows-compatible MIDI interface and the MIDI-OX program. The module will need to have its MIDI in and MIDI out cables connected to the interface. I found that an rev. 0 MT-32 did not send all the data to MIDI-OX, but a CM-32L did. The idea is to send sysex commands requesting that the module send the data in its memory. You will need one command for each section of memory, then you will need to save the resulting data to a file and perhaps convert it from text to a binary sysex file.
MIDI-OX is good because it has command called "Send/Receive Sysex", which will automatically save your data to a .syx file.
Note that an LAPC-I will not work to capture patches in this way. The LAPC-I is equilavent to an MPU-401 connected to a CM-32L by a MIDI OUT cable only. As there is no MIDI IN connection, the synthesizer has no way of sending data to the MPU-401 and thus the computer has no way to read it. The SCC-1 and all wavetable daughterboards have the same issue, but typically patch information is not requested from those devices.
When capturing a dump, do not use a crappy UART MPU-401 compatible interface like the ones found on a Sound Blaster 16. They failed to complete transfers of the MT-32's timbre banks.
2. Record the MIDI as played in a game
DOSBox is extremely useful for recording MIDI via its Capture Raw MIDI function. It saves all MIDI data to a MID file for easy editing in just about any sequencer.
You can also do this via a sequencer, which should be able to record MIDI data. This works best with two computers. In this case, connect the MIDI IN from your interface on computer one to the MIDI THRU of your MT-32. Computer two, preferably the older machine, will play the game and connect its interface to the MIDI IN of your MT-32.
3. Edit MIDI in Sequencer
In order to work with any MIDI file, you need a Sequencer. The best two sequencers back in the day were Voyetra Sequencer Plus Gold and Cakewalk Pro. Since we are talking to the MT-32, it is best to use vintage sequencers, and Quest Studios provides Voyetra's software for DOS and Cakewalk for Windows 3.1 Find them here :
http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
Both work in DOSBox, but because DOSBox does not implement the MIDI IN function, their functionality is somewhat crippled. Personally I prefer Cakewalk Pro.
MIDI files can be edited in a Sequencer similarly to how audio files are edited in an audio editing program. In this case, however, you will want to remove all the patch data that DOSBox captured. For the MT-32, DOSBox will fill all 256 banks (and they are not enough) with the patch data. Delete all of it with the Event List View. Do not delete any other sysex. For the FB-01, DOSBox will not completely capture the voice bank data, but you must only delete the sysex banks with the size 1024.
One thing you will want to do is to mute or delete any channels other than 2-10 for the MT-32. In Sierra's early SCI games, for example, channel 1 contains PC speaker data and channels 11-15 contains Adlib data. A CM-64 and CM-500 use channels 11-16 for their CM-32P and thus unintended sound will play on these channels if you are using those modules.
Cakewalk has the ability to play MIDI files, and you should avail yourself of this functionality. However, before you play a file, make sure to transmit the sysex patch bank with the Sysx view first. Find an empty bank and send it.
4. Embed patch to MIDI file (optional)
Cakewalk Pro uses .syx files to load patch banks in its bank manager. Load the .MID, go into the Sysex View page and load the sysex bank. Click on the Auto button and save your MID file. That is it! Additionally, it may be advisable to also embed an MT-32 reset sysex command so that you are sure you are not using any leftover data from any MIDI you played on the device prior. Finally, you may want to add a few extra measures of silence at the beginning of the song.
I do not believe that embedding is the best way to present these files. Many MIDI players have difficulty with large files or files with lots of sysex in it. Windows Media Player does not have any such issues, nor does DOSmid.
The MT-32 consists of eight instrument parts and one rhythm/percussion part. It calls them Parts 1-8 and R. Any part can be assigned to any of MIDI channels 1-16. The default is that parts 1-8 are assigned to MIDI channels 2-9. There is a setting to change this to MIDI channels 1-8. The rhythm/percussion part is always assigned to MIDI channel 10 by default.
These parts share 32-voices/notes of polyphony, but the dynamic allocation of polyphony is not efficient over 22-24 voices, especially on a first generation unit. The MT-32 does support an Overlow Assign mode where excess polyphony can be sent to a second MT-32 unit, but operation in practice is unreliable with first generation units.
A patch, which contains all the essential information for an instrument, is assigned to each part. Each patch can require up to 4 voices/notes to play, so there are restrictions on the sounds that can be played from the module. The use of multiple parts enables the MT-32 to be called Multi-Timbral, hence the name. This is done via a Program Change MIDI message, and the MT-32 contains built-in 128 instrument patches and 30 rhythm patches. A patch is made up of a timbre plus the patch parameter. Timbres are made up of up to four partials and common parameter setting for all partials. Each partial has many settings which can be individually controlled. Each partial takes one polyphony note/voice and can use either a waveform (square, rectangle or sawtooth) or a 16-bit PCM sample (128 available) as the basis of its sound.
A patch can call on four timbre banks, A, B, M & R. Timbre bank A corresponds to the first 64 built-in patches of the MT-32, bank B the second 64 built-in patches, bank R corresponds to the 30 percussion patches of the rhythm section (and the 33 sound effects of the LAPC-I/CM-32L), and bank M corresponds to an area where up to 64 user-created timbres are stored.
The MT-32 is a synthesizer because user created patches can be stored and recalled from memory. The SC-55, by contrast, is not a synthesizer. While each of the patches used by the 16 parts of the SC-55 can be adjusted similarly to an MT-32 timbre, there is much less flexibility and you can only modify the active patch. While the SC-55 is battery backed, this is intended to store the general settings of the module.
To dump or send custom patch/timbre data to the MT-32, System Exclusive MIDI messages are required. The sysex messages for patch/timbre data are unique to the MT-32 series and sequencers do not understand what they do. Moreover, most sequencer programs assume that Program Changes correspond to General MIDI instrument assingments, but the MT-32 has very different assignments.
2. Format of MT-32 Patches
The structure of an MT-32 patch, as contained in a sysex file, is as follows :
| Length in Bytes (Decimal) | MT-32 Area | Sysex Receive String |
| 33 | System Area | F0 41 10 16 11 10 00 00 00 00 17 59 F7 |
| 154 | Patch Temporary Area | F0 41 10 16 11 03 00 00 00 01 10 6C F7 |
| 266 | Rhythm Setup Temporary Area | F0 41 10 16 11 03 01 10 00 02 00 6A F7 |
| 360 | Rhythm Setup Temporary Area (CM-32L) | F0 41 10 16 11 03 01 10 00 02 54 16 F7 |
| 1064 | Patch Memory | F0 41 10 16 11 05 00 00 00 08 00 73 F7 |
| 17024 | Timbre Memory | F0 41 10 16 11 08 00 00 02 00 00 76 F7 |
The various areas can be in any order, since each area is separate and independent in the MT-32's memory. The temporary areas may not be required to be transmitted.
The MT-32 sends and receives data in packets no larger than 256 bytes (really 128 bytes, see below). In order to send or receive bytes to the MT-32's various memory areas, System Exclusive messages are required. Each message adds 10 bytes to the data to be transmitted. By doing the math, up to 71 (MT-32) or 72 (CM-32L) System Exclusive messages may be sent at the start of a game to a LA synthesizer. The structure of a system exclusive message is as follows :
F0 - Begin System Exclusive Message
41 - Manufacturer ID (Roland)
10 - Device ID/Unit # (Default is Unit 17)
16 - Model ID (Roland LA Device)
11 - Command ID (Request Data 1/RQ1)
This is sent from the computer to the synthesier to tell it to send the data in a memory area to the computer. Command ID 12 is Data Set 1/DT1, and it is used when writing data to the synthesizer.
10 00 00 - The address of the area of memory to be addressed
00 00 17 - The number of bytes of data to be requested with RQ1. With DT1, this can be up to 256 bytes with a single sysex command.
59 - Checksum
F7 - End of System Exclusive Message
The sysex files from Quest Studios also include an MT-32 Display Message at the beginning and at the end of the sysex file, adding approximately 58 bytes to the file. The format of these commands is as follows :
F0 41 10 16 12 20 00 00 xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx ck F7
The Display of the MT-32 supports 20 characters, but the command data need not include all twenty character places. Text is encoded in 7-bit ASCII. You will have to calculate the checksum for the message. You can find a Windows program that will avoid that tedious business here :
http://www.bwalk.com.au/Convert/Convert.html
This program can be used to convert text file containing command strings into a syx or a mid file :
http://www.bwalk.com.au/MidiUtil/FileConvert.html
Note that addresses and data never use a value above 7F, this is because these bytes are actually 7-bit bytes, not 8-bit bytes, the high bit is never used. The above program can convert decimal and hexadecimal to the 7-bit values the MT-32 uses.
With a rev. 0 MT-32, there must be a 40 microsecond delay between the sending of system exclusive messages. Thus it will take a minimum of three seconds to send a full patch bank to the MT-32. The rev. 1 MT-32 and all other MT-32 compatible LA synthesizers do not have this limitation.
There is no reason why you cannot send more than one dump receive request at one time. You can combine all the above dump receive commands into one file and use the file to obtain all the data at once. The resulting file size for the MT-32 will be 18,541 bytes. For the CM-32L, it will be 18,635 bytes. After accounting for the text messages, this dump will be 16 bytes larger than the Quest Studio's dumps. This is because QS missed the temporary patch area for the rhythm part.
Yamaha FB-01 and IBM Music Feature Card
The Yamaha FB-01 FM Sound Generator supports seven patch/voice banks. Each bank can hold up to 48 patches. Banks 1 and 2 are RAM banks and this is where users can store their custom patches. Banks 3-7 are ROM banks and have 48 patches each. As its name suggests, these are the built-in patches. Unlike the MT-32, there is no distinction between instrument and percussion channels/patches. Thus the device supports 240 built-in patches and 96 user-created patches.
A Program Change command only works with numbers 0-47, essentially confining the non-FB-01 aware device to a small subset of its available patches. To change the patch/voice bank requires a System Exclusive command to change the configuration parameters. This is how another voice bank is selected. The FB-01 has 16 RAM and 4 ROM choices for its Configuration Memory, which assigns MIDI channels, polyphony reserve, channel volume and the like.
The FB-01 receives 8 MIDI channels (8 parts), and by default uses MIDI channel 1-8. It only supports 8 simultaneous note playback (8 note polyphony). Each instrument patch can take from 1-8 notes. The core of the device is the Yamaha YM2614 FM Operator Type-P, which is musicially and (almost) functionally identical to the YM2151 chip found in many, many arcade machines. This chip supports 4-operator FM synthesis.
Sierra's games store custom patches in both RAM banks, so both will need to be dumped. The FB-01 can only receive System Exclusive messages on the MIDI channel assigned to a specific module (thus up to 16 modules can be supported via the MIDI channels) The default is channel 0/1. The system exclusive commands to do this are as follows :
F0 43 75 00 20 00 00 F7 (Voice Bank 0)
F0 43 75 00 20 00 01 F7 (Voice Bank 1)
Each resulting file will be 6,363 bytes.
Additionally, you may also need to dump the configuration memory. The command to dump all configuration memory is :
F0 43 75 00 20 03 00 F7
The file will be 2,616 bytes.
Sierra's games also use System Exclusive messages to change instruments and voice banks and adjust certain events like Note On and Note Off with a finer degree of control than possible with a standard message. This sysex is not generally large, but must be included to obtain an accurate rendition of the song.
This method works with either the IBM Music Feature Card or the FB-01. The makers of the FB-01 helpfully also decided to allow you to also send data from the module using the front panel buttons, but using the sysex above allows for saving the resulting data in one step.
The IBM Music Feature Card defaults to the memory protection function to off. It does not have a battery. The FB-01 defaults memory protection to on and has a spot-welded CR2032 battery. It needs to be set to off for custom patch data to be received by the FB-01. The IBM Music Feature Card's power on defaults allow all MIDI messages to pass from the MIDI IN (with the breakout box) to the music hardware on the card.
When the FB-01 or IBM card receives patch/configuration dumps, it will send back the following sysex : F0 43 60 0x F7. The 02 indicates an ACK, 03 indicates error, and 04 usually means you forgot to set the memory protection to off. The FB-01 will also show dump/received!! for a good dump, a dump/error for a bad dump and memory/protect if the memory protection is on. If you send all three sets of data, you will see the above sysex three times in the monitor.
If you want to send one sysex file to dump all three areas, put the configuration memory command first, then followed by the voice bank commands. I have found that the FB-01 will not acknowledge the configuration memory dump if it immediately follows a voice bank dump command. If it still doesn't work, send the dump commands as separate sysex files. A complete sysex file with all three areas will be 15,342 bytes, and should have the configuration memory sent first.
Capturing MT-32 or FB-01 Music
In order to obtain MT-32 or FB-01 song data, the following steps must be accomplished :
1. Capture the custom patches, if any
Not all games that support the MT-32 use custom patches. Games like King's Quest IV, Police Quest II, LOOM, The Secret of Monkey Island and Ultima VI do not use custom patches. However, they may still use a modest amount of sysex to modify existing patch and device parameters. Most games only load patches once, but some games like Ultima VII and Serpent Isle load three sets of patches, and each must be captured to capture all the music.
Fortunately, most games do not send an MT-32 reset once the player quits them. Additionally, MIDI cables are hot-swappable, so there are many ways to cut off a game and preserve its patches. So the first task is to start a game and let load its patches, then quit. The patches will be kept in the MT-32's memory.
The next step is to obtain those patches. If you are looking to dump a Sierra game's patches, the work has probably already been done and you can skip this step. Download the Sierra MT-32 Sound Library here : http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
The way I present here is a slightly tedious process, but typically you need only do it once per game. It requires a windows-compatible MIDI interface and the MIDI-OX program. The module will need to have its MIDI in and MIDI out cables connected to the interface. I found that an rev. 0 MT-32 did not send all the data to MIDI-OX, but a CM-32L did. The idea is to send sysex commands requesting that the module send the data in its memory. You will need one command for each section of memory, then you will need to save the resulting data to a file and perhaps convert it from text to a binary sysex file.
MIDI-OX is good because it has command called "Send/Receive Sysex", which will automatically save your data to a .syx file.
Note that an LAPC-I will not work to capture patches in this way. The LAPC-I is equilavent to an MPU-401 connected to a CM-32L by a MIDI OUT cable only. As there is no MIDI IN connection, the synthesizer has no way of sending data to the MPU-401 and thus the computer has no way to read it. The SCC-1 and all wavetable daughterboards have the same issue, but typically patch information is not requested from those devices.
When capturing a dump, do not use a crappy UART MPU-401 compatible interface like the ones found on a Sound Blaster 16. They failed to complete transfers of the MT-32's timbre banks.
2. Record the MIDI as played in a game
DOSBox is extremely useful for recording MIDI via its Capture Raw MIDI function. It saves all MIDI data to a MID file for easy editing in just about any sequencer.
You can also do this via a sequencer, which should be able to record MIDI data. This works best with two computers. In this case, connect the MIDI IN from your interface on computer one to the MIDI THRU of your MT-32. Computer two, preferably the older machine, will play the game and connect its interface to the MIDI IN of your MT-32.
3. Edit MIDI in Sequencer
In order to work with any MIDI file, you need a Sequencer. The best two sequencers back in the day were Voyetra Sequencer Plus Gold and Cakewalk Pro. Since we are talking to the MT-32, it is best to use vintage sequencers, and Quest Studios provides Voyetra's software for DOS and Cakewalk for Windows 3.1 Find them here :
http://www.midimusicadventures.com/queststudios/mt32-resource/utilities/
Both work in DOSBox, but because DOSBox does not implement the MIDI IN function, their functionality is somewhat crippled. Personally I prefer Cakewalk Pro.
MIDI files can be edited in a Sequencer similarly to how audio files are edited in an audio editing program. In this case, however, you will want to remove all the patch data that DOSBox captured. For the MT-32, DOSBox will fill all 256 banks (and they are not enough) with the patch data. Delete all of it with the Event List View. Do not delete any other sysex. For the FB-01, DOSBox will not completely capture the voice bank data, but you must only delete the sysex banks with the size 1024.
One thing you will want to do is to mute or delete any channels other than 2-10 for the MT-32. In Sierra's early SCI games, for example, channel 1 contains PC speaker data and channels 11-15 contains Adlib data. A CM-64 and CM-500 use channels 11-16 for their CM-32P and thus unintended sound will play on these channels if you are using those modules.
Cakewalk has the ability to play MIDI files, and you should avail yourself of this functionality. However, before you play a file, make sure to transmit the sysex patch bank with the Sysx view first. Find an empty bank and send it.
4. Embed patch to MIDI file (optional)
Cakewalk Pro uses .syx files to load patch banks in its bank manager. Load the .MID, go into the Sysex View page and load the sysex bank. Click on the Auto button and save your MID file. That is it! Additionally, it may be advisable to also embed an MT-32 reset sysex command so that you are sure you are not using any leftover data from any MIDI you played on the device prior. Finally, you may want to add a few extra measures of silence at the beginning of the song.
I do not believe that embedding is the best way to present these files. Many MIDI players have difficulty with large files or files with lots of sysex in it. Windows Media Player does not have any such issues, nor does DOSmid.
Monday, March 24, 2014
Raw Adlib Capturing with DOSBox & Playback with DOS
One of DOSBox's best features is its ability to capture raw OPL commands and data with timing data to preserve as perfectly as possible the music data for Adlib and Sound Blaster cards. The capture feature supports OPL2, dual OPL2 and OPL3. One of the biggest advantages to this format is that the resulting files are quite small, maybe 6-7K for a single track or song. Another advantage is that you are not capturing a wav file of an emulated OPL2/3, you can take this .dro file and play it back on real hardware.
The resulting files have a .dro extension, which stands for DOSBox Raw OPL format. Fortunately, the capturing does not begin until the first OPL reads and writes are detected, so there will not be a lot of silent dead time. However, beginning with 0.73, released on May 27, 2009, DOSBox updated its DRO capture format to version 2, which is incompatible with any software written for version 0.1 (formerly known as 1.0). For the differences between the two formats, they can be found here :
http://www.shikadi.net/moddingwiki/DRO_Format
If you use DOSBox 0.72 or below (feature has been present since 0.63), then DRO version 1 files will be created. 0.73 or higher will only create DRO version 2 files. Since most people intend to use DOSBox 0.74 or SVN, I have put together this guide to software. I recommend using a current SVN build with the following patch applied (use the patch as given in the latest post) :
http://www.vogons.org/viewtopic.php?f=41&t=38029
As you might guess, capturing OPL music from a game may not always give a clean track. The track may loop and you will need to delete the repeated portion, or a second track may immediately segue from a first track, and you want the tracks separate. Sound effects may be playing. The program DRO Trimmer v4r4 will work with version 1 or 2 .dro files, and is quite easy to use. It also functions as a player for either type of DRO version file. Get it here :
http://www.jestarjokin.net/apps/drotrimmer
As its name implies, DRO Trimmer is a bare-bones trimmer. If you want to use fade-ins and fade-outs or other more sophisticated editing techniques, you will need to use a tracker. I do not know of any that work with the .DRO format. Nor do I know of any utilities that would convert DRO into a tracker-friendly format like S3M.
The mainstay of playing Adlib files in DOS on real hardware is a program called AdPlay, based on the AdPlug library. It can play just about every OPL file format out there, including proprietary formats from Sierra, LucasArts, Origin, Apogee and Westwood. It also supports various tracker formats and Roland ROL and Creative Labs' CMF formats. However, the DOS port of AdPlay was last updated in 2007 and thus only supports DRO version 1 files. However, do not write it off just yet. Downloads are on this site :
http://adplug.sourceforge.net/index.php
More than just trimming DRO files, the DRO Trimmer program can also convert DRO version 2 files into DRO version 1 files. Additionally, there is a program called DRO2IMF, which will convert DRO version 1 and 2 files into the IMF format that Apogee games use. It is located here :
http://www.shikadi.net/utils/dro2imf
You will also need a DPMI extender to run AdPlay, and the one this program expects is called csdpmi. For this reason, a 386 or better is required for playback. A version that works with AdPlay can be found here :
ftp://ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi5b.zip
AdPlay will play IMF files and DRO version 1 without a problem, so either should work as a solution. However, I found that the converted IMF file plays correctly with AdPlay while the converted DRO file did not. I assume a natural DRO version 1 file, as recorded from DOSBox 0.72 or below, would work correctly with AdPlay. However, because DRO version 1 files are less accurate and would not have the benefit of the patch identified above, I would not advise using the older DOSBox for accurate OPL capture.
Another solution is a program called imfplay, which has the benefit of working with .DRO version 2 files without conversion. This program I have personally tested in my 486DX2/66. However, there are several caveats with using it on real hardware. First, it only supports OPL2 writes, OPL3 writes in a DRO file are ignored. The irony of this limitation will soon be apparent. Second, the cache of the 486, internal and external, must be disabled or the music will come out garbled. Whether it works on faster machines is unknown to me. Third, a sound card with an OPL3 chip must be used. OPL3 chips require fewer delays with port writes than OPL2 chips, and imfplay was intended to work with DOSBox, which does not care about delays to its emulated OPL chips. AdPlay does not have the OPL2 limitation or the slowdown requirement. You can find imfplay here :
http://software.kvee.cz/imfplay/
One thing I initially overlooked when I first wrote this post was that Harekiet, one of the authors of DOSBox, had written a small utility called DROPLAY that would allow DOSBox to play the v.2 DRO files made with DOSBox 0.73 and later versions. You can get it in the last post from here :
http://www.vogons.org/viewtopic.php?f=32&t=16217
DROPLAY does work on real hardware, so you can use it with a 486 or even something lesser to play back DRO v.2 tunes. I would prefer to use DRO files over a converted IMF file because the IMF file may require timing information that seems specific to Apogee games but may not be applicable generally to OPL game music.
The resulting files have a .dro extension, which stands for DOSBox Raw OPL format. Fortunately, the capturing does not begin until the first OPL reads and writes are detected, so there will not be a lot of silent dead time. However, beginning with 0.73, released on May 27, 2009, DOSBox updated its DRO capture format to version 2, which is incompatible with any software written for version 0.1 (formerly known as 1.0). For the differences between the two formats, they can be found here :
http://www.shikadi.net/moddingwiki/DRO_Format
If you use DOSBox 0.72 or below (feature has been present since 0.63), then DRO version 1 files will be created. 0.73 or higher will only create DRO version 2 files. Since most people intend to use DOSBox 0.74 or SVN, I have put together this guide to software. I recommend using a current SVN build with the following patch applied (use the patch as given in the latest post) :
http://www.vogons.org/viewtopic.php?f=41&t=38029
As you might guess, capturing OPL music from a game may not always give a clean track. The track may loop and you will need to delete the repeated portion, or a second track may immediately segue from a first track, and you want the tracks separate. Sound effects may be playing. The program DRO Trimmer v4r4 will work with version 1 or 2 .dro files, and is quite easy to use. It also functions as a player for either type of DRO version file. Get it here :
http://www.jestarjokin.net/apps/drotrimmer
As its name implies, DRO Trimmer is a bare-bones trimmer. If you want to use fade-ins and fade-outs or other more sophisticated editing techniques, you will need to use a tracker. I do not know of any that work with the .DRO format. Nor do I know of any utilities that would convert DRO into a tracker-friendly format like S3M.
The mainstay of playing Adlib files in DOS on real hardware is a program called AdPlay, based on the AdPlug library. It can play just about every OPL file format out there, including proprietary formats from Sierra, LucasArts, Origin, Apogee and Westwood. It also supports various tracker formats and Roland ROL and Creative Labs' CMF formats. However, the DOS port of AdPlay was last updated in 2007 and thus only supports DRO version 1 files. However, do not write it off just yet. Downloads are on this site :
http://adplug.sourceforge.net/index.php
More than just trimming DRO files, the DRO Trimmer program can also convert DRO version 2 files into DRO version 1 files. Additionally, there is a program called DRO2IMF, which will convert DRO version 1 and 2 files into the IMF format that Apogee games use. It is located here :
http://www.shikadi.net/utils/dro2imf
You will also need a DPMI extender to run AdPlay, and the one this program expects is called csdpmi. For this reason, a 386 or better is required for playback. A version that works with AdPlay can be found here :
ftp://ftp.delorie.com/pub/djgpp/current/v2misc/csdpmi5b.zip
AdPlay will play IMF files and DRO version 1 without a problem, so either should work as a solution. However, I found that the converted IMF file plays correctly with AdPlay while the converted DRO file did not. I assume a natural DRO version 1 file, as recorded from DOSBox 0.72 or below, would work correctly with AdPlay. However, because DRO version 1 files are less accurate and would not have the benefit of the patch identified above, I would not advise using the older DOSBox for accurate OPL capture.
Another solution is a program called imfplay, which has the benefit of working with .DRO version 2 files without conversion. This program I have personally tested in my 486DX2/66. However, there are several caveats with using it on real hardware. First, it only supports OPL2 writes, OPL3 writes in a DRO file are ignored. The irony of this limitation will soon be apparent. Second, the cache of the 486, internal and external, must be disabled or the music will come out garbled. Whether it works on faster machines is unknown to me. Third, a sound card with an OPL3 chip must be used. OPL3 chips require fewer delays with port writes than OPL2 chips, and imfplay was intended to work with DOSBox, which does not care about delays to its emulated OPL chips. AdPlay does not have the OPL2 limitation or the slowdown requirement. You can find imfplay here :
http://software.kvee.cz/imfplay/
One thing I initially overlooked when I first wrote this post was that Harekiet, one of the authors of DOSBox, had written a small utility called DROPLAY that would allow DOSBox to play the v.2 DRO files made with DOSBox 0.73 and later versions. You can get it in the last post from here :
http://www.vogons.org/viewtopic.php?f=32&t=16217
DROPLAY does work on real hardware, so you can use it with a 486 or even something lesser to play back DRO v.2 tunes. I would prefer to use DRO files over a converted IMF file because the IMF file may require timing information that seems specific to Apogee games but may not be applicable generally to OPL game music.
Subscribe to:
Posts (Atom)














