Post Reply 
 
Thread Rating:
  • 1 Votes - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
final fantasy type-0 iso merge file issue
12-28-2013, 04:18 PM (This post was last modified: 12-28-2013 05:25 PM by SkyBladeCloud.)
Post: #16
RE: final fantasy type-0 iso merge file issue
Yup, it uses block device mode (umd0:, and yeah, the syscall takes the sector of the umd where it has to seek in $a0). I wasn't really hoping that anyone would "fix" this (specially because it's not really wrong, I mean, that's how the PSP officially works Tongue). But if you wanna have a look at it, just tell me and I'll put a video at the end of a +2GB ISO and pad the rest, unnecessary files (let's hope it's not too big xD). Otherwise I'll end up having a look at the code myself (yeah, I mess around with it a lot xD)

~Sky
Find all posts by this user
Quote this message in a reply
12-28-2013, 06:01 PM (This post was last modified: 12-28-2013 06:02 PM by [Unknown].)
Post: #17
RE: final fantasy type-0 iso merge file issue
In BlockDevices.cpp, try changing:

Code:
fseek(f, blockNumber * GetBlockSize(), SEEK_SET);

To:

Code:
fseeko(f, (off_t)blockNumber * (off_t)GetBlockSize(), SEEK_SET);

And:

Code:
    fseek(f,0,SEEK_END);
    filesize = ftell(f);

To:

Code:
    fseek(f,0,SEEK_END);
    filesize = ftello(f);

And also:

Code:
    u32 idx = index[blockNumber];
    u32 idx2 = index[blockNumber+1];
    u8 inbuffer[4096]; //too big
    z_stream z;

    int plain = idx & 0x80000000;

    idx = (idx & 0x7FFFFFFF) << indexShift;
    idx2 = (idx2 & 0x7FFFFFFF) << indexShift;

    u32 compressedReadPos = idx;
    u32 compressedReadSize = idx2 - idx;

    fseek(f, compressedReadPos, SEEK_SET);
    u32 readSize = (u32)fread(inbuffer, 1, compressedReadSize, f);

To:

Code:
    u32 idx = index[blockNumber];
    u32 idx2 = index[blockNumber+1];
    u8 inbuffer[4096]; //too big
    z_stream z;

    int plain = idx & 0x80000000;

    off_t compressedReadPos = (idx & 0x7FFFFFFF) << indexShift;
    off_t compressedReadEnd = ((idx2 & 0x7FFFFFFF) << indexShift);
    off_t compressedReadSize = compressedReadEnd - compressedReadPos;

    fseeko(f, compressedReadPos, SEEK_SET);
    u32 readSize = (u32)fread(inbuffer, 1, compressedReadSize, f);

Does that make it work with iso and cso (make sure you're running a 64-bit build, it probably won't work with 32-bit)? If not, it probably takes just a bit more than that.

-[Unknown]
Find all posts by this user
Quote this message in a reply
12-30-2013, 12:58 AM (This post was last modified: 12-30-2013 12:59 AM by SkyBladeCloud.)
Post: #18
RE: final fantasy type-0 iso merge file issue
Thanks [Unknown], but looks like that didn't do the trick, I'm trying in windows (yeah, x64 build, building ppsspp as x64). The +2GB ISO still working as usual; what I could notice is that e.seekPos in ISOFileSystem::ReadFile is not being updated after the last successful read.

So for example, if the last correctly read sector was sector 1, when trying to read a sector beyond the 2GB limit, it will actually read block number 2 (and that's the argument in FileBlockDevice::ReadBlock).

Anyway, thank you very much for your time Smile

~Sky
Find all posts by this user
Quote this message in a reply
12-30-2013, 02:12 AM (This post was last modified: 12-30-2013 02:15 AM by [Unknown].)
Post: #19
RE: final fantasy type-0 iso merge file issue
Hmm. I suppose sce_lbn references may not work properly with a 2+ GB iso, although umd: access will (it's by LBA.)

If you change seekPos from unsigned int to u64, as well as openSize. Then also change startingPosition of the TreeEntry struct to u64. Might need to add some casts to this line:

e->startingPosition = dir.firstDataSector() * 2048;

And then change:

Code:
        u32 sectorStart = 0xFFFFFFFF, readSize = 0xFFFFFFFF;
        parseLBN(filename, &sectorStart, &readSize);

To:

Code:
        u32 sectorStart = 0xFFFFFFFF;
        u64 readSize = 0xFFFFFFFFFFFFFFFFULL;
        parseLBN(filename, &sectorStart, &readSize);

(both times)

And then in parseLBN:

Code:
bool parseLBN(std::string filename, u32 *sectorStart, u32 *readSize)

...

    if (sscanf(filename_c + pos, "%x", readSize) != 1)
        *readSize = 0;

    return true;
}

Code:
bool parseLBN(std::string filename, u32 *sectorStart, u32 *readSize)

...

    if (sscanf(filename_c + pos, "%llx", readSize) != 1)
        *readSize = 0;

    return true;
}

If that works, it'll mean some hassles to make savestates upgrade, but that could maybe/hopefully do the trick.

Oh, also, you'll need:

Code:
u32 positionOnIso;

Change to u64, and possibly some related casts.

If not (very possible, I'm not sure why it would be reading the second sector...), hmm...

-[Unknown]
Find all posts by this user
Quote this message in a reply
12-30-2013, 02:16 AM
Post: #20
RE: final fantasy type-0 iso merge file issue
(12-30-2013 12:58 AM)SkyBladeCloud Wrote:  Thanks [Unknown], but looks like that didn't do the trick, I'm trying in windows (yeah, x64 build, building ppsspp as x64). The +2GB ISO still working as usual; what I could notice is that e.seekPos in ISOFileSystem::ReadFile is not being updated after the last successful read.

So for example, if the last correctly read sector was sector 1, when trying to read a sector beyond the 2GB limit, it will actually read block number 2 (and that's the argument in FileBlockDevice::ReadBlock).

Anyway, thank you very much for your time Smile

~Sky

oh mine,sir sky, what's happen to ff type-0 merging file when english patch done?? are you combined or something different??

my pc version:
windows 7 ultimate

my pc specs :
intel(R) core(TM)2 duo cpu
E7500 @2,93GHz
2,93GHz, 2,00 GB of RAM

sorry for bad english, i'm indonesian.
Find all posts by this user
Quote this message in a reply
12-30-2013, 04:21 PM (This post was last modified: 12-30-2013 04:30 PM by SkyBladeCloud.)
Post: #21
RE: final fantasy type-0 iso merge file issue
@[Unknown]:

Hum, this is weird, the ISO still working as usual, even if I go and modify currentMIPS->r[6], so the LBA to seek is correct, and trace the execution, making sure that the emulator is correctly reading the data (and after all this it IS correctly reading the data after 2GBs).

However, it's not showing anything, and works as always, there must be something else I'm missing Confused

@ade32:

We'll see, so far it looks like I will have to lol...

...
Find all posts by this user
Quote this message in a reply
12-31-2013, 05:34 PM
Post: #22
RE: final fantasy type-0 iso merge file issue
(12-30-2013 04:21 PM)SkyBladeCloud Wrote:  @[Unknown]:

Hum, this is weird, the ISO still working as usual, even if I go and modify currentMIPS->r[6], so the LBA to seek is correct, and trace the execution, making sure that the emulator is correctly reading the data (and after all this it IS correctly reading the data after 2GBs).

However, it's not showing anything, and works as always, there must be something else I'm missing Confused

@ade32:

We'll see, so far it looks like I will have to lol...

...

sir,,i hope so

@unknown : may i ask to u about other problem here???

my pc version:
windows 7 ultimate

my pc specs :
intel(R) core(TM)2 duo cpu
E7500 @2,93GHz
2,93GHz, 2,00 GB of RAM

sorry for bad english, i'm indonesian.
Find all posts by this user
Quote this message in a reply
01-20-2014, 10:00 AM
Post: #23
RE: final fantasy type-0 iso merge file issue
hello sir sky,,so far how many percent the english patched has been completed??

my pc version:
windows 7 ultimate

my pc specs :
intel(R) core(TM)2 duo cpu
E7500 @2,93GHz
2,93GHz, 2,00 GB of RAM

sorry for bad english, i'm indonesian.
Find all posts by this user
Quote this message in a reply
01-20-2014, 08:51 PM (This post was last modified: 01-20-2014 08:51 PM by LunaMoo.)
Post: #24
RE: final fantasy type-0 iso merge file issue
Oh didn't notice this thread was updated with soo much info;o.

@SkyBladeCloud I wonder would it be possible to cut some of those movies of the iso or even divide the whole data archive and load that externally as dlc's from /game folder or that would require too much change in the game?
I have no clue how psp games loads external dlc's/updates so this might be totally bothersome/stupid idea or simply too late seeing how fast the translation goes(ends?), but would certainly avoid problem with iso size on all devices without need for additional plugins and stuff.
Anyway's thanks a lot for all your and your teams work, hope you guys don't haste the release just because of all the fanboy pressure;O.

http://forums.ppsspp.org/showthread.php?tid=6594 - Custom PPSSPP Shaders!
http://forums.ppsspp.org/showthread.php?tid=3590&pid=117172#pid117172 - simple CE scripts to help creating CWCheats,
https://github.com/LunaMoo/PPSSPP_workarounds - CWCheat workarounds.
Find all posts by this user
Quote this message in a reply
01-24-2014, 05:12 AM (This post was last modified: 01-24-2014 05:12 AM by TheDax.)
Post: #25
RE: final fantasy type-0 iso merge file issue
I'm going to go ahead and close this, since this problem will be fixed soon: https://github.com/hrydgard/ppsspp/pull/5194.

4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Find all posts by this user
Quote this message in a reply
01-25-2014, 08:08 AM
Post: #26
RE: final fantasy type-0 iso merge file issue
Reopened at the TC's request.

4GHz AMD 3900X, 32GB DDR4 RAM, 6GB Nvidia RTX 2060, Asus Crosshair 7 Hero (Wifi), Linux
How to ask useful questions: https://web.archive.org/web/20110214010944/http://support.microsoft.com/kb/555375
I'm not Dark_Alex, nor do I claim to be. Our nicknames are merely coincidence.
Find all posts by this user
Quote this message in a reply
06-16-2014, 02:14 AM
Post: #27
RE: final fantasy type-0 iso merge file issue
hi i have cfw 6.60 ME 1.8 final fantasy type 0 run pretty good but ME dont have infernus, so the videos are pitch black
my question is i have to downgrade to 6.60 pro B-10?
Find all posts by this user
Quote this message in a reply
06-16-2014, 07:17 AM
Post: #28
RE: final fantasy type-0 iso merge file issue
(06-16-2014 02:14 AM)ddkktt Wrote:  hi i have cfw 6.60 ME 1.8 final fantasy type 0 run pretty good but ME dont have infernus, so the videos are pitch black
my question is i have to downgrade to 6.60 pro B-10?

for me its like more u should update cfw

i think 660PRO-C2 is latest

Try AntiMicro graphical program used to map keyboard keys and mouse controls to a gamepad/controller.
http://forums.ppsspp.org/showthread.php?tid=12513
or http://www.x360ce.com
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump: