UPDATE: I've made a video to give a more visual example:https://www.youtube.com/watch?v=htAxR-9J5LE
I've created two watchpoints in snes9x, one that follows the address 000592 (7E0592 in snes9x) and another one I've found that changes its value to 01 every time the dialog box opens (000596. Perhaps some kind of flag for when there's dialog printing?)
snes9x prints the watched values in decimal, but if you change them to hex you can see that the values match with the one in the JW table file values (for instance: 216 = 0xD8, which is the code for the arrow pointing down, or 159 -> 0x9F, which is the code for white space).
So, my request still stands. If someone could provide me of a Lua script or any other way to make a script that stores in an array every dialog printed to 000592, I could get the game's text and translate it as I play the game (it'd be easier to translate, as I'd have the context of what's happening at the same time the dialogs are printed).
I've had to use my cellphone's potato-cam again (snes9x built-in video recording function didn't record the watchpoint info), but I hope the image can be seen clearly enough.
Original post: ----------------------------------------
I'd need a helping hand for a thing I'd like to do with Wanderbar, if it is possible. I'm near finishing my dialog-only translation of the snes rpg "Idea no Hi", and the next game on my list is the also snes one "Jungle Wars 2".
For Idea no Hi I've used a OCR soft called Capture2Text, but that program doesn't work well with the font JW2 uses (the OCR returns mostly gibberish and random symbols).
So instead of randomly testing lots of OCR programs until I find one that works (if I find it) or copying the text by hand as I tried to do before, I've remembered about a Wanderbar Lua plugin that Mato wrote for me some time ago, which captures and prints the line ID of every dialog text whenever it appears in the game. I've looked into it a little and this is what I know about how the text in JW2 is printed:
Every time a dialog window opens, the char code for every character is written in memory, one after the other, in the address 000592 (every char is only 1 byte long and every code gets written in that same address, so every char overwrites the previous one until the text ends).
Would it be very difficult to create a routine that reads every char code that gets written in that address, and store it in an array? I already made a table file for that game, so writing a routine that converts that array of char codes to their equivalent characters and then print it into Wanderbar's browser window should be more or less trivial and I should be able to do that myself. What I need is for someone to do the routine that fires itself every time a dialog box opens and then captures in an array, one by one, every char code while they're written into the memory address 000592 (that part is beyond my knowledge).
That routine would help me a lot, as I could ctrl+C every line of text while I play the game and paste it into a translator instead of having to copy the text manually, which would take me ages.
PD: I know there are programs that can extract all the text from the rom at once (Atlas, ABCDE, Windhex32, etc), but then I'd have all the text of the game without any order and I need to see what is happening into the game in order to have proper context of what's happening (specially because it's an only kana game, so it'll be a little more difficult to translate than Idea no Hi).
I hope I've managed to explain myself. Thanks in advance to anyone who can offer any help.