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.

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.

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.

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.

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.

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).

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.

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.

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.

After looking at Bosola's great notes and some trial and error, I've replicated the patch for other PSX versions (I wanted to patch the Japanese versions, I only patched the kernel myself, but don't see why it wouldn't work for scene.bin as well) I wrote this quite quickly but should be a good guideline..

1. Open Bosola's US patched ISO in CDprog and check the movie dir's LBA and size for KERNEL.BIN and SCENE.BIN (this saves some work doing it yourself)2. Note that null1min.dat has been deleted in the US Patched ISO (this file is for making the game run on really old PlayStations).3. Open Japanese ISO (or another version, I'll just call it the JP ISO from now on) and delete null1min.dat from the movie directory with CDProg. Using CDProg again create new file called KERNEL.BIN in the movie directory with the same LBA and size values as the US patch's KERNEL.BIN in the movie dir (if your also applying SCENE.BIN, do the same for that file).4. Extract yamada.bin from US patched ISO and open in hex editor (you will want to check the values).5. Extract yamada.bin from JP ISO and copy down the values for the KERNEL.BIN and SCENE.BIN according to the directions in this thread (you will be copying them from the values of the US's yamada.bin - don't copy all of them, obviously - just the scene.bin and/or Kernel.bin): http://forums.qhimm.com/index.php?topic=9737.06. Using CDMage import your modified yamada.bin into JP ISO, followed by your OWN (or JP original) kernel.bin into the new kernel space on your movie directory (if its smaller than 64kb, it will just be padded and still work).7. And your done.. at least for disc 1.8. For discs 2 and 3, you will probably want to check the values from the US patched versions 2 and 3 (those versions may even have two NULL files, see if they are deleted in US patch, I haven't checked it myself).

For testing I used modified kernel.bin to see if it was successful (battle message), but if you don't have one - just opening your equip menu and getting into a few battles should be enough to test it. If CDmage says you can't import over the kernel.bin in the movie dir you have done something wrong and need to start again. If the game doesn't boot but works absolutely fine via save states you've also done something wrong but getting close

One thing I'm not sure about is my original KERNEL.BIN still exists in the Init directory. Whether you delete that or not is up to you I think, I don't think it can harm anything?

Have you added much data to your KERNEL Bosola, how does it hold up?

I took a look at applying the magic defense bug also, but seems a lot a more work with armor pointers and stuff..