|
![]() |
|
Welcome to the GSM-Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| Register | FAQ | Donate | Forum Rules | ★. iPhone Unlock .★ | -= JTAG BOOM =- | Search | Today's Posts | Mark Forums Read |
| x6x and x7x Flashpatching x6x and x7x Flashpatching (and newer phones). |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Jan 2006
Posts: 2
Member: 216352 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Hello! I've searched for serveral hours now and found not a bit I understood (that is: not russian...): I just want to know how to write own patches using MasterPatch.. that is: * Do I sort of "register" my patch with MP? * How does is enable/disable the patch? Does it restore the entry point? * How to use the configuraton-parts? (Alternatively, I think a source code of any patch written for MP would be enough...) Can somebody provide some information in english? ;-) TIA, KKaul PS: Btw, where (which forum) is the current development of MP going on? [The actual answer please, can be russian] |
|
| | #3 (permalink) |
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| >Do I sort of "register" my patch with MP? No, you don't have to "register" your patch. But your patch must have section like this: Code: 0FC1080: 0xB1C2D3E4,0x0000AB01,0000000000000000,"\
{patch=BottomDate ver=8 cp=avkiev id=AB01 mem=20}\
{1 cb ShowComma v=1}\
",00 In this case MasterMidlet can control your patch. >How does is enable/disable the patch? Does it restore the entry point? No, MasterMidlet doesn't restore entry-point. In example above patch needs 20 byte of RAM as its own buffer. MasterMidlet just switch high bit of byte #0. In patch we have code like this: Code: LoadReg 0, config+4 ; r0=PatchID bl GetBuffer ; Getting buffer for Patch beq exit ; If no patch or patch disabled - exit In example above we will have checkbox (cb) in MasterMidlet. User can check or uncheck it... |
|
| | #4 (permalink) |
| Junior Member ![]() ![]() Join Date: Jul 2005
Posts: 39
Member: 158963 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| hi, the "mem" token in: Code: {patch=BottomDate ver=8 cp=avkiev id=AB01 mem=20} another question: if i have e.g. such thin in config: Code: {sm Profile1}","\
{1 cb `screen output` v=00}","\
{endsm}","\
....
{sm Profile7}","\
{7 cb `screen output` v=00}","\
{endsm}","\ could be the token "pf" for any use for me? how i could use it? could you give me an example, please? |
|
| | #5 (permalink) | |||
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
{patch=BottomDate ver=8 cp=avkiev id=AB01 mem=20}\ {1 cb ShowComma v=1} In this example I use byte#1 as checkbox. But I too use bytes 2-19 for my own purposes. So, I have to write "mem=20". Size of buffer is 20 bytes. In this example: {patch=BottomDate ver=8 cp=avkiev id=AB01}\ {1 cb ShowComma v=1} I will have buffer, which size is just 2 bytes. So, we have to write "mem=..." if we use some area of buffer as a internal RAM for patch... Quote:
We have to use command PROFILES=Y if we want to have ability check/uncheck patch in some profiles. Default value of PROFILES is Y, so we can omit it. But, if you want do some complex check in patch - you have to call GetProfile... See example: "{patch=KeyLightTrg id=EA01}\ {sm Bright.}\ {1 b(7) r=0..100}\ {endsm}\ {sm Delay}\ {8 b(7)}\ {endsm}",00 Quote:
http://forum.siemens-club.org/viewto...?TopicID=57987 PS. Sorry for my keeping silence, I was very busy | |||
|
| | #7 (permalink) | |
| Junior Member ![]() ![]() Join Date: Jan 2005 Location: Germany
Posts: 31
Member: 102514 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
0xA1234504 - onStartup, адрес процедуры, вызываемой при старте телефона 0xA1234508 - onConfigChange, адрес процедуры, вызываемой при изменении конфигурации Are they supported in some way? | |
|
| | #8 (permalink) | |
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
But I didn't see any patch, which use it. ![]() Also, I didn't see any patch which use onConfigChange... | |
|
| | #9 (permalink) |
| Junior Member ![]() ![]() Join Date: Jul 2005
Posts: 39
Member: 158963 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| onConfigChange ... could one call the refresher? ![]() and: would i replace the "magic" address, or is it like this (first config-line): adress: magic,id,onStartup,onConfigChange e.g. 0FD1000: 0xB1C2D3E4,0x0000CCCC,0xA1234567,0xA1234589,"\ ? Last edited by benj9; 01-17-2006 at 12:36. |
|
| | #10 (permalink) |
| Junior Member ![]() ![]() Join Date: Jul 2005
Posts: 39
Member: 158963 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| onStartup works. that's nice, so for normal patches you dont need anymore any entrypoint, but you can start a CallAfterTimer thread, which cycles the patch body in an interval you like. but unfortunetly onConfigChange seems to have absolutly no effect ... -------------------- maybe in this context the "call after time" parametrers are for some coders interesting: R0=pointer to 8 bytes free ram for timer internal purposes R1=time value (approx. 216 units = 1 sec.) R2=destination address attention, all register are killed by CallAfterTimer Last edited by benj9; 01-17-2006 at 17:38. |
|
| | #11 (permalink) | |
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
But MasterPatch doesn't call onConfigChange - I don't see any reason for it. PS. AFAIK, CallAfterTimer kills only R0-R3... | |
|
| | #12 (permalink) | |
| Junior Member ![]() ![]() Join Date: Jul 2005
Posts: 39
Member: 158963 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
Actually I did'nt see any use of CallAfterTimer in patches outside of Blinker [/offtopic] Last edited by benj9; 01-19-2006 at 09:39. | |
|
| | #13 (permalink) | |
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
I pass arguments via RAM of this patch. | |
|
| | #14 (permalink) |
| Junior Member ![]() ![]() Join Date: Jul 2005
Posts: 39
Member: 158963 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Okay, now I understand. Sure CallAfterTimer kills not all registers in the function calling it. But one cannot pass-thru regs to the function called by timer. So same do I, pass the arguments to destination func by ram. ----------- Next question: the token "ms" like in: Code: {2 ms `Milisekunden` v=2167}",00 ![]() I dont have contact address to chaos. Could you pass him this midlet error, the shift from 1000ms to internal 216,7... is nice, but due this error now unusable Last edited by benj9; 01-19-2006 at 20:21. |
|
| | #15 (permalink) | |
| Freak Poster ![]() ![]() ![]() ![]() Join Date: Jan 2004 Location: Kiev, Ukraine Age: 42
Posts: 291
Member: 48709 Status: Offline Thanks: 0
Thanked 0 Times in 0 Posts
| Quote:
E-mail to chaos | |
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |