-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PS2 Optimisations #18
Comments
Oh and a footnote; the emulator statistics are telling me that GPU is below 10% for the majority of the time, sometimes spiking to just under 15%, and the CPU load is in the 50% region for most of the time (~25% at lowest, ~60% at highest). The vector units are completely unused (perhaps you could use these for on-the-fly decompression or geometry?). Just thought I would mention the statistics in case it helps. |
This was my first PS2 homebrew tentative, so I have surely missed some best practices and more complex techniques :-). I discovered the PS2 hardware during this project, so I didn't feel confident enough to immediately use the VUs and juggle with RAM/VRAM per-frame. I've stayed close to the basic examples available w/ gsKit and other resources on the web, there is clearly room for many improvements! |
No problem. I've been trying to get this demo running at a close to HD resolution (960x720 or 720x1080) single buffered but I haven't had the time to finish it. I'll submit another pull once I've done so! |
In the meantime, a note; by lowering the bit depth of images (textures etc.) and the framebuffer itself (ie. to 16-bit) you save a significant amount of memory. For example: You can see you could probably get away with nicer textures and higher resolution by finding a sweet spot with colour/bit depth. |
Thank you, that's great! I won't have the time to come back to this demo in the next few weeks, but I will try to see how I can better use the freed RAM/VRAM in order to improve the quality of the textures and the rendering resolution. |
No problem. I haven't had time to compile this and I think some of the code expects certain bit depths for different textures, so I think it'll require a bit of trial and error with a working ps2sdk to get it working correctly. |
Something I forgot to mention months ago and remembered when I saw this on my homepage; here's a fundamental thing about PS2 hardware design - the VRAM is not meant to be used for storing textures. The VRAM is purely for pixel data (eg. framebuffers). The 32MB of main RAM is main RAM, but the bus between it and the GPU is specifically designed to be able to zip textures from RAM to the GPU. So essentially, you could have many more textures at a higher resolution than what you could fit in 4MB. When/if you get the time I'd recommend looking into that so you could use stupidly large textures at high resolutions. Dumb of me to overlook such a thing, but I digress 😅 |
A VU1 sample would be awesome! We need more VU1 sample in the ps2 scene |
Some future ideas for more optimal circumstances on PS2:
Keep this project up, though. It's nice to see demos like this arise on the PS2. I recommend you check out the gsKit "hi-res" sample code for an idea of what you might be able to do - this seems like a relatively simple scene, and one programmer was able to get a rotating 3D teapot running at native 1920x1080, a 1920x1080 background texture and all with antialiasing at 60FPS. Would be cool to see some improvements here from code like that.
The text was updated successfully, but these errors were encountered: