 #######################################################################
#                            PSMS v1.2                                  #
 #######################################################################

SET "CMD" "$ARG1$"
SET "SRC_PATH" "$ARG2$/PSMS"
SET "DST_PATH" "$ARG3$/PSMS"

GOTO "$CMD$"
RETURN "-1"

:QUERY
    # Change this information to describe the application.
    SET "APP_TITLE" "PSMS"
    SET "APP_VERSION" "v 2.0"
    SET "APP_AUTHOR" "7not6"
    SET "APP_DESC" "PSMS allows you to run Sega master/MarkIII/GameGear ROMs from PS2"
    SET "APP_MEDIAS" "SMSROM"
    RETURN "0"

:INSTALL
    # Change this to create the directories and copy the files needed for the application.
    MKDIR "$DST_PATH$"
    COPY "$SRC_PATH$/PSMS.ELF" "$DST_PATH$/PSMS.ELF"
    COPY "$SRC_PATH$/APPINFO.PBT" "$DST_PATH$/APPINFO.PBT"

    COPY "$SRC_PATH$/SMSROM.PBT" "$BM.MEDIA_PATH$/SMSROM.PBT"

    RETURN "0"

:REMOVE

    # Change this to remove all files or directories copied during the installation.
    RM "$SRC_PATH$/PSMS.ELF"
    RM "$SRC_PATH$/SMS.PBT"
    RM "$SRC_PATH$/APPINFO.PBT"
    RMDIR "$SRC_PATH$/PSMS"

    RETURN "0"

:RUN
    RUNAPP "$SRC_PATH$/PSMS.ELF"
    RETURN "0"
