Freelog/FreeLogDLRTP.js

88 lines
3.8 KiB
JavaScript

//
// Modified by Dan Near LtDanNear for use with FreeLog
//
// Added extra logging routines for commands I use
//
// 25h=0210=VTP&PSP, 26h=0211=VTS,ACS,ATP,Brake, 27h=021B=TPSTipIn, 28h=0220=ACC&PCS,
// 29h=0221=VTS?, 2Ah=0222=ATLockupSol, 2Bh=024F=Gear=Maybe RPM*VSS div 65535?
// 2Ch=03C2=Unused Analog Input?, 2Dh=03C5=IACV, 2Eh=ELD, 2Fh=Extra Input(0066) memory location
//
// Hi. Thanks for your interest in my 'Quick Datalogger +RTP' code.
// Feel free to look around and give me any comments.
// This is a highly optimized Datalog and RTP code used to improve
// the performance of ECU to PC communication. The datalog code
// used is an improvement upon Doc's original datalog code. It removes
// redundant or unnecessary lines of code, saving space and CPU cycles.
// The datalog code is also optimized.
// Probably the most important feature of this RTP/Datalog code is it's
// overall size. It is actually smaller than the original Honda serial_rx
// code so it fits comfortably in the same spot. The advantage of this
// is that converting to RTP/Datalog will not take up any extra bytes that
// can be used for other features instead (like dual maps). And since
// it doesn't compete for space with all other feature codes out there,
// it is compatible for use with almost every feature tool.
//
// Well.. that's just me rambling. Go on, try it out already.
//
// -John Cui, (CROME Lead Developer)
//
function __addFreeLogDLRTP () {
if (rom.base != rtP30) {
alert('This rom is not supported by this plugin.');
return;
}
// Start Group Undo Point
rom.gup();
// */
// Add Dan's DL-RTP+
//
rom.byteAt(0x2565) = 0xF8;
rom.byteAt(0x38D5) = 0xF8;
rom.wordAt(0x000A) = 0x01FD;
_rom_write(0x01FD,
new Array(0xE5,0xF4,0xD5,0x1A,0xB5,0x04,0x98,0x02,
0x01,0x57,0x6F,0x00,0xF9,0xF5,0x55,0x23,
0xC0,0x00,0xCE,0x48,0xC6,0x07,0xC9,0x33,
0xC6,0x08,0xC9,0x34,0xC6,0xAB,0xC9,0x33,
0x8A,0xC6,0x30,0xC8,0x32,0xA6,0x10,0xCD,
0x03,0xAB,0xCB,0x17,0xE5,0x06,0x95,0x53,
0x62,0x97,0x02,0x92,0x81,0x92,0xA8,0x52,
0xB2,0x4A,0xF2,0x92,0x15,0x44,0x15,0x45,
0x15,0xD5,0x51,0xE5,0xF2,0xA2,0xD0,0xFE,
0xD5,0x1A,0x02,0x92,0xAA,0x72,0xCB,0xF1,
0x7D,0xCB,0xE8,0x77,0xCD,0xCB,0xE4,0x67,
0x55,0x00,0xCB,0xDF,0x23,0xC0,0x01,0xCE,
0x04,0x89,0xAB,0xCB,0xDE,0x23,0xC0,0x02,
0xCE,0x10,0x88,0x44,0x7A,0x22,0xC0,0x01,
0xC9,0x1A,0x22,0xC0,0x03,0xC9,0x1F,0xAB,
0xCB,0xC9,0x23,0xC0,0x03,0xCE,0xD8,0x22,
0xC0,0x02,0xC9,0x07,0x22,0xC0,0x04,0xC9,
0x06,0xCB,0xCC,0xD2,0xF2,0xCB,0xAC,0x92,
0x80,0x00,0x80,0xD2,0x44,0x7A,0x92,0xAA,
0xCB,0xA1,0xC8,0x03,0xC0,0x03,0xBE,0x03,
0xC1,0x03,0xA3,0x00,0x92,0x03,0xAC,0x00,
0xAD,0x00,0x1F,0x01,0xD8,0x01,0xD9,0x01,
0xD2,0x01,0x12,0x01,0x13,0x01,0x14,0x01,
0x15,0x01,0xB4,0x00,0xD4,0x03,0xD5,0x03,
0x44,0x02,0x43,0x02,0x3A,0x01,0x3C,0x43,
0x52,0x4F,0x4D,0x45,0x3E),
0xCD);
_rom_write(0x02C1,
new Array(0x10,0x02,0x11,0x02,0x1B,0x02,0x20,0x02,
0x21,0x02,0x22,0x02,0x4F,0x02,0xC2,0x03,
0xC5,0x03,0x66,0x00),
0x14);
_rom_fill(0x02D6, 0x02DC, 0xFF);
// */
// End Group Undo Point
rom.gup();
alert('FreeLog DL+RTP Added!');
}
function __aboutFDLRTP() {
alert("FreeLog DL+RTP version 1.0\nby Dan Near");
}
addPlugin('Dan Near', 'FreeLog DL+RTP', '__addFreeLogDLRTP(1)', '__aboutFDLRTP()', 1);