Register
Results 1 to 15 of 15
  1. #1
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default Introduction to HPL Scripts for orange5 -Radio Decode. educational purpose

    Hi Folks.
    I recently bought the Original Orange5 and when looking for scripts examples on the Internet I did not find anything!
    Before that purchase, I had already bought the UPA USB 1.3 cloned with all its limitations. but with a lot of information and even with a development IDE.
    I have experience in programming in languages: java, Pascal,c++ (web:PHP/POO/MYSQL/Javascript).

    Then, I took the task of investigating and started making some scripts.
    I'm still pretty green but I hope to progress fast, I will share and publish all the advances that I make with examples and explanations.
    Anyone who wants to collaborate and bring something to this thread will be welcome.

    Before beginning some considerations PLEASE READ IT!!:

    • Let's try to make this thread a reference , PLEASE DO NOT ASK QUESTIONS OR PETITIONS, DO NOT COMMENT AND DO NOT
      ANSWER IN THIS THREAD TO SAY THANKS
      . for this I leave this link Question and Request for HPL Orange5 Scripts
    • in the support link Question and Request for HPL Orange5 Scripts I will answer as long as the work and the family allow it (family and work are first)
    • If you already know the HPL language and in some example or explanation you know a more efficient or better way, we would appreciate your collaboration. Any other comment or criticism, abstain.
    • This is not a programming course from scratch, you must have some experience. However, I will try to explain in detail
    • and finally, I am learning English in an institute and I am currently in the second year of six. be indulgent (my native language is spanish)









    • First we must know how to add the scripts / config and the folder structure:
      the HPL files are located in the HPL folder of the root folder of the program, for example "C: \Program Files\Orange5\HPL"
      the names of files with our scripts can not have a length greater than 18 characters including the point and the extension .hlp
    • what follows is to create in file .cfg (config):
      examples:



      10-Radio Decode.cfg

      ; the semicolon that begins this line tells the compiler that it is a comment and is ignored,
      ; It can be at the beginning or at the end of an instruction.
      ; Car Radio

      GROUP=Volkswagen ; this indicates the type menu that groups everything below
      CHIP=VWZ4Z4,2k,Carradio\vwz4z4_famar.hpl ; famar inf1-mid NPL
      CHIP=(2) VWZ4Z4,2k,Carradio\famar_test.hpl ; famar inf1-mid NPL same result from above but done differently
      CHIP=VWZ4Z2K DelphiRCD310,4096x8,Carradio\rcd310Delphi.hpl ; Delphi RCD310
      CHIP=(2) VWZ4Z2K DelphiRCD310,4096x8,Carradio\rcd310D_test.hpl ;Delphi RCD310 same result from above but done differently

      CFG File Explanation






    • Now we must create the 4 scripts that appear in the list above I will leave attachments with the 4
      but today I'm just going to explain 1 (vw Famar INF1-MID made in 2 different ways)



      vwz4z4_famar.hpl with loop method

      ;this script reads the dump code already recorded PREVIOUSLY,
      ; in the future we will do the reading / recording of the device from the script

      ALLPINS=0 ; this configures the number of pins to use, none
      ["#!Get Code"] ; this is a user button, '#' character means that the function will run on the PC and the '!' does not energize the programmer
      PRINT=L("CODE: ") ; the 'L' after the PRINT command sends the output to the LOG window
      ; Within the '()' there is a string of text should be in double quotess ""

      ADR=0X008D ; is placed in hex address 0x08D another way is 8DH
      LOOP(4){ ; starts a loop of 4 cycles to travel the four 0x08D, 0x08E, 0x08F, 0x090
      R0=DATA ; store in R0 the value that is in the current direction of the loop
      PRINT=L("%X",R0) ; print in the LOG window the value of the R0 record, "%X" format exadecimal
      ADR=+1 ; increase the address by 1
      } ; the "}" loop instruction block closure
      PRINT=A("Move this box dialog to see code in Log window!") ; print in the confirm a string to be able to see the window
      ; of LOG, since it closes quickly if it is not previously open


      famar_test.hpl line to line method

      ALLPINS=0 ; this configures the number of pins to use, none
      ["!#GET CODE"] ; same previous explanation
      ADR=8DH ; is placed in hex address 0x08D
      R0=DATA ; store in R0 the value of 0x08D
      ADR=8EH ; is placed in hex address 0x08E
      R1=DATA ; store in R0 the value of 0x08E
      ADR=8FH ; is placed in hex address 0x08F
      R2=DATA ; store in R0 the value of 0x08F
      ADR=90H ; is placed in hex address 0x090
      R3=DATA ; store in R0 the value of 0x090
      PRINT=("CODE=%X%X%X%X",R0,R1,R2,R3); print in dialog box to string "CODE =" with hexadecimal format. "%X" for each record "%X"






    * I leave the .bin files that I use for these examples,
    * the files ready to copy in the root folder of the Orange5 program
    * the complete demo of the Orange5 program with the files already included

    Spanish Reference http://www.digital-kaos.co.uk/forums...ts-of-Orange-5

    English and Russian, Reference included in the program's. see menu>help
    Last edited by richiebb; 24th April, 2018 at 01:48 PM.


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

    chupocro (29th August, 2022), daniel53 (10th March, 2021), datapage (21st April, 2018), Decode Ghost (12th April, 2018), Diagcar1 (18th June, 2018), domim11 (3rd May, 2023), dorofteius (8th April, 2018), eagleone-two (8th April, 2018), fuktak (18th July, 2018), hass42 (9th February, 2023), kostelectronics (10th April, 2018), ledong (17th April, 2018), llcalin (6th September, 2019), Love777888 (21st September, 2023), marius7592 (21st November, 2018), mohamad1401 (16th April, 2018), neverseenpotato (19th April, 2018), NONO59 (1st January, 2024), petronijul (12th April, 2018), prodan (20th April, 2018), SIRKVA (12th April, 2018), Stelaras26 (28th August, 2018), truedetective (24th May, 2019), yahia1908 (27th November, 2019)

  3. #2
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    we complete in this publication the scripts of the first post


    rcd310Delphi.hpl with loop method


    ;this script reads the dump code already recorded PREVIOUSLY
    ALLPINS=0 ; this configures the number of pins to use, none
    ["#!Get Code"] ; this is a user button, '#' character means that the function will run on the PC and the '!' does not energize the programmer
    PRINT=L("CODE: ") ; the 'L' after the PRINT command sends the output to the LOG window
    ; Within the '()' there is a string of text should be in double quotess ""

    ADR=0X0A0 ; is placed in hex address 0x0A0 another way is A0H
    LOOP(4){ ; starts a loop of 4 cycles to travel the four 0x0A0, 0x0A1, 0x0A2, 0x0A3 byte's
    R0=DATA ; store in R0 the value that is in the current direction of the loop

    ;<<<<<<<<<< Here is nothing new!
    R0=^65H ; the novelty !! this symbol '^' is equivalent to logical XOR. in each byte, first nibble 6 followed by the second nibble of the digit that the xor must be made by 5
    ; as the first nibble starts with 6 followed by the nibble of the digit you can do R0 = ^ 6xH where the 'x' is the numeric digit
    ;you can also do R0=R0^65H O also R0=R0 xor 65H

    PRINT=L("%X",R0) ; print in the LOG window the value of the R0 record, "%X" format hexadecimal
    ADR=+1 ; increase the address by 1
    } ; the "}" loop instruction block closure
    PRINT=A("Move this box dialog to see code in Log window!") ; print in the confirm dialog a string to be able to see the window
    ; of LOG, since it closes quickly if it is not previously open


    rcd310D_test.hpl line to line method

    ALLPINS=0 ; this configures the number of pins to use, none
    ["!#GET CODE"] ; same previous explanation
    ADR=A0H ; is placed in hex address 0x0A0
    R0=DATA ; store in R0 the value of 0x0A0
    R0=^65H ; is worth the explanation of the example above
    ADR=A1H ; is placed in hex address 0x0A1
    R1=DATA ; store in R1 the value of 0x0A1
    R1=^65H
    ADR=A2H ; is placed in hex address 0x0A2
    R2=DATA ; store in R2 the value of 0x0A2
    R2=^65H
    ADR=A3H ; is placed in hex address 0x0A3
    R3=DATA ; store in R3 the value of 0x0A3
    R3=^65
    PRINT=("CODE=%X%X%X%X",R0,R1,R2,R3); print in dialog box to string "CODE =" with hexadecimal format. "%X" for each record "%X"



    Last edited by richiebb; 9th April, 2018 at 11:13 PM.


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

    datapage (21st April, 2018), Decode Ghost (12th April, 2018), luc242 (14th March, 2019), prodan (20th April, 2018), truedetective (24th May, 2019), yahia1908 (27th November, 2019)

  5. #3
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    we continue ...
    In the example that we will see next:

    • Functions
    • Arrays
    • Input Dialog
    • and we will modify the dump buffer from the script by editing the code of a Peugeot/Citroen Pioneer dump and restarting the counter. highlighting any modification with the MARK command.
    • using an abbreviated IF condition we call the function



    pioneerPeugeot.hpl

    ;....................tested on DEH-m1107/1407/1507/1807/2107

    ;[SETUP]

    @1634={0x19,0xD9,0x016,0x05,0x11,0xC3,0xC8} ; array are declared with '@' before tag name.
    @1213={0x02,0xE0,0x12,0x04,0x11,0x47,0xF4}
    ;----------------------------------------------------------------------------------------------------
    [_OPTION1] ;...............Begin Function named _OPTION1
    ADR=0x6b ;................Set Position in Address 0x6b
    LOOP(7){ ;..................the LOOP begins and the code between brackets will be repeated 7 times
    R1=@1634[I] ;............Store in Registry R1 actual value os Array @1634.
    ;................................'[I]' are index of array. First round is 0x019, second round 0xD9, etc
    DATA=R1 ;................ Put in current buffer address , current array value stored in: R1=@1634[I]
    MARK=R1 ;................ Put a Mark in current buffer address
    ADR=+1 ;..................increment address position
    } ;.............................end LOOP
    ;...............................End Function
    ;----------------------------------------------------------------------------------------------------
    [_OPTION2];..............Begin Function named _OPTION2
    ADR=0x6b;................Set Position in Address 0x6b
    LOOP(7){;..................the LOOP begins and the code between brackets will be repeated 7 times
    R1=@1213[I];............Store in Registry R1 actual value os Array @1213.
    ;................................'[I]' are index of array. First round is 0x019, second round 0xD9, etc
    DATA=R1;..................Put in current buffer address , current array value stored in: R1=@1213[I]
    MARK=R1;..................Put a Mark in current buffer address
    ADR=+1 ;...................increment address position
    } ;............................end LOOP
    ;................................End Function
    ;----------------------------------------------------------------------------------------------------
    ["#!Change Code"];............................................a Button!
    GET=("Choose Between 1=1634 2=1213",R7);.... open a Dialog box with data entry stored in R7
    R7?1{_OPTION1};......R7?1{.........}... ....R7?1 = IF R7 is equal to 1 then call a Function _OPTION1
    R7?2{_OPTION2};......R7?1{.........}... ....R7?2 = IF R7 is equal to 2 then call a Function _OPTION2
    ["#!Reset Counter"]
    ADR=396H;............... Set Position in Address 396H
    DATA=0 ;...................Set to zero '0' address 396H
    MARK=1;....................Put a Mark in current buffer address


    Last edited by richiebb; 12th April, 2018 at 01:28 AM.


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

    Decode Ghost (12th April, 2018), mohamad1401 (16th April, 2018), neverseenpotato (19th April, 2018), prodan (20th April, 2018), TFSIQuattro23 (2nd September, 2018), truedetective (24th May, 2019), yahia1908 (27th November, 2019)

  7. #4
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    Buttons..........

    Last edited by richiebb; 10th April, 2018 at 03:45 PM.


  8. The Following 11 Users Say Thank You to richiebb For This Useful Post:

    Albert G (10th April, 2018), bandus (10th May, 2018), Decode Ghost (12th April, 2018), irfa (10th April, 2018), kostelectronics (10th April, 2018), nigrou (10th April, 2018), petronijul (12th April, 2018), prodan (20th April, 2018), TERNOCOD (24th July, 2018), truedetective (24th May, 2019), yahia1908 (27th November, 2019)

  9. #5
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    In the following example, we cover
    • OR '|' logical,
    • bit/s offset,
    • print in hex format filling wuth '0' 4 digits
    • grouping of sentences in the same line.

    we will use the example Delphi RCD310 script, but we will do it in a different way.

    :suppose in this sample:
    ; 0x0A0= 64
    ; 0x0A1= 62
    ;
    0x0A2= 6D
    ; 0x0A3= 60

    ["!#CODE"]
    R4=0;....................................set R4 as zero '0'
    ADR=0A0H;............................set address in 0x0A0 position
    R0=DATA;..............................store data 0x0A0 in R0 '0x064'
    R0=^65H;..............................0x0A0 xor 0x065 = 1
    R0=<<12;..............................moving R0 3 nibble to the left. Sample: 1000
    R4=R0;..................................Assigned to R4 ,R0 value. Sample: 1000
    ADR=0A1H;............................set address in 0x0A1 position
    R1=DATA;..............................store data 0x0A1 in R1 '0x062
    R1=^65H;..............................0x0A1 xor 0x062 = 7
    R1=<<8;...............................moving R1 2 nibble to the left. Sample: 0700
    R4=|R1;................................R4 OR R1..... 1000 OR 0700.......R4= 1700
    ADR=0A2H;............................set address in 0x0A2 position
    R2=DATA;..............................store data 0x0A2 in R2
    '0x06D'
    R2=^65H;..............................0x0A2 xor 0x06D = 8
    R2=<<4;...............................moving R2 1 nibble to the left. Sample: 0080
    R4=|R2;................................R4 OR R2..... 1700 OR 0080.......R4= 1780
    ADR=0A3H;............................set address in 0x0A3 position
    R3=DATA;..............................store data 0x0A3 in R3
    '0x060'
    R3=^65H;..............................0x0A3 xor 0x065 = 5
    R4=|R3;................................R4 OR R3..... 1780 OR 0005.......R4= 1785
    PRINT=("CODE IS %04lX",R4);..%04lX He gives hexadecimal format filled with 4 zeros

    ;same code, but grouped by ',' and without comments

    ["!#CODE"]
    R4=0
    ADR=0A0H,R0=DATA,R0=^65H,R0=<<12,R4=R0
    ADR=0A1H,R1=DATA,R1=^65H,R1=<<8,R4=|R1
    ADR=0A2H,R2=DATA,R2=^65H,R2=<<4,R4=|R2
    ADR=0A3H,R3=DATA,R3=^65H,R4=|R3
    PRINT=("CODE IS %04lX",R4);
    Last edited by richiebb; 12th April, 2018 at 02:25 PM. Reason: Fix Some Mistakes in Coments


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

    datapage (21st April, 2018), Decode Ghost (12th April, 2018), luc242 (14th March, 2019), mikroel (15th April, 2018), mohamad1401 (12th April, 2018), neverseenpotato (19th April, 2018), prodan (20th April, 2018), sonices (16th April, 2018), truedetective (24th May, 2019), yahia1908 (27th November, 2019)

  11. #6
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    another example where we show how to use multiple Buffers AREAS.


    1-Radio Decode.cfg

    CHIP=rcd310Bosch2digits,?,Carradio\rcd310_2Digits. hpl
    AREA=ORIGINAL,16K(16);..........................................this add a AREA called ORIGINAL=AREA-0 whit a buffer of 16k*16
    AREA=AfterFF MOD,16K(16);......................................this add a AREA called AfterFF MOD=AREA-1 whit a buffer of 16k*16

    -----------------------------------------------------------------------------------------------------------------------------
    rcd310_2Digits. hpl

    [!#"Fill FF MOD"]
    ADR=0x0ae0
    LOOP(496){ ; begins a cycle at position AE0 with 496 cycles
    DATA=0FFH ; store in current position ff data
    ADR=+1 ; increment address in 1
    MARK=1 ; mark current position showing modification
    }
    [!#"Get Two Digits"]
    ;........... CFG FILE "1-Radio Decode.cfg" WHIT ADDONS TO CONFIG THIS SCRIPT ADDING EXTRA BUFFER AREA
    ;........... CHIP=rcd310Bosch2digits,?,Carradio\rcd310_2Digits. hpl
    ;........... AREA=ORIGINAL,16K(16) ;..............this add a AREA called ORIGINAL=AREA-0 whit a buffer of 16k*16
    ;........... AREA=AfterFF MOD,16K(16) ;..........this add a AREA called ORIGINAL=AREA-0 whit a buffer of 16k*16


    $AREA=0;......choose AREA to 0 is Display in Select Bottom Right as ORIGINAL
    ADR=0x0ae0;.set position to AE0
    R1=DATA;......store data in AE0 to R1
    R1[4]=0;........set to '0' xxx0xxxx bin Format
    R1[5]=0;........set to '0' xx0xxxxx bin Format
    R1[6]=0;........set to '0' x0xxxxxx bin Format
    R1[7]=0;........set to '0' 0xxxxxxx bin Format
    $AREA=1 ;......choose AREA to 1 is Display in Select Bottom Right as AfterFF MOD
    ADR=0x0b50;..set position to B50
    R2=DATA;.......store data in B50 to R2
    R2[4]=0;........set to '0' xxx0xxxx bin Format
    R2[5]=0;........set to '0' xx0xxxxx bin Format
    R2[6]=0;........set to '0' x0xxxxxx bin Format
    R2[7]=0;........set to '0' 0xxxxxxx bin Format

    $AREA=0
    ADR=0x0ae1;.set position to AE1
    R3=DATA;......store data in AE1 to R3
    R3[4]=0;.......set to '0' xxx0xxxx bin Format
    R3[5]=0;.......set to '0' xx0xxxxx bin Format
    R3[6]=0;.......set to '0' x0xxxxxx bin Format
    R3[7]=0;.......set to '0' 0xxxxxxx bin Format
    $AREA=1
    ADR=0x0b54;set position to B54
    R4=DATA;.... store data in B54 to R4
    R4[4]=0;......set to '0' xxx0xxxx bin Format
    R4[5]=0;......set to '0' xx0xxxxx bin Format
    R4[6]=0;......set to '0' x0xxxxxx bin Format
    R4[7]=0;......set to '0' 0xxxxxxx bin Format
    R1=^R2,R5=R1;..... R1 xor R2 and stored in R5
    R3=^R4,R6=R3;..... R3 rox R4 and stored in R6
    R1?8{R5=9},R1?9{R5=8};switch 8 by 9 and 9 by 8
    R3?8{R6=9},R3?9{R6=8};switch 8 by 9 and 9 by 8
    PRINT("Firts Two %X%Xxx",R5,R6); Print the Result

    -----------------------------------------------------------------------------------------------------------------------------
    Sample Video:

    Last edited by richiebb; 17th April, 2018 at 12:26 PM. Reason: fixing bug in code script


  12. The Following 9 Users Say Thank You to richiebb For This Useful Post:

    adikk (9th October, 2018), datapage (21st April, 2018), ledong (17th April, 2018), luc242 (14th March, 2019), mohamad1401 (16th April, 2018), neverseenpotato (19th April, 2018), nigrou (19th April, 2018), prodan (20th April, 2018), truedetective (24th May, 2019)

  13. #7
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    I'm back, I I've been busy.
    I am going to leave today an example of how to obtain something in a different way.
    In the previous example, we obtain the first nibble of a byte registry:
    R1=DATA;......store data in AE0 to R1
    R1[4]=0;........set to '0' xxx0xxxx bin Format
    R1[5]=0;........set to '0' xx0xxxxx bin Format
    R1[6]=0;........set to '0' x0xxxxxx bin Format
    R1[7]=0;........set to '0' 0xxxxxxx bin Format

    you get the same result by doing a logical and=&
    R1=DATA;......store data in AE0 to R1
    R1=&0x0f;......R1 AND 0x0F get the firts nibble of R1

    I leave the complete code and add so you can try the file with the script and CFG File in attached.


    rcd310_f2.hpl ; First two digits
    [!#"Fill FF MOD"]
    ADR=0x0ae0
    LOOP(496){ ; begins a cycle at position AE0 with 496 cycles
    DATA=0FFH ; store in current position ff data
    ADR=+1 ; increment address in 1
    MARK=1 ; mark current position showing modification
    }
    [!#"Get Two Digits"]
    ;........... CFG FILE "1-Radio Decode.cfg" WHIT ADDONS TO CONFIG THIS SCRIPT ADDING EXTRA BUFFER AREA
    ;........... CHIP=rcd310Bosch2digits,?,Carradio\rcd310_2Digits. hpl
    ;........... AREA=ORIGINAL,16K(16) ;..............this add a AREA called ORIGINAL=AREA-0 whit a buffer of 16k*16
    ;........... AREA=AfterFF MOD,16K(16) ;..........this add a AREA called ORIGINAL=AREA-0 whit a buffer of 16k*16


    $AREA=0;......choose AREA to 0 is Display in Select Bottom Right as ORIGINAL
    ADR=0x0ae0;.set position to AE0
    R1=DATA;......store data in AE0 to R1
    R1=&0x0f;....R1 AND 0x0F get the firts nibble of R1
    $AREA=1 ;......choose AREA to 1 is Display in Select Bottom Right as AfterFF MOD
    ADR=0x0b50;..set position to B50
    R2=DATA;.......store data in B50 to R2
    R2=&0x0f;....R2 AND 0x0F get the firts nibble of R2
    $AREA=0
    ADR=0x0ae1;.set position to AE1
    R3=DATA;......store data in AE1 to R3
    R3=&0x0f;....R3 AND 0x0F get the firts nibble of R3
    $AREA=1
    ADR=0x0b54;set position to B54
    R4=DATA;.... store data in B54 to R4
    R4=&0x0f;....R4 AND 0x0F get the firts nibble of R4
    R1=^R2,R5=R1;..... R1 xor R2 and stored in R5
    R3=^R4,R6=R3;..... R3 rox R4 and stored in R6
    R1?8{R5=9},R1?9{R5=8};switch 8 by 9 and 9 by 8
    R3?8{R6=9},R3?9{R6=8};switch 8 by 9 and 9 by 8
    PRINT("Firts Two %X%Xxx",R5,R6); Print the Result

    Last edited by richiebb; 22nd April, 2018 at 06:28 PM.


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

    datapage (21st April, 2018), dule14786 (20th March, 2020), electronicscars (1st October, 2018), marius7592 (21st November, 2018), mikroel (23rd April, 2018), neverseenpotato (5th May, 2018)

  15. #8
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    Another sample:
    • use of RA registry
    • PRINT=A ........'A=ASK' Input option cancel=0 ok=1 stored in RA Registry


    This script is for Stereos Ford by Visteon. containing 24c01 eeprom, get the code and if the counter is blocked ..... ask if you want to reset.



    v24c01.hpl

    ; Car Radio Visteon eeprom 24c01
    HPL=24C02.hpl;.....................set chip congiguration
    POWER=0;...........................power off

    [_RESET];...........................set Function named _RESET
    ADR=04EH;..........................set address in position 0x04e
    DATA=0;.............................put a 0 in current address 0x04e
    MARK=1;.............................mark current position 0x04e
    ADR=070H;..........................set address in position 0x070
    LOOP(3){;...........................start a LOOP of 3 cycles
    DATA=0;.............................put a 0 in current address
    MARK=1;.............................mark current position
    ADR=+1;.............................increments in 1 address
    };......................................end of LOOP
    ADR=07DH;..........................set address in position 0x07d
    DATA=055H;.........................put a 0x055 in current address
    MARK=1;.............................mark current position
    ADR=+1;.............................increments in 1 address
    DATA=041H;.........................put a 0x041 in current address
    MARK=1;.............................mark current position
    ADR=+1;.............................increments in 1 address
    DATA=054H;.........................put a 0x054 in current address
    MARK=1;.............................mark current position
    ;.......................................END of function _RESET

    ["#!Get Code"]
    ADR=0x03;..........................set address in position 0x003
    R0=DATA;...........................stored data of current address in R0 registry
    R0=<<8;.............................move 2 nibbles to left data of registry R0
    ADR=0x4d;..........................set address in position 0x04d
    R1=DATA;...........................stored data of current address in R1 registry
    R0=+R1;.............................sum R0 + R1
    ADR=+1;............................increments address in 1
    R3=DATA;...........................stored data in registry R3
    ADR=070H;.........................set address in position 0x070
    R4=DATA;...........................stored data in registry R4
    PRINT=("CODE: %04lX",R0,R3);print code
    R4?0C8H{R6=1};..................check R4 registry if R4 is equal to 0x0c8 then set R6 to 1
    R3?0AH{R6=1};...................check R4 registry if R4 is equal to 0x0c8 then set R6 to 1
    R6?1{;...............................check R6 registry if R6 is equal to 1 then ask if wont reset counter
    PRINT=A("Reset Counter?");..open input request and stored in RA registry your choose if ok=1 cancel =0
    RA?0 {RETURN};.................check RA registry if RA is equal to 0 then return and next line is not executed
    _RESET;............................call to _RESET function
    }




    must to copy v_24c01.hpl in folder: HPL\Carradio ............ and add to config file:
    GROUP=Ford;............. if not exist
    CHIP=Visteon 24C01,128,Carradio\v_24c01.hpl
    Attached Files Attached Files
    Last edited by richiebb; 5th May, 2018 at 05:34 PM.


  16. The Following 5 Users Say Thank You to richiebb For This Useful Post:

    audiopoint (5th May, 2018), irfa (5th May, 2018), llcalin (6th September, 2019), neverseenpotato (5th May, 2018), nigrou (5th May, 2018)

  17. #9
    DK Veteran
    nigrou's Avatar
    Join Date
    Dec 2010
    Location
    algeria mascara
    Posts
    1,484
    Thanks Thanks Given 
    2,621
    Thanks Thanks Received 
    3,444
    Thanked in
    1,122 Posts

    Default

    salam
    thanks for you

    but how to add to the configuration file:
    GROUP = Ford
    CHIP = Visteon 24C01,128, Carradio \ v_24c01.hpl
    "Stop racism, for we are all human beings"

  18. #10
    Top Poster

    Join Date
    Feb 2015
    Posts
    144
    Thanks Thanks Given 
    186
    Thanks Thanks Received 
    239
    Thanked in
    84 Posts

    Default

    to nigrou
    open .cfg file with Notepad and write

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

    nigrou (5th May, 2018)

  20. #11
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    Well, work has me quite busy ......
    Today I will show how to find a pattern and use it to detect the position of the code.

    the INF1-MID and the INF2-MID have the code in a different direction but they share a pattern.



    After the four @, leave a space and then follow the code. If we look at the previous line, there are three more.
    locating the search at the right point we can take advantage of this pattern to automate the search of the code ....... analyzing several dumps I found that it is 0x73.

    ; INFx-xxx Auto Detect

    ["!#GET CODE"]
    ADR=073H;......................set addres in position 0x73
    R0=0;..........................set R0 Registry to 0 this are use to counter '@'= hex 40
    LOOP($SIZE){;..................the LOOP , that starts at address 73 until the end of the buffer
    R1=DATA;.......................store current data in R1 registry
    ADR=+1;........................increment address in 1
    R1?040H{;......................logical if:... if R1=40
    R0=+1;.........................then increment counter R1
    }
    R0?7{ADR=+1,BREAK};............the counter reaches 7 then breaks the loop and increments address in 1
    };.............................end of LOOP
    R0=DATA;.......................stored first digit code in R0
    MARK=1;........................put mark in first digit
    ADR=+1;........................increments address in 1
    R1=DATA;.......................stored second digit code in R1
    MARK=1;........................put mark in second digit
    ADR=+1;........................increments address in 1
    R2=DATA;.......................stored third digit code in R2
    MARK=1;........................put mark in third digit
    ADR=+1;........................increments address in 1
    R3=DATA;.......................stored fourth digit code in R3
    MARK=1;........................put mark in fourth digit
    PRINT=("CODE=%X%X%X%X",R0,R1,R2,R3);print rezult

    must by copy INFx-xxx.hpl into HPL folder and add in CFG file the CHIP
    GROUP=Volkswagen; if not already exist
    CHIP=INFx-xxx Auto Detect,2k,Carradio\INFx-xxx.hpl;
    Attached Files Attached Files
    Last edited by richiebb; 13th May, 2018 at 03:34 PM.


  21. The Following 9 Users Say Thank You to richiebb For This Useful Post:

    bandus (2nd June, 2018), Dekster (9th June, 2018), irfa (13th May, 2018), juisro (13th May, 2018), masterskay62 (13th May, 2018), mohamad1401 (13th May, 2018), neverseenpotato (13th May, 2018), nigrou (13th May, 2018), whim (26th September, 2020)

  22. #12
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    I posted an example of a script to change the vin number of Chevrolet My Link

    what's new in this script?, dialog entry with character string




    ; CHIP=24C256,32K(8),24C512b.hpl
    HPL=24C512b.hpl;......................set chip configuration
    POWER=0;..............................don't energize the chip
    @ART=16;..............................length of 16 for input string
    R9="In uppercase",S32;................Set String label and String type (s32) - NIV

    [!#"Change VIN"]
    ADR=010CEH;...........................set address in 0x10ce position
    R9=0;.................................put a zero in R9
    GET=("Enter VIN without the K",R9);...open input dialog request a new VIN ........VIN is going to be stored in the array @ART, each position of the array character to character
    RA?0{EXIT};.......................if press cancel then exit and rest of code dont executed
    R8=@ART;..........................assign 16 to R8

    LOOP(R8){ ;.................................start loop
    R0=@ART[I];.............................stored current caracter in R0
    DATA=R0;................................store data in current address
    MARK=1;.................................mark current position
    ADR=+1;.................................increments address in 1

    }


    CFG file config:

    GROUP=Chevrolet; IF NO ALL READY EXIST
    CHIP=MyLink 24c256 ,32K(8),Carradio\mylink.hpl

    Attached Files Attached Files
    Last edited by richiebb; 13th June, 2018 at 01:56 PM.


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

    neverseenpotato (9th June, 2018), nigrou (8th June, 2018), TERNOCOD (24th July, 2018), whim (26th September, 2020)

  24. #13
    Junior Member PACEVE's Avatar
    Join Date
    Feb 2016
    Location
    Portugal
    Posts
    21
    Thanks Thanks Given 
    17
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default

    Dear richiebb

    Please help me, Urgent !!!

    VIN: VF7FCHFXB26046210

    I'm studying the Orange program, but I still can not identify the VIN

    Thanks in advance

  25. #14
    DK Veteran
    richiebb's Avatar
    Join Date
    Aug 2015
    Location
    Argentina
    Posts
    1,317
    Thanks Thanks Given 
    3,362
    Thanks Thanks Received 
    3,177
    Thanked in
    894 Posts

    Default

    wrong thread!!

    make your own.............post your dump and we will help you!!!
    Last edited by richiebb; 11th October, 2018 at 03:21 PM.


  26. #15
    Junior Member PACEVE's Avatar
    Join Date
    Feb 2016
    Location
    Portugal
    Posts
    21
    Thanks Thanks Given 
    17
    Thanks Thanks Received 
    1
    Thanked in
    1 Post

    Default Pin By ECU Flash

    Dear richiebb

    Ok I

    I'll read the ECU Flash and I'll post it here.

    Thank you
    Last edited by PACEVE; 11th October, 2018 at 03:40 PM. Reason: correction

 

 

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.