View Single Post
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#1
I posted the following over at Brighthand, maybe there's some interest here too so I'll post a slightly edited version. It's a bit oriented at PalmOS users but should fit here as well. Here goes:

I suspected it would be possible to launch directly into a specific PalmOS application from the Nokia user interface, and this turns out to be correct - you can.

I looked around a bit on the installed garnet vm, and it's possible to bypass the GVM launcher altogether. That's good, because it's a bit slow to start and it gets slower the more applications you add. But you actually only need it to install new applictions, and for hotsync (or possibly, not even for that. Will experiment more later). And as a convenient way of configuring the resources for each PalmOS application (as already mentioned you can configure the device type (Treo xxx, T3, TX..) and heap memory for each application).

But the Garnet VM consists of two applications: The above-mentioned GVM launcher (gvm-launcher) as well as the actual Garnet virtual machine (gvm). The latter can be executed directly, and then it'll start as quick as any Nokia app, that is, in less than 2 seconds. Then it takes another two-three seconds to initialize itself and show you the default application (Preferences) or the one you specified. Because you can specify one.. along with a list of other parameters, including your hotsync name and hotsync id for the session. Example (this all has to be done from the Nokia xterm command line for now, but it's easy enough to script this and make it into an icon that can be executed by clicking in the Nokia UI):

Note that you can skip the 'cd /usr/bin/gvm' step and instead access the gvm binary with the absolute path '/usr/bin/gvm/gvm', it'll work fine.

Code:
$ cd /usr/bin/gvm
$ ./gvm --help
Garnet (tm) VM v1.0 (Prod-Release) - Build 564139 (Nov 12 2007-17:46:49)
Usage:
  gvm [OPTION...] [ROM filename]

  Settings are first loaded from gvm.conf.
  Command line parameters override config file.
  If the -S option is specified, command line parameters will be saved to gvm.conf file.

Help Options:
  -?, --help                                                                                                   Show help options

Application Options:
  -s, --screensize=160x160|160x220|240x240|...|320x480                                                         Screen size
  -O, --rotated=yes|no                                                                                         Rotate display by 90? clockwise
  -B, --bgimage=An absoute path to an image file                                                               Background image
  -L, --bgcolor=RGB triplet as 0xrrrr,0xgggg,0xbbbb                                                            Background color
  -b, --bitdepth=1|2|4|8|16                                                                                    Screen bit depth
  -f, --fullscreen=yes|no                                                                                      Fullscreen mode (no graffiti area nor status bar)
  -q, --qvgascaling=yes|no                                                                                     Rescale 1x or 2x density screen to a QVGA display
  -j, --siafile=filename|none                                                                                  Specify a Static Input Area configuration file
  -h, --storageheap=1|2|4|...|64                                                                               Storage heap size (in Mbytes)
  -d, --dynheap=256|512|1024|2048|4096|8192                                                                    Dynamic heap size (in Kbytes)
  -g, --storagefilename=filename                                                                               A filename to load/save storage from/to.
  -c, --companyid=ABCD                                                                                         Company ID (e.g. Palm)
  -i, --deviceid=abcd                                                                                          Device ID (e.g. Arz1)
  -l, --locale=enUS|frFR|...|default                                                                           local language and country (e.g. enUS)
  -o, --sound=yes|no                                                                                           Enable/Disable sound
  -m, --virtualmouse=yes|active|no                                                                             Enable, Enable and Activate or Disable virtual mouse
  -t, --traces=all|none|12,15,0xab,...                                                                         Trace filters
  -k, --keymap=GDK_KeyCode:vchrPalmOS,...                                                                      Key Mapping (e.g.: 0xFF91:vchrHard1
  -a, --appcreator=ABCD|default                                                                                default application creator to launch at startup (e.g. memo)
  -H, --starthidden                                                                                            Hide window at startup
  -n, --serialnum                                                                                              Device Serial Number (12 characters)
  -u, --hotsyncid=(e.g.: TestUser:9669)                                                                        HotSync User ID (string:id)
  -w, --wpath                                                                                                  Writable path to save persistent information (settings,...)
  -I, --hotsyncip=aaa.bbb.ccc.ddd                                                                              HotSync Desktop IP
  -G, --gras                                                                                                   Start the GRAS server at launch
  -p, --pimdb=yes|no                                                                                           Use direct PIM Apps Db access
  -6, --68kdbg=Bit Mask: 0x2(Break On App Start)|0x4(Trace Traps)|0x8(Start Console)|0x10(Enable GDB Stub)     68K debugger flags
  -A, --alsa=none|default|name                                                                                 ALSA device name
  -T, --transient                                                                                              Use transient storage
EDIT: The May 2008 version added the following option:
Code:
  -z, --zoomFactor=1|1.5|2
where 1.5 will start in the new, larger fullscreen (720x480?) mode. 2 behaves like 1, i.e. the old smaller size.
/EDIT

So, to just start it and end up with the Preferences screen (from where you could just click Home to get to the home screen), just enter
Code:
./gvm
This gives a white background. To get an image/coloured background you would have to specify that too, together with fullscreen and any other non-default option.

To start with Google Maps directly, use the application ID (which you can get from FileZ, running on the GVM itself, for example). And non-rotated, fullscreen:
Code:
./gvm -a GLM. -f
EDIT: Info from user burmashave: (edit 2008-07-28: This is for when you want to use an alternative storage file (the default is gvm.store), you could use it as a separate virtual Palm.)
Code:
./gvm --storagefilename=filename
'filename' must be a file in the /home/user/.gvm/ directory.

Tested this one and it works perfectly:
Code:
./gvm --hotsyncid="My HotSync Name:1234"
As you can see there are lots of other options. From that video-link that was posted earlier [posted on Brighthand by the user PinCushionQueen, the link is http://gizmodo.com/gadgets/cellphone...t-323927.php]] it looked like maybe there's a newer version around - I have to look again, but it seemed to me that one could specify more heap memory than for the one I have. Although in the above list you can see it can take 8MB as heap space although the gvm launcher will only let you specify up to 4MB. In my version, at least.
EDIT: That (what I saw in the video) turned out to be another option - there's still (Jan. 2008) only that one version of GVM. 8MB heap space is currently max.

There's a bunch of files in that /usr/bin/gvm/ directory, including a ROM image. From the names etc. of other files it looks like it'll only be able to run m68k apps (in this version at least), although that could change. Some of the options (see above) also suggest there may be more features later, the -O (rotate) option, for example, doesn't do anything in practice (the screen rotatation depends on the -f (fullscreen) option).

Oh, and I got to see what really happens when it refused to run AvantGo.. by starting it from the command line I got a Segment Violation message and a large backtrace, which I could presumably email to Access. But I guess AvantGo is a major application they would test themselves sooner or later anyway (and I've already reported to Access that it doesn't run).
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.

Last edited by TA-t3; 2008-07-28 at 10:17. Reason: Added the -z option for the second beta.
 

The Following 26 Users Say Thank You to TA-t3 For This Useful Post: