diff --git a/git/shared.lua b/git/shared.lua index 8ad179a2..29ce6e7d 100644 --- a/git/shared.lua +++ b/git/shared.lua @@ -4,5 +4,5 @@ APP_REPO = "theheroGAC" APP_PROJECT = "Autoplugin" APP_VERSION_MAJOR = 0x03 -- major.minor -APP_VERSION_MINOR = 0x11 +APP_VERSION_MINOR = 0x12 APP_VERSION = ((APP_VERSION_MAJOR << 0x18) | (APP_VERSION_MINOR << 0x10)) -- Union Binary diff --git a/lang/FRENCH.txt b/lang/FRENCH.txt index 787671ed..446b5c25 100644 --- a/lang/FRENCH.txt +++ b/lang/FRENCH.txt @@ -1,4 +1,4 @@ ---Translates +--Translates STRING_UNSAFE_MODE = "Le mode UNSAFE MODE doit être activé pour utiliser cet Homebrew !!!" STRING_PSVITA_RESTART = "\nVotre PS Vita va redémarré pour valider les changements" @@ -15,6 +15,7 @@ MENU_INSTALL_PLUGINS = "Menu des plugins" MENU_UNINSTALL_PLUGINS = "Désinstaller un Plugin" MENU_INSTALL_NPDRMFREE = "Mise en place du plugin NpDrm free de Qwik pour Adrenaline" MENU_INSTALL_CONFIG = "Installation du fichier config.txt pour PKGJ v0.31+" +MENU_INSTALL_REMASTERED_CTRLS = "Install RemasteredControls plugins from Theflow (Adrenaline)" MENU_EXIT = "Quitter" MENU_INSTALLED_CONFIG = "Fichier config.txt pour pkgj a été installé dans ux0:pkgi/" @@ -34,7 +35,7 @@ INSTALLP_LIST_PLUGINS = "Liste de plugin(s) prêt a être installé :" INSTALLP_CROSS_INSTALL = "X : Lancer l'installation du plugin" INSTALLP_SQUARE_MARK = "[] : Sélectionner le(s) plugin(s) à installer" -INSTALLP_TRIANGLE_ALL = "/\ : Installer tous les plugins" +INSTALLP_TRIANGLE_ALL = "△ : Installer tous les plugins" INSTALLP_SELECT_CLEAN = "SELECT : Annuler les plugins sélectionner " INSTALLP_LR_SWAP = "L/R : Switcher entre ux0: et ur0:" @@ -61,6 +62,13 @@ NPDRMFREE_VSH_UPDATED = "\nvsh.txt mise à jour" NPDRMFREE_GAME_UPDATED = "\ngame.txt mise à jour" NPDRMFREE_NO_PARTITION = "\nPartition pas trouvé !!!" +--pspctrls +PSPCTRLS_TITLE = "Remastered Controls plugins from Theflow (Adrenaline)" +PSPCTRLS_CROSS_INSTALL = "X to install plugin" +PSPCTRLS_LR_SWAP = "L/R to swap partitions" +PSPCTRLS_GAME_UPDATED = "game.txt updated" +PSPCTRLS_DESCP = "A collection of dual analog patches for PSP games on Adrenaline" + --descriptions plugins --KERNEL INSTALLP_DESC_NONPDRM = "Désactive la protection DRM sur tous les contenus PS Vita (Jeux, DLC et mise à jour)" diff --git a/lang/ITALIAN.txt b/lang/ITALIAN.txt index 1650d87c..624992ca 100644 --- a/lang/ITALIAN.txt +++ b/lang/ITALIAN.txt @@ -15,6 +15,7 @@ MENU_INSTALL_PLUGINS = "Installa Plugins" MENU_UNINSTALL_PLUGINS = "Disinstalla Plugins" MENU_INSTALL_NPDRMFREE = "Installa il plugin npdrm free di qwikrazor87 (Adrenaline)" MENU_INSTALL_CONFIG = "Installa il file config.txt per PKGJ v0.31+" +MENU_INSTALL_REMASTERED_CTRLS = "Installa RemasteredControls plugins di Theflow (Adrenaline)" MENU_EXIT = "Esci" MENU_INSTALLED_CONFIG = "ux0:pkgi/config.txt per pkgj è stato installato!!!" @@ -26,7 +27,7 @@ SD2VITA_4_WARNING = "Copia solo le app veramente necessarie per la tua sd SD2VITA_5_WARNING = "Per esempio: H-encore, Vitashell/ONEMenu, pkgj, adrenaline, etc... " SD2VITA_GAMECARD_DETECTED = "GAMECARD RILEVATA !!!" SD2VITA_GAMECARD_REMOVED = "rimuovi prima di installare" -SD2VITA_TRIANGLE_INSTALL = "Per procedere con l'installazione premere Triangolo" +SD2VITA_TRIANGLE_INSTALL = "Per procedere con l'installazione premere △" SD2VITA_CIRCLE_CANCEL = "Per annullare l'installazione premere O " --install plugins @@ -61,6 +62,13 @@ NPDRMFREE_VSH_UPDATED = "vsh.txt aggiornato" NPDRMFREE_GAME_UPDATED = "game.txt aggiornato" NPDRMFREE_NO_PARTITION = "Partizione non trovata!" +--pspctrls +PSPCTRLS_TITLE = "Remastered Controls plugins di Theflow (Adrenaline)" +PSPCTRLS_CROSS_INSTALL = "X : per installare il plugin" +PSPCTRLS_LR_SWAP = "L/R: per cambiare la partizione" +PSPCTRLS_GAME_UPDATED = "game.txt aggiornato" +PSPCTRLS_DESCP = "Una collezione di patch per far funzionare gli analogici sui giochi PSP avviati da Adrenaline" + --descriptions plugins --KERNEL INSTALLP_DESC_NONPDRM = "Permette di bypassare la protezione DRM su qualsiasi contenuto PS Vita" diff --git a/lang/JAPANESE.txt b/lang/JAPANESE.txt index 90de1b97..ac9e823e 100644 --- a/lang/JAPANESE.txt +++ b/lang/JAPANESE.txt @@ -1,4 +1,4 @@ ---Translates +--Translates STRING_UNSAFE_MODE = "UNSAFE MODEはこのHomebrewに必須です!" STRING_PSVITA_RESTART = "PSVitaを再起動します" @@ -15,6 +15,7 @@ MENU_INSTALL_PLUGINS = "プラグインインストール" MENU_UNINSTALL_PLUGINS = "プラグインアンインストール" MENU_INSTALL_NPDRMFREE = "Adrenaline用npdrm_freeプラグイン(by qwikrazor87)インストール" MENU_INSTALL_CONFIG = "PKGJ v0.31+のconfig.txtインストール" +MENU_INSTALL_REMASTERED_CTRLS = "Install RemasteredControls plugins from Theflow (Adrenaline)" MENU_EXIT = "アプリを終了" MENU_INSTALLED_CONFIG = "pkgj用のconfig.txtはux0:pkgi/config.txtへインストールされます!" @@ -61,6 +62,13 @@ NPDRMFREE_VSH_UPDATED = "vsh.txtが更新されました" NPDRMFREE_GAME_UPDATED = "game.txtが更新されました" NPDRMFREE_NO_PARTITION = "パーティションが見つかりません!" +--pspctrls +PSPCTRLS_TITLE = "Remastered Controls plugins from Theflow (Adrenaline)" +PSPCTRLS_CROSS_INSTALL = "X : to install plugin" +PSPCTRLS_LR_SWAP = "L/R: to swap partitions" +PSPCTRLS_GAME_UPDATED = "game.txt updated" +PSPCTRLS_DESCP = "A collection of dual analog patches for PSP games on Adrenaline" + --descriptions plugins --KERNEL INSTALLP_DESC_NONPDRM = "どのようなPSVitaコンテンツでもDRM保護をバイパスできます" diff --git a/lang/SPANISH.txt b/lang/SPANISH.txt index 076f3f7d..86f6d44a 100644 --- a/lang/SPANISH.txt +++ b/lang/SPANISH.txt @@ -1,4 +1,4 @@ ---Translates +--Translates STRING_UNSAFE_MODE = "¡¡¡Se necesita el MODO INSEGURO para este Homebrew!!!" STRING_PSVITA_RESTART = "Tu PSVita se reiniciará" @@ -13,10 +13,11 @@ STRING_PLEASE_WAIT = "Por favor espera..." MENU_INSTALL_SD2VITA = "Instalar Plugin SD2VITA" MENU_INSTALL_PLUGINS = "Instalar Plugins" MENU_UNINSTALL_PLUGINS = "Desinstalar Plugins" -MENU_INSTALL_NPDRMFREE = "Instalar plugin npdrm free de qwikrazor87 (Adrenaline)" +MENU_INSTALL_NPDRMFREE = "Instalar plugin npdrm free de Qwik (Adrenaline)" MENU_INSTALL_CONFIG = "Instalar config.txt para PKGJ v0.31+" +MENU_INSTALL_REMASTERED_CTRLS = "Install RemasteredControls plugins from Theflow (Adrenaline)" MENU_EXIT = "Salir" -MENU_INSTALLED_CONFIG = "¡¡¡ux0:pkgi/config.txt para pkgj ha sido instalado!!!" +MENU_INSTALLED_CONFIG = "¡¡¡ ux0:pkgi/config.txt para pkgj ha sido instalado !!!" --install sd2vita SD2VITA_1_WARNING = "Para instalar el plugin de Storage Manager, su sd2vita debe estar lista" @@ -26,22 +27,22 @@ SD2VITA_4_WARNING = "a tu MicroSD antes de continuar, para no perder tus a SD2VITA_5_WARNING = "Por ejemplo: H-encore, Vitashell/ONEMenu, pkgj, adrenaline, etc... " SD2VITA_GAMECARD_DETECTED = "¡¡¡CARTUCHO DE JUEGO DETECTADO!!!" SD2VITA_GAMECARD_REMOVED = "Retíralo para continuar" -SD2VITA_TRIANGLE_INSTALL = "Para proceder a la instalación, presione Triángulo" +SD2VITA_TRIANGLE_INSTALL = "Para proceder a la instalación, presione △" SD2VITA_CIRCLE_CANCEL = "Para cancelar la instalación, presione O" --install plugins INSTALLP_LIST_PLUGINS = "Lista de Plugins listos para instalar:" -INSTALLP_CROSS_INSTALL = "Presione X para instalar plugin(s)" -INSTALLP_SQUARE_MARK = "Presione Cuadrado para seleccionar plugins individuales" -INSTALLP_TRIANGLE_ALL = "Presione Triángulo para instalar TODOS los Plugins" -INSTALLP_SELECT_CLEAN = "Presione SELECT para limpiar los plugins seleccionados" -INSTALLP_LR_SWAP = "Presione L/R para cambiar entre ux0/ur0" +INSTALLP_CROSS_INSTALL = "X : Para instalar plugin(s)" +INSTALLP_SQUARE_MARK = "[] : Para seleccionar plugins individuales" +INSTALLP_TRIANGLE_ALL = "△ : Para instalar TODOS los Plugins" +INSTALLP_SELECT_CLEAN = "SELECT : Para limpiar los plugins seleccionados" +INSTALLP_LR_SWAP = "L/R : Para cambiar entre ux0/ur0" INSTALLP_VITABRIGHT_360 = "Vitabright SOLO para 3.60" INSTALLP_CWARNING_360_365 = "Custom Warning no funciona en 3.67/3.68" -INSTALLP_QUESTION_SHELLSECBAT = "¡Se detectó el plugin shellsecbat!\n\n¿Instalar shellbat en su lugar y desinstalar shellsecbat?" -INSTALLP_QUESTION_SHELLBAT = "¡Se detectó el plugin Shellbat!\n\n¿Instalar shellsecbat en su lugar y desinstalar shellbat?" +INSTALLP_QUESTION_SHELLSECBAT = "\n ¡Se detectó el plugin shellsecbat!\n\n¿Instalar shellbat en su lugar y desinstalar shellsecbat?" +INSTALLP_QUESTION_SHELLBAT = "\n ¡Se detectó el plugin Shellbat!\n\n¿Instalar shellsecbat en su lugar y desinstalar shellbat?" INSTALLP_OSK_TITLE = "Texto para Custom Warning" INSTALLP_OSK_TEXT = "Escribe tu TEXTO aquí" @@ -49,18 +50,25 @@ INSTALLP_OSK_TEXT = "Escribe tu TEXTO aquí" --Uninstall plugins UNINSTALLP_TITLE = "Administrador de Plugins" UNINSTALLP_NOCONFIG_FOUND = "No se encontró config.txt en: " -UNINSTALLP_CROSS_INSTALL = "Presione X para desinstalar plugin" -UNINSTALLP_LR_SWAP = "Presione L/R para cambiar entre ux0/ur0" -UNINSTALLP_LEFTRIGHT_SECTION = "Presione Izquierda/Derecha para cambiar de sección" +UNINSTALLP_CROSS_INSTALL = "X : Para desinstalar plugin" +UNINSTALLP_LR_SWAP = "L/R : Para cambiar entre ux0/ur0" +UNINSTALLP_LEFTRIGHT_SECTION = "Izquierda/Derecha : Para cambiar de sección" --npdrm free -NPDRMFREE_TITLE = "Instalar plugin npdrm free de qwikrazor87" -NPDRMFREE_CROSS_INSTALL = "Presione X para instalar plugin" +NPDRMFREE_TITLE = "Instalar plugin npdrm free de Qwik" +NPDRMFREE_CROSS_INSTALL = "X : Para instalar plugin" NPDRMFREE_INSTALLED = "npdrm free instalado" NPDRMFREE_VSH_UPDATED = "vsh.txt actualizdo" NPDRMFREE_GAME_UPDATED = "game.txt actualizado" NPDRMFREE_NO_PARTITION = "¡Partición no encontrada!" +--pspctrls +PSPCTRLS_TITLE = "Remastered Controls plugins from Theflow (Adrenaline)" +PSPCTRLS_CROSS_INSTALL = "X : Instalar plugin(s)" +PSPCTRLS_LR_SWAP = "L/R : Cambiar de Partición" +PSPCTRLS_GAME_UPDATED = "game.txt actualizado" +PSPCTRLS_DESCP = "Colección de parches analógicos duales para juegos de PSP en Adrenaline" + --descriptions plugins --KERNEL INSTALLP_DESC_NONPDRM = "Le permite evitar la protección DRM en cualquier contenido de PS Vita" diff --git a/lang/english_us.txt b/lang/english_us.txt index dfb4ee91..dd2d4fc0 100644 --- a/lang/english_us.txt +++ b/lang/english_us.txt @@ -13,8 +13,9 @@ STRING_PLEASE_WAIT = "Please wait..." MENU_INSTALL_SD2VITA = "Install Plugin SD2VITA" MENU_INSTALL_PLUGINS = "Install Plugins" MENU_UNINSTALL_PLUGINS = "Uninstall Plugins" -MENU_INSTALL_NPDRMFREE = "Install plugin npdrm free from qwikrazor87 (Adrenaline)" +MENU_INSTALL_NPDRMFREE = "Install plugin npdrm free from Qwik (Adrenaline)" MENU_INSTALL_CONFIG = "Install config.txt for PKGJ v0.31+" +MENU_INSTALL_REMASTERED_CTRLS = "Install RemasteredControls plugins from Theflow (Adrenaline)" MENU_EXIT = "Exit" MENU_INSTALLED_CONFIG = "ux0:pkgi/config.txt for pkgj have been installed !!!" @@ -26,22 +27,22 @@ SD2VITA_4_WARNING = "them from your official MC only copy really needed ap SD2VITA_5_WARNING = "For example: H-encore, Vitashell/ONEMenu, pkgj, adrenaline, etc... " SD2VITA_GAMECARD_DETECTED = "GAMECARD DETECTED !!!" SD2VITA_GAMECARD_REMOVED = "removed before install" -SD2VITA_TRIANGLE_INSTALL = "To proceed to installation press Triangle" +SD2VITA_TRIANGLE_INSTALL = "To proceed to installation press △" SD2VITA_CIRCLE_CANCEL = "To cancel the installation press O" --install plugins INSTALLP_LIST_PLUGINS = "List of plugins ready to install:" -INSTALLP_CROSS_INSTALL = "X to Install the plugin(s)" -INSTALLP_SQUARE_MARK = "Square to select the plugin(s) to install" -INSTALLP_TRIANGLE_ALL = "Triangle to Install ALL the plugins" -INSTALLP_SELECT_CLEAN = "Select to clean selected plugins" -INSTALLP_LR_SWAP = "L/R to swap ux0/ur0" +INSTALLP_CROSS_INSTALL = "X : to Install the plugin(s)" +INSTALLP_SQUARE_MARK = "[] : to select the plugin(s) to install" +INSTALLP_TRIANGLE_ALL = "△ : to Install ALL the plugins" +INSTALLP_SELECT_CLEAN = "SELECT : to clean selected plugins" +INSTALLP_LR_SWAP = "L/R : to swap ux0/ur0" INSTALLP_VITABRIGHT_360 = "Vitabright only for 3.60" INSTALLP_CWARNING_360_365 = "Custom Warning not work for 3.67/3.68" -INSTALLP_QUESTION_SHELLSECBAT = "Plugin shellsecbat detected !!!\n\nInstall shellbat instead and uninstall shellsecbat ?" -INSTALLP_QUESTION_SHELLBAT = "Plugin shellbat detected !!!\n\nInstall shellsecbat instead and uninstall shellbat ?" +INSTALLP_QUESTION_SHELLSECBAT = "\n Plugin shellsecbat detected !!!\n\nInstall shellbat instead and uninstall shellsecbat ?" +INSTALLP_QUESTION_SHELLBAT = "\n Plugin shellbat detected !!!\n\nInstall shellsecbat instead and uninstall shellbat ?" INSTALLP_OSK_TITLE = "Text for Custom Warning" INSTALLP_OSK_TEXT = "Put text here" @@ -49,18 +50,25 @@ INSTALLP_OSK_TEXT = "Put text here" --Uninstall plugins UNINSTALLP_TITLE = "Plugins Manager" UNINSTALLP_NOCONFIG_FOUND = "No config.txt found at: " -UNINSTALLP_CROSS_INSTALL = "X to uninstall plugin" -UNINSTALLP_LR_SWAP = "L/R to swap ux0/ur0" -UNINSTALLP_LEFTRIGHT_SECTION = "Left/Right to switch section" +UNINSTALLP_CROSS_INSTALL = "X : to uninstall plugin" +UNINSTALLP_LR_SWAP = "L/R : to swap ux0/ur0" +UNINSTALLP_LEFTRIGHT_SECTION = "Left/Right : to switch section" --npdrm free -NPDRMFREE_TITLE = "Install npdrm free plugin from qwikrazor87" +NPDRMFREE_TITLE = "Install npdrm free plugin from Qwik" NPDRMFREE_CROSS_INSTALL = "X to install plugin" NPDRMFREE_INSTALLED = "npdrm free installed" NPDRMFREE_VSH_UPDATED = "vsh.txt updated" NPDRMFREE_GAME_UPDATED = "game.txt updated" NPDRMFREE_NO_PARTITION = "Partition not found!" +--pspctrls +PSPCTRLS_TITLE = "Remastered Controls plugins from Theflow (Adrenaline)" +PSPCTRLS_CROSS_INSTALL = "X : to install plugin" +PSPCTRLS_LR_SWAP = "L/R: to swap partitions" +PSPCTRLS_GAME_UPDATED = "game.txt updated" +PSPCTRLS_DESCP = "A collection of dual analog patches for PSP games on Adrenaline" + --descriptions plugins --KERNEL INSTALLP_DESC_NONPDRM = "Allows you to bypass DRM protection on any PS Vita content" diff --git a/menu.lua b/menu.lua new file mode 100644 index 00000000..93f9e9f5 --- /dev/null +++ b/menu.lua @@ -0,0 +1,73 @@ +local sd2vita_callback = function () + sd2vita() +end + +local installp_callback = function () + autoplugin() +end + +local uinstallp_callback = function () + pluginsmanager() +end + +local npdrm_callback = function () + npdrm_free() +end + +local config_callback = function () + if back then back:blit(0,0) end + files.copy("resources/pkgj/config.txt", "ux0:pkgi") + message_wait(MENU_INSTALLED_CONFIG) + os.delay(2000) +end + +local psp_ctrls_callback = function () + psp_ctrls() +end + +local exit_callback = function () + if change then + os.message(STRING_PSVITA_RESTART) + os.delay(250) + buttons.homepopup(1) + power.restart() + end + os.exit() +end + +local menu = { + { text = MENU_INSTALL_SD2VITA, funct = sd2vita_callback }, + { text = MENU_INSTALL_PLUGINS, funct = installp_callback }, + { text = MENU_UNINSTALL_PLUGINS, funct = uinstallp_callback }, + { text = MENU_INSTALL_CONFIG, funct = config_callback }, + { text = MENU_INSTALL_NPDRMFREE, funct = npdrm_callback }, + { text = MENU_INSTALL_REMASTERED_CTRLS, funct = psp_ctrls_callback }, + { text = MENU_EXIT, funct = exit_callback } +} +local scrollm,sel = newScroll(menu,#menu),1 + +change = false +buttons.interval(10,10) +while true do + if change then buttons.homepopup(0) else buttons.homepopup(1) end + buttons.read() + if back then back:blit(0,0) end + + screen.print(480,25,"Autoplugin",1.3,color.green, 0x0, __ACENTER) + + local y = 145 + for i=scrollm.ini, scrollm.lim do + if i == scrollm.sel then draw.fillrect(0,y-7,960,29,color.green:a(90)) end + screen.print(480,y,menu[i].text,1.2,color.white, 0x0, __ACENTER) + y+=37 + end + + screen.flip() + + --Controls + if buttons.up or buttons.analogly < -60 then scrollm:up() end + if buttons.down or buttons.analogly > 60 then scrollm:down() end + + if buttons.cross then menu[scrollm.sel].funct() end + +end diff --git a/resources/controls_psp/game.txt b/resources/controls_psp/game.txt new file mode 100644 index 00000000..028ce652 --- /dev/null +++ b/resources/controls_psp/game.txt @@ -0,0 +1,7 @@ +ms0:/seplugins/gta_remastered.prx 1 +ms0:/seplugins/resistance_remastered.prx 1 +ms0:/seplugins/splintercell_remastered.prx 1 +ms0:/seplugins/tombraider_remastered.prx 1 +ms0:/seplugins/pop_remastered.prx 1 +ms0:/seplugins/khbbs_remastered.prx 1 +ms0:/seplugins/mgs_remastered.prx 1 \ No newline at end of file diff --git a/resources/controls_psp/gta_remastered.prx b/resources/controls_psp/gta_remastered.prx new file mode 100644 index 00000000..820162d3 Binary files /dev/null and b/resources/controls_psp/gta_remastered.prx differ diff --git a/resources/controls_psp/khbbs_remastered.prx b/resources/controls_psp/khbbs_remastered.prx new file mode 100644 index 00000000..01036c8e Binary files /dev/null and b/resources/controls_psp/khbbs_remastered.prx differ diff --git a/resources/controls_psp/mgs_remastered.prx b/resources/controls_psp/mgs_remastered.prx new file mode 100644 index 00000000..4ac2d5b8 Binary files /dev/null and b/resources/controls_psp/mgs_remastered.prx differ diff --git a/resources/controls_psp/pop_remastered.prx b/resources/controls_psp/pop_remastered.prx new file mode 100644 index 00000000..d95d5adf Binary files /dev/null and b/resources/controls_psp/pop_remastered.prx differ diff --git a/resources/controls_psp/resistance_remastered.prx b/resources/controls_psp/resistance_remastered.prx new file mode 100644 index 00000000..a9a6d6eb Binary files /dev/null and b/resources/controls_psp/resistance_remastered.prx differ diff --git a/resources/controls_psp/splintercell_remastered.prx b/resources/controls_psp/splintercell_remastered.prx new file mode 100644 index 00000000..adbf1ae7 Binary files /dev/null and b/resources/controls_psp/splintercell_remastered.prx differ diff --git a/resources/controls_psp/tombraider_remastered.prx b/resources/controls_psp/tombraider_remastered.prx new file mode 100644 index 00000000..366a75f1 Binary files /dev/null and b/resources/controls_psp/tombraider_remastered.prx differ diff --git a/sce_sys/livearea/contents/template.xml b/sce_sys/livearea/contents/template.xml index 110b29b9..7e3ee02b 100644 --- a/sce_sys/livearea/contents/template.xml +++ b/sce_sys/livearea/contents/template.xml @@ -29,7 +29,7 @@ - v3.11 + v3.12 diff --git a/sce_sys/param.sfo b/sce_sys/param.sfo index c97d7556..4f96dfe2 100644 Binary files a/sce_sys/param.sfo and b/sce_sys/param.sfo differ diff --git a/script.lua b/script.lua index a2f5f364..8282e873 100644 --- a/script.lua +++ b/script.lua @@ -52,6 +52,7 @@ dofile("scripts/commons.lua") dofile("scripts/autoplugin.lua") dofile("scripts/pmanager.lua") dofile("scripts/npdrm.lua") +dofile("scripts/pspctrls.lua") dofile("scripts/sd2vita.lua") -dofile("scripts/menu.lua")--Main Cycle +dofile("menu.lua")--Main Cycle diff --git a/scripts/pspctrls.lua b/scripts/pspctrls.lua new file mode 100644 index 00000000..ec04354f --- /dev/null +++ b/scripts/pspctrls.lua @@ -0,0 +1,217 @@ +psp_plugins = { + +--PSP game.txt +{ name = "Grand Theft Auto Remastered", path = "gta_remastered.prx" }, +{ name = "Kingdom Hearts Remastered", path = "khbbs_remastered.prx" }, +{ name = "Metal Gear Solid Remastered", path = "mgs_remastered.prx" }, +{ name = "Prince Of Persia Remastered", path = "pop_remastered.prx" }, +{ name = "Resistance Remastered", path = "resistance_remastered.prx" }, +{ name = "SplinterCell Remastered", path = "splintercell_remastered.prx" }, +{ name = "Tomb Raider Remastered", path = "tombraider_remastered.prx" }, + +} + +function insert_psp_plugin(device,obj) + + --install plugin + files.copy("resources/controls_psp/"..obj.path, device.."pspemu/seplugins/") + if files.exists(device.."pspemu/seplugins/"..obj.path) then + if back then back:blit(0,0) end + message_wait(obj.name.."\n\n"..STRING_INSTALLED) + os.delay(1500) + end + + local nlinea, cont, _find, file_txt = 0,0,false, {} + + for line in io.lines(device.."pspemu/seplugins/game.txt") do + cont += 1 + table.insert(file_txt,line) + + pathp,status = line:match("(.+) (.+)") + + if pathp then + if pathp:lower() == "ms0:/seplugins/"..obj.path then + _find = true + nlinea = cont + end + end + + end + + if _find then + file_txt[nlinea] = "ms0:/seplugins/"..obj.path.." 1" + else + table.insert(file_txt, "ms0:/seplugins/"..obj.path.." 1") + end + + local fp = io.open(device.."pspemu/seplugins/game.txt", "w+") + for s,t in pairs(file_txt) do + fp:write(string.format('%s\n', tostring(t))) + end + fp:close() + +end + +function psp_ctrls() + + local partitions = { "ux0:", "ur0:", "uma0:", "imc0:", "xmc0:" } + local options = {} + + for i=1,#partitions do + if files.exists(partitions[i]) then + local device_info = os.devinfo(partitions[i]) + if device_info then + table.insert(options,partitions[i]) + end + end + end + + local selector,lim,toinstall,x_scr = 1,10,0,5 + local scroll_psp = newScroll(psp_plugins, #psp_plugins) + + buttons.interval(10,10) + while true do + buttons.read() + if back then back:blit(0,0) end + + screen.print(480,10,PSPCTRLS_TITLE,1,color.red, 0x0, __ACENTER) + + --Partitions + local xRoot = 500 + local w = (955-xRoot)/#options + for i=1, #options do + if selector == i then + draw.fillrect(xRoot,55,w,28, color.shine:a(90)) + end + screen.print(xRoot+(w/2), 60, options[i], 1, color.white, color.blue, __ACENTER) + xRoot += w + end + + --List of Plugins + local y = 105 + for i=scroll_psp.ini, scroll_psp.lim do + + if i == scroll_psp.sel then draw.fillrect(0,y-4,943,26,color.green:a(90)) end + screen.print(35,y, psp_plugins[i].name) + + if psp_plugins[i].inst then + screen.print(3,y,"-->",1,color.white,color.green) + end + + y+=28 + end + + ---- Draw Scroll Bar + local ybar,hbar = 105, (lim*26)-2 + draw.fillrect(950,ybar-2,8,hbar,color.shine) + if scroll_psp.maxim >= lim then + local pos_height = math.max(hbar/scroll_psp.maxim, lim) + --Bar Scroll + draw.fillrect(950, ybar-2 + ((hbar-pos_height)/(scroll_psp.maxim-1))*(scroll_psp.sel-1), 8, pos_height, color.new(0,255,0)) + end + + if screen.textwidth(PSPCTRLS_DESCP) > 935 then + x_scr = screen.print(x_scr, 415, PSPCTRLS_DESCP,1,color.white,color.orange,__SLEFT,935) + else + screen.print(480, 400, PSPCTRLS_DESCP,1,color.white,color.orange,__ACENTER) + end + + screen.print(10,440,PSPCTRLS_CROSS_INSTALL,1,color.white,color.black) + screen.print(10,460,INSTALLP_TRIANGLE_ALL,1,color.white,color.black) + screen.print(10,480,PSPCTRLS_LR_SWAP,1,color.white,color.black) + screen.print(10,500,INSTALLP_SQUARE_MARK,1,color.white,color.black) + screen.print(955,500,INSTALLP_SELECT_CLEAN,1,color.white,color.black, __ARIGHT) + + screen.print(10,522,STRING_CIRCLE_BACK,1,color.white,color.black) + screen.print(955,522,STRING_START_CLOSE,1,color.white,color.red, __ARIGHT) + + screen.flip() + + -------------------------- Controls -------------------------- + + if buttons.circle then break end + + --L/R + if buttons.released.l or buttons.released.r then + if buttons.released.l then selector -= 1 else selector += 1 end + if selector > #options then selector = 1 + elseif selector < 1 then selector = #options end + end + + --Exit + if buttons.start then + if change then + os.message(STRING_PSVITA_RESTART) + os.delay(250) + buttons.homepopup(1) + power.restart() + end + os.exit() + end + + if scroll_psp.maxim > 0 then + if buttons.up or buttons.analogly < -60 then scroll_psp:up() x_scr = 5 end + if buttons.down or buttons.analogly > 60 then scroll_psp:down() x_scr = 5 end + + if buttons.cross then + + if not files.exists(options[selector].."pspemu/seplugins/game.txt") then + files.copy("resources/controls_psp/game.txt", options[selector].."pspemu/seplugins/") + end + + if toinstall <= 1 then + --Update game.txt + if files.exists(options[selector].."pspemu/seplugins/game.txt") then + insert_psp_plugin(options[selector], psp_plugins[scroll_psp.sel]) + end + + else + for i=1, scroll_psp.maxim do + if psp_plugins[i].inst then + insert_psp_plugin(options[selector], psp_plugins[i]) + end + end + os.delay(50) + end + + for i=1,scroll_psp.maxim do + psp_plugins[i].inst = false + if toinstall >= 1 then toinstall-=1 end + end + + os.message(PSPCTRLS_GAME_UPDATED) + + end--cross + + --Mark/Unmark + if buttons.square then + psp_plugins[scroll_psp.sel].inst = not psp_plugins[scroll_psp.sel].inst + if psp_plugins[scroll_psp.sel].inst then toinstall+=1 else toinstall-=1 end + end + + --Clean selected + if buttons.select then + for i=1,scroll_psp.maxim do + psp_plugins[i].inst = false + if toinstall >= 1 then toinstall-=1 end + end + end + + --Install ALL plugins + if buttons.triangle then + if not files.exists(options[selector].."pspemu/seplugins/game.txt") then + files.copy("resources/controls_psp/game.txt", options[selector].."pspemu/seplugins/") + end + + for i=1,scroll_psp.maxim do + insert_psp_plugin(options[selector], psp_plugins[i]) + end + + os.message(PSPCTRLS_GAME_UPDATED) + end + + end + + end + +end