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

  <info>
    <manufacturer>Yamaha</manufacturer>
    <code>CX5F</code>
    <release_year>1984</release_year>
    <description>Music Computer: Japanese version of the CX5M, with 32kB RAM and built in SFG-01.</description>
    <type>MSX</type>
    <region>jp</region>
  </info>

  <!-- Note: Peter's Yamaha CX5 (or CX-5 as per the type plate) with serial
  3001652 shows identical results. It has a simpler/cheaper keyboard, but the
  properties from software point of view are identical.
  For some reason, the CX5 contained an SFG-01, but the CX5F did not... -->

  <!-- Based on machine of Peter Hanraets, with serial nr. 6004872
       ident:
        VDP TMS99xx (4k/16k effect, sprite clones, no address latch, mirrored/mixed mode present
        Z80 scf: 01C529ED01D429FC (dunno)
        Z80 cpl: 3AFF12D7 (standard)
        Z80 out (c), 0: 0 (MSX)
        PSG pin 6/7 quirk: C (YES)
        YM2149 like PSG mask

       Keyboard matrix: graph-shift ghosting present

       Photos:
       - Type plate says: CX-5F
       - CPU: SHARP LH0080A
       - PSG: Yamaha YM2149
       - VDP: cannot be read, but board says TMS9928A (TMS9918A)

       keyboard: katakana no on 0-key (ANSI)

   -->

  <CassettePort/>

  <devices>

    <PPI id="ppi">
      <sound>
        <volume>16000</volume>
      </sound>
      <io base="0xA8" num="4"/>
      <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">
      <io base="0x98" num="4" type="O"/>
      <io base="0x98" num="2" type="I"/>
      <version>TMS99X8A</version>
    </VDP>

    <PSG id="PSG">
      <type>YM2149</type>
      <sound>
        <volume>21000</volume>
      </sound>
      <io base="0xA0" num="4" type="IO"/>
      <ignorePortDirections>false</ignorePortDirections> <!-- not sure, but guess based on discrete PSG chip -->
    </PSG>

    <PrinterPort id="Printer Port">
      <io base="0x90" num="2"/>
    </PrinterPort>

    <primary slot="0">
      <RAM id="Main RAM">
        <mem base="0x8000" size="0x8000"/>
        <initialContent encoding="hex">FF00</initialContent>
      </RAM>
      <ROM id="MSX BIOS with BASIC ROM">
        <rom>
          <sha1>302afb5d8be26c758309ca3df611ae69cced2821</sha1>
          <filename>cx5f_basic-bios1.rom</filename>
        </rom>
        <mem base="0x0000" size="0x8000"/>
      </ROM>
    </primary>

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

    <!-- Note that this slot is not a standard MSX cartridgeslot, but a 50 pins
    male connector, carrying all MSX cartridgeslot signals. On a real machine
    you can use the Yamaha CA-01 Single Cartridge Adapter to change this slot
    into a normal MSX cartridge slot. As openMSX doesn't model these, consider
    this slot to have this adapter connected... -->
    <primary external="true" slot="2"/>

    <primary slot="3">

    <!-- Note that this device can be plugged out. What is left is not a standard MSX cartridgeslot, but a 60 pins male edge connector, carrying all MSX cartridgeslot signals. -->
      <YamahaSFG id="Yamaha SFG-01">
        <variant>YM2151</variant>
        <mem base="0x0000" size="0x10000"/>
        <sound>
          <volume>30000</volume>
        </sound>
        <rom>
          <sha1>49a1750c10e407293af6bce27a02e99307ceba12</sha1>
          <filename>sfg-01.rom</filename>
        </rom>
      </YamahaSFG>

    </primary>

  </devices>

</msxconfig>
