yashsingh1/xdaforums huggingface dataset:
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Whilst not strictly related to the Diamond ROM development, the ideas could be used to make custom ROMs...

I've been trying to crack open the Manilla files, and have got somewhere on customisation...

Because all of the manilla files (other than the few DLLs used as the today plugin) are extensionless files, I've had to look at all the files with a hex editor/notepad to get some idea of what they are.

There are some XML files, some Plain text config files, some "LuaQ" files (function unknown...), some files which have "GLES" in them a lot which I'm assuming are graphics handlers, and some *.qtc files (the graphics themselves...)

The files:

TTF (GPOS Header)

6582c9b1_manila

1e8c4d7d_manila
​

XML

​

GLES type files...

​

LuaQ files (and there is a Lua.dll file)

​

SQL File (contains the weather data)

2330fc3c_manila​

The music player config file (Plain text)

4cdb88a5_manila​

The other files all have the "QTC1" file header, and as such, I believe they are the graphics...

Editing the text:

Each of the XML files listed above is essentially just localization.

For example:

In the 74673833_manilla file, the Music Player text is stored

<?xml version="1.0" encoding="utf-16"?>
<xliff version="1.0" lang="zh-tw">
<file datatype="plaintext" original="musicsonglist">
<header />
<body>
<trans-unit id="IDS_MUSIC_ADDTOPLAYLIST">
<source>新增至播放清單</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_NOWPLAYING">
<source>現正播放</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_ARTISTS">
<source>演出者</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_ALBUMS">
<source>專輯</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_UP">
<source>上一層</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_MENU">
<source>功能表</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_ALLSONGS">
<source>所有歌曲</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_PURCHASED">
<source>已購買的</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_EDIT">
<source>編輯</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_INFO">
<source>資訊</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_DELETE">
<source>刪除</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_PLAYLISTS">
<source>播放清單</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_GENRES">
<source>內容類型</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_COMPOSERS">
<source>作曲者</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_DELETE_TITLE">
<source>確認</source>
</trans-unit>
<trans-unit id="IDS_MUSIC_DELETE_CONTENT">
<source>此標題將被刪除。 是否要繼續？</source>
</trans-unit>
</body>
</file>
</xliff>

This is clearly localised for Asia (it came from the HK ROM release), and can be identified by the "<xliff version="1.0" lang="zh-tw">" at the top. The "<trans-unit id="">" nodes contain the text of what is to be localised, and the ext there can be edited to suite the language.
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
To edit the music player layout, you need to edit 4cdb88a5_manilla.

This file is a plain text file (open it with notepad).

Audio textures

Controls.png

Shuffle-off = 0,0,0.09765625,0.07421875
(0,0) 25x19

Shuffle-on
(32,0) 25x19

Repeat-off
(64,0) 22x22 = 0.25,0,0.3359375,0.0859375

Repeat-on
(96,0) 22x22

Pause
(128,0) 20x23 = 0.5,0,0.578125,0.08984375

Play
(156,0) 19x28 = 0.609375,0.68359375,0.109375

Button-big
(0,36) 66x66 = 0,0.140625,0.2578125,0.3984375

Button-small
(76,36) 56x56 = 0.296875,0.140625,0.515625,0.359375

Time-line-indicator
(188,0) 11x11 = 0.734375,0,0.77734375,0.04296875

Previous(Next)
(208,0) 18x12 = 0.8125,0,0.8828125,0.046875

Album-shadow
(0,211) 256x42

Time-line-gray
(0,180) 256x20 = 0,0.703125,1,0.78125

Time-line-green
(0,156) 256x20 = 0,0.609375,1,0.6875

Each button (and the slider) have a configuration line.

The first section - the one in brackets - is the X/Y co-ordinates of the top left hand corner of manilla (they mark the position of the top left of the image as well) in the format (X,Y) with pixels being the measurement.

The second section - two digits seperated by "x" - is the size of the image used, with pixels as the default length. It is in the format XxY.

After the "=" I have no idea what it does, but I think it is to do with the image source. I shall look into that more closely when I have the time...
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Reserved this one...
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
And one last one for fun...
[Touch Diamond, MDA Compact IV ROM Development] tom_codon:
:) nice find bro
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Thanks! If anyone has a T-Mobile/other operator branded ROM for the Diamond, it may help working out what to change image wise...
[Touch Diamond, MDA Compact IV ROM Development] Quentin-:
While I haven't looked at any of this myself, based on your description I'm going to go out on a limb here and guess they are LUA script files. Check out www.lua.org for more info.
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Cool! I'll look into that!
[Touch Diamond, MDA Compact IV ROM Development] badaas:
i was gonna say LUA scripts ;)
[Touch Diamond, MDA Compact IV ROM Development] leomandelbrot:
how to translate?

Hi l3v5y!

I'm working in a italian translation of these xml, currently I have done this in all files by replacing the <source>所有歌曲</source> with a translated one...but I cannot get it work.

My Diamond has the locale full set to italian (os is now in italian but TF3D don't), has the parameter lang="zh-tw" changed to lang="it" and the registry locale=it under manila branch...

What I'm missing?????

thanks in advance!
[Touch Diamond, MDA Compact IV ROM Development] huanggx:
You shouldn't translate zh-TW files. you should find out all xml files that has lang id=en-US

and translate them into italian. BUT dont change the lang id.
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Translate the files, but don't change the language ID...
[Touch Diamond, MDA Compact IV ROM Development] herg62123:
good luck un getting manila working....i started to port this to other devices but the files are hard to work with.

it uses to many program formats that it makes you head spin.
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
At least this doesn't need resizing...

I'm hoping as soon as some operator ROMs come out it should get easier...
[Touch Diamond, MDA Compact IV ROM Development] mun_rus:
:)

The first custom manila in the world :)

Working on direct file editing. Need to understand more :)
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
Awesome!

Congrats, and I hope you can work out how to resize the images!

EDIT: Unless that's on QVGA...
[Touch Diamond, MDA Compact IV ROM Development] lennysh:
There was a Sprint Raphael ROM that was leaked not too long ago. Doesn't it have Manila also? That would be an English Localized version of Manila.
[Touch Diamond, MDA Compact IV ROM Development] mun_rus:
Yes it does. But It hasn't some lang support and other operator customization on home screen.

Now we can combine differ files to get new looking manila. And i hope thta in the nearest future we will edit directly manila files to create our own design :)

ps. now i've managed to delete sprint logo also :) but clock style isn't so interesting as original one
[Touch Diamond, MDA Compact IV ROM Development] l3v5y:
I have no idea how to rebuild the QTC files...

Any one working with HTC or an operator to create the graphics who wants to give us a hand? :p
[Touch Diamond, MDA Compact IV ROM Development] mun_rus:
it's decripted png files as i think :)
[Touch Diamond, MDA Compact IV ROM Development] CreativeBR:
That will be so nice. Good luck my friend you will be really D-MAN if you make it happen.

Imagine a TF3D tab running something like SecondToday? It will be a dream for almost all Diamond user.

{}s

CreativeBR
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
Ok, here's a little update for ones who's interested:

Here're further steps with manila coding [copy files then look at Internets tab]: custom tab background, custom button. When you press button, text field should change from "Testing" into "OK!". Button also changes it's state on press/release. That's all for now :D
[Touch Diamond, MDA Compact IV ROM Development] NisseDILLIGAF:
Nice! :D

Great work!
[Touch Diamond, MDA Compact IV ROM Development] Mandragore:
May not look like much now, but considering the effort to get this far.. Well done! :cool:
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
Ok, here're futher steps in making first custom manila application.

Features:

- Enter digits

- Delete digits

- Reset to zero (left softkey)

And here're problems arise (for calculator only, though) : manila's LUA works with 32bit fixed point signed values, giving us range about from -32767 to 32768 which is too few for calculator. :( Implementing virtual big-number classes is non-trivial task, so i guess i will work on something else from now on. But that was a nice first try, right? ;)

Have fun! :D
[Touch Diamond, MDA Compact IV ROM Development] tha_rami:
Oops. Doublepost, my apologies.
[Touch Diamond, MDA Compact IV ROM Development] tha_rami:
Wait, you fully decompiled and have full access to the Manila source?! How, and if you don't want to tell me so I can give the code a look (I swear I won't come out with a Manila app before you do), or do you have a spare copy of the code, or would you care to check whether you can find anything about the possibility of an elusive TV-Out function on the Diamond? For example, an Event that would check the TV-out cable being plugged in.

Good luck with an app, how about a page that lists your upcoming tasks with the ability to click them, or add a new one, seeing that's what people want?
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
No, not the manila platform code, but the tabs/UI code (pls read this thread to know what's on there). Of course it has nothing to do w/ TV-Out.
[Touch Diamond, MDA Compact IV ROM Development] Caspertje19:
@ D-MAN666:

to bad for the calculator....how about a tab with a timer/stopwatch function? Maybe the windows alarm setting can also be included in that tab to make it a little bit more complete. Now a day's, I really mis a timer function when making some food in my oven :D
[Touch Diamond, MDA Compact IV ROM Development] NisseDILLIGAF:
WoW!! this is really cool!

Great work D-MAN! :D
[Touch Diamond, MDA Compact IV ROM Development] holyfox:
How to change the font of TF3D?

I have made a cab ti change the font of diamond,it works great except in Tf3D, I don`t know how to make it work in tf3d~:(
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
Uh huh! Nice idea! Thanks ;)

Anyone can make gfx for it? ;)
[Touch Diamond, MDA Compact IV ROM Development] frysee:
Think I found the place to change font for TF3D/Home tab... Seems 17278358_manila.xml includes all the information needed:

<!--- Text Colours ---->
Style="LowLayer_ForeColor" => black
Style="LowLayer_Midcolour" => (?)
Style="LowLayer_Midcolour01" => (?)
Style="LowLayer_Midcolour02" => (?)
Style="LowLayer_Midcolour03" => (?)
Style="LowLayer_BackColor" => light grey

Style="TopLayer_ForeColor" => white
Style="TopLayer_Midcolour" => (?)
Style="TopLayer_Midcolour01" => very light grey (?)
Style="TopLayer_Midcolour02" => light grey
Style="TopLayer_Midcolour03" => grey
Style="TopLayer_BackColor" => dark grey ?)

<!--- Font Size ---->
Style="FontSizeA" => biggest example: weather tab, curret temperature
Style="FontSizeB" => even bigger
Style="FontSizeC" => bigger
Style="FontSizeD" => big
Style="FontSizeE" => mid
Style="FontSizeF" => small
Style="FontSizeG" => smaller
Style="FontSizeH" => smallest example: weather tab, Hi/Low Label

<!--- Font Style --->
Style="FontFace01 => seems to be normal text (speculation)
Style="FontFace02 => seems to be bold text (speculation)

I'll try to test some combinations when I arrive at home, maybe someone can confirm these things by messing around with them. So far I got a second Today tab just by inserting another "Group" to 26948339_manila, its fully accessible and integrated in the slide bar at the bottom - only the content of this page has to be edited.

greetz
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
In fact, font face/size/colors are hard-coded in mode9/luac files like this one in email.mode9:

<Object Type="GLESText" Offset="684h">
<Property Name="Horizontal Alignment" Type="Enum" Value="1" Offset="6b0h" Animated="False"/>
<Property Name="Instance Name" Type="String" Value="UnreadItemCountText" Offset="704h" Animated="False"/>
<Property Name="Position" Type="Vector3" X="-14" Y="2.5" Z="0" Offset="76ch" Animated="False"/>
<Property Name="Trimming" Type="Enum" Value="0" Offset="7b0h" Animated="False"/>
<Property Name="Vertical Alignment" Type="Enum" Value="4" Offset="7ech" Animated="False"/>
<Property Name="String" Type="String" Value="99" Offset="83ch" Animated="False"/>
<Property Name="Font Path" Type="Filepath" Value=".\Assets\Fonts\Helvetica Neue LT Pro 1\neue helvetica 55 roman.ttf" Offset="878h" Animated="False"/>
<Property Name="Font Size" Type="Integer" Value="20" Offset="938h" Animated="False"/>
<Property Name="Size" Type="Size" Width="60" Height="36" Offset="974h" Animated="False"/>
</Object>
[Touch Diamond, MDA Compact IV ROM Development] frysee:
Is there any Information about the content of _manila files (what it stands for)? I know we have Manila Research, but it isnt very helpful so far...

greetz
[Touch Diamond, MDA Compact IV ROM Development] sushilange:
Try second tool on the page: http://www.mirabyte.com/en/products/windows_mobile.html. It is from me and my company! ;)
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
Bad news, guys :(

So far, i haven't found any API to access current system time's milliseconds or even seconds. Only minutes, hours, etc. - whose are used in home tab.

I'll have to switch something else again :(

PS But I have some progress in 3D animations and stuff ;)
[Touch Diamond, MDA Compact IV ROM Development] Riel:
Any ideas of getting 'custom' functionality like the Orange 'movable' clock?

Several 'movable' indicators would be cool.

In fact, when different icons can be put on there, maybe manila home could be acting like some sort of desktop.
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
All right! First success! Manila Calendar v.0.1. :D

To-do:

- Current date/month auto-update

- Locale

- Moving between months (with flick also)

- Highlighting weekends

- Settings: first day of week, etc.

- Fancy animation effects ;)

Have fun! :D

Sorry, i have no idea how it looks like :)
[Touch Diamond, MDA Compact IV ROM Development] darkenergy:
gonna test it now awesome!

i moved the files into /windows with the commander explorer and overwrite but it doesnt show up?

also diamond tf3d 0.6.7 doesnt list it as a tab so i dont know what todo
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
it replaces Internets tab :)
[Touch Diamond, MDA Compact IV ROM Development] Ximoon:
Much better than a "hello world !", now, you can do anything ;)
[Touch Diamond, MDA Compact IV ROM Development] Riel:
I guess I can rename it to let it replace music or contacts-tab..?

I don't use them, and do use internet:)
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
No you can't coz internal library name is hardcoded.

But i will make it separate tab soon. :)
[Touch Diamond, MDA Compact IV ROM Development] darkenergy:
is it possible to merge sms & email tab into one tab called message ?

then use the email tab for calender ?

and can the animation transitions from other menus be used to make custom menus ? (example the foto animations when u swipe ur finger up and down used for music albums etc )
[Touch Diamond, MDA Compact IV ROM Development] boinger66:
wow very nice

would be great if you could make one for tasks as well ! =)
[Touch Diamond, MDA Compact IV ROM Development] kapitanogor:
Hello World;)

jeppp that's veery cool

Maybe you can say something about what you found out so we can maybe help or somethig :)
[Touch Diamond, MDA Compact IV ROM Development] GriFolle:
OK...Let's combine these two concepts and I think Manila will be pretty perfect:

-JUST ONE TAB FOR SMS/EMAIL

-JUST ONE TAB FOR PHOTOS AND MUSIC

-ONE OF THESE FREE TABS COULD BE USED FOR SECOND TODAY (that be able to install plugins)

-ANOTHER ONE FOR ANYTHING IS NEED!!!
[Touch Diamond, MDA Compact IV ROM Development] CreativeBR:
Its the first warp speed on TF3D... Very nice D-Man !!!

Who knows you will be the first one to make manila a domestic beast

8))

{}s

CreativeBR
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
For now - you can help me decompile LUA bytecode, so we can mod any part of Manila freely. It's not that hard, but it's kinda monotonous and annoying :)

Requirements: basic programming knowledge, basic assembly language knowledge
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
1. Manila can have unlimited tabs, so it's kinda strange to count "free" tabs :)

2. Forget about running external code (such as plugins) in Manila :P
[Touch Diamond, MDA Compact IV ROM Development] rvdgeer:
1. Wow! Sounds great!

2. Are you sure? :( (I know you are, but I'm asking anyway!) I was actually hoping for someone (You ;)) to hack Manila for external plugins...

:(
[Touch Diamond, MDA Compact IV ROM Development] seatone:
I would be really happy with just a bloody additional tab that shows the today agenda.

This is the only think what I miss from manila, to see my appointments for at least 5 days in advance....

Come on, D_MAN666 make me happy, I have all my trust in you :)))
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
All right. As some folks are willing to help me out with decompiling LUA code, i'm posting the package here.

What's there:

- All .luac files, i've not decompiled yet

- LUA Tools: lua compiler, lua VM and lua disassembler

-LUA asm/bytecode documentation

The aim:

write .lua code, that then compiled with "-s" option

is binary identical (i'm using HexCmp) to the corresponding .luac (compiled) file

How to:

First, dissasemble the .luac file with chunkspy dissasembler

Second, create blank .lua file in your favourite text editor, then start typing down LUA code, looking into disassembly :)

That's it :)
[Touch Diamond, MDA Compact IV ROM Development] Riel:
We don't need much more than showing coming appointments and tasks.

A nice tab would be awesome.

And what about editing the home-tab on showing more appointments?
[Touch Diamond, MDA Compact IV ROM Development] BIGJos:
.luac research list?

So all the .luac-files in the ZIP are not yet decompiled? Maybe we should start a .luac-Research-List within Diamond Wiki like some guys did for Manila-Files.

'Cause if several people now start with helping decompiling .luac-Files, they will for sure decompile same files twice. Know what I mean?

If that makes sense, I could start helping here as soon as I return from work this afternoon...
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
Edit:

Yeah, nice idea :) But we need to keep in mind, that this files are from 1.93 Standard Manila, i.e. divide files into manila versions/operators

PS Please don't hesitate to ask questions about LUA assembly :)
[Touch Diamond, MDA Compact IV ROM Development] kapitanogor:
manila ver

Yeep that is good idea so we will work now on standard manila 1.93 thanks for the information "how to" I will try to send you some work befor weekend.
[Touch Diamond, MDA Compact IV ROM Development] darkenergy:
i have an idea

on the main screen u see the clock in a big way, if u swipe ur finger up it changes to small clock en shows some today lines for missed calls and agenda.

say the big clock is the main area, my idea is that u can scroll some other smaller today tabs ( like missed calls , agenda),... into the area of the big clock and those tabs would be enlarged.

for example

your on the default manilla today home screen

you scroll the missed calls tabs up to the place where the big clock is

now the missed calls tab expands , filling the place where the big clock was

showing you a overview of the last X missed calls

tap on it and it goes to call history main screen

same for calender and any other tab

i got this idea when i notices in the begining how the clock changes size when u swipe ur finger up on the home screen of manilla

dunno if its possible at all to do so, but im just brainstorming here
[Touch Diamond, MDA Compact IV ROM Development] darkenergy:
ok il look into all that later and play around with it

dont have any lua expierence, but it doesnt look hard tough
[Touch Diamond, MDA Compact IV ROM Development] darkenergy:
another idea

when flipping through pictures it basically shows you the thumbnail and when pressed it launches the picture viewer

would it be possible to re-direct the commands to open picture thumbnails in stead of album cover thumbnails

then when pressed lauch media player

if possible we have a almost coverflow like music player like iphone
[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
I've posted a separate thread for calendar here:

http://xdaforums.com/showthread.php?t=423647
[Touch Diamond, MDA Compact IV ROM Development] diggy128:
You're the man!!

Awesome work.

Calendar works flawlessly so far (1.73 official Rom).

I would ask a simple thing though:

How about adding more programs in the programs tab?

Adding an additional Icon holder is as simple as adding a key in the registry under

HLM/software/htc/Manila/ProgramLauncher following 17 (0-17 go to existing program holders)

Good news to start with are:

1) Copy-pasting eg key 17 and renaming to 18, gives you a new nicely put holder in programs tab

2) The holder has a + sign to assign a program to (using all programs as done with the previous ones)

3) The program path selected here is successfully passed back to the corresponding registry value

THE PROBLEM IS: Even after selecting a program and even though the change is reflected in the registry, the icon doesn't appear and the button doesn't launch the program (just gets you to assign program again)...

As it seems almost all of the functionality is there, I believe it would be great AND easier to have more program tiles in the grid (to satisfy all those manila funs' lust).