Introduction to HPL Scripts for orange5 - DashBoard. educational purpose
Register
Page 1 of 2 12 LastLast
Results 1 to 15 of 28
  1. #1
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default Introduction to HPL Scripts for orange5 - DashBoard. educational purpose

    some time ago I started to make some script for orange5, I know that many of you here know how to make them ................ for those who do not, here goes......

    ; Clio Mio Magneti Marelli / Sandero with 95020 tested in 2014 models
    ; comments for this sample script is based in 41200km
    ;---------------------------------------------------------------------------------------------------
    ;................................................. 41200 * 1000 = 41200000 ---------------------------------------
    ;.................................................41200000 toHex = 02 74 A9 80 ----------------------------------
    ;.................................................02 74 A9 80 Swap = 80 a9 74 02 --------------------------------
    ;.................................................first 4 bytes 80 A9 74 02 ---------------------------------------
    ;.................................................80 A9 74 02 xor FF FF FF FF = 7F 56 8B FD (last four Bytes) -----
    ;---------------------------------------------------------------------------------------------------





    ClioMio.hpl

    ;-------------------------------------------------------------------------------------------------------------------------------------------
    [!#"Old KM"]
    ADR=192;..................Set in position 192 decimal = hex 0x0c0
    R6=1;.....................Put 1 in Registry R6
    LOOP=(0,63){;.............Start a Loop 64 cycles
    MARK=R6;..................Mark Current Position
    ADR=+1;...................Increment in 1 Address
    };........................end of loop
    ADR=195;..................Set in position 195 decimal = 0x0c3
    R6=DATA;..................Stored Current data Buffer(0x0c3) in Registry R6
    ADR=-1;...................decrement in 1 Address
    R7=DATA;..................Stored Current data Buffer(0x0c2) in Registry R7
    ADR=-1;...................decrement in 1 Address
    R8=DATA;..................Stored Current data Buffer(0x0c1) in Registry R8
    ADR=-1;...................decrement in 1 Address
    R9=DATA;..................Stored Current data Buffer(0x0c0) in Registry R9, asume for this sample 0x080
    R6=<<24;..................move 6 nibble to left R6 Value. Sample R6 vale are 0x002 after move: 0x02000000
    R7=<<16;..................move 4 nibble to left R7 Value. Sample R7 vale are 0x074 after move: 0x00740000
    R8=<<8;...................move 2 nibble to left R8 Value. Sample R8 vale are 0x0a9 after move: 0x0000A900
    R8=+R6;...................sum R8 Value to R6.....0x0000A900 + 0x02000000 = 0x0200A900
    R8=+R7;...................sum R8 Value to R7.....0x0200A900 + 0x00740000 = 0x0274A900
    R8=+R9;...................sum R8 Value to R9.....0x0274A900 + 0x00000080 = 0x0274A980
    R8=/1000;.................divide by decimal 1000 R8 value....... 0x0274A980 / 1000 = 0x0A0F0
    PRINT=("Current Mileage = %06lu km.",R8);..Print Rezult

    [!#"New KM"]
    R4=0;.....................Put 0 in Registry R6
    GET=("Enter New KM",R4);..open Dialog Box and Request New Mileage end stored in R4...asume for this example 41200km
    R4=*1000;.................multiply R4 registry by 1000 ......R4 * 1000 = 41200000
    R9=1;.....................Put 1 in Registry R9
    R3=R4;....................Stored Value enter in GET=("Enter New KM",R4) in R3 registry (41200000)=(0x0274A980)
    R5=R4;....................Stored Value enter in GET=("Enter New KM",R4) in R5 registry (41200000)=(0x0274A980)
    R6=R4;....................Stored Value enter in GET=("Enter New KM",R4) in R6 registry (41200000)=(0x0274A980)
    R3=&000000FFH;............make a AND Logical R3 by 0x0ff....... 0x0274A980 AND 0x000000FF = 0x00000080
    R4=&0000FF00H;............make a AND Logical R4 by 0x0ff00..... 0x0274A980 AND 0x0000FF00 = 0x0000A900
    R5=&000FF0000H;...........make a AND Logical R5 by 0x0ff0000... 0x0274A980 AND 0x00FF0000 = 0x00740000
    R6=&0FF000000H;...........make a AND Logical R6 by 0x0ff000000. 0x0274A980 AND 0xFF000000 = 0x02000000
    R4=>>8;...................move to right 2 nibble...0x0000A900 to 0x000000A9
    R5=>>16;..................move to right 4 nibble...0x00740000 to 0x00000074
    R6=>>24;..................move to right 6 nibble...0x02000000 to 0x00000002

    ADR=192;..................Set in position 192 decimal = hex 0x0c0

    LOOP=(0,7){;..............Start a Loop 8 cycles
    DATA=R3;..................set Value 0x00000080 (80) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+1;...................Increment in 1 address
    DATA=R4;..................set Value 0x000000A9 (A9) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+1;...................Increment in 1 address
    DATA=R5;..................set Value 0x00000074 (74) in current Position
    MARK=R9;..................Mark postion 194(c2)
    ADR=+1;...................Increment in 1 address
    DATA=R6;..................set Value 0x00000002 (02) in current Position
    MARK=R9;..................Mark postion 194(c2)
    ADR=+5;...................Increment in 5 address
    }
    R3=^0FFH;.................R3 xor 0xff....0x00000080 xor 0x000000ff = 7F
    R4=^0FFH;.................R4 xor 0xff....0x000000A9 xor 0x000000ff = 56
    R5=^0FFH;.................R5 xor 0xff....0x00000074 xor 0x000000ff = 8B
    R6=^0FFH;.................R6 xor 0xff....0x00000002 xor 0x000000ff = FD

    ADR=196;..................Set in position 196 decimal = hex 0x0c4

    LOOP=(0,7){;..............Start a Loop 8 cycles
    DATA=R3;..................set Value 0x0000007F (7F) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+1;...................Increment in 1 address
    DATA=R4;..................set Value 0x00000056 (56) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+1;...................Increment in 1 address
    DATA=R5;..................set Value 0x0000008B (8B) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+1;...................Increment in 1 address
    DATA=R6;..................set Value 0x00000080 (FD) in current Position
    MARK=R9;..................Markcurrent position
    ADR=+5;...................Increment in 5 address

    leave HPL file in attachment

    for see in type menu......... must to add to CFG File:

    Sample:
    GROUP=Renault ; if not exist
    CHIP=Clio Mio / Sandero 95020,256x8,"HPL_ROOT_DIRECTORY"\ClioMio.hpl

    Questions and Request made here: Question and Request for HPL Orange5 Scripts
    Attached Files Attached Files
    Last edited by richiebb; 18th May, 2018 at 03:19 PM.


  2. The Following 17 Users Say Thank You to richiebb For This Useful Post:

    automotrizVIP (23rd April, 2018), bandus (2nd June, 2018), Catalizator (29th January, 2019), ceregarak (17th May, 2018), claudio35 (24th April, 2018), Diagcar1 (18th June, 2018), dorofteius (18th June, 2018), Dr. Zoidberg (23rd April, 2018), gepakg (21st January, 2019), jomberykaso (23rd April, 2018), ledong (25th April, 2018), lwd11 (15th May, 2018), Meat-Head (11th November, 2019), melectro (26th May, 2018), mikroel (23rd April, 2018), Shokunin (11th May, 2018), talk2idris (24th April, 2018)

  3. #2
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default algo for BSI Siemens Peugeot 207

    I leave the algorithm for a BSI siemens E02-00 of peugeot 207 year 2013 that I did today, .........when I can........i do the script!

    Tested en Peugeot 207 year 2013

    KM * 10 -> XOR FFFFFF -> BYTES SWAP = KM 3 BYTES [0]xx [1]xx [2]xx

    KM BYTE for calc CS[0] = add FF to left... sample FFxx
    KM BYTE for calc CS[1] = add FF to left... sample FFxx
    KM BYTE for calc CS[2] = add FF to left... sample FFxx

    checksum 1 0x12B= 0x12F + 0x130 + KM BYTE for CS[0] + KM BYTE for CS[1] + KM BYTE for CS[2] - 1FD AND FF
    checksum 2 0x131= checksum 1 - (0x12A - 0x130)

    *NOTE: addresses are in format 0x00, values are in format 00

    Lines 120 and 130 for this sample, with 75000km
    0x120: 1F FF F9 37 6B F7 FC FA FB FF 49 1D 4F 8E F4 FF
    0x130: 4A1E 4F 8E F4 FF 7C C0 DE 64 EB FF AB 5C FD FF

    sample 75000km

    75000 * 10 = 750000
    750000 toHex= 0B 71 B0
    0B 71 B0 xor FFFFFF = F4 8E 4F
    F4 8E 4F swap = 4F 8E F4

    4F 8E F4 (km bytes) 0x12c=4F,0x12d=8E,0x12e=F4,0x132=4F,0x133=8E,0x134=F4

    checksum 1 0x12B= FF + 4A + FF4F + FF8E + FFF4 = 3001A
    3001A - 1FD = 2FE1D
    2FE1D AND FF = 1D

    checksum 2 0x131= 49 - 4A = -1
    1D - -1 = 1E


    address km in lines 0x120 and 0x130
    0x120: XX XX XX XX XX XX XX XX XX XX XX 1D 4F 8E F4 XX
    0x130: XX 1E 4F 8E F4 XX XX XX XX XX XX XX XX XX XX XX

    Questions and Request made here: Question and Request for HPL Orange5 Scripts
    Last edited by richiebb; 15th June, 2018 at 11:24 PM.


  4. The Following 10 Users Say Thank You to richiebb For This Useful Post:

    automotrizVIP (15th June, 2018), claudio35 (16th June, 2018), dorofteius (18th June, 2018), Dr. Zoidberg (15th June, 2018), fuktak (18th July, 2018), marius7592 (21st November, 2018), perfido (17th June, 2018), SergeyIg (10th August, 2018), stoyanov (11th December, 2018), XJTAG (17th October, 2019)

  5. #3
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default

    continuing with the previous post ......... I leave the script for BSI siemens E02-00 of peugeot 207 year 2013

    ; CHIP=25c160 (2048x8) SPI
    HPL=25c256.hpl
    POWER=0
    R0="New KM",D;................................Set R0 Registry as Decimal for input dialog

    [!#"KM"]
    ADR=0x131;....................................set address in hex 131
    LOOP=(0,3){;..................................start a loop of 4 cycles
    MARK=1;.......................................put mark in current position
    ADR=+1;.......................................increments address in 1
    };............................................end of loop
    ADR=+2;.......................................increments address in 2 hex 133
    LOOP=(0,3){;..................................start a loop of 4 cycles
    MARK=1;.......................................put mark in current position
    ADR=+1;.......................................increments address in 1
    };.............................................end of loop
    ADR=-7;.......................................decrements address in 7 hex 12c
    R4=DATA;..........................................store current data in R4 registry
    ADR=-1;.......................................decrements address in 1 hex 12b
    R5=DATA;......................................store current data in R5 registry
    ADR=-1;.......................................decrements address in 1 hex 12a
    R6=DATA;......................................store current data in R6 registry
    R8=0FFFFFFH;..................................assigns to R8 registry value hex FFFFFF
    R4=<<16;......................................move four nibble to left R4 registry
    R5=<<8;.......................................move two nibble to left R5 registry
    R4=+R6;.......................................add R6 to R4
    R4=+R5;.......................................add R5 to R4
    R4=^R8;.......................................xor R4 to R8
    R4=/10;.......................................divide R4 by 10
    PRINT=("Current KM: %06lu km.",R4);...........PRINT R4 in decimal format "%06lu" fill six 0 to left

    [!#"New KM"]
    R0=0;.........................................assigns to R0 registry value hex 0
    GET=("New Km",R0);............................Open a input dialog and store in registry R0(decimal)
    R0?<100{;.....................................if R0 is minor to 100 then executed code between {}
    PRINT=A("No less than 100 km!");..............print a warning
    EXIT;.........................................exit - no more lines are executed
    };............................................end if
    R0=*10;.......................................multiply by R0 Registry
    R8=0FFFFH;....................................assigns to R8 registry value hex FFFF
    R5=R0;........................................assigns to R5 registry R0
    R6=R0;........................................assigns to R6 registry R0
    R9=255;.......................................assigns to R9 registry value decimal 255
    R5=&00FF0000H;................................make a logical AND to get XX---- value
    R5=>>16;......................................move to right 4 nibble
    R6=&00F0FF00H;................................make a logical AND to get X-XX-- value
    R6=>>8;.......................................move to right 2 nibble
    R0=&00F000FFH;................................make a logical AND to get ----XX value
    R0=^R8;.......................................xor R0 to R8
    R6=^R8;.......................................xor R6 to R8
    R5=^R8;.......................................xor R5 to R8
    R8=R0;........................................assigns to R8 registry R0
    R8=+R6;.......................................add R6 to R8
    R8=+R5;.......................................add R5 to R8
    ADR=012FH;....................................set address in hex 12F
    R2=0;.........................................set R2 to 0
    LOOP=(0,1){;..................................start a loop of 2 cycles
    R3=DATA;......................................store data in R3
    R2=+R3;.......................................add R3 to R2
    ADR=+1;.......................................increments address in 1
    };............................................end of loop
    R8=+R2;.......................................add R2 to R8
    R8=-01FDH;....................................subtract 1FD to R8
    R8=&000FFH;...................................make a logical AND to get ----XX value
    R9=R8;........................................assigns to R9 registry R8
    ADR=-7;.......................................move cursor to address 12A
    R1=DATA;......................................store data in R1
    ADR=+6;.......................................move cursor to address 130
    R2=DATA;......................................store data in R2
    R1=-R2;.......................................subtract R2 to R1
    R9=-R1;.......................................subtract R1 to R9
    ADR=-5;.......................................move cursor to address 12B
    DATA=R8;......................................change CS 1 data
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R0;......................................change KM byte[0]
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R6;......................................change KM byte[1]
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R5;......................................change KM byte[2]
    MARK=1;.......................................mark position
    ADR=+3;.......................................increments address in 3
    DATA=R9;......................................change CS 2 data
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R0;......................................change KM byte[0]
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R6;......................................change KM byte[1]
    MARK=1;.......................................mark position
    ADR=+1;.......................................increments address in 1
    DATA=R5;......................................change KM byte[2]
    MARK=1;.......................................mark position

    GROUP=Peugeot; if not exist
    CHIP=206/7 BSI Siemens 95160,2Kx8,Dash/206BSI7.hpl; assuming that in the folder of the HPL directory the folder for the dashboard is called "Dash"

    Questions and Request made here: Question and Request for HPL Orange5 Scripts
    Attached Files Attached Files
    Last edited by richiebb; 19th June, 2018 at 12:16 PM.


  6. The Following 4 Users Say Thank You to richiebb For This Useful Post:

    claudio35 (19th June, 2018), Diagcar1 (18th June, 2018), dorofteius (18th June, 2018), marius7592 (21st November, 2018)

  7. #4
    Banned

    Join Date
    Jan 2010
    Location
    Trstenik - Thun
    Posts
    1,235
    Thanks Thanks Given 
    225
    Thanks Thanks Received 
    707
    Thanked in
    447 Posts

    Default

    can you explain,or give calculating , on this example, how to calculate PIN code from this file

    Real pin code is 4362

    in the file pin showed as 4326
    Attached Images Attached Images

  8. The Following User Says Thank You to mikroel For This Useful Post:

    Meat-Head (11th November, 2019)

  9. #5
    V.I.P. Member
    Dr. Zoidberg's Avatar
    Join Date
    Oct 2015
    Location
    Talca-Chile.
    Posts
    4,030
    Thanks Thanks Given 
    787
    Thanks Thanks Received 
    3,307
    Thanked in
    2,310 Posts

    Default

    4326 Is ASCII---

  10. #6
    Banned

    Join Date
    Jan 2010
    Location
    Trstenik - Thun
    Posts
    1,235
    Thanks Thanks Given 
    225
    Thanks Thanks Received 
    707
    Thanked in
    447 Posts

    Default

    yes 4326 in ASCII , so?

  11. #7
    V.I.P. Member
    Dr. Zoidberg's Avatar
    Join Date
    Oct 2015
    Location
    Talca-Chile.
    Posts
    4,030
    Thanks Thanks Given 
    787
    Thanks Thanks Received 
    3,307
    Thanked in
    2,310 Posts

    Default

    Quote Originally Posted by mikroel View Post
    yes 4326 in ASCII , so?




    .....JPG


    Now, look again your file.....

  12. #8
    Banned

    Join Date
    Jan 2010
    Location
    Trstenik - Thun
    Posts
    1,235
    Thanks Thanks Given 
    225
    Thanks Thanks Received 
    707
    Thanked in
    447 Posts

    Default

    You didn't understand me well,
    or i didn't explain well

    i already showed on my photo (RED square) where is pin in HEX and in ASCII and which one is Real PIN CODE

    I asked how to make procedure in calcs for read PIN code from this location

  13. #9
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default

    Quote Originally Posted by mikroel View Post
    You didn't understand me well,
    or i didn't explain well

    i already showed on my photo (RED square) where is pin in HEX and in ASCII and which one is Real PIN CODE

    I asked how to make procedure in calcs for read PIN code from this location
    Hi. look this


  14. #10
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default

    ; read PIN Code
    @ART=4

    ["!#READ PIN"]
    ADR=0x1e6
    LOOP(4){
    R0=DATA
    @ART[I]=R0
    ADR=+1
    }
    PRINT=("Pin code is %s",@ART)


  15. #11
    Banned

    Join Date
    Jan 2010
    Location
    Trstenik - Thun
    Posts
    1,235
    Thanks Thanks Given 
    225
    Thanks Thanks Received 
    707
    Thanked in
    447 Posts

    Default

    hanks friend
    but result is
    Attached Images Attached Images

  16. #12
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default

    I just tried and the script works well.

    I was guided by the photo of your post and begins to read the ascii in the address 0x1e6.

    put a mark to see if you have the address well

    ; read PIN Code
    @ART=4

    ["!#READ PIN"]
    ADR=0x1e6
    LOOP(4){
    R0=DATA
    @ART[I]=R0,MARK=1
    ADR=+1
    }
    PRINT=("Pin code is %s",@ART)


  17. The Following User Says Thank You to richiebb For This Useful Post:

    dodge69 (31st May, 2019)

  18. #13
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,294
    Thanks Thanks Given 
    3,346
    Thanks Thanks Received 
    3,133
    Thanked in
    878 Posts

    Default

    16bits eeprom script

    ; read PIN Code
    HPL=93c66.hpl
    @PIN=4

    ["!#READ PIN"]
    ADR=0x0f3
    R0=DATA,R1=R0
    R0=&0FF00H,R0=>>8
    R1=&0FFH
    ADR=+1
    R2=DATA,R3=R2
    R2=&0FF00H,R2=>>8
    R3=&0FFH
    @PIN[0]=R0,@PIN[1]=R1,@PIN[3]=R2,@PIN[2]=R3
    PRINT=("Pin code is %s",@PIN)
    Last edited by richiebb; 22nd January, 2019 at 12:04 PM.


  19. The Following User Says Thank You to richiebb For This Useful Post:

    mikroel (22nd January, 2019)

  20. #14
    Banned

    Join Date
    Jan 2010
    Location
    Trstenik - Thun
    Posts
    1,235
    Thanks Thanks Given 
    225
    Thanks Thanks Received 
    707
    Thanked in
    447 Posts

    Default

    last one working good

    note:
    vectra c has several different version of clusters as well dumps ,so universal dash calculator is very difficult to make
    Last edited by mikroel; 22nd January, 2019 at 04:48 PM.

  21. #15
    DK Veteran

    Join Date
    Dec 2018
    Posts
    803
    Thanks Thanks Given 
    122
    Thanks Thanks Received 
    362
    Thanked in
    274 Posts

    Default

    for renault have more script?

 

 
Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.