Still about gsKit and interlaced mode

GsKit is the latest  – and as I heard – the more optimized graphic library for the PS2. Other libs have neat things not present in gsKit but it’s the currently supported official lib.

I’ve been looking at the uLaunchELF4.12 sources and I saw pretty things 🙂
I’ve already noticed uLaunchELF could open a non-interlaced screen mode (but not pure low resolution!) and I looked in to see how it manage to do it with gsKit.

Function setupGS(gs_vmode) is pretty interesting : it allows to setup all the mambo-jambo to setup a screen in gsKit, where gs_vmode = GS_MODE_PAL ou GS_MODE_NTSC. There the lines :

 // Interlace Init
  gsGlobal->Interlace = GS_INTERLACED;
  gsGlobal->Field     = GS_FIELD;
  gsGlobal->Interlace = GS_NONINTERLACED;
  gsGlobal->Field     = GS_FRAME;

where settings->interlace is uLaunchELF specific and acting like a boolean (in fact is a integer data type), this show the gsGlobal settings needed to enable or disable the interlace mode. I wasn’t aware of the gsGlobal ->Field thing…

Another useful function at uLaunchELF source is the updateScreenMode() which shows how to change on-the-fly the current screen mode. Basically, it calls the not-so-documented SetGsCrt() gsKit’s function:

SetGsCrt(gsGlobal->Interlace, gsGlobal->Mode, gsGlobal->Field);

I’m sure you can find the uLaunchELF sources out there, but if not, look here :
uLaunchELF4.12 binaries and sources

This includes pre-compiled binaries and sources.



Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: