Command Module Communication protocols and messages.
; ==============================================================================
; The following is what is sent to the command module.  This sequence is the
;  current operating conditions......
;
; ECU RPM is ignition trigger period times 125,000
;
;ram_003e       equ     $003e   00c2    ; RPM from the ECU      hi byte
;ram_003f       equ     $003f   00c3    ;  .....RPM             low byte
;ram_0041       equ     $0041   00c5    ; current Vacuum from ECU       hi byte
;ram_0042       equ     $0042   00c6    ;  .....VAC                     lo byte
;ram_0043       equ     $0043   00c7    ; SPK - Spark Angle stash
;ram_0044       equ     $0044   00c8    ; FUEL - injector Pulse Width   hi byte
;ram_0045       equ     $0045   00c9    ;  .....FUEL                    lo byte
;ram_0046       equ     $0046   00ca    ; TAIR - Air Temperature
;ram_0047       equ     $0047   00cb    ; Battery Voltage
;ram_0048       equ     $0048   00cc    ; TPS - Throttle Position Sensor
;ram_0049       equ     $0049           ; TH2O - Water Temp from ECU
;ram_004a       equ     $004A           ; Idle Target RPM
;ram_004b       equ     $004B           ; Idle Motor Activity
;ram_004c       equ     $004C           ; Mixture flags
;                                       ; 0xxxxxxx - Both LED's Off
;                                       ; 1xxxxxxx - Both LED's On
;                                       ; x1xxxxxx - Only One LED is on
;                                       ; x0xxxxxx - Both LED's are On or Off
;                                       ; xxxx0xxx - Red LED On (lean)
;                                       ; xxxx1xxx - Green LED On (rich)
;
;ram_004d       equ     $004D           ; Warning message index
;                                       ; 1xxxxxxx - MAP Sensor Error
;                                       ; x1xxxxxx - H20 Temp. error
;                                       ; xx1xxxxx - Voltage Hi/Low
;                                       ; xxx1xxxx - Throttle Input Error
;                                       ; xxxx1xxx - AIR Temp. error
;                                       ; xxxxx1xx - O2 Sensor error
;
; -----------------------------------------------------------------------------
;  Message sent to the ECU to request data
;
;  NOTE: The third byte sent is the number of bytes being transmitted.....
;
;       7B 05 12 80 00 - return ECU software revision information
;                        16 ascii characters starting with the 5th received
;       7B 05 0A F0 00 - return CAL info from ECU
;                        8 ascii characters starting with the 5th received
;       7B 02 7D       - request for engine operating conditions
;
;       7B 06 03 00 7F 91 - Save dataset 'A'
;       7B 06 03 00 7F 92 - Save dataset 'B'
;       7B 06 03 00 7F 93 - Save dataset 'C'
;       7B 06 03 00 7F A0 - Restore Base dataset
;       7B 06 03 00 7F A1 - Restore 'A' dataset
;       7B 06 03 00 7F A2 - Restore 'B' dataset
;       7B 06 03 00 7F A3 - Restore 'C' dataset
;
; The following are sent to the ECU to verify that the Save/Restore was
;  successful.  Notice that the only difference is in the 2nd byte (05) between
;  a command to do and a request for success.  If a failure occurred then the
;  6th byte (ram_0029) is NZ.  Success then ram_0029 = 0.
;
;       7B 05 03 00 7F 91 - Success saving dataset 'A' ?
;       7B 05 03 00 7F 92 - Success saving dataset 'B' ?
;       7B 05 03 00 7F 93 - Success saving dataset 'C' ?
;       7B 05 03 00 7F A0 - Success Restoring Base dataset ?
;       7B 05 03 00 7F A1 - Success Restoring 'A' dataset ?
;       7B 05 03 00 7F A2 - Success Restoring 'B' dataset ?
;       7B 05 03 00 7F A3 - Success Restoring 'C' dataset ?
;
; These are from the <MISC Modifier> screens.....
;
; Query:     7B 05 03 00 B0    - ask for target Idle RPM value
; Response:  7B 05 03 00 B0 xx - Target_RPM = (xx-128) * 25
; Update:    7B 06 03 00 B0 VL - VL = (work_value/25) + 128
;
; Query:     7B 05 03 00 B2    - ask for Rev Limiter RPM
; Response:  7B 05 03 00 B2 xx - Rev_Limit_RPM = (xx * 250)
; Update:    7B 06 03 00 B2 VL - VL = (work_value / 250)
;
; Query:     7B 05 03 00 AB    - ask for Idle Fuel Mod          +/-50%
; Response:  7B 05 03 00 AB xx - Idle_Fuel = (xx-128) * .78125 {round up}
; Update:    7B 06 03 00 AB VL - VL = (work_value/.78125) + 128
;
; Query:     7B 05 03 00 AF    - ask for Idle Spark Mod         +/-16%
; Response:  7B 05 03 00 AF xx - Idle_Spk = (xx-128) * .25
; Update:    7B 06 03 00 AF VL - VL = (work_value/.25) + 128
;
; Query:     7B 05 03 00 B1    - ask for Idle Speed Activity    +/-50%
; Response:  7B 05 03 00 B1 xx - Idle_Activity = (xx-128) * .78125 {round up}
; Update:    7B 06 03 00 B1 VL - VL = (work_value/.78125) + 128
;
; Query:     7B 05 03 00 B3    - on/off flags
; Response:  7B 05 03 00 B3 xx - 1xxxxxxx - Base Timing Set: On
;                                0xxxxxxx - Base Timing Set: Off
;                                x1xxxxxx - Closed Loop Fuel: Off
;                                x0xxxxxx - Closed Loop Fuel: On
;                                xx1xxxxx - Idle Control: Off
;                                xx0xxxxx - Idle Control: On
; Update:    7B 06 03 00 B3 VL - mask byte set to above conditions
;
; The following are for the Spark Modifier pages...............................
;
;   All Spark modifiers are +8 degrees / -16 degrees
;
; Query:     7B 05 03 00 98    - Sprk @ WOT @ 1000 RPM
; Query:     7B 05 03 00 99    - Sprk @ WOT @ 1750 RPM
; Query:     7B 05 03 00 9A    - Sprk @ WOT @ 2500 RPM
; Query:     7B 05 03 00 9B    - Sprk @ WOT @ 3500 RPM
; Query:     7B 05 03 00 9C    - Sprk @ WOT @ 4500 RPM
; Query:     7B 05 03 00 9D    - Sprk @ WOT @ 6000 RPM
;
; Query:     7B 05 03 00 9E    - Sprk @ 09" @ 1000 RPM
; Query:     7B 05 03 00 9F    - Sprk @ 09" @ 1750 RPM
; Query:     7B 05 03 00 A0    - Sprk @ 09" @ 2500 RPM
; Query:     7B 05 03 00 A1    - Sprk @ 09" @ 3500 RPM
; Query:     7B 05 03 00 A2    - Sprk @ 09" @ 4500 RPM
; Query:     7B 05 03 00 A3    - Sprk @ 09" @ 6000 RPM
;
; Query:     7B 05 03 00 A4    - Sprk @ 18" @ 1000 RPM
; Query:     7B 05 03 00 A5    - Sprk @ 18" @ 1750 RPM
; Query:     7B 05 03 00 A6    - Sprk @ 18" @ 2500 RPM
; Query:     7B 05 03 00 A7    - Sprk @ 18" @ 3500 RPM
; Query:     7B 05 03 00 A8    - Sprk @ 18" @ 4500 RPM
; Query:     7B 05 03 00 A9    - Sprk @ 18" @ 6000 RPM
; Query:     7B 05 03 00 AE    - Global Spark
;
; All Responses are at ram_0029 (6th byte) in the format of:
;       Sprk = (xx-128) * .25
;
; To Update, the byte at ram_0025 (2nd byte) is changed to 06.  The 6th
;  location (ram_0029) contains the value to update:
;       VL = (work_value / .25) + 128
;
; .............................................................................
; The following are from the FUEL modifier pages......
;
; All Fuel modifiers are +50% to -30%
;
; Query:     7B 05 03 00 80    - Fuel @ WOT @ 1000 RPM
; Query:     7B 05 03 00 81    - Fuel @ WOT @ 2000 RPM
; Query:     7B 05 03 00 82    - Fuel @ WOT @ 3000 RPM
; Query:     7B 05 03 00 83    - Fuel @ WOT @ 4000 RPM
; Query:     7B 05 03 00 84    - Fuel @ WOT @ 5000 RPM
; Query:     7B 05 03 00 85    - Fuel @ WOT @ 7000 RPM
;
; Query:     7B 05 03 00 86    - Fuel @ 06" @ 1000 RPM
; Query:     7B 05 03 00 87    - Fuel @ 06" @ 2000 RPM
; Query:     7B 05 03 00 88    - Fuel @ 06" @ 3000 RPM
; Query:     7B 05 03 00 89    - Fuel @ 06" @ 4000 RPM
; Query:     7B 05 03 00 8A    - Fuel @ 06" @ 5000 RPM
; Query:     7B 05 03 00 8B    - Fuel @ 06" @ 7000 RPM
;
; Query:     7B 05 03 00 8C    - Fuel @ 12" @ 1000 RPM
; Query:     7B 05 03 00 8D    - Fuel @ 12" @ 2000 RPM
; Query:     7B 05 03 00 8E    - Fuel @ 12" @ 3000 RPM
; Query:     7B 05 03 00 8F    - Fuel @ 12" @ 4000 RPM
; Query:     7B 05 03 00 90    - Fuel @ 12" @ 5000 RPM
; Query:     7B 05 03 00 91    - Fuel @ 12" @ 7000 RPM
;
; Query:     7B 05 03 00 92    - Fuel @ 18" @ 1000 RPM
; Query:     7B 05 03 00 93    - Fuel @ 18" @ 2000 RPM
; Query:     7B 05 03 00 94    - Fuel @ 18" @ 3000 RPM
; Query:     7B 05 03 00 95    - Fuel @ 18" @ 4000 RPM
; Query:     7B 05 03 00 96    - Fuel @ 18" @ 5000 RPM
; Query:     7B 05 03 00 97    - Fuel @ 18" @ 7000 RPM
;
; Query:     7B 05 03 00 AD    - Transient Fuel
; Query:     7B 05 03 00 AC    - Cold Start Fuel
; Query:     7B 05 03 00 AA    - Global Fuel
;
; All Responses are at ram_0029 (6th byte) in the format of:
;       Fuel = (xx-128) * .78125  {round up}
;
; To Update, the byte at ram_0025 (2nd byte) is changed to 06.  The 6th
;  location (ram_0029) contains the value to update:
;       VL = (work_value / .78125) + 128
;
;==============================================================================
;