[Touch Diamond, MDA Compact IV ROM Development] D-MAN666:
darkenergy, before we do anything, we have to decompile corresponding .luac files. For you ideas, namely: home.mode9.scripts :)

Update:

LUA 5.1 Reference Manual should be helpful for you too :)

http://www.lua.org/manual/5.1/

Update 2:

Just to clear up the situation, here's a brief example of decompilation.

After you dump .luac assembly, you should get something like:

Pos Hex Data Description or Code
------------------------------------------------------------------------
0000 ** source chunk: script1.luac
** global header start **
0000 1B4C7561 header signature: "\27Lua"
0004 51 version (major:minor hex digits)
0005 00 format (0=official)
0006 01 endianness (1=little endian)
0007 04 size of int (bytes)
0008 04 size of size_t (bytes)
0009 04 size of Instruction (bytes)
000A 08 size of number (bytes)
000B 00 integral (1=integral)
* number type: double
* x86 standard (32-bit, little endian, doubles)
** global header end **

000C ** function [0] definition (level 1)
** start of function **
000C 00000000 string size (0)
source name: (none)
0010 00000000 line defined (0)
0014 00000000 last line defined (0)
0018 00 nups (0)
0019 00 numparams (0)
001A 02 is_vararg (2)
001B 04 maxstacksize (4)
* code:
001C 0D000000 sizecode (13)
0020 24000000 [01] closure 0 0 ; 0 upvalues
0024 07000000 [02] setglobal 0 0 ; OnPageChanged
0028 05400000 [03] getglobal 0 1 ; _application
002C 06804000 [04] gettable 0 0 258 ; "Store"
0030 0BC04000 [05] self 0 0 259 ; "GetValueChangedEvent"
0034 85000100 [06] getglobal 2 4 ; Lifetime_Application
0038 C1400100 [07] loadk 3 5 ; "ShowCacheHomePage"
003C 1C800002 [08] call 0 4 2
0040 0B804100 [09] self 0 0 262 ; "connect"
0044 85000000 [10] getglobal 2 0 ; OnPageChanged
0048 C5C00100 [11] getglobal 3 7 ; self
004C 1C400002 [12] call 0 4 1
0050 1E008000 [13] return 0 1
* constants:
0054 08000000 sizek (8)
0058 04 const type 4
0059 0E000000 string size (14)
005D 4F6E506167654368+ "OnPageCh"
0065 616E67656400 "anged\0"
const [0]: "OnPageChanged"
006B 04 const type 4
006C 0D000000 string size (13)
0070 5F6170706C696361+ "_applica"
0078 74696F6E00 "tion\0"
const [1]: "_application"
007D 04 const type 4
007E 06000000 string size (6)
0082 53746F726500 "Store\0"
const [2]: "Store"
0088 04 const type 4
0089 15000000 string size (21)
008D 47657456616C7565+ "GetValue"
0095 4368616E67656445+ "ChangedE"
009D 76656E7400 "vent\0"
const [3]: "GetValueChangedEvent"
00A2 04 const type 4
00A3 15000000 string size (21)
00A7 4C69666574696D65+ "Lifetime"
00AF 5F4170706C696361+ "_Applica"
00B7 74696F6E00 "tion\0"
const [4]: "Lifetime_Application"
00BC 04 const type 4
00BD 12000000 string size (18)
00C1 53686F7743616368+ "ShowCach"
00C9 65486F6D65506167+ "eHomePag"
00D1 6500 "e\0"
const [5]: "ShowCacheHomePage"
00D3 04 const type 4
00D4 08000000 string size (8)
00D8 636F6E6E65637400 "connect\0"
const [6]: "connect"
00E0 04 const type 4
00E1 05000000 string size (5)
00E5 73656C6600 "self\0"
const [7]: "self"
* functions:

[I]et cetera[/I]

The above code s/b manually reversed into:

function OnPageChanged()
-- function 0 (level 2) code here
end
_application.Store:GetValueChangedEvent(Lifetime_Application, "ShowCacheHomePage"):connect(OnPageChanged, self);

Then, you should fill in function 0 (level 2) code, that goes on in the dissassembly and so on until end of file.

Good luck! :D