<?xml version="1.0" ?>
<!DOCTYPE msxconfig SYSTEM 'msxconfig2.dtd'>
<msxconfig>

<!-- 
Assumed to be the same as CX7/128, but then with SFG-05 and FM Voicing Program II built in.
Not derived from real machine, but just copied from CX7/128 file.
-->

  <info>
    <manufacturer>Yamaha</manufacturer>
    <code>CX7M/128</code>
    <release_year>1985</release_year>
    <description>Music Computer: Japanese MSX2 with built in SFG-05 module.</description>
    <type>MSX2</type>
    <region>jp</region>
  </info>

  <MapperReadBackBits>largest</MapperReadBackBits>

  <CassettePort/>

  <devices>

    <PPI id="ppi">
      <sound>
        <volume>16000</volume>
      </sound>
      <io base="0xA8" num="8"/> <!-- S-3527 mirrors -->
      <keyboard_type>jp_ansi</keyboard_type>
      <has_keypad>false</has_keypad>
      <key_ghosting_sgc_protected>false</key_ghosting_sgc_protected>
      <code_kana_locks>true</code_kana_locks>
    </PPI>

    <VDP id="VDP">
      <version>V9938</version>
      <vram>128</vram>
      <io base="0x98" num="8" type="O"/> <!-- S-3527 mirrors -->
      <io base="0x98" num="8" type="I"/> <!-- S-3527 mirrors -->
    </VDP>

    <PSG id="PSG">
      <type>YM2149</type> <!-- in S-3527 MSX-ENGINE -->
      <sound>
        <volume>21000</volume>
      </sound>
      <io base="0xA0" num="8" type="IO"/> <!-- S-3527 mirrors -->
      <ignorePortDirections>true</ignorePortDirections> <!-- not sure, but guess based on use of Engine IC -->
    </PSG>

    <RTC id="Real time clock">
      <sramname>cx7-128.cmos</sramname>
      <io base="0xB4" num="2" type="O"/>
      <io base="0xB5" num="1" type="I"/>
    </RTC>

    <PrinterPort id="Printer Port">
      <io base="0x90" num="8" type="IO"/> <!-- S-3527 mirrors -->
      <status_readable_on_all_ports>true</status_readable_on_all_ports> <!-- S-3527 property -->
    </PrinterPort>

    <primary slot="0">
      <ROM id="MSX BIOS with BASIC ROM">
        <rom>
          <filename>cx7-128_basic_bios2.rom</filename>
          <sha1>0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd</sha1>
        </rom>
        <mem base="0x0000" size="0x8000"/>
      </ROM>
    </primary>

    <primary external="true" slot="1"/>

    <primary external="true" slot="2"/>

    <primary slot="3">

      <secondary slot="0">
        <ROM id="MSX Sub ROM">
          <rom>
            <filename>cx7-128_msx2sub.rom</filename>
            <sha1>b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33</sha1>
          </rom>
          <mem base="0x0000" size="0x4000"/>
        </ROM>
      </secondary>

    <!-- Note that this device can be plugged out. What is left is not a standard MSX cartridgeslot, but a kind of mini cartridgeslot. -->
      <secondary slot="1">
        <ROM id="FM Voicing Program II">
          <rom>
            <sha1>30747a56f45389be76362f7fc55d673f1bff8312</sha1>
            <filename>cx7m-128_fmvoicingprogramii.rom</filename>
          </rom>
          <mem base="0x4000" size="0x4000"/>
        </ROM>
      </secondary>

      <secondary slot="2">
        <MemoryMapper id="Main RAM">
          <size>128</size>
          <mem base="0x0000" size="0x10000"/>
          <initialContent encoding="gz-base64">eJz7/58ywEAhoNB6iu0f6u4ftX9gwUC7n1L7AT7T/hA=</initialContent> <!--1010010101011010 where 1= (chr(255) * 64) and 0= (chr(0) * 64)) -->
        </MemoryMapper>
      </secondary>

    <!-- Note that this device can be plugged out. What is left is not a
    standard MSX cartridgeslot, but a 60 pins card edge connector, carrying all
    MSX cartridgeslot signals. -->
      <secondary slot="3">
        <YamahaSFG id="Yamaha SFG-05">
          <variant>YM2164</variant>
          <mem base="0x0000" size="0x10000"/>
          <sound>
            <volume>30000</volume>
          </sound>
          <rom>
            <sha1>6680d7118d85418813f1db9449bf3e20942b16da</sha1>
            <filename>sfg-05.rom</filename>
          </rom>
        </YamahaSFG>
      </secondary>

    </primary>

  </devices>

</msxconfig>
