-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdebug.h
100 lines (90 loc) · 2.35 KB
/
debug.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#ifndef _debug_h_
#define _debug_h_
/** \file
* Debug macros and functions.
*/
/*
* Copyright (C) 2009 Trammell Hudson <[email protected]>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
/** Debug messages and debug manager */
extern void
DebugMsg(
int subsys,
int level,
const char * fmt,
...
);
extern const char * dm_names[];
// To find these, look at the dm_names table at 0x292C
// Subtract the pointer from 0x292c and divide by 4
#define DM_SETPROP 0
#define DM_PRP 1
#define DM_PROPAD 2
#define DM_INTCOM 3
#define DM_WINSYS 4
#define DM_CTRLSRV 5
#define DM_LVCAF 6
#define DM_LVAF 7
#define DM_LVCAE 8
#define DM_LVAE 9
#define DM_LVFD 10
#define DM_LVMD 11
#define DM_LVCLR 12
#define DM_LVWB 13
#define DM_DP 14
#define DM_MAC 15
#define DM_CRP 16
#define DM_UPDC 17
#define DM_SYS 18
#define DM_RD 19
#define DM_AUDIO 20
#define DM_ENGP 0x16
#define DM_MOVR 48
#define DM_MAGIC 50 // Replaces PTPCOM with MAGIC
#define DM_LVCDEV 61
#define DM_RSC 0x80
#define DM_DISP 64
#define DM_LV 86
#define DM_LVCFG 89
struct dm_state
{
const char * type; // off_0x00
uint32_t off_0x04;
uint32_t off_0x08;
uint32_t off_0x0c;
void * signature; // off_0x10
uint32_t unknown[ (788 - 0x14)/4 ];
};
extern struct dm_state * dm_state_ptr;
extern struct state_object * dm_state_object;
extern void dmstart( void ); // post the start event
extern void dmStart( void ); // initiate the start
extern void dmstop( void );
extern void dumpentire( void );
extern void dumpf( void );
extern void dm_set_store_level( uint32_t class, uint32_t level );
extern void
dm_event_dispatch(
int input,
int dwParam,
int dwEventId
);
extern void
debug_init( void );
#endif