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...

Copyright needs to die

In latest gaming news: Mafia was released on GOG! Yay! That's great news, because it means that you can get the game DRM-free and guaranteed to work with your Win7 or Win10 installation! (And it's a real classic.) But wait! What's that? You're sitting in a car. Waiting for that famous tune everybody associates with Mafia . You don't know the title or the artist, but you immediately know that song. It plays on the radio. At least: it used to play on the radio. It's silent now. The radio is broken. No sound. Enjoy the view while driving... The game released on GOG all right. Unfortunately due to copywrong it was released without it's original soundtrack. No licensed music. No Django Reinhardt playing Belleville (that's the song you were looking for ;)). All this because copyshit still "protects" music (more like "extorts" people) after over 75 years! Yes, Belleville was first released in 1942. I mean I would get it if co...

Nintendo: Hey, listen!

This is a plea for Nintendo, I hope that somebody there will read it. A few days ago you announced the next "Mini" console in your attempt to make even more money of some 25+ year old games, released for the hundredth time. Please. Stop. Or at the very least change your business practices. I hope that I speak for a majority in the gaming community, when I say that we've just about had enough of yet another Nintendo console (or accessory...) which won't be available at launch because you simply can't (or won't?) make enough. We've had enough of the scalpers who pre-order all stock before we even get a chance to look the device up. Enough of the scalpers who then continue to sell those consoles on eBay for double or triple the price. Isn't it bad for your business? Let's talk about a hypothetical scenario: you could sell 1 million of the SNES Mini. But you produce only 500k. That makes 500k of your potential fans/customers angry, because...