Posts Tagged ‘uLaunchELF’

Still about gsKit and interlaced mode

May 14, 2008

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
 if(setting->interlace){
  gsGlobal->Interlace = GS_INTERLACED;
  gsGlobal->Field     = GS_FIELD;
 }else{
  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.

 

Advertisements