-
Notifications
You must be signed in to change notification settings - Fork 3
/
eggs.c
246 lines (234 loc) · 11.4 KB
/
eggs.c
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
//This file implements certain easter eggs found within Command Post
//other eggs may be found elsewhere in the source code
//look for NO_EASTER_EGGS compile time conditionals
// $Id: eggs.c 24 2004-08-12 21:10:04Z dietsche $
#include "tiams.h"
#include "KFLASH.h"
#include "eggs.h"
#ifndef NO_EASTER_EGGS
static const unsigned char redpillneo[1910] = {
0x20,0x78,0x00,0xc8,0x70,0x01,0x22,0x08,0x02,0x81,
0x00,0x40,0x00,0x00,0x66,0x10,0x42,0x40,0x22,0x68,
0x00,0xbc,0x0c,0x29,0x00,0xc8,0x00,0x02,0x65,0x02,
0x70,0x03,0x43,0xfa,0x00,0x24,0x32,0x80,0x0c,0xa8,
0x00,0x00,0x03,0xcc,0xff,0xfc,0x64,0x0e,0x48,0x7a,
0x00,0x16,0x20,0x68,0x03,0x98,0x4e,0x90,0x58,0x8f,
0x4e,0x75,0x48,0x55,0x61,0x20,0x2a,0x5f,0x4e,0x75,
0xff,0xff,0x41,0x4d,0x53,0x20,0x31,0x2e,0x30,0x31,
0x20,0x6f,0x72,0x20,0x68,0x69,0x67,0x68,0x65,0x72,
0x20,0x6e,0x65,0x65,0x64,0x65,0x64,0x00,0x2a,0x78,
0x00,0xc8,0x4e,0x56,0xd2,0xb4,0x48,0xe7,0x1f,0x38,
0x41,0xfa,0x03,0x1c,0x4e,0x90,0x2d,0x48,0xd2,0xb6,
0x42,0x46,0x70,0x00,0x30,0x06,0x41,0xf6,0x08,0x00,
0x42,0x28,0xd2,0xc4,0x52,0x46,0x0c,0x46,0x00,0x3b,
0x63,0xec,0x41,0xee,0xd3,0x00,0x2d,0x48,0xd2,0xba,
0x2f,0x08,0x48,0x78,0x4c,0x00,0x45,0xfa,0x02,0x3a,
0x4e,0x92,0x26,0x0e,0x06,0x83,0xff,0xff,0xf1,0x00,
0x2f,0x03,0x48,0x78,0x4c,0x00,0x4e,0x92,0x48,0x6e,
0xe2,0x00,0x48,0x78,0x4c,0x00,0x4e,0x92,0x41,0xfa,
0x02,0xd6,0x4e,0x90,0x3f,0x3c,0x00,0x7f,0x3f,0x3c,
0x00,0xef,0x2f,0x03,0x20,0x6d,0x06,0x88,0x4e,0x90,
0x4f,0xef,0x00,0x20,0x42,0x67,0x20,0x6d,0x06,0x3c,
0x4e,0x90,0x38,0x40,0x54,0x8f,0x97,0xcb,0x42,0x46,
0x45,0xfa,0x06,0x54,0x4e,0x92,0x3e,0x00,0x4e,0x92,
0x48,0xc0,0x81,0xfc,0x00,0xf0,0x26,0x00,0x48,0x43,
0x4a,0x43,0x6d,0x00,0x01,0x7e,0xe4,0x43,0x3a,0x03,
0xe5,0x4d,0x4e,0x92,0x0c,0x40,0x7e,0x2c,0x5e,0xc0,
0x18,0x00,0x48,0x84,0x44,0x44,0x02,0x83,0x00,0x00,
0xff,0xff,0x45,0xf6,0x38,0x00,0x10,0x2a,0xd2,0xc4,
0x67,0x00,0x01,0x16,0x53,0x00,0x15,0x40,0xd2,0xc4,
0x3f,0x3c,0x00,0x7f,0x3f,0x3c,0x00,0xef,0x48,0x6e,
0xe2,0x00,0x20,0x6d,0x06,0x88,0x4e,0x90,0x3f,0x3c,
0x00,0x01,0x55,0x8f,0x1f,0x47,0x00,0x01,0x42,0x67,
0x3f,0x05,0x20,0x6d,0x06,0x90,0x4e,0x90,0x3f,0x3c,
0x00,0x7f,0x3f,0x3c,0x00,0xef,0x48,0x6e,0xf1,0x00,
0x20,0x6d,0x06,0x88,0x4e,0x90,0x4f,0xef,0x00,0x18,
0x52,0x46,0x0c,0x46,0x00,0x46,0x65,0x00,0xff,0x76,
0x42,0x46,0x42,0xa7,0x41,0xfa,0x01,0x4a,0x4e,0x90,
0x32,0x3c,0x00,0x80,0x30,0x3a,0xfe,0xc4,0x66,0x02,
0x72,0x64,0x3f,0x01,0x28,0x0e,0x06,0x84,0xff,0xff,
0xf1,0x00,0x2f,0x04,0x41,0xfa,0x01,0xb6,0x4e,0x90,
0x32,0x3c,0x00,0x80,0x30,0x3a,0xfe,0xa6,0x66,0x02,
0x72,0x64,0x3f,0x01,0x26,0x0e,0x06,0x83,0xff,0xff,
0xe2,0x00,0x2f,0x03,0x41,0xfa,0x01,0x98,0x4e,0x90,
0x2f,0x3a,0x03,0x10,0x2f,0x04,0x45,0xfa,0x01,0x18,
0x4e,0x92,0x2f,0x3a,0x03,0x08,0x2f,0x03,0x4e,0x92,
0x4f,0xef,0x00,0x20,0x52,0x46,0x0c,0x46,0x00,0x04,
0x63,0x9c,0x42,0xa7,0x41,0xfa,0x00,0xe6,0x4e,0x90,
0x3f,0x3c,0x00,0x02,0x20,0x6d,0x03,0xcc,0x4e,0x90,
0x5c,0x8f,0x4a,0x40,0x67,0x06,0x4e,0x44,0x60,0x00,
0xfe,0xee,0x2f,0x2e,0xd2,0xb6,0x41,0xee,0xd2,0xbe,
0x2d,0x48,0xd2,0xc0,0x48,0x6e,0xd2,0xbe,0x20,0x6d,
0x0e,0xa8,0x4e,0x90,0x50,0x8f,0x4a,0x40,0x66,0x00,
0xfe,0xd0,0x32,0x2e,0xd2,0xbe,0x0c,0x41,0x01,0x0b,
0x67,0xd2,0x0c,0x41,0x11,0x0b,0x67,0xcc,0x30,0x3a,
0xfe,0x20,0x67,0x08,0x0c,0x41,0x21,0x0b,0x67,0xc0,
0x60,0x50,0x0c,0x41,0x41,0x0b,0x67,0xb8,0x60,0x48,
0x3f,0x3c,0x00,0x01,0x55,0x8f,0x1f,0x47,0x00,0x01,
0x42,0x67,0x3f,0x05,0x20,0x6d,0x06,0x90,0x4e,0x90,
0x50,0x8f,0x4a,0x44,0x67,0x00,0xff,0x14,0x30,0x0b,
0x52,0x4b,0x66,0x00,0xff,0x0c,0x15,0x7c,0x00,0x0a,
0xd2,0xc4,0x3f,0x3c,0x00,0x7f,0x3f,0x3c,0x00,0xef,
0x48,0x6e,0xe2,0x00,0x20,0x6d,0x06,0x88,0x4e,0x90,
0x42,0x67,0x60,0x00,0xfe,0xc8,0x56,0x43,0x60,0x00,
0xfe,0x80,0x3f,0x3c,0x00,0x02,0x20,0x6d,0x03,0xd0,
0x4e,0x90,0x20,0x6d,0x06,0x8c,0x4e,0x90,0x41,0xfa,
0x04,0x24,0x4e,0x90,0x48,0x78,0x4c,0x00,0x2f,0x2e,
0xd2,0xba,0x41,0xfa,0x00,0x36,0x4e,0x90,0x30,0x0c,
0x42,0x67,0x1f,0x40,0x00,0x01,0x20,0x6d,0x06,0x3c,
0x4e,0x90,0x4f,0xef,0x00,0x0c,0x4c,0xee,0x1c,0xf8,
0xd2,0x94,0x4e,0x5e,0x4e,0x75,0x22,0x2f,0x00,0x04,
0x70,0x00,0xb2,0x80,0x63,0x06,0x52,0x80,0xb2,0x80,
0x62,0xfa,0x4e,0x75,0x4e,0x71,0x00,0x00,0x48,0xe7,
0x80,0xc0,0x20,0x6f,0x00,0x10,0x22,0x6f,0x00,0x14,
0x70,0x09,0x48,0xe7,0x7f,0x3e,0x4c,0xd8,0x7c,0xfe,
0x48,0xd1,0x7c,0xfe,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x00,0x30,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x00,0x60,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x00,0x90,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x00,0xc0,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x00,0xf0,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x01,0x20,0x4c,0xd8,0x7c,0xfe,0x48,0xe9,
0x7c,0xfe,0x01,0x50,0x43,0xe9,0x01,0x80,0x51,0xc8,
0xff,0xac,0x4c,0xdf,0x7c,0xfe,0x4c,0xdf,0x03,0x01,
0x4e,0x75,0x00,0x00,0x34,0x2f,0x00,0x08,0x32,0x02,
0xe9,0x49,0x92,0x42,0x30,0x41,0x43,0xf0,0x88,0x00,
0xd3,0xef,0x00,0x04,0x41,0xe9,0xff,0xe2,0x55,0x42,
0x23,0x20,0x23,0x20,0x23,0x20,0x23,0x20,0x23,0x20,
0x23,0x20,0x23,0x20,0x33,0x20,0x51,0xca,0xff,0xee,
0x42,0xa1,0x42,0xa1,0x42,0xa1,0x42,0xa1,0x42,0xa1,
0x42,0xa1,0x42,0xa1,0x42,0x61,0x4e,0x75,0x70,0x06,
0x4e,0x49,0x4e,0x75,0x00,0x00,0x48,0xe7,0x3f,0x3e,
0x41,0xfa,0x00,0xd6,0x20,0xbc,0x00,0x00,0x00,0x00,
0x61,0x1a,0x41,0xfa,0x00,0x80,0x30,0x80,0x61,0x00,
0x00,0xc8,0x4c,0xdf,0x7c,0xfc,0x30,0x3a,0x01,0x0a,
0x66,0x00,0x02,0x90,0x70,0x00,0x4e,0x75,0x20,0x38,
0x00,0xc8,0x02,0x80,0x00,0x60,0x00,0x00,0x20,0x40,
0x70,0x00,0x22,0x68,0x01,0x04,0xd1,0xfc,0x00,0x01,
0x00,0x00,0xb3,0xc8,0x64,0x26,0x0c,0x51,0x00,0x16,
0x63,0x20,0x0c,0xa9,0x00,0x00,0x00,0x01,0x00,0x16,
0x67,0x16,0x4e,0x4c,0x46,0xfc,0x30,0x00,0x48,0x40,
0x40,0xc0,0x08,0x00,0x00,0x0c,0x67,0x16,0x48,0x40,
0x46,0xc0,0x70,0x00,0x41,0xfa,0x00,0x84,0x30,0xbc,
0x0f,0x08,0x31,0x7c,0x00,0x00,0x00,0x30,0x4e,0x75,
0x48,0x40,0x46,0xc0,0x70,0x01,0x41,0xfa,0x00,0x6e,
0x30,0xbc,0x1e,0x08,0x31,0x7c,0x0f,0x00,0x00,0x30,
0x4e,0x75,0x00,0x00,0x48,0xe7,0x80,0x80,0x41,0xfa,
0x00,0x3f,0x52,0x10,0x02,0x18,0x00,0x03,0x66,0x2a,
0x30,0x10,0x59,0x40,0x64,0x02,0x70,0x08,0x30,0x80,
0x0c,0x00,0x00,0x08,0x67,0x1a,0x41,0xfa,0x00,0x84,
0xd0,0x68,0xff,0xf2,0x90,0xc0,0x20,0x10,0xe6,0x88,
0x33,0xc0,0x00,0x60,0x00,0x10,0x41,0xfa,0x00,0x12,
0x52,0x90,0x4c,0xdf,0x01,0x01,0x4e,0xf9,0x00,0x00,
0x00,0x00,0x00,0x03,0x00,0x04,0x00,0x00,0x00,0x00,
0x4b,0xfa,0x00,0x48,0x4a,0x55,0x66,0x40,0x20,0x78,
0x00,0xc8,0x41,0xe8,0x02,0x48,0x48,0x78,0x1e,0x08,
0x24,0x50,0x4e,0x92,0x58,0x4f,0x3a,0xc0,0x67,0x2a,
0x42,0x55,0x3f,0x00,0x20,0x78,0x00,0xc8,0x41,0xe8,
0x02,0x58,0x24,0x50,0x4e,0x92,0x54,0x8f,0x20,0x08,
0x5e,0x80,0x02,0x00,0x00,0xf8,0x41,0xfa,0x00,0x24,
0x20,0x80,0x06,0x80,0x00,0x00,0x0f,0x00,0x21,0x40,
0xff,0xf8,0x4e,0x75,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x4c,0x00,
0x00,0x00,0x4c,0x00,0x00,0x00,0x4c,0x00,0x00,0x00,
0x00,0x00,0x40,0xe7,0x46,0xfc,0x27,0x00,0x48,0xe7,
0xff,0xfe,0x72,0x00,0x41,0xfa,0xff,0xee,0x30,0x10,
0x66,0x18,0x20,0x10,0x12,0x39,0x00,0x70,0x00,0x1d,
0xb1,0x01,0x6a,0x00,0x01,0x42,0xb3,0x90,0x30,0x3c,
0x0a,0x00,0x52,0x58,0x60,0x0a,0x53,0x40,0x67,0xf8,
0x42,0x58,0x30,0x3c,0x05,0x00,0x12,0x10,0x67,0x00,
0x01,0x0c,0xd2,0x7a,0xff,0xa8,0x44,0x41,0x20,0x7b,
0x10,0xb4,0x43,0xf8,0x4c,0x00,0xd0,0xc0,0xd2,0xc0,
0x4c,0xd8,0x7c,0xff,0x48,0xd1,0x7c,0xff,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x00,0x34,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x00,0x68,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x00,0x9c,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x00,0xd0,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x01,0x04,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x01,0x38,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x01,0x6c,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x01,0xa0,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x01,0xd4,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x02,0x08,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x02,0x3c,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x02,0x70,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x02,0xa4,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x02,0xd8,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x03,0x0c,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x03,0x40,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x03,0x74,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x03,0xa8,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x03,0xdc,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x04,0x10,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x04,0x44,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x04,0x78,0x4c,0xd8,
0x7c,0xff,0x48,0xe9,0x7c,0xff,0x04,0xac,0x4c,0xd8,
0x00,0xff,0x48,0xe9,0x00,0xff,0x04,0xe0,0x41,0xfa,
0xfe,0xb4,0x30,0x18,0x67,0x00,0xfe,0xbc,0x53,0x40,
0x66,0x0e,0x43,0xfa,0xfe,0x40,0x52,0x91,0x59,0x10,
0x64,0x04,0x10,0xbc,0x00,0x08,0x4c,0xdf,0x7f,0xff,
0x46,0xdf,0x4e,0xf9,0x00,0x00,0x00,0x00,0x41,0xfa,
0xfe,0x80,0x32,0x3c,0x03,0xbf,0x30,0x3a,0xfd,0xd4,
0x4a,0x40,0x67,0x20,0x22,0x7a,0xfe,0x78,0x21,0x49,
0x00,0x04,0x30,0x7c,0x4c,0x00,0x30,0x01,0x22,0xd8,
0x51,0xc8,0xff,0xfc,0x41,0xfa,0xfe,0x6c,0x21,0x78,
0x00,0x64,0x01,0x6a,0x60,0x0c,0x22,0x50,0x41,0xfa,
0xfd,0xac,0x21,0x78,0x00,0x64,0x00,0x40,0x23,0xc8,
0x00,0x04,0x00,0x64,0x42,0x99,0x51,0xc9,0xff,0xfc,
0x2f,0x3c,0x00,0xef,0x00,0x7f,0x2f,0x3a,0xfe,0x36,
0x20,0x78,0x00,0xc8,0x41,0xe8,0x06,0x88,0x22,0x50,
0x4e,0x91,0x50,0x4f,0x41,0xfa,0xfe,0x20,0x43,0xfa,
0xfe,0x14,0x22,0xd8,0x22,0xd8,0x70,0x01,0x4e,0x75,
0x48,0xe7,0x00,0x30,0x47,0xfa,0xfe,0x00,0x4a,0x53,
0x67,0x00,0x00,0x70,0x30,0x3a,0xfd,0x5e,0x4a,0x40,
0x67,0x1c,0x23,0xfa,0xff,0x74,0x00,0x04,0x00,0x64,
0x22,0x7a,0xfd,0xf6,0x30,0x7c,0x4c,0x00,0x30,0x3c,
0x03,0xbf,0x20,0xd9,0x51,0xc8,0xff,0xfc,0x60,0x10,
0x33,0xfc,0x09,0x80,0x00,0x60,0x00,0x10,0x23,0xfa,
0xfd,0x74,0x00,0x04,0x00,0x64,0x41,0xfa,0xfd,0xce,
0x20,0xfc,0x00,0x00,0x4c,0x00,0x20,0xfc,0x00,0x00,
0x4c,0x00,0x20,0xbc,0x00,0x00,0x4c,0x00,0x20,0x78,
0x00,0xc8,0x41,0xe8,0x02,0x5c,0x3f,0x13,0x24,0x50,
0x4e,0x92,0x54,0x8f,0x20,0x78,0x00,0xc8,0x41,0xe8,
0x06,0x8c,0x24,0x50,0x4e,0x92,0x42,0x93,0x41,0xfa,
0xfd,0xa6,0x42,0x90,0x4c,0xdf,0x0c,0x00,0x60,0x00,
0xff,0x6e,0x41,0xfa,0x00,0x30,0x24,0x3c,0x41,0xc6,
0x4e,0x6d,0x22,0x10,0x20,0x02,0xc0,0xc1,0x48,0x42,
0xc4,0xc1,0x48,0x41,0xc2,0xfc,0x4e,0x6d,0xd4,0x41,
0x48,0x42,0x42,0x42,0xd0,0x82,0x06,0x80,0x00,0x00,
0x30,0x39,0x20,0x80,0xe0,0x88,0x02,0x40,0x7f,0xff,
0x4e,0x75,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00
};
//... On The Subject Of Descriptively undescriptive error messages ...
//This makes Command Post the only FLASH app with grayscale graphics :)
//Generally, I would prefer that the general public not be aware of this egg since it is
//a bit of a hack and requires 3rd party software which I do not support to be installed
//on the calculator.
void RedPillNeo(void)
{
volatile HANDLE h=H_NULL;
void (*neo)(void);
char *ptr;
TRY
if(FL_getHardwareParmBlock()->hardwareRevision==0 || h220xtsrInstalled() || HW2PatchInstalled())
{
h=HeapAllocHighThrow(sizeof(redpillneo));
ptr=(char*)HeapDeref(h);
if(h220xtsrInstalled()) neo=(void*)&ptr[0x40000]; //if h220xtsr is installed, then add 0x4000
else neo=(void*)ptr; //else hw2/hw3 patch is installed, so no addition is necessary
memcpy(neo,redpillneo,sizeof(redpillneo));
DlgMessage("Morpheus","Unfortunately, no one can be told what The Matrix is.\nYou have to see it for yourself.",PDB_OK,0);
neo();
}
else
{
DlgMessage("Agent Smith","Did you know that the first Matrix was designed to be a perfect human world, where none suffered; where everyone would be happy.\nIt was a disaster.",PDB_OK,0);
}
FINALLY
if(h)HeapFree(h);
ENDFINAL
}
/*void GreenLightGo(void)
{
}*/
#endif //#ifndef NO_EASTER_EGGS