<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE EDL PUBLIC "-//OPENEMULATOR//DTD EDL 1.0//EN" "http://www.openemulator.org/DTDs/edl-1.0.dtd">
<edl version="1.0" creator="OpenEmulator" framework="787" label="Apple-1" image="images/Apple/Apple-1.png" description="The Apple-1 is an early personal computer, and the first in combining a microprocessor with a connection for a keyboard and a monitor. It has a MOS 6502 microprocessor, 8 kiB RAM (at $0000-$0FFF and $E000-$EFFF), and 256 bytes ROM (at $FF00-$FFFF).">
    
    <device id="apple1" label="Apple-1" image="images/Apple/Apple-1.png">
        <setting ref="apple1.io" name="terminalSpeed" label="Terminal Speed" type="select" options="Standard,Enhanced"/>
        <setting ref="apple1.io" name="keyboardType" label="Keyboard" type="select" options="Standard,Full ASCII"/>
    </device>
    <port id="apple1.videoPort" ref="appleMonitorIII.connector" type="Composite Video Port" group="peripherals" label="Video Port" image="images/Connectors/RCA Female.png">
        <inlet ref="apple1.terminal" property="monitor" outletRef="monitor"/>
    </port>
    <port id="apple1.slot1" ref="appleACI.connector" type="Apple-1 Expansion Port" group="expansions" label="Expansion Port" image="images/Connectors/Edge44.png"/>
    <port id="apple1.slot2" ref="rdCFFA1.connector" type="Apple-1 Expansion Port" group="expansions" label="Expansion Port" image="images/Connectors/Edge44.png"/>
    <component id="apple1.controlBus" class="ControlBus">
        <property name="emulation" ref="emulation"/>
        <property name="device" ref="apple1"/>
        <property name="audio" ref="audio"/>
        <!-- Clock frequency: (14318180 crystal cycles/s) * (61 effective CPU cycles/scanline) / (910 crystal cycles/scanline) -->
        <property name="clockFrequency" value="959790.088"/>
        <property name="cpuClockMultiplier" value="1"/>
        <property name="cpu" ref="apple1.cpu"/>
        <property name="powerState" value="S0"/>
        <property name="resetOnPowerOn" value="1"/>
        <property name="resetCount" value="0"/>
        <property name="irqCount" value="0"/>
        <property name="nmiCount" value="0"/>
    </component>
    <component id="apple1.cpu" class="MOS6502">
        <property name="a" value="0x0"/>
        <property name="x" value="0x0"/>
        <property name="y" value="0x0"/>
        <property name="s" value="0x0"/>
        <property name="p" value="0x0"/>
        <property name="pc" value="0xff00"/>
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="memoryBus" ref="apple1.memoryBus"/>
    </component>
    <component id="apple1.memoryBus" class="AddressDecoder">
        <property name="size" value="0x10000"/>
        <property name="blockSize" value="0x100"/>
        <property name="floatingBus" ref="apple1.floatingBus"/>
        <property name="refRAM1" ref="apple1.ram1"/>
        <property name="mapRAM1" value="0x0000-0x0fff"/>
        <property name="refIO" ref="apple1.ioMemory"/>
        <property name="mapIO" value="0xd000-0xdfff"/>
        <property name="refRAM2" ref="apple1.ram2"/>
        <property name="mapRAM2" value="0xe000-0xefff"/>
        <property name="refROM" ref="apple1.rom"/>
        <property name="mapROM" value="0xf000-0xffff"/>
    </component>
    <component id="apple1.floatingBus" class="FloatingBus">
        <property name="type" value="ground"/>
    </component>
    <component id="apple1.ram1" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="0x1000"/>
        <property name="controlBus" ref="apple1.controlBus"/>
    </component>
    <component id="apple1.ioMemory" class="AddressDecoder">
        <property name="size" value="0x20"/>
        <property name="blockSize" value="0x10"/>
        <property name="floatingBus" ref="apple1.floatingBus"/>
        <property name="refPIA" ref="apple1.pia"/>
        <property name="mapPIA" value="0x10-0x1f"/>
    </component>
    <component id="apple1.pia" class="MC6821">
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="portA" ref="apple1.io"/>
        <property name="controlA" value="0x0"/>
        <property name="ddrA" value="0x0"/>
        <property name="dataA" value="0x0"/>
        <property name="ca1" value="0"/>
        <property name="ca2" value="0"/>
        <property name="controlBusA" ref=""/>
        <property name="portB" ref="apple1.io"/>
        <property name="controlB" value="0x0"/>
        <property name="ddrB" value="0x0"/>
        <property name="dataB" value="0x0"/>
        <property name="cb1" value="0"/>
        <property name="cb2" value="0"/>
        <property name="controlBusB" ref=""/>
    </component>
    <component id="apple1.io" class="Apple1IO">
        <property name="terminalSpeed" value="Standard"/>
        <property name="keyboardType" value="Standard"/>
        <property name="pia" ref="apple1.pia"/>
        <property name="dce" ref="apple1.terminal"/>
    </component>
    <component id="apple1.terminalRAM" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="1024"/>
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="powerOnPattern" value="0x20"/>
    </component>
    <component id="apple1.terminal" class="Apple1Terminal">
        <property name="dte" ref="apple1.io"/>
        <property name="cursorX" value="0"/>
        <property name="cursorY" value="0"/>
        <property name="emulation" ref="emulation"/>
        <property name="vram" ref="apple1.terminalRAM"/>
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="monitor" ref="appleMonitorIII.monitor"/>
        <property name="font" data="${resourcePath}/roms/Signetics/Signetics 2513 Video ROM.bin"/>
    </component>
    <component id="apple1.ram2" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="0x1000"/>
        <property name="controlBus" ref="apple1.controlBus"/>
    </component>
    <component id="apple1.rom" class="ROM">
        <property name="memoryImage" data="${resourcePath}/roms/Apple/Apple-1 Monitor ROM.bin"/>
    </component>
    
    <device id="appleMonitorIII" label="Apple Monitor III" image="images/Apple/Apple Monitor III.png">
        <setting ref="appleMonitorIII.monitor" name="videoBrightness" label="Brightness" type="slider" options="-1.0,1.0"/>
        <setting ref="appleMonitorIII.monitor" name="videoContrast" label="Contrast" type="slider" options="0.0,1.0"/>
        <setting ref="appleMonitorIII.monitor" name="videoVerticalCenter" label="Vertical Center" type="slider" options="-0.1,0.1"/>
        <setting ref="appleMonitorIII.monitor" name="videoVerticalSize" label="Vertical Size" type="slider" options="0.85,1.25"/>
    </device>
    <connector id="appleMonitorIII.connector" type="Composite Video Port">
        <inlet ref="appleMonitorIII.monitor" property="controlBus" outletRef="controlBus"/>
    </connector>
    <component id="appleMonitorIII.monitor" class="Monitor">
        <property name="device" ref="appleMonitorIII"/>
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="videoDecoder" value="Monochrome"/>
        <property name="videoBrightness" value="0.150000006"/>
        <property name="videoContrast" value="0.8000000119"/>
        <property name="videoSaturation" value="1.450000048"/>
        <property name="videoHue" value="0.2700000107"/>
        <property name="videoHorizontalCenter" value="0"/>
        <property name="videoHorizontalSize" value="1.049999952"/>
        <property name="videoVerticalCenter" value="0"/>
        <property name="videoVerticalSize" value="1.049999952"/>
        <property name="videoBandwidth" value="4500000"/>
        <property name="displayBarrel" value="0.1000000015"/>
        <property name="displayScanlineLevel" value="0.5"/>
        <property name="displayCenterLighting" value="0.5"/>
        <property name="displayPersistence" value="0.400000006"/>
        <property name="displayLuminanceGain" value="1.5"/>
    </component>
    
    <device id="appleACI" label="Apple-1 Cassette Interface Card" image="images/Apple/Apple-1 Cassette Interface Card.png">
        <setting ref="appleACI.io" name="volume" label="Volume" type="slider" options="0,1"/>
    </device>
    <connector id="appleACI.connector" type="Apple-1 Expansion Port">
        <inlet ref="appleACI.addressMapper" property="addressDecoder" outletRef="memoryBus"/>
        <inlet ref="appleACI.audioCodec" property="controlBus" outletRef="controlBus"/>
    </connector>
    <component id="appleACI.addressMapper" class="AddressMapper">
        <property name="addressDecoder" ref="apple1.memoryBus"/>
        <property name="mapIO" value="0xc000-0xc0ff"/>
        <property name="refIO" ref="appleACI.io"/>
        <property name="mapROM" value="0xc100-0xc1ff"/>
        <property name="refROM" ref="appleACI.rom"/>
        <property name="sel" value="IO,ROM"/>
    </component>
    <component id="appleACI.io" class="Apple1ACI">
        <property name="volume" value="1"/>
        <property name="noiseRejection" value="0.03999999911"/>
        <property name="audioCodec" ref="appleACI.audioCodec"/>
        <property name="rom" ref="appleACI.rom"/>
    </component>
    <component id="appleACI.audioCodec" class="AudioCodec">
        <property name="audio" ref="audio"/>
        <property name="controlBus" ref="apple1.controlBus"/>
        <property name="timeAccuracy" value="0.000001"/>
        <property name="filterSize" value="17"/>
        <property name="lowFrequency" value="20"/>
        <property name="highFrequency" value="10000"/>
    </component>
    <component id="appleACI.rom" class="ROM">
        <property name="memoryImage" data="${resourcePath}/roms/Apple/Apple-1 ACI ROM.bin"/>
    </component>
    
    <device id="rdCFFA1" label="R&amp;D CFFA1" image="images/R&amp;D/R&amp;D CFFA1.png">
        <setting ref="rdCFFA1.ataDevice" name="forceWriteProtected" label="Force Write Protected" type="checkbox"/>
    </device>
    <connector id="rdCFFA1.connector" type="Apple-1 Expansion Port">
        <inlet ref="rdCFFA1.addressMapper" property="addressDecoder" outletRef="memoryBus"/>
        <inlet ref="rdCFFA1.ram" property="controlBus" outletRef="controlBus"/>
    </connector>
    <component id="rdCFFA1.addressMapper" class="AddressMapper">
        <property name="addressDecoder" ref="apple1.memoryBus"/>
        <property name="mapRAM" value="0x1000-0x8fff"/>
        <property name="refRAM" ref="rdCFFA1.ram"/>
        <property name="mapROM" value="0x9000-0xaeff"/>
        <property name="refROM" ref="rdCFFA1.rom"/>
        <property name="mapIO" value="0xaf00-0xafff"/>
        <property name="refIO" ref="rdCFFA1.memoryAF00"/>
        <property name="sel" value="RAM,ROM,IO"/>
    </component>
    <component id="rdCFFA1.ram" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="0x8000"/>
        <property name="controlBus" ref="apple1.controlBus"/>
    </component>
    <component id="rdCFFA1.rom" class="ROM">
        <property name="memoryImage" data="${resourcePath}/roms/R&amp;D/CFFA1V1.0.bin"/>
    </component>
    <component id="rdCFFA1.memoryAF00" class="AddressDecoder">
        <property name="size" value="0x100"/>
        <property name="blockSize" value="0x20"/>
        <property name="floatingBus" ref="rdCFFA1.rom"/>
        <property name="mapIO" value="0xe0-0xff"/>
        <property name="refIO" ref="rdCFFA1.io"/>
    </component>
    <component id="rdCFFA1.io" class="RDCFFA">
        <property name="ataController" ref="rdCFFA1.ataController"/>
    </component>
    <component id="rdCFFA1.ataController" class="ATAController">
        <property name="drive1" ref="rdCFFA1.ataDevice"/>
    </component>
    <component id="rdCFFA1.ataDevice" class="ATADevice">
        <property name="device" ref="rdCFFA1"/>
        <property name="diskImage" value=""/>
        <property name="forceWriteProtected" value="0"/>
        <property name="maxSize" value="65535"/>
    </component>
    
</edl>
