News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Cartographer raw output - what am I doing wrong?  (Read 1808 times)

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Cartographer raw output - what am I doing wrong?
« on: May 11, 2014, 05:24:54 am »
Hi there,

I'm trying to use Cartographer to "raw dump" a binary section using a table. I cannto get it to do what I want.

So I have this binary file extracted from Super Robot Taisen AP. Using the SJIS table with an added
"/00=<END>\n"
at the end of the table, when i open it with WindHex, I can see the strings I want to dump, spanning from offset 10E058 to offset 114CA0.
So I set up Cartographer with the following commands:
Code: [Select]
#GAME NAME: Super Robot Taisen Advance Portable (PSP)

#BLOCK NAME: Series
#TYPE: NORMAL
#METHOD: RAW
#SCRIPT START: $10E058
#SCRIPT STOP: $114ca0  // must be 1 past the last useful character
#TABLE: srtap_shared_bin_sjis.tbl
#COMMENTS: No  // Set to No to test insertion
#END BLOCK

My command line (in a batch ;) ):
Code: [Select]
Cartographer.exe shared.bin carto_srtap_shared_bin_raw_test1.txt carto_output_raw_test -s
pause


Nothing too fancy. I would expect to get all of the characters and a line break with "end" marker before it regularly. But the output I get is:
Code: [Select]
//GAME NAME: Super Robot Taisen Advance Portable (PSP)

//BLOCK #000 NAME: Series
//Block Range: $10E058 - $114CA0

機体の地形適応「空」「宇」をA機体と武器の地形適応「海」をSにする<END>

得る.武器の地形適応「空」をAにする<END>

v「陸」「海」を1段階上げる<END>

dR ROBOT SYMPHONY<END>

mING<END>

<END>

ザー<END>

゚て近く,限りなく遠い世界に<END>

<$80>バーサーカー<END>

ンシャインスパーク<END>
(etc - I truncated here)

In Windhex I can see more readable text, which includes "0083 STARDUST MEMORY" starting at offset 10E0E6. (Close to the start, it should be in the text I output above).
So the only difference I can think of between WindHex using my table and Cartographer using my table is that WindHex will artificially split byte streams per line of 16 bytes. Which means i should be able to see a difference if the offsets become non-even. But that's not the case for the string I mentioned (every character is coded on 2 bytes).
Would you help me understand what I can correct to dump this?

Note: I know I should be looking for pointers to do the same thing, but I have not found them directly before nor directly after. And I would like to be able to do this "simple" dump, before I get back on my pointers hunt.

Thank you in advance for your replies!
« Last Edit: May 11, 2014, 01:01:25 pm by BlackDog61 »

BlackDog61

  • Hero Member
  • *****
  • Posts: 784
    • View Profile
    • Super Robot Wars A Portable translation thread
Re: Cartographer raw output - what am I doing wrong?
« Reply #1 on: May 24, 2014, 05:27:41 am »
Just for the record - I've therefore programmed a custom raw dumper using Klarth's library.
I'm still very interested in the answer to my question, since I should otherwise post the tool I made to complement Cartgrapher, I guess?