Functions | |
| bool | HasInternalHeaderAt (const uint8_t *data, size_t size, size_t offset) |
| bool | HasInternalHeader (const uint8_t *data, size_t size, size_t base) |
| void | MaybeStripCopierHeader (std::vector< uint8_t > &rom_data, std::vector< uint8_t > &header, CopierHeaderReason &reason) |
| std::string | MakeSafeTimestamp (std::time_t now_c) |
| absl::StatusOr< std::filesystem::path > | GetAvailableBackupPath (const std::filesystem::path &requested_path) |
| void | BestEffortFsyncFile (const std::filesystem::path &path) |
| void | BestEffortFsyncParentDir (const std::filesystem::path &file_path) |
| absl::Status | CreateRequiredBackup (const std::filesystem::path &source_path, const std::filesystem::path &requested_backup_path) |
| absl::StatusOr< std::filesystem::path > | WriteExclusiveRomTemp (const std::filesystem::path &target_path, const std::vector< uint8_t > &bytes) |
Variables | |
| constexpr size_t | kCopierHeaderAlignment = 0x8000 |
| SNES ROM images are multiples of 32 KB; a copier header adds 0x200. | |
| constexpr size_t | kLoRomInternalHeader = 0x7FC0 |
| constexpr size_t | kHiRomInternalHeader = 0xFFC0 |
| std::atomic< bool > | g_fail_rom_staging_for_testing {false} |
| bool yaze::anonymous_namespace{rom.cc}::HasInternalHeaderAt | ( | const uint8_t * | data, |
| size_t | size, | ||
| size_t | offset ) |
Definition at line 59 of file rom.cc.
References HasInternalHeaderAt().
Referenced by HasInternalHeader(), and HasInternalHeaderAt().

| bool yaze::anonymous_namespace{rom.cc}::HasInternalHeader | ( | const uint8_t * | data, |
| size_t | size, | ||
| size_t | base ) |
Definition at line 69 of file rom.cc.
References HasInternalHeader(), HasInternalHeaderAt(), kHiRomInternalHeader, and kLoRomInternalHeader.
Referenced by HasInternalHeader().

| void yaze::anonymous_namespace{rom.cc}::MaybeStripCopierHeader | ( | std::vector< uint8_t > & | rom_data, |
| std::vector< uint8_t > & | header, | ||
| CopierHeaderReason & | reason ) |
Definition at line 74 of file rom.cc.
References yaze::CopierHeaderReasonName(), yaze::DetectCopierHeader(), yaze::kCopierHeaderSize, yaze::kNone, LOG_INFO, and MaybeStripCopierHeader().
Referenced by MaybeStripCopierHeader().

| std::string yaze::anonymous_namespace{rom.cc}::MakeSafeTimestamp | ( | std::time_t | now_c | ) |
Definition at line 88 of file rom.cc.
References MakeSafeTimestamp().
Referenced by MakeSafeTimestamp().

| absl::StatusOr< std::filesystem::path > yaze::anonymous_namespace{rom.cc}::GetAvailableBackupPath | ( | const std::filesystem::path & | requested_path | ) |
Definition at line 116 of file rom.cc.
References GetAvailableBackupPath().
Referenced by CreateRequiredBackup(), and GetAvailableBackupPath().

| void yaze::anonymous_namespace{rom.cc}::BestEffortFsyncFile | ( | const std::filesystem::path & | path | ) |
Definition at line 335 of file rom.cc.
References BestEffortFsyncFile().
Referenced by BestEffortFsyncFile(), and CreateRequiredBackup().

| void yaze::anonymous_namespace{rom.cc}::BestEffortFsyncParentDir | ( | const std::filesystem::path & | file_path | ) |
Definition at line 357 of file rom.cc.
References BestEffortFsyncParentDir().
Referenced by BestEffortFsyncParentDir(), and CreateRequiredBackup().

| absl::Status yaze::anonymous_namespace{rom.cc}::CreateRequiredBackup | ( | const std::filesystem::path & | source_path, |
| const std::filesystem::path & | requested_backup_path ) |
Definition at line 142 of file rom.cc.
References BestEffortFsyncFile(), BestEffortFsyncParentDir(), CreateRequiredBackup(), and GetAvailableBackupPath().
Referenced by CreateRequiredBackup().

| absl::StatusOr< std::filesystem::path > yaze::anonymous_namespace{rom.cc}::WriteExclusiveRomTemp | ( | const std::filesystem::path & | target_path, |
| const std::vector< uint8_t > & | bytes ) |
Definition at line 193 of file rom.cc.
References g_fail_rom_staging_for_testing, and WriteExclusiveRomTemp().
Referenced by WriteExclusiveRomTemp().

|
constexpr |
|
constexpr |
Definition at line 54 of file rom.cc.
Referenced by HasInternalHeader().
|
constexpr |
Definition at line 55 of file rom.cc.
Referenced by HasInternalHeader().
| std::atomic<bool> yaze::anonymous_namespace{rom.cc}::g_fail_rom_staging_for_testing {false} |
Definition at line 191 of file rom.cc.
Referenced by WriteExclusiveRomTemp().