Tull (The Ultimate Little Loader)

Great app made by Dack

Instructions for this little app :-)

TULL Version 0.3

(The Ultimate Little Loader - and not what I was listening to ;) )
(Next project will have to be called Caravan)

Whats new in this release?
New commands have been added to allow people to kill running processes as well as
start/kill programs from an assigned key.

What is it?

A little loader app that should solve a lot of peoples problems with
applications that require things like FakeCursor and other things.

What does it do?

Well the application looks for an INI file with the same name as itself
which it will then process. i.e. if the main EXE is renamed LOADTOM then it
would look for a file called LOADTOM.INI. This of course means you can have
several copies of it on your card, all having different names and all having
different functions.

What commands does it understand?

There are several script commands you can use.

S NameOfProgram - This is a suspended load. In other words it loads the program but does not run it
G - This resumes the suspended program without waiting for it to exit
R - resumes the suspended program and waits for it to complete
P Address, Val1, Val2, Val3, Val4 - Patch an address in the suspended program with the
- 4 byte values following. Again all values must be
- in hex
L NameOfProgram - A simple load and run of a program
W NameOfProgram - Load and run a program and wait until it completes
B GizKey, NameOfProgram - This assigns one of the Giz keys to be a 'kill' in the passed program name.
Put simply it allows applications to be run that would normally require a
reboot to exit to be shut down with a simple keypress. Example in the LoadRoute66.ini
file included in the rar. You have to press the button 3 times in a row
for it to kill

K GizKey, VK_CODE - Keyboard function re-definitions see the list at the end for the
- GizKey values. You'll have to internet search to find the VK_CODEs
- Values MUST be in hex or the ASCII character. The space after the
- comma is important if using this format i.e. K 0x0004, S would work
- while K 0x0004,S would not. Reason for this is ascii space could be a
- valid number

I GizKey, NameOfProgram - This allows for an executable to be run from a keypress. A second depression
- of the key will kill the process.

F HexValue - This will generate a fake keypress of the HexValue parameter. e.g. F 0x70
- is the command to simulate the Home key being pressed. The values are the
- VKEY values contained in the FAQ

Z NameOfProgram - Zap! (or Kill) a process that is running

T Seconds - Screen Timeout set. This sets the timeout value to the number passed. A value of 0
- Switches them off

D MilliSeconds - Delay execution by the passed value in milliseconds

C "Source" "Destination" - copies a file from source to destination. The Quotes surrounding
- the filenames ARE necessary as filenames can contain spaces and it's
- easier to differentiate that way

M DirectoryName - Make a directory

V 1 - Verbose/debug mode on/off (1/0). This amends debug data to file "gash.txt" on the SD card
- (so make sure it is write enabled)

How do I use it?

Simply make a plain text file with the INI extension and create the script for what you want to do.
See the examples included - LoadTomTom.ini and LoadCoPilot.ini. The LoadTomTom shows how to
do the keymapping where Brightness becomes Zoom In- and Panic becomes Zoom Out.

Included flashplayer example to show how to pass parameters

Advanced bits

The GizKey keynumbers are:
UP = 0,
DOWN = 1,
LEFT = 2,
RIGHT = 3,
Stop = 4,
FastForward = 5,
Rewind = 6,
PLAY = 7,
LeftShoulder = 8,
RightShoulder = 9,
Home = 0x0A,
Volume = 0x0B,
Brightness = 0x0C,
Panic = 0x0D,
Power = 0x0E

By waiting for a program to close down you can then copy files back off from the Giz
to the SD Card

Disclaimer:
Seems to work for me, don't blame me if you knacker anything

Credits:
Lots of source from various places, lots written by me. Source code will be available when
I get off my bottom and clean the code up (and add the other little features I want to). I'll
also include all references to where I got the info from and what source code was integrated
from other projects.

Thanks:
To Opus on GizForums for supplying some source code (even though I used something else in the end :-) )
for the keymap routine.
Otaku
pOp
And anyone else who I've forgotten.

Version History:
0.1 - First release
0.2 - Second release.
a. Allows passing of parameters to applications
b. Debug mode can be activated/deactivated
c. BugFix - original key definitions used for stop and rewind were
WRONG. They are VK_SHIFT and VK_CTRL and not VK_LSHIFT and VK_LCTRL
(this meant the key remaps wouldn't work for those two keys)
d. Keymapping can now take a character as the second parameter
e. Error in instructions corrected - STOP is 4, FF 5, RW 6, Play 7
0.3 - Third release
a. Extra command 'Z' to allow killing a process
b. Extra command 'I' to allow having an executable behind a key remap
c. Extra command 'F' to allow Fake keyboard data to be generated
d. Extra command 'B' to allow loading a program and giving it a kill button
e. debug message cleanup - might make more sense if V mode is selected
f. Slight speedup of the key remap routine (at the cost of a larger memory footprint)
g. Code optimised by changing setting in compile settings

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.