Everybody can agree....if you look at how many gameconsole's I've worked on to get my homebrew gameengine running on them! The list is quite long...I need a trip down memory lane so...here we go. I'll keep it short. I promise...to at least try keep it short. Really!
With that enormous history lesson out of the way the list of currently working platforms is:
- Linux (for development only)
- Wii
- GameCube
- 3DS
- PlayStation 2
- Wii-U
- Switch
And if you count the almost working attempts:
- DSi
- PlayStation Portable
And the failed attempts:
- GBA
- Nintendo DS (with browser RAM expansion pack)
And on the "TODO/Wanted" list are:
- PlayStation Vita
- PlayStation 1
- Nintendo 64
- Sega Genesis/MegaDrive
- SNES
There is actually an unreleased but FULLY working "port" for Raspberry Pi! It's just a recompile of the Linux version and the biggest challenge is/was that the installer could not run on it. And gamepads don't always work right. This is what made me do the reverse engineering of the installer in the first place...but I never got back to it as an "official port". Maybe i could look into it? Let me know.
A few weeks ago I already posted about plans and actual attempts to write a GameBoy Color version! Yes...even with it's tiny 160x144 pixel resolution and limited color palettes and limited RAM. All I really want from this version in the short term is showing the title screen as a static image and maybe a "preview" of the level...also as a static image. This is also what I got working on the NDS and DSi just to show things are loaded and "usable". But for the GBC's version I do plan on rescaling the graphics to make it smaller and fit better on the tiny screen. It's not really going that great but I also did not work on it for very long yet. We'll see where it goes....or not.
And now...the whole reason for this blog post...and why I think I must be insane!!!! I was actively looking into buying a PlayStation 1!!! With the intent of modding it for homebrew, somehow, and porting my game over to it. It's more powerful than the GBC for sure...but I don't even have a development kit for it yet! I never wrote even a single line of code to run on the PS1! Why get a console that I do not "yet" have the space for? Don't really intend to use to play original games any time soon! Costs quite a bit of money to get in "good" condition with a game or two I actually might like!
Am I insane for getting one? Does it make sense? I also found out that the Vita is now A LOT easier to mod for homebrew than it used to be back in 2020-ish when I got my vita's. Either way....whatever console might "win" the virtual battle in my head to be worked on first...it HAS to have a WORKING demo that I wrote myself that runs in an emulator for said platform! I do own two Vita's and even a Vita TV...but they are in storage. Somewhere. No idea which exact box of gaming related items they went into. I got to much stuff already...which is another reason NOT to get a PlayStation 1 right now! I also got the insane idea of getting both the "regular" and "mini" version of it....not the "classic" one because I already got those. Different architecture!
Anyhow...this is what needed to go out of my head into the blog! Hope it was fun to read the crazy ideas of an insane mad man!
Thanks for reading.
The earliest prototype was written in Python and only ran on PC. Good for testing but awful for portability and "bragging opportunities" to show off what I am working on. When most of it was working in Python after about three months I wanted to make it more "portable" and the NDS with Devkitpro was looking like an interesting target.
Working on the NDS was fun and all but I did not get the "game" any further than scaling down the graphics and some sort of slideshow with the splash screens. I did like the coding style of the examples though...but the resolution difference from the original 640x480 -> 256x192 pixels was huge and scaling artifacts were annoying. Also the "best looking" algorithm...lancos or something...changed the color of every single pixel! This made it impossible to use with color palette's and sprites on the NDS's 2D GPU. I learned a lot...but it was time to move up to the 3DS!
On the 3DS the 400x240 resolution was still lower than the original but high enough to make have things barely fit, eliminating the requirement to need scaling at all! In a couple of weeks...or months (i forgot since it's almost 5 years ago already)...I managed to get the level to load, animation to work and have enough sprites of batteryman to have it "playable". And by that I mean it was a working proof-of-concept demo! The level was not even the original! I had to hand code it in a big array of numbers in the code! It was awe full..but it worked!
What bugged me the most about the situation at that time was that I had to: write code, compile, upload to 3ds, test new version....CRASH! Or did not work as expected....do all this AGAIN! OVER-AND-OVER-AGAIN! Granted...it was better than on the NDS where it was even required to take out the SD card, put in the PC, write the new file, take it out and put back in the NDS! That was way worse actually!
But there had to be a better way, right? There was "some" help from emulators but those are not perfect to test homebrew on. Sometimes things work on the emulator and not on hardware. Or even the reverse....the emulator refuses to do something that the hardware has no problem with! In short I needed a way to write the code and test it all on the PC! Only when some bits were changed in gameplay I would "need" to test it on the 3DS. So I started to rewrite my code (this will come back a few times) to make this possible! The solution was to use OpenGL on my PC as the graphics backend and write wrappers arround it to make it "portable" and create a driver of sorts to allow both "linux" and "3ds" ports to share a big chunk of the code!
Because of how the OpenGL works I had to learn a lot about graphics, quads, vertices, textures and more GPU's stuff. Then I looked back at what started this journey: The desire to write a game for the GameCube!!! And because I had code that could run on Linux and 3DS I used the same method to add in support for the GameCube! And in a couple of weeks/months I had something that worked on three platforms now! The GameCube however was an issue....my only method of booting homebrew back in 2018 was SD Loader and it was "a lot of work"!!!! And each and every test on hardware took nearly a minute to boot! So to make this A LOT easier I also added support for the Wii...which was an almost copy-paste from the gamecube's driver!
Since the Wii and GameCube have PowerPC CPU's that use Big Endian byte order instead of Little Endian used by quite literally every other CPU on the planet! I ran into compatibility issues in my code and the original game files! Btw...I know there are other big-endian CPU's out there ofcourse but overall it's mostly Little Endian that is more common. After I had learned more about "Endianness" and how to solve the issues I had...at least temporarily I could move on! And I had succeeded in creating a code base that shared a lot of the core game engine code on all the platforms at that time: Linux, Wii, GC and 3DS. I almost forgot to say that before this the code between the PC, 3DS and NDS were all separate and code could not be shared at all!
Ohh right...I said to try and keep this short. sorry!
Let's just say that nearing the end of 2018...and I even think literally the last day of it I released the first preview on the 3DS! I had solved the crazy way the 3DS GPU wants the textures to be in! During 2019 I tried to make things also work on the PSP but hardware limitations and my lack of knowledge on how to solve them resulted in something like moving rectangles on the screen. It was the "game" and things worked...but there were no tiles or sprites to show because I could not figure out how to make them work on the PSP's GPU! For this reason I had to eventually put the PSP port to rest until later.
Also during 2019...I think...I have spend three months on reverse engineering the original BatteryCheck installer Setup.exe! Eventually I rewrote the prototypes of this into separate roms to run on the Wii and 3DS so the game files could be unpacked on the console itself. No longer requiring to unpack an install on a windows PC first!. This was a mayor milestone for me to reach and one of the things I am most proud of...even if it's only meant to be used once during the install process and never seen again!
Over the following years I have attempted to port the game to more resource limited consoles: GBA, NDS (again) and DSi. And on the DSi I have actually managed to get the game to work...most of the time. Graphics are not scaled and tiles are not shown. But the level is loaded and some sprites do show. And the "gameplay" is working...but hard to see. The issue is that the NDS has a limit on the size of the textures in 3D mode. There are also RAM limitation ofcourse...but the resolution of my textures were 1024x1024. They still are mostly that size since resizing meant rewriting much of my rendering code.
Along the way I have ported it to the "mystery console" also known as the PlayStation 2! It had it's own issues with my game not being optimized for it and it ran at less than 10FPS...but texture size was not an issue here...the color pallet's were though! So it looked really weird at first with messed up colors. In about a month I "completed" the port and fixed the color issues. But because it was "slower" than the other ports and installation was kind of depending on the use of the memory card to store the game files on I did not release it! Until a few months later someone convinced me to add USB drive support and release the port anyway....flaws and all! Took me 3 day's I think to add the USB support and make things work "good enough" for a very unstable first release of the preview for PS2! I worked on this version for a few weeks while also adding more gameplay features...enough to later also updated the ports for Wii,GC and 3DS.
Being inspired by the success of the PS2 port I also started looking into adding a Wii U port. Took me a good long weekend of headaches to get things working and showing up on screen and have at least some bleeps coming out to represent sound. I made a mistake while setting up the audio driver that messed up the volume.....I think that is still the only released version on the Wii-U thread. Whoops! (if you really want the fixed Wii-U version....look on the 4TU Discord it's on there somewhere. )
A week later (or something really soon after) I gave myself a challenge: Port the game to the Nintendo Switch in less than 8 hours! I was really thinking it was possible! I only had emulators to test on as I did not "homebrew" my actual Switch yet at that time. To keep this far to long story a bit short here....I managed to do it with 5 minutes remaining on "the clock"!!! I know at some point the colors were wrong...but the game completely worked! And i fixed it by just moving the R,G,B channels around until it was showing correctly. Someone on discord was kind enough to test it on his switch...and it worked! Later I also jumped in and went through the 3-4 hour long and scary process of making my Switch run homebrew as well...and testing my own game on my own switch! That was awesome...and scary. But mostly awesome!
Working on the NDS was fun and all but I did not get the "game" any further than scaling down the graphics and some sort of slideshow with the splash screens. I did like the coding style of the examples though...but the resolution difference from the original 640x480 -> 256x192 pixels was huge and scaling artifacts were annoying. Also the "best looking" algorithm...lancos or something...changed the color of every single pixel! This made it impossible to use with color palette's and sprites on the NDS's 2D GPU. I learned a lot...but it was time to move up to the 3DS!
On the 3DS the 400x240 resolution was still lower than the original but high enough to make have things barely fit, eliminating the requirement to need scaling at all! In a couple of weeks...or months (i forgot since it's almost 5 years ago already)...I managed to get the level to load, animation to work and have enough sprites of batteryman to have it "playable". And by that I mean it was a working proof-of-concept demo! The level was not even the original! I had to hand code it in a big array of numbers in the code! It was awe full..but it worked!
What bugged me the most about the situation at that time was that I had to: write code, compile, upload to 3ds, test new version....CRASH! Or did not work as expected....do all this AGAIN! OVER-AND-OVER-AGAIN! Granted...it was better than on the NDS where it was even required to take out the SD card, put in the PC, write the new file, take it out and put back in the NDS! That was way worse actually!
But there had to be a better way, right? There was "some" help from emulators but those are not perfect to test homebrew on. Sometimes things work on the emulator and not on hardware. Or even the reverse....the emulator refuses to do something that the hardware has no problem with! In short I needed a way to write the code and test it all on the PC! Only when some bits were changed in gameplay I would "need" to test it on the 3DS. So I started to rewrite my code (this will come back a few times) to make this possible! The solution was to use OpenGL on my PC as the graphics backend and write wrappers arround it to make it "portable" and create a driver of sorts to allow both "linux" and "3ds" ports to share a big chunk of the code!
Because of how the OpenGL works I had to learn a lot about graphics, quads, vertices, textures and more GPU's stuff. Then I looked back at what started this journey: The desire to write a game for the GameCube!!! And because I had code that could run on Linux and 3DS I used the same method to add in support for the GameCube! And in a couple of weeks/months I had something that worked on three platforms now! The GameCube however was an issue....my only method of booting homebrew back in 2018 was SD Loader and it was "a lot of work"!!!! And each and every test on hardware took nearly a minute to boot! So to make this A LOT easier I also added support for the Wii...which was an almost copy-paste from the gamecube's driver!
Since the Wii and GameCube have PowerPC CPU's that use Big Endian byte order instead of Little Endian used by quite literally every other CPU on the planet! I ran into compatibility issues in my code and the original game files! Btw...I know there are other big-endian CPU's out there ofcourse but overall it's mostly Little Endian that is more common. After I had learned more about "Endianness" and how to solve the issues I had...at least temporarily I could move on! And I had succeeded in creating a code base that shared a lot of the core game engine code on all the platforms at that time: Linux, Wii, GC and 3DS. I almost forgot to say that before this the code between the PC, 3DS and NDS were all separate and code could not be shared at all!
Ohh right...I said to try and keep this short. sorry!
Let's just say that nearing the end of 2018...and I even think literally the last day of it I released the first preview on the 3DS! I had solved the crazy way the 3DS GPU wants the textures to be in! During 2019 I tried to make things also work on the PSP but hardware limitations and my lack of knowledge on how to solve them resulted in something like moving rectangles on the screen. It was the "game" and things worked...but there were no tiles or sprites to show because I could not figure out how to make them work on the PSP's GPU! For this reason I had to eventually put the PSP port to rest until later.
Also during 2019...I think...I have spend three months on reverse engineering the original BatteryCheck installer Setup.exe! Eventually I rewrote the prototypes of this into separate roms to run on the Wii and 3DS so the game files could be unpacked on the console itself. No longer requiring to unpack an install on a windows PC first!. This was a mayor milestone for me to reach and one of the things I am most proud of...even if it's only meant to be used once during the install process and never seen again!
Over the following years I have attempted to port the game to more resource limited consoles: GBA, NDS (again) and DSi. And on the DSi I have actually managed to get the game to work...most of the time. Graphics are not scaled and tiles are not shown. But the level is loaded and some sprites do show. And the "gameplay" is working...but hard to see. The issue is that the NDS has a limit on the size of the textures in 3D mode. There are also RAM limitation ofcourse...but the resolution of my textures were 1024x1024. They still are mostly that size since resizing meant rewriting much of my rendering code.
Along the way I have ported it to the "mystery console" also known as the PlayStation 2! It had it's own issues with my game not being optimized for it and it ran at less than 10FPS...but texture size was not an issue here...the color pallet's were though! So it looked really weird at first with messed up colors. In about a month I "completed" the port and fixed the color issues. But because it was "slower" than the other ports and installation was kind of depending on the use of the memory card to store the game files on I did not release it! Until a few months later someone convinced me to add USB drive support and release the port anyway....flaws and all! Took me 3 day's I think to add the USB support and make things work "good enough" for a very unstable first release of the preview for PS2! I worked on this version for a few weeks while also adding more gameplay features...enough to later also updated the ports for Wii,GC and 3DS.
Being inspired by the success of the PS2 port I also started looking into adding a Wii U port. Took me a good long weekend of headaches to get things working and showing up on screen and have at least some bleeps coming out to represent sound. I made a mistake while setting up the audio driver that messed up the volume.....I think that is still the only released version on the Wii-U thread. Whoops! (if you really want the fixed Wii-U version....look on the 4TU Discord it's on there somewhere. )
A week later (or something really soon after) I gave myself a challenge: Port the game to the Nintendo Switch in less than 8 hours! I was really thinking it was possible! I only had emulators to test on as I did not "homebrew" my actual Switch yet at that time. To keep this far to long story a bit short here....I managed to do it with 5 minutes remaining on "the clock"!!! I know at some point the colors were wrong...but the game completely worked! And i fixed it by just moving the R,G,B channels around until it was showing correctly. Someone on discord was kind enough to test it on his switch...and it worked! Later I also jumped in and went through the 3-4 hour long and scary process of making my Switch run homebrew as well...and testing my own game on my own switch! That was awesome...and scary. But mostly awesome!
With that enormous history lesson out of the way the list of currently working platforms is:
- Linux (for development only)
- Wii
- GameCube
- 3DS
- PlayStation 2
- Wii-U
- Switch
And if you count the almost working attempts:
- DSi
- PlayStation Portable
And the failed attempts:
- GBA
- Nintendo DS (with browser RAM expansion pack)
And on the "TODO/Wanted" list are:
- PlayStation Vita
- PlayStation 1
- Nintendo 64
- Sega Genesis/MegaDrive
- SNES
There is actually an unreleased but FULLY working "port" for Raspberry Pi! It's just a recompile of the Linux version and the biggest challenge is/was that the installer could not run on it. And gamepads don't always work right. This is what made me do the reverse engineering of the installer in the first place...but I never got back to it as an "official port". Maybe i could look into it? Let me know.
A few weeks ago I already posted about plans and actual attempts to write a GameBoy Color version! Yes...even with it's tiny 160x144 pixel resolution and limited color palettes and limited RAM. All I really want from this version in the short term is showing the title screen as a static image and maybe a "preview" of the level...also as a static image. This is also what I got working on the NDS and DSi just to show things are loaded and "usable". But for the GBC's version I do plan on rescaling the graphics to make it smaller and fit better on the tiny screen. It's not really going that great but I also did not work on it for very long yet. We'll see where it goes....or not.
And now...the whole reason for this blog post...and why I think I must be insane!!!! I was actively looking into buying a PlayStation 1!!! With the intent of modding it for homebrew, somehow, and porting my game over to it. It's more powerful than the GBC for sure...but I don't even have a development kit for it yet! I never wrote even a single line of code to run on the PS1! Why get a console that I do not "yet" have the space for? Don't really intend to use to play original games any time soon! Costs quite a bit of money to get in "good" condition with a game or two I actually might like!
Am I insane for getting one? Does it make sense? I also found out that the Vita is now A LOT easier to mod for homebrew than it used to be back in 2020-ish when I got my vita's. Either way....whatever console might "win" the virtual battle in my head to be worked on first...it HAS to have a WORKING demo that I wrote myself that runs in an emulator for said platform! I do own two Vita's and even a Vita TV...but they are in storage. Somewhere. No idea which exact box of gaming related items they went into. I got to much stuff already...which is another reason NOT to get a PlayStation 1 right now! I also got the insane idea of getting both the "regular" and "mini" version of it....not the "classic" one because I already got those. Different architecture!
Anyhow...this is what needed to go out of my head into the blog! Hope it was fun to read the crazy ideas of an insane mad man!
Thanks for reading.