Zophar's Message Domain

Go Back   Zophar's Message Domain > Emulation Talk > Rom Hack

Reply
 
Thread Tools Display Modes
Old 12-31-2009, 02:01 PM   #1
eyeofmordor42
Junior Member
 
Join Date: Dec 2009
Posts: 2
Default How to correspond assembly code to in game graphics

Hello,

I have messed with text editing and graphics editing a bit in the past. However, now I am ambitiously attempting to add content to my favorite SNES game ever, RoTK II. I have expanded my rom and added some images I would like to integrate into the game. Now comes the problem:

I have my Disassembler open and I see on the side the code offset and the data offset. I assume that these are addresses. My question is how do they relate to a particular tile when the rom is opened in a tile manipulator?

I'm using Tile layer pro, as I scroll through the in game graphics I see an offset code as what I assume to be an address. It doesn't give the address though for each individual tile. TLP may not be designed for something this advance, but only for manipulating existing graphics.

I am not a programmer and am learning as I go. Any help would be greatly appreciated.
eyeofmordor42 is offline   Reply With Quote
Old 12-31-2009, 09:26 PM   #2
InVerse
Senior Member
 
Join Date: Jul 2002
Location: Midwest, U.S.
Posts: 1,489
Default

I don't have much experience with assembly code so I could be off base but I think you would have to relocate all of the graphics (not just the new ones) into the new space and then rewrite the entire graphics engine to pull graphics from the new location.

You can't simply add graphics to the end of the ROM and they magically have an address assigned to each tile. The tiles have to be loaded into memory. It is their value in memory that is needed to display a particular tile in a particular location. Consoles have limited memory and it's unlikely that all of the graphics are loaded at any particular time. They're usually loaded in blocks, so 2Bh might display grass when you're in a plains area but sand when you're in a desert.

Tile Layer Pro can tell you where graphics are stored in the ROM but that won't help in regards to where it's stored in RAM, since you'll first have to write your own code to load it into RAM. The address you're seeing in Tile Layer Pro corresponds to the ROM address of the top left tile. Just count from there (in hexadecimal of course) or use the left/right & up/down keys to move a particular tile into that upper-left position in order to find out the ROM address of a particular tile.
InVerse is offline   Reply With Quote
Old 01-01-2010, 11:31 AM   #3
eyeofmordor42
Junior Member
 
Join Date: Dec 2009
Posts: 2
Default

Thanks

I downloaded TileEd and gave it a try. It displays the actual address of each block so that might make it a bit easier. So what your saying is that in order to add any new graphics to the game I would probably have to rewrite the entire code. I guess that probably goes for adding any text as well. Wow, this is quite an undertaking, I really don't think I'm gonna' accomplish anything until I actually go through a guide on 65816 and learn to program with this code. ehhh.
eyeofmordor42 is offline   Reply With Quote
Old 01-01-2010, 04:48 PM   #4
InVerse
Senior Member
 
Join Date: Jul 2002
Location: Midwest, U.S.
Posts: 1,489
Default

Look at it this way... If it was simple to add new content, there would be tons of hacks that did so. I can't think of a single one that has did this, though I'm pretty sure there are a couple of examples. A good % of hacks that seem to feature new content either replaced existing features with new ones or somehow unlocked content that was originally in the game but that was dummied out prior to release.

If you're willing to learn assembly programming, I would strongly recommend learning how to modify existing content prior to attempting to insert additional content.
InVerse is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:00 PM.

Contact Us - Zophar's Domain - Archive - Top

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.