Back to G&T International Div.

MSX Technical Guidebook from ASCAT, a source of this article is here in Japanese.

MSX programs cause problems, especially when external FM-PAC are used. MSX2+s and turboRs have internal FM modules inside themselves, but balances between PSG and FM music were not standardized, therefore music data composed with Sony MSX2+ sound terrible when played with turboR, or vice versa. So, some owners of such machines recoded such programs to choose external FM-PAC, which you can adjust PSG-FM balance manually.

This document does not cover FM modules implemented by hands, or FM-PAK made by Cas Cremers, which behaves differently with FM-PAC. But I hope this can even help those developers who should support such machines.

Download Konami Music Data!!


*MSX-MUSIC is a kind of cheap MSX-AUDIO, which despite its rich potential no one bought. However, the way to handle them differ greatly, like that you have to access MSX-AUDIO with expanded BIOS, and to use FM-MUSIC you should interslot-call the ROM directly. I do not know how music chips

differ. Sound chip for MSX-MUSIC is YM2413 (OPLL). Refer to "MSX2+ Powerful Utilization" for details (Takamichi's note: I do not have this book).

MSX-AUDIO uses Y8950 (OPL). To use this chip, refer to "MSX-AUDIO Technical Information" from ASCII or something (T's note: what book is this??) When you are going to code a machine language program, for the handling methods are too uncommon in each, that you can never make up a single program which cover both. This means, if a software notifies itself as "MSX-AUDIO supported" it doesn't run on MSX-MUSIC. Other way round, too. Some games like XEVIOUS support both; probably they handle each in internal procession. This is possible because the music data themselves are quite common in each others.

About BASIC, booting methods are almost same - CALL AUDIO and CALL MUSIC - you can use same program with little modification. However, MSX-AUDIO-only commands like samplings do not run on MSX-MUSIC.

If you are going to use MSX-MUSIC from machine language routines, look up into "MSX2+ Powerful Utilization" for descriptions about FM-BIOS, a BIOS extended to handle MSX-MUSIC.

This book does not say how to locate a slot with MSX-MUSIC inserted in it, so see this;

*If you find 4 bytes from 401CH include 4 characters "OPLL" in a slot, that slot hold a MSX-MUSIC in it.

From address &4018H, there are 4 bytes that contain the FM-PAC product names (for example, "PAC2"). For those machines with FM already installed internally, those 4-letters are "APRL". There was a stupid game (of which my mercy will not reveal its name;), with its developer completely misguided that if 8 bytes from 4018H

are "PAC2OPLL" it means the machine has a MSX-MUSIC, thus could only support non-FM MSX with external FM-PAC.

"CALL MUSIC" statement initializes MSX-MUSIC when you are going to use MSX-MUSIC. By doing so, all variables will be cleared, and 807 bytes of work area will be reserved for this. Be careful when you are placing ML codes around the user area.

A0H bytes of work area is necessary to boot FM BIOS of MSX-MUSIC. Necessary stack size is 20H bytes.

You cannot locate the work area for FM BIOS on page 1. Also, locating one on page 0 might result in malfunction on some machines, so avoid page 0 too.

FM BIOS switches the slot in page 1 when it calls INIOPL. Switching itself does not wreak a problem; trouble is, that it does not return the slot into prior status. This means, that if you call INIOPL the page 1 slot might be altered , thus your program won't run even without apparent problems.

To avoid this, please save the status of slot 1 just prior you call INIOPL, and when you come back, switch the page 1 into prior status again. (A FM BIOS only change the status of expanded slot choice registers, so if you save the status of locations which are related to that part, it's OK).

- Cautions when you directly operate OPLL -

You need to perform following operations if you want to operate I/O port directly to use MSX-MUSIC. For, the machines with internal MSX-MUSIC has a protection facility, in case an external FM-PAC happens to be inserted into its slot, to avoid booting both MSX-MUSICs.

1. Firstly, look for a slot, with its 8 bytes of data from 4018H are 8 characters of "APPROPLL".

2. If there is such a slot, this means that machine has an internal MSX-MUSIC, so you can operate MSX-MUSIC using 7CH and 7DH I/Os.

3. If there isn't such a slot, look for a slot with its 4 bytes of data from 401CH are 4 characters of "OPLL".

4. If there isn't such a slot, it means MSX-MUSIC isn't on that machine, so you cannot run MSX-MUSIC.

5. If there is such a slot, (T's note: are you ready??) read what is in the address 7FF6H of that slot, and turn the bit 0 into 1 and write into again (T's note: like, if there is 42 (00101010) in 7FF6H, write 43 (00101011) into 7FF6H). Then you can use the MSX-MUSIC loaded into that slot in form of FM-PACK.

This check is totally unnecessary when you depend on FM BIOS. Refer to prior checks to access MSX-MUSIC.

When you handle I/O port directly to access MSX-MUSIC, always keep the wait periods below when you write the value to OPLL. If you don't keep these, settings in such cases won't be executed perhaps. When you are specifying address: 3.36 µseconds When you are writing a data into: 23.52 µseconds If you are using FM BIOS, it automatically kindly keep such waits. However, FM BIOS is too kind so it really stops while waiting, so if you want acceleration, you would better directly access I/O port than relying on FM BIOS. Such acts do not please ASCII Corporation, though.