flashgetaddr.c 1006 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.1.1.1 2002/10/29 08:06:43 blythe Exp $
   ---------------------------------------------------------------------*/
/**************************************************************************
 *
 *  $Revision: 1.1.1.1 $
 *  $Date: 2002/10/29 08:06:43 $
 *  $Source: 
 *
 **************************************************************************/

#include	<ultra64.h>
#include        "osint_flash.h"

u32 __osFlashGetAddr(u32 page_num)
{
  u32 devAddr;
  /* MX旧バージョンフラッシュのアドレスデコーダバグのためのアドレス変換 */
  if (__osFlashVersion == OLD_FLASH)
    devAddr  =  page_num * 64;
  else
    devAddr  =  page_num * 128;
  return devAddr;
}