I did not have any hardware PlayStation 1 until just 3-4 weeks ago! Now I have 5 of them! Three "phat's" and two PSOne's. Why five consoles???? Well...I first bought a regular Phat for the serial and parallel ports they have that make homebrew development A LOT easier! Then I wanted to add a PSOne to my collection because it's so damn cute and small! To keep the story short....while looking for a PSOne I found a seller that sold 2 phats and two PSOne's for an amazing price! I could not resist that!
Before I can do ANY homebrew development work on the PS1 I needed to setup my DEV environment to be able to compile any code at all. That took me a good few days to figure out what was wrong....and with the guidance on Discord from spicyjpeg (thanks dude ) I got it to compile...the MIPS cross-compilers and the PSn00bSDK with examples!
And then yesterday I started diving into the examples, documentation and the libpsn00b sourcecode to get an idea of how things work. My overal impression is that it's different but familiar...it's most similar in a way to how the PSP does things. Which I guess makes sense since they are both Sony PlayStation devices, hahahah. It took me some getting used to 'cmake' while I am used to just 'make' for years now! It's literately completely different even though the idea is the same....you tell 'make/cmake' where your compilers and libraries are, what options to use and where your own source code is. in a nutshell! But seeing the examples, understanding the different compilation method and doing it myself are very different things!
While there were MANY steps involved....yesterday I finally made progress in the process of creating my own PlayStation 1 homebrew! I compiled the "template" example and modified it a bit to get the the following result:
Yes, it's a simple "Hello World" example with a twist! It also sets a background color and moves a square around the screen. I changed the background to an almost black/grey and the resized the rectangle to be smaller and changed it's color to "andorian blue". Like the blue skin color of andorians...and from my avatar picture.
Small steps...but my modification does run in the PCSX-Redux emulator (it has an AMAZING CRT shader!!!!). I wanted to test on hardware but at 23:50 late at night I thought it was enough! Also with 33 Celsius it was already hard enough to be sitting at my desk all that time with three little fan's blowing some air around at me!
The next big step would be to actually load some batteryCheck graphics! But there are a couple of limitations to overcome first. Beyond having free spare time to work on it I need to get the graphics into the right format and for testing embed that into the EXE so I don't require a CD image for now. The other limitation is that a texture has a max size of 256x256 pixels! If that sounds familiar...that's because the PSP and NDS/DSi have the exact same limitation and I have been rambling about it A LOT.
Not a big issue for most of the spites but it is a challenge for the menu screen and splash screens. They are 640x480 and I need to think of a way to display them correctly. One single image at 16 bits colors (1A5R5G5B) is already 614kb....out of just 1MB of VRAM! If I use 8bpp with a CLUT (Color LookUp Table) then it would only be 307kb .....but I will STILL need to divide the 640x480 pixel image into 256x256 chunks to show it! Or...resize it! either on hardware at runtime or in the conversion process.
Either way....with some luck I will have the menu screen showing on the real hardware! I am 99% sure how to do it for a quick proof-of-concept and maybe even how to include the other splash screens. It won't be efficient and the EXE is going to be close to the 2MB max!! The only downside of that is that it's REALLY slow to upload that over a slow serial cable into the PS1 hardware....but at least no wasted CD's.
Thanks for reading
Before I can do ANY homebrew development work on the PS1 I needed to setup my DEV environment to be able to compile any code at all. That took me a good few days to figure out what was wrong....and with the guidance on Discord from spicyjpeg (thanks dude ) I got it to compile...the MIPS cross-compilers and the PSn00bSDK with examples!
And then yesterday I started diving into the examples, documentation and the libpsn00b sourcecode to get an idea of how things work. My overal impression is that it's different but familiar...it's most similar in a way to how the PSP does things. Which I guess makes sense since they are both Sony PlayStation devices, hahahah. It took me some getting used to 'cmake' while I am used to just 'make' for years now! It's literately completely different even though the idea is the same....you tell 'make/cmake' where your compilers and libraries are, what options to use and where your own source code is. in a nutshell! But seeing the examples, understanding the different compilation method and doing it myself are very different things!
While there were MANY steps involved....yesterday I finally made progress in the process of creating my own PlayStation 1 homebrew! I compiled the "template" example and modified it a bit to get the the following result:
Yes, it's a simple "Hello World" example with a twist! It also sets a background color and moves a square around the screen. I changed the background to an almost black/grey and the resized the rectangle to be smaller and changed it's color to "andorian blue". Like the blue skin color of andorians...and from my avatar picture.
Small steps...but my modification does run in the PCSX-Redux emulator (it has an AMAZING CRT shader!!!!). I wanted to test on hardware but at 23:50 late at night I thought it was enough! Also with 33 Celsius it was already hard enough to be sitting at my desk all that time with three little fan's blowing some air around at me!
The next big step would be to actually load some batteryCheck graphics! But there are a couple of limitations to overcome first. Beyond having free spare time to work on it I need to get the graphics into the right format and for testing embed that into the EXE so I don't require a CD image for now. The other limitation is that a texture has a max size of 256x256 pixels! If that sounds familiar...that's because the PSP and NDS/DSi have the exact same limitation and I have been rambling about it A LOT.
Not a big issue for most of the spites but it is a challenge for the menu screen and splash screens. They are 640x480 and I need to think of a way to display them correctly. One single image at 16 bits colors (1A5R5G5B) is already 614kb....out of just 1MB of VRAM! If I use 8bpp with a CLUT (Color LookUp Table) then it would only be 307kb .....but I will STILL need to divide the 640x480 pixel image into 256x256 chunks to show it! Or...resize it! either on hardware at runtime or in the conversion process.
Either way....with some luck I will have the menu screen showing on the real hardware! I am 99% sure how to do it for a quick proof-of-concept and maybe even how to include the other splash screens. It won't be efficient and the EXE is going to be close to the 2MB max!! The only downside of that is that it's REALLY slow to upload that over a slow serial cable into the PS1 hardware....but at least no wasted CD's.
Thanks for reading