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

Author Topic: Asm hacking  (Read 12168 times)

Chippy2000

  • Jr. Member
  • **
  • Posts: 76
  • I'm the CREATOR Pokemon Gold Beta/Alpha Revival!
    • View Profile
Re: Asm hacking
« Reply #40 on: February 09, 2014, 10:32:31 am »
Pokemon GBA and GB hacking must be the easiest ever since the dev tools are simple since you don't need any experience - you just need to choose the stuff you want or do whatever you want to the map and BAM. You're done. It's just implementing and editing wild pokemon data. ASM is good for title editing though.
COO of The Chippy Cooperation (TCC)

I'm...just here...floating in space and stuff...

Trax

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
    • Trax ROM Hacking
Re: Asm hacking
« Reply #41 on: February 10, 2014, 07:36:23 pm »
I use a text editor and a hex editor, and I do only NES ASM. I can't say it's by choice, because sometimes I'd like to have a few things automated, especially branch jumps calculations, but since I work on Mac, I'm not sure if a 6502 disassembler exists...

My normal way of hacking is already very close to disassembly, so my hacking notes are basically ASM written in text files, with lots of commentary. But when I want to do a specific modification that involves ASM, I make a new text file in which I explain the goal of the hack, what kind of variables it uses, etc., and I copy paste the code that needs to change and I write the new ASM from scratch. Then I insert the hex code by hand using a hex editor. After testing, if I need to tweak something, I do it in the hex editor directly, but if it needs a major change, I just return to the text file, do my work, and recopy the bytes in the hex editor when ready...

It's tedious, but I know I can get nice results with games I know very well. And most of the time, a heavily hacked game is really just a bunch of sub-hacks that are applied to the same game, incrementally...

RyanfaeScotland

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • My Brill Game Site
Re: Asm hacking
« Reply #42 on: October 22, 2015, 07:53:24 am »
Totally agree with Kaioshin's post. You don't wanna edit and stack changes with a hex editor, you better off start with something that can be recompiled entirely, just in case something gets broken in the process. Usually I have a couple batches that redo the full hacking process, doesn't matter if the source data is original or already hacked assets. Whenever something gets broken in my process, I simply restore the original data, revert the last source changes, hit compile and see if the issue goes away. If it does, I can start looking into whatever is causing the problem, but the rest of the hack still stays in place and gets preserved for good.

But realistically how often in this business does one have that luxury? It sounds fine if you are changing SMW or Sonic where the full disassemblies are readily available but what if it is something else like say Toejam And Earl which is fairly undocumented. Are you suggesting you should aim for a full compliable decompile first before aiming to make any changes? Not criticising, genuinely asking, as it sounds fairly impractical.

NB - Sorry for the necro but this is an interesting and still relevant discussion.

tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: Asm hacking
« Reply #43 on: October 22, 2015, 08:49:57 am »
Much more interesting than some debates that flourishes here and there these days :)

I think Gemini wasn't refering to a complete editable disassembly (it's indeed very rare ; for Genesis, I know about Sonic games, Shining Force - at least one of them -, and Phantasy Star II, III and IV), but rather a batch file that inserts all hacked routines to a clean ROM.

I wonder how much time it takes to disassemble a complete game.

RyanfaeScotland

  • Sr. Member
  • ****
  • Posts: 348
    • View Profile
    • My Brill Game Site
Re: Asm hacking
« Reply #44 on: October 22, 2015, 09:10:09 am »
Much more interesting than some debates that flourishes here and there these days :)

I think Gemini wasn't refering to a complete editable disassembly (it's indeed very rare ; for Genesis, I know about Sonic games, Shining Force - at least one of them -, and Phantasy Star II, III and IV), but rather a batch file that inserts all hacked routines to a clean ROM.

I wonder how much time it takes to disassemble a complete game.

Hmmm yeah I could see the benefit in doing it that way. I imagine there is already some generic patching tool out there that could be repurposed for the job as well.

I was curious about the time thing myself, was looking around SonicRetro for more information about how they went about creating their disassemblies but didn't see much concerning the actual history of the project(s) other than 'this person produced this' style entries.

I'm really keen to see what Exodus's 'Active Disassembly' is all about (I really curse myself reading up about these things during lunch then having to wait till I get home to try them!)

freem

  • Jr. Member
  • **
  • Posts: 19
  • ɯǝǝɹɟ
    • View Profile
    • AJWorld
Re: Asm hacking
« Reply #45 on: October 22, 2015, 02:04:59 pm »
But realistically how often in this business does one have that luxury? It sounds fine if you are changing SMW or Sonic where the full disassemblies are readily available but what if it is something else like say Toejam And Earl which is fairly undocumented. Are you suggesting you should aim for a full compliable decompile first before aiming to make any changes? Not criticising, genuinely asking, as it sounds fairly impractical.

I guess this is a combination of answering your question and explaining my technique...

It sounds impractical, but for what I primarily hack (NES games), it's do-able. Tools like aNESe and SmartRENES allow for a re-assemblable version of the code. While a perfectly commented disassembly is my ideal goal, for hacks, you really only need to identify the code and data you're looking for. Using diff (in binary mode) to compare to a known good ROM keeps me honest, and lets me know when I've messed up. (Of course, this is only for documenting the original; hacks don't need this step :p)

FCEUX's CDL functionality is also useful when paired with a disassembler that can make use of it. (e.g. disasm6) clever-disasm (found in nescom) is also useful, though you need to craft the .ini files yourself.

For other systems, there's always MAME (or IDA Pro if you can afford/buy it). MAME has a universal disassembler (unidasm) that can be built from source, supporting a decent number of processors. Granted, you'll still need to find out what's really code/data, but it's better than nothing. (You can also disassemble from MAME's debugger.)

I don't expect anyone else to do this; everyone has a workflow they enjoy using. This is what works for me.

edit: On time - smaller games are much easier to deal with, though I don't have much to show for my work right now. (Super Dodge Ball is pretty big at 128K of PRG-ROM, while RC Pro-Am is a bit more manageable.)

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: Asm hacking
« Reply #46 on: October 23, 2015, 01:46:41 am »
Hex editor ASM-er here.

I must be a purist in that sense.