PDA

View Full Version : Extract Script from Never7 (psp version)


animexploit
2009-04-14, 13:50
Hey I have recently come into contact with the psp version of Never7, I have someone that can do the translation but it is a pain in the ass to get everything extracted first, if anyone has knowledge in doing this with the psp then that would be a big help.

Rasqual Twilight
2009-04-14, 16:05
mac.afs has the script.
.BIP format, probably compressed data.
don't have more specifics otherwise.

animexploit
2009-04-14, 18:12
thanks, I extracted all the files and stuff but now I have .afs to deal with, the movie, bgm, and voice files are fine so all that I really need is a way to get through this. I may switch to the PC version of the game depending on how this goes. EDIT: Ok now I used a program to extract those files, now I have to deal with .bip and .t2p files. help guys?

Minagi
2009-04-15, 08:13
Could you upload a sample file or two of the BIPs? I have a tool I wrote in my programming folder for BIP files which I'm pretty sure was used for another game in the series but I'm not sure if it would work with the PSP version.

Edit: Just remembered, I used it to dump the scripts for the Remember11 project. I'll get back to you in an hour or two about getting it to work on Never7 PSP.

Edit 2: Yep, just as I thought. This is for the most part the same BIP format as Remember11 PC used.

Small bit of YL1D5_2.BIP:
いつもよりも遅い目覚めだった。%K%P
オレはリビングに出て、窓から海を眺めた。%K%P
昨晩の星空からは信じられないような曇天模様だ。%K%P
高層をすっぽりと覆うような雲……どうやら雨雲ではないようだった。%K%P
優夏「おはよ♪」%K%P
振り向くと、優夏が立っていた。%K%P
指先に、冷たい感触が蘇る。%K%P
誠「お、おはよう……」%K%P
ぎこちない挨拶だった。%K%P
優夏「なによ、誠ぉ~。ちゃんと起きてる?」%K%P
誠「起きてるよ」%K%P
優夏「起きてないよ、その目は」%K%P
誠「目?」%K%P
優夏「うん。鏡見てごらん? フルラウンド闘った後のボクサーみたいになってるから……」%K%P
その言葉を確かめるべく、オレは自分のまぶたに触れてみた。%K%P
確かに、熱を帯びている。鏡を見るまでもなく、そこが腫れ上がっていることがわかった。%K%P
寝不足、ってわけでもあるまいし……逆に寝過ぎたからか?%K%P
優夏「ねえ? 眠気覚ましに、散歩でも行こうか?」%K%P
誠「散歩かぁ……」%K%P
誠「あんまり良い天気じゃないけど、ここに閉じこもってるよりはマシかもな」%K%P
それに、聞かなきゃいけないことも、いまだに聞けてないし……。%K%P
今日こそは、何がなんでも聞き出さなければ!%K%P
誠「それじゃあ一応、遙と億彦にも伝えとくか?」%K%P
優夏「え? 何を?」%K%P
誠「散歩してくるって──そのことを。ほら、昨日のくるみの時みたいに、変な心配されても困るだろ?」%K%P
優夏「ああ、なるほどね……」%K%P
優夏「だけど、その必要はないと思うよ?」%K%P
誠「何でだ?」%K%P
優夏「遙、今朝早く出かけちゃったから」%K%P
優夏「また釣りに行くんだってさ」%K%P
誠「ふーん……。じゃあ、億彦は?」%K%P
優夏「億彦くんは、沙紀の所に行ったみたい」%K%P
誠「え? 沙紀んとこに? ……何でまた?」%K%P
優夏「たぶん……ちょっとした、罪悪感を覚えてるんだと思うよ?」%K%P
優夏「沙紀と遙の関係に火をつけたのは、元はと言えば、億彦くんだからね?」%K%P
優夏「億彦くんは億彦くんなりに責任を感じてたみたいで……だから沙紀のことも、自分でケジメをつけようと……」%K%P
誠「億彦が、そう言ってたのか?」%K%P
優夏「はっきりとは言わなかったけど……まあ、そんなようなことを……」%K%P
誠「へぇ……見かけによらず、硬いとこもあるんだな、億彦のやつ」%K%P
優夏「意外と、お似合いなのかもよ? あの2人……」%K%P
誠「?」%K%P
優夏「だって2人とも『本当は優しい心を持ってるのに、恥ずかしくて表に出さないタイプ』じゃない?」%K%P
優夏の言ってること……何となくわかるような気がした。%K%P
優夏「ってことだから、早く仕度して、出かけよっ?」%K%P
オレ達は着替えを済ませ、ロッジを出た……。%K%P
不気味なくらいに風はなかった。%K%P
林の枝葉はぴくりとも揺れず、小鳥のさえずりも聞こえず、時の止まった世界の中を歩いているようだ。%K%P
太陽は分厚い雲に隠れ、オレ達の後ろには影さえもなかった。%K%P
優夏「ねえ、どこ行こっか?」%K%P
歩きながら、優夏が聞いてくる。%K%P
誠「どこって……まかせるよ」%K%P
優夏「じゃーあ、ルナビーチに行って、朝ゴハン食べる?」%K%P
誠「うん」%K%P
優夏「あ、でも朝ゴハンって言うよりお昼ゴハンか……。もうこんな時間だもんね?」%K%P
ユウウツな天気とは対照的に、優夏はいつも通りの明るさだった。%K%P
これから深刻な話をしなきゃいけないって言うのに、その明るさが、言い出しづらい雰囲気を作っていた。%K%P
けれど、どうしても言わなければならないのだ。%K%P
オレは思い切って尋ねてみた。%K%P
誠「なあ……優夏?」%K%P
優夏「ん? な~に?」%K%P
誠「昨日の、鈴の話なんだけど……」%K%P
そう切り出すと、たちまち優夏の顔色が曇った。%K%P

My tools don't 100% work correctly on these files though so the output is unreliable and sometimes doesn't work. The compression on the BIP files is LZSS. There's a 4 byte header (the uncompressed filesize) at the beginning of each BIP file. My decompressed output is kinda garbled and I don't feel like tinkering with the code to make it work. I can't really remember the specifics of the uncompressed BIP files after that minus the fact that the strings are at the end of the file. The strings are called throughout the file by their location so it's not hard to pinpoint the text. The scripts are in bytecode so that might be a little bit of a block. Here's a list of commands I came up with for Chewy a while ago.

breath_lock
fade_ex_wait
fade_ex_start
movie_end
movie_start
graph_scale_auto
msg_log
eye_lock
ev_anim
ev_disp
ev_init
ecg_set
map_select
vr_msg_disp
vr_reg_calc
vr_select
vr_disp
date_disp
sel_disp2
msg_disp2
graph_disp2
key lock
skip lock
sys msg
trace_spc
quick_save
map_route_ex
map_point_ex
map_init_ex
graph_disp_ex
clock_disp
vib_ex
fade_ex
effect_ex
graph_uv_save
graph_uv_auto
graph_pos_save
graph_pos_auto
movie_play
null
chat_exit
chat_entry
chat_msg
chat_send
edit_view
map_disp
map_entry
map_view
vib_wait
vib_end
vib_start
title_disp
cal_disp
task_del
task_entry
skip_end
skip_start
disk_change
save_disp
save_check
save_lock
menu_lock
voice_vol
voice_speed
voice_wait
voice_req
voice_del
voice_set
se_vol
se_speed
se_wait
se_req
se_del
se_set
bgm_vol
bgm_speed
bgm_waitbgm_req
bgm_del
bgm_set
effect_wait
effect_end
effect_start
graph_disp
graph_wait
graph_lay
graph_pal
graph_anim
graph_prio
graph_move
graph_pos
graph_view
graph_copy
graph_del
graph_set
fade_wait
fade_start
sel_disp
sel_style
sel_wait
sel_view
sel_entry
sel_set
msg_disp
msg_anim
msg_color
msg_speed
msg_line
msg_clear
msg_wait
msg_set
msg_cursor
msg_type
msg_size
msg_pos
msg_mode
msg_view
msg_wind
file_wait
file_read
pad_get
pad_wait
time_wait
count_wait
count_clear
reg_calc
ext_return
ext_call
ext_goto
int_return
int_call
int_goto
ifend
nop

animexploit
2009-04-15, 21:14
thats great and it will probably make the job easier if you can get me those tools. also due to the huge amount of complexity to making a patch for the psp, I decided to switch to the PC version which will still be hard as hell but less painful, thanks

dsp2003
2009-04-16, 00:18
There is not much difference between Never7 and Ever17 PC scripts (except for the fact that Never7 scripts are compressed into weird "lnd" container (LZSS-alike)). I haven't wrote the decompression code, but here's the partial specs of SC3 script file structure.

The header:


TSC3Header = packed record
Header : array[0..3] of char; // 'SC3'+#0 header
TextTableOffset : longword; // Text Table Beginning offset
GraphicsListOffset : longword; // Where's begins graphics sublist in the text table
HeaderSize : longword; // Offset or size?
end;
TSC3JumpTable = packed record
Offset : longword; // Offset, longword, as usual.
end;
TSC3TextTable = record
Text : string; // zero-terminated
end;


The structure:

============
SC3Header [16 bytes]
---------------
Code section (ignored) [TextTableOffset - 16 bytes]
---------------
SC3JumpTable[1]
...
SC3JumpTable[n]
---------------
SC3TextTable[1]
...
SC3TextTable[n]
============

Note: in order to calculate the exact number of SC3JumpTable\TextTable entries:

n := (SC3JumpTable[1] - TextTableOffset) div 4;

The text, however, is mixed with simple bytecode commands (there are only few of them. Please search at AnimeSuki for Never7 translation thread to get them and required tools (if they're still present)).

Another notice is about the Never7 engine - it chokes at 1-byte symbols. I.e., you must enter latin as fullwidth, otherwise it will crash.

Hogan
2010-01-06, 05:03
G'day everyone,

Really sorry for dredging up an incredibly old thread, But it happens to be exactally what a need, almost:

Long story, I'm attempting the same as AnimeEx, but with ever17. Now, I've got the ability to extract and put back the .bip script files back into the ISO, and get it working (editing menus, etc, will come much later).

But, like AnimeEx, I'm lacking the ability/tools to get the info out of the .bip files. If Minagi still has those tools (Can't see anything on the Animesuki thread for them), that's be awesome.

Unregistered
2012-11-10, 05:39
hi, i'm interested too in the remember 11 tools minagi has :D

Unregistered
2012-11-16, 16:42
There are many games that use this engine (also on PS2 and PC), and there's nothing very difficult about it since file formats are pretty much standard (except for graphics).

AFS archives can be extracted with many tools and some programs (dsp2003's AnimED for example) can even repack them.

BIP files are "textbook" LZSS-compressed files as if created by original Haruhiko Okumura's LZSS in 1989. You can extract them with HCGConv (http://www.angelfire.com/nm/fbkcfy/). You'll need a compiled LZSS.C to recompress the files properly after you'll have modified them, though (Googling for LZSS.EXE may or may not give you a compatible version). Well, technically you can imitate the compression by adding an FF byte every 16 bytes of uncompressed data (the "packed" file will be bigger than unpacked one this way, obviously), but if you can write a program to do this, writing an actual LZSS compressor based on Okumura's source won't be much more difficult for you.

T2P files are images in a platform-specific (and often in a game-specific) format, which may or may not be compressed (and can even be both, say uncompressed for thumbnails - generally in a BIP+T2P pair - and compressed for standalone images - character sprites, for example). Figuring out the image format of a given game will be the most time-consuming part of hacking the game which is based on this engine.

To unpack the file(s) with HCGConv:
open source directory (with compressed files) in the left part of its window,
choose destination directory (where unpacked files will be written to) in its middle part,
select "test LZ decode" in Option menu, then
select files to unpack in the right part of HCGConv window by Shift- or Ctrl-clicking them,
set "4" as number of bytes to skip from the beginning of each file (uncompressed file size is written there) in the upper text entry field under the left part of the window,
leave lower text entry field empty and right text entry field with its default "18",
press upper "(S)" button to start decompressing the files and wait until it's done, then
press lower "(X)" button to exit HCGConv.

Unregistered
2012-11-17, 17:12
thanks, it worked :D

Raistlin77it
2012-11-19, 15:18
just a little off-topic, i've saw the opcode minagi has posted.
but how can i fin it on the uncompressed bip file?

for example graph_prio is translated in what hexadecimal code?

there is some doc/snippet of code to read about?