flashgetaddr.c
1022 Bytes
/*---------------------------------------------------------------------
Copyright (C) 1998 Nintendo.
File flash.c
Coded by Atushi Watanabe. Dec 1, 1998.
Modified by Atushi Watanabe. Apr 4, 2000.
Comments 1M Flash ROM access functions(Ver.7.6)
$Id: flashgetaddr.c,v 1.2 2003/03/26 02:00:13 blythe Exp $
---------------------------------------------------------------------*/
/**************************************************************************
*
* $Revision: 1.2 $
* $Date: 2003/03/26 02:00:13 $
* $Source:
*
**************************************************************************/
#include <ultra64.h>
#include "osint_flash.h"
#ifndef BBPLAYER
u32 __osFlashGetAddr(u32 page_num)
{
u32 devAddr;
/* MX旧バージョンフラッシュのアドレスデコーダバグのためのアドレス変換 */
if (__osFlashVersion == OLD_FLASH)
devAddr = page_num * 64;
else
devAddr = page_num * 128;
return devAddr;
}
#endif