(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
05-19-24 11:54 AM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - whats a reasonable language for hacking
  
User name:
Password:
Reply:
 
Options: - -
Quik-Attach:
Preview for more options

Max size 1.00 MB, types: png, gif, jpg, txt, zip, rar, tar, gz, 7z, ace, mp3, ogg, mid, ips, bz2, lzh, psd

UserPost
creaothceann
Posts: 5/43
I'm assuming you work on Win32?

Originally posted by Cassef
What language do you use for rom hacking (Tell me what you like/dislike about it)? C/C++ seems nice (And I already know it) but its to much work. Especially compiling for little changes(I value my 5 seconds )
I'm not exactly ROM-hacking... but I'm using Delphi (still version 5.0). Note that support for other platforms is quite limited.

Originally posted by Cassef
What Iam interested in listening to is how much effort put in for the following about the language:
1) File I/O

- WinAPI file handles
- "File" and "File of " (from the old DOS days)
- streams (FileStream, MemoryStream etc., quite nice)
- some classes (eg. tBitmap) have "SaveToFile", "LoadFromFile", "SaveToStream" etc. methods

Originally posted by Cassef
2) Bitwise operations (Some languages like VB, have no bitshifting operators and I need that)

AND, OR, XOR, NOT, SHL, SHR

Originally posted by Cassef
3) Create GUI

Very good at that, see eg. vSNES.

Originally posted by Cassef
4) Communicate to console

??

Originally posted by Cassef
5)Measuring time (This will most likely depend on OS but not likely for interpreted language's) minimum centisecond accuracy

What for?
||bass
Posts: 23/594
Originally posted by BGNG
Clearly .NET is the most intuitive suite of programming languages. It's a shame they're more-or-less interperated ROMs like a "Microsoft Java"

Agreed. Compatibility with non-windows systems has a long way to go. On the up side, mono is making some clear progress, I have high hopes for mono because I really like C# and I really hate using windows as a server platform.

Thumps up to microsoft for submitting .net and C# for standardization. One of the few smart things they've ever done.
Guy Perfect
Posts: 60/451
Clearly .NET is the most intuitive suite of programming languages. It's a shame they're more-or-less interperated ROMs like a "Microsoft Java"
||bass
Posts: 22/594
Bitshifting on signed integers by itself is inherently unsafe since a generic "int" or "long" might be a certain bitlength on one platform and a different bitlength on another. The safest way to do bitshifting is on numeric types is to use specific types such as the uint32 type available in C# and a few other languages.

Unsigned, with a fixed definate bitlength.
Guy Perfect
Posts: 58/451
If you understand your value to be negative, then shift in a 1 instead of a 0.

Assuming X and Y are 8-bit, negative integers and Z < 9:
X = (Y And &HFFFF&) / 2 ^ Z And &HFF

But seriously... What application would there be for bit shifting on negative numbers?
||bass
Posts: 21/594
Allow me to plug C# for a moment.
It has almost all the flexibility and strength of C++ without all those nasty heap pointer management issues.
Disch
Posts: 17/202
Originally posted by BGNG
the same thing can be done by dividing or multiplying by an exponent of two.


I felt I should bring up that this work will only work with unsigned values. Granted values will usually be unsigned when working on an editor or something... but I still feel it's worth mentioning.

Example: -1 >> 1 == -1
whereas: -1 / 2 == 0
Apophis
Posts: 163/734
Originally posted by Cassef
It doesn't matter, if you like one language for programming programs to help explore a rom and another for programming the editor, if you talk about what you think of the 2 languages that would be nice.


Okay. I just wanted to make sure you weren't looking for a languge to use source code in the rom.
dcahrakos
Posts: 153/499
well, I use VB, and there have been a few problems ive run into, but theres always a work around, and the good thing about vb is the same week almost, you can start coding, I remember when I first started, the same week I actually had a working 7th saga save state editor...
Cassef
Posts: 4/5
It doesn't matter, if you like one language for programming programs to help explore a rom and another for programming the editor, if you talk about what you think of the 2 languages that would be nice.
Apophis
Posts: 162/734
do you mean for the actual hacks or for coding editors?
Guy Perfect
Posts: 57/451
Variants of BASIC (such as Visual Basic) support bitwise operators such as And, XOr, Not, etc., but as you say, do not supply bit shifting operators. Instead, the same thing can be done by dividing or multiplying by an exponent of two. Observe:

In C, assuming X is an 8-bit, unsigned integer:
X = Y << Z;

Is the same as the VB:
X = (Y * 2 ^ Z) And &HFF

Sure, it's some bizzare workaround, but if you're going for ease of programming, this would probably be your best solution.

VB compiles code at run-time when previewing, or you can compile the entire thing before debugging. When compiled, the code will be wherabouts of one extensive operation taking less than 1 millisecond.
Cassef
Posts: 3/5
What language do you use for rom hacking (Tell me what you like/dislike about it)? C/C++ seems nice (And I already know it) but its to much work. Especially compiling for little changes(I value my 5 seconds ), some interpreted language would be nice. Iam thinking of python, but before I go learn a new language I would like to hear opinions.

What Iam interested in listening to is how much effort put in for the following about the language:
1) File I/O
2) Bitwise operations (Some languages like VB, have no bitshifting operators and I need that)
3) Create GUI
4) Communicate to console
5)Measuring time (This will most likely depend on OS but not likely for interpreted language's) minimum centisecond accuracy
Acmlm's Board - I3 Archive - ROM Hacking - whats a reasonable language for hacking


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.003 seconds; used 359.30 kB (max 413.40 kB)