Menu

#565 FS-CA1 ADPCM playback on MSX Basic does not work properly

Next_release
open
None
5
2015-02-12
2015-02-08
No

As I went through testing ADPCM related functions of the MSX-BASIC MSX-AUDIO add on driver commands I noticed it was impossible to obtain any output from the ADPCM audio function.

It would acknowledge commands and perform the actions but there would be no ADPCM audio being output (it also happen on the real hardware, while using the FS-CA1 BIOS on a NMS-1205 cartridge. I've been using version 1.1 of FRS's modded BIOS for some of those tests and the original 1.0 bios from Panasonic).

While investigating the issue I noticed that the design of NMS-1205 use Y8950(YM3801) chip GPIO bit 3 as muting switch control instead of the "SP OFF" pin specifically designed for that purpose. I then modified my NMS-1205 cartridge to use the "SP OFF" pin by adding a logic inverter to it's output and then disconnecting the existing mute switch circuit and re-connecting it to the newly added "/SP OFF"(inverted SP OFF) signal I just created. Now ADPCM commands cause sounds to play on the NMS-1205.

The FS-CA1 BIOS seems to be using GPIO bit3 for a different purpose because it sets the NMS-1205 muting switch to "mute" position every time a ADPCM function is executed. I do not know yet what the FS-CA1 BIOS is using the GPIO bit3 for but I suspect it's meant to cut the audio path from the microphone input to the computer audio return (and A/D input of the Y8950/YM3801 chip) while ADPCM function is not in use.

Within the attached zip file you will find a 720KB disk image with some examples of ADPCM data which can be loaded to MSX basic through "call load pcm" command, a sample program typed from the FS-CA1 manual which has been modified to load a sample from disk instead of copying from the FS-CA1 sample ROM storage (file #8, water drop noise) which can be tested with FRS's MSX AUDIO BIOS (since it does not implement the samples or the SYNTHE firmware).

To obtain a copy of the #8 ROM sample I had to export the sample data from the emulated FS-CA1 using "call copy pcm" and "call save pcm" commands. The success of exporting the sample data that way implies that the ROM mapper mechanism is emulated properly.

As the MSX AUDIO ROM is something that was designed specifically for the FS-CA1 device it's only logical that it would be coded with specific features of the said hardware in mind. Just like for example, the DOS1 ROM in a disk controller.

Therefore as these are not properly emulated at this point, only FM synthesis is working properly on the FS-CA1 emulation.

1 Attachments

Discussion

  • Manuel Bilderbeek

    Current mute implementation is done according to the information from https://sourceforge.net/p/openmsx/feature-requests/151/
    Apparently this is not the whole story? (It does not apply to ADPCM?)

     
  • Leonard Oliveira

    Regarding https://sourceforge.net/p/openmsx/feature-requests/151 , the bit mentioned by FRS is not a muting switch.

    The BIOS use SP-OFF for muting (it does toggle muting on and off through the appropriated register on the YM3801 chip. What is happening there is that the BIOS toggles the GPIO3 low every time any ADPCM function is executed.

    The datasheet states that one of the four GPIO bits is to be used as control for a low pass filter for the FM synthesis. I suppose that GPIO3 is being used as a bypass switch for the LPF (shorts input and output of the LPF so signal pass straight through it) as LPF on ADPCM is not beneficial for ADPCM or PCM reproduction.