-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
70 lines (53 loc) · 1.36 KB
/
main.cpp
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
#include "qt/qpspe4all.h"
#include <QtGui>
#include <QApplication>
#include "emulator/types.h"
#include "emulator/memory.h"
#include "emulator/emulator.h"
#include "emulator/processor.h"
#include "emulator/allegrex.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setStyle("cleanlooks");
#if 0
if (!QSystemTrayIcon::isSystemTrayAvailable())
{
QMessageBox::critical
(
0,
QObject::tr("Systray"),
QObject::tr("There is no system tray on this system.")
);
return 1;
}
QApplication::setQuitOnLastWindowClosed(false);
#endif
#if 0
Allegrex::create_instructions_directory();
Allegrex::create_interpreter_directory();
Allegrex::create_disassembler_directory();
QPspe4all w;
w.show();
#else
if (true/*emulator.check_integrity()*/)
{
QPspe4all w;
w.show();
psp::memw(0x00010000) = 0xDEADBEEF;
psp::memw(0x04000000) = 0xDEADC0DE;
psp::memw(0x08000000) = 0xE117C0DE;
QStringList list;
#define IDEF(n, m, s, x) list.append(QString("%1/%2 : %3").arg(uint(s), 8, 16, QChar('0')).arg(uint(m), 8, 16, QChar('0')).arg(Allegrex::decode_instruction(s)->opcode_name()));
#include "emulator/allegrex/allegrex.def"
#undef IDEF
QListWidget l;
l.setFont(QFont("Terminal"));
l.insertItems(0, list);
l.show();
return a.exec();
}
#endif
return a.exec();
return 1;
}