//////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

.       Picbined 

1. Introduction 
Pic BIN/HEX editor. It is freeware software.
This application lets you edit hex and binary file for eeprom.

Conditions:
- up to 255  providers
- up to 255  keys per provider
- up to 1024 global parameters
- up to 1024 parameters per provider
- freely providers indexes
- freely key block indexes, next key after the same number of bytes from previous
- freely global parameters indexes
- freely parameters per provider indexes, parameter of next provider after the same 
  number of bytes from parameter of previous provider
- full string paste and copy of data in some data modes: text string, hex, hex with
separators, binary, dec and multimac

shared/picbined.exe - application without libraries (need mfcXX.dll)
picbined.ini - configuration file
picbined.ini.seca - configuration file for seca,
picbined.ini.irdeto - configuration file for irdeto, 
...

It is possible to define max length of controls like in table. 
control name,		max length (dec)[BYTES]
global(s)               256
prov. param(s)          256
prov. string            256
key                     128
set name                32
provider name           32
global(s) name          32
prov param(s) name      32
key12 name              32
key13 name              32

Max file bin/hex size is 64kB.

Picbined saves to file data in order:
global(s) (first)
provider string
prov. param(s) 
key (from 1 to 13 for  provider form 1 to 15) (last)
If index will be wrong defined, for example prov. param will includes the 
same bytes like global, the global will overwrite changes in prov. param.

Picbined reads all file data to memory and copies defined in setting data to 
working buffer. After editing data it save working buffer in memory
with all data and all data are saving from memory to the disk.

2. For beginers:
Run picbined. 
Go to upper right button "Enable" and press it.
Go to upper right combobox and select ini file (your scramblig system).
Go to upper left combobox and select type of your card.
   Select Open option from menu and open your file.
   Go to Keys tab in the main window. Select your provider in listbox 
   in the right side.
   You see many editboxes labeled key 1, key 2 ... 
   This is place to edit keys.
   Select Save to store changes in file.
   The Global tab lets to edit global parameters, Provider tab provider's parameters,...
   or
   Go to JDM/Phoenix tab and select interface=phoenix.
   Check if firmware conbobox is 'Not defined'. If yes - sorry this way is impossible.
   Connect phoenix with your card into com port.
   Select correct com parameters.
   Select "Adress from script" in central combobox and press Read button.
      Go to Keys tab in the main window. Select your provider in listbox 
      and edit your keys.
      or
      If you have copy of freeseka page or file exported from picbined with keys
      (seca,viaccess or nagra - you have to see ident-s in file) go to
      menu Tools->Power Import. 
      Set path to file with keys. Define source in 'Set' as freeseka or picbined.
      Uncheck 'Try to import provi..." and press OK button.
   Go to JDM/Phoenix tab. Set 'All changed data only' and press Write button.
   All changes are in the card at this moment.
Menu->Save/Save As lets to save data in file on the disk.
Close application.

//////////////////////////////////////////////////////////////////////////////

I.       File->Open dialog

Picbined is able to open files:
 1. Binary - bit map file
 2. Hexadecimal - as hex values in 8bit intel format
 3. CRD
 It is possible to auto detect crd types: (spaces between bytes are not imperative)
 01 02 FF XX XX 12 data         :where
                                 XX   - any byte
                                 data - 0x10 bytes
 01 02 23 HH LL NN data                 
 CA FF HH LL NN data            :where
                                 HH - high byte of address  
                                 LL - low  byte of address
                                 NN - number of data bytes
                                 data - data bytes
 XX ... XX HH LL NN data        :where
                                 XX - any byte
                                 HH - high byte of address  
                                 LL - low  byte of address
                                 NN - number of data bytes
                                 data - data bytes
////////////////////////////////////////////////////////////////////////////// 

II.      File->Save menu option
  
  This option saves data from buffer to file on disk. It uses name from 
  titlebar of picbined application.

//////////////////////////////////////////////////////////////////////////////

III.     File->Save As dialog
 
    Picbined is able to save data in formats:
    1. Binary - bit map file
    2. Hexadecimal - as hex values in 8bit intel format
    3. CRD - 
      01 02 FF 00 00 12 HH LL data
      XX ... XX HH LL NN data     :where
                                   XX...XX - any prefix bytes defined by user
                                   HH - high byte of address  
                                   LL - low  byte of address
                                   NN - number of data bytes
                                   data - data bytes
////////////////////////////////////////////////////////////////////////////// 

IV.	File->Special Open

	Open a fragment of file in picbined. Index defines position in file 
	from picbined will read data. Length defines number of bytes to read.

	Do not try to open more than 64kB.

////////////////////////////////////////////////////////////////////////////// 

V.	File->Special Save

	Save fragment of file from picbined's buffer to file.

////////////////////////////////////////////////////////////////////////////// 

VI.	File->Exit

	Close plrogram and exit.

////////////////////////////////////////////////////////////////////////////// 

VII.       Provider->Swap
	
	Select provider on the listbox of providers. Call this menu item 
	and select the second provider. Both providers exchange positions.
	This operation is possible only on Keys & Provider tab windows.
	Select provider on the listbox. Choose Swap from menu and select
	the second provider on the listbox. The both selected providers 
	will change position in the listbox.

//////////////////////////////////////////////////////////////////////////////

VIII.     Provider->Move

	Select provider on the listbox of providers. Call this menu item 
	and select the second provider. First selected provider will inserted
	before the second selected provider.
	This operation is possible only on Keys & Provider tab windows.
	Select provider on the listbox. Choose Move from menu and select
	the second provider on the listbox. The first selected provider 
	will be inserted on position before the position of secondly selected
	provider.

//////////////////////////////////////////////////////////////////////////////

IX.    Provider->Clear

	Select provider on the listbox of providers. Call this menu item 
	and selected provider will have cleared all parameters and keys.
	This operation is possible only on Keys & Provider tab windows.
	Select provider on the listbox. Choose Clear from menu.
	All keys and provider parameters will be erased for selected provider.

//////////////////////////////////////////////////////////////////////////////

X. Clear keys in all

	Working on param and keys tab.
	Clears all keys in all providers.

//////////////////////////////////////////////////////////////////////////////

XI.   Clear one param in all

	Set focus to edit box and select this command. The parameter in selected 
	edit box will be cleared for all providers.
	
//////////////////////////////////////////////////////////////////////////////

XII.    Copy one param to all

	Set focus to edit box and select this command. The parameter in selected 
	edit box will be copied into the same place for all providers.
	
//////////////////////////////////////////////////////////////////////////////

XIII.    Tools->Export

      This option saves all data from internal buffer to text file. 
      There are three text file types:
      1. INI - standard ini file 
      2. TXT - standard text file
      3. CRD - crd file in format:
      XX ... XX HH LL NN data        :where
                                    XX ... XX - prefix defined by user
                                    HH - high byte of address
                                    LL - low byte of address
                                    NN - number of data bytes
                                    data - data bytes
	Export data to text file lets to easy public parameters on text page.
                                    
//////////////////////////////////////////////////////////////////////////////

XIV.    Tools->Import

       This option read data from text file into internal buffer. The binary
       file have to be opened before importing parameters.
       There are three text files types to read from. All are the same like
       for Export option.
       If file type is TXT or INI import is possible only if file was created
       by Tools->Export command. Only CRD file can be imported from other source.

//////////////////////////////////////////////////////////////////////////////

XV.    Tools->Power Import

	Power import is created for reading data from any text file source to 
	any working mode in picbined.
	
	1. File - path to file with data.
	2. Browse - standard Open File dialog.
	3. Set - predefined configurations for any sources.
	4. Try to ... - main purpose of Power Import is importing keys.
	   This check box lets to try to import parameters too.
	5. Ignore empty keys - the key in imported file can be: 00 00 ... 00.
	   Importing this key will erase old key in your bin. This option checks if 
	   all bytes in imported key are the same. If yes, this key will not be read!
	6. Ignore duplicate keys - it lets to show on info message box ony new keys
	7. Compare->Provider Parameter - list of all provider parameters names
	   in current working set. Select one which will be used to identify 
	   provider in working mode.
	8. Compare->Provider Name - if it is not possible to find provider
	   ident, the name of provider defined in Configuration dialog in
	   Providers listbox can be used for identify a provider.
	9. With value->Start - the string which will be looked for in text
	   file. If this string will be found, next chars in the same line
	   will be read and compared with value of parameter Compare->Provider Parameter.
	   If values will be the same - provider is identified.
	10.With value->End - the string which tells: this is end of found providers
	   parameters/keys in text file - have to looking for next provider.
	11.With value->Digits/Text - it defines if value found in text file should
	   be used to compare as vector of hex bytes or as text string.
	   Ident=01 02 03  - there are digits
	   Name=Stream     - there is text sting
    	12.Key ID - the key bytes in file are followed by any label. This label
           is defined in this edit box. The label can include in it's body:
          a. key number:
            - 2 chars, hexadecimal = 2X
            - 2 chars, decimal     = 2Y
            - 1 char, hexadecimal  = 1X
            - 1 char, decimal      = 1Y
          b. label of key is in previous line:
            - char new line + cartridge return = 2Z 
            - char new line only               = 1Z
          
          Message box shows which keys/parameters were imported to picbined data buffer.
       
	13. (from mail) 
	How to set picbined for power import keys from *.txt file from net like next:
		CHANNEL C*N*L+ FRANCE
		IDENT 00 03
		INDEX 0C KEY 0D EB 7D F9 F3 9C F5 8E *
		INDEX 0D KEY 59 BE 1C 6F CC C6 5F 90 **
		INDEX 0E KEY 42 64 5B 70 0D CD 69 89

		CHANNEL CSN
		IDENT 00 04
		INDEX 0C KEY 0D AA 7D F9 F3 9C F5 8E *
		INDEX 0D KEY 59 AA 1C 6F CC C6 5F 90 **
		INDEX 0E KEY 42 AA 5B 70 0D CD 69 89

	  This is standard freeseka format.

	  a. First how to identify? 
	     Use  "IDENT 00 03" value from file and value of "Ident" from 
	     picbined's setting:
		Provider parameters = "Ident"
		With value Start = "Ident"
                 	   Stop  = "Ident"
	     All between words "IDENT" and "IDEND" in file is data of identified provider.
	     The value of "IDENT" can be "00 03" or "0003" - this is digit case.
	        If you found in file: [Premiere World] you have to set:
	          Provider parameters = "Name", With value Start = "[", Stop  = "[". 
	        Digit ident does not exist and have to use a name as ident- this is text case. 
	        Picbined's setting has to have parameter "name" ! It is very lucky day if names 
	        in file will be the same with names stored in parameter "name". 
	        The "power import" field in configuration lets to define more than one name 
	        for each provider - but invention of file authors is very big.
	
	  b. How to find keys? 
	    "INDEX 0D KEY" in file is info about key.
	     Key ID = "Index 2X Key"  - 2X picbined will replace to find 0D like in example.
             
             It will work if "IDENT 00 03" and "INDEX 0C KEY" starts from first column in the line .
	
	     If the example is:

	     CHANNEL C*N*L+ FRANCE
	     IDENT 00 03
	     INDEX 0C
	     KEY0D EB 7D F9 F3 9C F5 8E *
	     INDEX 0D
	     KEY 59 BE 1C 6F CC C6 5F 90 **
	     INDEX 0E
	     KEY 42 64 5B 70 0D CD 69 89
	
	     Key ID = "Index 2X2ZKey"
	     but you have check if new line char = 0x0d0a or 0x0d . 
	     If 0x0d the correct is 1Z not 2Z.


//////////////////////////////////////////////////////////////////////////////

XVI.      Tools->Configuration dialog 

Lets to define sets used by application to managed binary file. All parameters
defined in this dialog are stored in ini file.
 1. 'Set' - list of all configuration sets in current ini file.
 2. 'Set name' - name of set. This text will be displayed in 'Working mode' box.
 3. 'Number of':
   a.'Providers' - number of providers in set. All provider parameters 
                   are defined for each provider
   b.'Globals'   - number of global parameters in set.
   c.'checks'    - number of global checkboxes in set.
   d.'Params'    - number of provider parameters in set for each provider in set.
   e.'checks'    - number of provider parameters checkboxes in set for 
                   each provider in set.
   f.'Keys'      - number of keys for each provider in set
    Leaving each of 'Number of' editboxes change number of entries in listboxes.
 4. 'Font width' - a width of fonts in 'Keys' & 'Parameters' controls.
 5. 'Auto Detection' - each opening binary file will be detected for finding
    identification string in it.
 6. 'Keys & ProvParams' - if is a space, keys & provider parameters controls
    will be displayed on the same window.
 7. Virtual Providers Mode. If setting uses one key, one ident and one key number 
    for each provider this mode lets to show all keys for this provider.
    Virtual Providers Mode has hardcoded some parameters. It will work if setting 
    will use:
    - ident (hex) defined as provider parameter (index=1)
    - key (hex, max len=32) defined as provider parameter (index=2)
    - add key not defined
    - key number (hex, length=1) defined as provider parameter (index=3)
    - set used keys (in 'Key - Active' )
    - no more provider parameters be defined
    Possible: Power Import and Export.
    Impossible: Clear, Move, Swap, Clear all ...
    Picbined reads idents of all providers from index 0 to max. Each ident will be added 
    to the list, but each only one. If you want to change order of idents on provider list 
    you have to edit it in normal mode and set order of providers using all 8th keys.
    Example: viaccess mode for fun3in1 allcam.
    The key is empty (in this mode) if all bytes are equal to 0x00 or 0xFF. You can 
    define 128 providers with different idents this way but with one key define 
    16 providers with different idents with 8 keys for each.
 8. 'Provider' listbox - all providers and key indexes.
    There are stored index of each provider section in file, index of first
    key of this provider and name of provider if it is not defined in file.
    Editing values for this and parameters listboxes is easy: select row 
    in listbox, go to editboxes under the listbox, edit items and press
    'Change Provider/Parameter' button for changing values.
 9. 'Power Import' for provider and parameters listboxes. 
    The 'Power Import' functionality in picbined lets to import keys and 
    parameters form external text file into picbined. It is possible only
    if set include 'ident' field. The irdeto does not use ident field.
    This control lets to define name of parameter and list of parameter names
    for comparing names during 'Power Import' between text file and picbined set.
 10. 'Key - Active' listbox.  It lets to activate only needed keys in the set.
    The button 'Change Key' activates selected key. It lets to display correct
    key number in the window.

Not used parameter - this is parameter with index=0 and length=0. It can be 
on list of parameters but picbined will not use it definition for creating
edit control.

 11. Parameters listbox.
   a. 'Providers' - The index of each provider is defined in 'Providers' 
      listbox. This index identified a group of parameters but it is 
      possible the 'Ident'(digits) or 'Name'(chars) of provider. 
      The 'Length' lets to define that it is index to:
        - 'Ident' -> 'Length'-'Hole' have to be from 1 to 4 - picbined will read 
          this digit and write provider name in window from predefined names.
        - 'Name' -> 'Length'-'Hole' have to be from 5 to n - picbined will read
          this name string and write this name in window
        - set of data -> 'Length' and 'Hole' have to be 0. In this case name 
          of provider have to be defined in 'Providers' listbox ! The swapping and
          moving position of provider during editing binary file is not possible!
      The 'Hole' is useful if 'Provider' index cannot point direct to ident 
      or name string. If index points to string: "123456789Premiere   ",
      value of 'Hole'=9 says picbined to look for name using "index+9" index.
   b. 'Keys' - The index to first key for provider is defined in 'Providers' listbox. 
      'Key steps' - how many bytes of data for one byte of key
      'Length'    - the number of bytes in one key. 
      'Hole'      - space (in bytes) between key and next key.
       "11 11 11 11 22 22 22 22 33 33 33 33" - length=4, hole=0, key steps=0
       "11 11 11 11 XX XX XX XX 22 22 22 22" - length=4, hole=4, key steps=0
       "11 00 11 00 XX XX XX XX 22 00 22 00" - length=2, hole=4, key steps=1
       "11 00 00 11 00 00 XX XX 22 00 00 22 00 00" - length=2, hole=2, key steps=2
   c. 'Keys add' - all the same like for 'Keys'. The 'Keys add' has sense like 
      secondary key in seca. If the key is defined as primarysecondary:
      'pp pp ... pp ss ... ss' the best way is define length of key = 0x10
      and do not use 'Keys add'. If secondary keys are defined in different
      space of binary file - define secondary keys as 'Keys add'. Picbined
      will take 'Keys' and 'Keys add' and create one long key in edit control
      for you. The primary and secondary is virtual thing - key is only one.
   d. 'Identify' - 'name'-the string which will be looked for in binary file. 
      The 'Index' defines place in file where the string will be detected.
   e. 'PhoenixID' - 'name'-number of id from phoenix script. It defines default phoenix
      script for this set.
   f. 'Phx.cmd' - 'list'-commands to send to card by phoenix interface.
      Definition of this string. This is the same definition like for 'List' one page down but:
      - NameToDisplay1 - is any text string
      - Value1 = request1.replay1.request2.replay2 or request1.replay1.request2
     		 request1.replay1                  or request1
        - request1, request2 - command string: 11 22 0f 77 XX 44 1c
          The XX has to be replaced by correct value by user
        - replay1, replay2 - command string returned by card: 11 2c 3d ff ff ff 90 00
          If returned value is unknown use ff value. Number of bytes in replay has to be correct.
          See seca_pic -> Piccard2 for example.
      The last replay string can be empty. All returned by card bytes will be read.

 Common info:
   'Index'  - place of first byte of parameter in file
   'Length' - number of bytes 
   'Hole'   - number of bytes between last byte of n-th provider's parameter 
              and first byte of (n+1) provider's parameter
   'Invert' - parameter's bytes inverted or not ('12345' -> '54321')
   'Mode'   - mode of displayed data in controls in tab windows:
     		- hex  - hexadecimal values with separator between: 11 22 33...
     		- text - bytes are converted to text string: Premiere World 
     		- bin  - each byte is converted to binary: 11111111 00110011 1100...
     		- dec  - decimal values: 001 012 097...
     		  (the 010 is not the 10 !! in picbined editbox. 010=10 dec but 10=16 dec.
     		- multimac - : 1730 3241 4212...
     		- seca date ->
     		- via date  - dates defined for seca and via standards: YYYY.MM.DD
     		                                     YYYY - year, MM-month, DD-day
   'Name'   - name of parameter
   'List'   - some global/provider parameters can have predefined values:
   		NameToDisplay1,Value1;NameToDisplay2,Value2; ... NameToDisplayN,ValueN;
   		or
   		Value1;Value2; ... ValueN
   		or
   		Value1;NameToDisplay2,Value2; ... ValueN
   			NameToDisplayN - name which is displayed in combobox. If it is not used
   					ValueN will be in combobox.
   			ValueN         - text which will be inserted to edit box after
   			                 selecting NameToDisplayN in combobox.
            Chars: ',' and ';' can not be used in NameToDisplay1 and Value1 because the both 
            are separators.
            
               NameToDisplay & Value can be:
               !X.Y.Z[[.I.L].n]			where:
               		NameToDisplayN & ValueN parameters:
                        X - defines type of parameter
                        	N - provider name (predefined in providers listbox) - Y is ignored
                        	G - global parameter - Z is ignored
                        	P - provider parameter
   			Y - defines parameter index - hexadecymal value 
   			Z - defines provider index - hexadecymal value (it can be 'U' char - it means
   			    current provider ). It is 0 for global param.
   			NameToDisplayN(only) optional parameters:
   			n - provider name - all from left side of .n will be used as ident and
   			    will be converted to text provider name (if possible). It can not be
   			    with X = 'N'.
   			I - (table) index
   			L - length of item (in table)
   			    X.Y.Z will be used as vector of bytes, I defines index in this 
   			    vector, L defines length [in bytes] of item to get.
   			    It can not be if X = 'N'.
   		Example:
   		!N.0.1,!N.0.1;Global,!G.1.0;P.1.1,first;P.1.2,second;
   			
   g. 'GlobalXX' - global parameter. 
      It can occure only ones, 'Hole' is not defined for it.  
   h. 'GCheckX'  - global checkbox parameter.
      The length of checkbox is always 1 byte. The length defines index of bit
      which will be managed by checkbox. 1->LSB, ..., 8->MSB if checkbox is checked
      for value 1. If checkbox checked for value 0: (FF-1)->LSB ... (FF-8)->MSB.
   i. 'ParamXX'  - provider parameter.
   j. 'PCheckX'  - provider checkbox parameter.
      The length of checkbox is always 1 byte. The length defines index of bit
      which will be managed by checkbox. 1->LSB, ..., 8->MSB if checkbox is checked
      for value 1. If checkbox checked for value 0: (FF-1)->LSB ... (FF-8)->MSB.

 Memory data (for all examples): 
 100: 00 00 00 11 22 33 44 55 66 77 88 99 00 00 00 00
 110: 00 00 00 aa bb cc dd ee ff 00 01 02 03 00 00 00

 12. How to define indexes. 
   a. KEY for one provider: 	
 --------------------------------------------------------------------------------
 | key                                                                          |
 --------------------------------------------------------------------------------
 | idx | length | hole | what | key                                             |
 --------------------------------------------------------------------------------
 | 100 | 10     | 00   | 1th  | 00 00 00 11 22 33 44 55 66 77 88 99 00 00 00 00 |
 |     |        |      | 2th  | 00 00 00 aa bb cc dd ee ff 00 01 02 03 00 00 00 |
 --------------------------------------------------------------------------------
 | 103 | 09     | 07   | 1th  | 11 22 33 44 55 66 77 88 99                      |
 |     |        |      |      | aa bb cc dd ee ff 00 01 02                      |
 --------------------------------------------------------------------------------
 | PARAM for each provider                                                      |
 --------------------------------------------------------------------------------
 | idx | length | hole | invert | what             | param                      |
 --------------------------------------------------------------------------------
 | 10A | 03     | 0D   | yes    | param for prov 1 | 00 99 88                   |
 |     |        |      |        | param for prov 2 | 03 02 10                   | 
 --------------------------------------------------------------------------------
 
 13. Pointers.
    The usage of pointers defines pointers table.
                          -----------------------------------------------------------------
                          |                 Length pointers                               |
+-------------------------+----------------------------------------------------------------
| Varialbles              | L | H | LS| HS| LM| HM| s | Ls| Hs|LSs|HSs|LMs|HMs|  |  |  |  |
+-------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+--+--+--+--|
|provider index           | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|provider index  (global) | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|provider length (global) | + | + | + | + | - | - | - | - | - | - | - | - | - |  |  |  |  |
|first key index          | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|keys length     (global) | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|identify index  (global) | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
+-------------------------+---+---+---+---+---+---+---+---+---+---+---+---+---+--+--+--+--|
|global index             | - | - | - | - | - | - | - | - | + | + | + | - | - |  |  |  |  |
|global length            | + | + | + | + | + | + | + | + | + | + | + | + | + |  |  |  |  |
|global checkbox index    | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|provider param index     | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
|provider param length    | + | + | + | + | + | + | + | + | + | + | + | + | + |  |  |  |  |
|pr param checkbox index  | - | - | - | - | - | - | - | - | - | - | - | - | - |  |  |  |  |
+------------------------------------------------------------------------------------------

                          ---------------------------------------------------------------
                          |                 Index pointers                              |
+-------------------------+--------------------------------------------------------------
| Varialbles              |  |  |  |  |  |  | p | m | h | x | X | ph| px| pX| mh| mx| mX|
+-------------------------+--+--+--+--+--+--+---+---+---+---+---+---+---+---+---+---+---|
|provider index           |  |  |  |  |  |  | + | + | + | + | + | + | + | + | + | + | + |
|provider index  (global) |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|provider length (global) |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|first key index          |  |  |  |  |  |  | + | + | + | + | + | + | + | + | + | + | + |
|keys length     (global) |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|identify index  (global) |  |  |  |  |  |  | - | - | - | - | - | - | - | - | - | - | - |
+-------------------------+--+--+--+--+--+--+---+---+---+---+---+---+---+---+---+---+---|
|global index             |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|global length            |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|global checkbox index    |  |  |  |  |  |  | - | - | + | + | + | - | - | - | - | - | - |
|provider param index     |  |  |  |  |  |  | + | + | + | + | + | + | + | + | + | + | + |
|provider param length    |  |  |  |  |  |  | + | + | + | + | + | + | + | + | + | + | + |
|pr param checkbox index  |  |  |  |  |  |  | + | + | + | + | + | + | + | + | + | + | + |
+----------------------------------------------------------------------------------------

Pointer is value of index/length in bin/hex file where value to use will be find.
There are some versions of pointers: (see data example upper)
--------------------------------------------------------------------------------
|	name                               | index | value     ||length | value    |
--------------------------------------------------------------------------------
| no pointer,                          | 0330  | (=0x330)  || 0008  | (=0x08)  |
| pointer to 1 byte value              | 0103h | (=0x11)   || 0114h | (=0xBB)  |
| pointer to 2 byte value (hi-lo order)| 0103x | (=0x1122) || 0114H | (=0xBBCC)|
| pointer to 2 byte value (lo-hi order)| 0103X | (=0x2211) || 0114i | (=0xCCBB)|
--------------------------------------------------------------------------------
The definition of provider parameter defines exact index in memory. The same
parameter for next provider will be read from index of first parameter + hole...
It works good if all provider parameters have the same hole. 
The second idea is defining index of provider param as provider index +(-) step.
The step will be used as provider parameter index. The hole will be ignored.
Sample of definition of provider parameter index as step to provider index:   
for:  provider 1 index=100  and provider 2 index=110 and provider 3 index=370
and:  provider param 1 index=2p (see on 'p'(plus) or 'm'(minus) letter!)
result:-------------------------------------------------------------------
       | param index definition | index of provider param | for provider |
       -------------------------------------------------------------------
       |       2p               |         102             |     1        |
       |       2p               |         112             |     2        |
       |       2p               |         372             |     3        |
       |       3m               |         97              |     1        |
       |       3m               |         107             |     2        |
       |       3m               |         367             |     3        |
       -------------------------------------------------------------------
Provider index can use p and m pointers but it points to provider index global.
         
 14. Steps for keys only.
  (see memory example upper)
   ------------------------------------------------------------------
   | index of first key | length | key step | the first key         |
   ------------------------------------------------------------------
   | 100                | 4      | 0        | 00 00 00 11           |
   | 100                | 4      | 1        | 00 00 22 44           |
   | 100                | 4      | 2        | 00 11 44 77           |
   ------------------------------------------------------------------

 15. Length types.
   Only length of providers, provider's parameters and global parameters can use
   this type. The type changes value of only last byte of parameter.
   -----------------------------------------------------------------------------------------
   | parameter index | length | value       |  Comments                                    |
   -----------------------------------------------------------------------------------------
   |   103           |  03    | 12 34 56    | normal                                       |
   |   103           |  03s   | 21 43 65    | swap nibles                                  |
   |   103           |  03H   | 12 34 50    | only high nibble in last byte                |
   |   103           |  03L   | 12 34 06    | only low nibble in last byte                 |
   |   103           |  03Hs  | 12 34 05    | only high nibble in last byte  (with swaping)|
   |   103           |  03Ls  | 12 34 60    | only low nibble in last byte   (with swaping)|
   |   103           |  03HS  | 10 34 56    | only high nibble in first byte               |
   |   103           |  03LS  | 02 34 56    | only low nibble in first byte                |
   |   103           |  03HSs | 01 34 56    | only high nibble in first byte (with swaping)|
   |   103           |  03LSs | 20 34 56    | only low nibble in first byte  (with swaping)| 
   |   103           |  04LM  | 06 12 34 50 | move low nibble from last byte to first byte |
   |                 |        |             | (first byte is not from bin file!)           |
   |   103           |  04HM  | 05 12 34 06 | move high nibble from last byte to first byte|
   |   103           |  04LMs | 60 12 34 50 | move low nibble from last byte to first byte |
   |                 |        |             | (first byte is not from bin file!)(with swap)|
   |   103           |  04HMs | 50 12 34 06 | move high nibble from last byte to first byte|
   |                 |        |             | (with swaping)                               |
   -----------------------------------------------------------------------------------------
     LM & HM - the length has to be defined one more the true value (!)

 16. Checkbox controls.
   Max number of checkboxes: 12 for global and provider window.
   Checkbox parameter has to have index, length=1 (default - not defined in 
   configuration window).
   The length (in configuration)  is number of bit in byte, 1=LSB , 8=MSB.
   Example. Value=23 (binary= 00010111). If checkbox should changes value 
   16 in this byte length=5, if 4 length=3.
   But if checkbox is checked for 0 value: Value=~23 (binary=11101000).
   If checkbox should changes value 16 in this byte length=FF-5, if 4 length=FF-3.
   
//////////////////////////////////////////////////////////////////////////////

XVII.     Tools->Phoenix Script dialog 

Script         - select script to edit.
Script list    - select line in script to edit.
Edit values    - edit here line of script.
Update Value   - confirm changes in line.
Info           - some info about edited line.
Change script  - save changed script on the same location to picbined.ini file.
Add new script - add new position and save script on it.


Phoenix script description
All values have to be in hex!
name      - name of script
id        - identificator
ps[port settings] - configuration of COM port can be:
              "baud=X parity=Y data=Z stop=Q" or :"parity=Y data=Z stop=Q"
                 X = ...9600... (value of baud rate for com port)
                 Y = N,O,E,M or S (None,Odd,Even,Mark or Space)
                 Z = 8,7,6,5 (data bits)
                 Q = 1,2,1.5 (stop bits)
                 Remember, phoenix 6Mhz need different baud rate from phoenix 3.57Mhz. 
                 If it is not defined, parameters from window will be used.
comment   - a sentence to show in window
round     - if firmware's function lets to define data length we can hope, writing to address 
            0x03 three bytes will do with success. If not we have to write to address 0x00, 0x10 bytes.
            Some firmwares let to write only 0x10 bytes from 0xXXX0 to 0xXXXF addresses in one command.
Each set includes read[r] (data by processor from eeprom) and write[w] (...) parts.
   request[q] - string with commands for send to processor
   replay[p]  - string which processor will send back 
There some types of pairs: request/replay:
   start[s]   - do something before reading data - build it only using digits
   loop1/2[l] - get/put data bytes from/to eeprom in loop- build it using digits,
             "highbyteaddress", "lowbyteaddress", "length" and "counter"
   end[e]     - do something after reading data - build it only using digits

Variables (has to be initialized using digits except maxloop):
   secretkey-WORD - use only in start and end request, if value of it in window is different from 0 - it will be used instead from script
   maxloop - WORD - max value of loop, it has special value "defaultsize", 
             The value of "defaultsize" is the same as size of data in picbined memory buffer (.bin file size).
             I tried to test it, but changing firmware make it crazy. Do'nt use it.
             You can change this value if you write something in "Length" edit box.
  length   - BYTE - number of bytes to read/write in single command
  counter  - BYTE - can be usefull in loop as counter
  address  - WORD - should be initialized with index of first byte to read/write
                  - it is used to indexes data in memory table
             You can change this value if you write something in "Index" edit box.
             If "index"="length"=0 - values from editboxes are ignored.
Variables for use in loop request/replay:
  length   - value of length
  counter  - value of counter
  checksum - only on end of line, the checksum will be calculated on all bytes
             in the line as=3F xor byte1 xor byte2 xor ...byte(length)
  data     - this string will be replaced by "length" number of data bytes
  lowbyteaddress  - low  byte of address variable
  highbyteaddress - high byte of address variable
  lowbytesecretkey - low byte of secretkey variable (use in stard & end requests)
  highbytesecretkey- high byte of secretkey variable (use in stard & end requests)
Layout of loop: for( ;address O1 maxloop; address O2 V1, counter O3 V2 ) where:
  O1 - loop condition  [lc] - can be one from:==,<=,>=,<,>,!= 
  O2 - address operator[ao] - can be one from: +=,-=,*=,/=
  O3 - counter operator[co] - can be one from: +=,-=,*=,/=
  V1 - address value   [av] - can be one from: "counter","length",digit or c/l+digit("counter+0A"), c/l-digit
  V2 - counter value   [cv] - can be one from: "address","length",digit,or a/l+digit("address+0A"), a/l-digit
  The replay string is used to compare returned values with predefined values.
  If replay includes "data" - it will be replaced by "length" number of 0xFF bytes.
  The value "0xFF" has special function - compare function will ignore comparing
  on this position. Use 0xFF if you does not know a value which will be returned 
  from card (the number of bytes has to be the same!).   
Delay     - picbined is reading data from phoenix in the loop, as long as all data are read,
            or counter will be decreased to 0. Value of delay is adding to this counter.
Key names used in ini file:
read  start request[rsq], read  loop request1/2[rlq1/2], read  end request[req]
read  start replay [rsp], read  loop replay1/2 [rlp1/2], read  end replay [rep]
write start request[wsq], write loop request1/2[wlq1/2], write end request[weq]
write start replay [wsp], write loop replay1/2 [wlp1/2], write end replay [wep]
read  loop condition[rlc], read  address operator[rao], read  counter operator[rco]
write loop condition[wlc], write address operator[wao], write counter operator[wco]
read  address value[rav], read counter value[rcv]
write address value[wav], write counter value[wcv]

//////////////////////////////////////////////////////////////////////////////

XVIII.    Help->About

	Information about picbined version is for find here.

//////////////////////////////////////////////////////////////////////////////

XIX.     Global window tab

	This is a place where all global parameters can be edited in editboxes 
	and checkboxes. If number of parameters is bigger from number of checkboxes
	the scrollbox lets to scroll parameters.
	
//////////////////////////////////////////////////////////////////////////////

XX.      Keys window tab

	This is a place where all keys can be edited in editboxes. The listbox
	on right side lets to change provider (the owner of edited keys).
	If 'Keys & ProvParams' in Configuration dialog is checked, position 
	of key's editboxes is calculated for next tab window and can see strange.
	'Key edit mode'
	The keys can be edited in four modes:
	1. 11s22s33 - this is hexadecimal mode with separators between hex values.
	2. 11223344 - this is hexadecimal mode without separators.
	3. Multimac - this is multimac mode used for d2mac and remote codes for 
	              digital card soft. 
	4. Text     - this is mode where each byte is converted to char. Use it
	              careful, if char can not be displayed the value of byte 
	              will be lost.
	
//////////////////////////////////////////////////////////////////////////////

XXI.  Provider window tab

	This is a place where all provider parameters can be edited in editboxes 
	and checkboxes. The listbox on right side lets to change provider (the owner
	of edited parameters). If 'Keys & ProvParams' in Configuration dialog is checked, 
	editboxes with provider's keys are placed in this tab window. It is done only if
	there is a space for all keys in this tab. 'Key edit mode' for keys is the same
	like for key window tab.
	Provider window tab has floating controls. If an edit control is not used for 
	editing parameter than it is not displayed. The checkboxes have constant 
	position. If one is not defined, it's space will not be used by other checkbox.
	1. Clr  - (description in topic about Clear menu option)
	2. Swap - (description in topic about Swap menu option)
	3. Up   - moves selection to previous provider
	4. Down - moves selection to next provider
	
//////////////////////////////////////////////////////////////////////////////

XXII.    Dump window tab

	The main edit box in this window tab includes all data buffer. It makes possible
	to watch all data in one place. Left column is an index, center column is data 
	in hexadecimal and right column is data in text.
	Move mouse cursor on any line of hexadecimal data. Press left mouse button.
	Press 'Get Line' button. The line will be copied to edit box on left down
	side of dump tab window. Edit values in edit window. Press 'Change' button
	for updating data buffer with changed values.
	The combobox located on right down side of dump tab window includes list of
	all object defined in current 'Working mode'. When you select something, 
	the selected object will be highlighted in main data edit box. It lets to find
	value in data buffer.
	'File length' editbox lets to change size of main data buffer - file size.
	Remember - picbined was created for max 24c256 eeproms. This is 64K size.

//////////////////////////////////////////////////////////////////////////////

XXIII.   Note window tab

	If any additional information is needed it is pasted in this window.
	Add your own info and press 'Save note'. The note is stored to ini file.
	(new line char can be make by pressing CTRL+Enter keys)
	
//////////////////////////////////////////////////////////////////////////////

XXIV. JDM/Phoenix window tab

  1. JDM eeprom window.
     Interface = JDM/Ludi
     Device    = 24(l)cXXX
     You have to use JDM compatible interface for programming eeprom. Select COM port
     where IDM is connected and choose your eeprom type. 
     
     Read  - will read data from eeprom to internal data buffer (like from disk file).
     Write - will write data from internal data buffer to eeprom.
     Verify- will check if data in internal data buffer are the same like data in eeprom. 
     
     Sometimes your computer can be to fast in JDM operation. Increasing 'Delay' value 
     decrease computer speed.
     
  2. JDM pic window.
     Interface = JDM/Ludi
     Device    = Pic16xXXX
     Programming pic processor does not work in picbined!
     
  3. JDM phoenix window.
     Interface = Phoenix
     
     'Port' - COM port where the phoenix interface is connected
     'Firmware' - script with definitions for selected 'Working mode'
     'Delay' - if computer is too quick, increase this value
     'Baud rate' - speed of com port, default is 9600 for all firmwares but seca
                   and via are using oscillator 3.57MHz and irdeto is using 6MHz.
                   User of 6MHz should use bd=9600 for irdeto and bd=16093 for seca,
                   user of 3.75MHz should use bd=9600 for seca and bd=5726 for irdeto.
     'Parity' - Even for seca, Odd for via, None foe irdeto
     'Stop bits' - 2 for seca and via, 1 for irdeto
     'Data bits' - always 8
     'Secret key' - key used in script for secure operations
     'List of parameters to read/write using phoenix' - :
        - Address from script - read/write all bytes like defined in script
        - All eeprom data     - read/write all bytes from picbined's memory buffer
        - All changed data    - write only only changed parameters
        - All defined data    - write only all data defined in configuration dialog for 
                                current working mode
        - Parameter           - read/write single parameter                
        - ProvXX All parameters - read/write all bytes from index of first to index of last 
                                parameter for XX provider
        - ProvXX All keys     - read/write all bytes from index of first to index of last
                                key for XX provider
        - All prov params     - read/write all bytes from index of first parameter of 0th 
                                provider to index of last parameter of n-th provider
        - All keys            - read/write all bytes from index of first key of 0th 
                                provider to index of last key of n-th provider
        If round is defined, all indexes are rounded to value of round.
     'Index','Length' - the both are used to show index and length of parameter selected in 
                       combobox. User can write own values in this place.
     'Smartmouse mode' - check this checkbox if your interface is smartmouse (not phoenix).
     Progress bar      - shows progress of r/w/v operations.
     Info              - this is a place for success/error messages.
     Editbox on right side of window - each changing 'Firmware' combobox starts reading 
                         phoenix script from picbined.ini file. The script is showed in 
                         this edit box. There is log information after each r/w/v operations.
     'Read'     - reads data defined in combobox from card into internal data buffer.
     'Write'    - writes data defined in combobox to card.
     'Verify'   - verifies is all data in internal buffer are the same with data on card.
     '<-Send to Card" - button and edit box. Enter here string of hex values to send it to card.
                This string can be predefined in configuration window. If it is , when you click
                on this editbox it will change itself to combobox.
                Definition of this string is in topic about configuration window.
     
     Picbined checks first byte of ATR (after each card reset). If it is 3F picbined will ask
     if all transmitted data between COM port and interface should be inverted.
     
//////////////////////////////////////////////////////////////////////////////

XXV.  Additional info

Calculating xor on HMK key for pic16f84 files:
if  HMK = 2A 3F 25 98 85 45 4C 6A 1A B4
    2A XOR 1A = 30 ---- 3F XOR B4 = 8B
that HMK xor-ed = 2A 3F 25 98 85 45 4C 6A 30 8B


Text field info.
Bin file includes text field: "String 1". User see it in picbined: "String 1". Char "1" should be
erased. User changes text value to "String" or to "String  ". I am sure all will change this to 
"String". Picbined will read it and insert text "String" to bin file.
The result in bin file is "String 1" because picbined inserts only 6 chars.
If we want to correct managed text field picbined have to fill not used char position with 
any value. I decided to use char " " (0x20).

//////////////////////////////////////////////////////////////////////////////

XXVI.     Release notes

0.01 (24.03.2000) alfa
	- Pierwsza wersja
	
	- First release
	
0.02 (27.03.2000) alfa
	- poprawiony powazny blad
	- mozliwosc edycji stringu instrukcji 0x16
	
	- major bug is fixed
	- possibility of editing instruction 0x16 string
	
0.03 (29.03.2000) beta
	- dodano mozliwosc konfiguracji pliku bin 
	(duze zmiany - moga byc nowe bledy)
	
	- the configuration of different bin files is added
	(big changes - there are can be some new bugs in application)

0.04 (03.04.2000)
	- mozliwosc konfiguracji jednego stringu(zmiennej) parametru globalnego i jednego 
	  zaleznego od providera 
	  global    - zmiana zawsze w tym samym miejscu pliku
	  provParam - zmiana w zaleznosci od wybranego providera, musi miec stala dlugosc
	              i wystepowac w pliku jeden za drugim
	- nowe nazwy kluczy w pliku ini, program stworzy nowy plik ini przy starcie

	- possibility of configuration one global string(variable) and one for each provider 
	  global - the change always int the same point of file
	  provParam - the change in place different for each provider, has to have constant length
	              and be followed by next
	- new key names in ini file, program will create new ini file during first start

0.05 (14.04.2000)
	- mala modyfikacja; editboksy na kody uzywaja czcionki o stalej szerokosci
	
	- small modification; keys editboxes use fixed fonts

0.06 (28.04.2000)
	- zauwazylem ze problem z fontami moze wystapic w win98, z winNT dziala dobrze
	- program pracuje z binem do irdeto goldcard (wielkie dizeki autorowi Eeprom Editor 1.1
	  za indeksy),
	  domyslne ustawienia dla irdeto gold card picbined wygeneruje jesli zostanie skasowany
	  stary plik ini i uruchomiony picbined,
	  nowe klucze 12 i 13 robia za HMK i PMK,
	  hex serial to 11-ty,12-ty i 13-ty bajt HMK, provider id to 14ty,15ty i 16ty bajt HMK,
	  pokazujace sie w listboksie nazwy providerow sa dobierane w zaleznosci od nazwy 
	  aktualnego setu, jesli nazwa setu zawiera slowa seca lub piccard to jest to 
	  interpretowane jako seca, jesli irdeto lub goldcard to jako irdeto
	
	- I know fixed fonts works in WinNT good but in Win98 can have problems
	- support for irdeto gold card is added (thanks for author of Eeprom Editor 1.1 for
	  indexes), 
	  default parameters picbined will generate if you delete old ini file and run picbined,
	  new keys 12 and 13 are used as HMK and PMK,
	  hex serial is 11th,12th and 13th byte of HMK, provider id is 14th,15th and 16th byte of HMK,
	  provider name text support in list box uses set name for detection type of bin file, 
	  if set name includes word seca or piccard - it is seca, if irdeto or goldcard - it is irdeto 
	  
0.07 (29.04.2000)
	- kilka technicznych informacji w tym dokumencie,
	- kilka poprawek,
	- mozliwosc zdefiniowania nazw providerow,
	
	- some technical info in this document,
	- some fixes,
	- possibility of define providers names,

0.08 (07.05.2000)
	- wiecej parametrow globalnych i per provider
	- nowa definicja gold irdeto (usun stary .ini)
	
	- more global & provider parameters
	- new definition of gold irdeto (delete old .ini)
	
1.00 (30.05.2000) 
	- nowa opcja definiujaca szerokosc czcionek
	
	- new configuration option font width
	
1.01 (22.08.2000)
	- malenkie poprawki,
	- przy wyborze szerokosci fontu radze uwazac (win9x wariuje)
	- dodalem wersje bez statycznych bibliotek (wymaga mfc42.dll)
		
	- small fixes,
	- be careful during selecting fonth width (win9x makes crazy)
	- the version without static linked libs is added (needs mfc42.dll)
	
1.02 (29.08.2000)
	- kilka poprawek w dialogu konfiguracji
	
	- some fixes in configuration dialog	

1.03 (26.10.2000)
	- mozliwosc otwierania i zapisywania plikow hex dump w trybie intel 8 bit
	- zdefiniowany funcard seca (w pierwszej wersji obiecalem, ze picbined 
	  bedzie obslugiwal formaty, ktore sam uzywam)
	
	- possibility to open and save hex dump files in intel 8 bit mode
	- funcard seca defined
	
1.04 (16.11.2000)
	- poprawiony blad zerowego indeksu parametru
	- modyfikacja parametrow secanix i fun 2
	- parametry globalne i providerow moga byc edytowane w trybie tekstowym
	
	- zero based parameter index bug is fixed
	- modification parameters of secanix and fun 2
	- global and provider parameters can be edited in text mode
	
1.05 (21.11.2000) 
    	- zmienione opisywanie providerow seca
    	- nowe tryby edycji parametrow (dec, bin, seca date) 
	    
    	- changed description of seca providers 
    	- new parameter modes (dec, bin, seca date)
   
1.06 (24.11.2000)
	- nowy wyglad
	- wiecej konfigurowalnych parametrow
	
	- new user interface   
        - more user defined parameters
   
1.07 (29.11.2000)
	- sporo zmian wewnetrznych
	- dodany provider #0
	- dodany klucz #0
	- automatyczne rozpoznawanie wczytanego pliku
	- poprawki konfiguracji w ini
	- winMe ma problemy z obsluga pliku ini dluzszego niz 64k,
	  z tego powodu ini tej wersji nie jest kompatybilny ze starym
	- demo - moze cos z tego sie urodzi a moze nie
	 
	- many internal changes
	- provider #0 is added
	- key #0 is added
	- automatic detection type of bin/hex readed file
	- some configuration corrections in ini
	- winMe has a problem with ini file bigger from 64k,
	  this is a cause of breaking compatibility with older version
	- demo - maybe something will be born or not
	
1.08 (13.12.2000)
	- nowy typ multimac (klucze i parametry)
	- zapamietywanie sciezki na dysku do pliku ostatnio otwartego
	- zmiany konfiguracji w ini.seca
		
	- new type multimac (keys and parameters)
	- path to last opened file is stored in ini
	- configuration changes in ini.seca
	
1.09 (21.12.2000) 
	- nowe identyfikatory seca
	- poprawiony blad odswierzania listy providerow
	- poprawiony blad w trybie multimac
	
	- some new seca id-s
	- refreshing list of providers bug is fixed
	- multimac mode bug is fixed
	
1.10 (24.01.2001)
	- mozliwosc zmiany roboczego ini z programu, (ZROB SOBIE WLASNE INI!)
	  format: picbined.ini.name - gdzie nazwa bedzie uzywana na liscie wyboru
	- zmiany w ini.irdeto
	- wprowadzono wskazniki do wartosci indeksu i dlugosci kluczy i parametow: 
	  globalnych i providera
	- wprowadzono definiowanie indeksu parametru providera poprzez krok
	- stary picbined nie moze uzywac nowego ini, nowy picbined moze uzywac starego ini
	
	- possibility to change working ini from application, (MAKE YOUR OWN INI!)
	  layout: picbined.ini.name - where name will be used to display on list of options
	- changes in ini.irdeto
	- pointers to values of index and length of keys and parameters: global and per
	  provider
	- defining index of parameter provider as step to index of provider is added
	- old picbined can not use new ini, new picbined can use old ini
	
1.11 (20.02.2001)
	- zmiany w ini
	- niegenerowane poczatkowe parametry gdy ini pusty
	- dodano definicje stepsow dla kluczy (tylko)
	
	- changes in ini
	- no start parameters are generated if ini is empty
	- new steps parameter for keys (only)
	
1.12 (23.02.2001)
	- nowa definicja viaccess w ini
	- automatyczne rozpoznawania providerow via
	- zmiana systemu rozpoznawania providerow
	
	- new via definition in ini
	- auto recognize via providers
	- new recoggnizing provider
	
1.13 (24.02.2001)
	- nowa definicja viaccess w ini
	- klucze i privider parametry na jednej stronie (jesli jest miejsce)
	
	- new via definition in ini
	- keys and providers params on the same page (if is space)
	
1.14 (26.02.2001)
	- nowa definicja viaccess w ini
	- wybor providera z listboxa
	
	- new via definition in ini
	- provider selecting from listbox

1.15 (27.02.2001)
	- zamiana providerow miejscami (przycisk swap)
		
	- swapping providers (swap button)

1.16 (07.03.2001)
	- wspolpaca z JDM/Ludi
	  testowane z 24C16 i 24C64
	- nowy parametr: viaccess date
	- okno view (odswierzane tylko po odczycie lub zapisie pliku lub odczycie eeproma)
		
	- supporting JDM/Ludi programmer
	  tested: 24C16 and 24C64
	JDM/Ludi:
		- line TxD - power
		- line RTS - clock
		- line DTR - writing
		- line CTS - reading from eeprom
	The same configuration is used by programers:
	  JDM, Ludpipo, UniprogIV, and BR870 . I hope all will work with picbined.
	- new parameter: viaccess date
	- window view (refresh it only after loading or saving file or reading eeprom)
	
1.16a (09.03.2001)
	- otwarcie okna konfiguracji bez wczytanego bin/hex powodowalo uwal - poprawione
	
	- opening configuration window before opening bin/hex file caused crash - fixed

1.17 (14.03.2001)
	- eksport i import parametrow z pliku tekstowego (przed importem trzeba otworzyc 
	  w picbinedzie hex/bin poprawnego typu!)
	
	- export and import parameters from text file (open hex/bin file of correct type 
	  before imorting parameters)
	
1.18 (21.03.2001)
	- obsluga czytania plikow *.crd
	- import kluczy
	
	- support for reading *.crd files
	- import keys
	  It is possible if exported file and file in picbined buffer:
	  - have the same name of provider parameter 0 and 1
	  - have the same value of provider parameter 1
	  - should have the same value of provider parameter 0
	  - the sum of all bytes values of parameter 1 is different from 0
	  Seca and viaccess provider parameter 0 is Name: and 1 is Ident:
	  There is possible to import keys. It is not possible for irdeto.
	- power import keys
	  - identyfication by provider name or provider parameter
	  - provider parameter id name and key id name have to start from first char of line
	  - keys have to have index in key id
	  ...

1.19 (27.03.2001)
	- usunieto import key menu, to samo mozna uzyskac w power import
	- power import pozwala zaimportowac klucze lub klucze i paramety providera
	
	- import keys menu is removed, the same is possible to do in power import
	- power import lets to import keys or keys and provider parameters
	  If file with parameters will be:
	  name = SECA
	  ident = 00 00
	  ...
	  name = C+ France
	  ident = 00 03
	  ...
	  If you select parameter ident to compare (providers between picbined and file)
	  name C+ France will be inserted to provider ident=00 00!
	  Provider parameter selected to compare has to be first parameter of new provider
	  in file.
	  Power import lets you to use "try import provider parameters". It will work
	  only for parameters with the same name in file and in picbined working mode.
	  It lets to import parameters of funcard to secanix working mode if you 
	  selected "picbined" set name in power import dialog and opened file 
	  generated by picbined in export.
	  It will work with other file if one or more provider parameters have the same 
	  names. 
	  Name of parameter and key (in file) has to start from first char of line.
	  The value of parameter or key does not has to be last in line if value type is
	  not text.
	  
1.20 (30.03.2001)
	- zmiany w seca2 i viaccess ini
	- zmiany w configuration dialog
	- lista providerow rozszerzona do 20
	
	- changes in seca2 and viaccess ini-s
	- changes in configuration dialog
	- provider list is extended to 20
	
1.21 (30.04.2001)
	- statyczny przydzial pamieci zastapiony dynamicznym przydzialem pamieci
	- edycja danych w trybie dump
	- poprawki w viaccess ini
	- nowe definicje importow w "power import"
	- zmiany w power import
	W configuration pojawil sie edit box power import. Zawiera on nazwy providerow
	uzywane przez autorow emulatorow jak hbemu ...
	Jesli wybierzesz power import z zaznaczeniem provider name zamiast provider parameter
	to picbined bedzie porownywal nazwy znalezione w zewnetrznym pliku nie tylko 
	z nazwa providera uzywana przez picbineda ale tez z nazwami z nowego editboxa.
	Aby to dzialalo nazwa providera uzywana przez picbineda musi byc z tego nowego
	editboxu. Zamiast wpisywac ja recznie mozna uzyc nazwy z listy. 
	Tworzenie nowych zbiorow nazw jest mozliwe recznie w ini (przyklad w ini.irdeto).
	Edycja mozliwa w configuration window.
	Powinno to pozwolic na import kluczy operacyjnych irdeto.
	
	- static memory management changed to dynamic memory management
	  - no limit of file size
	  - no limit of provider number
	  - no limit of key number
	  - no limit of global parameters
	  - no limit of provider parameters
	- editing data in dump tab (select something from combobox or (mouse) click 
	  on data in main edit box and press "get line"
	- some fixes in viaccess ini
	- new import definitions in "power import"
	- changes in power import section, you can find power import edit box in
	configuration menu. This is place to define provider names used by other 
	authors of emulators like hbemu ... If you will select power import over 
	provider names (instead provider parameter), picbined will use to compare
	not only defined provider name but all names defined in power import 
	edit box (configuration). You have use provider name from this edit box 
	as name of provider in picbined if you want to use this new feature.
	You should use name from list (in combobox). Defining new provider names 
	is possible only manually in ini file (see ini.irdeto for example). Editing
	it is possible in configuration window.
	It will let to import irdeto operation keys. HMK/serial and PMK/provid 
	has not common names in external files - it is a point to develop in the future.

1.22 (14.05.2001)
	- Ten sam pomysl jak do importu providerow zastosowalem w przypadku parametrow.
	  Pozwoli to na import hmk/pmk ...
	- Poprawka w zaznaczaniu kluczy w oknie dump.
	- Nowy ini dla projektu ds9.
	
	- The same idea like for identification providers I used for providers parameters.
	  It should let to import hmk/pmk ... 	
	- The fix of selecting keys in dump window.
	- New ini for ds9 project 
1.22a   (some news in ini files)

1.23 (25.05.2001)
	- Zakladka Note pozwala dodac uwagi, opis, instrukcje
	- Zmiany w plikach ini : 3in1, viaccess, irdeto
		
	- Tab Note lets to write notes.
	- Changes in ini files: 3in1, viaccess, irdeto

1.24 (30.05.2001)
	- A correction in power import - picbined mode.
	- Thanks to author of picbin123improve for irdeto settings. No fear to send
	  to me something like this in future directly to my mailbox. 
	- A modification for correct power import for seca in ds9 mode.
	- The changing working mode makes saving and reading correct. You do not have to 
	  save ds9 bin in irdeto, change mode to seca and open file. It is possible 
	  to open bin, edit irdeto keys, change to seca, edit seca keys, change to 
	  viaccess, edit via keys and save only ones on the end.
	- Remember - always open bin/hex file with correct length for selected working mode.
	
1.24a   - Problem with 18th working set message box fixed.
	- INI files updates

1.25 	(03.07.2001)
	- usuniety blad kasowania zawartosci danych providera
	- zabezpieczono program przed zla wielkoscia pliku
	- dodano programowanie procesorow seri PIC 
		Dziala tylko zczytywanie programu i danych z pica.
		Testowane tylko 16c84 i 16f876 pod WinMe.
	- mozliwosc zgrywania danych do pliku crd 
	- mozliwosc importu i eksportu do pliku crd
	  Obslugiwane formaty crd:
		01 02 FF 00 00 12 Address Data
		01 02 23 Address Length Data
	- nowy typ kontrolki: checkbox - maksymalnie 12
	  Reprezentuje ja wartosc jednego bajtu, dlugosc okresla numer bitu w bajcie,
	  1 = LSB, 8 = MSB.
	- programowanie eepromu poprzez firmware pica w phoenixie.
	  Skrypty w picbined.ini
		
	- Clearing provider data bug fixed
	- New Crd file format is supporting
	- Checking correct file length after changing working mode
	- Programming PIC processors 
		Only reading program and data from PIC is working at this moment.
		Tested only 16c84 and 16f876 with WinME!
	- Saving data to crd file
	- Importing and exporting to crd file
	  There are supporting 2 crd types in picbined: (Address-2 bytes)
		01 02 FF 00 00 12 Address Data
		01 02 23 Address Length Data
	- New control type supported: checkbox - max 12 pices
	  It is value of one byte, the length is number of bit in byte, 1=LSB , 8=MSB
	- Programming eeprom over pic's firmware in phoenix.
	  Scripts in picbined.ini.

1.25a 	(04.07.2001)
	- nowa opcja "port settings" w skrypcie phoenixa
	- dwie nowe baud rates
	Jesli uzywasz phoenixa z kwarcem 3.75MHz to ds9 wymaga baud=5726, lub 9600 dla 6MHz,
	podobnie secanix 9600 dla 3.75MHz ale 16093 dla 6MHz.
	
	- new option "port settings" in phoenix script
	- 2 new baud rates in combobox for 3.75 and 6 MHz interface 

1.26 	(16.07.2001)	
	Poprawki:
	- gdy plik hex nieliniowy to info o tym tylko raz
	- automatyczna detekcja rozszerzenia pliku w oknie wyboru opcji export
	- exportowanie i importowanie nowych zmiennych zwiazanych z checkboxami
	- zmienne checkboxow rowniez w comboboksie okna dump
	- poprawna dlugosc pola pierwszego klucza
	- dluzszy tekst nazwy "working mode" wyswietlany w comboboxie
	- poprawiony dobor ziwekszania opoznienia w funkcji odczytujacej dane z phoenixa
	- delay pozwala zwiekszyc ilosc odczytow w funkcji czytajacej z phoenixa
	- definicja via Alfredo do allcama
	- obslugiwany nowy typ pliku crd (z i bez spacji):
		CA FF Address Length Data 
	- obslugiwane typy crd: XX ... XX Address Length Data
	- secret key w oknie phoenixa
	
	Some minor changes and:
	- better calculating delay counter during reading from phoenix if PC is too quick
	  or phoenix is too slow.
	- definition Alfreto's via for allcam
	- new crd file is supporting (with and without spaces): (Address-2 bytes)
		CA FF Address Length Data 
	- new crd types are supported: XX ... XX Address Length Data
	- support for secret key in phoenix window

1.27 (18.07.2001)
	- obsluga trybu smartmouse
	  Jesli pierwszy bajt atr jest 3f to dane podczas trnasmisji beda inwertowane,
	  a parzystosc zmieniona z even to odd - i na odwrot.
	  
	- smartmouse mode is supported
	  If first byte of atr is 3f then transmited data will be inverted, parity will be
	  changed even->odd and odd->even.

1.28 (26.07.2001)  
	- Okno loga phoenixa jest spowrotem listboxem.
	  Windows9X posiada ograniczenie na ilosc znakow w kontrolce edycyjnej. Maximum
	  0x7ffe tchar znakow. Phoenix log i dump nie bedzie wyswietlac wszystkiego 
	  jesli picbined pracuje w windows9X. 
	- Odczytywanie/zapisywanie eeproma lc64 poprzez phoenixa jest dlugie a lc256
	  jeszcze dluzsze. Jesli wpisujesz tylko jeden klucz to po co czekac:
	  - Kontrolki "Index" i "Length" w oknie phoenixa pozwalaja czytac/pisac czesc
	    przestrzeni danych eeproma. Jesli oba sa zerami to wartosci ze skryptu sa uzywane.
	    Combobox pozwala pobrac parametry wszystkich pol lub grup pol.
	- irseto 2/10 w 3in1
	  	
	- The phoenix log window is a listbox again.
	  Windows9X has limitation for length text in edit control. It is max 0x7ffe tchar-s.
	  Phoenix log and dump window will not show all if picbined is working in windows9X.
	- Reading/writing eeprom lc64 in phoenix interface is long, lc256 very long.
	  Why wait too long time if you modified only one key:
	  - Controls "Index" & "Length" (in phoenix window) let to read/write only a part of 
	    eeprom memory. If both are 0 the values from script are used. Use combobox
	    for getting index/length of each field or group of fields.
	- irseto 2/10 in 3in1

1.28b (29.07.2001) 
	- Obsluga fun3in1 (konfiguracja i crd)
	 
	- Support for 3in1 allcam for fun (setting and crd)

1.29 (31.07.2001)
	- Kazde pole w picbinedzie posiada pole statusu, przechowujace informacje o tym,
	  czy pole to bylo zmieniane w interfejsie uzytkownika lub poprzez import danych.
	  Jest to uzywane do zapisu poprzez phoenixa tylko wartosci ktore zmienily sie.
	  Kazde otwarcie nowego pliku, odczyt w phoenixie/jdm, zapis w phoenixie 
	  i zmiana "Workin mode" kasuje ta informacje.
	  
	- Each field in picbined has own status flag with info if it was changed 
	  in edit control by user or by importing. It is used to write only changed 
	  data to card over phoenix.
	  Each opening file, reading from phoenix/jdm, writing to phoenix and 
	  changing "Workin mode" clear this buffer.	
	
1.30 (06.07.2001)	  
	- Nowy typ dlugosci providerow, parametrow providerow i globalnych.
	  Dotyczy ostatniego bajtu: H - tylko najstarsze 4 bity, L - tylko najmlodsze 4 bity.

	- New length type for providers, parameters prov & globals.
	  Last byte in parameter: H - only 4 msb bits, L - only 4 lsb bits
	- setting update for viaxenix softs
	- new setting for funomatic and secom
	- phoenix support for seca fun softs and irdeto v35	
	- many minor modifications
	- Ds9e0508AMMexample.bin  - this is ds9v502 bin file for nokia9600 wit dvb2000 (empty)

1.31 (13.08.2001)
	- Nowe wskazniki i podwojne wskazniki do konfiguracji ustawien.
	- Dodane przenoszenie providera.
	- Pelna obsluga iota i fun3in1 v2.
	- Plik picbined.txt zostal rozszerzony o informacje o uzytkowaniu programu.
	  Bedzie to kontynuowane.
	
	- New pointers and double pointers for configuration set.
	- Moving provider is added.
	- Full support for iota nad fun3in1 v2.
	- picbineed.txt file modified, it will be continued

1.32 (16.08.2001)	
	- phoenix writing and verifing when the file was smaller from 
	  index in script crashes application - fixed in this version
	- support for sadet v2
	- script editor ready
1.32a   - after changing working set phoenix script is read again
	- fixed bug (provider pointer m)
	- new: secom203 (not modified by me!!! because I donot have vin file to test
	  132b is not my release))
	- new: via z10 & sidd
	
1.33 (23.08.2001)   
	- listy wyboru predefiniowanych parametrow
	
	- comboboxes - selection lists (see fun3in1 allcam irdeto card type control) !!! 
	- setting for seca bacterios
	
1.34 (27.08.2001)
	- extended information about power import 
	- new menu option: Clear keys in all & Clear one param in all
	- new Piccard2 by Superkappa setting and some changes in allcam, via ini-s. 

1.35 (10.09.2001)
	- Definicja providerow uzywanych w lisboxie przeniesiona do picbined.ini.
	- Nowa komenda w menu Copy param to all.
	- Listy wyboru mozna definiowac z parametrow globalnych, provider param i nazw providerow
	- Zapisywanie definicji uzytkownika w Power import ??
	- Obsluga phoenixa dla viaccess: baracuda i viaxenix 2.3
	- Poprawka dla ustawin funomatic 1.01.
	- Dodano 126 providerow via dla fun3in1 2.4
	
	- definition of all provider idents used in listbox is moved to picbined.ini (editable)
	- new menu option : Copy param to all
	- option list can be defined with using strings, global and provider param and name of provider -
	  it lets to be independent from changing this param in other place of picbined
	- power import has new possibility to save user defined setting
	- viaccess communication protocol with phoenix is fixed: 
	  phoenix script for baracuda and viaxenix 2.3
	- funomatic setting upgraded to 1.01
	- fun3in1 via setting upgraded to 2.4 (126 via keys )

1.36 (13.09.2001)
	- Special open i special save pozwalaja otworzyc(zapisac) do edycji fragment pliku 
	  spod zadanego indeksu.
	- Index providera na liscie providerow moze uzywac indeksow "m" i "p". Jako odnosnik
	  bedzie uzyta wartosc indeksu providera na liscie parametrow.
	- Poprawki w obsludze list wyboru.
	
	- Special open and special save - it lets to read a fragment of file to picbined's
	  buffer and save it to the same place in file.
	- Provider index on parameters list lets to define value, which will be referenced
	  be 'p' and 'm' pointers in provider index.
	- Some fixes in option list engine.
	
1.37 (10.10.2001)
	- Command line parameter when running picbined. It can be path to file or only 
	file name. If the second, the file will be looked for in last used subdirectory.
	- New definition of seca Cheli 2.x

1.38 (16.10.2001)
	- I changed name of ini from 3in1 to 4in1 bacause the 4in1 is true name.
	( IRDETO, BETACRYPT, SECA, VAICCESS )
	- New definition of seca Beamer -24C16	
	- The "r" button between "Clear" and "Up" buttons refreshes list of providers
	- List of providers - '0' from right part of viaccess ident will not be displayed
	- Two new configuration variable (pointer) types: LM and HM .
	  ( can be used for viaccess ident: 12 34 56 - 1 and 6 are =0 , why not move 
	                                             - 2 to 6 position and safe one byte in eeprom?
	
1.39 (19.10.2001)
	- A bug in provider list with irvito is fixed
	- New definition of viaccess : funvia v1.1, viaccess 0.32 format,
	- Phoenix scripts for : viaccess 0.32 format, funvia and funseca
	  (Multinix editor is able to read/write funseca and read funvia,
	  I logged transmition and I am able to read/write funvia but not 
	  funseca. If you will notice, funseca will work on your phoenix -
	  will send info to me)
	- Export will recreate file with exported data always
	- The Saving file will use(and save) the same stored file path like Opening
	- Storing last used parameters in jdm/phoenix section
	- Virtual providers mode (see more info in topic: XVI. point 7.)
1.39a	- Viaccess scripts have had defined wrong bit stop value
        - New irdeto Ird3t0  eurocard setting

1.40 (31.10.2001)	
	- New seca   setting : DARKSUCA
	- New irdeto setting : Fun/Juppi2 D-Box2 -24c64 (with read/write phoenix support for it and sadet)
	- New nagra  setting : TodosVia 7.x 8.x
	- Via idents updated
	- New option "Ignore empty keys" & "Ignore duplicate keys" in "Power import"

1.41 (15.11.2001)
	- New option "With confirmation" in "Power import"
	  One very good known distribution of hex file has always wrong keys for viasat 
	  providers - it lets to not import wrong keys. I am not able to edit files 
	  without power import currently! When I find keys in ds9 hex file, I never use it.
	  I have my own setting with different order of providers (for example in  fin3in1). 
	  All what I do is power import keys to my setting.
	  New options lets to import only different and not empty keys ! If you know about
	  wrong key , confirmation option lets to block import it.
	- New length type (pointer) s. Swapping nibbles in byte.
	- New definition of showing values in sellection list (float combobox).
	  The value can be an item from vector (defined as global or provider parameter).
	  Each value can be converted to provider name (the value have to be correct ident!).
	- The Phoenix window has new two controls: <-Send to Card. Pressing this button
	  picbined will send comand from edit box to the card. (See XVI.11.f )
	- Setting for seca packages for funomatic modified by Mat
	- Picbined will not support xin1 hex file from xcard in current version. I am wholeheartedly
	  against to use(and kill) processor for storing keys! 
			
This is a freeware application, but if you are finding a fun in using it and 
you are defining (in picbined) support for new soft, send this soft and ini files
to author of picbined. (This is only one condition). Remember to write if it is 
public soft or not!

Best regards 
Tom

cattomcat@hotmail.com


The newest version you can find on: http://go.to/alice.cooper