Author Topic: FF7 PSX Windows  (Read 5772 times)

Stormwave

  • Guest
FF7 PSX Windows
« on: 2008-05-28 15:38:30 »
Hi everyone,
I'm new to the whole FF7 modding thing.

I decided after playing Crisis Core, and gettng FF7 on my PSP to try and make it look a bit...better, fit the PSP screen better etc. On the PSP you can set it to "full" screen, but it cuts off the top and bottom (as the PSP is widescreen).

What I would like to do is move the menus if possible to fit on a widescreen aspect ratio. That includes all inner menus, battle menu and field text.

I want to attempt this a bit at a time, so I decided to start with the field dialog. From what I've learnt so far, the PSX version menus are in the MNU files, but these are hard-coded R3000a? If so, does anyone know if they contain the positioning information? I presume also that the field windows are drawn via the WINDOW opcode in script, and then the psx exe will draw a new window, so I would probably need to find the section in the PSX executable that draws a new window, and ensure that the y value is never less than, say, 100 or something. Does anybody know where about in the PSX executable the opcodes are processed? I know how to disassemble and debug psx files, but have yet to find the right section of code.

Presumably, if I can find the section of the exe that processes opcodes, I can also alter the WMODE function to always have transparent backgrounds? (like the PC mod)

So far I've created a program to extract BINs, read TIMs and decompress LZCs, so I can access most of the files.

I may be wrong on a lot of counts here as well, I've only been reading up on this for the last couple of days, so I don't know everything yet (far from it)

*EDIT*
For anyone who is interested, by using the memory addresses defined in the script DAT files, I've traced the text drawing procedures to 0x800d5f1c and 0x800d6c3c. I'm not quite sure why there are two yet, one for the foreground text and one for shadow? Or maybe one to measure the text? They're called from 0x800d4f2c, which is called from 0x800cafcc (which seems to be active until the field dialog is closed, so probably runs the whole DIALOG function). That is called from 0x800bb9c8, so I presume that is part of the script opcode processing code. Still in the progress of figuring any of this out, I might be 100% wrong.

*EDIT 2*
Okay, I think the offset that handles the WINDOW script is 0x800CB3AC, thats where it reads in the parameters anyway, so unless it is a generalised script reading function (that reads 1 byte, and 4 shorts and then mods them? unlikely), this must be the part that needs altering.
« Last Edit: 2008-05-29 17:29:33 by Stormwave »

Stormwave

  • Guest
Re: FF7 PSX Windows
« Reply #1 on: 2008-05-29 19:24:55 »
Right, now I'm stuck.

Sorry for the bump, I'd editted twice, and wasn't sure what to do :/

I decided to test out if I was at the right section, by forcing all new dialog windows to X = 0. I did this by nulling out the SHL command just after the parameters are loaded, meaning that when the SHR kicks in, the register is cleared. I edited a ePSXe save state to test this. It worked fine...until I entered a battle, and then the field processing code was reset. I've tried to find the code in the SCUS file aswell, to no avail. How does this work? Is it the modules? If so, where is this code stored outside of the executable?
« Last Edit: 2008-05-29 22:57:03 by Stormwave »

obesebear

  • *
  • Posts: 1389
    • View Profile
Re: FF7 PSX Windows
« Reply #2 on: 2008-05-30 03:53:04 »
I think you're on your own with this one.  I've only seen a handful of people display knowledge of PSX files.  Best of luck tho.

Stormwave

  • Guest
Re: FF7 PSX Windows
« Reply #3 on: 2008-05-30 14:55:34 »
Ah right, I think maybe making an entire new engine and porting it to the PSP would be easier, lol. (Or just putting up with the fact that it's not full screen  :lol:)

I'm on the verge of giving up, at least for a bit. The part of the executable that processes the script is written into the PSX RAM at runtime (around offset 0x800CB3B0), but I haven't been able to track this down to anywhere in the ISO at all. I'm presuming it is compressed or encrypted somewhere (maybe even in the SCUS file?). I figured it might make more sense to try and track down it's origins through debugging, but I'm getting completely lost. I noticed it sets memory offsets and lengths around 0x80062D44, which relates to some sort of lookup table around 0x801FD9F0 (which is loaded in also in the same procedure) to write the 0x800CB3B0 code section, but thats about the furthest I've got before getting out of my depth :/ I've got no idea where it is getting the data from.

I was hoping to directly edit the ISO aswell, but if this "modular" code is encrypted or compressed, I would have to worry about recreating the ISO aswell. Nightmare, heh.

Does anyone know how the FIELD.BIN file is stored, or what is in it? I can open all the BINs in the INIT folder, but FIELD.BIN doesn't seem to follow either of the two methods described on the wiki.

obesebear

  • *
  • Posts: 1389
    • View Profile
Re: FF7 PSX Windows
« Reply #4 on: 2008-05-30 17:20:14 »
All I know is the PSP upscales the image.  If I remember correctly you have "original", "zoom", "full screen", and "super zoom".   I've been using full screen and the only downside is that the graphics are a little blurry from the forced scaling, after playing it for a few hours I can't really tell that the graphics have been stretched.

Stormwave

  • Guest
Re: FF7 PSX Windows
« Reply #5 on: 2008-05-30 18:22:32 »
Aye, the stretching doesn't bother me too much. The thing I found annoying on full screen is that the battle menu is missing the bottom (you can't see your 3rd characters stats), plus some dialog appears slightly off the screen. Based on that, I'm playing through it on "normal", but it's really small :/

I suppose I could play it stretched, is it not that bad?
« Last Edit: 2008-05-30 20:18:40 by Stormwave »

auxili160

  • *
  • Posts: 262
    • View Profile
Re: FF7 PSX Windows
« Reply #6 on: 2008-06-08 23:20:12 »
There are different zoom settings, no? Just like a widescreen tv, it should have normal (4:3), zoom (enlarges picture without stretching aspect ratio, but cutting off top and bottom for widescreen media that has bars), fullscreen (stretches 4:3 image to 16:9 so the sides reach the edges of the screen) and justified (psp doesn't have this, but what it does is keep the center of the image unchanged, but stretches the edges more and more as to create an imax-like effect, and minimize squishing of the picture).