News: 11 March 2016 - Forum Rules

Author Topic: What programming language should I code my PSX hacking tool in?  (Read 2464 times)

Rexius55

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
What programming language should I code my PSX hacking tool in?
« on: January 22, 2022, 05:12:25 pm »
I have nothing to show yet obviously, but I'm working on creating an all-in-one hacking tool for Castlevania: Symphony of the Night for the original PlayStation 1 with a friend of mine named DragonQuester676. We've been trying to figure out what coding language we should build it with (we've planned about everything else already, and we've been learning a lot about how the game works internally). I'm still a bit new, but I've learned and practiced with a lot of C++ and Java. I wanted to ask anyone here with more knowledge and a bigger portfolio than us before we acted on anything.

For more clarification on what we aim to do: create a hacking tool called Joseph's Cloak that can edit every aspect of the game from text to rooms and even audio, graphics, and code. Big ambitions, I know, but we'll gradually build up to what we want of course with growing versions. What we really need to get started right now is the answer to my prompted question.

I do know that Java has a large library to work with, and the C languages are fantastic (at least, from what I know), but I'm not a programming wizard just yet. Anyone who's got a good answer or a link to a better place where I could ask? Much thanks.  :beer:
« Last Edit: January 22, 2022, 11:26:38 pm by Rexius55 »

FAST6191

  • Hero Member
  • *****
  • Posts: 3519
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #1 on: January 22, 2022, 10:47:36 pm »
6 of one, half a dozen of the other.

Both are high level languages. Both will be around in 15 years. Both have extensive GUI libraries and capabilities, and are more than capable of the low level fiddling. Both will make something of more than acceptable speed.


For my money, and those of several others, then not having to have the Java runtime installed is a nice thing (I have actively avoided it for years now, and most others if they have it will be because minecraft). At the same time being on Java gives it a better shot at being OS independent (possibly even mobile phone/android port if you are rolling that way) where C++ might get more annoying (especially if you lean into the Windows APIs and libraries). Java might be an easier in than C++ but C++ has a higher ceiling for performance and capabilities.

To that end does either language appeal to you on an intellectual, educational or professional level? A lot of people will make these sorts of programs to learn/improve/explore a language/library/concept they plan to use in day to day life and with the perk of it holding their interest more than hello world 5000000.

Rexius55

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #2 on: January 22, 2022, 11:26:00 pm »
6 of one, half a dozen of the other.

Both are high level languages. Both will be around in 15 years. Both have extensive GUI libraries and capabilities, and are more than capable of the low level fiddling. Both will make something of more than acceptable speed.


For my money, and those of several others, then not having to have the Java runtime installed is a nice thing (I have actively avoided it for years now, and most others if they have it will be because minecraft). At the same time being on Java gives it a better shot at being OS independent (possibly even mobile phone/android port if you are rolling that way) where C++ might get more annoying (especially if you lean into the Windows APIs and libraries). Java might be an easier in than C++ but C++ has a higher ceiling for performance and capabilities.

To that end does either language appeal to you on an intellectual, educational or professional level? A lot of people will make these sorts of programs to learn/improve/explore a language/library/concept they plan to use in day to day life and with the perk of it holding their interest more than hello world 5000000.

Thank you. Yeah, I was thinking hard about Java's OS benefit. After looking a bit further, Java seems like a better option in the long run despite C++'s seemingly better performance. Again, thanks for this great reply.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 7413
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #3 on: January 22, 2022, 11:42:42 pm »
People still use Java?

I haven't heard of anyone writing in that in at least 10 years. Closer to 15.
I'd imagine probably the only reason I still installed it was Tile Molestor.
"My watch says 30 chickens" Google, 2018

piken

  • Jr. Member
  • **
  • Posts: 2
    • View Profile
    • Piken's Pursuits
Re: What programming language should I code my PSX hacking tool in?
« Reply #4 on: January 23, 2022, 08:14:15 am »
With the rare exception of SnowBro's tile editor, you don't find many emulation tools in Java, which could hamper efforts to get help from others or get pull request contributions if others don't know it. The language is alive in enterprise, and alive on Android, but on desktop, it's pretty dead, and even on the other platforms, it's being eaten by Kotlin or Scala or other more concise JVM substitutes. Visiting https://www.romhacking.net/?page=utilities and filtering by OS, you'll see:

51 - Java
147 - DOS
1169 - Windows (presumably a mix of C/C++/C# and possibly Delphi)

My next project will use C++ with SDL2 (targeting Windows and Ubuntu), and maybe also compiled via Emscripten to WebAssembly so people can directly run it in a browser too before downloading it, but that's just me.

C# is an option commonly found in emulation utilities - also plenty of libraries, easy UI design, capable of low level bit manipulation, and works across platforms (via Mono on Linux). If you haven't considered it yet, I'd investigate that one too.

Python is another one I've seen a number of emulation utilities written in more recently. Though, it seems to be mainly command line processing tools rather than actual UI, probably because any complex GUI program becomes really hard to develop when there's no compile time checking against types and names, such that you silently break 5 minutes later when you test a new code path because you spelled a variable name wrong by one letter 😤.

FAST6191's remark about the JVM is true. When I see a utility is written in Java and wants me to install the whole JVM, (perhaps harsh) I just move along :b. That said, there exist some tools to compile Java to native code (e.g. I've heard of GraalVm and GCJ), and so if you can produce an ELF and PE .exe without needing the entire framework, that could certainly reduce friction of user adoption.

Rexius55

  • Jr. Member
  • **
  • Posts: 8
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #5 on: January 23, 2022, 11:27:01 am »
With the rare exception of SnowBro's tile editor, you don't find many emulation tools in Java, which could hamper efforts to get help from others or get pull request contributions if others don't know it. The language is alive in enterprise, and alive on Android, but on desktop, it's pretty dead, and even on the other platforms, it's being eaten by Kotlin or Scala or other more concise JVM substitutes. Visiting https://www.romhacking.net/?page=utilities and filtering by OS, you'll see:

51 - Java
147 - DOS
1169 - Windows (presumably a mix of C/C++/C# and possibly Delphi)

My next project will use C++ with SDL2 (targeting Windows and Ubuntu), and maybe also compiled via Emscripten to WebAssembly so people can directly run it in a browser too before downloading it, but that's just me.

C# is an option commonly found in emulation utilities - also plenty of libraries, easy UI design, capable of low level bit manipulation, and works across platforms (via Mono on Linux). If you haven't considered it yet, I'd investigate that one too.

Oh, thanks! Yeah I haven’t seen too much in Java either, but I wasn’t too sure. Well then I’ll do it in either C# or C++ (I’ll discuss with my collaborator). Thank you for this!

FAST6191

  • Hero Member
  • *****
  • Posts: 3519
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #6 on: January 23, 2022, 01:07:13 pm »
People still use Java?

I haven't heard of anyone writing in that in at least 10 years. Closer to 15.
I'd imagine probably the only reason I still installed it was Tile Molestor.

There were a few DS tools done in it, visual basic classic had died by this point (not that I am complaining about that) so it was mostly by those that suffered Java programming school as was popular at the time/5 years leading up to it.

Mind you now I have been neutral above I will join the chorus of "Java *spits*".

MottZilla

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #7 on: January 23, 2022, 07:49:16 pm »
You should use whatever language and development tools/libraries you are most comfortable with. I personally would recommend C/C++ but if you have more experience working with something else then that is the obvious choice unless you're wanting this project to be a learning experience to get better at another language or library.


MysticLord

  • Sr. Member
  • ****
  • Posts: 258
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #8 on: January 23, 2022, 08:51:35 pm »
I vote for Python 3.x, and against Java. Especially against anything with a GUI in Java. There is a ton of undocumented or just plain unknown behaviors with Spring, JavaFx is no longer supported (?) by Oracle, and Oracle is constantly making it harder for people to write or even run Java without paying a license fee. I don't know if there's an OpenJDK download for Windows that Just Works anymore, and it's honestly not worth it. I spent a few years coding an editor for a game in Java that I had to throw away because the GUI had some sort of concurrency or cache coherence issue that I couldn't resolve.

There are a few things here written in C# that are cross platform.

Granted I am a moron but perhaps morons have a wealth of experience from which the can speak.

Balgar

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #9 on: January 28, 2022, 07:39:35 am »
You should work with the language with which you feel most comfortable when developing. Java is a language in continuous growth (goes by the JDK-17) but rather for the development of services and systems in distributed environments and it is true that for the development of desktop applications it offers only 3 options: Java AWT (outdated), Java Swing (more or less outdated) and JavaFX (modern) which has now been separated from the latest JDK distributions to be a standalone library. On the other hand, if you don't end up being convinced by Java, I would recommend you use C++ with some kind of SDL2 or Qt library. (I forgot to mention that to make desktop applications in Java you don't need to use the Spring framework, which is a framework designed for webapps and service oriented development).

I vote for Python 3.x, and against Java. Especially against anything with a GUI in Java. There is a ton of undocumented or just plain unknown behaviors with Spring, JavaFx is no longer supported (?) by Oracle, and Oracle is constantly making it harder for people to write or even run Java without paying a license fee. I don't know if there's an OpenJDK download for Windows that Just Works anymore, and it's honestly not worth it. I spent a few years coding an editor for a game in Java that I had to throw away because the GUI had some sort of concurrency or cache coherence issue that I couldn't resolve.

There are a few things here written in C# that are cross platform.

Granted I am a moron but perhaps morons have a wealth of experience from which the can speak.

OpenJDK: https://openjdk.java.net/ || https://openjdk.java.net/projects/jdk/17/
Respect JavaFX this is taken from the official oracle website: JavaFX has been open sourced and redesigned to be available as a stand-alone library rather than being included with the JDK. Starting with Java SE 11, JavaFX is not included in the Oracle JDK. Support for JavaFX on Java SE 8 will continue until March 2025.
« Last Edit: January 28, 2022, 08:10:27 am by Balgar »

MysticLord

  • Sr. Member
  • ****
  • Posts: 258
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #10 on: January 28, 2022, 08:41:24 pm »
You should work with the language with which you feel most comfortable when developing. Java is a language in continuous growth (goes by the JDK-17) but rather for the development of services and systems in distributed environments and it is true that for the development of desktop applications it offers only 3 options: Java AWT (outdated), Java Swing (more or less outdated) and JavaFX (modern) which has now been separated from the latest JDK distributions to be a standalone library. On the other hand, if you don't end up being convinced by Java, I would recommend you use C++ with some kind of SDL2 or Qt library. (I forgot to mention that to make desktop applications in Java you don't need to use the Spring framework, which is a framework designed for webapps and service oriented development).
I'm so glad that I'm starting to forget Java. Yes, Swing is the official set of desktop GUI libraries, and from what I read a few years ago there's some sort of development going on with it to bring it up to date somehow along with JavaFX.

OpenJDK: https://openjdk.java.net/ || https://openjdk.java.net/projects/jdk/17/
Respect JavaFX this is taken from the official oracle website: JavaFX has been open sourced and redesigned to be available as a stand-alone library rather than being included with the JDK. Starting with Java SE 11, JavaFX is not included in the Oracle JDK. Support for JavaFX on Java SE 8 will continue until March 2025.

https://openjdk.java.net/install/
Quote
How to download and install prebuilt OpenJDK packages
JDK 9 & Later
Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux are available on release-specific pages of jdk.java.net as .tar.gz or .zip archives.

As an example, the archives for JDK 13 may be found on jdk.java.net/13 and may be extracted on the command line using

$ tar xvf openjdk-13*_bin.tar.gz
or

$ unzip openjdk-13*_bin.zip
depending on the archive type.
Hope you're ready to teach newbs to install openJDK manually to Windows, to keep track of bugs, and keep it updated. Plus if you use a feature that is depreciated or doesn't exist in the version they have installed, you need to depend on them giving you accurate reports on the version they are using (which in my experience as a Java programmer most users can't do, or won't do but will tell you they did do after you spend months trying to reproduce errors they found and wrecking your codebase).

Or you could use any other language.

Balgar

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #11 on: January 29, 2022, 06:13:18 am »
Is this really a problem?
Quote
How to download and install prebuilt OpenJDK packages
JDK 9 & Later
Oracle's OpenJDK JDK binaries for Windows, macOS, and Linux are available on release-specific pages of jdk.java.net as .tar.gz or .zip archives.

As an example, the archives for JDK 13 may be found on jdk.java.net/13 and may be extracted on the command line using

$ tar xvf openjdk-13*_bin.tar.gz
or

$ unzip openjdk-13*_bin.zip
depending on the archive type.

https://openjdk.java.net/install/Hope you're ready to teach newbs to install openJDK manually to Windows, to keep track of bugs, and keep it updated. Plus if you use a feature that is depreciated or doesn't exist in the version they have installed, you need to depend on them giving you accurate reports on the version they are using (which in my experience as a Java programmer most users can't do, or won't do but will tell you they did do after you spend months trying to reproduce errors they found and wrecking your codebase).

Or you could use any other language.

Among other things, people are paid to learn all these things. You can work perfectly in Java in production environments even using OpenJDK-based images without any problem. Honestly, and from my experience as a C++ and Java developer, I don't see any more inconvenience in working with a language like Java in business projects than with any other language like Python.

Now, for the topic discussed here, I have already given my opinion and I believe that in the end, to develop a tool like the one proposed in this thread, there are many open options that can lead to multiplatform code and Java with its problems in GUI development may be an option although in my opinion C++ may be more interesting here.

csanchez

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #12 on: January 29, 2022, 09:21:24 am »
C#, C/C++, Java, Python
Although they are the most popular, they are not the only options.

You can also try some BASIC dialect, they are much less popular but that doesn't mean they are not good.

They have the power of being compiled languages that do not need a virtual machine / interpreter of the language.
Advantage over Java, Python, C#.

A syntax much easier to understand, advantage over C/C++.

https://www.freebasic.net/
A free / open source QBasic implementantion, now is more than that.
Although is not very popular, it is a very capable language.


PureBasic
https://www.purebasic.com/
Probably the only modern alternative to the classic Visual Basic 6.

MysticLord

  • Sr. Member
  • ****
  • Posts: 258
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #13 on: January 29, 2022, 10:36:32 pm »
Is this really a problem?
Yes, you're adding hoops for your users to jump through to use your tools. More hoops means fewer users and more errors. A compiled binary that just works or something very simple to install and use like Python creates the fewest barriers for users.

Balgar

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #14 on: January 30, 2022, 06:09:40 am »
Yes, you're adding hoops for your users to jump through to use your tools. More hoops means fewer users and more errors. A compiled binary that just works or something very simple to install and use like Python creates the fewest barriers for users.

Of course a binary is easier to install than unpacking the OpenJDK and setting the path or downloading the Python 3.x installer and running it, checking if PIP is installed correctly and setting the path. In the end, the use of an application is not only determined by the dependencies that said tool has in the form of prerequisites, but also by the functionalities that it implements and the facilities it offers to carry out a task. Of all if a user wants to use a tool based on a language that is multi-platform and that requires a previous installation (as is the case of Java or Python) in the end the user will invest 5 minutes in performing said installation to use the tool .

MysticLord

  • Sr. Member
  • ****
  • Posts: 258
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #15 on: January 31, 2022, 12:25:50 am »
... in the end the user will invest 5 minutes in performing said installation to use the tool.
I admire your optimism.

Balgar

  • Jr. Member
  • **
  • Posts: 13
    • View Profile
Re: What programming language should I code my PSX hacking tool in?
« Reply #16 on: January 31, 2022, 01:20:24 pm »