1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>MI_SetAgbCartridgeFastestRomCycle</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">MI_SetAgbCartridgeFastestRomCycle <IMG src="../../image/NTR.gif" align="middle"><IMG src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/mi.h></CODE><BR> 20 <BR> 21 <CODE>void MI_SetAgbCartridgeFastestRomCycle( </CODE><BR> 22 <CODE>MICartridgeRomCycle1st *prev1st,</CODE><BR> 23 <CODE>MICartridgeRomCycle2nd *prev2nd );</CODE></dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1"> 27 <TBODY> 28 <TR> 29 <TD><EM><B>prev1st</B></EM></TD> 30 <TD>Pointer to the region that stores the previous ROM first access cycle settings value.</TD> 31 </TR> 32 <TR> 33 <TD><EM><B>prev2nd</B></EM></TD> 34 <TD>Pointer to the region that stores the previous ROM second access cycle settings value.</TD> 35 </TR> 36 </TBODY> 37</TABLE> 38<h2>Return Values</h2> 39<p>None. However, the previous settings values are stored where <EM><B>prev1st</B></EM> and <EM><B>prev2nd</B></EM> are shown.</p> 40 41<H2>Description</H2> 42<P>Configures the first and second access cycles to the cartridge ROM region. Configures the high-speed ROM access cycle for the AGB cartridge ROM.</P> 43<P>The first access cycle is set to 8, while the second access cycle is set to 4. This configuration is equivalent to performing the following:</P> 44<BLOCKQUOTE> 45<P><CODE>MI_SetCartridgeRomCycle1st( MI_CTRDG_ROMCYCLE1_8 );<BR> MI_SetCartridgeRomCycle2nd( MI_CTRDG_ROMCYCLE2_4 );</CODE></P> 46</BLOCKQUOTE> 47<P> </P> 48<P>If <B><I><CODE>prev1st</CODE></I></B> is not NULL, the previous first access cycle settings value will be stored ahead of the pointer shown in <B><I><CODE>prev1st</CODE></I></B>. If <B><I><CODE>prev2nd</CODE></I></B> is not NULL, the previous second access cycle settings value will be stored ahead of the pointer shown in <B><I><CODE>prev2nd</CODE></I></B>.</P> 49<P><BR> 50</P> 51<BLOCKQUOTE><B>Note: </B><BR> The system clock of the DS is double that of the AGB, so the method for calculating the access cycle is as follows:</BLOCKQUOTE> 52<BLOCKQUOTE><BLOCKQUOTE>(Number of AGB wait cycles + 1 <actual access>) x 2</BLOCKQUOTE></BLOCKQUOTE> 53<BLOCKQUOTE>Therefore, a 3-1 wait on the AGB will be an 8-4 access notation on the DS. Converting this to a wait cycle will result in an entirely odd-numbered expression such as 7-3.</BLOCKQUOTE> 54<BLOCKQUOTE>Fast settings can be performed on all AGB mask ROMs up to 3-1 wait (8-4 access notation on the DS), but the slower sections will not cause any problems. Only setting the first access to 6 is forbidden.</BLOCKQUOTE> 55<BLOCKQUOTE>However, since there is the possibility that there is a device on board the cartridge that cannot access at the same speed as the AGB mask ROM, and since there is only one address space where access speeds different from that of the AGB can be configured, it is recommended that the slowest access configurations possible be used.<FONT color="#ff0033">Be careful not to access a slow device with high-speed mask ROM configured.</FONT></BLOCKQUOTE> 56<BLOCKQUOTE>Also, use functions such as <CODE><A href="../../ctrdg/CTRDG_GetAgbGameCode.html">CTRDG_GetAgbGameCode()</A></CODE> / <CODE><A href="../../ctrdg/CTRDG_IsBitID.html">CTRDG_IsBitID()</A></CODE> / <CODE><A href="../../ctrdg/CTRDG_IsNumberID.html">CTRDG_IsNumberID()</A></CODE> before the access, and perform the access after comfirming that that cartridge is in fact the correct one.</BLOCKQUOTE> 57<h2>Internal Operation</h2> 58<P>Accesses the <code>EXMEMCNT</code> I/O register <code>(0x4000204)</code>.</P> 59 60<h2>See Also</h2> 61<p><CODE> 62 <A href="MI_SetCartridgeRomCycle1st.html">MI_SetCartridgeRomCycle1st</A>, 63 <A href="MI_SetCartridgeRomCycle2nd.html">MI_SetCartridgeRomCycle2nd</A>,</CODE><BR> <CODE><A href="../../ctrdg/CTRDG_GetAgbGameCode.html">CTRDG_GetAgbGameCode</A>, <A href="../../ctrdg/CTRDG_IsBitID.html">CTRDG_IsBitID</A>, <A href="../../ctrdg/CTRDG_IsNumberID.html">CTRDG_IsNumberID</A></CODE></p> 64<H2>Revision History</H2> 65<P>2005/02/08 Initial version.</P> 66<hr><p>CONFIDENTIAL</p></body> 67</html> 68