Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 07-28-2018, 10:35 AM   #1
Derf
Connoisseur
Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.
 
Derf's Avatar
 
Posts: 99
Karma: 1173714
Join Date: Jul 2018
Location: Long Island, NY
Device: Kobo Clara HD / Mac User
Customizing the custom sleep timeout settings patch

I was wondering if I could customize the custom sleep settings patch, for my own needs. Not being a computer coder, I thought I'd ask here first.

The current patch looks like this
Spoiler:

<Patch>
patch_name = `Custom Sleep/Power-off timeouts`
patch_enable = `no`
#
## Changes the Sleep/Power-off timeout menu options from 5,10,15,30,45,60
## minutes to 10,20,30,60,120,240 minutes.
#
# Values displayed on both menus
replace_string = CEACA0, `5 mins\0`, `10 mins`
replace_string = CEACA8, `10 mins`, `20 mins`
replace_string = CEACB0, `15 mins`, `30 mins`
replace_string = CEACB8, `30 mins`, `1 hour`
replace_string = CEACC0, `45 mins`, `2 hours`
replace_string = CEACC8, `60 mins`, `4 hours`
# Actual values used for sleep menu
replace_int = A6F298, 5, 10
replace_int = A6F2E2, 10, 20
replace_int = A6F326, 15, 30
replace_int = A6F36A, 30, 60
replace_int = A6F3AE, 45, 120
replace_int = A6F3F2, 60, 240
# Actual values used for power menu
replace_int = A6F4A6, 5, 10
replace_int = A6F4E8, 10, 20
replace_int = A6F528, 15, 30
replace_int = A6F568, 30, 60
replace_int = A6F5A8, 45, 120
replace_int = A6F5E6, 60, 240
</Patch>


I'd want to change it to this
Spoiler:

<Patch>
patch_name = `Custom Sleep/Power-off timeouts`
patch_enable = `no`
#
## Changes the Sleep/Power-off timeout menu options from 5,10,15,30,45,60
## minutes to 5,10,15,30,60,120 minutes.
#
# Values displayed on both menus
replace_string = CEACA0, `5 mins\0`, `5 mins`
replace_string = CEACA8, `10 mins`, `10 mins`
replace_string = CEACB0, `15 mins`, `15 mins`
replace_string = CEACB8, `30 mins`, `30 mins`
replace_string = CEACC0, `45 mins`, `1 hour`
replace_string = CEACC8, `60 mins`, `2 hours`
# Actual values used for sleep menu
replace_int = A6F298, 5, 5
replace_int = A6F2E2, 10, 10
replace_int = A6F326, 15, 15
replace_int = A6F36A, 30, 30
replace_int = A6F3AE, 45, 60
replace_int = A6F3F2, 60, 120
# Actual values used for power menu
replace_int = A6F4A6, 5, 5
replace_int = A6F4E8, 10, 10
replace_int = A6F528, 15, 15
replace_int = A6F568, 30, 30
replace_int = A6F5A8, 45, 60
replace_int = A6F5E6, 60, 120
</Patch>
Derf is offline   Reply With Quote
Old 07-31-2018, 10:12 PM   #2
Derf
Connoisseur
Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.Derf ought to be getting tired of karma fortunes by now.
 
Derf's Avatar
 
Posts: 99
Karma: 1173714
Join Date: Jul 2018
Location: Long Island, NY
Device: Kobo Clara HD / Mac User
bump.... any ideas on if this will work?
Derf is offline   Reply With Quote
Advert
Old 07-31-2018, 11:47 PM   #3
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,168
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Derf View Post
bump.... any ideas on if this will work?
As far as I can see, there should be no problems with your changes. The only potential issue I seem to recall was that the timer used a single byte so 255 minutes was the longest time that could be set. Since you are actually reducing the times, it shouldn't be an issue.

Spent a couple of minutes and found this post from GeoffR but it's about 3 years old.

Quote:
Originally Posted by GeoffR View Post
The code that the `Custom Sleep/Power-off timeouts` patch changes can only use values from 0-255. Although the register used to hold the timeout value is 32-bit and can hold much larger values, the code uses a 16-bit 'thumb' instruction to load the register, and there isn't room to use a wider instruction in the patch. It could be that the timeout function can accept larger values, but there is no way to load those larger values without re-writing the code.

Last edited by DNSB; 07-31-2018 at 11:56 PM. Reason: Added source quote
DNSB is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aura HD Customizing the sleep screen axellec Kobo Developer's Corner 1 01-08-2014 05:27 PM
Customizing Kobo sleep page? Rojofo Kobo Reader 9 03-06-2012 04:06 PM
Hacks Tweak sleep/screensaver timeout on Kindle 3 rastik Amazon Kindle 6 01-03-2012 07:09 PM
Nov Patch doesn't fix Wake-from-Sleep bug borisb Kobo Tablets 77 12-04-2011 09:06 PM
Touch Custom screensaver timeout on rooted touch illumilore Nook Developer's Corner 0 11-27-2011 02:23 AM


All times are GMT -4. The time now is 04:44 PM.


MobileRead.com is a privately owned, operated and funded community.