summaryrefslogtreecommitdiff
path: root/VP-isowork.lua
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2010-02-01 19:41:24 -0800
committerPixel <pixel@nobis-crew.org>2010-02-01 19:41:24 -0800
commitbb7745a988db1c4be68e4b12b51e16a7e5a21f8e (patch)
tree302d10f5cde19041fa21cacf8ab2bce53f164052 /VP-isowork.lua
parentbf324d5040d17f8194596f90edb2c5965e2c6cc7 (diff)
Fixing a few bugs; japanese iso should now be properly recognized.
Diffstat (limited to 'VP-isowork.lua')
-rw-r--r--VP-isowork.lua24
1 files changed, 13 insertions, 11 deletions
diff --git a/VP-isowork.lua b/VP-isowork.lua
index 7f507cb..ace75af 100644
--- a/VP-isowork.lua
+++ b/VP-isowork.lua
@@ -11,14 +11,16 @@ function apply_hacks(hacks, file)
end
function prepare_out(file_out)
+ local iso_file
if got_psp then
local x = Output "VP-FR.iso"
x:destroy()
- globals[3] = dvdabstract(file_out or "VP-FR.iso", true)
+ iso_file = dvdabstract(file_out or "VP-FR.iso", true)
else
- globals[3] = Output(file_out or "VP-FR.bin")
+ iso_file = Output(file_out or "VP-FR.bin")
end
- local iso = isobuilder(globals[3])
+ local iso = isobuilder(iso_file)
+ iso.iso_file = iso_file
return iso
end
@@ -69,8 +71,8 @@ anti_cd_swap_hack = {
function iso_identify(cdutil, additionnal)
local slusdirentuscd1 = cdutil:findpath "/SLUS_011.56;1"
local slusdirentuscd2 = cdutil:findpath "/SLUS_011.79;1"
- local slusdirentjpcd1 = cdutil:findpath "/SLPM_863_79;1"
- local slusdirentjpcd2 = cdutil:findpath "/SLPM_863_80;1"
+ local slusdirentjpcd1 = cdutil:findpath "/SLPM_863.79;1"
+ local slusdirentjpcd2 = cdutil:findpath "/SLPM_863.80;1"
local slusdirentsquished = cdutil:findpath "/VALKYRIE.EXE;1"
local pspdata = cdutil:findpath "/UMD_DATA.BIN"
if pspdata then
@@ -97,10 +99,10 @@ function iso_identify(cdutil, additionnal)
end
end
- if slusdirentuscd1 and got_cd1 and not additionnal then error "Got twice CD1." end
- if slusdirentuscd2 and got_cd2 and not additionnal then error "Got twice CD2." end
- if slusdirentuscd1 and got_add_cd1 and additionnal then error "Got twice CD1." end
- if slusdirentuscd2 and got_add_cd2 and additionnal then error "Got twice CD2." end
+ if (slusdirentuscd1 or slusdirentjpcd1) and got_cd1 and not additionnal then error "Got twice CD1." end
+ if (slusdirentuscd2 or slusdirentjpcd2) and got_cd2 and not additionnal then error "Got twice CD2." end
+ if (slusdirentuscd1 or slusdirentjpcd1) and got_add_cd1 and additionnal then error "Got twice CD1." end
+ if (slusdirentuscd2 or slusdirentjpcd2) and got_add_cd2 and additionnal then error "Got twice CD2." end
if (slusdirentuscd1 or slusdirentuscd2) and not additionnal then got_us = true end
if (slusdirentjpcd1 or slusdirentjpcd2) and not additionnal then got_jp = true end
@@ -126,8 +128,8 @@ function iso_identify(cdutil, additionnal)
got_add_jp = true
end
- if not slusent then
- slusent = slusdirentuscd1 or slusdirentuscd2 or slusdirentjpcd1 or slusdirentjpcd2 or slusdirentsquished
+ if not slusdirent then
+ slusdirent = slusdirentuscd1 or slusdirentuscd2 or slusdirentjpcd1 or slusdirentjpcd2 or slusdirentsquished
end
if got_us and got_jp then error "2 isos must from the same version of the game." end