<?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="A-ONE" image="images/Achatz/A-ONE.png" description="The Achatz A-ONE (www.achatz.nl) is a fully functional replica of the Apple 1 computer. It has a WDC 65C02 microprocessor, 32 kiB RAM (at $0000-$7FFF), and 32 kiB bytes ROM (SBASM at $9000-$9FFF, BASIC at $E000-$EFFF, Krusader at $F000-$FEFF, monitor at $FF00-$FFFF).">
    
    <device id="aONE" label="A-ONE" image="images/Achatz/A-ONE.png">
        <setting ref="aONE.io" name="terminalSpeed" label="Terminal Speed" type="select" options="Standard,Enhanced"/>
        <setting ref="aONE.io" name="keyboardType" label="Keyboard" type="select" options="Standard,Full ASCII"/>
        <setting ref="aONE.memoryE000" name="sel" label="Memory at $E000" type="select" options="BASIC,RAM"/>
    </device>
    <port id="aONE.videoPort" ref="appleMonitorII.connector" type="Composite Video Port" group="peripherals" label="Video Port" image="images/Connectors/RCA Female.png">
        <inlet ref="aONE.terminal" property="monitor" outletRef="monitor"/>
    </port>
    <port id="aONE.slot1" ref="appleACI.connector" type="Apple-1 Expansion Port" group="expansions" label="Expansion Port" image="images/Connectors/Edge44.png"/>
    <port id="aONE.slot2" ref="rdCFFA1.connector" type="Apple-1 Expansion Port" group="expansions" label="Expansion Port" image="images/Connectors/Edge44.png"/>
    <component id="aONE.controlBus" class="ControlBus">
        <property name="emulation" ref="emulation"/>
        <property name="device" ref="aONE"/>
        <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="aONE.cpu"/>
        <property name="powerState" value="S0"/>
        <property name="resetOnPowerOn" value="1"/>
        <property name="resetCount" value="1"/>
        <property name="irqCount" value="0"/>
        <property name="nmiCount" value="0"/>
    </component>
    <component id="aONE.cpu" class="W65C02S">
        <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="aONE.controlBus"/>
        <property name="memoryBus" ref="aONE.memoryBus"/>
    </component>
    <component id="aONE.memoryBus" class="AddressDecoder">
        <property name="size" value="0x10000"/>
        <property name="blockSize" value="0x100"/>
        <property name="floatingBus" ref="aONE.floatingBus"/>
        <property name="refRAM" ref="aONE.ram"/>
        <property name="mapRAM" value="0x0000-0x7fff"/>
        <property name="refIO" ref="aONE.ioMemory"/>
        <property name="mapIO" value="0xd000-0xdfff"/>
        <property name="refROM" ref="aONE.rom"/>
        <property name="mapROM" value="0x8000-0x9fff,0xf000-0xffff"/>
    </component>
    <component id="aONE.memoryE000" class="AddressMapper">
        <property name="addressDecoder" ref="aONE.memoryBus"/>
        <property name="refBASIC" ref="aONE.rom"/>
        <property name="mapBASIC" value="0xe000-0xefff"/>
        <property name="refRAM" ref="aONE.ram"/>
        <property name="mapRAM" value="0xe000-0xefff"/>
        <property name="sel" value="BASIC"/>
    </component>
    <component id="aONE.floatingBus" class="FloatingBus">
        <property name="type" value="ground"/>
    </component>
    <component id="aONE.ram" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="0x8000"/>
        <property name="controlBus" ref="aONE.controlBus"/>
    </component>
    <component id="aONE.ioMemory" class="AddressDecoder">
        <property name="size" value="0x20"/>
        <property name="blockSize" value="0x10"/>
        <property name="floatingBus" ref="aONE.floatingBus"/>
        <property name="refPIA" ref="aONE.pia"/>
        <property name="mapPIA" value="0x10-0x1f"/>
    </component>
    <component id="aONE.pia" class="MC6821">
        <property name="controlBus" ref="aONE.controlBus"/>
        <property name="portA" ref="aONE.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="aONE.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="aONE.io" class="Apple1IO">
        <property name="terminalSpeed" value="Enhanced"/>
        <property name="keyboardType" value="Standard"/>
        <property name="pia" ref="aONE.pia"/>
        <property name="dce" ref="aONE.terminal"/>
    </component>
    <component id="aONE.terminalRAM" class="RAM">
        <property name="memoryImage" data="${packagePath}/${id}.bin"/>
        <property name="size" value="1024"/>
        <property name="controlBus" ref="aONE.controlBus"/>
        <property name="powerOnPattern" value="0x2B2020202020202020204150504C4520312020202020202020412D4F4E452020202020202020202B20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204F726967696E616C204170706C6520312064657369676E3A20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020537465766520576F7A6E69616B2020203139373520202020202020202020202020202020202020207777772E776F7A2E6F726720202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020412D4F6E652068617264776172652064657369676E3A2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204672616E7A2041636861747A202020203230303620202020202020202020202020202020202020207777772E61636861747A2E6E6C2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020566964656F20636F6E74726F6C6C657220736F6674776172653A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202053616E20426572676D616E73202020203230303620202020202020202020202020202020202020207777772E736270726F6A656374732E636F6D2020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020204B6579626F61726420636F6E74726F6C6C657220736F6674776172653A202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202042656E205A696A6C73747261202020203230303620202020202020202020202020202020202020207777772E62656E73686F626279636F726E65722E6E6C20202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202B2020506C6561736520707265737320524553455420746F2067657420737461727465642E20202B"/>
    </component>
    <component id="aONE.terminal" class="Apple1Terminal">
        <property name="dte" ref="aONE.io"/>
        <property name="cursorX" value="0"/>
        <property name="cursorY" value="0"/>
        <property name="clearScreenOnCtrlL" value="1"/>
        <property name="splashScreen" value="1"/>
        <property name="splashScreenActive" value="1"/>
        <property name="emulation" ref="emulation"/>
        <property name="controlBus" ref="aONE.controlBus"/>
        <property name="vram" ref="aONE.terminalRAM"/>
        <property name="monitor" ref="appleMonitorII.monitor"/>
        <property name="font" data="${resourcePath}/roms/Achatz/A-ONE Video ROM.bin"/>
    </component>
    <component id="aONE.rom" class="ROM">
        <property name="memoryImage" data="${resourcePath}/roms/Achatz/A-ONE ROM.bin"/>
    </component>
    
    <device id="appleMonitorII" label="Apple Monitor II" image="images/Apple/Apple Monitor II.png">
        <setting ref="appleMonitorII.monitor" name="videoBrightness" label="Brightness" type="slider" options="-1.0,1.0"/>
        <setting ref="appleMonitorII.monitor" name="videoContrast" label="Contrast" type="slider" options="0.0,1.0"/>
        <setting ref="appleMonitorII.monitor" name="videoVerticalCenter" label="Vertical Center" type="slider" options="-0.1,0.1"/>
        <setting ref="appleMonitorII.monitor" name="videoVerticalSize" label="Vertical Size" type="slider" options="0.85,1.25"/>
    </device>
    <connector id="appleMonitorII.connector" type="Composite Video Port">
        <inlet ref="appleMonitorII.monitor" property="controlBus" outletRef="controlBus"/>
    </connector>
    <component id="appleMonitorII.monitor" class="Monitor">
        <property name="device" ref="appleMonitorII"/>
        <property name="controlBus" ref="aONE.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="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="aONE.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="aONE.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="aONE.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="aONE.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>
