[OS][WM6.5.5] Latest Releases (23563), Porting, Tutorials, Tools, VM, etc.

Search This thread

hilaireg

Moderator Emeritus
Jan 20, 2009
2,948
237
VM: More To It Than Meets The Eye

In my last few 6.1 5.12 21051/20779 ROM builds - VK 1.8.1;

I've noticed that if I do not powercycle my RAPH every 20hrs or so, it would no longer ring on incoming calls.

When I look at the BUILD_LOG file, I noticed that modules where overflowing into SLOT0. After several back-and-forth chats with Da_G, I went ahead and RECMOD'ed modules until SLOT1 modules no longer overflowed into SLOT0.

I've left my device on over the 20hr mark and it's been stable - i.e. incoming calls ring as expected. I've also noticed that battery usage seems to have improved; coincidence?


Ref Link: http://xdaforums.com/showthread.php?t=538099


Cheers,
 

jmckeejr

Senior Member
Aug 11, 2008
1,768
68
Altoona, Pa
www.mckeeflooring.com
In my last few 6.1 5.12 21051/20779 ROM builds - VK 1.8.1;

I've noticed that if I do not powercycle my RAPH every 20hrs or so, it would no longer ring on incoming calls.

When I look at the BUILD_LOG file, I noticed that modules where overflowing into SLOT0. After several back-and-forth chats with Da_G, I went ahead and RECMOD'ed modules until SLOT1 modules no longer overflowed into SLOT0.

I've left my device on over the 20hr mark and it's been stable - i.e. incoming calls ring as expected. I've also noticed that battery usage seems to have improved; coincidence?


Ref Link: http://xdaforums.com/showthread.php?t=538099


Cheers,

Was this with a custom tone or the default ringtone? I have never had this issue personally, but have read about it over and over. Maybe because all of my exe and dll's are modules?
 

hilaireg

Moderator Emeritus
Jan 20, 2009
2,948
237
Was this with a custom tone or the default ringtone?

Stock HTC Ringtone: Innovation.


I have never had this issue personally, but have read about it over and over. Maybe because all of my exe and dll's are modules?

Keep in mind that my situation is with WinMO 6.1. If you are using one of Da_G's 6.5 kitchen where he's bighammered SYS/OEM then SLOT0 might be clean for you.

Have a look at your BUILD_LOG on your next ROM build; if SLOT0 reports 0 MODULES then you're likely fine. If there's modules in SLOT0, you may experience anomalies ... mine was ringtone after 20hrs-24hrs of constant on, you could experience something different.

Cheers,
 

Da_G

Inactive Senior RD / Moderator Emeritus
Aug 20, 2007
3,332
1,563
Riverside, CA
Samsung Galaxy S22 Ultra
@indagroove:

Whoops, that's a typo, you're right, no \tools :) Fixed!

@jmckeejr:

Hilaireg is spot on with this, since you're running WM 6.5 (I assume at least) - you've got SLOT 61 and 60 available for modules - so your SLOT 0 is likely empty.
 
Last edited:

jmckeejr

Senior Member
Aug 11, 2008
1,768
68
Altoona, Pa
www.mckeeflooring.com
@indagroove:

Whoops, that's a typo, you're right, no \tools :) Fixed!

@jmckeejr:

Hilaireg is spot on with this, since you're running WM 6.5 (I assume at least) - you've got SLOT 61 and 60 available for modules - so your SLOT 0 is likely empty.

Right. Here's my slots:
Code:
SLOT  0:   0x02000000 - 0x01a60000 (END: 0x00060000, 0 MODULES)
            0x02000000 - 0x01fc0000 - ROM 0
            0x01f80000 - 0x01a60000 - ROM 1
 SLOT  1:   0x04000000 - 0x02020000 (END: 0x02020000, 259 MODULES)
 SLOT 60:   0x7a000000 - 0x79490000 (END: 0x78020000, 48 MODULES)
 SLOT 61:   0x7c000000 - 0x7a025000 (END: 0x7a020000, 236 MODULES)
 

indagroove

Senior Member
Nov 17, 2007
1,219
87
Stock HTC Ringtone: Innovation.




Keep in mind that my situation is with WinMO 6.1. If you are using one of Da_G's 6.5 kitchen where he's bighammered SYS/OEM then SLOT0 might be clean for you.

Have a look at your BUILD_LOG on your next ROM build; if SLOT0 reports 0 MODULES then you're likely fine. If there's modules in SLOT0, you may experience anomalies ... mine was ringtone after 20hrs-24hrs of constant on, you could experience something different.

Cheers,

So, where is this BUILD_LOG file? Does it only get created in 1.8.1 -- cause I'm still using 1.6.
 

krazy_about_technology

Retired Recognized Developer
Nov 3, 2008
2,214
66
Pune
Xiaomi 11T Pro
Hey da_g, in my platform rebuilder based kitchen, my memory map shows up like this :

Code:
SLOT  0:   0x02000000 - 0x01a30000 (END: 0x00060000, 32 MODULES)
           0x02000000 - 0x01fe0000 - ROM 0
           0x01fa0000 - 0x01e00000 - ROM 1
SLOT  1:   0x04000000 - 0x02020000 (END: 0x02020000, 295 MODULES)

RAM IMAGE: 0x8c100000 - 0x8c3b7d3c

RAM:       0x8c3b8000 - 0x8c45c000 - Used for kernel modules
           0x8c45c000 - 0x8fc00000 - 55 MB free

For a 64MB Ram device based of WM 6 nk.exe and xip with initvmmap.exe working, is this a good configuration? Or should i do something more to optimize it furthur? I use 8 MB page pool with this config, getting good performance with Wm 6.5 and having 20 MB free mem all the time.
I just want to know that whether there are other optimizations possible any further to my ROMs.
BTW, thanks a lot for starting this thread, i was waiting for so long for something like this. People flashing build upon build of Wm 6.5 without talking about background details was driving me crazy, with a c :D But now i can relax :)
 

Da_G

Inactive Senior RD / Moderator Emeritus
Aug 20, 2007
3,332
1,563
Riverside, CA
Samsung Galaxy S22 Ultra
@krazy_about_technology:

0x02000000 - 0x01a30000 (END: 0x00060000, 32 MODULES)

So some math in hex:

0x1a30000-0x60000 = 19D0000, convert that to decimal: 27066368 bytes, or 25MB :) Not too bad for such a low mem device, some OEM's cut this as low as 20. You might want to consider recmodding some modules as a trial, see how it works with nothing in SLOT 0 for a bit, if no improvement you can always go back :)
 

krazy_about_technology

Retired Recognized Developer
Nov 3, 2008
2,214
66
Pune
Xiaomi 11T Pro
Ok thanks for the tip buddy :) Appreciate that. One more n00b question, is there any implication of recmodding modules? Will it affect performance or amount of free RAM or Battery life in any way?
 

+ Que PPC

Inactive Recognized Developer
Mar 23, 2007
4,724
88
40
Guadalajara
es.youtube.com
I had mine!
As you remember im using the native 6.5 kernel in hermes

Memory Map...
SLOT 0: 0x02000000 - 0x01d70000 (END: 0x00060000, 0 MODULES)
0x02000000 - 0x01fe0000 - ROM 0
0x01fa0000 - 0x01d70000 - ROM 1
SLOT 1: 0x04000000 - 0x02022000 (END: 0x02020000, 216 MODULES)
SLOT 60: 0x7a000000 - 0x7a000000 (END: 0x78020000, 0 MODULES)
SLOT 61: 0x7c000000 - 0x7b200000 (END: 0x7a020000, 131 MODULES)
RAM IMAGE: 0x80000000 - 0x80281f88
RAM: 0x80282000 - 0x802f8000 - Used for kernel modules
0x802f8000 - 0x83a00000 - 55 MB free

But has this ****...
in 1.6 never happends!

platformrebuilder.exe Executed successfull!!!

done!!!
Wait some seconds...

Executing: kitchen_build_rom.bat.....
ERROR! (errorlevel: 1)

ERROR executing: kitchen_build_rom.bat

ERROR!!!
Wait some seconds...

No ''SVN'' folders present...

Restored Original config.txt...
Temp config.txt Deleted!!!

I change the PP changer to osnbtools cause the implantxip cant change the PP. change as follow:

Code:
echo.
..\TOOLS\osnbtool -ap xip.bin %pp%MB -y
..\TOOLS\implantxip -xip xip.bin -payload OS.nb.payload -imgstart %imgstart% -%uldr% -%nocert%
if not "%errorlevel%"=="0" goto error

I think i need to test again the implantxip default config... :(

Edited!
Noup neither the default kitchen_build_rom.bat works... sad... so sad! Think i must to talk with ervius and see whats wrong...
 
Last edited:

krazy_about_technology

Retired Recognized Developer
Nov 3, 2008
2,214
66
Pune
Xiaomi 11T Pro
Da_G, Please arrange for QVGA 96dpi files also, if possible, coz i dont think older files will work with this one, there are too many changes in the UI.

Guys i am also thinking about task manager, which one will work now with this build :confused:
 

drkfngthdragnlrd

Retired Recognized Developer
Mar 27, 2008
2,424
271
47
Palmdale, CA
www.facebook.com
Da_G, Please arrange for QVGA 96dpi files also, if possible, coz i dont think older files will work with this one, there are too many changes in the UI.

Guys i am also thinking about task manager, which one will work now with this build :confused:

You know, I was wondering about the Task Manager as well not to mention M2D/TF3D. The bar being bigger means the today screen is area smaller.
 

Da_G

Inactive Senior RD / Moderator Emeritus
Aug 20, 2007
3,332
1,563
Riverside, CA
Samsung Galaxy S22 Ultra
Resolution files are coming, just hang on, :)

You can see in my upper left screenshot, in the upper right hand corner where the time/task manager is, there's an overlap, just what you're talking about :)
 

krazy_about_technology

Retired Recognized Developer
Nov 3, 2008
2,214
66
Pune
Xiaomi 11T Pro
Resolution files are coming, just hang on, :)

You can see in my upper left screenshot, in the upper right hand corner where the time/task manager is, there's an overlap, just what you're talking about :)

Thank God (and to you my dear friend :) )! I thought its going to be VGA only from now :eek: You rock da_g, cant wait to see the changes running on my phone. BTW, are there any changes to the start menu also, or is just like 23016?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Post 2: Virtual Memory and Windows Mobile 6.5
    Post 3: Registry tips for Windows Mobile 6.5
    Post 4: Tutorial on language porting with Visual Kitchen
    (new!) Post 5: Description of all packages found in Rollup
    (new!) Post 6: Description of the different branches of WM development.
    ace10134's Post: Tutorial on porting a new build to "old style" kitchen
    + Que PPC's Post: Tutorial on porting a new build to Ervius Visual Kitchen
    indagroove's Post: Tutorial on porting xip.bin for Ervius Visual Kitchen
    rgb-rgb's .pdf: Tutorial on porting XIP/SYS to Da_G's Raphael Kitchen
    CRACING's: Placing an Custom Image in the About Dialog/Window

    WM 6.5.5 Build 23563 - All Langs, All DPI, All Resolutions

    Edit: If this download link is dead, then search this thread or the stickied build thread for the build number and mirror.

    Language Localization Packages

    0401 SAU Arabic المملكة العربية السعودية
    0403 ESP Catalan España
    0404 CHT Chinese Traditional 台灣
    0405 CSY Czech Česká republika
    0406 DAN Danish Danmark
    0407 DEU German Deutschland
    0408 ELL Greek Ellas
    0409 USA English United States
    040B FIN Finnish Suomen tasavalta
    040C FRA French République française
    040D HEB Hebrew מְדִינַת יִשְׂרָאֵל
    0410 ITA Italian Repubblica Italiana
    0411 JPN Japanese 日本
    0412 KOR Korean 한국
    0413 NLD Dutch Nederland
    0414 NOR Norwegian Bokmål
    0415 PLK Polish Polska
    0416 PTB Portuguese Brasil
    0419 RUS Russian Россия
    041D SVD Swedish Sverige
    0804 CHS Chinese Simplified 中华人民共和国
    0816 PTG Portugese Portugal
    0c0a ESN Spanish España

    images taken down to comply with DMCA notice

    This thread is dedicated to porting past/current devices to WM 6.5/Windows Phone and future versions, The latest release of XIP/SYS, issues that might come up when porting it to pre-WM6.5 devices, compatibility with "OEM" Packages, etc.

    This is intended as a followup to the thread Here, which contains a mountain of useful info, attachments, etc, but is getting very long in the tooth and is device-specific, whereas this thread will be used for all devices. (that one was anyway!)

    The Native Kernel Partition (XIP)

    This is generally Partition 2 in the Partition table (following ULDR, and preceeding OS). It is split up into 2 Major ROM Packages, and several possible Minor ROM Packages. OEMXIPKernel makes up the device-specific part of NK, and MSXIPKernel makes up the device-agnostic part of NK. When porting from your current WM version to 6.5, you want to keep OEMXIPKernel as is, and only change the MSXIPKernel files and modules. An important module to consider in OEMXIPKernel is nk.exe - this module is the Native Kernel for the device and handles Virtual Memory, which has changed for WM 6.5, and is discussed in the following post.

    You can check to see if you have a 6.5 Native Kernel by dumping xip.bin, and opening nk.exe/s000 in a hex editor. Search for the ASCII string "platform" - near this string should be the build number this nk.exe was compiled against. WM 6.5 builds began around 21100, and nk.exe compiled against them can take advantage of the new memory model discussed below. WM 6.1 and previous builds will be <=21058. nk.exe compiled against these builds will not be able to use the new memory model.

    The Operating System Partition (imgfs.bin)

    In your kitchen, you want to use the new /SYS from the same build that matches the MSXIPKernel if possible. Occasionally the builds do not match up, this is normal. The /OEM folder generally does not change, but when coming from WM 6.1, you will need to update your initflashfiles.dat with the new shortcuts and folders introduced in WM 6.5.
    3
    Virtual Memory in Windows Mobile 6.5 and how it differs from 6.1 and 6.0, important when porting to a device that does not have a WM 6.5 Native Kernel

    What is Virtual Memory?

    Virtual Memory as it applies to the Windows CE 5.2 Kernel

    There's a 32 bit address space available - a total of 4GB potential memory on WM. This total 4gb address space is split in half - 2gb to the Kernel, 2gb to the User. Kernel address space is only accessible by processes/threads with kernel level access, whereas user address space is accessible by all processes/threads. The user address space is from 0x00000000 to 0x7FFFFFFF, and the kernel address space is from 0x80000000 to 0xFFFFFFFF.

    The user address space is split into 64 slots of 32mb a piece. (64x32=2048, or 2gb) - The first 33 slots (slot 0 and 1-32) are used for processes, and the remaining slots for object store, memory mapped files, and resources.

    Each slot is easy to visualize in hex, you just increment a digit. Slot 0: 0x00000000 to 0x01FFFFFF, Slot 1: 0x02000000 to 0x03FFFFFF, Slot 2: 0x04000000 to 0x05FFFFFF, and so on. Each process gets assigned it's own slot, there are 33 total, minus the kernel process which is always running, so that's where you get the 32 process limit (which is always lower in practice, since there are always processes running in windows mobile to support the OS) - this is also the reason for a 32mb limit per process - you can see that's all the address space available in one slot.

    How does that all apply to our situation with modules? When you create a module, you are telling Windows Mobile that you want that module to be memory-mapped, so that each time it loads, it's loading to the same, known area of ram - saving space in slot 0 - this is done on the computer-side, during 'cooking' and is the job of wmreloc, g'reloc, bepe's Platform Rebuilder, etc. Virtual allocations are aligned to a 64KB border, so if you memory map a .dll that's only 3Kb large, it's still going to eat up 64KB of memory space.

    There are also pages that can be allocated to these slots, that are aligned to a 4KB boundry, and process/general allocations that take place during normal operation. The way the system handles this is that modules allocated on rom build-time (modules we allocate with g'reloc et. al.) are allocated from top-down (for slot 1 for example, starting at 0x03FFFFFF for the first module, taking up space to the nearest 64kb boundry, then the next module, in a line down to the 0x02000000 address, which is the beginning of the slot) - General allocations that take place during normal system operations are allocated in the remaining space, from the bottom-up (so again with slot 1 as an example, starting at 0x02000000 and ending at 0x03FFFFFF) - As you fill up these slots more and more with modules, that leaves less space for windows to dynamically allocate other, general allocations, which can, and does result in out of memory errors (even when the device has plenty of physical memory left, it cannot address this memory when virtual memory is full)

    Here's where the kicker comes in for the difference between 6.0/6.1/6.5 - There are a total of 4 slots that can be used for module allocation, slot 0, 1, 60, and 61. 63 is also available to modules that contain no code (resource only modules, like .mui's)

    WinMo 6 could allocate slot 0, 1 - (in order of 1 first, 0 last) for a total of 64mb of vm space for modules/files (and the running process is always mapped to slot 0, so once you encroach on this memory space, you are removing available memory to each application running) - you can see how tight this is.

    WinMo 6.1 improved on this by opening up slot 60 and 61 (now the allocation order is 61, 60, 1, 0) - but modules could not be allocated here, only files. So for our relocation tools, this was essentially no change. (still only slot 1, 0 for modules) WM 6.1 also introduces the process initvmmap.exe in the MSXIPKernel, NK partition (xip.bin). This process draws a map of all virtual memory, and uses the following registry key from the boot hive (boot.hv):

    Code:
    [HKEY_LOCAL_MACHINE\System\Loader\ModuleInfo]
    [HKEY_LOCAL_MACHINE\System\Loader\ModuleInfo\dllname.dll]
    "filename.exe"=dword:1
    "filename2.exe"=dword:1
    This tells the system that the module dllname.dll is only required when filename.exe is running, or filename2.exe is running - and whenever these processes are not running, the virtual memory space is available, and can be dynamically allocated to by the system.

    WinMo 6.5 improves on this by opening up Slots 60 and 61 to Modules - yielding an extra 64mb of potential Virtual Memory space. (the allocation order is now 1, 61, 60, 0 for modules, 60, 61, 0 for files) - In order for the Kernel to recognize these new Slots as being mappable for Modules, it must be updated to the 6.5 codebase. This is where the 6.5 nk.exe comes in, and why it's so important.

    Profiling Virtual Memory is an important job for an OEM - the less available in Slot 0, the sooner a device will kick back out of memory errors (even if it's not truly out of memory) - and the worse the user experience will be. Some ROM's I have seen have less than 20MB available in slot 0 (and the user experience is as bad as you might imagine) - There are many more intricacies to the whole process - like balancing the load between services.exe and device.exe to best utilize the 32mb VM space available to each, and storing all resource-only dlls as modules so they can be allocated to Slot 63, etc.

    This is also why it's important that the re-alloc tools be updated to support the new slots - g'reloc will not ever try to allocate modules to slot 60/61 because as far as it's aware, this is not possible. For the moment I know of 2 tools that will realloc to slot 60/61, wmreloc 2.0, and bepe's Platform Rebuilder (used by ervius vk)

    What's the take-home message about VM?

    Keep Slot 0 as free as possible. WM 6.5 NK allows you to use more modules without taking up SLOT 0 space, so allows more flexibility to use modules (which are faster to load)
    1
    Registry tips for WM 6.5

    * Start menu icons

    Sizes (for png icons):

    240x240 96 DPI 45x45
    240x320 96 DPI 45x45
    240x400 96 DPI 45x45
    320x320 128 DPI 60x60
    480x480 192 DPI 90x90
    480x640 192 DPI 90x90
    480x800 192 DPI 90x90
    480x854 192 DPI 90x90

    All icon entries go under the following key:

    Code:
    [HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start]

    Create a sub-key matching the folder name or shortcut name the icon will go with, for example:

    Code:
    [HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\Phone.lnk]
    [HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\Tools]
    [HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\Tools\QuickGPS.lnk]
    [HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\Google Maps.lnk]

    There are 4 possible values you can set under this key:

    MSFT said:
    Name REG_SZ Specifies the display name of the item. If the value is not specified, the file name will be displayed without the extension.
    Group REG_DWORD Specifies whether the item is a folder. The value can be set to TRUE or FALSE. Set the value to TRUE to indicate that the item is a folder. If the value is not specified, the system will determine the Group value by verifying whether the registry key has any subkeys.
    Icon REG_SZ Specifies the path and file name where the icon is located. The icon can consist of a PNG file or an embedded icon resource module. If this value is not specified, the default icon of the shell will be used.
    Rank REG_DWORD Specifies the rank of the item. An item that specifies a larger value for Rank will be displayed before items that specify a lower value. If this item is not specified, the Rank will be set to 0.

    To determine icon spacing, you'll need to examine the Rank value for existing icons, you can find the stock values in the following file: Base_Lang_xxxx\mxipinit_startmenu_001.provxml, where xxxx matches your Language ID code. A higher number = higher up in the chain, a lower number = lower down the chain. Any icons without a rank will be displayed at the bottom.

    * Restore hidden settings items

    Remove the "Redirect" value under the following keys:

    Code:
    [HKEY_LOCAL_MACHINE\ControlPanel\Owner]
    [HKEY_LOCAL_MACHINE\ControlPanel\Buttons]
    [HKEY_LOCAL_MACHINE\ControlPanel\Input]

    * Allow in call recording with the native dialer

    Code:
    [HKEY_LOCAL_MACHINE\System\AudioRecording]
    "Enabled"=dword:00000001
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Voice]
    "EnableCallRecordMenuItem"=dword:00000001
    "AllowInCallRecording"=dword:00000001

    * Disable built-in magnifier on double-tap

    Code:
    [HKEY_LOCAL_MACHINE\System\GWE\MAGNIFIER]
    "Enable"=dword:0

    * Override default Lock Screen notification launchers

    Code:
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LockScreen\Notifications\Email]
    "Application Command Line"="\Program Files\OEMApp\OEMApp.exe"
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LockScreen\Notifications\SMS]
    "Application Command Line"="\Program Files\OEMApp\OEMApp.exe"
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LockScreen\Notifications\Voicemail]
    "Application Command Line"="\Program Files\OEMApp\OEMApp.exe"
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LockScreen\Notifications\MissedCall]
    "Application Command Line"="\Program Files\OEMApp\OEMApp.exe"
    [HKEY_LOCAL_MACHINE\Software\Microsoft\Shell\LockScreen\Notifications\Contacts]
    "Application Command Line"="\Program Files\OEMApp\OEMApp.exe"