I talked to RedComet earlier today about Cartographer. So I have an example to show you guys based on the game Cadillac, which is a playing card puzzle type game. I am also calling the project.
The main point of this post is to address some documentation and explain some things in order to dump text a bit easier.BASE POINTER
I tried a pointer table dump without success and then discovered that in order to dump the text of this game I needed to subtract instead of add in the #BASE POINTER command. The reason why you need to subtract is if the ROM address location of the text is less than the pointer address.
Cadillac is a mapper 3 Famicom game. For those that don't know, Mapper 3 is a 1 - 32KB PRG (Program ROM) bank game. The range of the data would be 10h - 800Fh.
The range of the text data is at 186Fh - 1F39h. So you would add $8000 to get the real address location of the data. So if you start at 186Fh, add 8000 to that and then -10, the result is $985F. So, $985F is the address and the pointer if you flip the bytes around, 5F98. You would add $8000 because that's the address that the bank starts at and adds up right if you use the SetOff pointer calculation.
Next is the pointer table location. I will show you the commands in the file.
#POINTER TABLE START: $1F3A
#POINTER TABLE STOP: $1FB1
The first two bytes of the pointer table are 5F98. Those two bytes are the correct pointer for the first line of text in this block.
Based on the way that I have my command files set up, here is how Cartographer normally works. In # BASE POINTER, you take the modifier address and either add or subtract from the pointer to find the ROM address. In the readme file, it only says that you can add, but you can also subtract.
You know that 8000 is the SetOff calculation, so based on the way that Cartographer works, if you add $8000 to the pointer, the program is going to crash or not function as intended. $8000 + $985F = 1185F, that's way out of bounds of the PRG bank and the NES address range.
Here is the way around it. Instead, subtract $8000 from $985F and that equals 185Fh, near the intended location. Now, here is where it gets a bit weird. You also have to subtract the header size, in this case you would subtract the header from the BASE POINTER modifier, that would be $7FF0. So, your new BASE POINTER modifier would be -$7FF0. So, $985F - $7FF0 equals 186Fh, that is the correct ROM offset.Table Files
Here are a couple tips for table files. Make sure that you remove all bookmarks from the table files as well as anything that is not supported by Cartographer.
Make sure the line and end break codes are at the bottom of the file. There are two types that I have used, one is for raw and the other for relative pointers. You can check out the differences in the material that I am going to provide.
The end line codes in your table file should be something like this.
You can use the /r and /n as you wish.
Now, for the RELATIVE POINTER table
For the dumps that are RAW, I suggest that you have your table files correct or the dumps will not occur or be messed up. I also removed the #END BLOCK command in the raw dump file so that I could dump the text.
In closing, some of these things were already documented. However, these things I talked about are based on my experience and how I solved some of the crashing issues. And the lower ROM address compared to the pointer also needed to be discussed, I believe.
Here are the files for you guys to look at. Some of these files are unedited and directly from Cartographer.HERE