[APP][DISCONTINUED] TF3D manila mode9 editor

Search This thread

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
6Fg8 proudly presents:
m9editor
development discontinued


m9editor is your little helper when it comes to editing manila files. It lets you edit nearly all aspects of a mode9 file. Additionally it will assist you with graphics, allowing import, export and CFC compression. And It includes a directory viewer with information specific to manila files.

requirements:
m9editor is written in .net, so .netCF3.5 (currently SP1) must be installed (usually its already there). It has been developed and tested using Windows XP x64, but should run on any Windows platform.

usage:
see the manual contained in the download package (PDF)

making of / credits:
thanks to: D-MAN666, sztupy, nixx-X1, Chainfire, pcarvalho, showaco, guap, 12aon, xboxmod, NisseDILLIGAF, smotrs, for contributing knowledge, ideas, testing. Thank you guys (& gals of course) !

version history:
2009-03-10 - v3.3.0.1
BUGFIX: crashed when using selections
2009-03-09 - v3.3.0.0
- LuaConv is now included in the m9editor download package
- CHG: all sourcecode related functions use ".lua" as default extension
- NEW: compile and import function for lua script sourcefiles:

for mode9 files (embedded scripts):
m9editor remembers the filename of the source on a per-node basis and lets you subsequently edit the recently used file from the particular node. You may also attach/detach such a link manually. If a link is established, you may edit the sourcefile (check if you set the "SourceCodeViewer" option in m9editor.cfg) and recompile/import in a single step. When saving the mode9 file the links are saved too (mode9file.ann) and reloaded on next open.

for standalone scripts:
m9editor checks if a correspondig xxxxxxxx_manila.lua exists in the script directory. If yes, you are offered edit and compile options.

- NEW: editor context menu: view source for embedded scripts
- NEW: search previous button
- FIX: editing characterreference threw exception
- NEW: dirviewer context menu for mode9 files: compare with: compare two mode9 files without loading it first
- NEW: dirviewer context menu for all files: hex compare with: compare two files with hexview.
Only available if AptDiff is installed. Edit m9editor.cfg and insert the following line (use the path on your system):
AptDiffPath=c:\Program Files (x86)\Brother Technology\AptDiff 1.5\aptdiff.exe

If AptDiff is installed and configured in m9editor.cfg, text compares are done with AptDiff instead of ExamDiff

WARNING:
during directory analyze, if a lua script is found, m9editor checks for existence of <filename>.luac.lua. If its found it will be renamed to <filename>.lua. In directory viewer the line will be shown blue colored to indicate the presence of a sourcecode file.

during mode9 file load, if a embedded script is found, m9editor checks for existence of <filename>_<bytepos>.luac.lua. If its found it will be renamed to <filename>_<bytepos>.lua. In mode9 editor you will notice the link to the script sourcecode. Dont forget to save the mode9 file to make the link permanent (otherwise if you modify the structure, links might be lost due to changing byteposition).

WARNING2:
The pdf attached doesnt reflect the latest changes to m9editor, update follows.

2009-02-22 - v3.2.0.1
- fixed definitions for weather.mode9 and landscape.mode9 which rendered them unusable after modifying
2009-02-22
I removed the QtcConv and LuaConv tools because they lack of syntactical checks and the same functionality is available in m9editor.
EDIT: added the old LuaConv again, seems to work not that bad i thought it would :)
2009-02-21 - v3.2.0.0
- font changes for various fields to avoid overlapping
- if "manila files dir" is changed in settings, directoryview will be reloaded
- new: directory viewer context menu option for mode9 files: "extract embedded scripts", writes them to script directory
- changed interpretation of UV property (16.16 instead of INT32)
- picture view: new "save as PNG" and "save as QTC" buttons will save your graphic to a selectable directory
2009-02-19 - v3.1.0.1
bugfix for "save tree to file" function
2009-02-19 - v3.1.0.0
time for a new version :)
- m9editor now remembers last window/splitter positions and restores them on start and returning from minimize
- HOT compare feature: if a mode9 file is loaded, rightclick on the toplevel node to compare with another mode9 file, or save the treeview as a textfile. Compares are done with a freeware tool named "ExamDiff" from PrestoSoft.
2009-02-18 - v3.0.5.0
new context menu functions in directory viewer: delete, copy to
2009-02-17 - v3.0.4.0
content of XML, HTML displayed in lower right panel
evaluation of XML locales in directory viewer
manual is complete, and now a part of the package
2009-02-16 - v3.0.3.1
annotations now work for new tags as well, and will be copied between instances (+corrected a few flaws during display)
new: search within decompiled lua scripts
new: copy annotations between instances of m9editor
2009-02-11 - v3.0.2.0
bugfix: empty value crash
minor improvements
2009-02-10 - v3.0.1.0
some little improvements:
- sourcecode of embedded scripts and .luac files is shown whenever possible
- zoom percentage display for graphics display
2009-02-09 - v3.0.0.0
I've made a lot of changes to improve m9editor. The most important are:
- integration with sztupy's luadec (thanks and credits to sztupy for great decompiler and permission to use, and of course once again to D-MAN666 for providing knowledge)
- import of compiled lua scripts (ANSI or Unicode, autodetected)
- UI reworked: editor, directory viewer, image viewer combined in one window


planned for next releases of m9editor:
- copy files to/from PDA if connected via ActiveSync
- smart-select referenced graphic files in a mode9 file
- selfcheck for consistent mode9 writing
- analysis of lua script "require"'s for valid manila names

download stats:
v.3.2.0.1: 1554 views (wow! impressed!)
 
Last edited:
  • Like
Reactions: poyensa

Ximoon

Senior Member
Jul 9, 2008
130
0
40
Paris
www.yaronet.com
Guess I'll have to try that, seems great !
Your editor seems (as you describe it) only able to change values, but not the structure of the mode9 file, do you intend to change that ?
I have an ongoing project of mode9/xml converter in C, if I can be of some help, don't hesitate to ask :)
 

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
Hi Ximoon,

guess you belong to the "intended audience" :)

At the moment only changing values is allowed, correct. The main reason for this is that i'm unable to interpret and understand the complete structure, and to make sure that writing of m9 files produces valid files. If there's more info on that i could build it into the editor of course.

What i could imagine is a more generic approach, e.g. allow insertion/deletion of tags based on hex-values. I'll give that a thought.

Do you have any detailed info about the tag-structure? It can be seen in the tagfile but as hexvalues. Ive been able to interpret some of them, but the meaning of many others is unknown to me. So m9editor filters most of them for better reading.

Anyway, there's more to come with m9editor. I already built routines to disassemble lua scripts which run fine, but as its output is only relevant to p-code its pretty useless at this time. Also planned is a tool to allow image replacement. That could go to a point where we have a complete workbench for TF3D, including preview and the like. But thats far beyound my current scope.
 

Ximoon

Senior Member
Jul 9, 2008
130
0
40
Paris
www.yaronet.com
Nice anyway !
I have no more information than you do, all I got is from the manilla thread where you posted earlier ;)
But in the end, names of the tags doesn't really matter.
For LUA, I found some decompiler on the web, so I guess a tool to convert lua-unicode to lua-ascii and reverse could work to use those tools.
I guess I'll go on with my editor and see what I could do in the end, for two different approches could be constructive !
 

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
Must have been ChunkSpy, right? I found many more but mostly outdated and not working for Lua 5.1.
The Lua routines i've already written allow converting unicode to ascii, and save the scripts in ascii respectively. I'll have to recode them in .net as the first quick approach has been VB :confused:
 

D-MAN666

Senior Member
Jul 17, 2008
379
1
Nice start, man :)
I was waiting for so long since somebody starts public Manila DevKit since i posted specs i reversed :D

Drop me a PM if you have any questions ;)
 

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
yeah, right D-MAN, most of that thing is based on your findings, my respect m8.
I'll PM you later, gotta go shopping now for newyears eve :D
 

schreda

Senior Member
Aug 31, 2008
291
31
got ean error if i want to open a file..

System.UnauthorizedAccessException: Der Zugriff auf den Pfad C:\Dokumente und Einstellungen\Administrator\Desktop\HTC\tf3d\2c684cd8_manila wurde verweigert.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
bei System.IO.FileStream..ctor(String path, FileMode mode)
bei m9editor.m9efunctions.readm9(String fname, Boolean writedebug)
bei m9editor.m9editor.fileopen_Click(Object sender, EventArgs e)
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

edit: i was write protected.....
 
Last edited:

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
got ean error if i want to open a file..

System.UnauthorizedAccessException: Der Zugriff auf den Pfad C:\Dokumente und Einstellungen\Administrator\Desktop\HTC\tf3d\2c684 cd8_manila wurde verweigert.

sorry, i dont have that file on my touch HD, cannot test. Are you sure its a mode9 file? Can you upload it here?
 

schreda

Senior Member
Aug 31, 2008
291
31
hmm.. i'm trying to port the analog clock from the Diamond to the HD.. i must change the Resolution i think but i got a bad result if i change the size var... ( i took the original file from the Hd to compare it
 

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
hmm.. i'm trying to port the analog clock from the Diamond to the HD.. i must change the Resolution i think but i got a bad result if i change the size var... ( i took the original file from the Hd to compare it

great idea, i'd appreciate to see a analog clock on the HD
 

pcarvalho

Inactive Recognized Developer
Jan 6, 2008
2,715
214
wow! finally someone is doing it :D

thanks and keep up the good work!!!

what i show in screenshot, is it portion of unparsed data?

can one edit them? i tried and failed cause i dont know what to change...

i'm missing: RectF, X, Y, Width, Height
 

Attachments

  • Untitled-1.gif
    Untitled-1.gif
    15.1 KB · Views: 237
Last edited:

6Fg8

Retired Senior Moderator
Apr 13, 2008
1,150
7
Vienna
wow! finally someone is doing it :D

thanks and keep up the good work!!!

what i show in screenshot, is it portion of unparsed data?

can one edit them? i tried and failed cause i dont know what to change...

i'm missing: RectF, X, Y, Width, Height

its the value of the tag above, "Viewport". Currently i dont know how to parse that, as its binary and i dont understand the meaning. Could be 8 x Int16, or 4x Int32, or a mixture of that, and even then i wouldnt understand what these values mean. Obviously parameters for Viewport.

Yes, you can edit that, simply overwrite the hexvalues and press enter, it will be written.

Can you shed light into the purpose of these values? I'll be glad to parse them right.

BTW there is a baaad bug in v1.0.2.0 when writing m9, i'm currently correcting that.
 

pcarvalho

Inactive Recognized Developer
Jan 6, 2008
2,715
214
its the value of the tag above, "Viewport". Currently i dont know how to parse that, as its binary and i dont understand the meaning. Could be 8 x Int16, or 4x Int32, or a mixture of that, and even then i wouldnt understand what these values mean. Obviously parameters for Viewport.

Yes, you can edit that, simply overwrite the hexvalues and press enter, it will be written.

Can you shed light into the purpose of these values? I'll be glad to parse them right.

BTW there is a baaad bug in v1.0.2.0 when writing m9, i'm currently correcting that.

take your time my friend

those ones for Viewport i only know that they are:

<Property Name="Viewport" Type="RectF" X="0" Y="0" Width="31457280" Height="35127296" Animated="False"/>

cause i used D-MAN666's mode9parser, talk with him cause he might help, i hope :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    6Fg8 proudly presents:
    m9editor
    development discontinued


    m9editor is your little helper when it comes to editing manila files. It lets you edit nearly all aspects of a mode9 file. Additionally it will assist you with graphics, allowing import, export and CFC compression. And It includes a directory viewer with information specific to manila files.

    requirements:
    m9editor is written in .net, so .netCF3.5 (currently SP1) must be installed (usually its already there). It has been developed and tested using Windows XP x64, but should run on any Windows platform.

    usage:
    see the manual contained in the download package (PDF)

    making of / credits:
    thanks to: D-MAN666, sztupy, nixx-X1, Chainfire, pcarvalho, showaco, guap, 12aon, xboxmod, NisseDILLIGAF, smotrs, for contributing knowledge, ideas, testing. Thank you guys (& gals of course) !

    version history:
    2009-03-10 - v3.3.0.1
    BUGFIX: crashed when using selections
    2009-03-09 - v3.3.0.0
    - LuaConv is now included in the m9editor download package
    - CHG: all sourcecode related functions use ".lua" as default extension
    - NEW: compile and import function for lua script sourcefiles:

    for mode9 files (embedded scripts):
    m9editor remembers the filename of the source on a per-node basis and lets you subsequently edit the recently used file from the particular node. You may also attach/detach such a link manually. If a link is established, you may edit the sourcefile (check if you set the "SourceCodeViewer" option in m9editor.cfg) and recompile/import in a single step. When saving the mode9 file the links are saved too (mode9file.ann) and reloaded on next open.

    for standalone scripts:
    m9editor checks if a correspondig xxxxxxxx_manila.lua exists in the script directory. If yes, you are offered edit and compile options.

    - NEW: editor context menu: view source for embedded scripts
    - NEW: search previous button
    - FIX: editing characterreference threw exception
    - NEW: dirviewer context menu for mode9 files: compare with: compare two mode9 files without loading it first
    - NEW: dirviewer context menu for all files: hex compare with: compare two files with hexview.
    Only available if AptDiff is installed. Edit m9editor.cfg and insert the following line (use the path on your system):
    AptDiffPath=c:\Program Files (x86)\Brother Technology\AptDiff 1.5\aptdiff.exe

    If AptDiff is installed and configured in m9editor.cfg, text compares are done with AptDiff instead of ExamDiff

    WARNING:
    during directory analyze, if a lua script is found, m9editor checks for existence of <filename>.luac.lua. If its found it will be renamed to <filename>.lua. In directory viewer the line will be shown blue colored to indicate the presence of a sourcecode file.

    during mode9 file load, if a embedded script is found, m9editor checks for existence of <filename>_<bytepos>.luac.lua. If its found it will be renamed to <filename>_<bytepos>.lua. In mode9 editor you will notice the link to the script sourcecode. Dont forget to save the mode9 file to make the link permanent (otherwise if you modify the structure, links might be lost due to changing byteposition).

    WARNING2:
    The pdf attached doesnt reflect the latest changes to m9editor, update follows.

    2009-02-22 - v3.2.0.1
    - fixed definitions for weather.mode9 and landscape.mode9 which rendered them unusable after modifying
    2009-02-22
    I removed the QtcConv and LuaConv tools because they lack of syntactical checks and the same functionality is available in m9editor.
    EDIT: added the old LuaConv again, seems to work not that bad i thought it would :)
    2009-02-21 - v3.2.0.0
    - font changes for various fields to avoid overlapping
    - if "manila files dir" is changed in settings, directoryview will be reloaded
    - new: directory viewer context menu option for mode9 files: "extract embedded scripts", writes them to script directory
    - changed interpretation of UV property (16.16 instead of INT32)
    - picture view: new "save as PNG" and "save as QTC" buttons will save your graphic to a selectable directory
    2009-02-19 - v3.1.0.1
    bugfix for "save tree to file" function
    2009-02-19 - v3.1.0.0
    time for a new version :)
    - m9editor now remembers last window/splitter positions and restores them on start and returning from minimize
    - HOT compare feature: if a mode9 file is loaded, rightclick on the toplevel node to compare with another mode9 file, or save the treeview as a textfile. Compares are done with a freeware tool named "ExamDiff" from PrestoSoft.
    2009-02-18 - v3.0.5.0
    new context menu functions in directory viewer: delete, copy to
    2009-02-17 - v3.0.4.0
    content of XML, HTML displayed in lower right panel
    evaluation of XML locales in directory viewer
    manual is complete, and now a part of the package
    2009-02-16 - v3.0.3.1
    annotations now work for new tags as well, and will be copied between instances (+corrected a few flaws during display)
    new: search within decompiled lua scripts
    new: copy annotations between instances of m9editor
    2009-02-11 - v3.0.2.0
    bugfix: empty value crash
    minor improvements
    2009-02-10 - v3.0.1.0
    some little improvements:
    - sourcecode of embedded scripts and .luac files is shown whenever possible
    - zoom percentage display for graphics display
    2009-02-09 - v3.0.0.0
    I've made a lot of changes to improve m9editor. The most important are:
    - integration with sztupy's luadec (thanks and credits to sztupy for great decompiler and permission to use, and of course once again to D-MAN666 for providing knowledge)
    - import of compiled lua scripts (ANSI or Unicode, autodetected)
    - UI reworked: editor, directory viewer, image viewer combined in one window


    planned for next releases of m9editor:
    - copy files to/from PDA if connected via ActiveSync
    - smart-select referenced graphic files in a mode9 file
    - selfcheck for consistent mode9 writing
    - analysis of lua script "require"'s for valid manila names

    download stats:
    v.3.2.0.1: 1554 views (wow! impressed!)