 #######################################################################
#                            PS2PCE v1.2                                  #
 #######################################################################

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

GOTO "$CMD$"
RETURN "-1"

:QUERY
    # Change this information to describe the application.
    SET "APP_TITLE" "PS2PCE"
    SET "APP_VERSION" "v 0.7"
    SET "APP_AUTHOR" "7not6"
    SET "APP_DESC" "PS2PCE allows you to run PC-Engine (aka TurboGrafix16) ROMS from your PS2."
    SET "APP_MEDIAS" "PCEROM"
    RETURN "0"

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

    COPY "$SRC_PATH$/GENROM.PBT" "$BM.MEDIA_PATH$/PCEROM.PBT"

    RETURN "0"

:REMOVE

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

    RETURN "0"

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