N64FlashcartMenu
Loading...
Searching...
No Matches
cpakfs_utils.h
1#ifndef CPAKFS_UTILS__H__
2#define CPAKFS_UTILS__H__
3
4#include <stdbool.h>
5#include <libdragon.h>
6#include <stddef.h>
7
8#define FS_BLOCK_DIVIDER (8 * 32)
9#define MAX_NUM_NOTES 16
10
11typedef struct {
12 char gamecode[5]; // +1 for '\0'
13 char pubcode[5]; // +1 for '\0'
14 char filename[17]; // +1 for '\0'
15 char ext[5]; // +1 for '\0'
17
18extern const char * const CPAK_MOUNT_ARRAY[4];
19
20int get_block_size_from_fs_path(const char *filename_cpak);
21void unmount_all_cpakfs();
22int mount_cpakfs(int controller);
23bool has_cpak(int controller);
24int get_file_size_from_fs_path(const char *filename_cpak);
25int extract_title_from_absolute_path(const char *path, char *outbuf, size_t outbuf_size);
26int parse_cpakfs_fullname(const char *fullname, cpakfs_path_strings_t *out);
27int file_exists_full(const char *full_mounted_path);
28int inc_index_note(int current_index);
29int dec_index_note(int current_index);
30int pick_unique_fullname_with_mount(const char *mount_prefix,
31 const char *desired_name,
32 char *out_fullpath, size_t outsz,
33 int (*exists_fullpath)(const char *fullpath));
34
35
36
37#endif // CPAKFS_UTILS__H__
Definition cpakfs_utils.h:11