Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: lasyan3 on 2011-06-13 06:46:40

Title: [FF7] About the Kernel memory management (incorrect savemap ?)
Post by: lasyan3 on 2011-06-13 06:46:40
Hi,

I think there is a mistake in the savemap in the wiki (http://wiki.qhimm.com/FF7/Kernel/Memory_management).
I was displaying the content of some variables in a field message, and I found out that variables of bank 5 with offset 0xF are wrapped around by 255. And on the other side, variables of bank 5 with offset 0x7 can display a max of 65535... So it seems that the 2 offsets should be exchanged in the table.
Title: Re: [FF7] About the Kernel memory management (incorrect savemap ?)
Post by: sithlord48 on 2011-06-13 12:38:48
that bank starts w/ chocobo stats. and ends w/ worldmap locatation. most of that bank thats known is working in black chocobo so im doubting its that incorrect, but there are holes in whats known
Title: Re: [FF7] About the Kernel memory management (incorrect savemap ?)
Post by: lasyan3 on 2011-06-13 13:32:07
Well, after some research, I discovered that in the field scripts, variables of offset 0xF are always set with the SETBYTE command, while variables of offset 0x7 use SETWORD. Same for the commands INC & INC2, DEC & DEC2, and some more. So I'm almost sure that the 2 offsets might be inverted.
But, because the 2 offsets are pointing to the same bank, the same data, it's only the way the field script engine access it that changes. That may be why Black Chocobo works anyway, it probably access the datas on its own, it may not bother on the offsets.
Title: Re: [FF7] About the Kernel memory management (incorrect savemap ?)
Post by: sithlord48 on 2011-06-13 14:39:33
in black chocobo the savemap is treated as one "file" i don't seperate it into the kernel chunks. you can look thru the bc savemap (http://sourceforge.net/apps/mediawiki/blackchocobo/index.php?title=Savemap) this is the map i work off of. before i put the data back to the one stored here. (that i have not done in a while.) i've been working on this section over the weekend adding the world map stuff to bc , and as it turns out the coords info is wrong in how the data is stored(i've not updated that part yet) seams the game treats the map coords as two 32bit ints (unsigned).