22 "BASLUS-01436DMW3-USA",
23 "BESLPS-99999DMW3-ENG",
24 "BESLPS-99999DMW3-FRA",
25 "BESLPS-99999DMW3-ITA",
26 "BESLPS-99999DMW3-GER",
27 "BESLPS-99999DMW3-SPN",
33 "BISLPS-03446DMW3-JPN",
34 "BASLUS-01436DMW3-USA",
35 "BISLPS-99999DMW3-JPN",
39#if VERSION_US || VERSION_JP
49 "BASLUS-01436DMW3-USA",
50 "BESLES-03936DMW3-EUR",
192 if (buf ==
NULL || size == 0) {
273 if (buf ==
NULL || size == 0) {
289 switch (section & 0xFF) {
448 for (i = 0; i < size; i++) {
451 return ((expected ^ sum) & 0xFF) == 0;
460 for (i = 0; i < size; i++) {
char STR_ALL_FILES[16]
In the small data (.sdata) between system/main.c's and text/cursor.c's.
s32 LANGUAGE
The European version's settings, in the small data (.sdata) between file/file_table....
int strlen(const char *)
SDK functions declared here rather than from their PsyQ headers: strings.h and memory....
char * strcpy(char *dst, const char *src)
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
u8 computeChecksum(void *data, s32 size)
The XOR of every byte, which verifyChecksum checks.
const char SAVE_FILE_NAME_JP[24]
s32 writeSave(s32 port, void *buf, s32 size, s32 section)
Writes a section (as readSave; section 0 takes the offset from bits 8 and up)
MemCardFuncs MEMCARD_FUNCS
void setSaveHeader(char *title, CardClut *clut, s32 count, void **icons)
The save file header: title (Shift-JIS), icon CLUT and 1-3 icon frames.
s32 checkMemCard(s32 port)
Checks whether a card is in port port (MemCardExist)
s32 formatMemCard(s32 port)
Formats an unformatted card.
s32 readSave(s32 port, void *buf, s32 size, s32 section)
Reads a section of the save (SAVE_SECTION_*, then 2-4 for the data), a sector a call.
s32 listSaves(s32 port)
Reads the card's directory into MEMCARD.files.
void setSaveFileName(void)
s32 memCardCommand(s32 port, s32 cmd)
Reads the directory, creates the save file, formats or unformats (MEMCARD_OP_*)
void initMemCard(void)
Starts libmcrd and sets up MEMCARD: the save file name and the section sizes.
s32 syncMemCard(void)
MemCardSync, retrying a failed command up to maxRetries times.
const char SAVE_FILE_NAMES[2][24]
s32 verifyChecksum(void *data, s32 size, char expected)
XOR of every byte.
s32 unformatMemCard(void)
memCardCommand's MEMCARD_OP_UNFORMAT, left out: always fails as if there were no card
s32 MEMCARD_SYNC_CMDS[MEMCARD_OP_UNFORMAT+1]
The commands of memCardCommand's operations.
s32 acceptMemCard(s32 port)
Checks a card in port port in full, finding out whether it is new or unformatted (MemCardAccept)
s32 createSave(s32 port)
Creates the save file on the card.
long MemCardCreateFile(long chan, const char *file, long blocks)
long MemCardAccept(long chan)
#define CARD_ERR_NEW_CARD
#define SAVE_BLOCKS
The blocks of the save file.
#define CARD_SECTOR_SIZE
The bytes the card reads or writes at once: one sector.
void MemCardInit(long val)
The memory card library, declared here rather than from libmcrd.h, which takes the buffers as u_long ...
long MemCardReadFile(long chan, const char *file, void *adrs, long ofs, long bytes)
#define CARD_HEADER_ICONS
CardHeader.type: this flag plus the icon frame count.
long MemCardGetDirentry(long chan, char *name, CardDirEntry *dir, long *files, long ofs, long max)
long MemCardUnformat(long chan)
#define CARD_ERR_UNFORMATTED
long MemCardExist(long chan)
#define SAVE_MAX_ICONS
The icon frames a save may have.
long MemCardWriteFile(long chan, const char *file, void *adrs, long ofs, long bytes)
#define CARD_MAX_FILES
The files MEMCARD lists from a card's directory.
long MemCardSync(long mode, long *cmds, u_long *result)
#define CARD_ERR_NONE
MemCard.result, as libmcrd's MemCardSync reports it (McErr*), plus CARD_ERR_NOT_STARTED when the comm...
long MemCardFormat(long chan)
#define CARD_ERR_NOT_STARTED
Memory card save header (first CARD_SECTOR_SIZE bytes of a save)
void(* zero)(void *ptr, s32 size)
The memory card functions (MEMCARD_FUNCS); like MemCard's operations, the card ones return 0 while th...
Memory card access (MEMCARD), one step per call: every operation returns 0 while it runs,...
long fileCount
long: MemCardGetDirentry writes it
void * icons[3]
each frame's image (setSaveHeader)
s32 restart
the command failed and must be reissued