Thread: Kobo Patcher
View Single Post
Old 11-26-2013, 03:09 AM   #518
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Extended line spacing patch for fw 3.0.0 and 3.0.1

Recent firmware has 15 positions on the line spacing slider. 5 positions are set from immediate values in code which the original line spacing patch bypasses, and the other 10 positions are set from a table of values which can be changed with the patch. The result is that after applying the original patch there are only 10 positions on the line spacing slider.

I have extended the patch to allow 4 of the code-injected values to be modified rather than bypassed. This gives a slider with 14 positions, although to simplify the patch the 4 code injected values must be chosen from a limited table of values.

This is the extended line spacing patch patch for firmware 3.0.1 (644485e229) (tested on my Glo).
Spoiler:
Code:
<Patch>
# For firmware 3.0.1 (644485e229)
patch_name = `My 14 line spacing values` 
patch_enable = `yes`
# Bypass code-injected values 1.0, 1.2, 1.5, 2.0, 3.0
#replace_bytes = 7493AE, 26 F6 AE EA, 00 46 00 46
#replace_bytes = 7493FC, 26 F6 86 EA, 00 46 00 46
#replace_bytes = 749422, 26 F6 74 EA, 00 46 00 46
replace_bytes = 749458, 26 F6 58 EA, 00 46 00 46
#replace_bytes = 7494B4, 26 F6 2A EA, 00 46 00 46

# Table A
# E0 = 0.50,   E1 = 0.53125,  E2 = 0.5625,  E3 = 0.59375
# E4 = 0.625,  E5 = 0.65625,  E6 = 0.6875,  E7 = 0.71875
# E8 = 0.75,   E9 = 0.78125,  EA = 0.8125,  EB = 0.84375
# EC = 0.875,  ED = 0.90625,  EE = 0.9375,  EF = 0.96875
# F0 = 1.0,    F1 = 1.0625,   F2 = 1.125,   F3 = 1.1875
# F4 = 1.25,   F5 = 1.3125,   F6 = 1.375,   F7 = 1.4375
# F8 = 1.5     ...
#
# Table B                      ...            E7=0.725
# E8 = 0.75625,  E9 = 0.7875,  EA = 0.81875,  EB = 0.85
# EC = 0.88125,  ED = 0.9125,  EE = 0.94375,  EF = 0.975
# F0 = 1.0125,   F1 = 1.075,   F2 = 1.1375,   F3 = 1.2
# F4 = 1.2625    F5 = 1.325    F6 = 1.3875,   F7 = 1.45
# F8 = 1.5125    ...

# First code-injected value 1.0
# Replace byte with a value from table A:
replace_bytes = 7493A2, F0, E8

# Second code-injected value 1.2
# Replace byte with a value from table B:
replace_bytes = 7493F2, F3, EB

# Third code-injected value 1.5
# Replace byte with a value from table A:
replace_bytes = 749418, F8, ED

# Last code-injected value 3.0
# Select Table A:
replace_bytes = 7494A8, C4 F2, C3 F6
replace_bytes = 7494AB, 03, 73
# Replace byte with a value from table A.
replace_bytes = 7494AA, 08, F4

# Other values for replace
#                       1.0   0.75
replace_float = 7494F8, 1.05, 0.765
replace_float = 749500, 1.07, 0.8
replace_float = 749508, 1.1,  0.83
#                       1.2   0.85
replace_float = 749510, 1.35, 0.865
#                       1.5   0.90625
replace_float = 749518, 1.7,  0.925
replace_float = 749520, 1.8,  0.95
#                       2.0   ----
replace_float = 749528, 2.2,  1.0
replace_float = 749530, 2.4,  1.05
replace_float = 749538, 2.6,  1.1
replace_float = 749540, 2.8,  1.175
#                       3.0   1.25
</Patch>


This is the extended line spacing patch patch for firmware 3.0.0 (0cbc3626b3) (not tested).
Spoiler:
Code:
<Patch>
# For firmware 3.0.0 (0cbc3626b3)
patch_name = `My 14 line spacing values` 
patch_enable = `yes`
# Bypass code-injected values 1.0, 1.2, 1.5, 2.0, 3.0
#replace_bytes = 817CEE, 57 F5 16 EE, 00 46 00 46
#replace_bytes = 817D3C, 57 F5 EE ED, 00 46 00 46
#replace_bytes = 817D62, 57 F5 DC ED, 00 46 00 46
replace_bytes = 817D98, 57 F5 C0 ED, 00 46 00 46
#replace_bytes = 817DF4, 57 F5 92 ED, 00 46 00 46

# Table A
# E0 = 0.50,   E1 = 0.53125,  E2 = 0.5625,  E3 = 0.59375
# E4 = 0.625,  E5 = 0.65625,  E6 = 0.6875,  E7 = 0.71875
# E8 = 0.75,   E9 = 0.78125,  EA = 0.8125,  EB = 0.84375
# EC = 0.875,  ED = 0.90625,  EE = 0.9375,  EF = 0.96875
# F0 = 1.0,    F1 = 1.0625,   F2 = 1.125,   F3 = 1.1875
# F4 = 1.25,   F5 = 1.3125,   F6 = 1.375,   F7 = 1.4375
# F8 = 1.5     ...
#
# Table B                      ...            E7=0.725
# E8 = 0.75625,  E9 = 0.7875,  EA = 0.81875,  EB = 0.85
# EC = 0.88125,  ED = 0.9125,  EE = 0.94375,  EF = 0.975
# F0 = 1.0125,   F1 = 1.075,   F2 = 1.1375,   F3 = 1.2
# F4 = 1.2625    F5 = 1.325    F6 = 1.3875,   F7 = 1.45
# F8 = 1.5125    ...

# First code-injected value 1.0
# Replace byte with a value from table A:
replace_bytes = 817CE2, F0, E8

# Second code-injected value 1.2
# Replace byte with a value from table B:
replace_bytes = 817D32, F3, EB

# Third code-injected value 1.5
# Replace byte with a value from table A:
replace_bytes = 817D58, F8, ED

# Last code-injected value 3.0
# Select Table A:
replace_bytes = 817DE8, C4 F2, C3 F6
replace_bytes = 817DEB, 03, 73
# Replace byte with a value from table A.
replace_bytes = 817DEA, 08, F4

# Other values for replace
#                       1.0   0.75
replace_float = 817E38, 1.05, 0.765
replace_float = 817E40, 1.07, 0.8
replace_float = 817E48, 1.1,  0.83
#                       1.2   0.85
replace_float = 817E50, 1.35, 0.865
#                       1.5   0.90625
replace_float = 817E58, 1.7,  0.925
replace_float = 817E60, 1.8,  0.95
#                       2.0   ----
replace_float = 817E68, 2.2,  1.0
replace_float = 817E70, 2.4,  1.05
replace_float = 817E78, 2.6,  1.1
replace_float = 817E80, 2.8,  1.175
#                       3.0   1.25
</Patch>


To change the code injected values just choose a value from the appropriate table and replace the byte at the end of the line after the "# Replace byte with value from table ..." comments. If you don't modify the patch you will get the following 14 line spacing values: {0.75, 0.765, 0.8, 0.83, 0.85, 0.865, 0.90625, 0.925, 0.95, 1.0, 1.05. 1.1, 1.175. 1.25}

Last edited by GeoffR; 11-29-2013 at 01:14 AM. Reason: update to 14 value patch for 3.0.0 and 3.0.1
GeoffR is offline   Reply With Quote