WebMSX icon indicating copy to clipboard operation
WebMSX copied to clipboard

After CALL MUSIC, PLAY doesn't produce sound in Turbo-R

Open mrparn opened this issue 4 years ago • 5 comments

When you use the MSX-Music command CALL MUSIC in any MSX Turbo-R machine configuration, the PLAY command stops producing sound. You can test this by writing the following in the MSX-BASIC prompt:

PLAY "C"
CALL MUSIC
PLAY "C"

This test sould produce the sound before and after CALL MUSIC. It was tested in all MSX Turbo-R, MSX2+ and MSX2 machine configurations. It worked in all MSX2+ and MSX2 machine configurations and it failed in all MSX Turbo-R configurations. In this last case it didn't matter whether R800 mode was active or not (tested with a DOS1 disk boot image). The command PLAY #2,"C", which would normally play through the FM instead of the PSG and is only enabled after CALL MUSIC, also failed to produce sound. It still worked as expected in MSX2+ and MSX2 machine configurations.

Before testing, I thought this might be caused by the different MSX-Music ROMs used by each machine configuration. I identified the two ROMs used by creating MD5 hashes of each ROM. I found out that while the European and Japanese Turbo-R used the same ROM, the American Turbo-R used a different one, which turns out to be the same used by other European and Japanese machines, while the American MSX2+ machine used the same ROM as the European and Japanese TurboR machines, according to this table:

Machine Configuration MD5 Hash
MSX2+ (America) C688A229F834F95F8C64DF7D33188CD8
MSX2+ (Europe) 38578A15454E89C17E9324303C6102C6
MSX2+ (Japan) 38578A15454E89C17E9324303C6102C6
MSX Turbo-R (America) 38578A15454E89C17E9324303C6102C6
MSX Turbo-R (Europe) C688A229F834F95F8C64DF7D33188CD8
MSX Turbo-R (Japan) C688A229F834F95F8C64DF7D33188CD8

The C688 one is the same used by a real MSX Turbo-R FS-A1GT, while I couldn't identify the other ROM. I don't think this has anything to do with the current issue, but since I originally thought this was the cause of the problem, I'm including it for the sake of completeness and to keep others from making the same mistaken assumption I did if they happen to stumble upon this ROM situation.

mrparn avatar Nov 15 '20 01:11 mrparn

Thanks Pablo, that is a very nice report. I'll have a look at this whenever possible.

Paulo

ppeccin avatar Nov 15 '20 01:11 ppeccin

Just a first info... You probably got the ROMS from the wrong locations for comparing. The hashes don't match with mine.

Also, (verified) all 3 TurboR machines use the same "special" TR MSX MUSIC ROM in slot 0-2, while all other machines use the same "normal" MSX MUSIC ROM in slot 3-3. The "special" TR ROM should be the same as the GT uses... But the hash you gave is different from what I have.

ppeccin avatar Nov 15 '20 01:11 ppeccin

I didn't have the standalone ROMs for comparing, so I dumped them with Tiny Slot Checker v2 from WebMSX and OpenMSX. I'll check again just to be sure. My hash-generating tool is probably bad, but at least it generated the same hash when comparing to the GT MSX-Music ROM from OpenMSX and most of the Turbo-R MSX-Music ROMs I dumped.

mrparn avatar Nov 15 '20 13:11 mrparn

HRA! said (via Twitter) that the GT MSX-Music ROM depends on i8253 emulation to work, which is also used for MIDI. Since WebMSX doesn't support MIDI, this could be the reason CALL MUSIC doesn't work. I made a quick experiment: I selected a Turbo-R machine, disabled MSX-Music extension and loaded the MSX-Music ROM from FS-A1ST in slot A. It seems to have worked. I tried in all three configurations. PLAY #2 didn't work, but I presume that's because FM emulation was disabled as well.

mrparn avatar Nov 15 '20 13:11 mrparn

Yes, I also got the same advice from FRS and I think that can actually be the problem. I remember switching from the ST to the GT version right before release because it has some bugfixes, but that MIDI thing went unnoticed. I will run some tests and if the ROM from the ST works, we'll release a fix for this. Thanks!

ppeccin avatar Nov 16 '20 02:11 ppeccin