(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-06-24 08:57 PM
0 users currently in ROM Hacking.
Acmlm's Board - I3 Archive - ROM Hacking - whats a reasonable language for hacking New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
Cassef
Newcomer


 





Since: 01-02-06

Last post: 6696 days
Last view: 6696 days
Posted on 01-02-06 10:08 PM Link | Quote
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
Guy Perfect









Since: 11-18-05

Last post: 6289 days
Last view: 6287 days
Posted on 01-02-06 10:20 PM Link | Quote
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.


(edited by BGNG on 01-02-06 09:22 PM)
Apophis

Ropa








Since: 11-17-05

Last post: 6287 days
Last view: 6286 days
Skype
Posted on 01-02-06 11:06 PM Link | Quote
do you mean for the actual hacks or for coding editors?
Cassef
Newcomer


 





Since: 01-02-06

Last post: 6696 days
Last view: 6696 days
Posted on 01-02-06 11:20 PM Link | Quote
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.
dcahrakos

490


 





Since: 11-17-05

Last post: 6504 days
Last view: 6504 days
Posted on 01-02-06 11:22 PM Link | Quote
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...
Apophis

Ropa








Since: 11-17-05

Last post: 6287 days
Last view: 6286 days
Skype
Posted on 01-03-06 12:03 AM Link | Quote
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.
Disch

Red Cheep-cheep


 





Since: 12-10-05

Last post: 6566 days
Last view: 6566 days
Posted on 01-03-06 12:14 AM Link | Quote
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
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6288 days
Last view: 6286 days
Posted on 01-03-06 12:33 AM Link | Quote
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.
Guy Perfect









Since: 11-18-05

Last post: 6289 days
Last view: 6287 days
Posted on 01-03-06 12:46 AM Link | Quote
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?


(edited by BGNG on 01-02-06 11:51 PM)
||bass
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6288 days
Last view: 6286 days
Posted on 01-03-06 01:04 AM Link | Quote
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









Since: 11-18-05

Last post: 6289 days
Last view: 6287 days
Posted on 01-03-06 01:28 AM Link | Quote
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
Administrator








Since: 11-17-05
From: Salem, Connecticut

Last post: 6288 days
Last view: 6286 days
Posted on 01-03-06 04:05 AM Link | Quote
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.
creaothceann

Red Goomba








Since: 11-22-05

Last post: 6482 days
Last view: 6482 days
Posted on 01-03-06 10:31 AM Link | Quote
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?
Add to favorites | Next newer thread | Next older thread
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.041 seconds; used 406.34 kB (max 510.40 kB)