Can Atlas insert binary data from an external file?

Started by Paul Jensen, February 01, 2011, 02:09:50 AM

Previous topic - Next topic

Paul Jensen

Is there any way to get Atlas to insert binary data from an external file into a ROM? As far as I can understand from reading the docs, this isn't possible.

My Rent A Hero translation project involves changing some graphics. Right now I'm doing it all manually. I created a copy of the original ROM with 4k of extra space at the end. If I update the graphics, I insert the modified graphics into that space using Windhex.

What I want to do is set up my Atlas script file to automatically insert the modified graphics (in the form of binary files) at the end of the ROM, and then insert the script after that data.

So anyway, is there a command in, or an extension for Atlas that would do something to the effect of #WRITEBINDATA($Offset, filepath), and then update pointers accordingly?
Sign THIS!

Ryusui

No, but if there's a cross-assembler for Genesis, you could automate the entire process in one batch file.
In the event of a firestorm, the salad bar will remain open.

Pennywise

Not sure if it helps, but a quick and easy way to insert graphics is to have a BMP of the graphics and use a tile editor to import it into the ROM.

Otherwise, based on what you said it doesn't seem like it would be much trouble to just code a simple program to do all the work for you.

abw

This is also not exactly what you want, but writing a fake pointer to some location you don't care about (or to some location you do care about, with judicious use of the HDR command) seems to be one way to get Atlas to insert arbitrary data. You might be able to refine something like this into a useful script:

#JMP(<graphics start location>)
#W16(<some place you don't care about>)
<graphics binary in Atlas notation (*)>

// Atlas will quite merrily chug along from here, knowing that its last insertion point was at the end of your graphics data
<your normal text insertion script>


(*) Unfortunately, you'll need to dump your graphics data as text; since you're using WindHex, a table filled with entries like
00=<$00>
01=<$01>
etc. should do the trick.

RedComet

I can send you an incomplete build of SEKAS that should do what you need, if you want. I still need to add macro support and a few other things before I'm gonna release it, but it's more than capable of inserting raw binary data for you. I used it for Bare Knuckle 3 (and some other projects...) and it's worked perfectly. It's a modified version of xkas that supports the 68k.
Twilight Translations - More than just Dragonball Z. :P