#include <list>
#include <memory>
#include <vector>
#include <libmc.h>
#include "os/string.h"
#include "script/dataarray.h"
Go to the source code of this file.
|
| constexpr int | kMemcardDirFileSize = 2 |
| | The size of the file named after its directory that every save directory receives.
|
| DataArray * | g_pMemcardConfig |
| | The mc section of the metagame system configuration.
|
| std::unique_ptr< char[]> | g_pMemcardBuffer |
| | The buffer a save is serialised into and a load is read into, of buff_size bytes.
|
| int | g_nMemcardBufferSize |
| | The size of g_pMemcardBuffer, the buff_size of the configuration.
|
| std::unique_ptr< char[]> | g_pMemcardIcon |
| | The icon file every save directory receives, read from the icon_file of the disc's mc directory.
|
| int | g_nMemcardIconSize |
| | The size of g_pMemcardIcon.
|
| int | g_bMemcardDirExists |
| | Non-zero when the directory the next save goes into exists already.
|
| int | g_nMemcardDirKilobytes |
| | The kilobytes a new save directory needs besides the save itself.
|
| int | g_nMaxRemixesPerDir |
| | The remixes one remix directory may include, max_remixes_perdir.
|
| int | g_nMaxRemixDirs |
| | The remix directories a card may include, max_remix_dirs.
|
| int | g_nMaxRemixes |
| | The remixes a card may include, max_remixes.
|
| const char * | g_pszRemixExt |
| | The extension of a remix file, remix_ext.
|
| const char * | g_pszFreqExt |
| | The extension of a Freq file, freq_ext.
|
| const char * | g_pszMemcardBaseDir |
| | The prefix of every save directory, base_dir.
|
| String | g_RemixPath |
| | The remix file the last search found, as a path below the card root.
|
| String | g_MemcardPath |
| | The save directory the current work addresses.
|
| std::list< String > | g_RemixNames |
| | The remix files the last listing found, as paths below the card root.
|
| sceMcIconSys | g_MemcardIconSys |
| | The icon.sys every save directory receives.
|
◆ LoadMemcardConfig()
| void LoadMemcardConfig |
( |
| ) |
|
Read the memory card configuration, the icon file, and the icon description.
- Ghidra address:
- NTSC-U/C: 0x0015d2c0
- Ghidra address:
- PAL: 0x0015ead8
◆ FreeMemcardConfig()
| void FreeMemcardConfig |
( |
| ) |
|
Release the buffers LoadMemcardConfig() allocated.
- Ghidra address:
- NTSC-U/C: 0x0015d758
- Ghidra address:
- PAL: 0x0015ef70
◆ GetRemixDirName()
| const char * GetRemixDirName |
( |
int | nIndex | ) |
|
Report the name of a remix directory.
- Parameters
-
- Returns
- The name, in the shared FormatString() buffer.
- Ghidra address:
- NTSC-U/C: 0x0015d258
- Ghidra address:
- PAL: 0x0015ea48
◆ BytesToKilobytes()
| int BytesToKilobytes |
( |
int | nBytes | ) |
|
Report the kilobytes a number of bytes occupies.
- Parameters
-
| nBytes | The number of bytes. |
- Returns
- The kilobytes, rounded up.
- Ghidra address:
- NTSC-U/C: 0x0015d2b0
- Ghidra address:
- PAL: 0x0015eaa0
◆ kMemcardDirFileSize
| int kMemcardDirFileSize = 2 |
|
constexpr |
The size of the file named after its directory that every save directory receives.
◆ g_pMemcardConfig
The mc section of the metagame system configuration.
- Ghidra address:
- NTSC-U/C: 0x003af870
- Ghidra address:
- PAL: 0x0042e70c
◆ g_pMemcardBuffer
| std::unique_ptr<char[]> g_pMemcardBuffer |
|
extern |
The buffer a save is serialised into and a load is read into, of buff_size bytes.
- Ghidra address:
- NTSC-U/C: 0x003af858
- Ghidra address:
- PAL: 0x0042e6f0
◆ g_nMemcardBufferSize
The size of g_pMemcardBuffer, the buff_size of the configuration.
- Ghidra address:
- NTSC-U/C: 0x003af85c
- Ghidra address:
- PAL: 0x0042e6f4
◆ g_pMemcardIcon
| std::unique_ptr<char[]> g_pMemcardIcon |
|
extern |
The icon file every save directory receives, read from the icon_file of the disc's mc directory.
- Ghidra address:
- NTSC-U/C: 0x003af860
- Ghidra address:
- PAL: 0x0042e6fc
◆ g_nMemcardIconSize
The size of g_pMemcardIcon.
- Ghidra address:
- NTSC-U/C: 0x003af864
- Ghidra address:
- PAL: 0x0042e700
◆ g_bMemcardDirExists
Non-zero when the directory the next save goes into exists already.
- Ghidra address:
- NTSC-U/C: 0x003af868
- Ghidra address:
- PAL: 0x0042e704
◆ g_nMemcardDirKilobytes
| int g_nMemcardDirKilobytes |
|
extern |
The kilobytes a new save directory needs besides the save itself.
- Ghidra address:
- NTSC-U/C: 0x003af86c
- Ghidra address:
- PAL: 0x0042e708
◆ g_nMaxRemixesPerDir
The remixes one remix directory may include, max_remixes_perdir.
- Ghidra address:
- NTSC-U/C: 0x003af874
- Ghidra address:
- PAL: 0x0042e710
◆ g_nMaxRemixDirs
The remix directories a card may include, max_remix_dirs.
- Ghidra address:
- NTSC-U/C: 0x003af878
- Ghidra address:
- PAL: 0x0042e714
◆ g_nMaxRemixes
The remixes a card may include, max_remixes.
- Ghidra address:
- NTSC-U/C: 0x003af87c
- Ghidra address:
- PAL: 0x0042e718
◆ g_pszRemixExt
| const char* g_pszRemixExt |
|
extern |
The extension of a remix file, remix_ext.
- Ghidra address:
- NTSC-U/C: 0x003af880
- Ghidra address:
- PAL: 0x0042e71c
◆ g_pszFreqExt
The extension of a Freq file, freq_ext.
- Ghidra address:
- NTSC-U/C: 0x003af884
- Ghidra address:
- PAL: 0x0042e720
◆ g_pszMemcardBaseDir
| const char* g_pszMemcardBaseDir |
|
extern |
The prefix of every save directory, base_dir.
- Ghidra address:
- NTSC-U/C: 0x003af888
- Ghidra address:
- PAL: 0x0042e724
◆ g_RemixPath
The remix file the last search found, as a path below the card root.
- Ghidra address:
- NTSC-U/C: 0x00436340
- Ghidra address:
- PAL: 0x004d30d8
◆ g_MemcardPath
The save directory the current work addresses.
- Ghidra address:
- NTSC-U/C: 0x00436358
- Ghidra address:
- PAL: 0x004d3108
◆ g_RemixNames
| std::list<String> g_RemixNames |
|
extern |
The remix files the last listing found, as paths below the card root.
- Ghidra address:
- NTSC-U/C: 0x00436370
- Ghidra address:
- PAL: 0x004d3120
◆ g_MemcardIconSys
| sceMcIconSys g_MemcardIconSys |
|
extern |