Author Topic: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)  (Read 442678 times)

TorrinF

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1225 on: 2019-09-28 10:22:29 »
Basically, that means it'll work for PSX modding too since they can be injected into a disc image without rearranging file locations. The prog comes with a basic readme as well that should explain how to use it.
[/quote]

So i've been messing with the tool trying to edit the KERNEL.BIN that i extracted from a PSX image and i can get wallmarket to make the changes on that file but hen i try to add it back the LBA's in the image get rearranged and i cant figure out how to prevent that. Whenever i try and Mount the iso im getting a "file corrupt" error so that's complicating matters too.

this is my first foray into modding on something and Any help would be appreciated

Ty_JY

  • Fast newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1226 on: 2019-12-26 06:23:45 »
Wallmarket download link is down can someone please replace it?


NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1227 on: 2019-12-26 22:36:56 »
There’s one on media fire that’s linked to from the blog. Use that link for now

Ty_JY

  • Fast newbie
  • *
  • Posts: 8
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1228 on: 2019-12-27 00:43:05 »
Sorry I must've been distracted or something... I really should've just tried the 2nd link in the OP. Only the first one is dead

DLPB

  • No life
  • *
  • Posts: 10298
  • Karma: 273
  • The ascension of the ordinary man
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1229 on: 2020-01-02 04:19:19 »
Hi, NFITC1.

As far as I can see, this is a bug in Wallmarket:

When changing next level amounts, the next level var [for the inner bar graphic] ends up greater than it should be.  Possibly you've assumed FF is maximum for this bar (it's really stupid and actually 3F).  So when I load a game after editing with Wallmarket, cloud ends up with a next level var value of FD and not something closer to 3C/D - near full.  The result is that the inner bar is therefore way longer than it should be.

The var is at 00DBFDAD - which is a savemap address for cloud [0x75 overall  or 0x21 in Cloud's http://blackchocobo.sourceforge.net/wiki/index.php?title=Savemap#Character_Record] - but clearly the initial values are pulled from Kernel to this address (and for the other chars).
« Last Edit: 2020-01-02 04:22:39 by DLPB »

NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1230 on: 2020-01-02 12:30:58 »
The max is 3F? That is dumb. I'll look into it. Thanks

DLPB

  • No life
  • *
  • Posts: 10298
  • Karma: 273
  • The ascension of the ordinary man
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1231 on: 2020-01-02 13:55:11 »
tbh... it's a joke that the inner bar isn't been calculated on the fly...  that it has a separate var is ridiculous.

NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1232 on: 2020-01-02 14:54:16 »
tbh... it's a joke that the inner bar isn't been calculated on the fly...  that it has a separate var is ridiculous.
Kind of yes and kind of no. I can easily imagine that it takes a toll on processing power on the PSX's part to calculate a percentage of needed EXP each time the menu is loaded for each character. It might have created a delay that the development team wasn't willing to accept and just made it calculate it at the end of every battle when a lot of background calculations were happening anyway. It might have been overcome at some point and adjusting it to calculate on the fly never got reexamined.

NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1233 on: 2020-01-02 18:30:38 »
Actually, the max is 3D. That's even more bizarre. Maybe the gauge is 61 pixels long.

Starting at 0x5C766A and ending at 0x5C76AB. That's definitely limiting the needed exp bar value to 3D.
« Last Edit: 2020-01-03 11:51:17 by NFITC1 »

DLPB

  • No life
  • *
  • Posts: 10298
  • Karma: 273
  • The ascension of the ordinary man
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1234 on: 2020-01-02 20:12:09 »
the GUI outer bar masks it at 3F.  It still fits nice.    Yeah I also spotted the 3D thing...  3D will be fine I guess.  They probably altered it when they realized the outer bar was smaller.

It's not been well thought out at all.

It's def not 61 pix long though as it's multiplied by 2. That could be because of porting changes though.
« Last Edit: 2020-01-02 20:15:10 by DLPB »

NonagonGoron

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1235 on: 2020-02-26 20:05:50 »
This tool is very nice, and I've used it to change the names that my friend pointed out to me that were different than recurring names in the series (Like Fire2, Bolt2, etc.). My friend asked me how to get it to work on emulator (ePSXe), and I realized that not even I knew. I tried to find help from the forum, but no matter what method I tried or programs I used, the game would never load.  :(

If anyone has clear directions on what program(s) I need to use to go from my edited KERNEL.BIN all the way to the actual game file, that'd be much appreciated!  :)

Sega Chief

  • No life
  • *
  • Posts: 3451
  • Karma: 198
  • These guys is sick
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1236 on: 2020-02-26 22:35:56 »
This tool is very nice, and I've used it to change the names that my friend pointed out to me that were different than recurring names in the series (Like Fire2, Bolt2, etc.). My friend asked me how to get it to work on emulator (ePSXe), and I realized that not even I knew. I tried to find help from the forum, but no matter what method I tried or programs I used, the game would never load.  :(

If anyone has clear directions on what program(s) I need to use to go from my edited KERNEL.BIN all the way to the actual game file, that'd be much appreciated!  :)

First off, the PSX Kernel is almost like the PC kernel except that it keeps the text strings all in one file instead of keeping them in a separate kernel2.bin file. Wall Market works with both though; just make sure it's in PSX mode when editing the extracted PSX kernel.

You need to get a tool like CDMage to extract the Kernel first; this version should do the trick:
https://mega.nz/#!fsU1RYQK!v_FTaA8IuyKHgdL1XDwwzuyJ7fMPs3CH3R-xEHlOr54

Open your disc as a Track M2 (2nd option) rather than the default M1 track. This should load the disc + its files properly. Click into the disc's file structure and look for the INIT folder. Right click on the Kernel.bin inside and extract it to desktop (by default it will try to extract to temporary file folders, make sure to specify somewhere you can easily find it like desktop).

Make your changes to the kernel using wall market tool. Try to keep your file size smaller than the original if possible (as in, by using less text overall; you can try shortening some text here and there to ensure that it does). This is because when we import it back into the disc, it needs to fit in there. It's OK for it to be smaller but can be a hassle if it's larger.

Open the disc again in CDMage (M2 track as before) and go back to the INIT folder. Right-click the KERNEL file and select import, and put your modified kernel in. If it's smaller, it'll ask if you want to pad the file with 00s; confirm and should be ready to go.

If your modified kernel is unavoidably larger, then there's a patch that can be applied to the disc that moves the scene/kernel to a new location with no size limitations:

http://forums.qhimm.com/index.php?topic=11541.0

NonagonGoron

  • Fast newbie
  • *
  • Posts: 6
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1237 on: 2020-02-26 23:07:27 »
First off, the PSX Kernel is almost like the PC kernel except that it keeps the text strings all in one file instead of keeping them in a separate kernel2.bin file. Wall Market works with both though; just make sure it's in PSX mode when editing the extracted PSX kernel.

You need to get a tool like CDMage to extract the Kernel first; this version should do the trick:
https://mega.nz/#!fsU1RYQK!v_FTaA8IuyKHgdL1XDwwzuyJ7fMPs3CH3R-xEHlOr54

Open your disc as a Track M2 (2nd option) rather than the default M1 track. This should load the disc + its files properly. Click into the disc's file structure and look for the INIT folder. Right click on the Kernel.bin inside and extract it to desktop (by default it will try to extract to temporary file folders, make sure to specify somewhere you can easily find it like desktop).

Make your changes to the kernel using wall market tool. Try to keep your file size smaller than the original if possible (as in, by using less text overall; you can try shortening some text here and there to ensure that it does). This is because when we import it back into the disc, it needs to fit in there. It's OK for it to be smaller but can be a hassle if it's larger.

Open the disc again in CDMage (M2 track as before) and go back to the INIT folder. Right-click the KERNEL file and select import, and put your modified kernel in. If it's smaller, it'll ask if you want to pad the file with 00s; confirm and should be ready to go.

If your modified kernel is unavoidably larger, then there's a patch that can be applied to the disc that moves the scene/kernel to a new location with no size limitations:

http://forums.qhimm.com/index.php?topic=11541.0
Woah! Thank you for the swift and helpful reply! I did what you said, and yup, the game is running fine (on ePSXe at least), now with Cura, Fira, and so forth!
I did add more letters to attack names and whatnot than remove them, but the game seems to be running just fine. If I have any more questions, I won't hesitate to ask.
Seriously, though! I feel so much more energized, I may just start a personal translation project! Thanks!  :lol:

Bakura

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1238 on: 2020-03-23 20:29:30 »
Hello!

As I'm not sure if my NFITC1 mail went well, I'm posting my message here! Sorry for my english which is far from perfect. x)

First of all I wanted to thank him for his great work on WallMarket and ProudClod, these two tools are really great and have been an incredible help for FFVII modding.

I have a question about these tools and more precisely this subject: http://forums.qhimm.com/index.php?topic=8195.0

Do we know today what is the basic value of summons animation id on PC? I'd like to turn an enemy attack into a summon but for the moment without this information it's quite complicated. I only get crashes or soft locks... ><'

NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1239 on: 2020-03-24 14:37:04 »
Welcome Bakura!

I don't check the email on my account very often so I'm sorry if I missed a message you sent.

As the PC version goes, you cannot dummy an enemy action to look like a summon. The value required for that would be at least 16Eh just to get to Choco/Mog's action. That's at two bytes long and the animation IDs can only be one. Limits might be able to look like a summon, but WallMarket and ProudClod cannot and will not modify limits.

Bakura

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1240 on: 2020-03-24 21:45:46 »
Thank you NFITC1! I've been following some of the topics on this forum since a long time but I've never needed to ask questions that I couldn't find answers to... until now. Also it's ok for the mail, I had sent it only a few hours before I decided to post here. x)

I was afraid of an answer like that, and it's bad news... Well, if it's not possible with WM I don't think I'll insist. At least it works with magic materias, it's better than nothing.

Thanks again! ^^

DLPB

  • No life
  • *
  • Posts: 10298
  • Karma: 273
  • The ascension of the ordinary man
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1241 on: 2020-03-30 06:05:59 »
Why the final battle doesn't display Cloud's name - Kernel battle text.

Went round the houses on this one in asm...
Quote
[[ALERT WINDOW]][[VAR:CharacterName]] LIMIT BREAK

OK, so here's the deal:

VAR: CharacterName is not used in normal play from what I can see.  The game substitutes this automatically.  But it *is* used in the final Sep battle.

Here, the value being placed in memory is FF FF  when it should be 00 00.  This is why Cloud's name gets omitted.

Search in memory for F8 02 EA FF FF

And you'll see that this corresponds to this exact part.  Again, the FF FF won't be used until the final Sep fight.  So what we need in Wallmarket is probably just the text part - OR the ability to set the correct character var ID ordinal value.

Wallmarket basically needs to preface the user's custom text with F8 02 EA 00 00

F8 02 is command to draw box colour.
EA seems to be a code to denote Limit Break
the next 2 bytes are the final battle character code (Cloud is 00 00)

edit

Scrap that -
game expects FF FF.  It's just that this isn't being changed to Cloud's code for final battle.  FF FF HAS to be there for those 2 bytes - it tells the game to load the correct tag.  So Wallmarket has no need to add [VAR:CharacterName]]   - it basically should force FF FF.


edit 2

00434C97  < this is where it goes wrong.   The final fight traverses the 3 char ID slots and finds that slot 2 and 3 are FF.  I *think* what's happening is that 3 limit break boxes are commanded to appear instead of just 1.  So 2 and 3 show as blank name. So next step for me is to find out why slot 2 and 3 are being used in final fight - or is this the case every time party isn't full?  TIme to do some checking.


yup....  Final fight shows 3 character boxes - and since only one can  appear the last one - with ID FF is used.   The limit code is basically assuming a party of 3 instead of 1 for the last fight.
« Last Edit: 2020-03-30 06:50:18 by DLPB »

NFITC1

  • No life
  • *
  • Posts: 2932
  • Karma: 73
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1242 on: 2020-03-30 14:20:55 »
Not exactly. EA FF FF IS the Character Name variable. I believe FF FF had some function at one time as all the substitution texts have that padding. If you substitute EA with other things you get other results. I believe it actually points to meta data that gets translated and EA is "Name of playable actor that invoked text". It only works in the Marquee, however, so you can't change item names/descriptions to dynamically indicate player ownership like who gets what limit manual (a plague on first-time players).

As for the final fight, it has its own custom code that does a lot of interesting things. The biggest issue is that the battle formation itself increases all party actors' limit gauges so when the function at 0x4320AC gets called around 0x43244A it flags all the party for breaking limits and queues the marquee appropriately. It never checks if there actually IS an actor in that slot so it just displays them all.

DLPB

  • No life
  • *
  • Posts: 10298
  • Karma: 273
  • The ascension of the ordinary man
    • View Profile
Re: [PSX/PC] KERNEL.BIN editor - WallMarket (v1.4.5)
« Reply #1243 on: 2020-03-30 16:27:55 »
well i can sort that.  that's actually the problem [since slot 2 and 3 are empty].EA is the identifier it uses to branch and  collect id but it also requires FFFF or a further branch will fail and you;ll end up with a literal.  I.e.  if 0000 then it will always display Cloud.

edit

004323F2 is the flag that is set in Sep final battle [and 0x08] to always allow Limit break. When set, it forces FF  to the limit gauges.  Likely that flag is set somewhere in scene.bin?

It's definitely being retrieved from an external file from what I can see. Any case, I'll just add a check to limit code to skip if slot empty.

edit 2

I've fixed issue via skipping empty slots.  Might also fix the issue with limit break appearing again when a char is removed from battle like the move Midgardsormr uses.
« Last Edit: 2020-03-30 19:53:49 by DLPB »