Go Back   The PokéCommunity Forums > ROM Hacking > Tools, Tutorials & Resources

Notices
For all updates, view the main page.

Tools, Tutorials & Resources Various tools to help you develop your hacks can be found here.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
Click here to go to the first staff post in this thread.  
Thread Tools
  #1    
Old July 19th, 2013 (03:50 PM). Edited July 20th, 2013 by Reisen.
Reisen's Avatar
Reisen
Lunar Rabbit
Community Supporter
 
Join Date: Mar 2011
Location: 永遠亭
Age: 15
Gender: Female
Nature: Quiet
Send a message via Skype™ to Reisen
XEH [A Library For Your Hacking Tool]

Introduction
Some people were asking me to teach them about making hacking tools, so I decided to start working on a library that can jumpstart programmers and save them time on starting a hacking tool.

This is the first release of a library that can simplify your application development experience, if you are a .NET developer, that is.

More features will be added eventually.

If you have any suggestions, feel free to make them.

And example of how to use the library is in the attachments, as well as the library itself.

Functions
String OpenHex(String fileName)

///Returns a string containing hex of the provided filename

Void SaveHex(String fileName, String hexString)

///Saves provided string of hex to provided filename

Struct Macro

///Macro object that can be inherited

Int() Macro.MacroIndex

///Index at which the Macro will be executed

String() Macro.MacroContent

///Hex string that will overwrite the area

Int() Macro.MacroRange

///Range of Hex that will be deleted and then inserted, may possibly be omitted in the next release

String Macro.MacroName

///Name by which the macro can be identified

Void Macro.New(Int macroIndex, String macroContent, Int macroRange, String macroName)

///Constructor that will allow new instances of Macro to be created

Void Macro.RedimMacro(Int index)

///Should only be used for modifying macros at runtime, changes size of macro arrays

Void Macro.AssignMacro(Int position, Int index, Int hexString)

///Should only be used for modifying macros at runtime, changes content of macros

String Macro.ExecuteMacro(String hexString)

///Returns a string modified by the macro

Expected
Repointing Macros
Move Macros
Byte-Based Operation Macros

Future
There are many improvements to be made, and I am putting this out here just so people can make suggestions about it, so that this eventually will be a library that all developers can use.
Attached Files
File Type: zip XEHDIST.zip‎ (167.6 KB, 72 views) (Save to Dropbox)
__________________
  #2    
Old July 21st, 2013 (07:16 AM).
link12552's Avatar
link12552
just tired, that's all
 
Join Date: Dec 2007
Location: The not so distant future
Age: 18
Gender: Male
Nature: Calm
Alright, good to see someone working on a ROM hacking library.
There are, however, a few issues I feel you MUST realize before you continue too much farther.

- You're making the same mistake I made: reading data as a hexadecimal string.
Not only is this inefficient ( it doubles the size of the data), it's also a common conceptual issue.
You want to retrieve the actual data, the bytes, not a string representing it.

- When writing a library like this, you need to provide more data driven functions and classes.
You should be able to type something similar to:
byte[] data = MyReader.ReadBytes(some offset, some length);
MyWriter.Write( data, some offset);

- Programmers will write their own functions using this library.
The entire concept of "macros" is burdensome and unnecessary.
Create functions and types that programmers can use to build their own programs.

- You need to make this opensource.
Sure, people may use some of your code without permission. People will, however, point out bugs, flaws, and possible optimizations.
Programmers like to know what a function they call actually does - how it functions.
Plus, it's extremely easy to reverse engineer .NET programs - in fact I'm looking at the de-compiled source right now!

- Finally, libraries like this already exist.

My advice: Write programs, not libraries.
Make an awesome tool that tens of thousands of people use, not a library that only a handful will see.
__________________
  #3    
Old July 21st, 2013 (07:38 AM).
Reisen's Avatar
Reisen
Lunar Rabbit
Community Supporter
 
Join Date: Mar 2011
Location: 永遠亭
Age: 15
Gender: Female
Nature: Quiet
Send a message via Skype™ to Reisen
Quote originally posted by link12552:
Alright, good to see someone working on a ROM hacking library.
There are, however, a few issues I feel you MUST realize before you continue too much farther.

- You're making the same mistake I made: reading data as a hexadecimal string.
Not only is this inefficient ( it doubles the size of the data), it's also a common conceptual issue.
You want to retrieve the actual data, the bytes, not a string representing it.

- When writing a library like this, you need to provide more data driven functions and classes.
You should be able to type something similar to:
byte[] data = MyReader.ReadBytes(some offset, some length);
MyWriter.Write( data, some offset);

- Programmers will write their own functions using this library.
The entire concept of "macros" is burdensome and unnecessary.
Create functions and types that programmers can use to build their own programs.

- You need to make this opensource.
Sure, people may use some of your code without permission. People will, however, point out bugs, flaws, and possible optimizations.
Programmers like to know what a function they call actually does - how it functions.
Plus, it's extremely easy to reverse engineer .NET programs - in fact I'm looking at the de-compiled source right now!

- Finally, libraries like this already exist.

My advice: Write programs, not libraries.
Make an awesome tool that tens of thousands of people use, not a library that only a handful will see.
Sorry, I didn't have the time to put the source up. Of course I know about stuff like RedGate's .NET Reflector, and other decompilers alike.

And also, this is just a mere anterelease, not even considerable as an Alpha.

I'm just putting this out there to let people know that something like this will eventually exist and can be used.

And yes, I am working on an awesome tool that many (although most likely not thousands) will use. The Alpha has already been put up for almost two weeks.

Of course, I am definitely working on improving this.

Thanks for the feedback.
__________________
  #4    
Old January 6th, 2014 (06:35 AM).
Senusret's Avatar
Senusret
Change you can believe in.
Community Supporter
 
Join Date: Nov 2009
Location: The Raleigh-Durham-Chapel Hill Medical Research Triangle
Age: 16
Gender: Male
Nature: Impish
Send a message via Skype™ to Senusret
You know, this is a really good idea. The thing is, it needs to be more well-defined, more… shapeful. Essentially, you're gonna wanna add a LOT more functions (like, as many as you could think of) to make this a valued commodity.

I'm also working on a ROM hacking library that's in its development stages, but it's not based in .NET (let alone VB) – it's being coded in Intel x86 ANSI C. I'm also going to release a 64-bit version, something .NET programs can't do (noteworthy, right?) Just some tips, though.
  1. I'd suggest using Visual C# or (if you think you can handle it) .NET C++. Visual Basic hasn't been a really favored language among developer communities, per sé, and if you do .NET C++, it'd be incredibly easy to port into Win32.
  2. Link's right about macros: they're a little over the top. Why not just make a function for it?
  3. Not all programs are based in .NET, meaning this library is useless for anyone developing in Win32 C/C++, let alone another language like Java or Fortran.

I hope you'll take what I've said into consideration.
__________________
  #5    
Old January 7th, 2014 (05:37 AM).
karatekid552's Avatar
karatekid552
What happens if I push it?....
 
Join Date: Nov 2012
Location: Do you really want to know? Really?
Gender: Male
Nature: Bold
Send a message via AIM to karatekid552 Send a message via Windows Live Messenger to karatekid552 Send a message via Skype™ to karatekid552
Please don't revive old threads.

-Locked-

@DeltaSalamence, if you would like this thread reopened, just pm DrFuji, giradialkia, or myself.
__________________

Paired with Simba
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:54 AM.