<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="../XSLT/decoder.xsl"?>
<!DOCTYPE decoder-config SYSTEM "../DTD/decoder-config.dtd">

<!-- Copyright (C) JMRI 2005, 2006, 2007, 2008 All rights reserved -->
<!-- $Id: MRC_Athearn_BigBoy.xml,v 1.1 2009/07/03 06:44:50 jacobsen Exp $ -->
<!--                                                                        -->
<!-- JMRI is free software; you can redistribute it and/or modify it under  -->
<!-- the terms of version 2 of the GNU General Public License as published  -->
<!-- by the Free Software Foundation. See the "COPYING" file for a copy     -->
<!-- of this license.                                                       -->
<!--                                                                        -->
<!-- JMRI is distributed in the hope that it will be useful, but WITHOUT    -->
<!-- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or  -->
<!-- FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License  -->
<!-- for more details.                                                      -->

<decoder-config>
    <version author="Bill Chown" version="1" lastUpdated="20080308" />
    <version author="Bill Chown" version="2" lastUpdated="20080430" />
    <version author="Bill Chown" version="3" lastUpdated="20090109" />

    <!-- made from the MRC_1656 file (Pete Cesaro) pdsteam@aol.com -->
    <!-- heavily rebuilt for N Big Boy and Challenger Bill Chown orrrbrit2004@yahoo.com -->
    <!-- works for both loco types, despite apparent differences in the documentation -->
    <!-- works for both Athearn N scale loco types, small errors corrected -->
    <!-- works for both Athearn N scale loco types, comments and tooltips expanded -->

    <decoder>
        <family name="Athearn" mfg="MRC"
            lowVersionID="32" highVersionID="32">
        <model model="Athearn Big Boy and 4-8-4 FEF" numOuts="2" numFns="28"
            maxTotalCurrent="1.5A" extFnsMRC="yes">
    <!-- note All 28 functions are NMRA compatible -->
        </model>
        </family>

    <programming direct="yes" paged="yes" register="yes" ops="yes">
    </programming>

    <variables>

        <variable label="Short Address" CV="1" comment="Range 1-127"
            tooltip="Sets the Short, Primary or 2-digit address, CV 1, range 1-127"
                        item="Short Address" default="3">
            <shortAddressVal/>
        </variable>

        <variable label="Start voltage" CV="2" item="Vstart" default="0"
                tooltip="sets the motor voltage at Speed Step 1, range 0(default)-32, CV2"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Acceleration" CV="3" item="Accel" default="8"
                tooltip="Sets the acceleration rate (delay or momentum), range 0(default)-32, CV3"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Deceleration" CV="4" item="Decel" default="8"
                tooltip="Sets the deceleration rate (delay or momentum), range 0(default)-32, CV4"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Top voltage" CV="5" item="Vhigh" default="32"
                tooltip="sets the motor voltage at top Speed Step, range 0-32(default), CV5"
                comment="Range 0-32">
            <decVal max="32"/>
        </variable>

        <variable label="Manufacturer version number" CV="7" readOnly="yes"
                tooltip="CV7=32 for all Athearn N Big Boy and Challenger models, Read Only"
                item="Decoder Version" default="32">
            <decVal/>
        </variable>

        <variable label="Manufacturer ID" CV="8" readOnly="yes" tooltip="CV8=143 for MRC, Read Only"
                item="Manufacturer" default="143">
            <decVal/>
        </variable>

        <variable label="Long Address" CV="17" item="Long Address"
                tooltip="Sets the Extended (4 digit) address, range 128-9999, mapped to CV17 and 18"
                comment="4 digit address (Range 0001-9999)">
            <longAddressVal/>
        </variable>

        <variable label="Advanced consist address" CV="19" mask="XVVVVVVV" item="Consist Address"
                tooltip="CV19, range 1-127">
            <decVal/>
        </variable>

        <variable label="Functions Respond To Address" CV="21" mask="XXXXXXXV" item="Consist Function"
            tooltip="CV21, least bit, ">
                <enumVal>
                        <enumChoice choice="Locomotive Address Only"/>
                        <enumChoice choice="Respond to Consist Address"/>
                        </enumVal>
        </variable>

        <variable label="Normal direction of motion" CV="29"
                tooltip="CV29, '1' (least significant) bit, Forward(0)(default) or Reverse(1)"
                mask="XXXXXXXV"
                item="Locomotive Direction">
            <enumVal>
                <enumChoice choice="Forward"/>
                <enumChoice choice="Reverse"/>
            </enumVal>
        </variable>

        <variable label="Speed Steps" CV="29" mask="XXXXXXVX"
                tooltip="CV29, '2' bit. Sets the Speed Step for motor, also may affect some light settings"
                item="Speed Step Mode" default="1">
            <enumVal>
                <enumChoice choice="14"/>
                <enumChoice choice="28/128 (recommended)"/>
                </enumVal>
        </variable>

        <variable label="Analog conversion mode" CV="29"
                tooltip="CV29, '4' bit. Allows the loco to run on DC, default is Off"
                mask="XXXXXVXX" default="0"
                item="Analog (DC) Operation">
            <enumVal>
                <enumChoice choice="Off"/>
                <enumChoice choice="On"/>
                </enumVal>
        </variable>

        <variable label="Addressing Mode" CV="29" mask="XXVXXXXX" tooltip="CV29, '32' bit"
                item="Address Format">
            <enumVal>
                <enumChoice choice="2 digit addressing"/>
                <enumChoice choice="4 digit addressing"/>
            </enumVal>
        </variable>

        <variable label="Master Volume Control" CV="49" default="2" item="Sound Setting 1"
                tooltip="CV49, O=Off, 1=Low, 2=Mid(default), 3=High"
                comment="Range 0-3">
            <decVal max="3"/>
        </variable>

        <variable label="Whistle Type" CV="50" item="Sound Option 2" default="5"
                tooltip="CV50, range 0-13"
                comment="MRC claims Range 0-13 on Challenger, 0-18 on Big Boy">
            <decVal max="18"/>
            </variable>

        <variable label="Whistle Volume" CV="51" item="Sound Setting 2" default="3"
                tooltip="CV51, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Bell Type" CV="52" item="Sound Group 1 Option 3" default="0" tooltip="CV52, 4 bell versions, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Bell Volume" CV="53" item="Sound Setting 3" default="3"
                tooltip="CV53, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Bell Ring Rate" CV="54" item="Sound Group 3 Option 4" default="10"
                tooltip="CV54, range 0-50, lower is faster"
                comment="Range 0-50">
            <decVal max="50"/>
            </variable>

        <variable label="Chuff type" item="Sound Group 1 Option 4" CV="55" default="0" tooltip="CV55, 4 chuff versions, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Chuff volume" CV="56" item="Sound Setting 4" default="3"
                tooltip="CV56, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Brake Squeal Volume" CV="57" item="Sound Setting 5" default="1"
                tooltip="CV57, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Air Release Volume" item="Sound Setting 6" CV="58" default="3"
                tooltip="CV58, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Blower Hiss Volume" CV="59" item="Sound Setting 7" default="3"
                tooltip="CV59, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Fire box door volume" CV="60" item="Sound Setting 8" default="3"
                tooltip="CV60, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Injector Volume" CV="61" item="Sound Setting 11" default="3"
                tooltip="CV61, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Coupling Volume" CV="62" item="Sound Setting 12" default="3"
                tooltip="CV62, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Air Pump Volume" CV="63" item="Sound Setting 13" default="0"
                tooltip="CV63, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Rail Clack Volume" CV="64" item="Sound Setting 14" default="3"
                tooltip="CV64, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="User ID #1" CV="105" item="User Id #1" default="0"
            tooltip="CV105, range 0-255, code your own ID">
            <decVal max="255"/>
            </variable>

        <variable label="User ID #2" CV="106" item="User Id #2" default="0"
            tooltip="CV106, range 0-255, code your own ID">
            <decVal max="255"/>
            </variable>

        <variable label="Conductor volume" CV="112" item="Sound Setting 15" default="3"
                tooltip="CV112, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Directional Light enable/disable" item="Global lighting option 1" CV="113"                 default="1" tooltip="CV61, range 0(constant) or 1(directional)(Default)">
        <enumVal>
                 <enumChoice choice="Disable, constant lights"/>
                 <enumChoice choice="Enable, Directional"/>
                 </enumVal>
        </variable>

        <variable label="Air Pump Type" CV="114" item="Sound Option 6" default="1"
                tooltip="CV114, range 0-2, default 1"
                comment="Range 0-2">
            <decVal max="2"/>
            </variable>

        <variable label="Air brake squeal enable/disable" item="Sound Option 7" CV="115" default="1"
                tooltip="CV115,  range 0(off) or 1(enable)(Default)"
                comment="MRC docs, not on Big Boy">
        <enumVal>
                 <enumChoice choice="Disable"/>
                 <enumChoice choice="Enable"/>
                 </enumVal>
        </variable>

        <variable label="Shoveling volume" CV="118" item="Sound Setting 16" default="3"
                tooltip="CV118, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Coupling Fire Volume" CV="119" item="Sound Setting 17" default="3"
                tooltip="CV119, range 0-3"
                comment="Range 0-3">
            <decVal max="3"/>
            </variable>

        <variable label="Chuff Rate" CV="120" item="Sound Group 3 Option 5" default="12"
                tooltip="CV120, range 0-30, default 12"
                comment="Range 0-30">
            <decVal max="30"/>
            </variable>

        <variable label="Chuff Start Point" CV="121" item="Sound Group 3 Option 6" default="3"
                tooltip="CV121, range 0-7"
                comment="Range 0-7">
            <decVal max="7"/>
            </variable>

        <variable label="Double chuff enable" CV="122" item="Sound Group 1 Option 5" default="1"
                tooltip="CV122,  range 0(single) or 1(double)(Default)"
                comment="MRC docs, not on Big Boy, but it DOES work">
            <enumVal>
                 <enumChoice choice="Disable"/>
                 <enumChoice choice="Enable"/>
                 </enumVal>
            </variable>

        <variable label="Load Control Back EMF" CV="123" item="EMF Static Config" default="0"
                tooltip="CV123,  range 0(off)(Default) or 1(enable)">
             <enumVal>
                 <enumChoice choice="Off"/>
                 <enumChoice choice="On"/>
                 </enumVal>
            </variable>

        <variable label="Select Speed Curve" CV="124" item="Speed Table Selection"  default="0"
                tooltip="sets the motor voltage increase curve with Speed Steps, range 0(default)-2, CV124">
             <enumVal>
                 <enumChoice choice="Linear"/>
                 <enumChoice choice="Slow increase at slow speed"/>
                 <enumChoice choice="Fast increase at slow speed"/>
                 </enumVal>
            </variable>

    </variables>

        <resets>
            <factReset label="Reset All CVs" CV="125" default="1"/>
        </resets>

    </decoder>
    <pane name="MRC">
        <column>
            <label label="MRC notes "/>
            <label label=" "/>
            <label label="This decoder supports all program methods including register mode, paged mode, CV programming, "/>
            <label label="direct mode and programming on the main (OPS mode programming). Program the locomotive the same "/>
            <label label="way you would program any other NMRA compatible decoder with your DCC system. "/>
            <label label=" "/>
            <label label="Some DCC systems do not have enough power on the Program Track for programming sound decoders. "/>
            <label label="If your system is one of these, there are Program Track Boosters available from aftermarket DCC "/>
            <label label="suppliers. "/>
        </column>
    </pane>
</decoder-config>




 	  	 
