Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: browciu on 2005-08-19 15:49:04

Title: Strange Kernel.bin [PSX] Problem.
Post by: browciu on 2005-08-19 15:49:04
Hello. I am having very serious problem with this file. I edited every subfile, but after reconstruction my kernel doesn't work on a console, but it works on epsxe. On the real console the game crashed in every situation, where the kernel was loaded (Menus, battle, shops). I managed to make most of the files work by decreasing their size, but Weapons and armors still don't work. When I replaced them with english ones they still crash, but suddenly Config stops working :( I don't know what to do.  Maybe somebody knows what are the limitations, what filesizes should not be exceeded.
Any suggestions would be veery appreciated. Thanks.
Title: Strange Kernel.bin [PSX] Problem.
Post by: Cyberman on 2005-08-19 21:06:37
You should not exceed the existing size + rounded up to the nearest 2K.

IE
if the file is 1.5K originally you should not exceed 2K for it's size.  
if the file is 2.5K originally you should not exceed 4K for it's size.

There is a potential other reason but first this.
Technically all sectors are reference in the PSX by the following information
Minute:Second:Frame
with the range being
0-79:0-59:0-75
Sectors begin at
2:0:0
as data.
Each sector is 2K in size.  This is why you should be sure it fits within the original sector size.

The other possibility is not as .. fun.
Kernel.bin may be loaded into a fixed location in memory, and it's size is thus FIXED permanently.  This is less likely the case if your repaired kernal.bin is functioning in ePSXe.

I suggest checking if the LBA for Kernal.bin has changed any by your patching first.
Then check if each file location has been displaced and by how much.

Cyb
Title: Strange Kernel.bin [PSX] Problem.
Post by: browciu on 2005-08-20 05:54:59
Well the thing is that original kernel had some weird system inside, and if in text section you put F9XX, then in that place some part of previously written text was printed. That way they didn't have to write 'casts', 'cures' etc. every single time.

I don't understand that thing too good, so I wrote every word 'manually'. That way large part of the files had identical words. Gzip somehow compresses them a lot better and actually my kernel size is 1 kb smaller than the original one, so it didn't modify the TOC. I was looking at the Italian translation, and they got much smaller file too. The biggest size exceeding is about 50 bytes, maybe a bit more.