[PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)

  • Thread starter Thread starter nfitc1
  • Start date Start date
Status
Not open for further replies.
No, the data is found. I have it documented. It's just not in the KERNEL.BIN so nothing you do in WM can change it.
You know where it is? Great! Could you tell me where exactly I'd have to look? If it's not too complicated, maybe I could do it myself in a hex-editor.
 
You know where it is? Great! Could you tell me where exactly I'd have to look? If it's not too complicated, maybe I could do it myself in a hex-editor.
Sega Chief has done it for his NT mod if I remember right.
 
That discussion needs to be redirected to the Scripting & Reverse Engineering board.
 
Hi all,

I've encountered some sort of serious problem. After updating some files, the tool doesn't seem able to change text in any kernel anymore. I've tried opening several different kernels, but the same unhandled exception is being thrown up each time. I also tried restarting + downloading a 'fresh' tool but it's a no-go; it's saying something about an access violation, like permissions maybe, as far as I can see everything is set to what it should be. I tried moving the kernels to the desktop as well but still the same thing, and it mentions memory corruption:

Code: [Select]
Code:
************** Exception Text **************System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)   at System.Windows.Forms.Control.DefWndProc(Message& m)   at System.Windows.Forms.Control.WmKeyChar(Message& m)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)   at System.Windows.Forms.TextBox.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------WallMarket    Assembly Version: 1.4.5.0    Win32 Version: 1.4.5.0    CodeBase: file:///C:/Users/Sega%20Chief/Desktop/FF7%20Hub/Tools/WallMarket145/WallMarket.exe----------------------------------------Microsoft.VisualBasic    Assembly Version: 8.0.0.0    Win32 Version: 8.0.50727.5483 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5485 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.Forms    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5491 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5488 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------Microsoft.VisualBasic.PowerPacks    Assembly Version: 9.0.0.0    Win32 Version: 3.0.30214.0    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.dll----------------------------------------Accessibility    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.5483 (Win7SP1GDR.050727-5400)    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------
Any ideas what this could be or what I might do to fix it?

Edit: Experimenting with it, it seems I can delete text, but not type it in. I also seem to be able to change the names, just not the description itself; when I hit any letter while the cursor is in the Description box it causes the Exception.
 
Last edited:
I suggest sending the file (kernel and kernel2, although k2 is the text) to NFITC1.  It may help fix the long standing text bug that he's having.
 
I don't know if it's the file that's the source of the problem; this is affecting kernels that haven't been edited at all, like the default ones I keep stored away as back-ups.
 
That looks like it's a memory problem, not having anything to do with WallMarket. Reboot your machine, test your RAM, defrag your HDD, etc.

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.Code: [Select]
Code:
   at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)   at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)   at System.Windows.Forms.Control.DefWndProc(Message& m)   at System.Windows.Forms.Control.WmKeyChar(Message& m)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.TextBoxBase.WndProc(Message& m)   at System.Windows.Forms.TextBox.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
All these methods are API calls and not part of the code I wrote.
 
Alright, I'll give the PC a clean and check it's parts. Cheers for the info.
 
I managed to fix that issue I was having today. What I did was, I uninstalled all the visual basic power packs, .NET, etc. and then reinstalled them to make sure they were clean. It seems to have fixed whatever problem was preventing text entry.
 
I've been trying to run WallMarket, but it comes up saying "WallMarket has stopped working".  I have Microsoft.VisualBasics.PowerPacks.Vs in the assembly folder of Windows, but it's version 10.  So, does version 10 not work WallMarket?
 
None of the compatibility options worked.  This is odd.

I got the PowerPacks when I installed Visual Studio.  I never used any of the tools, but I notice that all of the tools from PowerPacks are there.
 
Last edited:
None of the compatibility options worked.  This is odd.

I got the PowerPacks when I installed Visual Studio.  I never used any of the tools, but I notice that all of the tools from PowerPacks are there.
You need the PowerPacks binaries, not just the assemblies. They may be equivalent. I know the runtimes and the SDK are different, but I'm pretty sure the SDK contains the runtimes.
 
I've created .WM patches for Reunion Beacause R03e and New Threat 1.35, but when I try to "Create KERNEL.BIN" after applying their patches to a clean kernel.bin, I get the following error:

Code: [Select]
Code:
See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.************** Exception Text **************System.ArgumentException: Destination array was not long enough. Check destIndex and length, and the array's lower bounds.   at System.Array.Copy(Array sourceArray, Int32 sourceIndex, Array destinationArray, Int32 destinationIndex, Int32 length, Boolean reliable)   at System.Array.CopyTo(Array array, Int32 index)   at WallMarket.Form1.CreateGrowthkernelfile()   at WallMarket.Form1.CreateKERNELBINToolStripMenuItem_Click(Object sender, EventArgs e)   at WallMarket.Form1.CreateKERNELBINKernel2binToolStripMenuItem_Click(Object sender, EventArgs e)   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)   at System.Windows.Forms.Control.WndProc(Message& m)   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)   at System.Windows.Forms.ToolStrip.WndProc(Message& m)   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)************** Loaded Assemblies **************mscorlib    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll----------------------------------------WallMarket    Assembly Version: 1.4.5.0    Win32 Version: 1.4.5.0    CodeBase: file:///D:/Mods/Final%20Fantasy%20VII/Tools/Wall%20Market%20v145/WallMarket.exe----------------------------------------Microsoft.VisualBasic    Assembly Version: 8.0.0.0    Win32 Version: 8.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll----------------------------------------System    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll----------------------------------------System.Windows.Forms    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll----------------------------------------System.Drawing    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll----------------------------------------System.Runtime.Remoting    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll----------------------------------------Microsoft.VisualBasic.PowerPacks    Assembly Version: 9.0.0.0    Win32 Version: 3.0.30214.0    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic.PowerPacks/9.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.PowerPacks.dll----------------------------------------Accessibility    Assembly Version: 2.0.0.0    Win32 Version: 2.0.50727.8670 (QFE.050727-8600)    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll----------------------------------------************** JIT Debugging **************To enable just-in-time (JIT) debugging, the .config file for thisapplication or computer (machine.config) must have thejitDebugging value set in the system.windows.forms section.The application must also be compiled with debuggingenabled.For example:<configuration>    <system.windows.forms jitDebugging="true" /></configuration>When JIT debugging is enabled, any unhandled exceptionwill be sent to the JIT debugger registered on the computerrather than be handled by this dialog box.
Not sure where to go from here.
 
Weird. That....can't happen. Can you email me the patches? Email's in my profile.
 
First of all thanks for the op for this great tool, it really helped me out, but i'd like to point out something important that i think some people like me warent able to use the tool untill i figured out the reason why it wasnt working for me, for some reason the steam version i have has 2 copies of kernel files one in Data/Kernel and one in Data/Lang-eng/Kernel, i kept editing the one in Data/Kernel, but that didnt work for me i kept trying and trying after like 2 hours for some reason it came to me to look in the files for other kernel files and i found it in Data/Lang-eng/Kernel, and guess what it worked, i'd guess this is either only for the steam version or it might be due to the steam region it was downloaded at, i dont know if this is known or not, but i'd appreciate it if the op specefied this, because i'm pretty sure some people warent able to use the tool because of this issue i had, and if this issue is known dont get mad at me i'm just trying to help, and i'm gonna thank the op again for this tool gonna have too much fun with it.
 
I didn't know that, but no one that has the Steam version has even mentioned a second KERNEL.bin yet; Even in all the differences lists on the Internet I can find don't mention this at all. Are you sure it's not from some mod you're using? Some mods actually do have multiple KERNEL.bin files.
 
i've used tifa's 7th heaven mod, and if what youre talking about is true it still should be pointed out too just in case
 
Hmmm. So the last version came out over a year ago, but I'm just now learning something that WM's been doing wrong. Predicting EXP growth.

Several months (years now?) ago someone suggested making preview windows for the growth curves in case we wanted to modify them. That would make character progression planning a little easier. Well, turns out I just looked at the code for EXP growth and I've been doing it wrong.
The formula for calculating next level's required exp is thus:
Code: [Select]
Code:
requiredEXP = Level_Mod * current_level^2 / 10
So calculating total EXP at a given level would be like so:
Code: [Select]
Code:
for x = 1 to current_level - 1   totalEXP += Level_Mod * x^2 / 10next x
Turns out this is not what WM's doing. First off, it was changing the Level_Mod to fit the current x it was on, not the current level. Secondly, it was not flooring the result like FF7 does. So at the first level, Cloud needs 68 * 1 * 1 / 10 = 6.8 EXP to get to level 2. There are no fractional EXP so the game rounds down because it's not doing math in floating point so Cloud just needs 6 EXP to go from level 1 to 2. Stupid .NET rounds UP when converting from float to integer so it was reporting he needed 7. This was affecting all my calculations and I was assuming Terrance was wrong. I feel kinda dumb that I didn't catch that until now.

HOWEVER! I can still say Terrance's Party Mechanics guide on GFAQs contains an error. This most likely boils down to typos, but he's got the character's final EXP off.

  Mod 76:    2,420,933 XP  (Cloud, Barret, Yuffie, Cid, Sephiroth)
  Mod 77:    2,452,783 XP  (Tifa, Red XIII, Cait Sith, Vincent)
While I can confirm those ought to be the correct values, the list of characters these apply to are reversed. For some reason I feel like I should claim a bounty on such a find. :P

Regardless, I finally got WM in a working state THAT WON'T REQUIRE THE POWER PACKS RUNTIMES ANY LONGER!!!! A few things broke in transition so I'll have to fix it. Then I'll release 1.5.0 and get the source out. It's awful, but I started it over seven years ago. I'd like to think I've learned a thing or two since then.
 
Hmmm. So the last version came out over a year ago, but I'm just now learning something that WM's been doing wrong. Predicting EXP growth.

Several months (years now?) ago someone suggested making preview windows for the growth curves in case we wanted to modify them. That would make character progression planning a little easier. Well, turns out I just looked at the code for EXP growth and I've been doing it wrong.
The formula for calculating next level's required exp is thus:
Code: [Select]
Code:
requiredEXP = Level_Mod * current_level^2 / 10
So calculating total EXP at a given level would be like so:
Code: [Select]
Code:
for x = 1 to current_level - 1   totalEXP += Level_Mod * x^2 / 10next x
Turns out this is not what WM's doing. First off, it was changing the Level_Mod to fit the current x it was on, not the current level. Secondly, it was not flooring the result like FF7 does. So at the first level, Cloud needs 68 * 1 * 1 / 10 = 6.8 EXP to get to level 2. There are no fractional EXP so the game rounds down because it's not doing math in floating point so Cloud just needs 6 EXP to go from level 1 to 2. Stupid .NET rounds UP when converting from float to integer so it was reporting he needed 7. This was affecting all my calculations and I was assuming Terrance was wrong. I feel kinda dumb that I didn't catch that until now.

HOWEVER! I can still say Terrance's Party Mechanics guide on GFAQs contains an error. This most likely boils down to typos, but he's got the character's final EXP off.

While I can confirm those ought to be the correct values, the list of characters these apply to are reversed. For some reason I feel like I should claim a bounty on such a find. :P

Regardless, I finally got WM in a working state THAT WON'T REQUIRE THE POWER PACKS RUNTIMES ANY LONGER!!!! A few things broke in transition so I'll have to fix it. Then I'll release 1.5.0 and get the source out. It's awful, but I started it over seven years ago. I'd like to think I've learned a thing or two since then.
Pretty hyped for this; making the tool more accessible will maybe help people get into the gameplay side of modding a bit more. It'd be nice if there were more of them floating around.
 
Status
Not open for further replies.
Back
Top