Code: Select all
#include "gsKit.h"
#include "dmaKit.h"
#include "malloc.h"
int main(void)
{
u64 White, Black, BlackFont, WhiteFont, BlueTrans, RedTrans, GreenTrans, WhiteTrans;
GSGLOBAL *gsGlobal = gsKit_init_global(GS_MODE_NTSC);
GSTEXTURE test;
int Y = -400;
int sig = 1;
GSFONT *gsFont = gsKit_init_font(GSKIT_FTYPE_FONTM, NULL);
dmaKit_init(D_CTRL_RELE_OFF,D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC,
D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF);
// Initialize the DMAC
dmaKit_chan_init(DMA_CHANNEL_GIF);
dmaKit_chan_init(DMA_CHANNEL_FROMSPR);
dmaKit_chan_init(DMA_CHANNEL_TOSPR);
Black = GS_SETREG_RGBAQ(0x00,0x00,0x00,0x00,0x00);
White = GS_SETREG_RGBAQ(0xFF,0xFF,0xFF,0x00,0x00);
WhiteFont = GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00);
BlackFont = GS_SETREG_RGBAQ(0x00,0x00,0x00,0x80,0x00);
u64 TexCol = GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00);
BlueTrans = GS_SETREG_RGBAQ(0x00,0x00,0xFF,0x40,0x00);
RedTrans = GS_SETREG_RGBAQ(0xFF,0x00,0x00,0x60,0x00);
GreenTrans = GS_SETREG_RGBAQ(0x00,0xFF,0x00,0x50,0x00);
WhiteTrans = GS_SETREG_RGBAQ(0xFF,0xFF,0xFF,0x50,0x00);
gsGlobal->PrimAlphaEnable = GS_SETTING_OFF;
gsKit_init_screen(gsGlobal);
gsKit_font_upload(gsGlobal, gsFont);
gsFont->FontM_Spacing = 0.95f;
gsKit_texture_bmp(gsGlobal, &test, "host:test.bmp");
test.Filter = GS_FILTER_LINEAR;
gsKit_mode_switch(gsGlobal, GS_ONESHOT);
while(1)
{
gsKit_clear(gsGlobal, Black);
gsKit_font_print_scaled(gsGlobal, gsFont, 50, Y, 3, 0.85f, TexCol,
"1: ABCDEFGHIJKLM\n"
"2: NOPQRSTUVWXYZ\n"
"3: abcdefghijklm\n"
"4: nopqrstuvwxyz\n"
"5: 1234567890,./`\n"
"1: ABCDEFGHIJKLM\n"
"2: NOPQRSTUVWXYZ\n"
"3: abcdefghijklm\n"
"4: nopqrstuvwxyz\n"
"5: 1234567890,./`\n"
"1: ABCDEFGHIJKLM\n"
"2: NOPQRSTUVWXYZ\n"
"3: abcdefghijklm\n"
"4: nopqrstuvwxyz\n"
"5: 1234567890,./`\n"
"6: ~!@#$%^&*()_<>\n");
Y = Y + (1 * sig);
if (Y>600)
{
sig = -1;
Y = 600;
}
if (Y<-400)
{
sig = 1;
Y = -400;
}
gsKit_sync_flip(gsGlobal);
gsKit_queue_exec(gsGlobal);
}
return 0;
}
Maybe a timing issue of gsKit font rendering?