DMS3 Dev.olution Mode provides a platform for developers to write applications
to be stored on and executed from the Playstation 2 Memory Card. On systems
with DMS3 installed, applications can load ELF/IRX files directly off
the memory card. The only thing you need to do is to load the "rom0:SIO2MAN"
and "rom0:MCMAN" modules prior to loading your files.
Example:
sif_load_module("rom0:SIO2MAN", 0, NULL);
sif_load_module("rom0:MCMAN", 0, NULL);
sif_load_module("mc0:\\BOOT\\TESTGROUP\\TESTAPP\\MODULES\\TEST.IRX",
0, NULL);
You may k_LoadExecPS2() ELF files directly from memory card without doing
any extra initialization or loading any modules:
Example:
k_LoadExecPS2("mc0:\\BOOT\\TESTGROUP\\TESTAPP\\TEST.ELF", 0,
NULL);
When the PS2 is first turned on or reset, if the Triangle button is held
down DMS3 will enter Dev.olution Mode. DMS3 will attempt to load the ELF
"mc0:\BOOT\BOOT.ELF". This ELF is reserved for DMS3 Explorer,
which is the menu system used for Dev.olution Mode.
DMS3 Explorer has the ability to automatically install applications onto
the memory card when a CD/DVD disc containing an install script is placed
in the drive and the Select button on the first controller is pressed.The
install script is a very basic format.
Example:
Example Application ; Application Title
mc0:\BOOT\TESTAPP\TEST.ELF ARG0 ARG1; Executable Path, followed by args(if
applicable)
_MKDIR mc0:\BOOT\TESTGROUP ; Actions
MKDIR mc0:\BOOT\TESTGROUP\TESTAPP
COPY cdrom0:\TEST.ELF;1 mc0:\BOOT\TESTGROUP\TESTAPP\TEST.ELF
MKDIR mc0:\BOOT\TESTAPP\MODULES
COPY cdrom0:\TEST.IRX;1 mc0:\BOOT\TESTGROUP\TESTAPP\MODULES\TEST.IRX
** Please Note **
DMS3 Explorer does not support the ';' character or any other form of
comments in installation scripts. They are only provided here for clarification.
Application Title: This is the title of the application which will
be shown in the DMS3 Explorer menu after the application is installed.
Executable Path: This is the path of the executable that will be
executed when a user selects your Application Title from within the DMS3
Explorer menu after installation. Using the above mentioned example script,
DMS3 Explorer would execute "mc0:\BOOT\TESTGROUP\TESTAPP\TEST.ELF"
when the user selects "Example Application" from the DMS3 menu.
Any arguments supplied are passed to the ELF when the user selects the
application from the menu.
NOTE: If the Executable Path is "NO_ENTRY", the application
will not be added to the menu after
installation is completed. This is useful for installing upgrades/patches/addons/etc.
Actions: These are the actions that make up the actual installation
process. At this time, only "COPY", "_COPY, "MKDIR"
and "_MKDIR" actions are supported. If developers need other
actions, we will support them in future versions of DMS Explorer.
Actions with an '_' character, such as "_COPY" are used to specify
that if this action fails, the script should continue executing. Otherwise
the script will stop if the action fails. This is useful if you were to
do a "MKDIR mc0:\BOOT\EMU" or something similar in which case
some other application may have already created the directory in the past.
In this case, you'd want to use the "_MKDIR" action instead.
Action "COPY":
COPY SRC_FILE DEST_FILE
Example:
COPY cdrom0:\TEST.ELF;1 mc0:\BOOT\TESTGROUP\TESTAPP\TEST.ELF
This will copy the file "cdrom0:\TEST.ELF;1" to the file "mc0:\BOOT\TESTGROUP\TESTAPP\TEST.ELF".
You MUST specify a both source and destination file names. You cannot
simply specify the directory you wish to copy to/from. Wildcards are also
not supported.
Action "MKDIR":
MKDIR DIR_NAME
Example:
MKDIR mc0:\BOOT\TESTGROUP
This will create the directory "mc0:\BOOT\TESTGROUP"
Modifying Applications for Dev.olution Mode:
There're only a few steps to take to make your application Dev.olution
Mode compatible. If the application doesn't load additional files from
the memcard, you really don't need to do anything. Otherwise, follow these
simple guidelines.
1. Load the "rom0:SIO2MAN" and "rom0:MCMAN" modules
prior to loading any modules/data files off the memcard.
2. Change the paths for modules/data file to mc0:\BOOT\YOUR_NAME_OR_GROUP\APP_NAME\
3. Consider using the shared mc0:\BOOT\SHARED\ directory for storing your
IOP modules if other people may use them. This helps to cut down on wasted
space from duplicates of the same file.
It's advisable that you pack your executables/data files when making an
application for Dev.olution Mode as the PS2 Memory Card has limited space.
Template install script between this line and !END!
Template Script
mc0:\BOOT\YOUR_GROUP\APP_NAME\APP.ELF
_mkdir mc0:\BOOT
_mkdir mc0:\BOOT\SHARED
_mkdir mc0:\BOOT\YOUR_GROUP
_mkdir mc0:\BOOT\YOUR_GROUP\APP_NAME
_copy cdrom0:\MODULE.IRX;1 mc0:\BOOT\SHARED\MODULE.IRX
_copy cdrom0:\APP.ELF;1 mc0:\BOOT\YOUR_GROUP\APP_NAME\APP.ELF
!END!
|