Content
Hexadecimal Sudoku can be saved in file with extension 'hsdk'. HSDK is binary file which defines current hexadecimal sudoku state. It has 3 sections. The first one is level of difficulty. The length of section is only one byte. The second section determines the current state of sudoku grid. The current state section is an array of 256 double words (32 bit length. The last section is the section of sudoku solution. It is also an array of 256 elements of single word (16 bit length).
The section of sudoku difficulty (The section #1)
1 byte section. Values 0 - simple, 1 - intermediate, 2 - hard.
The section of sudoku state (The section #2)
256 double word array. It specifies row by row the current state of sudoku cell. If low word of array element is 0xffff the cell is empty. If low word of array element is not equal to 0xffff, the valid values are 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000. These values correspond to the digits in sudoku cell: 1, 2, 3, 4, 5. 6. 7. 8. 9. A, B, C, D, E, F. In other words the bit position in low word is the digit in sudoku cell if any. The high word of double word array element has only 2 values: 0 and 0x8000. When the highest bit is set to 1 the GUI cell state is read only.
The section of sudoku solution (The section #2)
256 single word array. It specifies row by row the solution state of sudoku cell. The valid values are 0x1, 0x2, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200, 0x400, 0x800, 0x1000, 0x2000, 0x4000, 0x8000. These values correspond to the digits in sudoku cell: 1, 2, 3, 4, 5. 6. 7. 8. 9. A, B, C, D, E, F. In other words the bit position in the word is the solution of sudoku cell.