yaze
0.3.2
Link to the Past ROM Editor
Loading...
Searching...
No Matches
rom_diagnostics.h
Go to the documentation of this file.
1
#ifndef YAZE_APP_ROM_DIAGNOSTICS_H
2
#define YAZE_APP_ROM_DIAGNOSTICS_H
3
4
#include <array>
5
#include <cstdint>
6
#include <string>
7
#include <vector>
8
9
namespace
yaze
{
10
11
struct
SheetDiagnostics
{
12
uint32_t
index
= 0;
13
uint32_t
pc_offset
= 0;
14
uint32_t
snes_address
= 0;
15
bool
is_compressed
=
false
;
16
bool
decompression_succeeded
=
false
;
17
int
decomp_size_param
= -1;
// The size passed to DecompressV2 (init to -1)
18
size_t
actual_decomp_size
= 0;
// The size returned
19
std::vector<uint8_t>
first_bytes
;
// First 8 bytes of raw data
20
};
21
22
struct
GraphicsLoadDiagnostics
{
23
size_t
rom_size
= 0;
24
bool
header_stripped
=
false
;
25
bool
checksum_valid
=
false
;
26
27
// Pointer table values
28
uint32_t
ptr1_loc
= 0;
29
uint32_t
ptr2_loc
= 0;
30
uint32_t
ptr3_loc
= 0;
31
32
// Sheet specific diagnostics
33
std::array<SheetDiagnostics, 223>
sheets
;
34
35
// Pattern detection flags
36
bool
size_zero_regression
=
false
;
// DecompressV2 called with size=0
37
bool
header_misalignment
=
false
;
// Pointer tables seem offset by 512
38
bool
all_sheets_0xFF
=
false
;
// Symptom detection
39
40
std::string
ToJson
()
const
;
41
void
Analyze
();
// Sets the flags
42
};
43
44
}
// namespace yaze
45
46
#endif
// YAZE_APP_ROM_DIAGNOSTICS_H
yaze
Definition
application.cc:18
yaze::GraphicsLoadDiagnostics
Definition
rom_diagnostics.h:22
yaze::GraphicsLoadDiagnostics::ptr2_loc
uint32_t ptr2_loc
Definition
rom_diagnostics.h:29
yaze::GraphicsLoadDiagnostics::header_misalignment
bool header_misalignment
Definition
rom_diagnostics.h:37
yaze::GraphicsLoadDiagnostics::Analyze
void Analyze()
Definition
rom_diagnostics.cc:10
yaze::GraphicsLoadDiagnostics::header_stripped
bool header_stripped
Definition
rom_diagnostics.h:24
yaze::GraphicsLoadDiagnostics::sheets
std::array< SheetDiagnostics, 223 > sheets
Definition
rom_diagnostics.h:33
yaze::GraphicsLoadDiagnostics::ToJson
std::string ToJson() const
Definition
rom_diagnostics.cc:35
yaze::GraphicsLoadDiagnostics::ptr1_loc
uint32_t ptr1_loc
Definition
rom_diagnostics.h:28
yaze::GraphicsLoadDiagnostics::checksum_valid
bool checksum_valid
Definition
rom_diagnostics.h:25
yaze::GraphicsLoadDiagnostics::all_sheets_0xFF
bool all_sheets_0xFF
Definition
rom_diagnostics.h:38
yaze::GraphicsLoadDiagnostics::rom_size
size_t rom_size
Definition
rom_diagnostics.h:23
yaze::GraphicsLoadDiagnostics::ptr3_loc
uint32_t ptr3_loc
Definition
rom_diagnostics.h:30
yaze::GraphicsLoadDiagnostics::size_zero_regression
bool size_zero_regression
Definition
rom_diagnostics.h:36
yaze::SheetDiagnostics
Definition
rom_diagnostics.h:11
yaze::SheetDiagnostics::first_bytes
std::vector< uint8_t > first_bytes
Definition
rom_diagnostics.h:19
yaze::SheetDiagnostics::is_compressed
bool is_compressed
Definition
rom_diagnostics.h:15
yaze::SheetDiagnostics::pc_offset
uint32_t pc_offset
Definition
rom_diagnostics.h:13
yaze::SheetDiagnostics::actual_decomp_size
size_t actual_decomp_size
Definition
rom_diagnostics.h:18
yaze::SheetDiagnostics::decomp_size_param
int decomp_size_param
Definition
rom_diagnostics.h:17
yaze::SheetDiagnostics::index
uint32_t index
Definition
rom_diagnostics.h:12
yaze::SheetDiagnostics::decompression_succeeded
bool decompression_succeeded
Definition
rom_diagnostics.h:16
yaze::SheetDiagnostics::snes_address
uint32_t snes_address
Definition
rom_diagnostics.h:14
src
rom
rom_diagnostics.h
Generated by
1.10.0