News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Can Atlas insert binary data from an external file?  (Read 2700 times)

Paul Jensen

  • Sr. Member
  • ****
  • Posts: 424
    • View Profile
Can Atlas insert binary data from an external file?
« on: February 01, 2011, 02:09:50 am »
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

  • Hero Member
  • *****
  • Posts: 4989
  • It's the greatest day.
    • View Profile
    • Tumblr
Re: Can Atlas insert binary data from an external file?
« Reply #1 on: February 01, 2011, 02:14:36 am »
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

  • Hero Member
  • *****
  • Posts: 2235
  • I'm curious
    • View Profile
    • Yojimbo's Translations
Re: Can Atlas insert binary data from an external file?
« Reply #2 on: February 01, 2011, 01:14:19 pm »
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

  • Sr. Member
  • ****
  • Posts: 254
    • View Profile
Re: Can Atlas insert binary data from an external file?
« Reply #3 on: February 01, 2011, 08:41:54 pm »
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

  • Hero Member
  • *****
  • Posts: 3163
    • View Profile
    • Twilight Translations
Re: Can Atlas insert binary data from an external file?
« Reply #4 on: February 01, 2011, 09:21:40 pm »
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