+  RHDN Forum Archive
|-+  Romhacking
| |-+  ROM Hacking Discussion
| | |-+  Help with Atlas
Pages: [1]
Author Topic: Help with Atlas  (Read 828 times)
KaioShin
Guest
« on: January 23, 2007, 05:53:22 am »

I initially planned to write a custom inserter for DQM, but now that I think about it that's propably not nesessary. Formatting works fine TheCheat (great tool Ryusui!) and I think Atlas should be able to insert my script.
So I downloaded it and tried it out. However, it's not really working as I thought Undecided\
 I created a simple test file to try the thing out, it goes like this:

#VAR(Table, TABLE)
#ADDTBL("dqm.tbl", Table)
#ACTIVETBL(Table)
#SMA("GB")
#JMP($6C7800)

#W32($29EFF0)
<EA>You fool!!<FE><FB><FF>

I think this should make it write a pointer to $29EFF0, to the text which it should insert at $6C7800. When I run that with my ROM it shows:

Atlas 1.06 by Klarth

Parsing summary: 0 msecs
Parsing - 0 error<s>, 0 warning<s>

Nothing further happens, it stays with that output. The file is not modified in any way  Undecided\
I know that the pointer will propably written wrong, but at least I wanted some reaction in the ROM to see what each option does.
I also tried to add $ before my control codes, no change.

So, can anyone help me with this? What am I doing wrong?
The pointers I have are 32Bit, with $08000000 as base and written backwards (eg 00000008). How do I define them? And how does it handle control codes? Is it enough to put them in brackets so that it will write them as straight hex or do I have to add something to my table?
RedComet
Guest
« Reply #1 on: January 23, 2007, 05:56:26 am »

Atlas will accept <$XX> hex data. As for the pointers, I think you'll have to define a custom pointer to handle this. I'm pretty sure '#SMA("GB")' is at least part of the problem.
KaioShin
Guest
« Reply #2 on: January 23, 2007, 06:01:01 am »

Quote from: RedComet on January 23, 2007, 05:56:26 am
Atlas will accept <$XX> hex data. As for the pointers, I think you'll have to define a custom pointer to handle this. I'm pretty sure '#SMA("GB")' is at least part of the problem.

Ok, I guess I have to change my whole scripts then as all the control codes have no $ ahead of them >_>
I thought that GB mode might have something to do with it.
Any idea why it isn't really doing anything at all?
RedComet
Guest
« Reply #3 on: January 23, 2007, 07:37:38 am »

I can't think of anything. Have you tried removing the #SMA and #W32 statements and inserting just the text to narrow the problem down?
KaioShin
Guest
« Reply #4 on: January 23, 2007, 07:39:12 am »

Quote from: RedComet on January 23, 2007, 07:37:38 am
I can't think of anything. Have you tried removing the #SMA and #W32 statements and inserting just the text to narrow the problem down?

Same result.

How is it supposed to look? I guess there should be some other time than just 0 msecs and it should jump back to command prompt?
RedComet
Guest
« Reply #5 on: January 23, 2007, 07:45:50 am »

Here's a successful insertion:

Code:
Atlas 1.02 by Klarth

Parsing summary: 0 msecs
Parsing - 0 error(s), 0 warning(s)

Insertion summary: 0 msecs
Insertion - 0 error(s), 0 warning(s)

+------------------------------------------------------------------------------
| Total
|  Start: Line 6  File Position $A9C0
|  End: Line 163 File Position $AE09
+------------------------------------------------------------------------------
| Results: Inserted Text 1097
|
| Pointer Listing
| General Pointers Written: 0
+------------------------------------------------------------------------------

Execution time: 10 msecs
KaioShin
Guest
« Reply #6 on: January 23, 2007, 08:25:36 am »

I got it worked out, the table file was saved as unicode and apparently Atlas didn't like that.
Gideon Zhi
Guest
« Reply #7 on: January 23, 2007, 11:45:54 am »

Also, I should note that GB addressing is for the original gameboy only, not GBA. You'll want to use a custom pointer definition for GBA:

#CREATEPTR(GBA, "LINEAR", $-08000000, 32)
KaioShin
Guest
« Reply #8 on: January 23, 2007, 11:47:43 am »

Quote from: Gideon Zhi on January 23, 2007, 11:45:54 am
Also, I should note that GB addressing is for the original gameboy only, not GBA. You'll want to use a custom pointer definition for GBA:

#CREATEPTR(GBA, "LINEAR", $-08000000, 32)

I got to exactly that line myself later on Smiley
Everything is working fine now, I just inserted the prologue chapter.
d4s
Guest
« Reply #9 on: January 23, 2007, 02:39:30 pm »

just fyi, in case atlas keeps crashing randomly when running on win xp, try running it in win 95 compatiblity mode.
that was driving me nuts when i was working on bof2.
Gideon Zhi
Guest
« Reply #10 on: January 23, 2007, 03:04:55 pm »

Uh, that's weird.
You did have the .net runtimes installed, yes? If not, that might've been the problem...
Kitsune Sniper
Guest
« Reply #11 on: January 24, 2007, 11:29:44 pm »

Quote from: d4s on January 23, 2007, 02:39:30 pm
just fyi, in case atlas keeps crashing randomly when running on win xp, try running it in win 95 compatiblity mode.
that was driving me nuts when i was working on bof2.

... the hell?

I've used it for a long time, and I always run it without problems. Except when I fuck up a table.

Are you sure it's not caused because of not having .NET?
Spikeman
Guest
« Reply #12 on: January 24, 2007, 11:58:29 pm »

Or maybe the wrong version of .NET?
Ryusui
Guest
« Reply #13 on: January 25, 2007, 12:41:57 am »

On that note, I need to get around to a new version of TheCheat.

Text justification is implemented, as well as direct image exporting...but I think I fubared something in the line spacing by accident. Need to double-check my math. Also need to implement a seperate export rect; currently uses the clip rectangle to decide what to export.

Another problem I just discovered: there's an outright bug where it checks to see if the font bitmap is "valid" (that is, if the given width and height of the font don't exceed the actual dimensions of the bitmap). For some ungodly reason, I had the height and width checks reversed; discovered this the hard way when I tried using TheCheat with the font d4s gave me to test my script for BoF2. (The font is 8x16 stored as a great big column of characters...no semicolon, oddly enough, a fact I have recently alerted d4s to. Since the checks were reversed, the bitmap failed to verify, as it was checking if the image was at least 16 pixels wide...)
Dragonsbrethren
Guest
« Reply #14 on: January 25, 2007, 01:21:51 am »

Could you add an option for wrapping the text to the next line when it reaches the end of the clipping box?
Pages: [1]  


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