Skip to main content

RE: "Hacking" the PS2 - Game development

Happy 2019 everbody!

This is a follow-up to my previous post: "Hacking" the PS2

This whole thing started basically when I discovered that there is a possibility to write your own programs for the PS2. I didn't have a PS2 back in the day (I started collecting consoles around 2011) so I just found out recently. Finding out how YaBasic worked and "reverse engineering" the checksum in the source code proved to be so entertaining that I basically lost interest in making a game after that.

During the holidays I had a lot of time and to make something productive I decided to take it up again and this time actually make a game. I also wanted to "streamline" the development process by not having to use 3 different programs and 2 OS's to test every change in the code I make.

My old process was:
  • write the code in Vim
  • run the Bash script (from the previous post) to add the checksum
  • use PS2 Save Builder to make a save file
  • use mymc to add the save file to the PCSX2 memory card file
Because PS2 Save Builder and mymc are both GUI programs that means a lot of clicking for a mistyped "endif" until I can test the change in PCSX2. So I ditched Linux (not having to switch back and forth from PuTTY), rewrote the Bash script in PowerShell (god, I fucking hate PowerShell, that language SUCKS), discovered that mymc has a CLI with a lot more functions than the GUI, added a Batch file for good measure and ... almost lost interest in making the game. Yeah, I drifted off again!

The new process isn't really shorter:
  • write the code in Notepad++
  • run the PowerShell script to add the checksum
  • use mymc to add the source code to the PCSX2 memory card directly
But it's done a lot faster because of the extra batch file I added. That takes care of running PowerShell and mymc. And since I can execute any programs directly from Notepad++ (similar to Vim), I just need to press Ctrl+S and then F5 and hit Enter. Alt+Tab to PCSX2 and you are ready to load and run the code. ("F5" is the "Run" dialogue in Notepad++ and after selecting the script once I'll keep it as last option, so you don't have to select it every time.)


I've uploaded everything to Github if anybody is interested: yabasic-tools

I also would like to ditch Jacksum, because it needs Java and therefore it's a bit slow. If you know how to calculate CRC32_BZIP2 with Windows native tools (pure PowerShell/Batch only) let me know!

Where does all this take us? To making a game of course! See you in the next post (should be coming in a few days)!

Comments

Popular posts from this blog

Making a game for the PlayStation 2

Actually, not really for the PS2 - not natively at least. Rather making a game for YaBasic which can be played on the PS2. I started my geek life when I was 11 years old and got my first computer (486). A few years later I found some games written in QBasic on a gaming magazine's CD. That was the first time I came in contact with programming. I didn't understand much back then, because I wasn't taught before and I didn't speak any English (it's my 3rd language...) so I was just trying to figure out how the games worked by modifying stuff. These games were simple text adventures, where you had to make choices and the game would progress that way. There were no commands like "go left" or "pick up". The game presented you all the options and you had to input the number of the option you chose. And instead of "if-else" there were GOTOs everywhere. This was how I made my first game, a multiple-choice quiz with 10 questions. Since I didn...

Open Source doesn't work

Before you misunderstand me: I'm a Linux user and love open source software (OSS)! I always try to use OSS if there is one available. But speaking from personal experience the idea behind open source doesn't really work. Hear me out. Open source is based on the premise that everybody can contribute and this way the software gets better. The more people do it the better it gets. Well, I have 2 cases for you. The first one is Ansible . I've made a small patch in one of the plugins (hashi_vault) to make the plugin more flexible. I've created a pull request (PR) back in August 2019. At that time the patch had no conflicts with the master branch. But it was never merged. Now, over 8 months later the patch still isn't merged and has conflicts, because the code changed so much since then. So instead of quickly accepting a good patch - which would help not only me, but probably quite a few others - it was left and forgotten. I find this rather sad. It shows the go...