Programming the Playstation2: Boots on the ground pt1

Sony PS2 Console (PS2) - [Edizione: Regno Unito] : Amazon.it: Videogiochi

We continue with the explanation on the hw operations of the ps2 are executed. We know that the HW is very complex and powerful, optimized for gaming. The main unit ‘EE’ has two compute units VU1-VU2, 2 instruction units with 8kb instruction cache, 8kb data cache and 16kb of scratchpad ram. The calculations take place mainly in SIMD and allow you to make vector/matrix multiplications. As initialization code we follow the example of an ancient gamedev forum post related to MIPS programming (hence the EE cpu):

-insert the includes of required libraries such as ps2gs for graphics
-define the mips registers of the cpu such as #define zero $0
-pointer declaration ps2_gs_gparam *g_gp, which accesses resolution and video mode -double buffering ps2_gs_dbuff g_db -ps2_gs_finish g_finish structure that monitors the end of rendering
int acquire() and int release() to capture and stop using the graphics chip.

Another part coming soon.

Links
https://www.gamedev.net/articles/programming/general-and-gameplay-programming/playstation-2-game-programming-part-1-r1967/