yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] hallatore:
Yes it is. But 4.lua in home.mode9 does this:

require("common")
require("digitalclock")
ClockHelper = DigitalClockHelperClass(machineStatus, DataBindingEnabled)
ClockHelper.OnTimeChanged = {Function = machineStatus_OnAlarmChanged}
ClockHelper:HandleTimeChanged()

But it might be available even if i remove the require() function?

Phone is done flashing, will start to test more now :)
[Windows Mobile Development and Hacking General] hallatore:
Is't there a app that let you see the phone on your pc?

If you'd have that, and a way to send your files to the windows directory. it will be quite fast to test :)

And ofcourse, a manila-crasher (restart) to reload files. :D
[Windows Mobile Development and Hacking General] 12aon:
how about this http://xdaforums.com/showpost.php?p=2937166&postcount=1183 or this http://xdaforums.com/showpost.php?p=3299754&postcount=1812, 12
[Windows Mobile Development and Hacking General] sztupy:
you can use activesync enabled programs (like totalcommander with wince plugin) to see the phone, but replacing files in the Windows directory is not allowed (there might be some security settings that will allow this but I don't know which)
[Windows Mobile Development and Hacking General] hallatore:
They use the exact same vertical size. You can see that the appointmentlist is at the same place.
[Windows Mobile Development and Hacking General] sztupy:
but isn't that a problem with the appointmentlist?
[Windows Mobile Development and Hacking General] hallatore:
1.lua (home.mode9) contains something called a multiGroup

This again contains:

Group1Animation = SingleGroup:new()
l_8_0.Group2Animation = SingleGroup:new()
l_8_0.GroupAppointment0 = SingleGroup:new()
l_8_0.GroupAppointment1 = SingleGroup:new()
l_8_0.GroupAppointment2 = SingleGroup:new()
l_8_0.GroupAppointment3 = SingleGroup:new()
l_8_0.GroupAppointment4 = SingleGroup:new()
l_8_0.GroupNoAppointmentsAnimation = SingleGroup:new()
l_8_0.GroupClockTabs = SingleGroup:new()

I'm not sure how, but it seems the lua is listing the objects much like a StackPanel does in other apps.

then you have the

GetItemY = function(l_10_0, l_10_1)
if l_10_1 == 9 then
return 232 + (l_10_0.CurrentItem - 1) * 500
elseif l_10_1 == 1 then
return l_10_1 * -70 + 115 + (l_10_0.CurrentItem - 1) * 164
elseif l_10_1 == 2 then
return l_10_1 * -70 + 115 + (l_10_0.CurrentItem - 1) * 164
elseif l_10_1 == 6 then
return -100 + (l_10_0.CurrentItem - 1) * 164
else
return l_10_1 * -80 + 140 + (l_10_0.CurrentItem - 1) * 164
end
end,

The first return is for the clock, the rest i'm not 100% sure of.

It's the lua script that sets where the appointmentlist's Y is at.

I just don't know where it does that yet.
[Windows Mobile Development and Hacking General] sztupy:
InitializeFullAnimation ?
[Windows Mobile Development and Hacking General] hallatore:
Maybe. But that function is a mess, hard to get a overview :p

So far it looks like this. The digitalClock.lua is removed for debugging at the moment.
[Windows Mobile Development and Hacking General] hallatore:
Woho, found it! :D

It was in the InitializeFullAnimation function.

It acts as a StackPanel, and around line 236 this statement can be found

As you can see it was a small value and not a big one, no wonder I had problems finding it :p I set it to 100 as my 3Dclock is 50 pixels smaller than the original.

The l_15_12 = 50 sets the Y if the big clock is displayed, and l_15_12 = NotificationShiftY for the small clock.

This value is then used like this in the next 100 lines.

Thanks alot for the help so far! :)

PS: I belive this is the first every todayscreen with a custom height on the 3D clock. :D
[Windows Mobile Development and Hacking General] 12aon:
Ok hombre since you are doing so great I have a question for you: I have made a new landscape theme (here). In this landscape mode, newest one most closely resembles HTC theme, I'm trying to import a working clock like this (see below) into the landscape mode9, on which most of this theme is based. But I can't figure out how the get the ciphers on the clock (hour, minute an pref AM/PM) to change according to the time, or get them to change at all for that matter. Maybe you with your developmental background are capable of seeing through this all. Nice work, hope to see more of those mods around, 12

​
[Windows Mobile Development and Hacking General] sztupy:
just checked. The worldclock's clocks are modified in the component/graphicclock.lua script
[Windows Mobile Development and Hacking General] hallatore:
Check home.mode9, 4.lua

It "attaches" the digitalclock.lua script that controls the time of the 3D clock (note my earlier screenshots i had time at 00:00 since I removed this link).

Copy the content of digitalclock.lua into your embedded 4.lua in your landscape mode9.

Then edit all the properties so they have unique names.

Example at line 383:

tab1.Tab = LTabTop

=

tab1.Tab = LTabTopL

But I think this is quite a job to get right :eek:
[Windows Mobile Development and Hacking General] sztupy:
Okay. So. here are the relevant entries in the mode9 files:

<Object Type="GLESSprite2D">
<Property Name="UV" X="0.0" Y="0.0" Width="0.056640625" Height="0.75" />
<Property Name="Instance Name" Value="SprHourDigit1" />
<Property Name="Position" X="317.0" Y="-17.0" Z="0.0" />
<Property Name="Texture Path" Value=".\Assets\Images\WorldClock\012_black.qtc" />
<Property Name="Size" Width="29.0" Height="48.0" />
</Object>

and the other ones of course. They refer to "SprHourDigit1"

searching for this I found in clockview lua:

l_12_0.GcClock = GraphicClock(...SprHourDigit1...)

And a search for graphicclock brought me to graphicclock.lua, where there are functions like "GraphicClock.__init" or "GraphicClock.Update" The GraphicClock is name GcClock in clockview.lua, with this update script:

WorldClock.Clock.LvCityListItem.OnTimeChanged = function(l_16_0)
l_16_0.GcClock.Time = Time_GetNow()
l_16_0.GcClock.Time:ToSpecificLocalTime(l_16_0.Data.TimeZone)
if l_16_0.Data.IsLocalTime then
l_16_0.TxtDescription.String = l_16_0.GcClock.Time:GetDateString("MMM d") .. " (" .. Locale:GetString("IDS_LOCAL") .. ")"
else
if l_16_0.GcClock.Time:IsYesterday() then
l_16_0.TxtDescription.String = Locale:GetString("IDS_YESTERDAY")
else
if l_16_0.GcClock.Time:IsToday() then
l_16_0.TxtDescription.String = Locale:GetString("IDS_TODAY")
else
l_16_0.TxtDescription.String = Locale:GetString("IDS_TOMORROW")
end
end
end
l_16_0.GcClock:Update()
end

And of course you have to register the ontimechanged event:

FrmClockView.MachineStatus.CurrentTime.OnValueChanged:connect(l_7_3.OnTimeChanged, l_7_3)
[Windows Mobile Development and Hacking General] hallatore:
I see there's alot of trace() function calls in the lua script.

Would it make the manila faster if we comment out the trace function in the lua files?
[Windows Mobile Development and Hacking General] roland_data:
Issue with manila kitchen tools

Hey guys,

for one week now i am enjoying life with this new great mobile HTC Touch HD.

And i am really excited about that community and the progress you are making in customizing manila.

Absolutely cool!

So, i would also like to play around with this possibilitites...

Just downloaded the manila kitchen tools 1.5

2 Problems:

Decompiling any lua file within m9editor resulted the first time in an exception, telling me, the Win32Process could not be started because file is not existent

Then every following time (decompile and save source) crashes the app. It simply dissappears from screen. Process is gone... :confused:

Noteworthy: Decompiling "by hand" using command line tool luadec.exe works with every one of the used files...

Next thing:

When starting "IDE.exe", nothing happens. Harddisk is working some 20 sec. Mouse cursor shows hourglass... but then... Nothing.

Already "repaired" MS VC 2008 redist and .Net 3.5 runtime.

Did not help.

Am i doing anything wrong?

Are there some known issues?

By the way:

Great work sztupy! This tool suite rocks! Results within this forum posts are amazing.
[Windows Mobile Development and Hacking General] avimak:
How did it go?...
[Windows Mobile Development and Hacking General] 6Fg8:
m9editor currently will not work with luadec v2, i'm already working on an update.
[Windows Mobile Development and Hacking General] roland_data:
Well, what version should i use then?

I simply downloaded the whole package from http://winmo.sztupy.hu/index.html

I would expect that package to be constructed out of parts that will work with each other...

BTW:

Clicking on "convert to ANSI" leads to following exception:

System.UnauthorizedAccessException: Der Zugriff auf den Pfad "C:\Dokumente und Einstellungen\Roland\Lokale Einstellungen\Temp\temp.luaU" wurde verweigert.

bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, ...

sorry for german:

Meaning is: Access to path ... was denied.
[Windows Mobile Development and Hacking General] sztupy:
yes it will. Although not that much worth it imho.
[Windows Mobile Development and Hacking General] sztupy:
you should be grateful that some people create stuff instead of just complaining without knowing anything about them. LuaDec 2.0 was made after m9edit, and they were made by different persons. BTW. m9edit works fine with the binary mode9 files, and that's what it's configured to do in the kitchen.
[Windows Mobile Development and Hacking General] roland_data:
Sorry guys,

i really didn't want to complain.

I am grateful, as i already wrote. And thanks also to you, 6Fg8.

I just wanted to explain, what tools i used. And I tried to explain that i did not combine the tools by myself, but instead just downloaded and started them.

Thought i was still doing somethin wrong...

Well ok, m9edit does not work with luadec 2.0. So It's supposed to behave that way, right? So the workaround may be to decompile all the lua scripts by command line, right? (Maybe using a batch file...) Will try it.

And what about that "IDE.exe"?

Filename sounds like an IDE for manila development... Great!

But nothing happens when starting it here...

Any way to debug it? Any logs? Maybe debugging/logging through .NET mechanisms?
[Windows Mobile Development and Hacking General] sztupy:
If you use rhodium or rhodium2 manila the scripts are already decompiled. If you're using something else you have to decompile by yourselves, but that's not an easy task (you should read http://msdn.winmo.sztupy.hu/manilasdk/show/Lua_Decompiling before you start for example).

IDE is a rubyw / wxruby based application so no .NET debugger will work on it. You can run it using "IDE.exe > log" to get some output (having an "stdout" might even make the application work), it might help. It should work under Vista and Win7 (tested), and should work on XP too (but it's untested)

In it's current state use m9editor in the kitchen for editing binary mode9 files. If you want to edit embedded scripts they are already decompiled (if using the proper tools), and mode9converter will compile them back to the binary version.
[Windows Mobile Development and Hacking General] roland_data:
thanks, that was quite informative...

so... i already decompiled all of the scripts through batch file

obviously not without errors (as described in the tutorial). Comparing decompilation with "compare.exe" leads to error "No such file or directory - luadisasm ...". Is this also related to LuaDec version?

But already quite interesting to see how these scripts work...

Well, could you tell me in short how to determine, which manila i am using?

It is still the one which was installed from my german provider... A bit customized with the three additional tabs... (calendar, call history, etc.)

but... maybe this is already a topic which belongs in a new thread, right?

Concerning IDE.exe: stdout did not produce anything and didn't make it work. Do i need to install any ruby runtime? Which version?
[Windows Mobile Development and Hacking General] avimak:
just another idea for the next versions - can you make an option to search inside the "manila name" bar? it will save a lot of time for people that searching specific language files Etc... :)
[Windows Mobile Development and Hacking General] hallatore:
Visual Studio has a creat function to search files, can that be of any help?
[Windows Mobile Development and Hacking General] sztupy:
hmm... compare should be using luadec 2.0's disassembler, but it seems i've kept an older version. Simpyl replace compare with the one provided with the luadec2.0 pakcage.

There is no such thing as a "ruby runtime", because it's not a compiled stuff, it's simply an interpreted script language. The interpreter and everything it needs to work is already included in the EXE file. If it does not work, then it does not work, it's a beta stuff anyway. Feel free to use any editor out there that has lua and xml support (I actually use gVIM, but notepad++, scite, E, emacs, and others are fine too)

There are already a lot of topics involving manila development:

m9editor and anything involved mode9 editing is here

command line mode9 tools are here

luadec and everything involving lua editing is this topic

Manila kitchen, and kitchen development is this topic

There is also a topic involving QTC files, but I don't have it on my subscription list and don't want to search :)
[Windows Mobile Development and Hacking General] sztupy:
I actually use alt+f7 in total commander to search inside multiple files.
[Windows Mobile Development and Hacking General] hallatore:
A snippets I made last night.

It enables the appointment list on the Home.mode9 to display all appointments, and not only the ones for today and tomorrow.

I've already implemented it in my compact homescreen for the rhodium manila.

Feel free to use it as you like :)

In home.mode9's 1.lua file, replace these two functions

GetAppointTimeString = function(l_18_0, l_18_1, l_18_2, l_18_3)
if l_18_0.IsValid then
local l_18_4 = ""

if l_18_2 == APPOINTMENT_DAY_Today then
l_18_4 = l_18_4
elseif l_18_2 == APPOINTMENT_DAY_Tomorrow then
l_18_4 = l_18_4 .. Locale:GetString("IDS_TOMORROW") .. ": "
else
l_18_4 = l_18_4 .. "(" .. l_18_0:GetDateString("dd.MM") .. ") "
end

if l_18_3 == VALID_RANGE_AllDay then
l_18_4 = l_18_4 .. Locale:GetString("IDS_ALLDAY")
elseif l_18_3 == VALID_RANGE_Today_Today then
l_18_4 = l_18_4 .. l_18_0:GetTimeString(TimeFormatOptions_Default) .. " - " .. l_18_1:GetTimeString(TimeFormatOptions_Default)
elseif l_18_3 == VALID_RANGE_MultiDay_Today then
l_18_4 = l_18_4 .. Locale:GetString("IDS_MULTIDAY") .. " - " .. l_18_1:GetTimeString(TimeFormatOptions_Default)
elseif l_18_3 == VALID_RANGE_Today_MultiDay then
l_18_4 = l_18_4 .. l_18_0:GetTimeString(TimeFormatOptions_Default) .. " - " .. Locale:GetString("IDS_MULTIDAY")
elseif l_18_3 == VALID_RANGE_MultiDay then
l_18_4 = l_18_4 .. Locale:GetString("IDS_MULTIDAY")
end
return l_18_4
else
return ""
end
end

DelayToLoadAppointment = function()
if DelayLoadingTimer then
DelayLoadingTimer:Stop()
DelayLoadingTimer = nil
end
_appointmentInstance = PoomAppointments(APPOINTMENT_TAB_Calendar)
_appointmentInstance:GetDisplayAppointments()
local l_21_0 = _appointmentInstance.AppCount
trace("appointment_count = " .. tostring(l_21_0))
local l_21_1 = _appointmentInstance.AllAppointment
l_21_1:First()

-- Limit the amount of appointments
local test = l_21_0
local testMax = l_21_0 - 5

for i = 0, l_21_0 - 1 do
if l_21_1:Next() == true then

local checkTest = test - i
if testMax < checkTest then

local aptime = Notifications3D.Namespace:FindName("Appointment" .. tostring(i) .. "_Time")
local apsubj = Notifications3D.Namespace:FindName("Appointment" .. tostring(i) .. "_Subject")
local value = l_21_1:GetValue()
aptime.String = GetAppointTimeString(value.stStart, value.stEnd, value.day, value.range)
trace("appointment_time = " .. aptime.String)
apsubj.String = GetAppointSubjectString(value.Subject, value.Location)
trace("appointment_subject = " .. apsubj.String)
TimeTable[i] = value.stStart
end
end
end
local x = MultiGroup:Initialize(MissedCall, Voicemail, Appointment0, Appointment1, Appointment2, Appointment3, Appointment4, NoAppointments, clock_tabs)
MultiGroup:InitializeFullAnimation(nil, machineStatus.VoicemailUnread.Value ~= 0, l_21_0, nil, x)
end

Picture of the new appointment list.
[Windows Mobile Development and Hacking General] avimak:
Looks great, do you have a way to unlock the limit of the 3 appointments? I have Touch HD and there is a space now for 6 without scrolling up!
[Windows Mobile Development and Hacking General] hallatore:
The limit is set in the 1.lua file.

The max amount of appointments is 5.
[Windows Mobile Development and Hacking General] avimak:
and it's changeable?

because as i said, there is a place for 6 before the scrolling up, and for 8 after the scrolling!
[Windows Mobile Development and Hacking General] hallatore:
It's easy to make a manila that gives you 5 appointments even with the 3d clock up.

But it's a different story to add more than 5 appointments :p
[Windows Mobile Development and Hacking General] avimak:
ok :)

so please make a cab for the touch HD users (5 appointment with the 3d clock up) :)
[Windows Mobile Development and Hacking General] hallatore:
You mean a modification of my current Compact Homescreen.cab?

Sure, can make it when i get home today. Sadly that's in 10 hours..
[Windows Mobile Development and Hacking General] smotrs:
What file are the stock quotes and tickers stored in? I'm messing with the Stock TAB, decompiling the LUA files (from HD) but not seeing where the information is stored.

Also, would someone mind posting the file from their mobile so I can see how it interacts with what I have so far? I'm thinking it's something similar to the weather DB file,

\Application Data\HTC\databases\forecast_cache.db
[Windows Mobile Development and Hacking General] 12aon:
Weathertab down, so only stocks and calendar to go huh;) (oh yeah and the entire landscape of course :D)
[Windows Mobile Development and Hacking General] sztupy:
In manila.exe it seems to reference a file called "\Application Data\HTC\ygo\ygoservice.db"
[Windows Mobile Development and Hacking General] smotrs:
Yeah, pretty much. :) I don't have a 21000 build phone, so I can't play with the Rhodium files without flashing a new ROM. Using the gwes.exe and .mui files from the newer build phone just forced a hard reset down my throat. :(

Oh well, eventually I'll get to play with the rhodium files if I can upgrade my build I'd rather not upgrade my ROM just yet without being able to back it up so I can revert back if need be. :)
[Windows Mobile Development and Hacking General] 6Fg8:
maybe a bit offtopic, but wouldnt it be great to have TF3D running in an emulator? I gave that a try a few weeks ago, but no luck. Searching the net brings the same questions but no answers. Maybe you guys have ideas?
[Windows Mobile Development and Hacking General] sztupy:
for me the worst part was finding a 21000+ ROM that can be modified by me, but couldn't find any (and the cookers weren't generous enough to send me the sources even knowing their ROM includes stuff from me).

Nevertheless I made a ROM decompiler to solve my problems. :D No more shy rom cooker can get in my way anymore.
[Windows Mobile Development and Hacking General] sztupy:
TF3D needs a lot of space and memory and patching the emulator ROM to include more space+opengl+new gwes is not that easy. Actually I don't understand why the emulator has so little storage space even for the WVGA part... I actually think that the first series of manilas (diamond/tp) would work in an increased storage space'd emulator with a software based opengl driver.

Or someone could leak the manila test suite that is used by HTC :) Lot's of thing shows in the lua files that they have a TF3D engine that runs on PC, and they actually do the programming on that. Mode9designer might be a replacement for this someday, but until that a leak would be great ;)
[Windows Mobile Development and Hacking General] 12aon:
You run it on WM emulator right? Or isn't this what you mean

When its recompiled you'll have all the separate packages? I don't understand yet what this will get me. I have a program to open the .NBH file. But I don't much about cooking, I'm just trying to understand, 12
[Windows Mobile Development and Hacking General] 6Fg8:
Yes, exactly that. The idea was to put the whole thing into WM emulator and test changes on mode9, luas etc. there. But i ended where sztupy already wrote, not enough space to hold all necessary components. And possibly not enough patience :)
[Windows Mobile Development and Hacking General] sztupy:
an nbh file contains an nb file that has multiple partitions. One of the partition is the "imgfs.bin" (the other one is of interest is "xip.bin", but there are others as well). Inside that file are actually almost all files that make up the ROM (except for a few main system files that are in xip.bin). These files are there as if they would be in one large directory (actually WinMo handles them as they would be in the \Windows directory), and there are dsm, provxml, rgu and initflashfiles.txt files that will tell the mobile (and the rom extractor utilities) which file belongs to which package/directory/registry entry.

If someone uses the "all packages to one" feature when cooking the ROM, all of these files will be deleted (so no dsm and rgu files will be present in the file dump). This means that the ROM can't be reconstructed later on to packages, and lot of rom cookers think that this way their ROM and "research" would be hidden from "noobs". (actually mostly they say that it increases speed to use this function, which is true, but real ROM cookers then provide their files as a separate kitchen for poor people to understand ROM cooking and modifying)

Actually I detest when someone doesn't allow others to peek at their findings. This is a community after all, and if we share knowledge we can get closer to the best/optimal/etc experience we're looking for. (and not telling me even after asking nicely is something I really hate). Not that I cared If you can't get what you want then solve it another way :D
[Windows Mobile Development and Hacking General] sztupy:
Yes, there aren't enough tools and knowledge for the WM emulators. I don't think it's something that had to do, but the major people who make ROM tools doesn't really care about the WM emulator (for example there is only one tool I know of that can separate partitions from a WM emulator ROM, but from the latest version of that application this feature was taken away. And finding an older version of something is always harder than downloading the "latest and finest")

Someone made an emulator kitchen here at XDA, but I didn't look at it more closely. Maybe it's worth a try checking it.

EDIT: its here
[Windows Mobile Development and Hacking General] 6Fg8:
Ah interesting. So i've to learn cooking again (not that i cant already, but usually what i cook ends on a table surrounded by a couple of hungry people :D)
[Windows Mobile Development and Hacking General] 12aon:
Yes I am having the same thing thrown at me the last couple of weeks, how life would be a lot easier and independent if I knew how to cook ROMs. But I think cooking for hungry people (just one other) will still give me more satisfaction:), 12
[Windows Mobile Development and Hacking General] xboxmod:
Hi

I have already cook a rom for emulator,

but i can't add package due to memory restriction.(i suppose)

I have manualy set ram size and install cab.

i have already start old manila on it but i use old "vincent 3d drivers"

and manila look like if i use cfc files on non cfc manila.

if you have an idea of what driver use? (i have not try cfc manila because not yet released when i try this!)

maybe we can use it.

hope you understand sorry for my poor english.

i'm going to try rhodium manila on emulator and told you result.
[Windows Mobile Development and Hacking General] smotrs:
It was clear enough that I understood what you were talking about, so I'm sure the others do. :)

By the way, excellent job on the Rhodium port. :)