OXYGENHUB
# bd65c0cc08c7 x16-emulator / src / debugger.h
1.6 KiB · Objective-C · last changed chore(): initial commit 15 days ago source blame history raw
03a3459e Andy McCall 1
// *******************************************************************************************
2
// *******************************************************************************************
3
//
4
//		File:		debugger.h
5
//		Date:		5th September 2019
6
//		Purpose:	Debugger header
7
//		Author:		Paul Robson ([email protected])
8
//
9
// *******************************************************************************************
10
// *******************************************************************************************
11
12
#ifndef _DEBUGGER_H
13
#define _DEBUGGER_H
14
15
#include <SDL.h>
16
17
extern int showDebugOnRender;
18
19
struct breakpoint {
20
	int pc;
21
	uint8_t bank;
22
	int x16Bank;
23
};
24
25
void DEBUGRenderDisplay(int width,int height);
26
void DEBUGBreakToDebugger(void);
27
int  DEBUGGetCurrentStatus(void);
28
void DEBUGSetBreakPoint(struct breakpoint newBreakPoint);
29
void DEBUGInitUI(SDL_Renderer *pRenderer);
30
void DEBUGFreeUI();
31
32
#define DBG_WIDTH 		(60)									// Char cells across
33
#define DBG_HEIGHT 		(60)
34
35
#define DBG_ASMX 		(1)										// Disassembly starts here
36
#define DBG_LBLX 		(26) 									// Debug labels start here
37
#define DBG_DATX		(30)									// Debug data starts here.
38
#define DBG_STCK		(40)									// Debug stack starts here.
39
#define DBG_MEMX 		(1)										// Memory Display starts here
40
#define DBG_ZP_REG     (45)                             // Zero page registers start here
41
#define DBG_VERA_REGX   (45)                             // VERA registers start here
42
43
#define DMODE_STOP 		(0)										// Debugger is waiting for action.
44
#define DMODE_STEP 		(1)										// Debugger is doing a single step
45
#define DMODE_RUN 		(2)										// Debugger is running normally.
46
47
#endif