 #######################################################################
#                            NEOCD v 0.5                                #
 #######################################################################

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

GOTO "$CMD$"
RETURN "-1"

:QUERY
    # Change this information to describe the application.
    #special Case! NEOCD Requires the neogeo cd bios to run! Name it NEOCD.BIN
    IFNOT EXISTS "$SRC_PATH$/NEOCD.BIN"
    RETURN "-1"
    ENDIF
    SET "APP_TITLE" "NeoCD/PS2"
    SET "APP_VERSION" "v 0.5"
    SET "APP_AUTHOR" "Evilo"
    SET "APP_DESC" "NeoCD/PS2 allows you to run NeoGeo CD Discs from your PS2."
    SET "APP_MEDIAS" "NEOROM"
    RETURN "0"

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

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

    RETURN "0"

:REMOVE

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

    RETURN "0"

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