PSX Quake

Start a work log and update it occasionally with your projects progress
Post Reply
svvv
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Apr 20, 2024
Location: Estonia

PSX Quake

Post by svvv » April 20th, 2024, 5:40 pm

Hello!

I decided to learn a bit about PSX development, since I have fond memories of the console.
Didn't want to get carried away by art, so for my first learning project I chose to port something to the system.

The PSX Quake makes use of the PSn00bSDK and some chunks of musl (since the SDK doesn't ship a full math library).
It is a bit of a mess right now, but both swquake and "gl"quake run. Both binaries depend on the dev. console's increased RAM size.

Porting the software-rendered Quake was pretty straightforward (after getting the minimal math library in place). Start and e1m1 levels load and can be played at glorious <1 FPS :D. Hardest part of it was writing the IO wrapper to transform the CD IO to something akin to the expected POSIX file IO.
► Show Spoiler
Hardware-rendered port is still ongoing, but the menu kind-of works, with some textures being misaligned a bit or flipped. First had to stub out all OpenGL functions. Then had to write a custom VRAM allocator, which is probably not the best implementation but it seems to work for now.
After I get past the menu then it'll become a bit trickier, since Quake doesn't seem to de-allocate it's textures and PSX VRAM isn't large enough to hold all of the textures.
► Show Spoiler
Currently it still runs on soft-float and probably thrashes the CD drive, since the data files are not altered in any way and the game expects a normal drive.
Not sure how far I'll get this port before life gets in the way, but maybe someone will find it interesting. I'll post source after I clean it up a bit.

P.S. Does anyone have any ideas why the program displays fine under Duckstation but just displays a black screen under PCSX-Redux?

Edit: Sorry about the delay, got caught in the "just a bit more to get it running nicer" phase. No major progress after the post, did refactor the softfp into a custom fixed point implementation, but it's broken and ugly and doesn't fully work yet.
Source at: https://github.com/svenvvv/psxquake
You do not have the required permissions to view the files attached to this post.

VickieRodgers
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Sep 14, 2024
PlayStation Model: SCPH-1002
Location: USA

Post by VickieRodgers » September 14th, 2024, 2:27 pm

Oh I'm also learning about this console. Thanks for the info. Can you tell me which site has more info about this console?

svvv
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Apr 20, 2024
Location: Estonia

Post by svvv » October 3rd, 2024, 4:45 am

The weather got cold once again so I found some time for this project.
Back in April I burnt myself out by trying to tackle the float problem by replacing floats with fixed point math. For some reason I thought that it'd be a good idea to do that before I got any 3D graphics onto the screen (it wasn't).

This time I got the in-game world rendering partially working. Currently no textured primitives and it runs on soft-float all the way until the actual drawing code, in which it's converted to the fixed-point formats and transformed on the GTE. Other models besides the BSP are not drawn as of yet. VRAM manager code is also not optimal (we never clear the cache or re-compact, lots of holes left), but seeing as we don't have any textured primitives besides the menus, then that's fine for now :lol:

The hardware-renderer resulted in a speedup of over 300%! Previously it ran well under 1 FPS, but now it reaches 3 FPS. :D
Loading takes forever (even with the emulator CD-drive speedups enabled), but it's possible to navigate and load (and get killed by invisible enemies) in e1m1.

A screenshot as well (with Gouraud shading just to be able to tell the geometry apart):
https://github.com/svenvvv/psxquake/blob/cxx-clean/WinQuake/images/first_hw_bsp.jpg
VickieRodgers wrote: September 14th, 2024, 2:27 pm Oh I'm also learning about this console. Thanks for the info. Can you tell me which site has more info about this console?
The Sony Reference CD's and similar material are a fairly good source of info, they contain some pretty nice examples as well.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest