Thread: Kobo Patcher
View Single Post
Old 01-10-2014, 08:10 PM   #664
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
Quote:
Originally Posted by erikssenmar867 View Post
Hi GeoffR,
i'd want to use the patch "My 14 line spacing values", but i do not understand how to edit it.
i'd want to use these values for line spacing: 0,7; 0,8; 0,9; 1,05; 1,07; 1,1; 1,15; 1,2; 1,25; 1,3; 1,35; 1,4; 1,45; 1,5
The extra four values can only be chosen from the tables A or B listed in the patch. (I could make a custom patch that would use other values, but then it becomes even more complicated to explain.)

For example you could have: A; 0.8; 0.9; 1.05; B; 1.1; A; 1.2; 1.25; 1.3; 1.35; 1.4; 1.45; A; where the As and Bs are chosen from the appropriate tables.

The closest to your example would be: 0.6875; 0.8; 0.9; 1.05; 1.075; 1.1; 1.1875; 1.2; 1.25; 1.3; 1.35; 1.4; 1.45; 1.5;
Spoiler:
Code:
<Patch>
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 = 73FA4E, 35 F6 BE EB, 00 46 00 46
#replace_bytes = 73FA9C, 35 F6 96 EB, 00 46 00 46
#replace_bytes = 73FAC2, 35 F6 84 EB, 00 46 00 46
replace_bytes = 73FAF8, 35 F6 68 EB, 00 46 00 46
#replace_bytes = 73FB54, 35 F6 3A EB, 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 = 73FA42, F0, E6

# Second code-injected value 1.2
# Replace byte with a value from table B:
replace_bytes = 73FA92, F3, F1

# Third code-injected value 1.5
# Replace byte with a value from table A:
replace_bytes = 73FAB8, F8, F3

# Last code-injected value 3.0
# Select Table A:
replace_bytes = 73FB48, C4 F2, C3 F6
replace_bytes = 73FB4B, 03, 73
# Replace byte with a value from table A.
replace_bytes = 73FB4A, 08, F8

# Other values for replace
#                       1.0   0.6875
replace_float = 73FB98, 1.05, 0.8
replace_float = 73FBA0, 1.07, 0.9
replace_float = 73FBA8, 1.1,  1.05
#                       1.2   1.075
replace_float = 73FBB0, 1.35, 1.1
#                       1.5   1.1875
replace_float = 73FBB8, 1.7,  1.2
replace_float = 73FBC0, 1.8,  1.25
#                       2.0   ----
replace_float = 73FBC8, 2.2,  1.3
replace_float = 73FBD0, 2.4,  1.35
replace_float = 73FBD8, 2.6,  1.4
replace_float = 73FBE0, 2.8,  1.45
#                       3.0   1.5
</Patch>


The only difficulty is that 1.1875 is very close to 1.2; You could leave out the 1.1875 and 1.45 values and use just 13 values instead: 0.6875; 0.8; 0.9; 1.05; 1.075; 1.1; 1.15; 1.2; 1.25; 1.3; 1.35; 1.4; 1.5;
Spoiler:
Code:
<Patch>
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 = 73FA4E, 35 F6 BE EB, 00 46 00 46
#replace_bytes = 73FA9C, 35 F6 96 EB, 00 46 00 46
replace_bytes = 73FAC2, 35 F6 84 EB, 00 46 00 46
replace_bytes = 73FAF8, 35 F6 68 EB, 00 46 00 46
#replace_bytes = 73FB54, 35 F6 3A EB, 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 = 73FA42, F0, E6

# Second code-injected value 1.2
# Replace byte with a value from table B:
replace_bytes = 73FA92, F3, F1

# Third code-injected value 1.5
# Replace byte with a value from table A:
replace_bytes = 73FAB8, F8, F3

# Last code-injected value 3.0
# Select Table A:
replace_bytes = 73FB48, C4 F2, C3 F6
replace_bytes = 73FB4B, 03, 73
# Replace byte with a value from table A.
replace_bytes = 73FB4A, 08, F8

# Other values for replace
#                       1.0   0.6875
replace_float = 73FB98, 1.05, 0.8
replace_float = 73FBA0, 1.07, 0.9
replace_float = 73FBA8, 1.1,  1.05
#                       1.2   1.075
replace_float = 73FBB0, 1.35, 1.1
#                       1.5   ----
replace_float = 73FBB8, 1.7,  1.15
replace_float = 73FBC0, 1.8,  1.2
#                       2.0   ----
replace_float = 73FBC8, 2.2,  1.25
replace_float = 73FBD0, 2.4,  1.3
replace_float = 73FBD8, 2.6,  1.35
replace_float = 73FBE0, 2.8,  1.4
#                       3.0   1.5
</Patch>


Edit: third example deleted

Quote:
And an other question: if i enable this patch, do i have to disable the other patch "My line spacing values"?
Yes.

Last edited by GeoffR; 01-10-2014 at 08:19 PM. Reason: example deleted
GeoffR is offline   Reply With Quote