blob: 7c9246865b1af151a8ebae77e4ef222dead74cb2 (
plain) (
blame)
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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
#!/usr/bin/python
##
## license:BSD-3-Clause
## copyright-holders:Vas Crabb
import string
ERROR_PAGE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <title>${code} ${message}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${message}</h1>\n' \
'</body>\n' \
'</html>\n')
SORTABLE_TABLE_EPILOGUE = string.Template(
' </tbody>\n'
'</table>\n'
'<script>make_table_sortable(document.getElementById("${id}"));</script>\n')
MACHINE_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">\n' \
' var appurl="${app}"\n' \
' var assetsurl="${assets}"\n' \
' </script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <script type="text/javascript" src="${assets}/machine.js"></script>\n' \
' <title>Machine: ${description} (${shortname})</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${description}</h1>\n' \
'<table class="sysinfo">\n' \
' <tr><th>Short name:</th><td>${shortname}</td></tr>\n' \
' <tr><th>Is device:</th><td>${isdevice}</td></tr>\n' \
' <tr><th>Runnable:</th><td>${runnable}</td></tr>\n' \
' <tr><th>Source file:</th><td><a href="${sourcehref}">${sourcefile}</a></td></tr>\n')
MACHINE_CLONES_PROLOGUE = string.Template(
'<h2>Clones</h2>\n' \
'<table id="tbl-clones">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th>Year</th>\n' \
' <th>Manufacturer</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
MACHINE_CLONES_ROW = string.Template(
' <tr>\n' \
' <td><a href="${href}">${shortname}</a></td>\n' \
' <td><a href="${href}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' </tr>\n')
MACHINE_SOFTWARELISTS_TABLE_PROLOGUE = string.Template(
'<h2 id="heading-softwarelists">Software Lists</h2>\n' \
'<table id="tbl-softwarelists">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Card</th>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th>Status</th>\n' \
' <th class="numeric">Total</th>\n' \
' <th class="numeric">Supported</th>\n' \
' <th class="numeric">Partially supported</th>\n' \
' <th class="numeric">Unsupported</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
MACHINE_SOFTWARELISTS_TABLE_ROW = string.Template(
' <tr id="row-softwarelists-${rowid}">\n' \
' <td></td>\n' \
' <td><a href="${href}">${shortname}</a></td>\n' \
' <td><a href="${href}">${description}</a></td>\n' \
' <td>${status}</td>\n' \
' <td style="text-align: right">${total}</td>\n' \
' <td style="text-align: right">${supported}</td>\n' \
' <td style="text-align: right">${partiallysupported}</td>\n' \
' <td style="text-align: right">${unsupported}</td>\n' \
' </tr>\n')
MACHINE_SOFTWARELISTS_TABLE_EPILOGUE = string.Template(
' </tbody>\n' \
'</table>\n' \
'<script>\n' \
' make_table_sortable(document.getElementById("tbl-softwarelists"));\n' \
' if (!document.getElementById("tbl-softwarelists").tBodies[0].rows.length)\n' \
' {\n' \
' document.getElementById("heading-softwarelists").style.display = "none";\n' \
' document.getElementById("tbl-softwarelists").style.display = "none";\n' \
' }\n' \
'</script>\n')
MACHINE_OPTIONS_HEADING = string.Template(
'<h2>Options</h2>\n' \
'<p>\n' \
' Format: <select id="select-options-format" onchange="update_cmd_preview()"><option value="cmd">Command line</option><option value="ini">INI file</option></select>\n' \
' <input type="checkbox" id="check-explicit-defaults" onchange="update_cmd_preview()"><label for="check-explicit-defaults">Explicit defaults</label>\n' \
'</p>\n' \
'<p id="para-cmd-preview"></p>\n')
MACHINE_BIOS_PROLOGUE = string.Template(
'<h3>System BIOS</h3>' \
'<select id="select-system-bios" onchange="update_cmd_preview()">')
MACHINE_BIOS_OPTION = string.Template(
' <option value="${name}" data-isdefault="${isdefault}">${name} - ${description}</option>\n')
MACHINE_RAM_PROLOGUE = string.Template(
'<h3>RAM Size</h3>' \
'<select id="select-ram-option" onchange="update_cmd_preview()">')
MACHINE_RAM_OPTION = string.Template(
' <option value="${name}" data-isdefault="${isdefault}">${name} (${size})</option>\n')
MACHINE_SLOTS_PLACEHOLDER_PROLOGUE = string.Template(
'<h3>Slots</h3>\n' \
'<p id="para-slots-placeholder">Loading slot information…<p>\n' \
'<script>\n')
MACHINE_SLOTS_PLACEHOLDER_EPILOGUE = string.Template(
' populate_slots(${machine});\n'
'</script>\n')
MACHINE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td><a href="${sourcehref}">${sourcefile}</a></td>\n' \
' </tr>\n')
EXCL_MACHINE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td></td>\n' \
' <td></td>\n' \
' </tr>\n')
COMPATIBLE_SLOT_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${slot}</td>\n' \
' <td>${slotoption}</td>\n' \
' <td><a href="${sourcehref}">${sourcefile}</a></td>\n' \
' </tr>\n')
SOURCEFILE_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>Source File: ${filename}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${title}</h1>\n')
SOURCEFILE_ROW_PARENT = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' <td>${runnable}</td>\n' \
' <td></td>\n' \
' </tr>\n')
SOURCEFILE_ROW_CLONE = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' <td>${runnable}</td>\n' \
' <td><a href="${parenthref}">${parent}</a></td>\n' \
' </tr>\n')
SOURCEFILE_LIST_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>${title}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${heading}</h1>\n' \
'<table id="tbl-sourcefiles">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Source file</th>\n' \
' <th class="numeric">Machines</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOURCEFILE_LIST_ROW = string.Template(
' <tr>\n' \
' <td>${sourcefile}</td>\n' \
' <td style="text-align: right">${machines}</td>\n' \
' </tr>\n')
SOFTWARE_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>${title}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${heading}</h1>\n' \
'<table class="sysinfo">\n' \
' <tr><th>Software list:</th><td><a href="${softwarelisthref}">${softwarelistdescription} (${softwarelist})</a></td></tr>\n' \
' <tr><th>Short name:</th><td>${shortname}</td></tr>\n' \
' <tr><th>Year:</th><td>${year}</td></tr>\n' \
' <tr><th>Publisher:</th><td>${publisher}</td></tr>\n');
SOFTWARE_CLONES_PROLOGUE = string.Template(
'<h2>Clones</h2>\n' \
'<table id="tbl-clones">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th>Year</th>\n' \
' <th>Publisher</th>\n' \
' <th>Supported</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOFTWARE_CLONES_ROW = string.Template(
' <tr>\n' \
' <td><a href="${href}">${shortname}</a></td>\n' \
' <td><a href="${href}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${publisher}</td>\n' \
' <td>${supported}</td>\n' \
' </tr>\n')
SOFTWARE_PART_PROLOGUE = string.Template(
'<h3>${heading}</h3>\n' \
'<table class="sysinfo">\n' \
' <tr><th>Short name:</th><td>${shortname}</td></tr>\n' \
' <tr><th>Interface:</th><td>${interface}</td></tr>\n')
SOFTWARELIST_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>${title}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${heading}</h1>\n' \
'<table class="sysinfo">\n' \
' <tr>\n' \
' <th>Short name:</th>\n' \
' <td>${shortname}</td>\n' \
' </tr>\n' \
' <tr>\n' \
' <th>Total:</th>\n' \
' <td style="text-align: right">${total}</td>\n' \
' </tr>\n' \
' <tr>\n' \
' <th>Supported:</th>\n' \
' <td style="text-align: right">${supported}</td>\n' \
' <td style="text-align: right">(${supportedpc}%)</td>\n' \
' </tr>\n' \
' <tr>\n' \
' <th>Partially supported:</th>\n' \
' <td style="text-align: right">${partiallysupported}</td>\n' \
' <td style="text-align: right">(${partiallysupportedpc}%)</td>\n' \
' </tr>\n' \
' <tr>\n' \
' <th>Unsupported:</th>\n' \
' <td style="text-align: right">${unsupported}</td>\n' \
' <td style="text-align: right">(${unsupportedpc}%)</td>\n' \
' </tr>\n' \
'</table>\n')
SOFTWARELIST_MACHINE_TABLE_HEADER = string.Template(
'<h2>Machines</h2>\n' \
'<table id="tbl-machines">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th>Year</th>\n' \
' <th>Manufacturer</th>\n' \
' <th>Status</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOFTWARELIST_MACHINE_TABLE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${machinehref}">${shortname}</a></td>\n' \
' <td><a href="${machinehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${manufacturer}</td>\n' \
' <td>${status}</td>\n' \
' </tr>\n')
SOFTWARELIST_SOFTWARE_TABLE_HEADER = string.Template(
'<h2>Software</h2>\n' \
'<table id="tbl-software">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th>Year</th>\n' \
' <th>Publisher</th>\n' \
' <th>Supported</th>\n' \
' <th class="numeric">Parts</th>\n' \
' <th class="numeric">Bad dumps</th>\n' \
' <th>Parent</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOFTWARELIST_SOFTWARE_ROW = string.Template(
' <tr>\n' \
' <td><a href="${softwarehref}">${shortname}</a></td>\n' \
' <td><a href="${softwarehref}">${description}</a></td>\n' \
' <td>${year}</td>\n' \
' <td>${publisher}</td>\n' \
' <td>${supported}</td>\n' \
' <td style="text-align: right">${parts}</td>\n' \
' <td style="text-align: right">${baddumps}</td>\n' \
' <td>${parent}</td>\n' \
' </tr>\n')
SOFTWARELIST_LIST_PROLOGUE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">var assetsurl="${assets}"</script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <title>${title}</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>${heading}</h1>\n' \
'<table id="tbl-softwarelists">\n' \
' <thead>\n' \
' <tr>\n' \
' <th>Short name</th>\n' \
' <th>Description</th>\n' \
' <th class="numeric">Total</th>\n' \
' <th class="numeric">Supported</th>\n' \
' <th class="numeric">Partially supported</th>\n' \
' <th class="numeric">Unsupported</th>\n' \
' </tr>\n' \
' </thead>\n' \
' <tbody>\n')
SOFTWARELIST_LIST_ROW = string.Template(
' <tr>\n' \
' <td><a href="${href}">${shortname}</a></td>\n' \
' <td><a href="${href}">${description}</a></td>\n' \
' <td style="text-align: right">${total}</td>\n' \
' <td style="text-align: right">${supported}</td>\n' \
' <td style="text-align: right">${partiallysupported}</td>\n' \
' <td style="text-align: right">${unsupported}</td>\n' \
' </tr>\n')
ROMIDENT_PAGE = string.Template(
'<!DOCTYPE html>\n' \
'<html>\n' \
'<head>\n' \
' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \
' <meta http-equiv="Content-Style-Type" content="text/css">\n' \
' <meta http-equiv="Content-Script-Type" content="text/javascript">\n' \
' <link rel="stylesheet" type="text/css" href="${assets}/style.css">\n' \
' <script type="text/javascript">\n' \
' var appurl="${app}"\n' \
' var assetsurl="${assets}"\n' \
' </script>\n' \
' <script type="text/javascript" src="${assets}/common.js"></script>\n' \
' <script type="text/javascript" src="${assets}/digest.js"></script>\n' \
' <script type="text/javascript" src="${assets}/romident.js"></script>\n' \
' <title>Identify ROM/Disk Dumps</title>\n' \
'</head>\n' \
'<body>\n' \
'<h1>Identify ROM/Disk Dumps</h1>\n' \
'<p>No files are uploaded. Files are examined locally and checksums/digests are sent to the server. File checksums and digests may be logged on the server.</p>\n' \
'<div id="div-dropzone" class="dropzone" ondragover="div_dropzone_dragover(event)" ondrop="div_dropzone_drop(event)">\n' \
'<p><button type="button" onclick="document.getElementById("input-dumps").click()">Select ROM/disk dumps</button></p>\n' \
'<p>Drag and drop ROM/disk dump files here to identify them.</p>\n' \
'</div>\n' \
'<input id="input-dumps" type="file" multiple onchange="add_dump_files(this.files)" style="display: none">\n' \
'<div id="div-progress"></div>\n' \
'<div id="div-issues"></div>\n' \
'<div id="div-unmatched"></div>\n' \
'<div id="div-machines"></div>\n' \
'<div id="div-software"></div>\n' \
'</body>\n' \
'</html>\n')
|