This is a GameOS application, which reads patch data from
cofiguration files, applies them to LV2 and exits.

Configuration file is called "patch.txt" and it is searched
in following directories (in specified order):

* /dev_usb000/lv2/
* /dev_usb001/lv2/
* /dev_usb002/lv2/
* /dev_usb003/lv2/
* /dev_usb004/lv2/
* /dev_usb005/lv2/
* /dev_usb006/lv2/
* /dev_usb007/lv2/
* /dev_cf/lv2/
* /dev_sd/lv2/
* /dev_ms/lv2/
* /dev_hdd0/game/LV2000000/USRDIR/

If a patch.txt is found, the patcher reads it and executes
patch instructions from it. Only the first file is processed.

Patch instruction has the following format:

  [*]<address>: [@[x][b][1]] { imm32 | imm64 | find imm32 | find imm64 | filename | "go" | "alloc" bytes } [# comment]

"*" is a dereferencing operator for "address" - it works for
imm32, imm64 and "go" like a C programmer would expect.

Deferencing operator for payload file does the same as "alloc"
command.

"address" is self-explainationary - it specifies the pointer
to the memory to be patched. Base offset is 0x8000000000000000,
so "address" = 12345 refers to 0x8000000000012345.

[@[x][b][a]] is the flags field. Flag "x" executes the payload 
after loading it from the file, flag "b" backs up the memory
before payload execution to restore it later, flag "1" changes
the allocation code to use hypercalls for memory allocation.

Flags "1" and dereferencing operator cannot be used at the
same time.

imm32 and imm64 are new memory values (32 and 64 bits).

If you specify the filename, patcher will search it, then load
it into memory. If the address is zero, a new memory block
will be allocated within lv2 address space.

"go" just executes the memory, specified by the pointer.

"alloc" allocates the specified amount of lv2 memory and stores
the pointer to newly allocated memory.

All values are hexademical (lower or upper case) and must
be specified without spaces.

Example:

# My binary code:
ef48: payload.bin
# Segment 0:
1abca: 1924a7ca # patch_func638
41dc4: 38600000 # debug: patch_func538_offset114
45f08: 60000000 # debug: patch_func148_offset262
49131: alloc 1024 # alloc some space for 1k.bin
*49131: 1k.bin
# Segment 1:
346699: 800000000000ef54 # syscall_foo_bar_desc

