-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
3569 lines (3387 loc) · 131 KB
/
index.html
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
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en" style="position: fixed;width: 100vw;height: 100vh;left: 0;top: 0;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
<!-- <script src="https://www.norchant.com/js/vconsole.min.js"></script> -->
<title>Tekii模拟器【红白机】</title>
<!-- <script type="text/javascript" src="https://code.jquery.com/jquery-3.4.0.min.js"></script> -->
<!-- <script type="text/javascript" src="./js/jquery-3.4.0.min.js"></script> -->
<script type="text/javascript" src="https://maxmon.oss-cn-shanghai.aliyuncs.com/js/jquery-3.4.0.min.js"></script>
<!-- <script type="text/javascript" src="https://unpkg.com/jsnes/dist/jsnes.min.js"></script> -->
<!-- <script type="text/javascript" src="./js/jsnes.min.js"></script> -->
<script type="text/javascript" src="./js/jsnes.min.js"></script>
<script>
// if (window.location.href.indexOf('xszz') === -1 && window.location.href.indexOf('ame') === -1) {
// window.location.href = '/fc.car';
// }
// console.log = ()=>{};
if (window.location.href.indexOf('http:') > -1) {
window.location.href = window.location.href.replace('http:', 'https:')
}
</script>
<style type="text/css">
body {
image-rendering: pixelated;
}
</style>
<script>
window.addEventListener("gamepadconnected", function (e) {
window.gp = navigator.getGamepads()[e.gamepad.index];
console.log("Gamepad connected at index %d: %s. %d buttons, %d axes.",
gp.index, gp.id,
gp.buttons.length, gp.axes.length);
});
function processGp() {
if (window.gp) {
let gpKeyDic = {
0: 'A',
1: 'B',
3: 'X',
4: 'Y',
6: 'L', // LB Left Bumper 按钮
7: 'R', // RB Right Bumper
8: 'ZL', // LT L2 Left Trigger 扳机
9: 'ZR', // RT R2 Left Trigger
10: 'Select',
11: 'Start',
13: 'LS', // 左摇杆按压 Left Sitck 操纵杆
14: 'RS', // 右摇杆按压 Right Sitck
21: '↑',
22: '→',
23: '↓',
24: '←',
}
let gpKey2KeysDic = {
0: 88,
1: 89,
3: 88,
4: 89,
6: 88,
7: 88,
8: 89,
9: 89,
10: 17,
11: 13,
21: 38,
22: 39,
23: 40,
24: 37,
}
window.gp = navigator.getGamepads()[0];
// 按钮部分
window.gpBtnDownDic = window.gpBtnDownDic || {};
let buttons = window.gp.buttons;
for (let i = 0; i < buttons.length; i++) {
const btn = buttons[i];
let gpKey = i;
if (btn.value == 1) {
if (!window.gpBtnDownDic[i]) {
window.gpBtnDownDic[i] = 1;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is down');
nes.buttonDown(key[0], key[1]);
} else {
// 按着就按着吧,不触发
}
} else {
if (window.gpBtnDownDic[i]) {
window.gpBtnDownDic[i] = 0;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is up');
nes.buttonUp(key[0], key[1]);
} else {
// 什么事都没有
}
}
}
// 摇杆部分
// idx0 左摇杆 左 -1
// idx0 左摇杆 右 1
// idx1 右摇杆 上 -1
// idx1 右摇杆 下 1
// idx2 右摇杆 左 -1
// idx2 右摇杆 右 1
// idx5 右摇杆 上 -1
// idx5 右摇杆 下 1
window.gpAxesDownDic = window.gpAxesDownDic || {};
let axes = window.gp.axes;
for (let i = 0; i <= 1; i++) {
const axe = axes[i];
let gpKey;
if (i == 0) {
gpKey = 24;
if (axe < -.5) {
if (!window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 1;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is down');
nes.buttonDown(key[0], key[1]);
} else {
// 按着就按着吧,不触发
}
} else {
if (window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 0;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is up');
nes.buttonUp(key[0], key[1]);
} else {
// 什么事都没有
}
}
gpKey = 22;
if (axe > .5) {
if (!window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 1;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is down');
nes.buttonDown(key[0], key[1]);
} else {
// 按着就按着吧,不触发
}
} else {
if (window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 0;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is up');
nes.buttonUp(key[0], key[1]);
} else {
// 什么事都没有
}
}
}
if (i == 1) {
gpKey = 21;
if (axe < -.5) {
if (!window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 1;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is down');
nes.buttonDown(key[0], key[1]);
} else {
// 按着就按着吧,不触发
}
} else {
if (window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 0;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is up');
nes.buttonUp(key[0], key[1]);
} else {
// 什么事都没有
}
}
gpKey = 23;
if (axe > .5) {
if (!window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 1;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is down');
nes.buttonDown(key[0], key[1]);
} else {
// 按着就按着吧,不触发
}
} else {
if (window.gpAxesDownDic[gpKey]) {
window.gpAxesDownDic[gpKey] = 0;
let key = KEYS[gpKey2KeysDic[gpKey]];
console.log(gpKey, 'is up');
nes.buttonUp(key[0], key[1]);
} else {
// 什么事都没有
}
}
}
}
}
}
function getQuery(key) {
let match = window.location.search.match(new RegExp(`.*${key}=(.*?)($|&)`));
if (match) {
return match[1];
} else {
return '';
}
}
window.onload = function () {
// document.body.innerText = window.location.href;
// document.body.style.color = "#ffffff";
// 开发传递调试
const res = getQuery('res');
const tarRes = decodeURIComponent(res).replace(/\\\"/g, '"').replace(/^"/, '').replace(/"$/,
''); //Object.keys(JSON.parse(decodeURIComponent(res))).join(',');
const tarResJson = tarRes ? JSON.parse(tarRes) : undefined;
console.log('tarRes', tarResJson);
if (tarResJson && tarResJson.referrerInfo && tarResJson.referrerInfo.extraData && tarResJson.referrerInfo
.extraData.picId) {
console.log('omomomomomo');
document.getElementById('someInfo').innerText = window.location.search.replace(/^\?/, '').replace('res=' +
res, 'xszzId=' + tarResJson.referrerInfo.extraData.picId);
// window.location.href = window.location.href.replace('res=' + res, 'xszzId=' + tarResJson.referrerInfo.extraData.picId);
// window.location.href = window.location.href.replace('res=' + res, 'xszzId=' + 'ce805e785ffc7cdf0409679a642661f6')//tarResJson.referrerInfo.extraData.picId);
generateNesByXszz(tarResJson.referrerInfo.extraData.picId)
} else {
document.getElementById('someInfo').innerText = window.location.search.replace(/^\?/, '');
}
document.getElementById('someInfo').innerText = window.location.search.replace(/^\?/, '').replace('res=' + res,
tarRes);
// return;
$('#vedioBtn').click(function () {
console.log('vedioBtn clicked')
window.pause = !window.pause;
if (window.pause) {
toast('已【暂停】播放录像')
$('#vedioBtnPlay')[0].style.display = 'none';
$('#vedioBtnPause')[0].style.display = 'block';
} else {
toast('已【恢复】播放录像')
$('#vedioBtnPause')[0].style.display = 'none';
$('#vedioBtnPlay')[0].style.display = 'block';
}
})
canvasTips.addEventListener('dragover', function (e) {
console.log(e)
e.preventDefault(); // 必须阻止默认事件
}, false);
canvasTips.addEventListener('drop', function (e) {
e.preventDefault(); // 阻止默认事件
var files = e.dataTransfer.files; //获取文件
// appendFile(files, '.list-drag')
console.log(e)
console.log(files);
window.files = files;
if (files[0].name.indexOf('.sav') > -1) {
// code
blobToDataURL(files[0], (base64) => {
console.log(base64)
localStorage[localStorage.romurl] = (atob(base64.replace('data:application/octet-stream;base64,',
'')));
loadSavedData()
})
} else {
// code
blobToDataURL(files[0], (base64) => {
nes.loadROM(atob(base64.replace('data:application/octet-stream;base64,', '')));
// nes.stop();
nes.reloadROM();
})
}
}, false);
function blobToDataURL(blob, cb) {
let reader = new FileReader();
reader.onload = function (evt) {
var base64 = evt.target.result
cb(base64)
};
reader.readAsDataURL(blob);
}
}
</script>
<style>
* {
user-select: none !important;
-webkit-overflow-scrolling: touch;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
body {
position: fixed;
top: 0;
right: 0;
left: 0;
bottom: 0;
overflow: hidden;
background-color: black;
max-width: 70vh;
width: 100%;
height: 100%;
}
.rankBox::-webkit-scrollbar {
/*滚动条整体样式*/
width: 5px;
/*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.rankBox::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 10px;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #535353;
}
.rankBox::-webkit-scrollbar-track {
/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px;
background: #EDEDED;
}
.btn {
max-width: 14vh;
}
#btnspeed.open {
/* opacity: 1 !important;
right: -18vw !important; */
filter: drop-shadow(#ff0000 2px 2px) !important;
}
#changePlayer {
display: none;
}
* {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
#emulator {
margin: 0 auto;
width: 100%;
}
#canvas {
position: fixed;
/* width: 100%; */
/* transform: rotate(90deg); */
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: 0 auto;
}
#canvasTips {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: 0 auto;
}
#canvasTips>span {
display: inline-block;
position: fixed;
color: white;
width: 200px;
text-align: center;
height: 20px;
font-size: 20px;
left: calc(50vw - 100px);
top: calc(50vh - 10px);
transform: rotateZ(90deg);
}
#message {
font-family: sans-serif;
padding: 30px;
font-weight: 500;
}
#keys {
font-size: 14px;
font-family: sans-serif;
padding-bottom: 15px;
}
#game-list-box {
display: none;
position: absolute;
top: calc(50vh - 27vw);
right: calc(50vw - 39vw);
bottom: 0;
width: 50vw;
height: 50vw;
overflow: hidden;
opacity: .8;
transform: rotateZ(90deg);
z-index: 1;
}
#game-list {
margin-top: 0;
padding-bottom: 15px;
height: 100%;
overflow: auto;
background-color: black;
font-size: 0;
overflow-x: hidden;
}
.game-search,
#game-list-box p {
margin: 0;
width: 100%;
height: 3rem;
font-size: 1.5rem;
line-height: 3rem;
color: #ffffff;
border: 1px solid #ffffff;
padding: 0;
overflow: hidden;
display: inline-block;
border-top: 0;
background: rgba(0,0,0,0);
box-sizing: border-box;
}
.game-search {
border-top: 1px solid #ffffff;
}
#fps,
#f {
display: none;
opacity: .5;
}
#time {
position: absolute;
display: none;
text-align: right;
width: 65px;
font-size: 13px;
color: white;
transform: rotateZ(90deg);
right: calc(4vw - 27px);
bottom: 40px;
}
@media screen and (min-width: 800px) {
body {
transform: none !important;
max-width: none !important;
}
#time {
display: none !important;
}
.btn {
display: none;
}
#canvas {
width: 100% !important;
height: 100% !important;
max-height: 100%;
max-width: 100%;
transform: none !important;
}
.rankArea,
.leftArea {
/* margin-left: 0px !important; */
transform: none !important;
bottom: 0 !important;
right: 160px !important;
}
.tipsArea {
transform: none !important;
top: 0 !important;
left: 200px !important;
}
.challengeBtn {
left: 0 !important;
transform: none !important;
}
.vedioBtn {
transform: none !important;
}
.aTransBox {
display: none;
}
.toast-tips {
top: 0 !important;
;
right: 0 !important;
;
left: 0 !important;
;
margin: auto !important;
;
transform: none !important;
}
.developer span {
position: fixed !important;
left: auto !important;
top: auto !important;
transform: none !important;
right: 1em;
bottom: 0;
width: auto !important;
}
}
</style>
<script>
// 简易追踪马里奥算法
HTMLElement.prototype.getPixelColor = function (x, y) {
var thisContext = this.getContext("2d");
var imageData = thisContext.getImageData(x, y, 1, 1);
var pixel = imageData.data;
var r = pixel[0];
var g = pixel[1];
var b = pixel[2];
var a = pixel[3] / 255
a = Math.round(a * 100) / 100;
var rHex = r.toString(16);
r < 16 && (rHex = "0" + rHex);
var gHex = g.toString(16);
g < 16 && (gHex = "0" + gHex);
var bHex = b.toString(16);
b < 16 && (bHex = "0" + bHex);
var rgbaColor = "rgba(" + r + "," + g + "," + b + "," + a + ")";
var rgbColor = "rgb(" + r + "," + g + "," + b + ")";
var hexColor = "#" + rHex + gHex + bHex;
return {
rgba: rgbaColor,
rgb: rgbColor,
hex: hexColor,
r: r,
g: g,
b: b,
a: a
};
}
// let ctx = canvas.getContext('2d');
// window.ctx = ctx;
// ctx.fillStyle = "red";
// ctx.lineWidth = 4;
let x = 0;
let y = 0;
let img;
let img3;
let tX = 0;
let tY = 0;
function myFunction(ev) {
console.log('123123')
// canvas.removeEventListener('click', myFunction);
console.log(ev);
// return;
window.x = ev.offsetX;
window.y = ev.offsetY;
window.w = ev.target.offsetWidth;
window.h = ev.target.offsetHeight;
console.log(window.x, window.y, window.w, window.h)
window.tX = window.x * 256 / window.w;
window.tY = window.y * 240 / window.h;
window.sTs = Date.now();
console.log('src', window.tX, window.tY)
window.tX2 = 0;
window.tY2 = 0;
if (!img) {
console.log('change img')
// img = ctx.getImageData(tX, tY, 12, 16);
img = JSON.parse(JSON.stringify(context.getImageData(window.tX, window.tY, 12, 16)));
console.log(context.getImageData(window.tX, window.tY, 12, 16), img);
img.width = 12;
img.height = 16;
}
window.catchDic = window.catchDic || {}
}
function goPikachu() {
if (!window.w) {
return;
}
let maxEC = 0;
let isFind = false;
for (let k = 0; k < w * h; k++) {
if ((k % w) > 100) {
continue;
}
if ((k % w) < tX - 20 || (k % w) > tX + 20) {
continue;
}
if ((k / w | 0) < tY - 30 || (k / w | 0) > tY + 30) {
continue;
}
let img2 = context.getImageData(k % w, k / w | 0, 12, 16);
let eC = 0; // 颜色相同统计
for (let j = 0; j < img.height; j++) {
for (let i = 0; i < img.width; i++) {
let idx = (j * img.width + i) * 4;
let r = img.data[idx];
let g = img.data[idx + 1];
let b = img.data[idx + 2];
let a = img.data[idx + 3];
let r2 = img2.data[idx];
let g2 = img2.data[idx + 1];
let b2 = img2.data[idx + 2];
let a2 = img2.data[idx + 3];
if (img3) {
let r3 = img3.data[idx];
let g3 = img3.data[idx + 1];
let b3 = img3.data[idx + 2];
let a3 = img3.data[idx + 3];
if (r3 == r2 && g3 == g2 && b3 == b2) {
eC = eC + 0.05;
// console.log(r,g,b);
// window.catchDic[`${r},${g},${b}`]=window.catchDic[`${r},${g},${b}`] || 0;
// window.catchDic[`${r},${g},${b}`]+=1;
}
}
if (r == 0 && g == 171 && b == 0) {
continue;
}
if (r == 129 && g == 121 && b == 255) {
continue;
}
if (r == 117 && g == 227 && b == 0) {
continue;
}
if (r == 188 && g == 25 && b == 0) {
continue;
}
if (r == 177 && g == 84 && b == 0) {
continue;
}
if (r == 0 && g == 0 && b == 0) {
continue;
}
if (r == g && g == b) {
continue;
}
if (r == r2 && g == g2 && b == b2) {
eC++;
// console.log(r,g,b);
window.catchDic[`${r},${g},${b}`] = window.catchDic[`${r},${g},${b}`] || 0;
window.catchDic[`${r},${g},${b}`] += 1;
}
}
}
eC -= Math.abs(k % w - tX);
// eC -= 1*Math.abs(k / w|0 - tY);
if (eC > 10 && eC > maxEC) {
maxEC = eC;
// console.log(eC, k, k % w, k / w | 0, img, img2)
tX2 = k % w;
tY2 = k / w | 0;
// console.log('!!!!!!', k / w | 0, y, tY)
isFind = true;
img3 = img2;
}
// if (k % 2000 == 0) {
// console.log(Date.now() - sTs, k);
// }
}
console.log(tX2, tY2, isFind)
if (tX2 && tY2 && isFind) {
// console.log('tar', w * h, tX2, tY2)
clearInterval(window.shadowInter);
window.shadowInter = setInterval(() => {
// ctx.fillRect(tX2, tY2, 12, 16);
context.strokeRect(tX2, tY2, 12, 16);
})
tX = tX2;
tY = tY2;
}
}
</script>
</head>
<body>
<input id="fps" disabled />
<input id="f" disabled />
<span id="time">Ready</span>
<canvas id="canvas" width='256px' height='240px'></canvas>
<script>
canvas.addEventListener('click', myFunction); // 关闭监听 画框
</script>
<div id="canvasTips"></div>
<img id="checkImg"></img>
<canvas id="check" width='12px' height='16px'></canvas>
<!-- <div id="btnall"
style="opacity:0.5;width:45vw;height:45vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btn.png');background-repeat:no-repeat;position:fixed;left:5vw;top:5vw;transform: rotate(90deg);">
</div> -->
<div class="btn" id="changePlayer"
style="opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/player1.png');background-repeat:no-repeat;position:fixed;right:10vw;top:10vw;transform: rotate(90deg);">
</div>
<div class="btn" id="btnup">
</div>
<div class="btn" id="btnright"
style="opacity:0.5;width:15vw;height:22vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btn.png');background-repeat:no-repeat;position:fixed;left:20vw;top:28vw;transform: rotate(180deg);">
</div>
<div class="btn" id="btn12"
style="width:15vw;height:15vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/empty.png');background-repeat:no-repeat;position:fixed;left:35vw;top:35vw;transform: rotate(180deg);">
</div>
<div class="btn" id="btndown">
</div>
<div class="btn" id="btn23"
style="width:15vw;height:15vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/empty.png');background-repeat:no-repeat;position:fixed;left:5vw;top:35vw;transform: rotate(180deg);">
</div>
<div class="btn" id="btnleft"
style="opacity:0.5;width:15vw;height:22vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btn.png');background-repeat:no-repeat;position:fixed;left:20vw;top:5vw;">
</div>
<div class="btn" id="btn34"
style="width:15vw;height:15vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/empty.png');background-repeat:no-repeat;position:fixed;left:5vw;top:5vw;transform: rotate(180deg);">
</div>
<div class="btn" id="btn14"
style="width:15vw;height:15vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/empty.png');background-repeat:no-repeat;position:fixed;left:35vw;top:5vw;transform: rotate(180deg);">
</div>
<div class="btn top-btn" id="btnsave"
style="opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnsave.png');background-repeat:no-repeat;position:fixed;right:2vw;top:10vw;transform: rotate(90deg);">
</div>
<div class="btn top-btn" id="btnload"
style="display:none;opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnload.png');background-repeat:no-repeat;position:fixed;right:2vw;top:10vw;transform: rotate(90deg);">
</div>
<div class="btn top-btn" id="btnspeed"
style="opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnspeed.png');background-repeat:no-repeat;position:fixed;right:2vw;top:35vw;transform: rotate(90deg);">
</div>
<div class="btn top-btn" id="btnselect"
style="opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnselect.png');background-repeat:no-repeat;position:fixed;right:2vw;bottom:35vw;transform: rotate(90deg);">
</div>
<div class="btn top-btn" id="btnstart"
style="opacity:0.5;width:20vw;height:8.88vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnstart.png');background-repeat:no-repeat;position:fixed;right:2vw;bottom:10vw;transform: rotate(90deg);">
</div>
<div class="btn" id="btnb"
style="opacity:0.5;width:22vw;height:22vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btnb.png');background-repeat:no-repeat;position:fixed;left:5vw;bottom:26vw;transform: rotate(90deg);">
</div>
<div class="btn" id="btna"
style="opacity:0.5;width:22vw;height:22vw;background-size: 100% auto;background-image:url('https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/btna.png');background-repeat:no-repeat;position:fixed;left:5vw;bottom:5vw;transform: rotate(90deg);">
</div>
<div class="config-btn top-btn btn" id="config-btn"
style="opacity: 0.5;width: 6vh;height: 6vh;background-size: 100% auto;background-image: url(https://maxmon.oss-cn-shanghai.aliyuncs.com/img/fc/config.png);background-repeat: no-repeat;position: fixed;top: 47vh;right: -3vw;transform: rotate(90deg);">
</div>
<!-- <div class="developer"><span onclick="copystr('maqijun123456', {'hasToast': true})">开发者:马琦钧 微信:maqijun123456</span> -->
<div class="developer" style="display: none;"><span id="someInfo"></span>
</div>
<div class="toast-tips" id="toast-tips" style="display: none;">
<div class="toast-confirm" id="toast-confirm">确定</div>
</div>
<div class="game-list-box" id="game-list-box">
<script>
function showSearch() {
const searhKey = prompt('请输入需要查询的游戏名:');
searchGame(searhKey);
}
function searchGame(searhKey) {
const gameListDom = document.getElementById('game-list');
[].map.call(gameListDom.children, (item)=>{
if (item.tagName !== 'P') return; // 非游戏选项略过
if (!searhKey) return item.style.display = 'inline-block'; // 没有查询时,显示全部
if (item.innerText.indexOf(searhKey) > -1) return item.style.display = 'inline-block';
else return item.style.display = 'none'; // 隐藏没有查询到的游戏
})
}
</script>
<div class="game-list" id="game-list">
<button onclick="showSearch()" class="game-search">查询</button>
<p
onclick="localStorage.romurl = './rom/Chip To Dale No Daisakusen 2 (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
松鼠大作战</p>
<p onclick="localStorage.romurl = './rom/mario.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
马里奥</p>
<p onclick="localStorage.romurl = './rom/绿野仙踪.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
绿野仙踪</p>
<p onclick="localStorage.romurl = './rom/机器猫小叮当.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
小叮当</p>
<p onclick="localStorage.romurl = './rom/创世纪英雄.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
创世纪英雄</p>
<p onclick="localStorage.romurl = './rom/西游记1.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
西游记1</p>
<p onclick="localStorage.romurl = './rom/成龙之龙.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
成龙之龙</p>
<p onclick="localStorage.romurl = './rom/希特勒复活.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
希特勒复活</p>
<p onclick="localStorage.romurl = './rom/c31.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
中国象棋</p>
<p
onclick="localStorage.romurl = './rom/Double Dragon (U).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
双截龙1(美版)</p>
<p
onclick="localStorage.romurl = './rom/Yie Ar Kung-Fu (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
功夫
</p>
<p
onclick="localStorage.romurl = './rom/iceclimb.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
雪人兄弟</p>
<p
onclick="localStorage.romurl = './rom/Dragonlance - Dragons of Flame (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
龙的火焰</p>
<p
onclick="localStorage.romurl = './rom/vs dr mario.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
马里奥医生</p>
<p onclick="localStorage.romurl = './rom/马戏团.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
马戏团(中文)</p>
<p
onclick="localStorage.romurl = './rom/Makaimura (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
魔界村</p>
<p
onclick="localStorage.romurl = './rom/Battle City (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
坦克大战
</p>
<p onclick="localStorage.romurl = './rom/CONTRA.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
魂斗罗</p>
<p
onclick="localStorage.romurl = './rom/NINJAGA3.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
忍者龙剑传3</p>
<p
onclick="localStorage.romurl = './rom/zhonghuadaxian.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
中华大仙
</p>
<p
onclick="localStorage.romurl = './rom/Chuugoku Senseijutsu (Japan).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
中国占星术</p>
<p onclick="localStorage.romurl = './rom/BOMBMAN.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
炸弹人</p>
<p
onclick="localStorage.romurl = './rom/Bomberman 2 (U).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
炸弹人2
</p>
<p onclick="localStorage.romurl = './rom/smbc.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
马里奥双人版</p>
<p onclick="localStorage.romurl = './rom/X-MEN.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
X-MEN</p>
<p onclick="localStorage.romurl = './rom/kdxfzwb.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
快打旋风中文</p>
<p onclick="localStorage.romurl = './rom/ZELDA.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
ZELDA</p>
<p onclick="localStorage.romurl = './rom/ZELDA2.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
ZELDA2</p>
<p
onclick="localStorage.romurl = './rom/Zelda Outlands.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
塞尔达1</p>
<p
onclick="localStorage.romurl = './rom/KIRBYADV.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
卡比历险记</p>
<p
onclick="localStorage.romurl = './rom/Hoshi No Kirby - Yume No Izumi No Monogatari (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
卡比历险记-日</p>
<p
onclick="localStorage.romurl = './rom/Meitantei Holmes - Kiri No London Satsujin Jiken (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
侦探-日</p>
<p
onclick="localStorage.romurl = './rom/Startropics.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
Startropics</p>
<p
onclick="localStorage.romurl = './rom/Adventures of Lolo (J).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
Lolo</p>
<p onclick="localStorage.romurl = './rom/LOLO2.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
Lolo2</p>
<p onclick="localStorage.romurl = './rom/LOLO3.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
Lolo3</p>
<p
onclick="localStorage.romurl = './rom/Moon Ranger (U).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
Moon
Ranger</p>
<p
onclick="localStorage.romurl = './rom/rexuequgunqiu.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
热血曲棍球
</p>
<p onclick="localStorage.romurl = './rom/热血物语中文版.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
热血物语</p>
<p
onclick="localStorage.romurl = './rom/re_xue_gao_xiao_duo_bi_qiu.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
热血高校</p>
<p onclick="localStorage.romurl = './rom/rxgd.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
热血格斗</p>
<p
onclick="localStorage.romurl = './rom/Kunio_Kun_no_Nekketsu_Soccer_League_(J)(T+C)(AirTeam)build_070217.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
热血足球3</p>
<!-- <p onclick="localStorage.romurl = './rom/rxsdj.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">热血时代剧</p> -->
<p
onclick="localStorage.romurl = './rom/三国志英杰传(吞食天地1).NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">
吞食天地1
</p>
<p
onclick="localStorage.romurl = './rom/吞食天地2 (不花屏版) [先锋卡通汉化].nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
吞食天地2</p>
<p
onclick="localStorage.romurl = './rom/呑食天地Ⅰ曹魏英豪传(吞2音乐).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
吞1曹魏
</p>
<p onclick="localStorage.romurl = './rom/冒险岛1.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险岛1</p>
<p onclick="localStorage.romurl = './rom/冒险岛2.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险岛2</p>
<p onclick="localStorage.romurl = './rom/冒险岛3.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险岛3</p>
<p onclick="localStorage.romurl = './rom/冒险岛4.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险岛4</p>
<p
onclick="localStorage.romurl = './rom/冒险岛1(无敌).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险1无敌</p>
<p onclick="localStorage.romurl = './rom/冒险岛2无限.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险2无限</p>
<p
onclick="localStorage.romurl = './rom/冒险岛3(无限人、血).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险3无限</p>
<p
onclick="localStorage.romurl = './rom/冒险岛4(无敌).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
冒险4无敌</p>
<!-- <p onclick="localStorage.romurl = './rom/爆笑三国(上古神剑).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">爆笑三国</p> -->
<!-- <p onclick="localStorage.romurl = './rom/三国志Ⅱ--霸王的大陆_外星汉化版.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">三国志Ⅱ</p> -->
<!-- <p onclick="localStorage.romurl = './rom/三国志超级版.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">三国志超级版</p> -->
<!-- <p onclick="localStorage.romurl = './rom/重装机兵plus6.0大车版.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">重装机兵大车版</p> -->
<!-- <p onclick="localStorage.romurl = './rom/第2次超级机器人大战.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">机器人大战2</p> -->
<!-- <p onclick="localStorage.romurl = './rom/第4次机器人大战.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">机器人大战4</p> -->
<!-- 74 -->
<p onclick="localStorage.romurl = './rom/影子传说.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
影子传说</p>
<p
onclick="localStorage.romurl = './rom/影子传说 [中伟汉化 MS修正].nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
影子传说(中)</p>
<p
onclick="localStorage.romurl = './rom/Duck Tales (E).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
唐老鸭大陆1
</p>
<p
onclick="localStorage.romurl = './rom/Duck Tales 2 (U).nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">
唐老鸭大陆2</p>
<!-- <p onclick="localStorage.romurl = './rom/100IN1.NES';localStorage.isNeedAuto = '';window.location.href = '/fc';">100IN1</p> -->
<p onclick="window.location.href = '/gba'">gba</p>
<!-- This ROM uses a mapper not supported by JSNES: Namcot 106 chip(19) -->
<!-- <p onclick="localStorage.romurl = './rom/Sangokushi 2.nes';localStorage.isNeedAuto = '';window.location.href = '/fc';">三国志2霸王的大陆</p> -->
</div>
</div>
<div id="vedioBtn" class="vedioBtn" style="display: none;user-select:none">
<div id="vedioBtnPlay" class="vedioBtnPlay" style="display: inline-block;"><svg t="1603473964319" class="icon"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2467" width="90" height="90">
<path
d="M512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667z m-41.557333 299.818666a21.333333 21.333333 0 0 0-30.122667-1.066666l-31.232 29.098666a21.333333 21.333333 0 0 0-1.024 30.165334L511.829333 512l-103.765333 111.36a21.333333 21.333333 0 0 0 1.024 30.122667l31.232 29.098666a21.333333 21.333333 0 0 0 30.122667-1.066666l130.005333-139.392 14.464-13.482667a21.290667 21.290667 0 0 0 6.741333-16.64l-0.128-3.626667a21.248 21.248 0 0 0-6.613333-13.013333l-14.464-13.525333z"
p-id="2468" fill="#ffffff"></path>
</svg></div>
<div id="vedioBtnPause" class="vedioBtnPause" style="display: none;"><svg t="1603473333068" class="icon"
viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7199" width="90" height="90">
<path
d="M512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667z m-64 298.666666h-42.666667a21.333333 21.333333 0 0 0-21.333333 21.333334v298.666666a21.333333 21.333333 0 0 0 21.333333 21.333334h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333334v-298.666666a21.333333 21.333333 0 0 0-21.333333-21.333334z m170.666667 0h-42.666667a21.333333 21.333333 0 0 0-21.333333 21.333334v298.666666a21.333333 21.333333 0 0 0 21.333333 21.333334h42.666667a21.333333 21.333333 0 0 0 21.333333-21.333334v-298.666666a21.333333 21.333333 0 0 0-21.333333-21.333334z"
p-id="7200" fill="#ffffff"></path>
</svg></div>
</div>
<style>
.aTransBox {
position: absolute;
bottom: 5vw;
/* right: calc(50vw - 10vw); */
right: calc(50vw - 20vw);
width: 20vw;
height: 20vw;
background: white;
transform: rotate(90deg);
box-sizing: border-box;