Results 1 to 25 of 25

Thread: [SCRIPT] Another World Clock

  1. #1
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Lightbulb [SCRIPT] Another World Clock

    I was going to make some minor adjustments in joci2000's w_clock.nrx, e.g. reduce its flash footprint because I am out of flash, but finally ended to create a program from scratch. It gave me possibility to start using the great SDK V2, too.

    Thanks to joci2000 for the idea!

    Download the newest version 1.04 from:
    www.panuworld.net/nuukiaworld/download/nokix/worldclk.htm
    Last edited by nuukiaworld; 10-12-2007 at 12:13 PM. Reason: New version available

  2. #2
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    cool another nice script.

    and i must say that i like your script better than mine It need less space and has more function.

    This is a professional work

    and finally: I'm still a beginer in C programming & NokiX commands so i don't know a lot of things about C, and i'm sure this is the reason for the unoptimised codes.

    but now i can improve my knowledge of NokiX commands from Yak site (thx for Yak for his great documentation).

    Regards

    Joci2000
    Last edited by joci2000; 08-01-2006 at 03:56 PM.

  3. #3

    a query...

    i replaced joci2000's world_clock.nrx with the latest from nuukiaworld's world_clock.nrx, i find it more comprehensive and detailed indeed, the only problem i encountered is that my phone (3310-using V06.39B) intermittently hangs wherever i accesses the World clock sub-menu, i already re-arranged the scripts in NokiX processing list, i did it several times but to no avail, the problem still exist. please help, i really like the application for my phone...
    Last edited by Daryl Saludares; 10-01-2006 at 02:13 AM. Reason: spelling

  4. #4
    Quote Originally Posted by nuukiaworld
    I was going to make some minor adjustments in joci2000's w_clock.nrx, e.g. reduce its flash footprint because I am out of flash, but finally ended to create a program from scratch. It gave me possibility to start using the great SDK V2, too.

    Thanks to joci2000 for the idea!

    www.panuworld.net/nuukiaworld/download/nokix/worldclk.htm
    @nuukiaworld
    what causes this one to form a gap? this happens when i put world_clock.nrx(nuukiaworld version) in the processing list.

    *******************************
    # Processing: RESERVE_RAM.rx THE_END
    Reserved 1056 (0x420) bytes in 72 blocks.
    Defaults mechanism used by 19 blocks.
    Reserved blocks contain 2 bytes of gaps.
    Done!
    *******************************

    pls help...

  5. #5
    Join Date
    Apr 2003
    Location
    Portugal
    Posts
    1,256
    That's no patching error

    you'd have to study RESERVE_RAM.nrx in order to understand how gaps work

    like this: First script reserves only one byte ( reserve_ram(1) ) and second script reserves 2 then you get first block with one empty location that will be filled when another script reserves a single byte because the 2 bytes must be in same block

    got the idea?

    PS anyone correct me if i'm wrong
    searching and asking won't kill you, will only make you wiser (please search before you ask! )
    -------------------------------------------------------------
    Asking how is like traveling the entire space in 3 seconds. (Nokdoc)

  6. #6
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Quote Originally Posted by mestrini
    like this: First script reserves only one byte ( reserve_ram(1) ) and second script reserves 2 then you get first block with one empty location that will be filled when another script reserves a single byte because the 2 bytes must be in same block
    Like in most 16/32-bit CPU's, there are limitations for RAM addresses of variables; in ARM7:
    • 1-byte variables (char) can be at any address
    • 2-byte (word) variables (short) must begin at an even address
    • 4-byte (int) variables must begin at an address divisible by four
    Because NokiX standard macro reserve_ram.rx takes care about these align requirements, we do not need to think about them.

    Free RAM example (imaginary example at address 0x110000):
    0x110000 .. .. .. .. .. .. .. ..
    0x110008 .. .. .. .. .. .. .. ..
    After first script which needs 1 byte ('A') of RAM (-> @ 0x110000):
    0x110000 AA .. .. .. .. .. .. ..
    0x110008 .. .. .. .. .. .. .. ..
    After second script which needs 4 bytes ('B') (-> @ 0x110004):
    0x110000 AA .. .. .. BB BB BB BB
    0x110008 .. .. .. .. .. .. .. ..
    After third script which needs 2 bytes ('C') (-> @ 0x110002):
    0x110000 AA .. CC CC BB BB BB BB
    0x110008 .. .. .. .. .. .. .. ..
    Legend: .. free byte, AA/BB/CC reserved byte

    This is because B (4 bytes) must start at an address divisible by four, reserve_ram.rx must leave three bytes of gap between A and B. However, when positioning C, reserve_ram.rx detects that it can use that gap, so finally only one byte of gap will remain. If no more 1-byte reservations occur, that byte will be left unsed (gap).

    This is not the exact way how reserve_ram.rx works, only my guess. But in short, the user does not need to worry about the gaps. They will appear only when required and are not harmful, and the amount of them depends on what scripts you have in your NokiX project (may be also on the order of the scripts in your NokiX project?)

    @Daryl Saludares
    Your problem is not present on my 6110. World Clock does not contain anything special, its way of working is the same as in the NokiX SDK template project.
    • Does the problem continue to occur if you reduce the number of other (enabled) patches in your NokiX project?
    • Does the world_clock have problems (only) if the phone clock is not set? I have not tested the behaviour of the application if the clock is not set. (It is too difficult on 6110 to reset the clock...! )
    Last edited by nuukiaworld; 10-01-2006 at 01:27 PM.

  7. #7

    the same thing...

    i flashed the modified SW to two 3310 phones but still the same thing troubles me, sometimes even if i just open "World clock" sub-folder the phone hangs for about 15 seconds then it re-starts. so i just replaced it with the previous one "joci2000 script". do you have some plans to re-write the script for a more stable output re: 3310 HW?

    @mestrini
    thanks for the info =

  8. #8
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Quote Originally Posted by Daryl Saludares
    ...if i just open "World clock" sub-folder the phone hangs for about 15 seconds then it re-starts... do you have some plans to re-write the script for a more stable output re: 3310 HW?
    I do not have a 3310, so I cannot reproduce your problem. With 6110 it works well, and by quickly reading through the source, there should not be any possibility of crashes. It is short, simple, and follows closely the NokiX SDK's application example.

    Tell me more: Is the map displayed when the phone hangs or will the application hang before displaying anything?

    I made two special testing builds (_test1 and _test2). If you want to help to solve your problem, test both of them and tell if either one does not crash in the same way. (They have rather limited functionality, they are only for finding the reason of the crash.)

    However, I cannot guarantee that I can solve your problem. (Nobody else have reported about similar problem.)
    Attached Files Attached Files

  9. #9
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    well on 3310 the problem is there. the freegfx open with map,clock,gmt time and after it hangs

    as i see there is also a problem with the 24H format. for example at 10am it show 10pm for me.

    the test_1 still hang, while test_2 is working.

  10. #10

    assessment result...

    Quote Originally Posted by nuukiaworld
    Tell me more: Is the map displayed when the phone hangs or will the application hang before displaying anything?

    I made two special testing builds (_test1 and _test2). If you want to help to solve your problem, test both of them and tell if either one does not crash in the same way. (They have rather limited functionality, they are only for finding the reason of the crash.)
    1st: there are times that the map is displayed then it hangs/re-starts itself;
    2nd: i can view the entire application features, i.e. GMT+ to GMT-, but in the middle of my scrolling/viewing, phone hangs/re-starts itself;
    3rd: i can view the entire application features, but when i try to exit from the application, upon seeing the folder title "World clock" the phone hangs/re-start itself.

    now in your test package 1, this is the result: upon entering the sub-folder title "World clock" i can only view the map, exactly the map only, no more possibility for scrolling, then the phone hangs/re-starts itself.

    test package 2 is the stable script, time is displayed at the bottom left of the screen, however accessing to the Navi key for time zone cannot be viewed, key#5 says "Own time zone selected" so far this is the assessment i can tell you by now. if you can concentrate at test package 2 for 3310 then maybe it will be fine. thanks in advance, RPN calc and temp screen saver are two pretty awesome apps, thanks

  11. #11
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Thanks for the testing reports. They gave some info where the problem can be. If possible, please test _test3 and _test4 similarly. They are attached below. If the results are those that I expect, next I can try fixing the problem. Note that these testing versions are still limited in functionality. They are just for pinging the origin of the problem.
    Quote Originally Posted by joci2000
    as i see there is also a problem with the 24H format. for example at 10am it show 10pm for me
    Do you mean 12h format? However, in my phone, the am/pm indicator works as expected (' for am, . for pm). Does the problem occur on your own (home) zone or somewhere else (on which zone, and which is your selected "own" zone)?
    Attached Files Attached Files

  12. #12
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    So the test_3 version still hangs while test_4 works it seems to work correctly except the navi button(may be this is the limitation)

    about the clock: with 24H type at 10.00 it showed 22.00(may be because i can't set the zone (on the first release)) but now it seems to work corretly with test_4

  13. #13
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Arrow Fixed(?) version 1.01 available

    Yes, that was the result I expected! I guess now that the reason is that the clock and GMT offset texts are printed with own_print_string() using y=47. This causes actually one raster row (although empty) printed below the display bottom saving space for the map. (On 6110 it was not a problem, at least with my current configuration.)

    I fixed it by making the map lower and moving the texts up by one pixel (y=46); now their vertical position is the same as Navi label's. I hope it works now also on 3310 and others. Tell if you still have problems!

    Download URL in the first message. Thank you for hard testing...!

  14. #14
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    Well now there is an other problem

    the world clock open properly and the buttons work fine, but when i press the navi button the country name, time appear but i cannot exit from this message with C nor Navi i have to turn off the phone with power button. (may be action(this is current action:nop-back) problem).

  15. #15

    same result take a look pls...

    Quote Originally Posted by joci2000
    Well now there is an other problem

    the world clock open properly and the buttons work fine, but when i press the navi button the country name, time appear but i cannot exit from this message with C nor Navi i have to turn off the phone with power button. (may be action(this is current action:nop-back) problem).
    i do have the same problem encountered just now and the phone doesn't re-start anymore it stays like a in an idle state and "Back" menu is left on the screen, pls see the attached screen shot...
    Attached Images Attached Images
    • File Type: bmp 1.bmp (2.3 KB, 149 views)
    • File Type: bmp 2.bmp (2.3 KB, 148 views)
    • File Type: bmp 3.bmp (2.3 KB, 146 views)
    • File Type: bmp 4.bmp (2.3 KB, 142 views)
    • File Type: bmp 5.bmp (2.3 KB, 143 views)
    Last edited by Daryl Saludares; 14-01-2006 at 02:54 AM.

  16. #16

    continuation screen shot

    additional...
    Attached Images Attached Images
    • File Type: bmp 6.bmp (2.3 KB, 146 views)
    • File Type: bmp 7.bmp (2.3 KB, 145 views)

  17. #17
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187
    Quote Originally Posted by joci2000
    ...the country name, time appear but i cannot exit from this message with C nor Navi i have to turn off the phone with power button
    Oh no, this is an indefinite loop of problems - and all the time the app. is working properly on my 6110. But I want to make it work also on your phones. I hope that you don't lose your nerves with this app before that.

    The country name message is generated using standard display_msg(), so I should not need to take care of the actions during the message. However, v1.01 uses a non-standard display_msg format, "dmi_clock" (the message with a clock icon, the one displayed when you set the clock manually). On 6110 it works great (see pictures on the download page) but may be it is not compatible with 3310.

    To use a standard info-message instead, insert
    dmi_clock=2
    just before /* inserting code */ in world_clock.nrx. Does it solve the problem?

    Which version of 3310 you are patching? If the problem is really the "dmi_clock" value, I want to find out why it does not work correctly on your software. If you run the script in "Verbose 1" level, what number is displayed as "Clock message format ID"?

  18. #18
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    Quote Originally Posted by nuukiaworld
    To use a standard info-message instead, insert
    dmi_clock=2
    just before /* inserting code */ in world_clock.nrx. Does it solve the problem?

    Which version of 3310 you are patching? If the problem is really the "dmi_clock" value, I want to find out why it does not work correctly on your software. If you run the script in "Verbose 1" level, what number is displayed as "Clock message format ID"?
    okay that was the problem if i insert this(dmi_clock=2) the script works correctly

    i use 3310 V6.07 and give this value: Clock message format ID: 0x29

  19. #19
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Arrow Fixed(?) version (again)

    Quote Originally Posted by joci2000
    i use 3310 V6.07 and give this value: Clock message format ID: 0x29
    I tested patching 3310/6.39 and got the same result. But it is wrong: the correct value for 3310 is 0x36.

    I disassembled a little and found that the "Clock is set" message is shown differently on 3310 compared to 6110, 5110, 8210, 3330, 3210 (the ones I tested yesterday before releasing 1.01). -- I didn't test 3310, and then just it is different than the others...!

    Fixed 1.02 (available now) should work correctly also on 3310, displaying a clock icon without beep when pressing the Navi key. I hope (but don't expect) this was the last thing to fix.

  20. #20
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    the last version seems to be perfect till now i haven't found any bug

  21. #21
    the last version is working correctly in my phone now, i can sleep with worry free thoughts,
    thank you Nuukiaworld for fixing, joci2000 for the support.
    Last edited by Daryl Saludares; 16-01-2006 at 12:48 AM.

  22. #22
    Ya.. It working nicely at my phone..
    Thanx nuukiaworld..

  23. #23
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Arrow Version 1.03

    I made a minor update to my World Clock application, may be just because I have to travel next week... Now the application shows the time of the selected time zone directly in the menu (see below).



    It was not so straight-forward to display a menu value and update it automatically every minute... In addition to processing the MSG_DISPLAY_MENU_VALUE in the main dispatcher, a UI hook is required for updating the value if one keeps displaying our menu item for a long time.

  24. #24
    Join Date
    Nov 2003
    Location
    Hungary
    Posts
    391
    Xcellent Nice update.

  25. #25
    Join Date
    Oct 2005
    Location
    Helsinki, Finland
    Posts
    187

    Arrow Version 1.04

    Fixed the menu display when the clock is not set. Now shows "--:--" like the normal clock menu. Download link in the first message.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SCRIPT] World clock
    By joci2000 in forum NokiX
    Replies: 11
    Last Post: 14-11-2005, 10:34 PM
  2. world clock pro-blem
    By teelim in forum Nokia Symbian General forum
    Replies: 4
    Last Post: 04-06-2003, 03:38 AM
  3. world clock,,,
    By rash in forum Nokia Symbian General forum
    Replies: 3
    Last Post: 22-02-2003, 05:33 PM
  4. World Clock Pro 1.21 Problem
    By htreXists in forum Nokia Symbian General forum
    Replies: 4
    Last Post: 28-01-2003, 04:26 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •