one problem i've had with cartographer is when i have a bunch of pointers (GBA; 4 byte absolute pointers with 0x08000000 offset to be subtracted) in an area, but they're not necessarily neatly arranged. they might have some other data in between them, not necessarily in any easily-defined pattern. i want to dump all of them. so i tried just having it dump every 4 bytes. but cartographer crashes if you try that, because instead of hitting an invalid pointer and going "oh, that's invalid, let me just output an error for that one and move on to the next", it goes "durr no error checking whatsoever, i are crash"
I think you are asking for the same or similar thing DaMarsMan did on TransCorp:http://transcorp.parodius.com/forum/?num=1273690996/4#4
I would support pointer lists for properly supporting these kinds of cases. The drawback is you would need to create the pointer list manually. It would probably be the responsibility of another utility to help automate the scanning or detection of pointers and generate a list so you don't have to do it manually. I am not too interested in features that don't result in something tangible. Such 'scanning' functions will always generate false positives and misses.
I could also probably make your workaround of just dumping every 4 to work. The only issue I see is probably what crashes Cartographer. You get a pointer that exceeds the bounds of the file. I could handle that exception and output an empty string for something like that. However, it does make sense to generate an error upon an invalid pointer. I suppose an option to force/skip invalid pointers could accommodate both. I'll give it some some thought. I wouldn't imagine it comes up too often where you'd actually want to dump invalid pointers. At least it doesn't for me. Typically an invalid pointer indicates to me that I don't really understand what's going on and need to figure it out so it's not invalid anymore.
Along these lines, I've always thought about a 'rule' based scanner that can find proper pointers based on the rules you feed it about the game's scripting blocks. It's never 'random' spacing between pointers. You just need to learn what the data is in between so you can scan the block and find the pointers using known information. I've done something similar for projects of mine. I parse the block with known rules and find valid text to dump.
With linked entries you can almost do that already if you know enough commands. If you set up your table fancy with line breaks after known linked entries/commands and their parameters, you can single out the actual text when it gets to it. Basically, you set up your table to 'parse' the data like:
Say you have this hex string:
$f2 $01 $03 $25 $37 $55 $45 valid text here $45 $62
In your table you'd have something like:
You'd get an output of something like:
//valid text here
So, you see you can also pretty much parse the block that way too with a RAW dump.
and another feature request: specify a pointer type and possibly a pointer range, specify the text block, and then dump from the text block but search for pointers as you go. so kind of like the RAW method, except you actually get pointers out of it. this is pretty much the method i've been using for my personal custom tools but it would be nice for it to be universally available.
How does that differ from what you can accomplish with the pointer table range here?http://transcorp.parodius.com/scratchpad/TextAngel.png
Not sure what you mean by searching for pointers.
depending on how you implement everything, this might be a pain, but one more feature request: same as above, except it sorts the text/#WRITE commands by location of the pointer. so if the text block is World <$00> Hello <$00>, and it finds a pointer to World at $200 and Hello at $100, the output is #W32($100) / Hello<END> / #W32($200) / World<END>, or somesuch.
I guess I'm not getting why you keep saying you're in RAW mode, but you're finding pointers somehow. If you're RAW mode, the only thing you can derive is knowing where an string end token is and assuming the next string starts right after that. Even then, you've collected all the information. What do you do with it then to 'find' pointers? I think this circles back to non tangible scanning algorithms.