Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - DLPB

Pages: [1] 2 3 ... 358
Tools / Re: [FF7PC] Trainer - Ochu (3.4)
« on: Today at 12:02:59 »
Thanks!  It's just a slightly more advanced trainer with a basic debug tool.  Does the trick.

Scripting and Reverse Engineering / Re: World Map Functions
« on: Yesterday at 23:27:07 »
I've fixed the bug with Emerald by skipping most of the functions it needs for the collision and battle to take place if sub is ascending back to overworld.

It's just part of my system for saving and retrieving stored values.  What counts are the base addresses.

I am not sure what you mean by "triangulation".  There is no such thing here.  It's just reading values from static memory addresses.

It's too much messing to say how the savestate works - but suffice to say, I backup the Savemap and temp map
Code: [Select]
SaveMapArray: Array [0..$10F6] of byte;
LastSaveMapArray: Array [0..$10F6] of byte;

TempBankArray: Array [0..$FF] of byte;
LastTempBankArray: Array [0..$FF] of byte;

SaveMap = $DBFD38;  //Save map ends DC0E2C /Bank1/2 starts  DC08DC
TempBank = $CC14D0;

and then restore it before calling the operation that initiates a field / wm jump. The game engine does the rest.  This will never be fool proof, because the game engine was never designed to be loaded in-between scenes and so on.  It can break the game in certain places, but generally it works very well - especially for debugging purposes.  There is no easy method for "save state saving".  I invented my own format and procedure for doing it.

Code: [Select]
   Case TargetModule Of
        1: begin // Field to Field
           Wword($CC0D8A,pWord(@FieldArray[254]) ^); //Screen ID
           Wsint($CC0D8C,pLongint(@FieldArray[0 + (15 * CharacterID)])^ div 4096); //X
           Wsint($CC0D8E,pLongint(@FieldArray[4 + (15 * CharacterID)])^ div 4096); //Y
           Wword($CC0DAA,pWord(@FieldArray[12 + (15 * CharacterID)])^ );           //T
           Wbyte($CC0DAC,pByte(@FieldArray[14 + (15 * CharacterID)])^ );           //D

        3: Wword($CC0D8A, 45); // Set jump to World Map
        4: Wword($CC0D8A, 30); // Set jump to Submarine
        5: Wword($CC0D8A, 60); // Set jump to Snowfield


      Wbyte($CC0D89, 1); // Initiate Field jump
      end else // Current location is world map
           if TargetModule = 1 then // World Map to Field
           Wword($CC0D8A,pWord(@FieldArray[254]) ^); //Screen ID
           Wsint($CC0D8C,pLongint(@FieldArray[0 + (15 * CharacterID)])^ div 4096); //X
           Wsint($CC0D8E,pLongint(@FieldArray[4 + (15 * CharacterID)])^ div 4096); //Y
           Wword($CC0DAA,pWord(@FieldArray[12 + (15 * CharacterID)])^ );           //T
           Wbyte($CC0DAC,pByte(@FieldArray[14 + (15 * CharacterID)])^ );           //D

           Wbyte($CC1644, 0); //may not be needed, but setting to 0 just in case.
           Wbyte($E3A884, 0); //This decides the type of jump. 00 = field/normal world map jump. 01 = Battle. 02 = fmv.
                               //Battle ID is set at E3A88C
           Wbyte($E045E4, 3); //Initiate wm jump - Wbyte($E045F0, 1);
                               // 03 = jump to field. 04 = jump to submerged submarine. 05 = Jump to World map.

I'd help more but I am really busy with The Reunion.

I don't really want to release all the source for it right now, but if you give me specifics, I can at least give you what you need.  The source is Delphi anyway, so may not be as much use to you as you think.

Tools / Re: [FF7] Text editor - touphScript (v1.3.0)
« on: 2018-01-14 22:58:21 »
That's not relevant to this tool.  It's not a fault with this tool.

It will likely be in that same table.

My tool, Ochu, will do it. See tools.

It's fine. It was my fault :) I've corrected.  It will do it on Reunion if you have large map and submerge in submarine.

Actually, yeah....  I traced the wm exit points to a table file in world_us.  I posted about it somewhere.

1A wouldn't, because for safety reasons I have limited it to the parts the game expects to be written to.  It's quite possible to even edit executable code within ff7 to make a text box appear and say "hi!"  - but that isn't a proper use of programming.

As for exit towns and stuff...  The E---- range, as far as I am aware, is the data that has been placed there from files. It's being read from the .ev files in world_us - among other things.  So you'd then have to disable parts that write the data...  and it gets messy.  So short answer is yes and long answer is - it's not a good idea.  Assuming it isn't hardcoded, we will need a world map script editor.

But the var above is not the jump place ID anyway... it's the jump-to module var - in part.  The Town ID etc I noted somewhere else.  I haven't looked into it, but the var above probably when set to a specific value (like 3) - THEN USES the town place ID.

Tools / Re: [FF7] Scene files Editor - Bahamut (v1.0)
« on: 2018-01-09 00:57:51 »

I don't follow 7H at all - and unfortunately I have no idea when Reunion will be released. There is heavy testing ahead - but it's drawing closer.  Bit by bit.  I thought it would be done in Nov.  This month isn't impossible.  But I am turning into Martin from A Song of Ice and Fire with my release date predictions.

I think I've just accidentally missed something with the map X Y and it's ended up moving.  The original code allows for the map to move about the screen (something that never actually happens - ALTHOUGH...  perhaps that code is taking into account of when you submerge).  But since I forced it to one place, the large map X Y will end up being the coords of the small map when you submerge.

So, yeah, this is a Reunion issue.

Yeah but mine does that too.  It does both but randomly. Question is, does it ever do what I showed in the pic in  the original PC?


hands up anyone who has seen this.  Am I responsible?

Scripting and Reverse Engineering / World Map Functions
« on: 2018-01-05 15:41:44 »
Jump Location Var: E045E4.

Set to 02 and you'll have menu access while submerged in the sub.  I needed to find this so I can fix the bug that causes Emerald Weapon battle music when resurfacing. [although I already had it in Ochu.  Whoops! ]

Event loader: 76420A

Events are loaded from here.  There are certain types. Special events, like Emerald Weapon's movement and battle are initiated from 7642D1. For example, when your sub comes into contact with Emerald, certain new functions are called from the parameter placed into the function (0x300 is deducted inside the function, so below are actual jump IDs):

This chain is in  order:

4A, 7659DF (sonic boom effect)
07, 7650d2
1D, 7657C4 Electric sound effect
36, 7650E7 Sub pushed away
28, 765184
3B, 7655F1
34, 765BF2
48, 7655CC Battle swirl - battle intro
55, 765808
17, 7657E1 Initiates Emerald Weapon battle

The World Map simply has opcodes like Field, it seems.  So you could call for a sonic boom effect around a model at any time.

03 is Emerald Weapon movement
04 is involved in Emerald Weapon's movement.  May be the direction change operations (the movement path).
05 Emerald Weapon collision detection.  If this isn't called, the sub will not interact with Weapon - but the battle can still happen if you touch a certain part of Weapon. Issues will arise.  Seems to also depend... I can't always make the collision disable.  May be the return value I am messing up.
06 is Emerald Weapon movement.

21 Unknown

It is likely that Ultima Weapon shares some or all of these functions.


[00E39BC0] is used for the collision and movement.  When it's set to 1, there is no movement and all collision is off.  It's used by 05.

There's no space for max MP with the original font, but you don't really need it, as there is a colour bar under the MP amount showing you the relative difference.  Max HP is already shown in battle with The Reunion.  If you're using 7th Heaven, then that's not applicable to this mod.

Other Mods / Re: [FF7PC] Post bug reports here
« on: 2018-01-05 04:31:28 »
I am sure there was a bug regarding text in battle.  Either a recovery or death text that wouldn't display right.

Anyone any ideas?


Code: [Select]
Write/Read entire savemap (from=1272, to=20670, absValue=0, flag=1)
Write/Read entire savemap (from=1273, to=20672, absValue=0, flag=1)
Write/Read entire savemap (from=1274, to=20674, absValue=0, flag=1)
Var[6][190] = Var[6][190] * 132 (16 bit)
Var[6][190] = Var[6][190] + 84 (16 bit)
Var[6][190] = Var[6][190] + 44 (16 bit)
Var[6][192] = Var[6][192] * 132 (16 bit)
Var[6][192] = Var[6][192] + 84 (16 bit)
Var[6][192] = Var[6][192] + 44 (16 bit)
Var[6][194] = Var[6][194] * 132 (16 bit)
Var[6][194] = Var[6][194] + 84 (16 bit)
Var[6][194] = Var[6][194] + 44 (16 bit)
Write/Read entire savemap (from=20670, to=20670, absValue=0, flag=18)
Write/Read entire savemap (from=20672, to=20672, absValue=0, flag=18)
Write/Read entire savemap (from=20674, to=20674, absValue=0, flag=18)
If Var[6][190] == 0 (else goto label 5)
    If Var[6][192] == 0 (else goto label 5)
        If Var[6][194] == 0 (else goto label 5)
            Game Over
Label 5
The above code with my opcode will check if all 3 members in party have 0 HP and initiate game over if so.  This is more involved than a usual read operation, because it requires finding the current members and then calculating offsets.  Hopefully Myst6re will add a hex toggle, as this looks crap in decimal.  In hex:
Code: [Select]
Write/Read entire savemap (from=4F8, to=50BE, absValue=0, flag=1)
Write/Read entire savemap (from=4F9, to=50C0, absValue=0, flag=1)
Write/Read entire savemap (from=4FA, to=50C2, absValue=0, flag=1)
Var[6][BE] = Var[6][BE] * 84 (16 bit)
Var[6][BE] = Var[6][BE] + 54 (16 bit)
Var[6][BE] = Var[6][BE] + 2C (16 bit)
Var[6][C0] = Var[6][C0] * 84 (16 bit)
Var[6][C0] = Var[6][C0] + 54 (16 bit)
Var[6][C0] = Var[6][C0] + 2C (16 bit)
Var[6][C2] = Var[6][C2] * 84 (16 bit)
Var[6][C2] = Var[6][C2] + 54 (16 bit)
Var[6][C2] = Var[6][C2] + 2C (16 bit)
Write/Read entire savemap (from=50BE, to=50BE, absValue=0, flag=12)
Write/Read entire savemap (from=50C0, to=50C0, absValue=0, flag=12)
Write/Read entire savemap (from=50C2, to=50C2, absValue=0, flag=12)
If Var[6][BE] == 0 (else goto label 5) [16 bit read]
    If Var[6][C0] == 0 (else goto label 5)
        If Var[6][C2] == 0 (else goto label 5)
            Game Over
Label 5

I'm not doing commentary on bugs fixed anymore.  Too any of em.  Just look at the Database here and there.  Recently, Sega Chief fixed being able to acquire chocobos using zantetsuken / remove magic.

And I have added a timer of 5 seconds to set your controls.  So there is no longer a permanent soft lock if you press the controller set up and then can't register a key.

This still needs a bit of refinement and testing... but it's definitely the biggest manual assembly code I've done.

Quite proud of it [shame it has issues :P].  Not sure how much more than can be optimized.  I've prob overlooked something really simple.

Basically new opcode 1A now allows read write of 1,2,3 and 4 bytes from and to addresses in savemap and temp bank.  When From is FFFF, the absolute value param will be used instead of From.  Pointers in the Savemap and Tempbank are also supported...  so if the flags are set correctly, and a value from the SaveMap address CA4 reads BA4, it will be the address of BA4 that is used.

See The Reunion Database :P  Lists all fixes and status there.


And it is done.  If I have to change the shading to make it darker, I can always alter the bytes with a program.

I found out how to change colour of the subs in the minigame - As I thought, like every other 3D element there, it's drawn in realtime.  The numerous (Yes,there are loads) colours that make up a sub are in a table.  Changing main sub to Grey from blue to fit in with the story is doable... but it will prob require a quick program to be made to convert all the values from a blue colour to a grey - which will leave all shading intact.

Pages: [1] 2 3 ... 358