Hacking Kenka Bancho 4: The One Year War Translation Project [Help Required!]

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
Hello, everyone!

I'm considering translating the fourth installment in Kenka Bancho series and while I've been able to unpack various parts of the game data, I'm running into a wall attempting to get the scenario text out of the file I believe it to be stored in - /PSP_GAME/USRDIR/PAC1.BIN.

If anyone has any knowledge of how to decompress/unpack and also compress/repack these files, please let me know!
 

ali_ihsan21

Well-Known Member
Member
Joined
Aug 1, 2014
Messages
216
Trophies
0
Age
44
XP
474
Country
this will be off topic but Im sure sooner or later someone will ask them

Do you plan your own translation or google translation? To tell the truth since genuine take so much time and people lost interest in the half way I would prefer google translation.
 
  • Like
Reactions: BuerHightower

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
this will be off topic but Im sure sooner or later someone will ask them

Do you plan your own translation or google translation? To tell the truth since genuine take so much time and people lost interest in the half way I would prefer google translation.

That's a nice question! I genuinely loved and played the hell out of KB3, so I'll do my absolute best to deliver the most polished translation to this project as I can.
This soulful series truly deserves some care and way much more attention to it after all.
 

Zuru

New Member
Newbie
Joined
Mar 20, 2021
Messages
3
Trophies
0
XP
84
Country
Russia
At first glance USRDIR/PAC1.BIN doesn't seem to be packed at all. Look at the file in hex editor, at text representation of data. At the very beginning there seems to be something that looks like a model itself or skeleton data for a model (this kind of data then appears numerous times). At offset 136(hex) 'joint root' words are present, a little further you can find 'pelvis', 'spine', 'neck' and so on. The words are a bit jumbled (presumably with some service symbols or weird encoding) but are present as plain text. That shouldn't be the case if file was archived. The text wouldn't be readable at all.
 
Last edited by Zuru,
  • Like
Reactions: BuerHightower

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
At first glance USRDIR/PAC1.BIN doesn't seem to be packed at all. Look at the file in hex editor, at text representation of data. At the very beginning there seems to be something that looks like a model itself or skeleton data for a model (this kind of data then appears numerous times). At offset 136(hex) 'joint root' words are present, a little further you can find 'pelvis', 'spine', 'neck' and so on. The words are a bit jumbled (presumably with some service symbols or weird encoding) but are present as plain text. That shouldn't be the case if file was archived. The text wouldn't be readable at all.
Oh yeah, thank you! You're right, it seems like the both .bin files are mostly stuffed with player/item 3D models. Well, the search continues!

I can't firmly confirm it right now, but I think that dialogue seems to be stored as images. I'll continue to deep diving into the files, that PAC0.BIN seems to be quite interesting.
 

Zuru

New Member
Newbie
Joined
Mar 20, 2021
Messages
3
Trophies
0
XP
84
Country
Russia
I found where the text is stored in memory. It's a block from about 09E1E6EC to 09E40D39. This doesn't give full understanding of exactly where it is stored on disk but it's a step.

Hiragana is encoded this way:
-One byte per symbol
-First symbol (small ぁ) is hex 01, あ is 02 etc.
-Symbols are in the same order as in Shift-JIS encoding. To get Shift-JIS code add hex 9E to the value and add 82 to the back so 01 becomes 82 9F.

English letters seem to be one byte too. Capital R is C8 so it's either S is C9 or small r is C9 and so on.

Kanji (and katakana I think) use two bytes per symbol. Didn't look too deep into how the game separates one and two byte symbols. It probably has something to do with the value of second byte. I don't have exact symbol codes either.

Example of an encoded string. It's the first line old man says at you after you skip the initial cutscene.
0A060A06F2F50CF50FC83CFE0A232143532ECC7C0613280C (it's around address 09E22468 in memory)

0A060A06 ouou (an exclaimation)
F2F5 0CF5 two kanji of main character's name (could be a pointer to it as the name is changeable)
0FC8 ! mark
3CFE (carriage return)
0A 23 21 43 53 occhan (old man)
2E no ('s)
CC7C i... (kanji for speech)
06 13 28 ...ukoto (what he wants to say)
0C ga (this parts connects to next line)

It's loaded from the umd in z_un_08976F98 function and gets assembled into readable state in z_un_089714F0 but I don't have details on how exactly it's stored (it's in PAK1 and PAK2 but in small pieces I think).
 
Last edited by Zuru,

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
I found where the text is stored in memory. It's a block from about 09E1E6EC to 09E40D39. This doesn't give full understanding of exactly where it is stored on disk but it's a step.

Hiragana is encoded this way:
-One byte per symbol
-First symbol (small ぁ) is hex 01, あ is 02 etc.
-Symbols are in the same order as in Shift-JIS encoding. To get Shift-JIS code add hex 9E to the value and add 82 to the back so 01 becomes 82 9F.

English letters seem to be one byte too. Capital R is C8 so it's either S is C9 or small r is C9 and so on.

Kanji (and katakana I think) use two bytes per symbol. Didn't look too deep into how the game separates one and two byte symbols. It probably has something to do with the value of second byte. I don't have exact symbol codes either.

Example of an encoded string. It's the first line old man says at you after you skip the initial cutscene.
0A060A06F2F50CF50FC83CFE0A232143532ECC7C0613280C (it's around address 09E22468 in memory)

0A060A06 ouou (an exclaimation)
F2F5 0CF5 two kanji of main character's name (could be a pointer to it as the name is changeable)
0FC8 ! mark
3CFE (carriage return)
0A 23 21 43 53 occhan (old man)
2E no ('s)
CC7C i... (kanji for speech)
06 13 28 ...ukoto (what he wants to say)
0C ga (this parts connects to next line)

It's loaded from the umd in z_un_08976F98 function and gets assembled into readable state in z_un_089714F0 but I don't have details on how exactly it's stored (it's in PAK1 and PAK2 but in small pieces I think).
Wow, that's absolutely wonderful! Thank you for your hard work, you've achieved truly a great milestone. This information really makes some stuff easy to proceed and explore further.
 

Zuru

New Member
Newbie
Joined
Mar 20, 2021
Messages
3
Trophies
0
XP
84
Country
Russia
Wow, that's absolutely wonderful! Thank you for your hard work, you've achieved truly a great milestone. This information really makes some stuff easy to proceed and explore further.
You're welcome.

A correction about the encoding. Katakana is one byte, same ordering as hiragana and starts at 5F. Numbers start at BC upwards.
As for english letters capital A is C7, everything above C7 is two bytes. B is C8 00, C is C8 01 etc. Small a is C8 19.
After z there are symbols, and also greek and cyrillic alphabets. After that there are lots and lots of kanji. Exact order can be seen on textures (modern versions of PPSSPP can rip textures which I didn't realize) or in decrypted eboot.bin starting on offset 0026B260 if you switch hex editor encoding to Shift-JIS.
 

Gil_Unx

Member
Newcomer
Joined
Oct 20, 2020
Messages
17
Trophies
0
Age
33
Location
Bandung Barat (KBB)
XP
629
Country
Indonesia
i try parse

PAC0.BIN
PAC1.BIN
PAC2.BIN

PAC0.BIN = Table of Content
PAC1.BIN = FILE1
PAC2.BIN = FILE2



PAC0.BIN:
4 byte numFolder
4 byte numFile
4 byte arrayNamesSize
4 byte unk
16 byte padding
224 byte arrayFolderInfo = (numFolder*32)
69248 byte arrayFileInfo = (numFile*64)
18744 byte arrayNamesInfo = (arrayNamesSize)


arrayFolderInfo:
4 byte index
4 byte maybe elementfolder1?
4 byte unk2
4 byte numberContent
4 byte numberContent again?
4 byte maybe elementfolder2?
8 byte padding
(
I can't explain how to parse arrayFolderInfo,
but my guess might be the result like this:
["./",
"./charadata",
"./data",
"./data/obj",
"./eventdata",
"./icon",
"./sound",]
)



array FileInfo:
2 byte location = 0:dummy,1:FILE1,2:FILE2
2 byte type = 0:folder, 1:file
4 byte nameOffset in arrayNamesInfo
4 byte lenName
4 byte fileOffset
4 byte fileSize
4 byte null
4 byte indexFolder in arrayFolderInfo
4 byte fileSize +(padding 0x800)
32 byte hashFile = SHA256

with information fileName, fileOffset, fileSize
this is enough to create an unpacker / repacker,


the * .lzs file itself uses the lzss0 compression
with the contents of a kind of packed file,
the funny thing recently i was worked
with the exact same compression/file ("STORY OF SEASONS Friends of Mineral Town")


and this python script for unpack / repack,
not the best, but the least
we can make a test, and wait for someone more skilled at this thing.
I have tried to unpack / repack / insert into ISO,
I think it's fine for now.
Game boot as usual.

and about this
I found where the text is stored in memory. It's a block from about 09E1E6EC to 09E40D39. This doesn't give full understanding of exactly where it is stored on disk but it's a step.

the file is in "./eventdata/event_scene_XXXXXX/event_common/DTEventMes.bin"
 

Attachments

  • kenka.7z
    119.1 KB · Views: 180
Last edited by Gil_Unx,
  • Like
Reactions: Zuru

TokyoSoul

New Member
Newbie
Joined
Apr 25, 2021
Messages
1
Trophies
0
Age
34
XP
33
Country
United States
Hey,
Hello, everyone!

I'm considering translating the fourth installment in Kenka Bancho series and while I've been able to unpack various parts of the game data, I'm running into a wall attempting to get the scenario text out of the file I believe it to be stored in - /PSP_GAME/USRDIR/PAC1.BIN.

If anyone has any knowledge of how to decompress/unpack and also compress/repack these files, please let me know!






Will you be able to transport this to PPSSPP? Is there a method you can try to do this? I'm very interested!
 
  • Like
Reactions: tengsusangma

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
Any progress??
Hey! I apologize for the late reply, mostly because I've been actively fiddling with the game files, yet, the overall progress is still quite non-existent, mostly due to my technical illteracy.
Thankfully, the main script files got semi-unlocked by Gil_Unx and his python script, but I kinda have no idea on how to properly proceed further.
 
Last edited by BuerHightower,
  • Like
Reactions: Ghoul43

Bladexpert213

New Member
Newbie
Joined
Nov 3, 2021
Messages
2
Trophies
0
Age
22
XP
44
Country
United States
Hey! I apologize for the late reply, mostly because I've been actively fiddling with the game files, yet, the overall progress is still quite non-existent, mostly due to my technical illteracy.
Thankfully, the main script files got semi-unlocked by Zuru and his python script, but I kinda have no idea on how to properly proceed further.
I’m gonna try looking for help on Reddit since we’ve made large amount of progress so far, relative to the amount of progress on any of the other games in the series. Wish me luck!!!
 
  • Like
Reactions: BuerHightower

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
I’m gonna try looking for help on Reddit since we’ve made large amount of progress so far, relative to the amount of progress on any of the other games in the series. Wish me luck!!!
Thank you! You are right, this series is considered a classic in the East and, yeah, it would be actually great to gain traction among enthusiasts.
81GphLauOmL._AC_SY550_.jpg
 
  • Like
Reactions: Malckyor

BuerHightower

Member
OP
Newcomer
Joined
Nov 13, 2020
Messages
18
Trophies
0
XP
661
Country
United States
Hey, guys!

Just a small, brief update. First of all, I'd like to thank Gil_Unx for developing a pack of such amazing tools, all of this would not be possible without his help. I just can't thank you enough for doing all of this tough coding work for us, honestly.

In an effort to greatly accelerate the development process of this project, I'm releasing a batch of decompiling/recompling scripts for Kenka Bancho 4. The attached archive contains:
1. PAC0.bin unpacker/repaker.
2. DTEventMes.bin encoder/decoder.
As for the textures/menus; I think *TM2 Editor is pretty fine to use with this engine. The only thing that is missing is the VMF thing, but I think the game looks somehow decent with a simple shift font.

2d7vdm.jpg

lines.png


All these scripts should be cross-compatible with other main PSP entries (maybe with a couple of minor tweaks), giving a full opportunity to translate the rest of this series, which includes: Kenka Banchou Portable (喧嘩番長ポータブル); Kenka Banchou 5: Otoko no Housoku (喧嘩番長5〜漢の法則(オトコのルール)〜) and Kenka Bancho Bros. Tokyo Battle Royale (喧嘩番長Bros. トーキョーバトルロイヤル).

As for me, unfortunately, I'm unable to continue working on this project, mostly due to family circumstances. But I do hope that these files will find their way into the hands of professionals.

Oh, and, these GameFAQs guides might come very helpful, if someone is wondering where to start first.
KB4 - https://gamefaqs.gamespot.com/psp/979292-kenka-banchou-4-ichinen-sensou/faqs/61314
KB5 - https://gamefaqs.gamespot.com/psp/610276-kenka-banchou-5-otoko-no-rule/faqs/62106
 

Attachments

  • KB4.zip
    272.1 KB · Views: 121

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto