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
9namespace yaze {
10
12 uint32_t index = 0;
13 uint32_t pc_offset = 0;
14 uint32_t snes_address = 0;
15 bool is_compressed = 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
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
std::array< SheetDiagnostics, 223 > sheets
std::vector< uint8_t > first_bytes