View Single Post
Old 11-11-2018, 10:30 PM   #249
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,808
Karma: 7423683
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Quote:
Originally Posted by GeoffR View Post
I'm having a problem with FindBaseAddressString using kobopatch-apply (linux 64-bit), not sure if it is a problem with kobopatch-apply or a problem with my yaml.
The issue is with your yaml. When doing finds for bytes, you should use FindBaseAddressHex, so it doesn't get interpreted as a UTF-8 string and get all mangled. Also, it allows you to make the hex more readable.

Here is a fixed version:
Spoiler:
Code:
My 10 line spacing values:
  - Enabled: no
  - PatchGroup: Line spacing values alternatives
  - Description: |
      This patch changes the values on the line spacing adjustment slider,
      reducing the number of spacing options from 15 to 10, but allowing
      much narrower spacing values to be set.
    # Bypass code-constructed values 1.0, 1.2, 1.5, 2.0, 3.0
  - FindBaseAddressHex: 4F F0 00 09 07 F1 80 01 4F F0 00 08 C3 F6 F0 79 3C 1D F3 58 20 46 61 E9 1E 89 7B 60
  - ReplaceBytes: {Offset: 0x14, FindH: 20 46 61 E9 1E 89, ReplaceH: 7B 60 03 E0 00 BF}
  - ReplaceBytes: {Offset: 0x6C, FindH: 20 46, ReplaceH: 03 E0}
  - ReplaceBytes: {Offset: 0x96, FindH: 20 46, ReplaceH: 03 E0}
  - ReplaceBytes: {Offset: 0xD2, FindH: 20 46, ReplaceH: 03 E0}
  - ReplaceBytes: {Offset: 0x138, FindH: 20 46, ReplaceH: 03 E0}
    # 10 values for replacement, change these replace_float values to suit:
  - FindBaseAddressHex: CD CC CC CC CC CC F0 3F 1F 85 EB 51 B8 1E F1 3F
  - ReplaceFloat: {Offset: 0x00,  Find: 1.05, Replace: 0.8}
  - ReplaceFloat: {Offset: 0x08,  Find: 1.07, Replace: 0.85}
  - ReplaceFloat: {Offset: 0x10,  Find: 1.1,   Replace: 0.875}
  - ReplaceFloat: {Offset: 0x18,  Find: 1.35,  Replace: 0.9}
  - ReplaceFloat: {Offset: 0x20,  Find: 1.7,   Replace: 0.925}
  - ReplaceFloat: {Offset: 0x28,  Find: 1.8,   Replace: 0.95}
  - ReplaceFloat: {Offset: 0x30,  Find: 2.2,   Replace: 0.975}
  - ReplaceFloat: {Offset: 0x38,  Find: 2.4,   Replace: 1.0}
  - ReplaceFloat: {Offset: 0x40,  Find: 2.6,   Replace: 1.05}
  - ReplaceFloat: {Offset: 0x48,  Find: 2.8,   Replace: 1.1}


Another thing you might want to consider is using integers for the additional offsets (i.e. the ones which aren't absolute addresses), as it makes it more readable and consistent with the newer kobopatch patches.

Thanks for updating your line spacing patches (and for all the help during the early stages of kobopatch)! Also, I'm planning to make a proper site for kobopatch along with some proper documentation.

Last edited by geek1011; 11-13-2018 at 08:23 PM.
geek1011 is offline   Reply With Quote