#21866 - mystical_craven - Tue Jun 08, 2004 3:07 pm
let's say I want to create a clone of a popular game title...how would I go about breaking apart a ROM into all the code and stuff behind it so I can see how the game itself was made (which, of course, I could then use to re-make a similar version with my own characters and what have you)
I tried downloading that gamedeveloperskit thing, but I couldn't get it to work (it kept telling me it couldn't find the gcc.exe file even thought I KNOW I was in the correct folder) So then I downloaded VisualHAM, but as far as I can tell it just lets you create your own games...unless I'm overlooking the obvious here - I'm guessing you can't use it to break down games that are already made
so either I'm a complete imbacil (which is likely the case considering all the spelling errors I've inevitably made so far) or I simply have no freakin clue what I'm doing
all I want to know is how can I view the code behind games that are already written so that I can get an idea of what a working game actually looks like underneath the surface
if anyone can help get me pointed in the right direction - I'd be eternally greatful
_________________
"An unused mind is like a defective condom - it doesn't do you a piss of good" ~me
#21867 - poslundc - Tue Jun 08, 2004 3:33 pm
VBA lets you disassemble the ROM and view the assembly code and registers as it's being executed... but good luck if you're trying to use that as a way to understand what is going on under the hood.
If all you want to do is splice your images into the ROM it may be possible, but you'd still have to learn a fair bit about the GBA memory sections, etc. to understand what to look for in the disassembly. And if they are compressing their graphics you may have a heck of a time doing it.
Dan.
#21868 - sgeos - Tue Jun 08, 2004 3:47 pm
mystical_craven wrote: |
let's say I want to create a clone of a popular game title...how would I go about breaking apart a ROM into all the code and stuff behind it so I can see how the game itself was made |
With great difficulty.
mystical_craven wrote: |
(which, of course, I could then use to re-make a similar version with my own characters and what have you) |
If you want to learn how to design games, I think that disassembly is the long road. I think that learning about computer *stuff* and game design is a faster and more efficient way of doing things. After you know enough about how things work, you can look at features in games and come up with a way of implementing those features on your own. You may or may not have a better solution.
mystical_craven wrote: |
all I want to know is how can I view the code behind games that are already written so that I can get an idea of what a working game actually looks like underneath the surface |
Seeing the assembler is simple. Just use VBA. If you want to see higher level source code, then the GBA is not the place to be. Find a java decompiler and use it to regenerate source files from class file. (C# decompilers are also readily available.)
-Brendan
#21871 - mystical_craven - Tue Jun 08, 2004 4:25 pm
damn...I was kinda hoping it would be as easy as loading a ROM, pressing some magic button, and having all this really nifty stuff pop up (sprites, sound files, etc...)
looks like I havta actually learn what I'm doing huh ;)
eh well...such is life I suppose :shrugs:
_________________
"An unused mind is like a defective condom - it doesn't do you a piss of good" ~me
#21874 - CATS - Tue Jun 08, 2004 6:02 pm
try clicking the Sources link on the main part of the site
#21875 - tepples - Tue Jun 08, 2004 6:12 pm
mystical_craven wrote: |
damn...I was kinda hoping it would be as easy as loading a ROM, pressing some magic button, and having all this really nifty stuff pop up (sprites, sound files, etc...) |
If a ROM uses a "file system" approach to storing assets, and it uses only well-known compression methods, then it would be possible for somebody to write a tool to browse assets in a ROM. However, no such publicly available tools exist to my knowledge. I ought to make one for ROMs that use the so-called GBFS.
If you want to rip sprites from commercial GBA games that you've dumped in order to use them in your own demos or in sprite comics, use VBA's Tile Viewer and OAM Viewer, along with Ctrl+N to stop the action and step a frame at a time (Ctrl+P to resume action).
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#21876 - Miked0801 - Tue Jun 08, 2004 6:23 pm
Unless you are good - real good - at ARM/Thumb assmebly and unless you have a ton of GBA knowledge, you aren't gonna get anything useful from looking at disassembly. Even on the GBC with only Z80, it took more time and energy to try to figure out what something was up from straight opcodes than if I were to just watch the game and make guesses. BTW, even with knowledge of compression and locations (hell even with a symbol table), you would have a very difficult time getting anywhere with this method. If it were easy, our publishers and Nintendo would demand that we encrypt our assets to protect their interests.
#21880 - dagamer34 - Tue Jun 08, 2004 7:23 pm
Miked0801 wrote: |
Unless you are good - real good - at ARM/Thumb assmebly and unless you have a ton of GBA knowledge, you aren't gonna get anything useful from looking at disassembly. Even on the GBC with only Z80, it took more time and energy to try to figure out what something was up from straight opcodes than if I were to just watch the game and make guesses. BTW, even with knowledge of compression and locations (hell even with a symbol table), you would have a very difficult time getting anywhere with this method. If it were easy, our publishers and Nintendo would demand that we encrypt our assets to protect their interests. |
Looks like they did a good job.
_________________
Little kids and Playstation 2's don't mix. :(
Last edited by dagamer34 on Tue Jun 08, 2004 9:45 pm; edited 1 time in total
#21887 - sajiimori - Tue Jun 08, 2004 8:55 pm
Code: |
if (your_engine >= my_engine)
{
while (your_engine >= my_engine)
|
If your code is so full of redundancy, I'd imagine you'll be ++ing for a long time. =)
#21893 - dagamer34 - Tue Jun 08, 2004 9:47 pm
sajiimori wrote: |
Code: |
if (your_engine >= my_engine)
{
while (your_engine >= my_engine)
|
If your code is so full of redundancy, I'd imagine you'll be ++ing for a long time. =) |
Fine, I'll change it back to where it was. Efficient enough for you?
_________________
Little kids and Playstation 2's don't mix. :(
#21900 - sajiimori - Wed Jun 09, 2004 3:31 am
Quote: |
Efficient enough for you? |
No. ;-) Code: |
if(your_engine >= my_engine)
my_engine = your_engine + 1; |
#21903 - CATS - Wed Jun 09, 2004 9:03 am
Also, I'd recommend looking at some third party level editors for games, they give you a good insight into how all the data slots together.
http://www.romhacking.com/utils/leveled.php
#21905 - mystical_craven - Wed Jun 09, 2004 12:30 pm
what I'm actually hoping to accomplish is to make a collectible card game based off the basic rule sets of the Yu-Gi-Oh! games (hence the reason I was hoping to find a way to observe the internal working of one of the games - to see how the basic structure was set up) so I'm not entirely sure viewing the source for other styles of games is gonna help very much...though I certainly appreciate the advice (as I'm sure it would've been a lot of help had I actually been able to find an example of the game genre I'm working towards)
I did however find a couple generic CCGs online that came with the source code (yeah!) so I at least have an idea as to how these sorts of things are set up...unfortunately though - I now find myself back at the basics (tetris clones and the like) in order to get a better grasp of the C language before I can actually start putting any of this together...so it's still gonna be a while before I can get any actual real work done with this project
it'll all be worth it though ^_~
_________________
"An unused mind is like a defective condom - it doesn't do you a piss of good" ~me
#21906 - col - Wed Jun 09, 2004 12:34 pm
sajiimori wrote: |
Quote: | Efficient enough for you? | No. ;-) Code: | if(your_engine >= my_engine)
my_engine = your_engine + 1; |
|
src/FeatureCreep.cpp:47: no match for `Engine& + int' operator
make.exe: *** [src/FeatureCreep.o] Error 1
Error executing make.exe.
what about:
Code: |
while (your_engine >= my_engine)
my_engine.bloat();
|
col
#21911 - poslundc - Wed Jun 09, 2004 1:52 pm
col wrote: |
what about:
Code: | while (your_engine >= my_engine)
my_engine.bloat();
|
|
Doesn't surprise me, seeing as you're using C++... <rimshot> oh yeah!
Dan.