+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Atlas Shrugged... _|ï¿£|â—‹
Pages: [1] 2
Author Topic: Atlas Shrugged... _|ï¿£|â—‹  (Read 1 times)
avox
Guest
« on: October 30, 2010, 10:41:48 am »

I'm just start looking to look at using Atlas for script insertion, but I had a question for those already familiar with it:

How would you preserve any original data between lines?  Since lines are expanded or shortened, adding that hex data to the script so that it ends up where its supposed seems like the only way to me.  But again, I've just started looking at it, so I dunno if you can even do that reliably.
Ryusui
Guest
« Reply #1 on: October 30, 2010, 12:41:20 pm »

By "original data" you mean non-text data that's part of the script, right? Yeah, Atlas can dump and reinsert that, no problem - it's how I did Sylvanian Families for GBC. Just make sure you update any pointers aimed at it.
avox
Guest
« Reply #2 on: October 31, 2010, 02:32:51 am »

Yeah, I'm thinking now I'll just add any non-text data as hex data to be inserted along with the text lines.

October 31, 2010, 10:56:21 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
...which I'm apparently not comprehending 100%.  I want to add bytes to the beginning of certain lines, like say FF00h.  Do I just plop down <$FF00> right at the start of those?  Or do I have to make a control code entry in the table?

Neither is inserting correctly; either changing <LINE> to a special value by putting *xx=<LINE> in the table, or adding hex to individual entries.  It just inserts everything as text.
« Last Edit: October 31, 2010, 10:56:21 pm by avox »
kingofcrusher
Guest
« Reply #3 on: November 01, 2010, 12:27:21 am »

If you separate the bytes like <$FF><$00> it should insert them as hex (if I remember correctly). Or if you put FF00=<LINE> in your table then <LINE> will insert $FF00.
avox
Guest
« Reply #4 on: November 01, 2010, 01:22:55 am »

Sweet, that worked!!   Thanks, king.    Cool


Quote from: Ryusei
Yeah, Atlas can dump and reinsert that, no problem

Hold on...  this bad boy can dump text, too?  If that's true...
Klarth
Guest
« Reply #5 on: November 01, 2010, 01:32:00 am »

Quote from: avox on November 01, 2010, 01:22:55 am
Hold on...  this bad boy can dump text, too?  If that's true...
Nope, Atlas just inserts.  You'll need romjuice, Cartographer, or another utility to dump the text.
Ryusui
Guest
« Reply #6 on: November 01, 2010, 02:14:36 am »

Yeah, slip of the tongue there. I use Atlas far more often than I use romjuice/Cartographer, for obvious reasons (dump once and fuhgeddaboutit XD).
avox
Guest
« Reply #7 on: November 01, 2010, 10:49:36 am »

Foiled again!  Ah, well...  Didn't really need the source script, but I guess I should get some practice making kanji tables.  So... many... kanji...

And awesome tool, Klarth.  You have my thanks.  (until it doesn't work the way i want it to. then i'll curse your name to the four winds!)   :laugh:
Gideon Zhi
Guest
« Reply #8 on: November 01, 2010, 04:08:06 pm »

Quote from: avox on November 01, 2010, 10:49:36 am
And awesome tool, Klarth.  You have my thanks.  (until it doesn't work the way i want it to. then i'll curse your name to the four winds!)   :laugh:

Yeah, good luck with that Wink Seriously, Atlas is specifically designed to be extremely versatile. I've come across very few games it can't handle, and none that it can't handle without a little extension.
avox
Guest
« Reply #9 on: November 01, 2010, 07:46:18 pm »

Yeah, I seriously doubt I'll need to exceed its abilities anytime.  If I do, I'd just as soon put up a Help Wanted ad instead.   ( > ^_^)>  たのむよ~~
avox
Guest
« Reply #10 on: November 09, 2010, 07:35:11 pm »

Rather than litter the boards with my Atlas questions, I'm just gonna stick them in this thread.

Ok, first up.  So, I want dynamic pointers added to the start of each line that point to the end of the line (after a null byte).  That is to say, all they are is the length of the string.  Each pointer also needs to be prepended with a <07> byte, for a total of 2 bytes. 

Is this possible, or does Atlas only point to addresses?

EDIT:

And also, can it expand the text block area, while keeping data outside the block intact?

EDIT:

Answered myself, I think...  If it could do that, all the jmp addresses would get messed up.  Unless it was taken into account?
« Last Edit: November 09, 2010, 07:41:45 pm by avox »
Kagemusha
Guest
« Reply #11 on: November 09, 2010, 08:26:43 pm »

Usually when I have Atlas questions, I just ask Klarth directly via the IRC channel or if he's not online then via PM. He gets back to me pretty quickly and I'm sure he'd do the same for you.
Gideon Zhi
Guest
« Reply #12 on: November 09, 2010, 10:52:18 pm »

I'm not *exactly* sure what you're asking here, so I'm going to take a stab in the dark.

The length-byte thing is called a "Pascal String." Atlas *can* do this, but I've never had to make it work. See your documentation. I'm assuming it looks for an end-of-string token, in which case you can potentially put the <$07> before a pascal string write command, though again, I've not used pascal strings before.

For your second question, you might have to move the entire text block to empty space with pascal strings. With anything else, I'd just stick a JMP a kilobyte or two away from where the text hits the end of the block, and point the jump at empty space elsewhere in the ROM. But again, this assumes "regular" pointers and not pascal strings.
avox
Guest
« Reply #13 on: November 10, 2010, 12:59:23 am »

So that's what that "Pascal string" was goin' on about!  keke.  That is indeed what those particular lines were.  Unfortunately, they're only used in that one file for dialogue.  Everything else supposedly uses pointers I've yet to figure out.

As to the 2nd question, this is a CDrom game, so I have the space to expand the file and rebuild the CD instead of slinging text blocks around the ROoM.
Klarth
Guest
« Reply #14 on: November 10, 2010, 04:56:51 am »

Quote from: avox on November 09, 2010, 07:35:11 pm
Ok, first up.  So, I want dynamic pointers added to the start of each line that point to the end of the line (after a null byte).  That is to say, all they are is the length of the string.  Each pointer also needs to be prepended with a <07> byte, for a total of 2 bytes. 

Is this possible, or does Atlas only point to addresses?

And also, can it expand the text block area, while keeping data outside the block intact?

Answered myself, I think...  If it could do that, all the jmp addresses would get messed up.  Unless it was taken into account?

[1] I'm not exactly sure what you mean by this.  If you have one pointer per string, then turn on pascal strings with #STRTYPE("PASCAL") and then #PASCALLEN(1).  Your script will afterwards look like this (assuming you're using manual writing commands):

#WRITE(...)
<$07>Here is a string.<END>
#WRITE(...)
<$07>Here is another string<LINE>
That is more than one line.<END>

If the length value is for each line, then you'll have to be a bit more creative when it comes to end tokens and pointer writing.

[2] Atlas does not expand currently existing text blocks and will not in the near foreseeable future.

[3] It's not so much about the JMP addresses.  It's more about having to repointer the entire file.  Technically, you could dump the entire file as binary data + text segments, use Atlas commands to repointer offsets for the moved data segments, and have it work.  It's seldom pretty.
Pages: [1] 2  


Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC