LibXenon
Bare-metal Xbox 360 homebrew library
Loading...
Searching...
No Matches
Functions | Variables
xenon_sfcx.c File Reference
#include <xetypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <time/time.h>
#include <xb360/xb360.h>
#include "xenon_sfcx.h"
Include dependency graph for xenon_sfcx.c:

Go to the source code of this file.

Functions

void sfcx_writereg (int addr, unsigned long data)
 
unsigned long sfcx_readreg (int addr)
 
int sfcx_read_page (unsigned char *data, int address, int raw)
 
int sfcx_write_page (unsigned char *data, int address)
 
int sfcx_read_block (unsigned char *data, int address, int raw)
 
int sfcx_write_block (unsigned char *data, int address)
 
int sfcx_erase_block (int address)
 
void sfcx_calcecc_ex (unsigned int *data, unsigned char *edc)
 
void sfcx_calcecc (unsigned int *data)
 
int sfcx_get_blocknumber (unsigned char *data)
 
void sfcx_set_blocknumber (unsigned char *data, int num)
 
int sfcx_get_blockversion (unsigned char *data)
 
void sfcx_set_blockversion (unsigned char *data, int ver)
 
void sfcx_set_pagevalid (unsigned char *data)
 
void sfcx_set_pageinvalid (unsigned char *data)
 
int sfcx_is_pagevalid (unsigned char *data)
 
int sfcx_is_pagezeroed (unsigned char *data)
 
int sfcx_is_pageerased (unsigned char *data)
 
int sfcx_block_to_address (int block)
 
int sfcx_address_to_block (int address)
 
int sfcx_block_to_rawaddress (int block)
 
int sfcx_rawaddress_to_block (int address)
 
int rawflash_checkImage_meta (int len)
 
int rawflash_checkImage_ecd_page (unsigned char *page)
 
int rawflash_checkImage_ecd (int len)
 
int rawflash_checkImage (int f)
 
int rawflash_writeImage (int len, int f)
 
int try_rawflash (char *filename)
 
unsigned int sfcx_init (void)
 

Variables

struct sfc sfc = {0}
 
unsigned char * blockbuf
 

Function Documentation

◆ rawflash_checkImage()

int rawflash_checkImage ( int  f)

Definition at line 475 of file xenon_sfcx.c.

◆ rawflash_checkImage_ecd()

int rawflash_checkImage_ecd ( int  len)

Definition at line 460 of file xenon_sfcx.c.

◆ rawflash_checkImage_ecd_page()

int rawflash_checkImage_ecd_page ( unsigned char *  page)

Definition at line 450 of file xenon_sfcx.c.

◆ rawflash_checkImage_meta()

int rawflash_checkImage_meta ( int  len)

Definition at line 392 of file xenon_sfcx.c.

◆ rawflash_writeImage()

int rawflash_writeImage ( int  len,
int  f 
)

Definition at line 504 of file xenon_sfcx.c.

◆ sfcx_address_to_block()

int sfcx_address_to_block ( int  address)

Definition at line 377 of file xenon_sfcx.c.

◆ sfcx_block_to_address()

int sfcx_block_to_address ( int  block)

Definition at line 372 of file xenon_sfcx.c.

◆ sfcx_block_to_rawaddress()

int sfcx_block_to_rawaddress ( int  block)

Definition at line 382 of file xenon_sfcx.c.

◆ sfcx_calcecc()

void sfcx_calcecc ( unsigned int *  data)

Definition at line 211 of file xenon_sfcx.c.

◆ sfcx_calcecc_ex()

void sfcx_calcecc_ex ( unsigned int *  data,
unsigned char *  edc 
)

Definition at line 187 of file xenon_sfcx.c.

◆ sfcx_erase_block()

int sfcx_erase_block ( int  address)

Definition at line 150 of file xenon_sfcx.c.

◆ sfcx_get_blocknumber()

int sfcx_get_blocknumber ( unsigned char *  data)

Definition at line 217 of file xenon_sfcx.c.

◆ sfcx_get_blockversion()

int sfcx_get_blockversion ( unsigned char *  data)

Definition at line 254 of file xenon_sfcx.c.

◆ sfcx_init()

unsigned int sfcx_init ( void  )

Definition at line 645 of file xenon_sfcx.c.

◆ sfcx_is_pageerased()

int sfcx_is_pageerased ( unsigned char *  data)

Definition at line 361 of file xenon_sfcx.c.

◆ sfcx_is_pagevalid()

int sfcx_is_pagevalid ( unsigned char *  data)

Definition at line 332 of file xenon_sfcx.c.

◆ sfcx_is_pagezeroed()

int sfcx_is_pagezeroed ( unsigned char *  data)

Definition at line 350 of file xenon_sfcx.c.

◆ sfcx_rawaddress_to_block()

int sfcx_rawaddress_to_block ( int  address)

Definition at line 387 of file xenon_sfcx.c.

◆ sfcx_read_block()

int sfcx_read_block ( unsigned char *  data,
int  address,
int  raw 
)

Definition at line 121 of file xenon_sfcx.c.

◆ sfcx_read_page()

int sfcx_read_page ( unsigned char *  data,
int  address,
int  raw 
)

Definition at line 25 of file xenon_sfcx.c.

◆ sfcx_readreg()

unsigned long sfcx_readreg ( int  addr)

Definition at line 20 of file xenon_sfcx.c.

◆ sfcx_set_blocknumber()

void sfcx_set_blocknumber ( unsigned char *  data,
int  num 
)

Definition at line 235 of file xenon_sfcx.c.

◆ sfcx_set_blockversion()

void sfcx_set_blockversion ( unsigned char *  data,
int  ver 
)

Definition at line 275 of file xenon_sfcx.c.

◆ sfcx_set_pageinvalid()

void sfcx_set_pageinvalid ( unsigned char *  data)

Definition at line 316 of file xenon_sfcx.c.

◆ sfcx_set_pagevalid()

void sfcx_set_pagevalid ( unsigned char *  data)

Definition at line 300 of file xenon_sfcx.c.

◆ sfcx_write_block()

int sfcx_write_block ( unsigned char *  data,
int  address 
)

Definition at line 136 of file xenon_sfcx.c.

◆ sfcx_write_page()

int sfcx_write_page ( unsigned char *  data,
int  address 
)

Definition at line 74 of file xenon_sfcx.c.

◆ sfcx_writereg()

void sfcx_writereg ( int  addr,
unsigned long  data 
)

Definition at line 15 of file xenon_sfcx.c.

◆ try_rawflash()

int try_rawflash ( char *  filename)

Definition at line 559 of file xenon_sfcx.c.

Variable Documentation

◆ blockbuf

unsigned char* blockbuf

Definition at line 11 of file xenon_sfcx.c.

◆ sfc

struct sfc sfc = {0}

Definition at line 10 of file xenon_sfcx.c.