logo
 drop

Main

Community

Submissions

Help

Author Topic: Which do you recommend?  (Read 6265 times)

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Which do you recommend?
« on: July 08, 2012, 11:44:05 pm »
Which Script Dumpers and such do you recommend?  I'm wanting to just get everything setup for MMX3 so I don't have to spend hours of tedious work reconfiguring pointers 24/7 so I'm trying to go the route of a script dumper, then probably using Atlas to reinsert it.  Which utility do you usually use to dump the text out?
'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.'

Ryusui

  • Hero Member
  • *****
  • Posts: 4991
  • Location: Out in the middle of a field!
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Which do you recommend?
« Reply #1 on: July 08, 2012, 11:51:59 pm »
Romjuice is the fire-and-forget strategy. You can make a special "dump only" version of your table to take care of some of the formatting automatically: set up each "end" code to dump the appropriate tag, a couple of newlines and an Atlas pointer write directive, for example.

Cartographer is for when you absolutely, positively want to be sure. It takes a fair bit of setup, but you can configure it so it looks at the actual pointer table and dumps strings using it, inserting the appropriate Atlas directives automatically as it goes. On the upside, it comes with a sample config file demonstrating two different ways of dumping a script (from Final Fantasy 1, no less).
In the event of a firestorm, the salad bar will remain open.

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #2 on: July 08, 2012, 11:59:14 pm »
Cartographer is definitely a lot more powerful than romjuice, but it also has a much higher learning curve. I'm kind of crotchety so I tend to prefer romjuice (I have a customized version with an escape directive in table files that outputs the current read address) but if I had any reasonably large amount of dumping and reinserting to do, I'd probably take the time to learn Cartographer.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #3 on: July 09, 2012, 12:35:43 am »
Alrighty, quick question.

This game has some crazy byte system to dictate coordinates by a command.  But since that can be any sort of variable, is there anyway to make Cartographer read the main command then the next byte and have it be in one command?

Right now it does this:

//[LINE]

But there's also certain values that interfere with line breaks and such so it'll be like this:

//[COORDINATES][LINE]

Anyway to make Cartographer break those two apart?  The //[COORDINATES][LINE] bit is specifically stating the coordinates, but the byte after is the same as [LINE] basically.  I want to know if it's possible to make it read [LINE] and [COORDINATES] data as something separate.
« Last Edit: July 09, 2012, 01:41:53 am by justin3009 »
'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.'

Ryusui

  • Hero Member
  • *****
  • Posts: 4991
  • Location: Out in the middle of a field!
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Which do you recommend?
« Reply #4 on: July 09, 2012, 03:08:45 am »
Not to my knowledge. But as long as the [LINE] tag inserts as the same byte, it shouldn't be a problem.
In the event of a firestorm, the salad bar will remain open.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #5 on: July 09, 2012, 11:20:14 am »
Alrighty, onto my next question.

Atlas seems to have very little to absolutely no documentation.  I've got the script dumped out and it works, but how in the heck do we go about importing it back in with Atlas?  I'm horribly lost in what it's trying to tell me what to do in the PDF ._.

Quote
#VAR(dialogue, TABLE)
#ADDTBL("MMX3.tbl", dialogue)
#ACTIVETBL(dialogue)

#VAR(Ptr, CUSTOMPOINTER)
#CREATEPTR(Ptr, "LOROM", $0, 32)

#JMP($1CC1BC) [??? I don't quite understand this? D:]


//POINTER #0 @ $1CC1BC - STRING #0 @ $1CFDAD

#W16($1CC1BC)
//[START]E<$08><$88><$04><$C1><$8B><$03>(Sigma)[LINE]

Is basically what I have setup for the first few lines.. though I don't quite get how it's all working >.< Nothing gets written or changed when I insert it back in.

« Last Edit: July 09, 2012, 01:59:28 pm by justin3009 »
'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.'

StorMyu

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Which do you recommend?
« Reply #6 on: July 09, 2012, 01:59:18 pm »
the PDF of Atlas is awesome, everything is in there.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #7 on: July 09, 2012, 02:14:55 pm »
I'm following it a bit but it's not getting where with insertion so I know I've screwed something up, I'm not sure which part is screwed up though.

     2 ADDTBL    Added table 'MMX3.tbl' as 'dialogue'
     3 ACTIVETBL Active table is now 'dialogue'


It just does that and.. well that's about it.
'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.'

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #8 on: July 09, 2012, 02:17:16 pm »
Well, for one, you're missing an #SMA command at the start of the file. The SMA directive (set machine addressing) tells Atlas what KIND of pointers to write when it does a #W16 or a #W24. The options are "HIROM" "LOROM00" "LOROM80" and "LINEAR" I believe. There may be one more but those are the ones I use, at least...

Anyway. This should be in the very top line of your file.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #9 on: July 09, 2012, 02:25:13 pm »
Quote
#SMA("LOROM80")
#VAR(dialogue, TABLE)
#ADDTBL("MMX3.tbl", dialogue)
#ACTIVETBL(dialogue)

#VAR(Ptr, CUSTOMPOINTER)
#CREATEPTR(Ptr, "LOROM", $0, 32)

#JMP($1CC1BC)

//POINTER #0 @ $1CC1BC - STRING #0 @ $1CFDAD

#W16($1CC1BC)
//[START]E<$08><$88><$04><$C1><$8B><$03>(Sigma)[LINE]
//[LINE]
//Garrrrr![LINE]

Sorry about not fully understanding and asking lots of questions on this :/

Quote
     1 SMA       Addressing type is now 'LOROM80'
     3 ADDTBL    Added table 'MMX3.tbl' as 'dialogue'
     4 ACTIVETBL Active table is now 'dialogue'

'Tis what it does now.  Still no insertion and not fully sure why yet either.  That JMP is probably wrong I'm assuming as well.
'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.'

Klarth

  • Sr. Member
  • ****
  • Posts: 480
  • Location: Pittsburgh
    • View Profile
Re: Which do you recommend?
« Reply #10 on: July 09, 2012, 02:28:10 pm »
Well, for one, you're missing an #SMA command at the start of the file.
He's setup with custom pointers.  He should be using #W16(Ptr, $1CC1BC).  Also, his #CREATEPTR's last parameter should be 16 (for 16-bit).

Your game has no text if that's the entire script.  It's commented out with "//".

Also, the JMP address (where Atlas inserts to) is the same location you are writing a pointer to.  Atlas keeps track of the text position inside of the ROM for you, so you only need to know where the location of the pointer is at.  I think you're mixed up.

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #11 on: July 09, 2012, 02:32:34 pm »
Also, the JMP address (where Atlas inserts to) is the same location you are writing a pointer to.  Atlas keeps track of the text position inside of the ROM for you, so you only need to know where the location of the pointer is at.  I think you're mixed up.

To clarify: #JMP to where you want to actually put your text; #WRITE (or #W16 or #Whatever) to the actual address of your pointer.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #12 on: July 09, 2012, 02:41:13 pm »
Alrighty I'm understanding this a bit more and lol.. fixed that horrible script bug.  I forgot to take out a few commands in the previous table..

Quote
#VAR(dialogue, TABLE)
#ADDTBL("MMX3.tbl", dialogue)
#ACTIVETBL(dialogue)

#VAR(Ptr, CUSTOMPOINTER)
#CREATEPTR(Ptr, "LOROM", $0, 16)

//POINTER #0 @ $1CC1BC - STRING #0 @ $1CFDAD

#W16($1CC1BC)
[START]E<$08><$88><$04><$C1><$8B><$03>(Sigma)[LINE]
[LINE]
Garrrrr![LINE]
[LINE]
You're... Zero...[LINE]

I don't have the SMA up there as from reading Klarth's post, I'm not sure if it's needed there.

But then I'm lost again.  #W16(Ptr, $1CC1BC).  Is that what should be up there instead or.. is that what should be said instead of '#W16($1CC1BC)'
'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.'

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #13 on: July 09, 2012, 02:50:06 pm »
#W16s work based on whatever addressing mode you set via #SMA. If you're going to use #W16s, you need an #SMA. Although apparently, according to Klarth's post, you can use a custom pointer type as your second parameter in a #W16 to get it to write using the custom pointer type instead, so #W16($1CC1BC, Ptr). But since your pointers are just plain lorom pointers, I wouldn't bother with the custom pointer type.

You still need a #JMP in there too; if you're overwriting the previous text, you'll want to #JMP($1CFDAD) for example. Without a #JMP, you're just going to start inserting at file offset 0 in the ROM, overwriting whatever's there. Think of #JMP as a go-to command in a hex editor. You have to jump to a particular address before you start overwriting the old text, right? #JMP tells Atlas where the text itself is going to go.

Ryusui

  • Hero Member
  • *****
  • Posts: 4991
  • Location: Out in the middle of a field!
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Which do you recommend?
« Reply #14 on: July 09, 2012, 03:01:31 pm »
If you're using #W16/#W32 or whatever, then you don't need to create a custom pointer table.

Basically, Atlas provides a variety of methods for inserting text depending on the situation, which are depicted in the PDF. Methods 1-3 are the ones you should be interested in particular:

Method 1 (Basic Script): Sets up a custom pointer type (using #CREATEPTR) and writes pointers to each address manually (using #WRITE with pointer type and address arguments).

Method 2 (Pointer Tables): Sets up a custom pointer type (as per Method 1) and a pointer table using that pointer type (using #PTRTABLE) and writes pointers to the table automatically (using #WRITE with a pointer table argument).

Method 3 (Pointer Autowrite): Sets up a custom pointer type and pointer table (as per Method 2) and sets the pointer table to automatically write pointers when it encounters an end tag (using #AUTOWRITE with pointer table and end tag arguments).
In the event of a firestorm, the salad bar will remain open.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #15 on: July 09, 2012, 03:01:55 pm »
Edit: Pointer Autowrite is definitely what I want and need since I do plan to modify the text.  So things will HAVE to be adjusted on the fly especially in the long run.

Quote
#SMA("LOROM80")
#VAR(dialogue, TABLE)
#ADDTBL("MMX3.tbl", dialogue)
#ACTIVETBL(dialogue)

#VAR(Ptr2000, CUSTOMPOINTER)
#CREATEPTR(Ptr2000, "LOROM80", $0, 16)

#VAR(PtrTbl2810, POINTERTABLE)
#PTRTBL(PtrTbl2810, $1CC1BC, 2, Ptr2000)

#AUTOWRITE(PtrTbl2810, “[END]”)

#JMP($1CFDAD)


//POINTER #0 @ $1CC1BC - STRING #0 @ $1CFDAD

#W16($1CC1BC)
[START]E<$08><$88><$04><$C1><$8B><$03>(Sigma)[LINE]
[LINE]
Garrrrr![LINE]
[LINE]
You're... Zero...[LINE]


I'm pretty sure this is all horribly wrong.  I'm trying to follow the example listed in the PDF.

Error: Invalid argument for AUTOWRITE for parameter 2 on line 12
Error: Invalid parameters <POINTERTABLE, INVALID> for AUTOWRITE on line 12
« Last Edit: July 09, 2012, 03:29:37 pm by justin3009 »
'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.'

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #16 on: July 09, 2012, 03:36:10 pm »
I've only used autowrite in a few instances; I find it confusing and unpredictable. It doesn't work if the pointers you're writing aren't in sequential order - i.e. if the pointer for the second string in your file is the fifth pointer in the list, autowrite doesn't work. Without autowrite you just need a W16 (or W24, or WRITE, or...) for every string you have. It's much more easy to control.

Here's an example of mine, from Ladystalker's script.

Quote
#SMA("HIROM")
#VAR(dlog, TABLE)
#VAR(ndlog, TABLE)
#VAR(tmapped, TABLE)
#VAR(pascal, TABLE)
#ADDTBL("text_in.tbl", dlog)
#ADDTBL("8x8_in.tbl", ndlog)
#ADDTBL("8x82.tbl", tmapped)
#ADDTBL("ladypascal.tbl", pascal)

#ACTIVETBL(dlog)


// Have you seen the fool that corrupted his own live body?
// or the fool that corrupted her own live body?
// For they do not conceal themselves, and cannot conceal themselves.
//
// romjuice v2.5
// written by prez@lfx.org and Gideon Zhi
// dumping from 0-1D040h
// --------------------------

#JMP($290000,$29FFFF)

//[$000000]
#W24($284300)
// その 方向には 何もない<pause><end>
There's nothing in that<line>
direction.<pause><end>

//[$00001C]
#W24($284303)
//レディは たからばこをあけてみた<end>
Lady opened the treasure<line>
chest.<end>

//[$000042]
#W24($284306)
//<$C4><$01>を 見つけた<end>
Found <$C4><$01>!<end>

//[$000052]
#W24($284309)
//はこの中は からだった<pause><end>
The box was empty.<pause><end>

In this case, I'm sticking the text between addresses $290000 and $29FFFF, while each of the (24-bit, in this case) pointers for the individual strings are being written to $284300, $284303, $284306, and so on.

justin3009

  • Hero Member
  • *****
  • Posts: 1456
  • Location: Wisconsin
  • Welp
    • View Profile
Re: Which do you recommend?
« Reply #17 on: July 09, 2012, 03:43:37 pm »
Ah okay that makes sense.  If that's the case then Autowrite is definitely not the way to go.  The method you have would be much more sensible and work better in the long run for what I have.

I noticed in there, what I have at the top of my text file compared to yours is.. well a hell of a lot more crazy.  Is it really that simple for it to work?

Edit: That JMP I have is wrong.  It jumps straight to 1CFDAD for the first line of text.. but then it literally stays in that spot without reading the actual pointers.  There's one issue that needs to be fixed >.<
« Last Edit: July 09, 2012, 03:55:56 pm by justin3009 »
'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.'

FAST6191

  • Hero Member
  • *****
  • Posts: 2115
    • View Profile
Re: Which do you recommend?
« Reply #18 on: July 09, 2012, 03:45:45 pm »
I tend to build custom dumping tools (read add tokens and use a combination of batch files and search and replace) but if we are talking generic tools atlas and romjuice are nice little tools but the Russian rom hacking scene spat out a couple of tools worth having a look at in Kruptar 7 and for tables (it supports Kruptar 7 new line commands and such) Oriton.

Both can be found http://www.magicteam.net/index.php?page=programs (if you are grabbing things and need a new GBA compression searching tool I also suggest looking at LZ77Restructor on the same page)

Gideon Zhi

  • IRC Staff
  • Hero Member
  • *****
  • Posts: 3439
  • Location: Seattle
    • View Profile
    • Aeon Genesis
Re: Which do you recommend?
« Reply #19 on: July 09, 2012, 04:46:05 pm »
Edit: That JMP I have is wrong.  It jumps straight to 1CFDAD for the first line of text.. but then it literally stays in that spot without reading the actual pointers.  There's one issue that needs to be fixed >.<

I'm... not sure what you mean by "reading the actual pointers." Atlas doesn't READ anything. It just writes. Example:
Quote
#JMP($290000,$29FFFF)

//[$000000]
#W24($284300)
// その 方向には 何もない<pause><end>
There's nothing in that<line>
direction.<pause><end>

//[$00001C]
#W24($284303)
//レディは たからばこをあけてみた<end>
Lady opened the treasure<line>
chest.<end>

This jumps the insertion cursor to $290000, which is hirom E9:0000. Atlas then sees the W24 directive (write 24-bit pointer at location). Since our endian-converted SNES-HIROM 24-bit pointer is 00 00 E9, it writes that to address 248300. It then inserts:
Code: [Select]
There's nothing in that<$C8><$01>direction.<$C9><$01><$C0><$01>into the ROM, writing the first value (2300=T) at address $290000. Note that all table values are 16-bit (so 2300=T, 3100=h, etc). At this point, the insertion cursor is at file address $290048, which is hirom E9:0048. The next thing Atlas finds is the next W24 ($284303), so it takes the current insertion address $290048, converts it to SNES-HIROM with the proper endianness per the SMA - 48 00 E9 - then writes that to address $248303. And so on. (To further clarify, my pointer table is located at 248300 in the ROM, and each pointer is 24 bits/3 bytes.)

Make sense?