mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@2562 b08762b0-b915-fc4b-9d8c-17b2551a87ff
408 lines
18 KiB
C
408 lines
18 KiB
C
/*---------------------------------------------------------------------------*
|
||
Project: TwlSDK - NandInitializer
|
||
File: kami_font.c
|
||
|
||
Copyright 2008 Nintendo. All rights reserved.
|
||
|
||
These coded instructions, statements, and computer programs contain
|
||
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||
Company Ltd., and are protected by Federal copyright law. They may
|
||
not be disclosed to third parties or copied or duplicated in any form,
|
||
in whole or in part, without the prior written consent of Nintendo.
|
||
|
||
$Date:: $
|
||
$Rev$
|
||
$Author$
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
#include <twl.h>
|
||
#include "kami_font.h"
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Œ^’è‹`
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
’è<E28099>”’è‹`
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
#define SCREEN_DATA_COLOR_PLTT_SHIFT 12
|
||
#define NUM_OF_PRINT_TARGET 2
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
“à•”•Ï<E280A2>”’è‹`
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
static u8 sXPos;
|
||
static u8 sYPos;
|
||
|
||
static u32 sBackColorCharData[24*8];
|
||
|
||
static u16 sFontScreenDataMain[32 * 24] = {
|
||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||
0,0,0,0,0,0,0,0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,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,0xf0f4,
|
||
0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,0xf0f5,
|
||
};
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
“à•”ŠÖ<C5A0>”<EFBFBD>錾
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
static void kamiFontReturnConsole( void );
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
ŠÖ<C5A0>”’è‹`
|
||
*---------------------------------------------------------------------------*/
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name:
|
||
|
||
Description:
|
||
|
||
Arguments: None
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontInit(void)
|
||
{
|
||
// ”wŒi—pƒLƒƒƒ‰ƒNƒ^ƒf<C692>[ƒ^
|
||
MI_CpuCopy32( &sampleCharData[8 * 0xde], sBackColorCharData, sizeof(sBackColorCharData) );
|
||
|
||
// ”wŒi—pƒXƒNƒŠ<C692>[ƒ“ƒf<C692>[ƒ^ƒZƒbƒg
|
||
DC_FlushRange ( sBackColorScreenData, sizeof(sBackColorScreenData) );
|
||
GXS_LoadBG1Scr ( sBackColorScreenData, 0, sizeof(sBackColorScreenData) );
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name:
|
||
|
||
Description:
|
||
|
||
Arguments: None
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontLoadScreenData(void)
|
||
{
|
||
// DC_FlushRange ( sFontScreenDataMain, sizeof(sFontScreenDataMain) );
|
||
// GX_LoadBG0Scr ( sFontScreenDataMain, 0, sizeof(sFontScreenDataMain) );
|
||
|
||
DC_FlushRange ( sFontScreenDataSub, sizeof(sFontScreenDataSub) );
|
||
GXS_LoadBG0Scr ( sFontScreenDataSub, 0, sizeof(sFontScreenDataSub) );
|
||
|
||
// ”wŒiƒLƒƒƒ‰ƒNƒ^ƒf<C692>[ƒ^<5E>‘‚«Š·‚¦
|
||
DC_FlushRange( sBackColorCharData, sizeof(sBackColorCharData) );
|
||
GXS_LoadBG0Char( sBackColorCharData, 0xde*32, sizeof(sBackColorCharData) );
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontClear
|
||
|
||
Description: ‰¼‘zƒXƒNƒŠ<C692>[ƒ“‚ðƒNƒŠƒA‚·‚é
|
||
|
||
Arguments: None
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontClear(void)
|
||
{
|
||
MI_CpuClear8( sFontScreenDataSub, sizeof(sFontScreenDataSub) );
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontClearMain
|
||
|
||
Description: ‰¼‘zƒXƒNƒŠ<C692>[ƒ“‚ðƒNƒŠƒA‚·‚é
|
||
|
||
Arguments: None
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontClearMain(void)
|
||
{
|
||
MI_CpuClear8( sFontScreenDataMain, sizeof(sFontScreenDataMain) );
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontPrintf
|
||
|
||
Description: ‰¼‘zƒXƒNƒŠ<C692>[ƒ“‚É•¶Žš—ñ‚ð”z’u‚·‚é<E2809A>B•¶Žš—ñ‚Í32•¶Žš‚Ü‚Å<E2809A>B
|
||
|
||
Arguments: x - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é x <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
y - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é y <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
color - •¶Žš‚Ì<E2809A>F‚ðƒpƒŒƒbƒg”Ô<E2809D>†‚ÅŽw’è<E28099>B
|
||
text - ”z’u‚·‚é•¶Žš—ñ<E28094>B<EFBFBD>I’[•¶Žš‚ÍNULL<4C>B
|
||
... - ‰¼‘zˆø<CB86>”<EFBFBD>B
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontPrintf(s16 x, s16 y, u8 color, char *text, ...)
|
||
{
|
||
va_list vlist;
|
||
char temp[32 + 2];
|
||
s32 i;
|
||
|
||
va_start(vlist, text);
|
||
(void)vsnprintf(temp, 33, text, vlist);
|
||
va_end(vlist);
|
||
|
||
*(u16 *)(&temp[32]) = 0x0000;
|
||
for (i = 0;temp[i] != 0x00; i++)
|
||
{
|
||
sFontScreenDataSub[((y * 32) + x + i) % (24 * 32)] =
|
||
(u16)((color << SCREEN_DATA_COLOR_PLTT_SHIFT) | temp[i]);
|
||
}
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontPrintf
|
||
|
||
Description: ‰¼‘zƒXƒNƒŠ<C692>[ƒ“‚É•¶Žš—ñ‚ð”z’u‚·‚é<E2809A>B•¶Žš—ñ‚Í32•¶Žš‚Ü‚Å<E2809A>B
|
||
|
||
Arguments: x - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é x <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
y - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é y <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
color - •¶Žš‚Ì<E2809A>F‚ðƒpƒŒƒbƒg”Ô<E2809D>†‚ÅŽw’è<E28099>B
|
||
text - ”z’u‚·‚é•¶Žš—ñ<E28094>B<EFBFBD>I’[•¶Žš‚ÍNULL<4C>B
|
||
... - ‰¼‘zˆø<CB86>”<EFBFBD>B
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontPrintfMain(s16 x, s16 y, u8 color, char *text, ...)
|
||
{
|
||
va_list vlist;
|
||
char temp[32 + 2];
|
||
s32 i;
|
||
|
||
va_start(vlist, text);
|
||
(void)vsnprintf(temp, 33, text, vlist);
|
||
va_end(vlist);
|
||
|
||
*(u16 *)(&temp[32]) = 0x0000;
|
||
for (i = 0;temp[i] != 0x00; i++)
|
||
{
|
||
sFontScreenDataMain[((y * 32) + x + i) % (24 * 32)] =
|
||
(u16)((color << SCREEN_DATA_COLOR_PLTT_SHIFT) | temp[i]);
|
||
}
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontFillChar
|
||
|
||
Description: ‰¼‘zƒXƒNƒŠ<C692>[ƒ“‚É
|
||
|
||
Arguments: x - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é x <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
y - •¶Žš—ñ‚Ì<E2809A>擪‚ð”z’u‚·‚é y <20>À•W( <20>~ 8 ƒhƒbƒg )<29>B
|
||
color - •¶Žš‚Ì<E2809A>F‚ðƒpƒŒƒbƒg”Ô<E2809D>†‚ÅŽw’è<E28099>B
|
||
value
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontFillChar(int lineNo, u8 color1, u8 color2)
|
||
{
|
||
s32 i;
|
||
u32 line;
|
||
int charNo = 0xde + lineNo;
|
||
|
||
if (color1 < 0x10)
|
||
{
|
||
line = (u32)(0x11111111 * color1);
|
||
|
||
for (i = 0;i<4; i++)
|
||
{
|
||
sBackColorCharData[8 * lineNo + i] = line;
|
||
}
|
||
}
|
||
|
||
if (color2 < 0x10)
|
||
{
|
||
line = (u32)(0x11111111 * color2);
|
||
|
||
for (i = 4;i<8; i++)
|
||
{
|
||
sBackColorCharData[8 * lineNo + i] = line;
|
||
}
|
||
}
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontPrintfConsole
|
||
|
||
Description: ‰¼‘zƒRƒ“ƒ\<5C>[ƒ‹‚É•¶Žš—ñ‚ð”z’u‚·‚é<E2809A>B•¶Žš—ñ‚Í256•¶Žš‚Ü‚Å<E2809A>B
|
||
|
||
Arguments: color - •¶Žš‚Ì<E2809A>F‚ðƒpƒŒƒbƒg”Ô<E2809D>†‚ÅŽw’è<E28099>B
|
||
text - ”z’u‚·‚é•¶Žš—ñ<E28094>B<EFBFBD>I’[•¶Žš‚ÍNULL<4C>B
|
||
... - ‰¼‘zˆø<CB86>”<EFBFBD>B
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontPrintfConsole(u8 color, const char *text, ...)
|
||
{
|
||
va_list vlist;
|
||
char temp[256 + 2];
|
||
s32 i;
|
||
|
||
va_start(vlist, text);
|
||
(void)vsnprintf(temp, 256, text, vlist);
|
||
va_end(vlist);
|
||
|
||
// <20>I’[’ljÁ
|
||
*(u16 *)(&temp[256]) = 0x0000;
|
||
|
||
for(i=0; temp[i] != 0x00; i++)
|
||
{
|
||
if (temp[i] == 0x0A)
|
||
{
|
||
// ‰ü<E280B0>sƒR<C692>[ƒh
|
||
kamiFontReturnConsole();
|
||
}
|
||
else
|
||
{
|
||
// ˆê•¶Žš‚¸‚Â<E2809A>‘‚«<E2809A>ž‚Ý
|
||
sFontScreenDataSub[((sYPos * 32) + sXPos) % (24 * 32)] =
|
||
(u16)((color << SCREEN_DATA_COLOR_PLTT_SHIFT) | temp[i]);
|
||
|
||
// X<>À•W‚ª‰E’[‚É“ž’B‚µ‚½<E2809A>ê<EFBFBD>‡‚͉ü<E280B0>s<EFBFBD>ˆ—<CB86>
|
||
if (++sXPos >= 32)
|
||
{
|
||
kamiFontReturnConsole();
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontPrintfConsoleEx
|
||
|
||
Description: ‰¼‘zƒRƒ“ƒ\<5C>[ƒ‹‚É•¶Žš—ñ‚ð”z’u‚·‚é<E2809A>B•¶Žš—ñ‚Í256•¶Žš‚Ü‚Å<E2809A>B
|
||
OS_Printf‚à‚‚¢‚łɎÀ<C5BD>s‚·‚é<E2809A>B
|
||
|
||
Arguments: color - •¶Žš‚Ì<E2809A>F‚ðƒpƒŒƒbƒg”Ô<E2809D>†‚ÅŽw’è<E28099>B
|
||
text - ”z’u‚·‚é•¶Žš—ñ<E28094>B<EFBFBD>I’[•¶Žš‚ÍNULL<4C>B
|
||
... - ‰¼‘zˆø<CB86>”<EFBFBD>B
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
void
|
||
kamiFontPrintfConsoleEx(u8 color, const char *text, ...)
|
||
{
|
||
va_list vlist;
|
||
char temp[256 + 2];
|
||
|
||
va_start(vlist, text);
|
||
(void)vsnprintf(temp, 256, text, vlist);
|
||
va_end(vlist);
|
||
|
||
kamiFontPrintfConsole(color, temp);
|
||
OS_TPrintf(temp);
|
||
}
|
||
|
||
/*---------------------------------------------------------------------------*
|
||
Name: kamiFontReturnConsole
|
||
|
||
Description: ‰¼‘zƒRƒ“ƒ\<5C>[ƒ‹‚É‚¨‚¯‚é‰ü<E280B0>s<EFBFBD>ˆ—<CB86>‚ð<E2809A>s‚¤
|
||
|
||
Arguments: None.
|
||
|
||
Returns: None.
|
||
*---------------------------------------------------------------------------*/
|
||
static void
|
||
kamiFontReturnConsole( void )
|
||
{
|
||
sXPos = 0;
|
||
if (sYPos < 23)
|
||
{
|
||
// ŽŸ‚Ì<E2809A>s‚Ö
|
||
sYPos++;
|
||
}
|
||
else
|
||
{
|
||
// Šù‚É<E2809A>Å<EFBFBD>I<EFBFBD>s‚É“ž’B‚µ‚Ä‚¢‚é<E2809A>ê<EFBFBD>‡ƒVƒtƒg‚ð<E2809A>s‚¤
|
||
MI_CpuCopy32( &sFontScreenDataSub[32], sFontScreenDataSub, sizeof(u16)*32*23 );
|
||
MI_CpuClear32( &sFontScreenDataSub[32*23], sizeof(u16)*32);
|
||
}
|
||
}
|
||
|