3.1 MSX­MUSIC ハードウェア ​ 3.1 MSX­Music Hardware 3.1.1 メモリの構成 3.1.1 Memory configuration 図7.18 MSX­MUSICのメモリ構成 Figure 7.18 MSX­MUSIC memory configuration 3.1.2 I/Oの構成 3.1.2 I/O configuration 1.本体内蔵の場合 1. If its a built­in unit 表7.19 MSX­MUSIC I/O構成(本体内蔵) Table 7.19 MSX­MUSIC I/O configuration (built­in) I/Oアドレス Read/Write OPLLレジスタ名 I/O OPLL Register name Address 7CH W アドレスレジスタ A ​ddress register 7DH W データレジスタ D ​ata register 2.外付けの場合 2. External unit パナアミューズメントカートリッジ2準拠 Pana amusement cartridge 2 compliance 表7.20 MSX­MUSIC I/O構成(外付け) Table 7.20 MSX­MUSIC I/O configuration (external) I/Oアドレス メモリアドレス Read/Write OPLLレジスタ名 I/O Memory address OPLL Register name Address 7CH 7FF4H W アドレスレジスタ A ​ddress register 7DH 7FF5H W データレジスタ D​ata register 3.1.3 内蔵・外付け判別データ 3.1.3 Built­in and external distinction data 表7.21 内蔵・外付け判別データ Table 7.21: Built­in and external distinction data アドレス データ データ 「PAC2」の文字列は、「パナアミューズメントカートリッジ2」の Address (内蔵) (外付け) 場合。 Data Data この4バイトの文字列は、メーカーごとに異なる任意の文字列でか (built­in (externa まわない。 ) l) In the case of the "Pana Amusement Cartridge 2", the character string is "PAC2" . Different arbitrary character strings for every maker may be sufficient as 4 bytes of this character string. 4018H 41h 'A' 50h 'P' 4019H 50h 'P' 41h 'A' 401AH 52h 'R' 43h 'C' 401BH 4Ch 'L' 32h '2' 401CH 4Fh 'O' 4Fh 'O' 401DH 50h 'P' 50h 'P' 401EH 4Ch 'L' 4Ch 'L' 401FH 4Ch 'L' 4Ch 'L' MSX­MUSICはオプション機器ですから、カートリッジを外付けすることにより、後からFM音 源を追加することができます。しかし、MSX­MUSICを内蔵したシステムにFM音源カートリッジ を外付けすると、ひとつのシステムに同一アドレスのFM音源LSIが2つ存在することになり、音 量が通常の2倍の大きさになってしまいます。 Because MSX­MUSIC is an optional equipment, by using an external cartridge, you can add an FM sound source at a later time. However, when connecting an external FM synthesizer cartridge to system a built­in MSX­MUSIC, it means that FM sound generator LSI at the same address is present two times on that system, and the volume becomes twice as large as normal. これを避けるために、外付けのカートリッジに内蔵されるソフトウェアは、そのカートリッジ 内の音源LSIの動作を許可するかどうかを4018Hからの「APRLOPLL」文字列の存在の有無を調 べ、文字列がなければカートリッジのFM音源をI/Oポートに接続します。 To avoid this, the software built in the cartridge external, checks for the presence of the 4018H and "APRLOPLL" string to determine whether or not to allow the operation of the sound source LSI of the cartridge, connecting to the I/O port FM sound of the cartridge if there is no string. 3.1.4 OPLLを直接アクセスする場合の注意 3.1.4 Warning about direct access to OPLL この章で公開された内容を利用すれば、I/OポートからOPLLを直接アクセスして音を鳴らすこ とができます。しかし、OPLLのレジスタへデータを書き込む場合、タイミングによっては、正 常に動作しなくなる可能性があります。したがって、商用のアプリケーションソフトウェアは直 接OPLLをアクセスしてはいけません。OPLLにアクセスする場合は、必ず、FM BIOSを使用する ようにして下さい。 If the contents exhibited in this chapter are used, and direct access of the OPLL is carried out from an I/O Port, sound can be produced. When writing data in the register of OPLL, it may stop however, operating normally depending on timing. Therefore, the commercial application software must not access OPLL directly. When you access OPLL, please be sure to use FM BIOS. 1.ウエイト 1. Wait OPLLでは、内部レジスタにアドレスやデータを書き込むと、次の動作に移るまでにはウエイ ト時間が必要です。このウエイト時間は、レジスタのアドレスの指定とデータの書き込みで異な ります。表7.22で指定された時間だけ、CPUはOPLLに対して、次の動作を待たなければなりま せん。 このウエイト時間を無視した場合は、そのときに設定したデータは保証されません。 In OPLL, When data is written to and address in the internal register, wait time it is necessary to ​his wait time differs when writing the data or specifying the address of the move to the next operation. T register. Duration is specified in table 7.22 how much CPU must wait OPLL for the next operation. 表7.22 OPLLのウエイト時間 Table 7.22 OPLL wait time モード ウエイト時間 Mode Wait time アドレス指定 3.36μsec Addressing データ書き込み 23.52μsec Writing data 2.内蔵と外付けの両方の音源に対応する方法 2. Method corresponding to the source of the sound of both internal and external 2. Method to support both internal and external sound modules 現在、市販されている外付けのMSX­MUSICカートリッジとしては、「パナアミューズメント カートリッジ2(以下、FM­PAC)」があります。FM­PACには、MSX­MUSIC内蔵マシンに装着さ れたときのことを考慮して、FM­PAC内の音源ICをON、OFFできるようになっています(「3.1.3 内蔵・外付け判別データ」参照)。 MSXに電源が入ったときは、FM­PAC内蔵音源ICはOFFになっていて、BASICでCALL MUSIC 命令が実行されたり、FM­BIOSの初期化ルーチンが呼ばれたりしたときに、もしMSX本体に音源 ICが内蔵されていなければONされます。 したがって、MSX­MUSICが内蔵されていない機種では、ユーザープログラムが直接OPLLをア クセスする場合、以下の方法でFM­PAC内蔵の音源ICをONしなければなりません。 1. 04018H番地から0401FH番地に次の内容を持っているスロットを探します。 DB "APRLOPLL" 2. もしあれば、MSX本体に音源ICが内蔵されているので、そのままで音源ICは操作できま す。 3. ない場合には、0401CH番地から0401FH番地に次の内容を持っているスロットを探しま す。 DB "OPLL" 4. もしなければFM音源IC自体が装着されていませんので、使用出来ません。 5. もしあればそのスロットの07FF6H番地のビット0を「1」にすることにより、FM音源ICを ONにできます。このときには、07FF6H番地の内容を一度読み出して、ビット0のみ「1」にして 書き込まなければならないことに注意して下さい。 The MSX­MUSIC cartridge external currently on the market, there "(hereinafter, FM­PAC) Panamax amusement cartridge 2". In FM­PAC, a thing when a machine with built­in MSX­MUSIC is equipped is taken into consideration, and sound source IC in FM­PAC is turned on, and can be turned off now (refer to "3.1.3 built­in and external distinction data"). When MSX is turned on, sound source IC with built­in FM­PAC is come by off, and when a CALL MUSIC command is executed by BASIC or initialization routine of FM­BIOS is called, it is turned on if sound source IC is not built­in an MSX body. Therefore, from the model in which MSX­MUSIC is not built, when a user program accesses OPLL directly, you have to turn on sound source IC with built­in FM­PAC by the following methods. 1. Look for a slot that has the following in 4018H address to address 401FH. DB "APRLOPLL" 2. If present, this sound source IC is internal to the MSX body, and sound source IC can be operated as such. 3. If not, look for a slot that has the following in the address 401CH to 401FH address. DB "OPLL" 4. If not found, the FM sound source IC itself was not attached, so cannot be used. 5. If present, FM sound IC can be turned ON by setting the 07FF6H address bit 0 of the slot to "1." Please note that reading 07FF6H beforehand, only the bit 0 must be set to "1", and rewrite there then.