1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<HTML>
3<HEAD>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.1.0 for Windows">
6<META http-equiv="Content-Style-Type" content="text/css">
7<TITLE>CTRDG_WriteAndVerifyAgbSram</TITLE>
8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
9</HEAD>
10<BODY>
11<H1 align="left">CTRDG_WriteAndVerifyAgbSram <IMG src="../image/NTR.gif" align="middle"></H1>
12<H2>Syntax</H2>
13<DL>
14  <DD>
15  <PRE><CODE>#include &lt;nitro/ctrdg.h&gt;</CODE></PRE>
16  <PRE><CODE>u32 CTRDG_WriteAndVerifyAgbSram(u32 dst, const void* src, u32 size);
17  </CODE></PRE>
18Corresponding AGB function: <A href="coordinate.html"><CODE>u32 WriteSramEx(u8 *dst, u8 *src, u32 size)</CODE></A>
19</DL>
20<H2>Arguments</H2>
21<TABLE border="1">
22  <TBODY>
23    <TR>
24<TD><SPAN class="argument">dst</SPAN></TD>
25<TD>Destination SRAM address (address on the AGB memory map).</TD>
26    </TR>
27    <TR>
28<TD><SPAN class="argument">src</SPAN></TD>
29<TD>Source work area address.</TD>
30    </TR>
31    <TR>
32<TD><SPAN class="argument">size</SPAN></TD>
33<TD>Size of data written and verified in bytes</TD>
34    </TR>
35  </TBODY>
36</TABLE>
37<H2>Return Values</H2>
38<P>Returns zero if verification succeeds. Returns the error address on the device side if verification fails.</P>
39<H2>Description</H2>
40<P>Internally, after data is written by <CODE>CTRDG_WriteAgbSram</CODE>, verification is performed by <CODE>CTRDG_VerifyAgbSram</CODE>. If there is an error, the function retries up to the number of times specified by <CODE>CTRDG_AGB_SRAM_RETRY_MAX</CODE> (defined in <CODE>AgbSram.h</CODE>).</P>
41<P>The access cycle setting is created in the function and does not need to be set in advance.</P>
42<P><B>Note:</B> The cartridge bus is locked for a set period by this function. <br>Note that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.</P>
43<H2>See Also</H2>
44<P><A href="CTRDG_WriteAgbSram.html"><CODE>CTRDG_WriteAgbSram</CODE></A><BR> <A href="CTRDG_VerifyAgbSram.html"><CODE>CTRDG_VerifyAgbSram</CODE></A><BR> <A href="CTRDG_WriteAndVerifyAgbSramAsync.html"><CODE>CTRDG_WriteAndVerifyAgbSramAsync</CODE></A></P>
45<H2>Revision History</H2>
46<P>2006/05/25 Added a description that the AGB backup device cannot be accessed normally with IS-NITRO-DEBUGGER version 1.66 or earlier.<BR> 2006/04/07 Initial version.</P>
47<hr><p>CONFIDENTIAL</p></body>
48</HTML>
49