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@108 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
02d03d78d4
commit
6167e6580f
@ -129,7 +129,7 @@ static void FreeForNAM(void *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SystemMenuの初期化
|
// SystemMenuの初期化
|
||||||
void SYSM_Init( void )
|
void SYSM_Init( void *(*pAlloc)(u32), void (*pFree)(void*) )
|
||||||
{
|
{
|
||||||
#ifdef __SYSM_DEBUG
|
#ifdef __SYSM_DEBUG
|
||||||
pSysm = GetSYSMWork();
|
pSysm = GetSYSMWork();
|
||||||
@ -140,6 +140,8 @@ void SYSM_Init( void )
|
|||||||
TP_Init();
|
TP_Init();
|
||||||
RTC_Init();
|
RTC_Init();
|
||||||
|
|
||||||
|
SYSM_SetAllocFunc( pAlloc, pFree );
|
||||||
|
|
||||||
// WRAM設定はいる?
|
// WRAM設定はいる?
|
||||||
// MI_SetMainMemoryPriority(MI_PROCESSOR_ARM7);
|
// MI_SetMainMemoryPriority(MI_PROCESSOR_ARM7);
|
||||||
// MI_SetWramBank(MI_WRAM_ARM7_ALL);
|
// MI_SetWramBank(MI_WRAM_ARM7_ALL);
|
||||||
|
|||||||
@ -22,7 +22,7 @@ SUBDIRS =
|
|||||||
|
|
||||||
TARGET_FIRM = SYSTEMMENU
|
TARGET_FIRM = SYSTEMMENU
|
||||||
TARGET_PLATFORM = TWL
|
TARGET_PLATFORM = TWL
|
||||||
TWL_ARCHGEN = LIMITED
|
#TWL_ARCHGEN = LIMITED
|
||||||
|
|
||||||
TARGET_BIN = main.srl
|
TARGET_BIN = main.srl
|
||||||
|
|
||||||
|
|||||||
@ -105,12 +105,11 @@ void LoadLogoData(void)
|
|||||||
{
|
{
|
||||||
u32 temp[ 0x500 / sizeof(u32) ];
|
u32 temp[ 0x500 / sizeof(u32) ];
|
||||||
u16 *pBuff = NNS_FndAllocFromAllocator( &g_allocator, 0x1000 );
|
u16 *pBuff = NNS_FndAllocFromAllocator( &g_allocator, 0x1000 );
|
||||||
MI_CpuClear32( pBuff, 0x1000 );
|
|
||||||
|
|
||||||
if( pBuff == NULL ) {
|
if( pBuff == NULL ) {
|
||||||
OS_TPrintf( " %s : memory allocate error.\n", __FUNCTION__ );
|
OS_TPrintf( " %s : memory allocate error.\n", __FUNCTION__ );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
MI_CpuClear32( pBuff, 0x1000 );
|
||||||
|
|
||||||
UnCompNintendoLogo( (u16 *)Nin_Char_Diff_Huff, pBuff, temp ); // NintendoロゴをpBuffに展開
|
UnCompNintendoLogo( (u16 *)Nin_Char_Diff_Huff, pBuff, temp ); // NintendoロゴをpBuffに展開
|
||||||
MI_CpuCopy32( pBuff, (u32 *)HW_OBJ_VRAM, 0x340 ); // OBJ-VRAMにロード
|
MI_CpuCopy32( pBuff, (u32 *)HW_OBJ_VRAM, 0x340 ); // OBJ-VRAMにロード
|
||||||
|
|||||||
@ -74,13 +74,13 @@ void TwlMain( void )
|
|||||||
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
(void)OS_EnableIrqMask(OS_IE_V_BLANK);
|
||||||
(void)GX_VBlankIntr(TRUE);
|
(void)GX_VBlankIntr(TRUE);
|
||||||
|
|
||||||
// システムメニュー初期化----------
|
|
||||||
SYSM_Init(); // OS_Initの後でコール。
|
|
||||||
|
|
||||||
// システムの初期化----------------
|
// システムの初期化----------------
|
||||||
InitAllocator( &g_allocator );
|
InitAllocator( &g_allocator );
|
||||||
CMN_InitFileSystem( &g_allocator );
|
CMN_InitFileSystem( &g_allocator );
|
||||||
|
|
||||||
|
// システムメニュー初期化----------
|
||||||
|
SYSM_Init( Alloc, Free ); // OS_Initの後でコール。
|
||||||
|
|
||||||
// リセットパラメータの取得--------
|
// リセットパラメータの取得--------
|
||||||
if( SYSM_GetResetParam()->isLogoSkip ) {
|
if( SYSM_GetResetParam()->isLogoSkip ) {
|
||||||
if( SYSM_GetResetParam()->bootTitleID ) { // アプリ直接起動の指定があったらロゴデモを飛ばして指定アプリ起動
|
if( SYSM_GetResetParam()->bootTitleID ) { // アプリ直接起動の指定があったらロゴデモを飛ばして指定アプリ起動
|
||||||
@ -320,9 +320,24 @@ static void InitAllocator( NNSFndAllocator* pAllocator )
|
|||||||
heapHandle = NNS_FndCreateExpHeap(heapMemory, heapSize);
|
heapHandle = NNS_FndCreateExpHeap(heapMemory, heapSize);
|
||||||
SDK_ASSERT( heapHandle != NNS_FND_HEAP_INVALID_HANDLE );
|
SDK_ASSERT( heapHandle != NNS_FND_HEAP_INVALID_HANDLE );
|
||||||
|
|
||||||
NNS_FndInitAllocatorForExpHeap(pAllocator, heapHandle, 4);
|
NNS_FndInitAllocatorForExpHeap(pAllocator, heapHandle, 32);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// メモリ割り当て
|
||||||
|
void *Alloc( u32 size )
|
||||||
|
{
|
||||||
|
return NNS_FndAllocFromAllocator( &g_allocator, size );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// メモリ解放
|
||||||
|
void Free( void *pBuffer )
|
||||||
|
{
|
||||||
|
NNS_FndFreeToAllocator( &g_allocator, pBuffer );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// mallocシステムの初期化
|
// mallocシステムの初期化
|
||||||
static void InitAllocSystem(void)
|
static void InitAllocSystem(void)
|
||||||
|
|||||||
@ -130,6 +130,9 @@ extern NNSG2dCharCanvas gCanvas; // CharCanvas
|
|||||||
extern NNSG2dTextCanvas gTextCanvas; // TextCanvas
|
extern NNSG2dTextCanvas gTextCanvas; // TextCanvas
|
||||||
|
|
||||||
// function-------------------------------------------------------------
|
// function-------------------------------------------------------------
|
||||||
|
void *Alloc( u32 size );
|
||||||
|
void Free( void *pBuffer );
|
||||||
|
|
||||||
void InitBG( void );
|
void InitBG( void );
|
||||||
void PutStringUTF16 ( int x, int y, int color, const u16 *strUTF16 );
|
void PutStringUTF16 ( int x, int y, int color, const u16 *strUTF16 );
|
||||||
void PutStringUTF16Sub( int x, int y, int color, const u16 *strUTF16 );
|
void PutStringUTF16Sub( int x, int y, int color, const u16 *strUTF16 );
|
||||||
|
|||||||
@ -61,7 +61,8 @@ extern void *(*SYSM_Alloc)( u32 size );
|
|||||||
extern void (*SYSM_Free)( void *ptr );
|
extern void (*SYSM_Free)( void *ptr );
|
||||||
|
|
||||||
// function-------------------------------------------------------------
|
// function-------------------------------------------------------------
|
||||||
extern void SYSM_Init( void );
|
extern void SYSM_Init( void *(*pAlloc)(u32), void (*pFree)(void*) );
|
||||||
|
//extern void SYSM_Init( void );
|
||||||
extern void SYSM_SetAllocFunc( void *(*pAlloc)(u32), void (*pFree)(void*) );
|
extern void SYSM_SetAllocFunc( void *(*pAlloc)(u32), void (*pFree)(void*) );
|
||||||
|
|
||||||
extern BOOL SYSM_IsLogoDemoSkip( void );
|
extern BOOL SYSM_IsLogoDemoSkip( void );
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user