-
Notifications
You must be signed in to change notification settings - Fork 72
/
emuthread.h
67 lines (52 loc) · 1.4 KB
/
emuthread.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
#ifndef EMUTHREAD_H
#define EMUTHREAD_H
#include <QThread>
class EmuThread : public QThread
{
Q_OBJECT
public:
explicit EmuThread(QObject *parent = 0);
void doStuff(bool wait);
void throttleTimerWait(unsigned int usec);
QString boot1, flash;
unsigned int port_gdb = 0, port_rdbg = 0;
signals:
// State
void started(bool success); // Not called on resume
void resumed(bool success);
void suspended(bool success);
void stopped();
void paused(bool b);
// I/O
void serialChar(char c);
// Status
void isBusy(bool busy);
void statusMsg(QString str);
void speedChanged(double value);
void usblinkChanged(bool state);
void turboModeChanged(bool state);
// Debugging
void debugStr(QString str);
void debuggerEntered(bool state);
void debugInputRequested(bool b);
public slots:
virtual void run() override;
// State
void setPaused(bool is_paused);
bool stop();
void reset();
bool resume(QString path);
void suspend(QString path);
// Emulation settings
void setTurboMode(bool state);
void toggleTurbo();
// Debugging
void enterDebugger();
void debuggerInput(QString str);
private:
bool enter_debugger = false;
bool is_paused = false, do_suspend = false, do_resume = false;
std::string debug_input, snapshot_path;
};
extern EmuThread emu_thread;
#endif // EMUTHREAD_H