[Firmware][MOD] Change timezone: correct time+EPG!

Here is information about customize your B series firmware..:!:This forum is NOT FOR USER questions or problems but DEVELOPER.

rvs2
Official SamyGO Developer
Posts: 22
Joined: Wed Oct 06, 2010 4:13 pm

[Firmware][MOD] Change timezone: correct time+EPG!

Post by rvs2 »

2All

Me, gao_atc and juuso have made a patch on the Time zone choice, for several models of TV if there is a desire of an insertion it is possible to take from juuso. Big thanx moras86 for great timezone images ;)

Download!


ImageImageImageImageImageImageImageImageImageImageImageImageImageImage


The patch description:

After analyzing of T-CHL7DEUC 2004.1 firmware (exeDSP binary) the following has been found. The Time zones changing mechanism is already added to firmware initially, but it has been implemented for only two countries: Spain and Australia.
An operation principle is the following: Function TCCountrySpecBase is the designer of the country. Inside the structure is filled by default value, in this case we have interesting elements 0?40 and 0?48-0?64 . The initiating index, stored in menu TimeZone is in 0?40.
0?48-0?64 store values in minutes for each index of TimeZone.
SpoilerShow

Code: Select all

00000040 defaultTimeZoneRegion DCD ?
00000044 defaultTimezone DCD ?                   ; GMT value in minutes (60,120,180...)
00000048 field_48        DCD ?
0000004C field_4C        DCD ?
00000050 field_50        DCD ?
00000054 field_54        DCD ?
00000058 field_58        DCD ?
0000005C field_5C        DCD ?
00000060 field_60        DCD ?
00000064 field_64        DCD ?
But here is the problem: the maximum possible amount TimeZone is provided no more than 8. We cant`t use this way, because it is necessary to have 13 timezones (0-12 + auto)...

Then were functions of read and write TimeZone found:
CTvInfo:: GetTimeZone
CTvInfo:: SetTimeZone


Only edit of function CTvInfo:: GetTimeZone is needed to get working patch.
SpoilerShow

Code: Select all

LDR R3, = _ZN8TCTvInfo10m_pManagerE; TCTvInfo:: m_pManager
MOV R1, R5; the pointer on an index
MOV R2, R6; the pointer for the period of GMT
LDR R4, [R3]
MOV R3, R7
MOV R0, R4
LDR R12, [R4]
MOV LR, PC
LDR PC, [R12, #0x94]; reading of values
B Patch_Time_zone
Function GetTimeZone reads from EEPROM current zone index and current time GMT, further these values are used in other functions for time calculation. For implementation of a patch it is enough to write down in the pointer the correct value for selected TimeZone, the decision idle time:
SpoilerShow

Code: Select all

GMT = zone number * 60min i.e. 
GMT0 = 0 * 60 = 0
GMT1 = 1*60 = 60
GMT2 = 2*60 = 120 etc. 
Patch_Time_zone 
If (ItemZone <= 0x11) ItemZone = 0x11
 else GMT = (ItemZone ? 0x12) *60
LDR R0, [R5]
CMP R0, #0x11
SUBHI R0, R0, #0x12
RSBHI R0, R0, R0, LSL#4
MOVHI R0, R0, LSL#2
STRHI R0, [R6]
MOVLS R0, #0x11
STRLS R0, [R5]
Since only 8 zones initially are putted to firmware, it was necessary to increase an amount of values in TimeZone menu with ability to write walues to EEPROM. The function for that is TCTimeZoneCheckerDVB:: t_Config (void)
SpoilerShow

Code: Select all

STMFD SP!, {R4, R5, LR}
MOV R5, #0xF; 15th records
MOV R4, R0
STR R5, [R0, #0x1C]
SUB SP, SP, #4
MOV R0, #0x3C; 60 byte to select
BL _Znaj; operator new [] (uint)
MOV R3, #0x11; initiating value
STR R0, [R4, #0x20]
Initially here is an check routine in firmware: if other country than Spain and Australia is selected, menu TimeZone is not shown. We needed to remove such checking and get this menu always shown for all countries.
SpoilerShow

Code: Select all

CClockActionWindowTimeZoneItem::AddMenuItemFlag(void)const
BL      _ZN4TCTv10GetCountryEPi ; TCTv::GetCountry(int *)
LDR     R0, [SP,#0x10+var_C]
CMP     R0, #0x21
CMPNE   R0, #0
B       loc_11849D0  ;patch

CClockActionWindowTimeZoneItem::EnableMenuItemFlag(void)const
BL      _ZN4TCTv10GetCountryEPi ; TCTv::GetCountry(int *)
LDR     R3, [SP,#0x10+var_C]
CMP     R3, #0x21
CMPNE   R3, #0
MOVNE   R0, #0
MOVEQ   R0, #1
B       loc_1184A24 ;patch
Australia was chosen as a basis for displaying new time zones. To have menu on, following patching is needed:
SpoilerShow

Code: Select all

CClockActionWindowBase::t_CreateTimeZone(void)
BL      _ZN4TCTv10GetCountryEPi ; TCTv::GetCountry(int *)
LDR     R3, [SP,#0x18+var_14]
CMP     R3, #0x16
B       loc_1154054  ;patch
LDR     R0, =0x3028     ; size
BL      _Znwj           ; operator new(uint)
MOV     R4, R0
BL   _ZN23CTimeZoneActionWindowSPC1Ev ; CTimeZoneActionWindowSP::CTimeZoneActionWindowSP(void)
loc_1154044                             ; CODE XREF: CClockActionWindowBase::t_CreateTimeZone(void)+5Cj
MOV     R3, #0x2800
STR     R4, [R5,R3]
ADD     SP, SP, #0xC
LDMFD   SP!, {R4,R5,PC}
loc_1154054                             ; CODE XREF: CClockActionWindowBase::t_CreateTimeZone(void)+28j
LDR     R0, =0x3028     ; size
BL      _Znwj           ; operator new(uint)
MOV     R4, R0
BL      _ZN23CTimeZoneActionWindowAUC1Ev ; CTimeZoneActionWindowAU::CTimeZoneActionWindowAU(void)
B       loc_1154044
Next is to increase an amount of lines in the menu:
SpoilerShow

Code: Select all

CTimeZoneActionWindowAU:: t_ChangeAppIndex (int)
CTimeZoneActionWindowAU:: t_SetTimeZoneValue (int)
CTimeZoneActionWindowAU:: t_ChangeMap (int)
and choose new names of timezones, correct patch to images. Images are stored on /mtd_appdata/Images_960x540/SingleMenuTimeZoneEA

Further ideas:
To have separate Content library game for GMT selection there are two variants:
1. Select a zone from the list just after start of game, save the selected zone to a file, change function GetTimeZoneto read values from file. But this way can be slow since function GetTimeZone is often used by other functions and reading from NAND is quite slow.
2. The same as previous but for saving selected zone use function SetTimeZone.
3. Loader who makes whole patching process like it was done to get permanent patch of GMT time zone.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by juusso »

Actually, whole hard work is made by rvs2 and gao_atc :D

To change time zone go to:
Settings -> time -> Time Zone

Here is neither separate patch available nor game (yet?), just complete and tested, fully working firmwares for upgrade in normal way over menu:

T-CHL5DEUC-2008.0
T-CHL7DEUC-2004.1
T-CHL7DEUC-2005.0
T-CHU7DEUC-3000.G

Firmwares are patched with samygo patcher v0.24

T-CHL5DEUC-2008.0 is patched + arfix2 hardcoded. Moreover, it has network enabled kernel. (if needed)

Download:

T-CHL5DEUC-2008.0-v0.24-auto-arfix2-net-GMT2
T-CHL7DEUC-2004.1-v0.24-GMT2
T-CHL7DEUC-2005.0-v0.24-GMT2
T-CHU7DEUC-3000.G-v0.24-GMT2

Related topic.
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
steve-austin
Posts: 79
Joined: Tue Oct 20, 2009 8:04 pm

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by steve-austin »

Works like a charm on my TV, you rock!!!

For info, I patch your self-made firmware with geophatcher and it launchs without problem my own startup script!
55B650 and 37B650 with patched firmware
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by erdem_ua »

Scripter1 wrote:Hi.
Can you please do the same with firmware for my Samsung P2770HD (firmware: T-E27PEUC-2002.1)?
I know that it's now hard to find firmware for it (Samsung has removed it from it's websites) but i downloaded it when it was available and i can send you, if you need a firmware file to to modify then write me.
You don't have any chance. It's unsupported modal...
User avatar
erdem_ua
SamyGO Admin
Posts: 3125
Joined: Thu Oct 01, 2009 6:02 am
Location: Istanbul, Turkey
Contact:

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by erdem_ua »

B series firmwares just starts with T-CHL (chelsie),,Sorry. Nothing to do.
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by juusso »

Scripter1 wrote:I thin this can be a B series model, I was exploring this firmware file and i found that...
Models you mentioned are 2009 m.y, we could call it as B series just because of this fact. It seems to be more A series than B, but actually it is C ;)
As Erdem said already, we support only firmwares with T-CH...
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE
User avatar
juusso
SamyGO Moderator
Posts: 10129
Joined: Sun Mar 07, 2010 6:20 pm

Re: [Firmware][MOD] Change timezone: correct time+EPG!

Post by juusso »

This GMP patch made by hand and here are manually over 3500 addresses patched. So i don`t think it could be easy ported to C series. Might some day anyone with enough skills makes such thing. don`t give up, but know, this time is not soon :|
LE40B653T5W,UE40D6750,UE65Q8C
Have questions? Read SamyGO Wiki, Search on forum first!
FFB (v0.8), FFB for CI+ . Get root on: C series, D series, E series, F series, H series. rooting K series, exeDSP/exeTV patches[C/D/E/F/H]

DO NOT EVER INSTALL FIRMWARE UPGRADE

Post Reply

Return to “[B] Firmware”