
#
# :mod0 <ModuleName>
# ---------------------------
# Calculates the base address for the following relative pokes (see below).
# Once this module gets loaded via LoadModule() the patchengine calculates
# the base address for the next pokes that follow in the list.
#
# example:
# :mod0 HelloPSP
# :polr 00001234 12345678
# 
# -> once Module "HelloPSP" is loaded (e.g. to 0x08900000, the patchengine calulates for the following
# -> poke an address of 0x08901234, resulting in *(0x08901234) = 0x12345678 (MODBASE gets 0x08900000).
#
# (mod1 - Startaddress of segment 1, mod2 - ... Segment 2 , ... , mode - Entrypoint address of module)
#
# Use multiple mod0 to create blocks of pokes for each module. Relative pokes only gets activated once the
# corresponding module gets loaded
#
#
# Pokes
# -----
# :poba xxxxxxxx yy			- poke.b $xxxxxxxx,$yy				(Poke once [.o..] , 8bit [..b.] , absolute [...a] )
# :powa xxxxxxxx yyyy		- poke.w $xxxxxxxx,$yyyy				(-"- for 16bit)
# :pola xxxxxxxx yyyyyyyy	- poke.l $xxxxxxxx,$yyyyyyyy			(-"- for 32bit)
#
# :paba xxxxxxxx yy			- poke.b $xxxxxxxx,$yy				(Poke always (every frame) [.a..], 8bit [..b.] , absolute [...a] )
# :pawa xxxxxxxx yyyy		- poke.w $xxxxxxxx,$yyyy				(-"- for 16bit)
# :pala xxxxxxxx yyyyyyyy	- poke.l $xxxxxxxx,$yyyyyyyy			(-"- for 32bit)
#
# :pobr xxxxxxxx yy			- poke.b MODBASE+$xxxxxxxx,$yy		(Poke once [.o..] , 8bit [..b.] , relative to ModuleBase [...r] )
# :pobr xxxxxxxx yyyy		- poke.w MODBASE+$xxxxxxxx,$yyyy		(-"- for 16bit)
# :polr xxxxxxxx yyyyyyyy	- poke.l MODBASE+$xxxxxxxx,$yyyyyyyy	(-"- for 32bit)
#
# :pabr xxxxxxxx yy			- poke.b MODBASE+$xxxxxxxx,$yy		(Poke always (every frame) [.a..] , 8bit [..b.] , relative to ModuleBase [...r] )
# :pawr xxxxxxxx yyyy		- poke.w MODBASE+$xxxxxxxx,$yyyy		(-"- for 16bit)
# :palr xxxxxxxx yyyyyyyy	- poke.l MODBASE+$xxxxxxxx,$yyyyyyyy	(-"- for 32bit)
#
#
# Seeks (Search)
# --------------
# :sobr yy zz				- Search yy and replace with zz over module segment , once (8bit)
# :sowr yyyy zzzz			- (-"- for 16bit)
# :solr yyyyyyyy zzzzzzzz	- (-"- for 32bit)
#
# :sabr yy zz				- Search yy and replace with zz over module segment , always (8bit)
# :sawr yyyy zzzz			- (-"- for 16bit)
# :salr yyyyyyyy zzzzzzzz	- (-"- for 32bit)
#
#
# :lxmd <module-path>
# ----------------------------
# (L)oads and e(X)ecutes all (M)odules in a (D)irectory , once the stated 'mod0' module gets loaded
#
# example :lxmd fatms:/PRX/
#
#
# :lxmd <module-path>
# ----------------------------
# (L)oads and e(X)ecutes a (M)odule (F)ile , once the stated 'mod0' module gets loaded
#
# example :lxmf fatms:/PRX/whoknows.prx
#
#
# :d2ms
# --------------
# disc0: to msfat: replacer over whole stated module segment.
#
# Exec
# ----
# :run0	- Start stated module, keep PSPInside in front
# :run1	- Start stated module, put PSPInside to back (get to front with "note" button)
#
#

# If a thread named "user_main" exists, mark it as suspendthread for the note button (sus1)
:thd0 user_main
:sus1
# If a thread named "Main thread" exists, mark it as suspendthread for the note button (sus1)
:thd0 Main thread
:sus1

# Load original SmartBomb boot.bin with method 10000000
:mod0 Bomb
##:pobr 00161351 53
##:pobr 00161352 4d
##:pobr 00161353 42
:run1

# Load original WipeOut boot.bin with method 10000000
:mod0 WO_Game
##:polr 00247784 6d746166
##:pobr 00247788 73
##:pobr 0024778b 57
##:pobr 0024778c 49
##:polr 002a2a24 6d746166
##:pobr 002a2a28 73
##:pobr 002a2a2b 57
##:pobr 002a2a2c 49
:run1
