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

hotdog963al

  • Crazy poster
  • *
  • Posts: 234
  • Karma: 1
  • Horse
    • View Profile
    • Horse HQ
Wall Market, FFVII KERNEL.BIN editor
« Reply #300 on: 2009-01-10 21:48:38 »
I'd just like to say thank you for creating this amazing tool!

Stunning, quite stunning. I'm so glad there's an active community out there for all this!  :-)

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #301 on: 2009-01-14 18:01:24 »
Has it really been over a week since I updated? I guess so. I've been taking Akari's suggestion and running with it. Trying to create something that most people could read. I've run into a problem, however.

Ignoring the fact that this is very hard work, let's also talk about erroneous scripts.

Cloud's Physical Counter and Sephiroth's Main scripts have several instances of two consecutive 72h commands. Only one of these will be called (the first one in each instance) and the second one is completely avoided. Why, then, is it there? Some weird deal with their compiler? Who knows.

Sephiroth's Init script is contradicting TFergusson's data. The script starts out:
Code: [Select]
12 6020
10 2440
80
60 01
90
and it does that three more times with other values in the 10h command. Fergusson states in his nots on command 80h:
Quote
Absolutely *NOTHING* happens (not even popping variables off) if 'y' is a '1x'-type Var.
y is either the first or second pop, he wasn't clear on that, but it's probably the first. However, if you notice the first two commands are to pop 1X-type variables to the stack so according to him this script shouldn't do anything . . . but it does.

This particular script, to me, translates as (in very simple terms):

Code: [Select]
Self.MainScriptOverride = True
Self.Flag(200) = True   [&4029]
Self.Flag(100) = True   [&4028]
Self.Flag(400) = True   [&402A]

I'm not sure what these flags so...I guess I'm slightly stuck. I may just have to leave these in assembler (Which is easiest for me, but I know it's not good for everyone).

UPDATE: So who wants to see the decompiled Character AI Scripts? Yeah, I thought you did. ;)

Cloud.PhysicalCounter:

Code: [Select]
LocalVar:0000 <- 255
If (&BattleVar(Self).CharVar(Ally Covered) == 19)
{
LocalVar:0000 <- 80
}
ElseIf (&BattleVar(Self).CharVar(Ally Covered) == 18)
{
LocalVar:0000 <- 81
}
ElseIf (&BattleVar(Self).CharVar(Ally Covered) == 21)
{
LocalVar:0000 <- 82
}
ElseIf (&BattleVar(Self).CharVar(Ally Covered) == 17)
{
LocalVar:0000 <- 83
}
POP()
If ( (&LocalVar:0000 != 255) )
{
BattleVar(TempGlobal) <- &GlobalVar(0000)
BattleVar(2018) <- &BattleVar(TempGlobal)
BattleVar(TempGlobal) <- &BattleVar(TempGlobal) + 3
If ( (&BattleVar(TempGlobal) > 200) )
{
BattleVar(TempGlobal) <- 200
}
GlobalVar(0000) <- &BattleVar(TempGlobal))
Debug.Print: "LOVEPARA CHR:%d, %d->%d" ; &BattleVar(Self).CharVar(Ally Covered) - 16; &BattleVar(2018); &BattleVar(TempGlobal)
}

Cloud.AllyDeath

Code: [Select]
LocalVar:0020 <- 0
If ( (&LocalVar:0020 < 3) )
{
BattleVar(Target) <- FlagBit(&LocalVar:0020)
If (&BattleVar(Target).CharVar(Status))
{
LocalVar:0000 <- 255
If (&BattleVar(Target).CharVar(Formation) == 19)
{
LocalVar:0000 <- 80
}
ElseIf (&BattleVar(Target).CharVar(Formation) == 18)
{
LocalVar:0000 <- 81
}
ElseIf (&BattleVar(Target).CharVar(Formation) == 21)
{
LocalVar:0000 <- 82
}
ElseIf (&BattleVar(Target).CharVar(Formation) == 17)
{
LocalVar:0000 <- 83
}
POP()
If ( (&LocalVar:0000 != 255) )
{
BattleVar(TempGlobal) <- &GlobalVar(0000)
BattleVar(2018) <- &BattleVar(TempGlobal)
BattleVar(TempGlobal) <- &BattleVar(TempGlobal) - 5
If ( (&BattleVar(TempGlobal) < 50) )
{
BattleVar(TempGlobal) <- 50
}
GlobalVar(0000) <- &BattleVar(TempGlobal))
Debug.Print: "LOVEPARA CHR:%d, %d->%d" ; &BattleVar(Target).CharVar(Formation) - 16; &BattleVar(2018); &BattleVar(TempGlobal)
}
LocalVar:0020 <- &LocalVar:0020 + 1
GOTO: 0x0006
}

Barret.Init

Code: [Select]
Link with scripts on character: 3
Tifa.Init

Code: [Select]
Link with scripts on character: 3
Aeris.GeneralCounter

Code: [Select]
If (&BattleVar(Self).CharVar(Formation) == 19)
{
LocalVar:0080 <- 80
}
ElseIf (&BattleVar(Self).CharVar(Formation) == 18)
{
LocalVar:0080 <- 81
}
ElseIf (&BattleVar(Self).CharVar(Formation) == 21)
{
LocalVar:0080 <- 82
}
ElseIf (&BattleVar(Self).CharVar(Formation) == 17)
{
LocalVar:0080 <- 83
}
POP()
BattleVar(Target) <- &BattleVar(Self).CharVar(40D0)
BattleVar(Target) <-  (&BattleVar(Target).CharVar(Formation) == 16)
If (&BattleVar(Target))
{
LocalVar:0020 <- &BattleVar(Self).CharVar(4160)
LocalVar:0060 <- 0
If ( (&LocalVar:0020 < &LocalVar:0000) )
{
LocalVar:00A0 <- 0
LocalVar:0060 <- 2
}
ElseIf (&LocalVar:00C0)
{
If (&LocalVar:0020)
{
LocalVar:00A0 <- 1
LocalVar:0060 <- 4
}
}
ElseIf ( (&LocalVar:0020 > &LocalVar:0000) )
{
LocalVar:00A0 <- 1
LocalVar:0060 <- 2
}
If (&LocalVar:0060)
{
BattleVar(TempGlobal) <- &GlobalVar(0080)
BattleVar(2018) <- &BattleVar(TempGlobal)
If ( (&LocalVar:00A0 == 1) )
{
BattleVar(TempGlobal) <- &BattleVar(TempGlobal) + &LocalVar:0060
If ( (&BattleVar(TempGlobal) > 200) )
{
BattleVar(TempGlobal) <- 200
}
}
Else
{
BattleVar(TempGlobal) <- &BattleVar(TempGlobal) - &LocalVar:0060
If ( (&BattleVar(TempGlobal) < 50) )
{
BattleVar(TempGlobal) <- 50
}
GlobalVar(0080) <- &BattleVar(TempGlobal))
Debug.Print: "LOVEPARA CHR:%d, %d->%d" ; &BattleVar(Self).CharVar(Formation) - 16; &BattleVar(2018); &BattleVar(TempGlobal)
}

Aeris.DeathCounter

Code: [Select]
If (&BattleVar(Self).CharVar(Formation) == 19)
{
LocalVar:0080 <- 80
}
ElseIf (&BattleVar(Self).CharVar(Formation) == 18)
{
LocalVar:0080 <- 81
}
ElseIf (&BattleVar(Self).CharVar(Formation) == 21)
{
LocalVar:0080 <- 82

}
ElseIf (&BattleVar(Self).CharVar(Formation) == 17)
{
LocalVar:0080 <- 83
}
POP()
BattleVar(Target) <- &BattleVar(Self).CharVar(40D0)
BattleVar(Target) <-  (&BattleVar(Target).CharVar(Formation) == 16)
If (&BattleVar(Target))
{
BattleVar(TempGlobal) <- &GlobalVar(0080)
BattleVar(2018) <- &BattleVar(TempGlobal)
BattleVar(TempGlobal) <- &BattleVar(TempGlobal) - 4
If ( (&BattleVar(TempGlobal) < 50) )
{
BattleVar(TempGlobal) <- 50
}
GlobalVar(0080) <- &BattleVar(TempGlobal))
Debug.Print: "LOVEPARA CHR:%d, %d->%d" ; &BattleVar(Self).CharVar(Formation) - 16; &BattleVar(2018); &BattleVar(TempGlobal)
}

Aeris.PreTurn

Code: [Select]
LocalVar:0000 <- &BattleVar(Self).CharVar(4160)
LocalVar:00C0 <- &BattleVar(Self).CharVar(Status)

Yuffie.Init

Code: [Select]
Link with scripts on character: 3
Vincent.Main

Code: [Select]
LocalVar:0000 <- 98 + &BattleVar(2038) * 2
If ( (Random MOD 10 < 3) )
{
LocalVar:0000 <- &LocalVar:0000 + 1
}
BattleVar(Target) <- &BattleVar(2040)
Perform attack(&LocalVar:0000)

Sephiroth.Init

Code: [Select]
BattleVar(Self).CharVar(Flag(0:4)) <- 1
BattleVar(Self).CharVar(Flag(1:1)) <- 1
BattleVar(Self).CharVar(Flag(1:0)) <- 1
BattleVar(Self).CharVar(Flag(1:2)) <- 1

Sephiroth.Main

Code: [Select]
LocalVar:0000 <- 2
BattleVar(Target) <-  (&BattleVar(Target).CharVar(ElemWeakness) >= 5)
If (&BattleVar(Target))
{
Debug.Print: "RESIST EARTH MONSTER" ; 0
LocalVar:0040 <- 1
}
BattleVar(Target) <-  (&BattleVar(2050).CharVar(Formation) == 25)
If ( ( (&BattleVar(Target) And  (&BattleVar(Target).CharVar(Status) == 1) )  And  (Random MOD 3 == 0) ) )
{
LocalVar:0020 <- 8
}
ElseIf ( (BitCount(&BattleVar(Enemies)) == 1) )
{
BattleVar(Target) <- RandomBit(&BattleVar(Enemies))
If ( (&BattleVar(Target).CharVar(4270) >= 16) )
{
LocalVar:0020 <- 29
}
Else
{
LocalVar:0000 <- 1
}
}
Else
{
BattleVar(Target) <- &BattleVar(Enemies)
If (Random MOD 3 + &LocalVar:0040 == 0)
{
LocalVar:0020 <- 38
LocalVar:0040 <- 1

}
ElseIf (Random MOD 3 + &LocalVar:0040 == 1)
{
LocalVar:0020 <- 32
}
Else
{
LocalVar:0020 <- 35
}
Else
{
POP()
}
Perform attack(&LocalVar:0020)

This was JUST made from the WM 1.2.0 "Proving Grounds". This still isn't editable yet, but this is getting closer.
I realize this is a lot to go through just to read it all and it's probably pretty confusing. Let me point out a few details.

1. This is incomplete. There are still a lot of memory addresses that need to be accounted for. I haven't done them all, just most of the ones that show up in these scripts.
2. Look at Aeris's GeneralCounter. There's an ElseIF statement there near the middle that contains a nested IF statement. Normally this condition would just be ANDed to the ElseIf statement. This is not a mistake with my decompiler, this is the way it's written. Weird. It also needs two more close curly brackets. I'm not sure what to do about that...
3. Sephiroth's Main Script has two Elses at the end of it. This is a very strange (and unnecessary) code that makes disassembling weird. The code at script address 0xDD is "72 E000". For those keeping score, you can see why this is a completely unnecessary line. If 72h does mean go to address xxxx, then this line basically says "go to the next line". The way I keep track of Elses is by where these jump commands are. That POP() statement will just execute in that larger Else statement.

That's about all I have to report. It's taken me about 2 days (about 11 hours work) to get these results from what I had shown previously. I have no clue how to write an assembler for this so this maybe just a translator more than anything else. I will not likely write an assembler, but I might...given the proper incentive of course.


Non-WM-related update: Wondering why I haven't been doing anything WM related lately? I've been fixing the PC MDef bug.

WM-related update: I hope people are still looking at this even though it's currently on the second page. I believe I have isolated the damage calculation function and where the 0002h flag is handled. Apparently it does something with the Affect MP.
Here's what it does if that 0002h flag is active (using modified addresses):

Code: [Select]
if (not (&(99E308+6Ch) and 200h) and _   ' Is flag active?
    not (&C3F37C and (1 << arg_4)) and _         ' Not sure what argument_4 is. Often passes
    not (&(99E308+228h) and 40000h) then        ' Some flag it set? Never seen it pass.
var_34 = 1
else
var_34 = 0
end if

var_14 = var_34

var_14 then goes on to be checked with the Affect MP flag.

Code: [Select]
if (var_14 = 0 and _
          not (&(99E308+6Ch) and 100h) and _   'Affect MP?
          not (&(99E308+228h) and 1) and _     'This flag is not on
          not (&(99E308+230h) and C1h) then
     &(99E308+218h) = &(99E308+218h) or 1    'Turn this flag on
end if

If var_14 is 1 it skips several steps afterwards as well.

I don't know what any of these addresses are or what data starts at 0x99E308. Looks like data specific to the current attack since +6Ch is the special flags and something close to +60h and +64 are Camera movements. Apparently that address gets written to address 0x99CE0C almost as soon as the game starts and gets referenced in 1210 places after that! If anyone can identify these addresses let me know. They're probably off from the original 1.02 by a bit.
« Last Edit: 2009-01-20 16:34:49 by NFITC1 »

Tsetra

  • Insane poster
  • *
  • Posts: 322
  • Karma: 1
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #302 on: 2009-02-02 17:46:29 »
Quote
I can tell you several things:
1. This question is more appropriate to be in the WallMarket topic, but oh well
2. Animation index table is NOT in any piece of the kernel. I haven't looked at any other files than the KERNEL.BIN, kernel2.bin, scene.bin and ff7.exe files
3. I can get Heidegger to make me a listing of all the animation indexes used by monsters to see if any of them aren't used.
4. Some of them (particularly summons and limits) are probably in their own category and can't be swapped between them (eg. Howling Moon can't be made to look like Big Guard, Life2, Choco/Mog, etc).
5. When I get this info I'll probably make a new topic about it so everyone knows what it's about (so you know not to check back here Smiley).

Moved.  :-)

Not to annoy you, but I've got yet another issue. I'm not sure what questions I need to ask so I'll just name the problem: basically I'm trying to add entirely new magic into the game. Using WallMarket, the materia can be made to use dummied attack values, but these values apparently are not recognized as spells and so while the materia itself will show the spells (Aero, Aera, Aeraga), when you equip the materia and look at the magic menu, it shows "Cure". I assume that as "Cure" is the first attack ID, this is the default for any attacks going beyond a range acceptable for magic spells.
Do you know if there's a way to expand this?

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #303 on: 2009-02-02 20:11:37 »
First let me assure you all that I AM working on version 1.2.0 of WM. There was a recent Ice Storm across Central to Eastern US and I lost power for four days because of it so I'm pretty behind (though I didn't lose anything, thankfully). I'm just at a loss as to how to make the scripts editable. The easiest way is to allow the user to edit the raw bytes themselves and make a "translated version" next to it that tries to make sense of it all. Compiling is something that I have not yet tried and is probably harder than you'd think.

Now, to address Tsetra's question:

I don't know how to add NEW spells to the game. Replacing spells is easy. I recently replaced the "Exit" materia and "Escape"/"Remove" spells with "Kyuushu" Materia and "Drain"/"Osmose" spells. This worked quite well and I'm happy with the result.
Theory of adding spells:
Several Materia are dummied out. It's a simple thing to get a shop to sell one of these dummied materia too so it's easy enough to create a custom magic materia and put it in the game this way. I'm sure there's also a way to put it in a chest or out in the open field somehow, but I haven't even attempted that yet.
The problem comes in the third KERNEL.BIN section (bottom of the page) which is currently not editable in WM (that'll be in 1.2.0). This section builds the magic menu from the FIRST 54-56 ATTACKS ONLY!. This is how it keeps track of what is to be displayed in the Magic menu and in what order it is to be displayed in. Also keep in mind that the un-edited Magic menu only has 56 entries to it. No more magics can be added without first increasing the size of this list.
« Last Edit: 2009-02-02 22:19:43 by NFITC1 »

Tsetra

  • Insane poster
  • *
  • Posts: 322
  • Karma: 1
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #304 on: 2009-02-02 21:13:42 »
Right now I've got the materia so you can grab it on the field using the SMTRA opcode for testing purposes, it's pretty easy. So guess from here I just find a way to increase the list and likely shift everything after it down eh? Lovely.  :-(

Thanks for WallMarket by the way, quite a powerful tool.

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #305 on: 2009-02-09 15:03:37 »
It occurred to me the other day that I'll have to update Heidegger again. I thought I was happy with it, but now it seems like it's going to be problematic.
As all of you who use it (may or may not) know, every attack that a monster uses in a scene has data in that scene. Well, problem is that the game loads all ~1000 attacks into memory at the beginning of the game. This makes most of the attack data in each scene mostly redundant. Why was it done this way? Who knows. Probably something modular on the part of the developers that they never thought needed changing. This, however, over inflates the SCENE.BIN file as it is with many occurrences of the same attack data for every monster. The attack "Body Blow" is in 38 different scene files! However, it's useless to edit just one of them if you want them all to be that attack unless it's the first one. If the game reads an attack data for an attack that is already loaded it ignores it. So what I want to do with it now is eliminate the scene selection altogether and just have a HUGE list of attacks to the attack selection box on the left of it. Then when it saves it will re-write pretty much every scene that has that attack so you can know that it is going to do that attack. But it will only load attacks IDs >= 256. The others are in the KERNEL.BIN and limit breaks so changing them in the scene.bin won't do any good.
So I'll have to devise a way to inform the user which monster(s) use each attack and which attacks each monster uses. Sounds complicated because it is. :( Oh well. I like a challenge.
It also does this with monster data. If a monster is in multiple scenes, it will only use the first one's data.

WM 1.2.0 is coming along. I've just got to be able to save the Character AI and we're in business. Actually, then I have to merge my test prog into WM and THEN we'll have 1.2.0. :) I'll get there eventually. Just continue to have patience.

Kudistos Megistos

  • Banned
  • No life
  • *
  • Posts: 3936
  • Karma: 1
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #306 on: 2009-02-09 17:50:22 »
M'kay, I'm confused. Do you mean that every attack with the same attack ID will have the same data as the first instance of that attack in the scene.bin file? And monsters as well? (I presume that would be based on ID too). For example, if there were an attack with the ID 0101 in the first scene file, the 27th, the 36th and the 129th, would the game would always use the data from the first file?

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #307 on: 2009-02-09 18:27:58 »
M'kay, I'm confused. Do you mean that every attack with the same attack ID will have the same data as the first instance of that attack in the scene.bin file? And monsters as well? (I presume that would be based on ID too). For example, if there were an attack with the ID 0101 in the first scene file, the 27th, the 36th and the 129th, would the game would always use the data from the first file?

I think so. Two things could happen when a scene is loaded with an already loaded attack.
#1, the game sees that that attack ID is loaded in memory and doesn't re-load it.
#2, the game re-writes it with the attack in the scene file each time.

The KERNEL.BIN attacks always trump the scene.bin attacks. I changed Demi in KERNEL.BIN and a monster that does Demi used the KERNEL.BIN's data to do damage.

I'm pretty sure this happens with monsters too, but the other way around. They might be different depending on where you encounter them. ie, there are a few instances of Gargoyles in the later scenes even though the data is identical. This seems to me, and hopefully many other people, that this is a very inefficient way of storing the data for monsters and attacks as there are several repeated blocks of identical info.

In scene 6 (which, I believe is a dummied scene anyway) there is an Adamantaimai, but in scene 44 it appears again with an identical set of data, AI, attacks, etc. Editing the first instance did nothing. I had to change the script of the second one to get the results I wanted.

Kudistos Megistos

  • Banned
  • No life
  • *
  • Posts: 3936
  • Karma: 1
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #308 on: 2009-02-09 18:54:21 »
This is quite odd. I've just tried giving the MPs different MHP in different scenes as well as changing the attack data for their machine gun attack (using Heidegger ftw!), and it worked for me; the MPs outside of the reactor had different MHP and different damage calculation for their machine gun attack from the ones inside.

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #309 on: 2009-02-09 20:43:28 »
This is quite odd. I've just tried giving the MPs different MHP in different scenes as well as changing the attack data for their machine gun attack (using Heidegger ftw!), and it worked for me; the MPs outside of the reactor had different MHP and different damage calculation for their machine gun attack from the ones inside.

Hmm. Maybe it's because I was using a dummied scene that the first Adamantaimai didn't have any effect on the other one. But I know that KERNEL.BIN attack data trumps the data in the scenes so I assumed the attacks in the scene did too. If it really can be different from scene to scene, I wonder why identical attack data is written into then and uniquely indexed. Hmm....
I GOT IT! The developers were idiots. :P Actually, I don't know why they did this. I had assumed, when I started Heidegger, that the attack indexes were just 0-31 since I knew there are no more than 32 attacks in each scene. This is quite perplexing. I still want to be able to edit every instance of an attack, but I guess I should allow for individual scenes as well...

Sephiroth 1311

  • Fast newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
    • http://www.sadnescity.it
Wall Market, FFVII KERNEL.BIN editor
« Reply #310 on: 2009-02-10 12:34:44 »
Hello there and congrats for your wonderful program.  :-D
I was curious to know if it can compress the text within the files (not using the gzip compression, but with that other system used in PSX kernel.bin, I'm positive you noticed and hacked it), and if it's possible to edit the text table used by the program (in order to make it use special characters, graphical DTEs, etc.).

I'm working on a translation of the game and I'm having problems with maximum size (as of now I just put graphical DTEs which work flawlessly, but I'm sure it's possible to have even more space for translating with the compression).

Ciao!

hay

  • Crazy poster
  • *
  • Posts: 208
  • Karma: 1
  • If I had a buggy, I'd cross the southern desert
    • View Profile
    • The Gold Saucer Maintenance Crew
Wall Market, FFVII KERNEL.BIN editor
« Reply #311 on: 2009-02-10 12:37:46 »
S'up dude! That's pretty amazing piece of software you've made, honestly. I'll surely check it out more as soon as I get enough free time for "fun". Thanks for your great work and keep it up.

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #312 on: 2009-02-10 13:49:43 »
Hello there and congrats for your wonderful program.  :-D
I was curious to know if it can compress the text within the files (not using the gzip compression, but with that other system used in PSX kernel.bin, I'm positive you noticed and hacked it), and if it's possible to edit the text table used by the program (in order to make it use special characters, graphical DTEs, etc.).

I'm working on a translation of the game and I'm having problems with maximum size (as of now I just put graphical DTEs which work flawlessly, but I'm sure it's possible to have even more space for translating with the compression).

Ciao!

Do you mean the compression detailed at the bottom of this page? Then yes. WM already uses that compression method to write text to the KERNEL.BIN. It can be slow on some systems so I made it optional. Just remember to click the "Update Text" box next to the PSX button when you want to change the text in the KERNEL.BIN. It will have to be in PSX mode for this to be available. WM produces exact binary clones of all pieces of the original data all the way down to the gzip file (with one exception that I can't quite explain). I can't say the same for the kernel2.bin file because WM actually makes it smaller (but still fully functional).
To answer your second question about the text table. No, it cannot be changed externally. If you have a custom table of characters in your game I can only suggest that you use that as a reference against that page I linked to earlier.

I just completed the last major programmatical hurdle in version 1.2.0. Don't expect an update very soon because now I have to
1. Get it to save the scripts back to the data it holds
2. merge my "proving grounds" app with WM
Not HARD tasks, but it'll take time. Just wanted everyone to know that barring me getting hit by a bus that the next version is coming. If I make this thing look easy then I'm sorry. ;)

Sephiroth 1311

  • Fast newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
    • http://www.sadnescity.it
Wall Market, FFVII KERNEL.BIN editor
« Reply #313 on: 2009-02-10 15:24:34 »
Hello there and congrats for your wonderful program.  :-D
I was curious to know if it can compress the text within the files (not using the gzip compression, but with that other system used in PSX kernel.bin, I'm positive you noticed and hacked it), and if it's possible to edit the text table used by the program (in order to make it use special characters, graphical DTEs, etc.).

I'm working on a translation of the game and I'm having problems with maximum size (as of now I just put graphical DTEs which work flawlessly, but I'm sure it's possible to have even more space for translating with the compression).

Ciao!

Do you mean the compression detailed at the bottom of this page? Then yes. WM already uses that compression method to write text to the KERNEL.BIN. It can be slow on some systems so I made it optional. Just remember to click the "Update Text" box next to the PSX button when you want to change the text in the KERNEL.BIN. It will have to be in PSX mode for this to be available. WM produces exact binary clones of all pieces of the original data all the way down to the gzip file (with one exception that I can't quite explain). I can't say the same for the kernel2.bin file because WM actually makes it smaller (but still fully functional).
To answer your second question about the text table. No, it cannot be changed externally. If you have a custom table of characters in your game I can only suggest that you use that as a reference against that page I linked to earlier.

I just completed the last major programmatical hurdle in version 1.2.0. Don't expect an update very soon because now I have to
1. Get it to save the scripts back to the data it holds
2. merge my "proving grounds" app with WM
Not HARD tasks, but it'll take time. Just wanted everyone to know that barring me getting hit by a bus that the next version is coming. If I make this thing look easy then I'm sorry. ;)
Hey, thanks for the link! I'll make good use of it. ;)
Anyway, if I were you (but I don't know how hard it is, so I may be wrong ;-) ), I wouldn't disdain an option to load external tables in your wonderful program. I assure you that DTEs save a lot of space!) and special characters.

Thanks again.

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #314 on: 2009-02-10 18:12:15 »
Hey, thanks for the link! I'll make good use of it. ;)
Anyway, if I were you (but I don't know how hard it is, so I may be wrong ;-) ), I wouldn't disdain an option to load external tables in your wonderful program. I assure you that DTEs save a lot of space!) and special characters.

Thanks again.

I have been toying with the idea of a translatable GUI since I know that some people that use WM are not monolingual English speakers. I'm not exactly sure what you mean by DTEs (could you give me an example?), but on context it seems that that wouldn't be an illogical extension of that idea. Currently, you can enter any of the special characters listed on that table into the description fields. I just currently don't have a way to allow the user to do that easily. I've tried several things and wasn't satisfied with any of the solutions. Copy/Paste is the only option left to the user at the time.

Sephiroth 1311

  • Fast newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
    • http://www.sadnescity.it
Wall Market, FFVII KERNEL.BIN editor
« Reply #315 on: 2009-02-10 19:59:42 »
Hey, thanks for the link! I'll make good use of it. ;)
Anyway, if I were you (but I don't know how hard it is, so I may be wrong ;-) ), I wouldn't disdain an option to load external tables in your wonderful program. I assure you that DTEs save a lot of space!) and special characters.

Thanks again.

I have been toying with the idea of a translatable GUI since I know that some people that use WM are not monolingual English speakers. I'm not exactly sure what you mean by DTEs (could you give me an example?), but on context it seems that that wouldn't be an illogical extension of that idea. Currently, you can enter any of the special characters listed on that table into the description fields. I just currently don't have a way to allow the user to do that easily. I've tried several things and wasn't satisfied with any of the solutions. Copy/Paste is the only option left to the user at the time.
DTE (Dual Tile Encoding) means that a single byte is used for two letters.
Take a look at my edited font:



As you can see, I replaced many of the characters which Italian doesn't use and put DTEs at their place.
Of course, those DTEs are optimized for an Italian kernel.bin, but we'd like to have even more space with that compression. ;)

One thing is sure: if you make the right DTEs, you can almost halve the size of some (uncompressed) files.
« Last Edit: 2009-06-23 13:11:45 by Sephiroth 1311 »

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #316 on: 2009-02-10 20:44:14 »
Ah, Yes. Well, this certainly looks easy enough assuming that I did have an external translate table. It looks like everything from 60h onward (with a few exceptions) is never used in the game anyway. It wouldn't be a big deal, I suppose, to change them. The FFVII font itself is just a 32-byte shift from an ANSI standard font family anyway.
Yeah, I've run into DTEs (I never called them that) before while editing FFV and VI. They have pairings like "ng", "st", "th", etc. common pairings that show up all over.
WM is currently looking at text character by character to see how to store them. I'd have to change it to two characters, but I don't think that'll be an issue since the compressions is a byte-wise compression and not text-wise. I'll look into it. Thanks for the idea!

hotdog963al

  • Crazy poster
  • *
  • Posts: 234
  • Karma: 1
  • Horse
    • View Profile
    • Horse HQ
Wall Market, FFVII KERNEL.BIN editor
« Reply #317 on: 2009-02-16 20:47:49 »
[PSX] Uh-oh!

I tested my NTSC mod on the PSP and it crashes when I go onto the Equip Menu, and on the battle swirl!
Also: when I import my NTSC kernel onto a PAL image, it hangs after the Squaresoft logo.
Works fine on the emulator... interesting...

Edit: tried making a new Kernel mod, changing a small amount- yep works!
What could make my new Kernel break on the PSP I wonder? It's smaller in size and is 0-padded when imported with CDMage.
« Last Edit: 2009-02-16 21:48:17 by hotdog963al »

ff7rules

  • Insane poster
  • *
  • Posts: 423
  • Karma: 2
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #318 on: 2009-02-16 21:55:21 »
[PSX] Uh-oh!

I tested my NTSC mod on the PSP and it crashes when I go onto the Equip Menu, and on the battle swirl!
Also: when I import my NTSC kernel onto a PAL image, it hangs after the Squaresoft logo.
Works fine on the emulator... interesting...

Edit: tried making a new Kernel mod, changing a small amount- yep works!
What could make my new Kernel break on the PSP I wonder? It's smaller in size and is 0-padded when imported with CDMage.

Have you tried not padding it at all?

hotdog963al

  • Crazy poster
  • *
  • Posts: 234
  • Karma: 1
  • Horse
    • View Profile
    • Horse HQ
Wall Market, FFVII KERNEL.BIN editor
« Reply #319 on: 2009-02-16 22:09:26 »
Have you tried not padding it at all?
Well that's not going to work. Hmmm.

The Kernel which doesn't work on the PSP is smaller, and gets padded with 0s.
The working one, is exactly the right size.

The confusing part is that it works PERFECTLY in the emulator.
(It's also a complete b*tch to test, as I've got to convert it and copy it over every time I do anything... xD)

!! Come to think of it, this and the two posts above should probably be moved into a separate topic under Programming Feedback. If a moderator could do this I'd be most grateful. Sorry! *gulp*

ff7rules

  • Insane poster
  • *
  • Posts: 423
  • Karma: 2
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #320 on: 2009-02-18 16:47:07 »
Well i just burned a test of my patch onto a disc and tried it on my psx it crashes in the Materia menus and magic menus and strangely enough the limit menu too :S this is both out of and in battle anybody any idea why this is its KERNAL related it has to be. Could it be because i changed the magic names? :|

NFITC1

  • No life
  • *
  • Posts: 2900
  • Karma: 72
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Wall Market, FFVII KERNEL.BIN editor
« Reply #321 on: 2009-02-18 19:23:55 »
The fact that the game even loads means the KERNEL.BIN is correct. Your problem may be that you've made the name of at least one magic and/or Materia too long. Game can't display it so game crashes. What was it you changed?

ff7rules

  • Insane poster
  • *
  • Posts: 423
  • Karma: 2
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #322 on: 2009-02-18 21:03:58 »
The fact that the game even loads means the KERNEL.BIN is correct. Your problem may be that you've made the name of at least one magic and/or Materia too long. Game can't display it so game crashes. What was it you changed?

I changed alot of the names to the ones from final fantasy 8 such as thundara cureaga changed comet2 to CometRain stuff like that. Weird thing is works in the emulatior fine  :?

hotdog963al

  • Crazy poster
  • *
  • Posts: 234
  • Karma: 1
  • Horse
    • View Profile
    • Horse HQ
Wall Market, FFVII KERNEL.BIN editor
« Reply #323 on: 2009-02-18 22:49:00 »
Ok that's probably my problem, what's the limit for a name?

ff7rules

  • Insane poster
  • *
  • Posts: 423
  • Karma: 2
    • View Profile
Wall Market, FFVII KERNEL.BIN editor
« Reply #324 on: 2009-02-19 16:55:20 »
Ok heres everything i have modded for the kernal in wallmarket http://www.imagenerd.com/uploads/moddedinwallmarket-s0uDd.png NOTE: Blank spaces are weapons you cannot get on Disc one.