<rom>
	<romid>
		<xmlid>88840617</xmlid>
		<internalidaddress>f52</internalidaddress>
		<internalidhex>88840617</internalidhex>
		<make>Mitsubishi</make>
		<market>EDM</market>
		<model>Lancer</model>
		<submodel>Evolution IX</submodel>
		<transmission>6MT</transmission>
		<year>2007</year>
		<flashmethod>mitsukernelocp</flashmethod>
		<memmodel>SH7055</memmodel>
	</romid>

	<include>88840017</include>
	<scaling name="1bytefactor" units="units" toexpr="x/((32/10)*100)" frexpr="x*((32/10)*100)" format="%.1f" min="1" max="2" inc="0.1" storagetype="uint16" endian="big"/>
	<scaling name="ECUTime" units="ms" toexpr="1000*x/102" frexpr="102*x/1000" format="%.0f" min="0" max="100000" inc="1" storagetype="uint16" endian="big"/>
	<scaling name="OffsetWGDC" units="WGDC Change" toexpr="(x-128)/2" frexpr="x*2+128" format="%.1f" min="-64" max="63.5" inc="0.5" storagetype="uint8" endian="big"/>
	<scaling name="Percent255" units="%" toexpr="100*x/255" frexpr="255*x/100" format="%.0f" min="0" max="100" inc="1" storagetype="uint8" endian="big"/>
	<scaling name="RPMPerKPH" units="RPM/KPH" toexpr="x/36.37" frexpr="36.37*x" format="%.0f" min="0" max="3000" inc="5" storagetype="uint16" endian="big"/>
	<scaling name="VoltsADC1023" units="Volts" toexpr="x*5/1023" frexpr="x*1023/5" format="%.3f" min="0" max="5" inc="0.005" storagetype="uint16" endian="big"/>
	<scaling name="WBAFR" units="a/f" toexpr="10.00+((16.99-10.00)*x/255)" frexpr="255*(x-10.00)/(16.99-10.00)" format="%.1f" min="0" max="32" inc="0.1" storagetype="uint16" endian="big"/>
	<scaling name="TimeInjCranking" units="ms" toexpr="x*0.008" frexpr="x/0.008" format="%.1f" min="0" max="500" inc="1" storagetype="uint16" endian="big"/>
		
	<table name="Tephra Mod Options" category="TephraMod" address="4821c" type="3D" scaling="uint16">
		<table name="X" type="Static X Axis" elements="1">
			<data>Value</data>
		</table>
		<table name="Y" type="Static Y Axis" elements="15">
			<data>Enable Valet Mode                                  ?</data>
			<data>+ Enable Auto-Valet on Fresh Ignition              ?</data>
			<data>Enable Alternate Maps Master  ADC0F=1, AutoICS=2   ?</data>
			<data>Restore ICS State on Ignition                      ?</data>
			<data>Flash ICS when on Alternate Map                    ?</data>
			<data>Flash CEL on Knock                                 ?</data>
			<data>+ Drop Boost on High-Knock                         ?</data>
			<data>Enable Manual ICS Linger                           ?</data>
			<data>Enable Spray ICS on Knock                          ?</data>
			<data>Enable No Lift to Shift                            ?</data>
			<data>Enable RearO2 Simulator                            ?</data>
			<data>Enable MAP Averaging                               ?</data>
			<data>Enable Manifold Temperature                        ?</data>
			<data>Enable WB02 Check AFR Safety                       ?</data>
			<data>+ Drop Boost on AFR Out of Range                   ?</data>
		</table>
	</table>

	<table name="KnockSum Required for Slow CEL (Low Knock)" category="TephraMod" address="4823a" type="1D" scaling="uint16"/>
	<table name="KnockSum Required for Fast CEL (High Knock)" category="TephraMod" address="4823c" type="1D" scaling="uint16"/>
	<table name="Load Required for CEL on Knock" category="TephraMod" address="4823e" type="1D" scaling="Load"/>	
	<table name="High Knock Boost Drop time" category="TephraMod" address="48240" type="1D" scaling="ECUTime"/>
	<table name="CEL on Knock flash time" category="TephraMod" address="48242" type="1D" scaling="ECUTime"/>

	<table name="Valet Rev Limit" category="TephraMod" address="48244" type="1D" scaling="RPMLimit"/>
	<table name="Valet Rev Limit Time to Activate" category="TephraMod" address="48246" type="1D" scaling="ECUTime"/>
	<table name="Valet Rev Limit Flash Time" category="TephraMod" address="48248" type="1D" scaling="ECUTime"/>

	<table name="Manual ICS Linger Time" category="TephraMod" address="4824a" type="1D" scaling="ECUTime"/>

	<table name="KnockSum Required for Spray" category="TephraMod" address="4824c" type="1D" scaling="uint16"/>
	<table name="Load Required for Spray on Knock" category="TephraMod" address="4824e" type="1D" scaling="Load"/>
	<table name="Spray on Knock time" category="TephraMod" address="48250" type="1D" scaling="ECUTime"/>

	<table name="NLTS RPM Drop" category="TephraMod" address="48252" type="1D" scaling="uint16"/>
	<table name="NLTS TPS Threshold" category="TephraMod" address="48254" type="1D" scaling="ThrottlePercentage"/>
	<table name="NLTS Speed Threshold" category="TephraMod" address="48256" type="1D" scaling="VehicleSpeed"/>
	<table name="NLTS Load Threshold" category="TephraMod" address="48258" type="1D" scaling="Load"/>

	<table name="Alternate Map Time to Activate" category="TephraMod" address="4825a" type="1D" scaling="ECUTime"/>
	<table name="Alternate Map Load Threshold" category="TephraMod" address="4825c" type="1D" scaling="Load"/>
	<table name="Alternate Map ADC0F Threshold" category="TephraMod" address="4825e" type="1D" scaling="Volts16"/>

	<table name="2byte to 1Byte Load Factor" category="TephraMod" address="48260" type="1D" scaling="1bytefactor"/>
	
  <table name="AFR Safety Load Threshold" category="TephraMod" address="48262" type="1D" scaling="Load"/>
	<table name="AFR Safety Min AFR" category="TephraMod" address="48264" type="1D" scaling="WBAFR"/>
	<table name="AFR Safety Max AFR" category="TephraMod" address="48266" type="1D" scaling="WBAFR"/>
	<table name="AFR Safety Boost Drop and Flash time" category="TephraMod" address="48268" type="1D" scaling="ECUTime"/>
		
	<!-- BEGIN ALTMAP DEFINITIONS -->
	<table name="Alternate Injector Scaling" category="TephraMod" address="38b40" type="1D" scaling="InjectorScaling"/>

	<table name="Alternate Hi Octane Fuel Map" category="TephraMod" address="38b4d" type="3D" swapxy="true" scaling="AFR">
		<table name="Engine Load" address="6fd0" type="X Axis" elements="20" scaling="Load"/>
		<table name="RPM" address="6fa8" type="Y Axis" elements="15" scaling="RPM"/>
	</table>

	<table name="Alternate Hi Octane Ignition Map #123" category="TephraMod" address="38c8d" type="3D" swapxy="true" scaling="Timing">
		<table name="Engine Load" address="7034" type="X Axis" elements="21" scaling="Load"/>
		<table name="RPM" address="7002" type="Y Axis" elements="20" scaling="RPM"/>
	</table>

	<table name="Base Wastegate Duty" category="TephraMod" address="3960d" type="3D" swapxy="true" scaling="WGDuty">
		<table name="Gear" address="491c2" type="X Axis" elements="7" scaling="uint16"/>
		<table name="RPM" address="7336" type="Y Axis" elements="16" scaling="RPM"/>
	</table>

	<table name="Alternate Base Wastegate Duty" category="TephraMod" address="38e4d" type="3D" swapxy="true" scaling="WGDuty">
		<table name="Gear" address="491c2" type="X Axis" elements="7" scaling="uint16"/>
		<table name="RPM" address="7336" type="Y Axis" elements="16" scaling="RPM"/>
	</table>

	<table name="Boost Desired Engine Load" category="TephraMod" address="3968d" type="3D" swapxy="true" scaling="Load8">
		<table name="Gear" address="491c2" type="X Axis" elements="7" scaling="uint16"/>
		<table name="RPM" address="7336" type="Y Axis" elements="16" scaling="RPM"/>
	</table>

	<table name="Alternate Boost Desired Engine Load" category="TephraMod" address="38ecd" type="3D" swapxy="true" scaling="Load8">
		<table name="Gear" address="491c2" type="X Axis" elements="7" scaling="uint16"/>
		<table name="RPM" address="7336" type="Y Axis" elements="16" scaling="RPM"/>
	</table>

  <table name="Alternate Cranking Enrichment IPW Adder (Main)" category="TephraMod" address="38f48" type="2D" scaling="TimeInjCranking">
    <table name="Coolant Temperature" address="7100" type="Y Axis" elements="9" scaling="Temp"/>
  </table>
  
  <!-- END ALTMAP DEFINITIONS -->
	
	<table name="WGDC=100% under this Load" category="TephraMod" address="492a8" type="1D" scaling="Load"/>
	<table name="RPM/Speed Ratio Filter Strength" category="TephraMod" address="4918c" type="1D" scaling="uint16"/>
	
	<table name="RPM/Speed to Gear" category="TephraMod" address="491b0" type="2D" scaling="uint8">
		<table name="RPM/Speed" address="4919a" type="Y Axis" elements="7" scaling="RPMPerKPH"/>
	</table>
	
	<table name="MAF IAT WGDC Correction" category="TephraMod" address="492cc" type="2D" scaling="OffsetWGDC">
		<table name="Degrees" address="492b6" type="Y Axis" elements="7" scaling="Temp"/>
	</table>
	
	<table name="TPS WGDC Correction" category="TephraMod" address="492f4" type="2D" scaling="Percent255">
		<table name="Throttle" address="492de" type="Y Axis" elements="6" scaling="ThrottlePercentage"/>
	</table>	

	<table name="Manifold Temperature Scaling" category="TephraMod" address="3856a" type="2D" scaling="Temp">
		<table name="Volts" address="3850a" type="Y Axis" elements="39" scaling="VoltsADC1023"/>
	</table>

</rom>
