D
DLPB_
Guest
This is my attempt at providing a safe list of writable bytes for modders. It takes into consideration what (F=Field, W=World Map, B=Battle, M-Minigame, U=Menu, H-Hard-code) is reading/writing from/to a particular address.
I have also added addresses that I am going to be using for my own mod, and hopefully every other modder here will let me know which bytes they plan on using, so I can add the information accordingly. This will help modders avoid conflicts.
PLEASE SEE THE REUNION DATABASE ON THE REUNION THREAD for the Savemap documentation
Please note:
Although this list will include ALL known field, battle and world map bytes used, it is possible certain bytes are still used (or unusable) by Final Fantasy VII. It is also possible that the modules make changes that we have not yet discovered. If reverse engineering isn't feasible, you can use Ochu (see tools) to discover which addresses are being written to (using the memory logger option).
There may also be additional changes made directly from hardcode.
---------------------------------
A note on Banks:
People have gotten confused by how Final Fantasy VII uses memory.
The most basic explanation of how the savemap works is this:
It is a continuous list of bytes, and part of that list is a chunk of 1280 bytes (5 * 256). We have grouped this chunk of 256 bytes into five ‘Banks’.
See here: http://wiki.qhimm.com/view/FF7/Savemap
Code: [Select]
So the first thing you need to do is to STOP thinking about the savemap of Final Fantasy VII as some sort of segregated/fragmented group of bytes. It's ONE list of bytes, and 1280 of those bytes (which, as I have already noted, are continuous) can be changed by the modules (Battle, Field, World Map, Minigame, Menu), and by Hard-code.
The second thing you need to do is realize that Bank 1 starts at address 0BA4 of the savemap. So, although we use "0" for Bank 1's FIRST byte, it is infact the 2980th (0BA4) byte of the savemap as a whole.
The third thing to note is that the savemap itself starts at an address. This address is the REAL address in actual memory used by Windows. Modders will not need to know this unless they are editing the executable/game memory directly. The savemap itself starts at address DBFD38, and so Bank 1 begins at DC08DC (DBFD38+0BA4 = DC08DC).
So what is the savemap? It's simply a large list of bytes that can edited and saved, so the game can progress properly and so you can save/load that progress.
-----------------------------------
Further information:
The Field module can access all 5 banks, but it does so using its own identifiers. This is the area modders get most confused. If you try to edit the 5 Banks in Makou, you will notice that there are all of a sudden 15 variable areas, each seemingly 256 bytes long. This is NOT the case. The Field module is doing nothing out of the ordinary except accessing the Banks using a rather confusing script.
The Field module has two opcodes that it uses to write to the five Banks. One of those opcodes allows ONE byte values to be written, and the other allows TWO byte values to be written. The Field module differentiates between these two modes by using a different variable identifier for each, even though the SAME Bank is being used for both. The Field module variables are related to the Banks as follows:
1/2 are Bank 1
3/4 are Bank 2
5/6 are temporary vars in game and not saved. They reset to 0 every time you enter new field.
8/9 & 10 cannot be written to.
11/12 are Bank 3
13/14 are Bank 4
15/7 are Bank 5
Field vars 1, 3, 5, 15, 11, 13 are for one-byte writes
Field vars 2, 4, 6, 12, 14, 7 are for two-byte writes
(Yeah, for some reason, variable 7 is for two bytes, and variable 15 is for one byte. Just stop dreaming that FF7 will ever make sense).
Remember that 1/2, 3/4, 5/6, 11/12, 13/14 and 15/7 share the SAME 256 bytes.
So if you write to var [1][10] you are ALSO writing to [2][10] (Bank 1, Byte 10).
And if you write to var [2][10] you are ALSO writing to [1][10] and [1][11] (Bank 1, Bytes 10 and 11).
----------------------------
Special thanks:
NFITC1: Provided bytes that Battle AI uses.
I have also added addresses that I am going to be using for my own mod, and hopefully every other modder here will let me know which bytes they plan on using, so I can add the information accordingly. This will help modders avoid conflicts.
PLEASE SEE THE REUNION DATABASE ON THE REUNION THREAD for the Savemap documentation
---------------------------------Key:
Fuchsia: In use by a modder. Unless you want to conflict with their mod, avoid!
Red: In use by original game. Considered unsafe to edit, unless modder edits the game.
Blue: Considered unsafe to edit, but currently being updated and checked.
Orange: In use by original game, but considered safe to edit. Or has editable bits.
White: Whole byte is free to edit.
Yellow: Conflict. A Byte/ Bit is being shared for two different purposes.
Please note:
Although this list will include ALL known field, battle and world map bytes used, it is possible certain bytes are still used (or unusable) by Final Fantasy VII. It is also possible that the modules make changes that we have not yet discovered. If reverse engineering isn't feasible, you can use Ochu (see tools) to discover which addresses are being written to (using the memory logger option).
There may also be additional changes made directly from hardcode.
---------------------------------
A note on Banks:
People have gotten confused by how Final Fantasy VII uses memory.
The most basic explanation of how the savemap works is this:
It is a continuous list of bytes, and part of that list is a chunk of 1280 bytes (5 * 256). We have grouped this chunk of 256 bytes into five ‘Banks’.
See here: http://wiki.qhimm.com/view/FF7/Savemap
Code: [Select]
Code:
0 - 255 (0-FF): Bank 1 (offset BA4)256 - 511 (100-1FF): Bank 2 (Offset CA4)512 - 767 (200-2FF): Bank 3 (Offset DA4)768 - 1023 (300-3FF): Bank 4 (Offset EA4)1024 - 1279 (400-4FF): Bank 5 (Offset FA4)
The second thing you need to do is realize that Bank 1 starts at address 0BA4 of the savemap. So, although we use "0" for Bank 1's FIRST byte, it is infact the 2980th (0BA4) byte of the savemap as a whole.
The third thing to note is that the savemap itself starts at an address. This address is the REAL address in actual memory used by Windows. Modders will not need to know this unless they are editing the executable/game memory directly. The savemap itself starts at address DBFD38, and so Bank 1 begins at DC08DC (DBFD38+0BA4 = DC08DC).
So what is the savemap? It's simply a large list of bytes that can edited and saved, so the game can progress properly and so you can save/load that progress.
-----------------------------------
Further information:
The Field module can access all 5 banks, but it does so using its own identifiers. This is the area modders get most confused. If you try to edit the 5 Banks in Makou, you will notice that there are all of a sudden 15 variable areas, each seemingly 256 bytes long. This is NOT the case. The Field module is doing nothing out of the ordinary except accessing the Banks using a rather confusing script.
The Field module has two opcodes that it uses to write to the five Banks. One of those opcodes allows ONE byte values to be written, and the other allows TWO byte values to be written. The Field module differentiates between these two modes by using a different variable identifier for each, even though the SAME Bank is being used for both. The Field module variables are related to the Banks as follows:
1/2 are Bank 1
3/4 are Bank 2
5/6 are temporary vars in game and not saved. They reset to 0 every time you enter new field.
8/9 & 10 cannot be written to.
11/12 are Bank 3
13/14 are Bank 4
15/7 are Bank 5
Field vars 1, 3, 5, 15, 11, 13 are for one-byte writes
Field vars 2, 4, 6, 12, 14, 7 are for two-byte writes
(Yeah, for some reason, variable 7 is for two bytes, and variable 15 is for one byte. Just stop dreaming that FF7 will ever make sense).
Remember that 1/2, 3/4, 5/6, 11/12, 13/14 and 15/7 share the SAME 256 bytes.
So if you write to var [1][10] you are ALSO writing to [2][10] (Bank 1, Byte 10).
And if you write to var [2][10] you are ALSO writing to [1][10] and [1][11] (Bank 1, Bytes 10 and 11).
----------------------------
Special thanks:
NFITC1: Provided bytes that Battle AI uses.
Last edited: