News: 11 March 2016 - Forum Rules

Author Topic: Trouble with Cartographer and Earthbound Zero  (Read 4026 times)

vince94

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Trouble with Cartographer and Earthbound Zero
« on: April 26, 2013, 10:38:08 am »
     So I'm using this awesome retro RPG's ample free text space to flesh out the story and make the text sound more natural. I've learned how to manually change pointer table values, but when I repoint a string to the end of the text bank, the old string is still in the original position. Atlas re-pointing everything automatically would probably save loads of space by avoiding this situation.
     Here's the problem I'm running into with Cartographer. The very first pointer in the pointer table ("00 00 [end]") points to some text that was probably only used when the game was being debugged: "System Error!!!"
The pointers are stored like "XX XX [end] XX XX [end] XX XX [end] XX XX [end]." However, 00 is also the value the game uses for [end], and there are several parts of the pointer table that are just a bunch of 00's. The upshot of this is that Cartographer is interpreting these "[end] [end] [end] [end] [end] [end] [end]" parts as real pointers, resulting in loads of System Error'ses in the script file. Is there anything I can do about this?
« Last Edit: April 26, 2013, 11:19:17 am by vince94 »

henke37

  • Hero Member
  • *****
  • Posts: 643
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #1 on: April 26, 2013, 12:05:10 pm »
There is always the option of writing a custom tool.

Klarth

  • Sr. Member
  • ****
  • Posts: 498
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #2 on: April 26, 2013, 08:03:42 pm »
The pointers are stored like "XX XX [end] XX XX [end] XX XX [end] XX XX [end]."
Are you using the POINTER SPACE command? If not, try setting it to 1.

Alternatively, if your text is sequential (and the pointers are too), then you could just do a normal text dump without pointers and manually setup Atlas with AUTOWRITE.

vince94

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #3 on: April 27, 2013, 11:53:50 pm »
Yeah, the pointer space command is set to one.
Quote
if your text is sequential (and the pointers are too), then you could just do a normal text dump without pointers and manually setup Atlas with AUTOWRITE
I don't think the text is sequential, since I've been able to point a dialogue box that originally read from the middle of the text bank to the very end of it, where I could write as long as I wanted. However, this "autowrite" mode sounds pretty cool. Would using it mess the game up by not skipping over the blank [00 00 end] pointers? I wonder...

EDIT: I tried dumping a RAW script file, but the beginning of each string was cut off. When I was tinkering and figuring out how the BASE POINTER thing worked, I had all kinds of problems like that.
Here's the command file I used:
Code: [Select]
#GAME NAME: Earthbound Zero
#BLOCK NAME: Main Text (RAW)
#TYPE: NORMAL
#METHOD: RAW
#SCRIPT START: $060010
#SCRIPT STOP: $06ffff
#TABLE: eb0.tbl
#COMMENTS: Yes
#END BLOCK
I referenced the example code that came with, but put in the appropriate script start/stop values.
« Last Edit: April 28, 2013, 12:04:06 am by vince94 »

Klarth

  • Sr. Member
  • ****
  • Posts: 498
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #4 on: April 28, 2013, 12:06:33 am »
I don't think the text is sequential, since I've been able to point a dialogue box that originally read from the middle of the text bank to the very end of it
I mean as in...does the first pointer point to the first string, second pointer to the second string, and so on.

It's strange that Cartographer isn't doing the raw dump correctly. And rereading the documentation...I think you may need POINTER SPACE to be 3. Cartographer doesn't seem to automatically add the size of the pointer into a non-zero value.

And yes, Atlas supports that format.  When you use #PTRTBL, set the offsetting as 1.

vince94

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #5 on: April 28, 2013, 10:23:22 am »
Quote
Does the first pointer point to the first string, second pointer to the second string, and so on.
Yeah, I think that's how it works. I'll try fiddling with the POINTER SPACE and edit this post when I find out what happens.

vince94

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #6 on: May 05, 2013, 09:21:32 pm »
Well, I tried messing around with some stuff, and it can now successfully dump the script. However, when I turn around and try to run the dump through Atlas, it says this:
Code: [Select]
Error: "You must specify an address using JMP before inserting text"
Here's the commands.txt file I am using:
Code: [Select]
#GAME NAME: Earthbound Zero
#BLOCK NAME: Main Text
#TYPE: NORMAL
#METHOD: POINTER_RELATIVE
#POINTER ENDIAN: LITTLE
#POINTER TABLE START: $030010
#POINTER TABLE STOP: $031594
#POINTER SIZE: $02
#POINTER SPACE: $01
#ATLAS PTRS: No
#BASE POINTER: $060010
#TABLE: eb0.tbl
#COMMENTS: No
#END BLOCK

I searched for "JMP" in the readme that came with Atlas, and it says that it controls what offset Atlas writes to. Why would this be a requirement? Isn't it using the pointer table?

EDIT: I just realized - it doesn't even know about the pointer table. My .bat file is just "Atlas eb0.nes script.txt."
The only place I gave it info about the pointer table is the commands.txt, and Atlas can't see that.
« Last Edit: May 05, 2013, 10:41:51 pm by vince94 »

justin3009

  • Hero Member
  • *****
  • Posts: 1664
  • Welp
    • View Profile
Re: Trouble with Cartographer and Earthbound Zero
« Reply #7 on: May 05, 2013, 09:41:23 pm »
Because it needs a basis on where the data should go.  A pointer table only dictates where in the bank designated for the JMP, otherwise it just.. doesn't know.
'We have to find some way to incorporate the general civilians in the plot.'

'We'll kill off children in the Juuban district with an infection where they cough up blood and are found hanging themselves from cherry blossom trees.'