[FF7PSX NTSC-U] Disc Extension Patch (v1.0)

  • Thread starter Thread starter Bosola
  • Start date Start date
Status
Not open for further replies.
B

Bosola

Guest
FF7 Disc Extension Patch (NTSC)
Version 1.0
Expands the SCENE.BIN and KERNEL.BIN files for heavier modding

Tired of working within the filesize constraints of FF7 PSX? This Disc Extension Patch expands the KERNEL.BIN to 64kb and the SCENE.BIN to a whopping 2mb. Just apply the PPF patch to an NTSC Disc One ISO and you'll never need worry about filesizes again! Whether you need a bigger KERNEL for a translation patch, or you want to extend the SCENE's AI, the Disc Extension Patch should be part of every modder's arsenal.

This mod currently supports only the NTSC version

Download link: http://www.mediafire.com/?r4h6vfwjw10nmq4

Installing and Using the Patch

The patch is a simple PPF file, with instructions bundled in the download. The patch moves the files in question to the MOVIE directory, right at the end of the disc. You can then use something like CDMage or cdprog to import your modified files into the ISO.

Please be aware that this patch is mostly untested. Whilst I can confirm success playing ISOs with KERNELs and SCENEs larger than allowed in vanilla FF7, I cannot guarantee the exact max sizes of either file.
 
Last edited:
Well, the tools to do this have been about for some time. But they're a bit fiddly to use, and I think most new modders have enough to worry about getting to grips with Wallmarket etc., never mind messing about injecting sectors and what have you. So it seemed a good idea to just create an easy-to-use PPF that anyone can apply to their discs, and carry on without worry.
 
My God...this is incredible.  The capability to do so has been around?  Well thanks for this, you don't have to explain, but is there a simple explanation as to how this is possible? (Lack of Technical Knowledge really shows here, I don't even know the reason why they had to be limited in the first place.)  I will download this immediately and make my way over to the forries.
 
My God...this is incredible.  The capability to do so has been around?  Well thanks for this, you don't have to explain, but is there a simple explanation as to how this is possible?
Sure. I used a tool to edit the filesystem and assign specified sectors to two new files called 'KERNEL.BIN' and 'SCENE.BIN', placed at the end of the disc, in the MOVIES folder. I de-allocated the sectors used by the original files (the data still exists on those sectors, it's just there's no 'files' there). Then I imported the sectors from the original files and updated the YAMADA.BIN, a file lookup table that tells FF7 where certain files are and how large they are, using just a simple hex editor.

All I had to do then was use a PPF patcher.

Honestly, this is no technical feat. I didn't do this to impress anyone - I just knew the process was quite fiddly for new timers, and wanted to hand over a simple PPF patch so that no-one needn't bother with the messy details unless they were really interested.
 
This is grand. I was worried I'd have to create three different scene.bin for each disc, for my mod... ...Not anymore :)

Thanks a lot for this great patch, Bosola  :D
 
The best thing about an extended SCENE and KERNEL is that you can use long AI scripts to introduce new mechanics without breaking either file.

Let's say you wanted a 'Disease status', a poison status that prevents healing. Disease would involve an AI script on each character that sets NullRestorative on or off according to the Poison status, but can make exceptions for healing spells that remove poison. Implementing this would mean applying bulky AI scripts on each character that would exceed the KERNEL's file limits. But with an extended file, that's no longer an issue.

Likewise, you might want to use an autolevel script to make enemies mirror party levels, a la FF8 (I think ff7rules had a similar patch). These scripts are long, and you normally need compromise by cutting certain enemies. With a bigger SCENE.BIN, however...

Finally, if you need to add extra assets to the disc for whatever reason, this patch actually gives you MORE space than you would have in vanilla FF7. This is because I remove some chunky padding files that are actually larger than the new KERNEL and SCENE combined.
 
Last edited:
I think I get it, but just for some further clarification...

So this is as simple as using the ppf patch and pretending that the kernel and scene have always been in the MOVIES folder?  Do I just ignore the kernel in INIT and the scene in BATTLE? Thanks Bosola.
 
Apply the PPF patch, and there will *only* be a KERNEL and SCENE in the MOVIES folder, right at the end of the disc. Use CDMage beta to import into these files, choosing to pad your imports with zeroes if they're too short (they almost always will be). Then just play as you would otherwise.

You won't find the old files in INIT or BATTLE, although technically their data is still present in the sectors they occupied.
 
So, if my understanding is right, you basically moved the 2 files in the end of the iso, nothing more ?
I think this will not work for big kernel.bin files, because there is still the problem of the size in the RAM !
I had the problem : the kernel.bin is loaded in memory, in a "place" that has a fixed size (approximately 24400 bytes). So, if the kernel.bin is bigger than this space, it will erase some other content of the game, which will crash.
One way to bypass that would be to find where the information about the position and/or size of the place in RAM is located, and try to move it. But I think it is more difficult than moving a file on the disk, because, for example, if there is an empty space in the RAM while you're in a field screen, it doesn't mean this space is not used while playing a FMV, or during a fight.
 
Last edited:
Ah. After doing a little research, I think I understand now. FF7 doesn't extract data from the KERNEL.BIN on the fly; it loads the whole thing into a buffer, then sets up pointers to it.

I don't know about the PSX, but a little research indicates that the PC version uses a 27,647 byte buffer.

I can't verify if this is the case with PSX; I don't have a PSX memory map to hand. I tried booting a PSX copy with a KERNEL dummied out with 0x80 characters and looking at a save state taken at the point of crashing. I hoped to see a whole KERNEL. I did see long strings of 0x80s, but split across the memory map into little chunks. I guess it must be more involved than just copying the file then processing it.

As an interesting piece of trivia, I was able to load and start playing a game with a KERNEL full of 0xFFs. Crashed whenever I fought / opened any submenus, but hey. What surprised me is that on PSP, custom kernels break the whole of the main menu, but that little test suggests no kernel data is actually used until one of the submenus are opened. I don't know if that tidbit gives anyone working on PSP any clues, but I thought I'd share it.

I don't see much space in the savestate for a larger kernel.

Another aside. I'm guessing that even on the PC version, where altering memory management is at least possible, KERNELs will still be limited at 65,535 bytes because the pointers are probably 2-byte words (and can't go over 0xFFFF).
 
Last edited:
So if we are working with the PSX then this is exceed max file size at own risk?  I haven't converted Revisited to the extension yet, and I won't if there is a chance it will produce complications.  I'm not changing AI for enemies so I don't need extended scene.bin space, and the amount my kernel.bin would exceed the size limit is minimal.  Thanks for all your work on this though
 
FF7 doesn't extract data from the KERNEL.BIN on the fly; it loads the whole thing into a buffer, then sets up pointers to it.
I don't know about the PSX, but a little research indicates that the PC version uses a 27,647 byte buffer.
I'm almost sure it's the same for PSX.
So if we are working with the PSX then this is exceed max file size at own risk?
For what we know, as long as your kernel.bin is less than 27647 bytes, it will work. But if it is bigger, then you will have "complications".
 
Ah. After doing a little research, I think I understand now. FF7 doesn't extract data from the KERNEL.BIN on the fly; it loads the whole thing into a buffer, then sets up pointers to it.

I don't know about the PSX, but a little research indicates that the PC version uses a 27,647 byte buffer.
You're thinking about the kernel2.bin, which isn't important to this project.
The lengths of the first 9 sections of the KERNEL.BIN (the actual data) is fixed (or should be anyway). It's the text inside the KERNEL.BIN that is important to the PSX and can grow/shrink with editing. It does seem like all the sections would be uncompressed in the RAM at any given time, however.
 
this means we should be able to add, say, new player attacks without the need to actually delete older ones?
 
The only way you could "add" an attack is to put data into one of the blank spots. That would change the compression of the section a little and possibly make it larger.

btw, the KERNEL.BIN originally can be 22K in size, not 27.
 
yes, I mean, in a blank spot that this kernel extension would free up.
 
No, one of the free attack slots that already exists in the KERNEL.

The extension will only really offer longer text strings and AI scripts. New attacks will sit in currently existing but unused attack records, such as the slots between spells and enemy skills. Unless this data is normally compressed (ask NFITC1), these new attacks won't actually take up any more space.
 
I have released a full version of the mod, with support for discs two and three. I've updated the link in the first post accordingly.
 
is it possible that this patch can be made ​​for english(UK) pal version?
 
Status
Not open for further replies.
Back
Top