CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/GPU/Debugger/RecordFormat.h
Views: 1401
1
// Copyright (c) 2017- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Common/CommonTypes.h"
21
22
namespace GPURecord {
23
24
struct Header {
25
char magic[8];
26
uint32_t version;
27
char gameID[9];
28
uint8_t pad[3];
29
};
30
31
static const char * const HEADER_MAGIC = "PPSSPPGE";
32
// Version 1: Uncompressed
33
// Version 2: Uses snappy
34
// Version 3: Adds FRAMEBUF0-FRAMEBUF9
35
// Version 4: Expanded header with game ID
36
// Version 5: Uses zstd
37
// Version 6: Corrects dirty VRAM flag
38
static const int VERSION = 6;
39
static const int MIN_VERSION = 2;
40
41
enum class CommandType : u8 {
42
INIT = 0,
43
REGISTERS = 1,
44
VERTICES = 2,
45
INDICES = 3,
46
CLUT = 4,
47
TRANSFERSRC = 5,
48
MEMSET = 6,
49
MEMCPYDEST = 7,
50
MEMCPYDATA = 8,
51
DISPLAY = 9,
52
CLUTADDR = 10,
53
EDRAMTRANS = 11,
54
55
TEXTURE0 = 0x10,
56
TEXTURE1 = 0x11,
57
TEXTURE2 = 0x12,
58
TEXTURE3 = 0x13,
59
TEXTURE4 = 0x14,
60
TEXTURE5 = 0x15,
61
TEXTURE6 = 0x16,
62
TEXTURE7 = 0x17,
63
64
FRAMEBUF0 = 0x18,
65
FRAMEBUF1 = 0x19,
66
FRAMEBUF2 = 0x1A,
67
FRAMEBUF3 = 0x1B,
68
FRAMEBUF4 = 0x1C,
69
FRAMEBUF5 = 0x1D,
70
FRAMEBUF6 = 0x1E,
71
FRAMEBUF7 = 0x1F,
72
};
73
74
#pragma pack(push, 1)
75
76
struct Command {
77
CommandType type;
78
u32 sz;
79
u32 ptr;
80
};
81
82
#pragma pack(pop)
83
84
};
85
86