##### Shinobi Library - Memory Card Function

# buAnalyzeBackupFileImage

Creates a file header image

### FORMAT

`

  Sint32 buAnalyzeBackupFileImage( *hdr, *buf )
  BUS_BACKUPFILEHEADER *hdr
  void *buf

`

### PARAMETER

  `hdr` | Memory card file header address
  `buf` | Address where the file to be analyzed was loaded

### RETURN

  BUD_ERR_OK | Normal end |
  BUD_ERR_BUPFILE_ILLEGAL | File is not in the correct format |
  BUD_ERR_BUPFILE_CRC | CRC error |

### DESCRIPTION

  Analyzes the data in memory and creates the file header image BUS_BACKUPFILEHEADER structure.

### EXAMPLE

      Sint32 ret, nblock;
      extern Uint8 buf[];
      BUS_BACKUPFILEHEADER hdr;
      ret = buLoadFile(BUD_DRIVE_A1, "SAVEDATA_001", buf, 0);
      if (ret != BUD_ERR_OK) return NG;
      while (1) {
        if (buStat(BUD_DRIVE_A1) == BUD_STAT_READY) break;
      }
      ret = buAnalyzeBackupFileImage(&hdr, buf);
      switch (ret) {
      case BUD_ERR_OK:
        return OK;
      default:
        return NG;
      }

### NOTE

  The address that is specified for `buf` must be on a four-byte boundary.

buAnalyzeBackupFileImage

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999