1 /*---------------------------------------------------------------------------*
2   Project:  TwlSDK - MI
3   File:     mi_exMemory.c
4 
5   Copyright 2005-2008 Nintendo.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Date:: 2008-09-18#$
14   $Rev: 8573 $
15   $Author: okubata_ryoma $
16  *---------------------------------------------------------------------------*/
17 
18 #include <nitro.h>
19 
20 /*---------------------------------------------------------------------------*
21   Name:         MI_SetAgbCartridgeFastestRomCycle
22 
23   Description:  set Cartridge ROM access cycles for AGB. (8-4 cycle)
24 
25   Arguments:    prev1st : pointer to be store the previous 1st ROM access cycle.
26                           if NULL, no effect.
27                 prev2nd : pointer to be store the previous 2nd ROM access cycle.
28                           if NULL, no effect.
29 
30   Returns:      None
31  *---------------------------------------------------------------------------*/
MI_SetAgbCartridgeFastestRomCycle(MICartridgeRomCycle1st * prev1st,MICartridgeRomCycle2nd * prev2nd)32 void MI_SetAgbCartridgeFastestRomCycle(MICartridgeRomCycle1st *prev1st,
33                                        MICartridgeRomCycle2nd *prev2nd)
34 {
35     //---- store previous value
36     if (prev1st)
37     {
38         *prev1st = MI_GetCartridgeRomCycle1st();
39     }
40     if (prev2nd)
41     {
42         *prev2nd = MI_GetCartridgeRomCycle2nd();
43     }
44 
45     //---- set cycles for AGB cartridge setting
46     MI_SetCartridgeRomCycle1st(MI_CTRDG_ROMCYCLE1_8);
47     MI_SetCartridgeRomCycle2nd(MI_CTRDG_ROMCYCLE2_4);
48 }
49