These S2DEX GBIs are functions for emulation in the CPU.
void guS2DEmuBgRect1Cyc(Gfx **gdl_p, uObjBg *bg);
|Arguments:||gdl_p||Pointer to display list pointer
The value for *gdl_p is automatically added.
|bg||Pointer to uObjBg structure|
Calling gSPBgRect1Cyc(gdl ++, bg) can be replaced by guS2DEmuBgRect1Cyc(&gdl, bg). See the section on gSPBgRect1Cyc for an explanation of the argument bg.
In addition, in order to announce the setting of a scissoring box and the setting of texture filters to this routine, it is necessary to call the guS2DEmuSetScissor function described below prior to guS2DEmuBgRect1Cyc.
This function generates GBIs which can be processed not only by S2DEX, but also by F3DEX. Because of this, a scaled scrolling BG and a 3D model can both be processed by a single microcode, even when they are displayed together.
void guS2DEmuSetScissor(u32 ulx, u32 uly, u32 lrx, u32 lry, u8 bilerp);
Normally, the scissor box range set by g[s]DPSetScissor is conveyed to this function as an argument. In addition, the default values for ulx, uly, lrx, lry, and bilerp are 0, 0, 320, 240, and 0, respectively, setting to render by PointSample in a 320x240 pixel frame buffer.
This function need only be called once prior to calling guS2DEmuBgRect1Cyc. As long as there are no changes to the scissor box and the texture filter, this only needs to be called once when the game is initializing and there is no need to call it every time a frame is rendered.