View Single Post
Old 06-19-2018, 09:15 AM   #1
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
Some patches for Clara firmware 4.8.11090

I don't have a Clara and haven't been keeping up with developments. From what I read here there is no official download link for this firmware, and it is only being distributed to the new Clara devices.

I haven't done all the patches yet, but here are some -- not tested.-- for the firmware linked to in geek1011's post in the Clara discussion thread.

`My 24 line spacing values` (libnickel.so.1.0.0):
Spoiler:
Code:
<Patch>
patch_name = `My 24 line spacing values`
patch_enable = `no`
# patch_group = `Line spacing values alternatives`
#
## This patch changes the values on the line spacing adjustment slider,
## increasing the number of spacing options from 15 to 24, and allowing
## much narrower spacing values to be set.
#
# save r5, initialise loop counter
replace_bytes = 6562AC, BD F5 B2 EF 6D A3, A9 46 00 25 ED 00
# loop to load 14 vals from new table
replace_bytes = 6562B2, D3 E9 00 23 07 F1, 20 46 04 A1 29 44
replace_bytes = 6562B8, 80 01 20 46, BD F5 AC EF
replace_bytes = 6562BC, 61 E9 1C 23 BD F5, 08 35 70 2D F7 D1
# jump over new table
replace_bytes = 6562C2, A8 EF 6A A3 D3 E9, 7C E0 00 BF 00 BF
# new table: 14 8-aligned doubles
base_address = 6562C8
replace_bytes = 0000, 00 23 07 F1 80 01 20 46, 00 00 00 00 00 00 F0 3F
replace_bytes = 0008, 61 E9 1A 23 BD F5 9E EF, 00 00 00 00 00 00 F0 3F
replace_bytes = 0010, 67 A3 D3 E9 00 23 07 F1, 00 00 00 00 00 00 F0 3F
replace_bytes = 0018, 80 01 20 46 61 E9 18 23, 00 00 00 00 00 00 F0 3F
replace_bytes = 0020, BD F5 94 EF 43 F2 33 33, 00 00 00 00 00 00 F0 3F
replace_bytes = 0028, 4F F0 33 32 C3 F6 F3 73, 00 00 00 00 00 00 F0 3F
replace_bytes = 0030, 07 F1 80 01 20 46 61 E9, 00 00 00 00 00 00 F0 3F
replace_bytes = 0038, 16 23 BD F5 88 EF 5E A3, 00 00 00 00 00 00 F0 3F
replace_bytes = 0040, D3 E9 00 23 07 F1 80 01, 00 00 00 00 00 00 F0 3F
replace_bytes = 0048, 20 46 61 E9 14 23 BD F5, 00 00 00 00 00 00 F0 3F
replace_bytes = 0050, 7E EF 00 23 00 22 C3 F6, 00 00 00 00 00 00 F0 3F
replace_bytes = 0058, F8 73 07 F1 80 01 20 46, 00 00 00 00 00 00 F0 3F
replace_bytes = 0060, 61 E9 12 23 BD F5 72 EF, 00 00 00 00 00 00 F0 3F
replace_bytes = 0068, 55 A3 D3 E9 00 23 07 F1, 00 00 00 00 00 00 F0 3F
base_address = 00000000
# initialise loop counter
replace_bytes = 6563BC, 00 23 00 22, 00 BF 00 25
# loop to load 10 vals from old table
replace_bytes = 6563C0, C4 F2 08 03 07 F1, 20 46 29 A1 29 44
replace_bytes = 6563C6, 80 01 20 46, BD F5 26 EF
replace_bytes = 6563CA, 61 E9 02 23 BD F5, 08 35 50 2D F7 D1
# restore r5
replace_bytes = 6563D0, 22 EF, 4D 46
# continue at 6563D2
#
#
# Replacement value: the number of initial line spacing values to exclude from
# the line spacing slider; minimum 0, maximum 13. E.g. 9 will result in a
# slider with 15 positions, starting from the 10th replace_float value below.
replace_int = 6562AE, 0, 0
#
# 24 replacement line spacing values: change these replace_float values to suit
# your device and preferences:
#
base_address = 6562C8
replace_float = 0000, 1.0, 0.75
replace_float = 0008, 1.0, 0.78
replace_float = 0010, 1.0, 0.8
replace_float = 0018, 1.0, 0.82
replace_float = 0020, 1.0, 0.84
replace_float = 0028, 1.0, 0.86
replace_float = 0030, 1.0, 0.88
replace_float = 0038, 1.0, 0.9
replace_float = 0040, 1.0, 0.92
replace_float = 0048, 1.0, 0.94
replace_float = 0050, 1.0, 0.96
replace_float = 0058, 1.0, 0.98
replace_float = 0060, 1.0, 1.0
replace_float = 0068, 1.0, 1.02
base_address = 656468
replace_float = 0000, 1.05, 1.05
replace_float = 0008, 1.07, 1.07
replace_float = 0010, 1.1, 1.1
replace_float = 0018, 1.35, 1.15
replace_float = 0020, 1.7, 1.2
replace_float = 0028, 1.8, 1.25
replace_float = 0030, 2.2, 1.3
replace_float = 0038, 2.4, 1.35
replace_float = 0040, 2.6, 1.4
replace_float = 0048, 2.8, 1.5
#
# The first 14 replace_float values above should allow the line spacing to be
# adjusted in increments of one pixel when using a medium sized font on a high
# resolution device. If you use a smaller font size and/or a lower resolution
# device you might find that increasing the slider one step at a time doesn't
# always result in a line spacing increase at each step. In that case, you
# might want to use replacement values that are not quite so close together.
#
# For example: (I use these values on my 758x1024 Glo)
#
#  0.7 0.725 0.75 0.775 0.8 0.825 0.85 0.875 0.9 0.925 0.95 0.975 1.0 1.025 ...
#
# or: (these might better suit the 600x800 Touch)
#
#  0.6 0.633 0.667 0.7 0.733 0.767 0.8 0.833 0.867 9.0 9.33 9.67 1.0 1.025 ...
#
</patch>


`Freedom to advanced fonts control` (libnickel.so.1.0.0)
Spoiler:
Code:
<Patch>
patch_name = `Freedom to advanced fonts control`
patch_enable = `no`
#
## This patch allows the advanced font options (weight/sharpness adjustments)
## to work with sideloaded fonts too. (KEPUB: OTF and TTF. EPUB: TTF only.)
#
# The following passes a junk pointer to N3FontTypeUtil::setupDropdown, but it
# seems the pointer is only passed on to ReadingSettings::getDefaultFontFamily
# where it is discarded without being dereferenced, so it should be safe?
# BEWARE: check whether this still holds in future firmware versions.
#
# N3FontTypeUtil.setupMonotypeDropdown(b,c)
# --> N3FontTypeUtil.setupDropdown(UNDEFINED,b,c)
replace_bytes = 8371DA, 51 46 58 46, 52 46 59 46
replace_bytes = 8371DE, C4 F7 C2 E6, DC F7 90 E7
# N3FontTypeController.setupAdvancedOption(...) --> NOP
replace_bytes = 97BC10, AE F6 8A E1, 00 46 00 46
replace_bytes = 97CA34, AD F6 78 E2, 00 46 00 46
</Patch>


librmsdk.so.1.0.0 hasn't changed, so all the librmsdk.so.1.0.0 patches from 4.8.11073 should work on 4.8.11090 without modification. I think all the libnickel.so.1.0.0 multi-version patches should work too.

Last edited by GeoffR; 06-19-2018 at 09:36 AM. Reason: libnickel.so.1.0.0 multi-version patches
GeoffR is offline   Reply With Quote