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

  <info>
    <manufacturer>Sony</manufacturer>
    <code>HB-F500</code>
    <release_year>1985</release_year>
    <description>First desktop MSX2 by Sony, with 64kB RAM and built in double sided disk drive. Memory layout is special, not all software handles it correctly.</description>
    <type>MSX2</type>
    <region>jp</region>
  </info>

  <!-- Info provided by Peter Hanraets (without opening the machine), serial number 205158.
       There is also a 2nd version of this machine with a different slot layout. -->

  <CassettePort/>

  <devices>

    <Kanji id="Kanji ROM">
      <rom>
        <filename>hb-f500_kanjifont.rom</filename>
        <sha1>6acaf2eeb57f65f7408235d5e07b7563229de799</sha1>
      </rom>
      <io base="0xD8" num="2" type="O"/>
      <io base="0xD9" num="1" type="I"/>
    </Kanji>

    <PPI id="ppi">
      <sound>
        <volume>16000</volume>
      </sound>
      <io base="0xA8" num="8"/> <!-- S-3527 mirrors -->
      <keyboard_type>jp_ansi</keyboard_type>
      <has_keypad>true</has_keypad>
      <key_ghosting_sgc_protected>false</key_ghosting_sgc_protected>
      <code_kana_locks>true</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-3527 mirrors -->
      <io base="0x98" num="8" type="I"/> <!-- S-3527 mirrors -->
    </VDP>

    <PSG id="PSG">
      <keyboardlayout>50on</keyboardlayout>
      <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>hb-f500.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 -->
      <unused_bits>0x00</unused_bits> <!-- as measured on one Sony HB-F500P -->
    </PrinterPort>

    <primary slot="0">

      <secondary slot="0">
        <RAM id="Main RAM 1">
          <mem base="0x8000" size="0x8000"/>
          <initialContent encoding="gz-base64">eJz7/x8VMKCB/wTkSVWPLg8AEVA/wQ==</initialContent> <!-- chr(255)*16 + chr(0)*16 + chr(255)*16 + chr(0)*32 + chr(255)*16 + chr(0)*16 + chr(255)*16) - inversion of Main RAM 2! - approximately... there seem to be some pattern deviations -->
        </RAM>
        <ROM id="MSX BIOS with BASIC ROM">
          <rom>
            <filename>hb-f500_basic-bios2.rom</filename>
            <sha1>0081ea0d25bc5cd8d70b60ad8cfdc7307812c0fd</sha1>
          </rom>
          <mem base="0x0000" size="0x8000"/>
        </ROM>
      </secondary>

      <secondary slot="1">
        <ROM id="MSX Sub ROM">
          <rom>
            <filename>hb-f500_msx2sub.rom</filename>
            <sha1>b8e30d604d319d511cbfbc61e5d8c38fbb9c5a33</sha1>
          </rom>
          <mem base="0x0000" size="0x4000"/>
        </ROM>
        <WD2793 id="Memory Mapped FDC">
          <connectionstyle>Sony</connectionstyle>
          <motor_off_timeout_ms>4000</motor_off_timeout_ms>
          <drives>1</drives>
          <rom>
            <filename>hb-f500_disk.rom</filename>
            <sha1>e93b8da1e8dddbb3742292b0e5e58731b90e9313</sha1>
          </rom>
          <mem base="0x4000" size="0x8000"/>
        </WD2793>
      </secondary>

      <secondary slot="2">
        <RAM id="Main RAM 2">
          <mem base="0x0000" size="0x8000"/>
          <initialContent encoding="gz-base64">eJxjYEAF/9EAAwF5UtWjywMAEVA/wQ==</initialContent> <!-- (chr(0)*16 + chr(255)*16 + chr(0)*16 + chr(255)*32 + chr(0)*16 + chr(255)*16 + chr(0)*16) - inversion of Main RAM 1! - approximately... there seem to be some pattern deviations -->
        </RAM>
      </secondary>

      <secondary slot="3"/>

    </primary>

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

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

    <!-- Unlike Sony HB-F500P, it only has 2 cartridge slots -->

  </devices>

</msxconfig>
