RetroArch
Classes | Macros | Functions | Variables
task_database_cue.c File Reference
#include <errno.h>
#include <ctype.h>
#include <string.h>
#include <retro_miscellaneous.h>
#include <compat/strcasestr.h>
#include <compat/strl.h>
#include <file/file_path.h>
#include <retro_endianness.h>
#include <streams/file_stream.h>
#include <streams/interface_stream.h>
#include <string/stdstring.h>
#include "../database_info.h"
#include "tasks_internal.h"
#include "../list_special.h"
#include "../msg_hash.h"
#include "../verbosity.h"
Include dependency graph for task_database_cue.c:

Classes

struct  magic_entry
 

Macros

#define MAGIC_LEN   17
 
#define MAX_TOKEN_LEN   255
 
#define MODETEST_VAL   0xffffff00
 

Functions

static int64_t get_token (intfstream_t *fd, char *token, uint64_t max_len)
 
static int detect_ps1_game_sub (intfstream_t *fp, char *game_id, int sub_channel_mixed)
 
int detect_ps1_game (intfstream_t *fd, char *game_id)
 
int detect_psp_game (intfstream_t *fd, char *game_id)
 
int detect_gc_game (intfstream_t *fd, char *game_id)
 
int detect_serial_ascii_game (intfstream_t *fd, char *game_id)
 
int detect_system (intfstream_t *fd, const char **system_name)
 
static int64_t intfstream_get_file_size (const char *path)
 
static bool update_cand (int64_t *cand_index, int64_t *last_index, uint64_t *largest, char *last_file, uint64_t *offset, uint64_t *size, char *track_path, uint64_t max_len)
 
int cue_find_track (const char *cue_path, bool first, uint64_t *offset, uint64_t *size, char *track_path, uint64_t max_len)
 
bool cue_next_file (intfstream_t *fd, const char *cue_path, char *path, uint64_t max_len)
 
int gdi_find_track (const char *gdi_path, bool first, char *track_path, uint64_t max_len)
 
bool gdi_next_file (intfstream_t *fd, const char *gdi_path, char *path, uint64_t max_len)
 

Variables

static struct magic_entry MAGIC_NUMBERS []
 

Macro Definition Documentation

◆ MAGIC_LEN

#define MAGIC_LEN   17

◆ MAX_TOKEN_LEN

#define MAX_TOKEN_LEN   255

◆ MODETEST_VAL

#define MODETEST_VAL   0xffffff00

Function Documentation

◆ cue_find_track()

int cue_find_track ( const char *  cue_path,
bool  first,
uint64_t offset,
uint64_t size,
char *  track_path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cue_next_file()

bool cue_next_file ( intfstream_t fd,
const char *  cue_path,
char *  path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_gc_game()

int detect_gc_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_ps1_game()

int detect_ps1_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_ps1_game_sub()

static int detect_ps1_game_sub ( intfstream_t fp,
char *  game_id,
int  sub_channel_mixed 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_psp_game()

int detect_psp_game ( intfstream_t fd,
char *  game_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_serial_ascii_game()

int detect_serial_ascii_game ( intfstream_t fd,
char *  game_id 
)

Check for an ASCII serial in the first few bits of the ISO (Wii).

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detect_system()

int detect_system ( intfstream_t fd,
const char **  system_name 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdi_find_track()

int gdi_find_track ( const char *  gdi_path,
bool  first,
char *  track_path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gdi_next_file()

bool gdi_next_file ( intfstream_t fd,
const char *  gdi_path,
char *  path,
uint64_t  max_len 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_token()

static int64_t get_token ( intfstream_t fd,
char *  token,
uint64_t  max_len 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ intfstream_get_file_size()

static int64_t intfstream_get_file_size ( const char *  path)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_cand()

static bool update_cand ( int64_t cand_index,
int64_t last_index,
uint64_t largest,
char *  last_file,
uint64_t offset,
uint64_t size,
char *  track_path,
uint64_t  max_len 
)
static
Here is the caller graph for this function:

Variable Documentation

◆ MAGIC_NUMBERS

struct magic_entry MAGIC_NUMBERS[]
static
Initial value:
= {
{ 0, "ps1", "\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x02\x00\x02\x00"},
{ 0x838840, "pcecd", "\x82\xb1\x82\xcc\x83\x76\x83\x8d\x83\x4f\x83\x89\x83\x80\x82\xcc\x92"},
{ 0, "scd", "\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x00\x00\x02\x00\x01\x53"},
{ 0x000400, "gc", "\x00\x01\xC7\x04\x80\x28\x00\x60\x00\x00\x00\x00\x00\x00\x00\x00\x00"},
{ 0, NULL, NULL}
}
#define NULL
Pointer to 0.
Definition: gctypes.h:65