dreamcast_scramble.cc File Reference

Back to the index.

Macros | Functions
dreamcast_scramble.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Macros

#define MAXCHUNK   (2048*1024)
 

Functions

void my_srand (unsigned int n)
 
unsigned int my_rand (void)
 
void load (FILE *fh, unsigned char *ptr, unsigned long sz)
 
void load_chunk (FILE *fh, unsigned char *ptr, unsigned long sz)
 
void load_file (FILE *fh, unsigned char *ptr, unsigned long filesz)
 
void read_file (char *filename, unsigned char **ptr, unsigned long *sz)
 
void save (FILE *fh, unsigned char *ptr, unsigned long sz)
 
void save_chunk (FILE *fh, unsigned char *ptr, unsigned long sz)
 
void save_file (FILE *fh, unsigned char *ptr, unsigned long filesz)
 
void write_file (char *filename, unsigned char *ptr, unsigned long sz)
 
void dreamcast_descramble (char *src, char *dst)
 
void scramble (char *src, char *dst)
 

Macro Definition Documentation

◆ MAXCHUNK

#define MAXCHUNK   (2048*1024)

Definition at line 19 of file dreamcast_scramble.cc.

Function Documentation

◆ dreamcast_descramble()

void dreamcast_descramble ( char *  src,
char *  dst 
)

Definition at line 190 of file dreamcast_scramble.cc.

References read_file().

◆ load()

void load ( FILE *  fh,
unsigned char *  ptr,
unsigned long  sz 
)

◆ load_chunk()

void load_chunk ( FILE *  fh,
unsigned char *  ptr,
unsigned long  sz 
)

Definition at line 42 of file dreamcast_scramble.cc.

References load(), MAXCHUNK, and my_rand().

Referenced by load_file().

◆ load_file()

void load_file ( FILE *  fh,
unsigned char *  ptr,
unsigned long  filesz 
)

Definition at line 70 of file dreamcast_scramble.cc.

References load(), load_chunk(), MAXCHUNK, and my_srand().

Referenced by read_file().

◆ my_rand()

unsigned int my_rand ( void  )

Definition at line 27 of file dreamcast_scramble.cc.

Referenced by load_chunk(), and save_chunk().

◆ my_srand()

void my_srand ( unsigned int  n)

Definition at line 22 of file dreamcast_scramble.cc.

Referenced by load_file(), and save_file().

◆ read_file()

void read_file ( char *  filename,
unsigned char **  ptr,
unsigned long *  sz 
)

Definition at line 91 of file dreamcast_scramble.cc.

References load_file().

Referenced by dreamcast_descramble().

◆ save()

void save ( FILE *  fh,
unsigned char *  ptr,
unsigned long  sz 
)

Definition at line 120 of file dreamcast_scramble.cc.

Referenced by save_chunk(), and save_file().

◆ save_chunk()

void save_chunk ( FILE *  fh,
unsigned char *  ptr,
unsigned long  sz 
)

Definition at line 129 of file dreamcast_scramble.cc.

References MAXCHUNK, my_rand(), and save().

Referenced by save_file().

◆ save_file()

void save_file ( FILE *  fh,
unsigned char *  ptr,
unsigned long  filesz 
)

Definition at line 157 of file dreamcast_scramble.cc.

References MAXCHUNK, my_srand(), save(), and save_chunk().

Referenced by write_file().

◆ scramble()

void scramble ( char *  src,
char *  dst 
)

Definition at line 213 of file dreamcast_scramble.cc.

References write_file().

◆ write_file()

void write_file ( char *  filename,
unsigned char *  ptr,
unsigned long  sz 
)

Definition at line 178 of file dreamcast_scramble.cc.

References save_file().

Referenced by scramble().


Generated on Tue Aug 25 2020 19:25:06 for GXemul by doxygen 1.8.18