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

Building my own arcade cabinet - a photo diary

This has been in the making for 1.5 years and I'm thrilled to share it with you. But instead of writing a long post with boring details, I'll just add short comments to the pictures. Enjoy! The beginning: RasPi3 and RetroPie started for the first time. Buttons & joystick from AliExpress for $20. Neat! Testing the buttons. The first box. Version 2 of the box, much cleaner. Should be something like this, when it's finished Temporary solution: ATX power supply from an old PC. The amplifier arrived, too! Learning to solder: if your tip looks like this, you're doing something wrong. Visual concept number two: controller and speaker box. The messy insides of the controller box. A friend helped me out cutting the wood for the final controller box. That's not the final box, just another test run. This is more like it. Made from an old office desk. Button layout on paper...