I'm working with the awesome group (fluffy, heh) who are translating Little Busters and have begun the process of modifying rldev to handle a few SEEN files that the most recent version cannot.
There are 8 SEEN files which contain unimplemented opcodes and I've had success with one of them so far, in that I was able to extract the rest of the dialogue (for SEEN7922). Initially only five lines of dialogue were extracted. By adding a couple of lines to disassembler.ml (kprl source code) I was able to get the rest to extract (24 lines in all).
However, I'm not at all familiar with OCaml, so I'm kinda working in the dark here. The problem I face at the moment is that the text for the newly added kepago function isn't appearing in the generated script file (SEEN7922.ke) and that will obviously be necessary for recompiling the SEEN file with a modified build of rlc.
So if any of you have OCaml experience, whether you've looked at rldev source or not, I could certainly use your assistance. Please send me a private message and I can bore you with the details. I'm not sure that everyone else would find it that interesting.
Fortunately haeleth's source looks pretty well organized or I wouldn't have gotten this far. Naturally there's not nearly enough comments for someone totally unfamiliar with OCaml such as myself.
Once I get rldev 100% working with Little Busters (ie REALLIVE 1.4.8.8), I'll upload the source somewhere and/or send it to the boss (haeleth) if he'd like to host the changes in his svn repository.
In fact that what makes rldev unable to disassemble SEEN7922, is that there is a op<0:Sel:00023> in the script, and rldev makes every select/goto etc. a special case that is hardwired into the source code.
The select command in SEEN7922 do not take any parameter, so it can be written in common opcode style, and below is my disassembled code for Seen7922
Plus, there are still some select command takes not only "{}" parameter, but also before that a integer for a unknown purpose. If confronted with this situation, a better solution is either to parse and repack the script using own tool; or to replace that part of the script with another script of the same length, and replace it back after compiling
thanks. actually that's quite helpful. what I tried to do was to add a special case to the code that disassembles select statements, adding in opcode 23. It was consumed, but nothing was emitted in the ke file, so that would have been a problem.
What I need to do in order to get it to output the raw opcode in this case then is what I need to figure out. If I do, then I'll update this reply to say, duh I get it now.
Thanks again, your reply is greatly appreciated....
UPDATE: Yeah, I guess my next question would be: how does one get kprl to output raw opcodes like you have in your ke output above?
UPDATE 2: I figured out how to do it. Thanks again for your help.
Last edited by Richard 23; 2009-03-14 at 00:54.
Reason: Aha! Got it!