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

<!-- Note: something weird is going on with these 2 parts of the Utility ROM:
     From 0x8D00 - 0xBFFF in Slot 3.3 = 0x8C40 - 0xBF40 in Slot 3.1.
     Note sure what that means for the actual ROM/mapper structure!
     Although the 64k RAM is memory mapped, it is not using the memory mapper
     of the S1985 for this, but one in an ASIC. The S1985 mapper is utilized by
     the FW only. The maximum memory supported by the ASIC is 128K (can be
     piggybacked on the first two chips). 
     All the ROMs are in a single mask ROM of 128K, a Fujitsu MB831000.
     mapper: 1_0_0_x_x_x_x_x, where xxxxx - 5 bit mapper register (from S1985)
     Firmware can be skipped by booting with DEL key.

     Thanks to Maxim Vlasov for this information!
-->

  <info>
    <manufacturer>Toshiba</manufacturer>
    <code>FS-TM1</code>
    <release_year>1986</release_year>
    <description>Italian MSX2 based on the Panasonic FS-A1(F)</description>
    <type>MSX2</type>
    <region>it</region>
  </info>

  <CassettePort/>

  <devices>

    <S1985 id="S1985"> <!-- includes 5 bits mapper-read-back -->
      <sramname>fs-tm1_s1985.sram</sramname>
    </S1985>

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

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

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

    <RTC id="Real time clock">
      <sramname>fs-tm1.cmos</sramname>
      <io base="0xB4" num="4" type="IO"/> <!-- S-1985 mirrors -->
    </RTC>

    <PrinterPort id="Printer Port">
      <io base="0x90" num="8" type="IO"/> <!-- S-1985 mirrors -->
      <bidirectional>true</bidirectional> <!-- S-1985 feature (but not used, nor implemented) -->
      <unused_bits>0x00</unused_bits>
    </PrinterPort>

    <primary slot="0">
      <ROM id="MSX BIOS with BASIC ROM">
        <rom>
          <filename>fs-tm1_basic-bios2.rom</filename>
          <sha1>7a69e9b9595f3b0060155f4b419c915d4d9d8ca1</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">
        <MemoryMapper id="Main RAM">
          <mem base="0x0000" size="0x10000"/>
          <size>64</size>
        </MemoryMapper>
      </secondary>

      <secondary slot="1">
        <ROM id="MSX Sub ROM">
          <rom>
            <filename>fs-tm1_msx2sub.rom</filename>
            <sha1>a4bdbdb20bf9fd3c492a890fbf541bf092eaa8e1</sha1>
          </rom>
          <mem base="0x0000" size="0x4000"/>
        </ROM>

        <ROM id="Utility Part 1">
          <rom>
            <filename>fs-tm1_utility1.rom</filename>
            <sha1>30737040d90c136d34dd409fe579bc4cca11c469</sha1>
          </rom>
          <mem base="0x4000" size="0x8000"/>
        </ROM>
      </secondary>

      <secondary slot="3">
        <ROM id="Utility Part 2">
          <rom>
            <filename>fs-tm1_utility2.rom</filename>
            <sha1>ff6e07d3976b0874164fae680ae028d598752049</sha1>
          </rom>
          <mem base="0x4000" size="0x8000"/>
        </ROM>
      </secondary>

    </primary>

  </devices>

</msxconfig>
