forked from lucaschungzsj/fcgame
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
271 lines (261 loc) · 13.6 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
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="email=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="full-screen" content="yes">
<meta name="browsermode" content="application">
<meta name="x5-orientation" content="landscape">
<meta name="x5-fullscreen" content="true">
<meta name="x5-page-mode" content="app">
<title>FC游戏在线玩 | 小霸王其乐无穷</title>
<meta name="keywords" content="FC/NES模拟器,在线畅玩八十款任天堂红白机游戏,小霸王游戏机其乐无穷。支持魂斗罗/超级玛丽/忍者龙剑传等等任天堂红白机游戏。" />
<meta name="description" content="非常适合在手机/电脑上在线游玩,近乎完美的还原任天堂FC/NES原版ROM游戏的视频和声音。" />
<link href="css/jsnes.css" rel="stylesheet" type="text/css" />
<link rel="shortcut icon" href="/static/favicon.ico">
</head>
<body>
<div class="main">
<div class="panel">
<div class="controller-area">
<div class="controller">
<div id="controls-direction">
<div id="controls-rocker"></div>
<button role="BUTTON_UP" class="up joydirection" id="joystick_btn_up">U</button>
<button role="BUTTON_RIGHT" class="right joydirection" id="joystick_btn_right">R</button>
<button role="BUTTON_DOWN" class="down joydirection" id="joystick_btn_down">D</button>
<button role="BUTTON_LEFT" class="left joydirection" id="joystick_btn_left">L</button>
</div>
</div>
<div class="joy">I</div>
<div><a href="https://github.com/lucaschungzsj/fcgame#readme" tppabs="" target="_blank" class="readme">按键说明</a></div>
</div>
<div class="function-area">
<div class="screen">
<div id="emulator" align="center" style="width:100%;height:100%"></div>
</div>
<div class="function">
<button class="controls-center-select joybtn" id="joystick_btn_select" role="BUTTON_SELECT">Select</button>
<button class="controls-center-start joybtn" id="joystick_btn_start" role="BUTTON_START">Start</button>
</div>
</div>
<div class="action-area">
<div class="action">
<div id="controls-fire">
<button class="b joybtn" role="BUTTON_B" id="joystick_btn_B">B</button>
<button class="a joybtn" role="BUTTON_A" id="joystick_btn_A">A</button>
</div>
</div>
</div>
<div class="sign">FAMILY <br> COMPUTER</div>
</div>
</div>
</body>
<script src="lib/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/dynamicaudio-min.js" type="text/javascript" charset="utf-8"></script>
<script src="source/nes.js" type="text/javascript" charset="utf-8"></script>
<script src="source/utils.js" type="text/javascript" charset="utf-8"></script>
<script src="source/cpu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/keyboard.js" type="text/javascript" charset="utf-8"></script>
<script src="source/mappers.js" type="text/javascript" charset="utf-8"></script>
<script src="source/papu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/ppu.js" type="text/javascript" charset="utf-8"></script>
<script src="source/rom.js" type="text/javascript" charset="utf-8"></script>
<script src="source/ui.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/debug.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/nipplejs.min.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/joystick.js" type="text/javascript" charset="utf-8"></script>
<script src="lib/jweixin-1.6.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
var nes;
$(function() {
nes = new JSNES({
'ui': $('#emulator').JSNESUI({
"经典热门": [
['沙罗曼蛇 (U) Life Force [!]', 'roms/Life Force [!].nes'],
['超级马里奥1 (W) Super Mario Bros. [!]', 'roms/(W) Super Mario Bros. [!].nes'],
['坦克 (J) Battle City [!]', 'roms/(J) Battle City.nes'],
['魂斗罗1 (U) 30S [!]', 'roms/Contra1(U)30S.nes'],
['赤影战士 Kage [!]', 'roms/Kage.nes'],
['脱狱 Cross Fire (J)', 'roms/Cross Fire (J).nes'],
['双截龙2 Double Dragon2 [!]', 'roms/Double Dragon2.nes'],
['塞尔达传说2:林克的冒险 [!] Zelda II - The Adventure of Link(U) [!]', 'roms/Zelda II - The Adventure of Link (U).nes'],
['冒险岛1 (J) Adventure Island [!]', 'roms/(J) Takahashi Meijin no Bouken Shima [!].nes'],
['1943 (U) 1943 - The Battle of Midway [!]', 'roms/1943.nes'],
['火箭车 (J) Road Fighter [!]', 'roms/(J) Road Fighter [!].nes'],
['越野机车 (JU) Excitebike [!]', 'roms/(JU) Excitebike [!].nes'],
['功夫 (J) (V1.2) Yie Ar Kung-Fu [!]', 'roms/(J) (V1.2) Yie Ar Kung-Fu [!].nes'],
['淘金者(汉化) [!]', 'roms/TaoJinZhe.nes'],
['俄罗斯方块 (U) Tetris 2 [!]', 'roms/Tetris 2 (U) [!].nes'],
['中国象棋 [!]', 'roms/Zhong Guo Xiang Qi.nes'],
['五子棋 (5) 日版 [!]', 'roms/5.nes'],
['炸弹人1 [!] (J) Bomberman [!]', 'roms/(J) Bomberman [!].nes'],
],
"超级玛丽": [
['超级马里奥1 (W) Super Mario Bros. [!]', 'roms/(W) Super Mario Bros. [!].nes'],
['超级马里奥2 (W) Super Mario Bros. 3 (U)', 'roms/Super Mario Bros. 3 (U) (PRG1) [!].nes'],
['马里奥拆屋工 (W) Wrecking Crew', 'roms/(W) Wrecking Crew [!].nes'],
['马里奥医生 (JU) Dr. Mario', 'roms/Dr. Mario (JU).nes'],
],
"坦克大战": [
['坦克大战 (J) Battle City [!]', 'roms/(J) Battle City.nes'],
['导弹坦克 (Ch) Missile Tank', 'roms/(Ch) Missile Tank.nes'],
['坦克1990 (Ch) Tank 1990', 'roms/(Ch) Tank 1990.nes'],
],
"魂斗罗": [
['魂斗罗1 (U) 30S [!]', 'roms/Contra1(U)30S.nes'],
['魂斗罗1 (U) 30', 'roms/Contra1(U)30.nes'],
['魂斗罗1 (U) 30F', 'roms/Contra1(U)30F.nes'],
['魂斗罗1 (U) 30L', 'roms/Contra1(U)30L.nes'],
['魂斗罗1 (U) 30M', 'roms/Contra1(U)30M.nes'],
['魂斗罗1 (U) S [!]', 'roms/Contra1(U)S.nes'],
['魂斗罗1 (U) F', 'roms/Contra1(U)F.nes'],
['魂斗罗1 (U) L', 'roms/Contra1(U)L.nes'],
['魂斗罗1 (U) M', 'roms/Contra1(U)M.nes'],
],
"双截龙": [
['双截龙2 Double Dragon2 [!]', 'roms/Double Dragon2.nes'],
['双截龙1 Double Dragon1', 'roms/Double Dragon1.nes'],
['双截龙3 Double Dragon3', 'roms/Double Dragon3.nes'],
['双截龙4 Double Dragon4', 'roms/Double Dragon4.nes'],
],
"淘金者": [
['淘金者(汉化) [!]', 'roms/TaoJinZhe.nes'],
['淘金者(J)', 'roms/Championship Lode Runner (J).nes'],
],
"俄罗斯方块": [
['俄罗斯方块2 (U) Tetris 2 [!]', 'roms/Tetris 2 (U) [!].nes'],
['俄罗斯方块 LJ65', 'roms/lj65.nes'],
['俄罗斯方块 Tetris(U)', 'roms/Tetris (U) [!].nes'],
['俄罗斯方块 (Tengen) Tetris [!]', 'roms/(Tengen) Tetris [!].nes'],
],
"飞机类":[
['沙罗曼蛇 (U) Life Force [!]', 'roms/Life Force [!].nes'],
['1943 (U) 1943 - The Battle of Midway [!]', 'roms/1943.nes'],
['兵蜂1 (J) TwinBee [!]', 'roms/(J) TwinBee [!].nes'],
],
"赛车类": [
['火箭车 (J) Road Fighter [!]', 'roms/(J) Road Fighter [!].nes'],
['越野机车 (JU) Excitebike [!]', 'roms/(JU) Excitebike [!].nes'],
['F1赛车 (J) F-1 Race', 'roms/(J) F-1 Race [!].nes'],
['摩托车大赛 (JU) (PRG0) Mach Rider', 'roms/(JU) (PRG0) Mach Rider [!].nes'],
],
"运动类": [
['网球Tennis(JU)', 'roms/Tennis (JU) [!].nes'],
['高尔夫 Golf (JU)', 'roms/Golf (JU).nes'],
],
"棋牌类": [
['中国象棋 [!]', 'roms/Zhong Guo Xiang Qi.nes'],
['五子棋 (5) 日版 [!]', 'roms/5.nes'],
['Concentration Room', 'roms/croom.nes'],
['AV麻雀俱乐部 (Hacker) AV Mahjongg', 'roms/(Hacker) AV Mahjongg.nes'],
],
"其他": [
['马戏团 (J) Circus Charlie', 'roms/(J) Circus Charlie [!].nes'],
['敲冰块 (J) Ice Climber', 'roms/(J) Ice Climber.nes'],
['纽约大拳猫 (JP)', 'roms/RockinCats.nes'],
['撞球咖啡馆 Shufflepuck Cafe', 'roms/Shufflepuck Cafe.nes'],
['泡泡龙 Bubble Bobble (U)', 'roms/Bubble Bobble (U).nes'],
['地底探险1 (J) Spelunker', 'roms/(J) Spelunker [!].nes'],
['快乐猫 (J) Mappy', 'roms/(J) Mappy [!].nes'],
['成龙踢馆1 (J) Spartan X', 'roms/(J) Spartan X [!].nes'],
['猪小弟 (J) Pooyan', 'roms/(J) Pooyan.nes'],
['打砖块1 (J) Arkanoid', 'roms/(J) Arkanoid [!].nes'],
],
"不可用": [
['小蜜蜂 (J) Galaxian', 'roms/(J) Galaxian [!].nes'],
['赤色要塞 (KC) Jackal [!]', 'roms/Jackal.nes'],
['花式撞球 (U) Side Pocket', 'roms/Side Pocket.nes'],
['彩虹岛 (U) Rainbow Islands', 'roms/Rainbow Islands.nes'],
['快打旋风 (U) Mighty Final Fight [!]', 'roms/Mighty Final Fight.nes'],
['忍者龙剑传1 (PC10) Ninja Gaiden [!]', 'roms/Ninja_Gaiden1.nes'],
['忍者龙剑传2 (PC10) Ninja Gaiden II [!]', 'roms/Ninja_Gaiden2.nes'],
['忍者龙剑传3 (PC10) Ninja Gaiden III [!]', 'roms/Ninja_Gaiden3.nes'],
['七宝奇谋1 (J) Goonies, The [!]', 'roms/(J) Goonies, The [!].nes'],
['南极大冒险 (J) Antarctic Adventure', 'roms/(J) Antarctic Adventure [!].nes'],
['叮当1 (J) Dig Dug', 'roms/(J) Dig Dug [!].nes'],
['影之传说 (J) Kage no Densetsu [!]', 'roms/(J) Kage no Densetsu [!].nes'],
],
})
});
});
</script>
<!--[if IE]>
<script type="text/vbscript" src="lib/jsnes-ie-hacks.vbscript"></script>
<![endif]-->
<script>
function touchDwon(evt) {
nes.keyboard.keyDown({
keyCode: evt.keyCode
});
};
function touchUp(evt) {
nes.keyboard.keyUp({
keyCode: evt.keyCode
});
};
function select(val) {
if (val.substring(0, 1) == "#") {
return document.querySelector(val);
} else {
return document.getElementById(val);
}
}
var joystick = new Joystick({
el: select("controls-rocker"),
mode: 'static',
color: "#808080",
size: 100,
isFourBtn: false,
keyCodes: [87, 83, 65, 68],
btn_down_fn: touchDwon,
btn_up_fn: touchUp,
relative: true,
});
joystick.init();
</script>
<!-- <script>
var url=location.href;
var imageUrl = '../static/fc.png';
$.ajax({
type : "get",
url : "/wx/jssdk?url="+url,
success : function(r){
var data = r.data;
wx.config({
debug: false,
appId: data.appId,
timestamp: data.timestamp,
nonceStr: data.nonceStr,
signature: data.signature,
jsApiList: [
'onMenuShareTimeline',
'onMenuShareAppMessage',
'onMenuShareQQ',
'onMenuShareWeibo',
'onMenuShareQZone'
]
});
}
});
wx.ready(function () {
var shareData = {
title: '小霸王游戏机,时光倒转回童年',
desc: '在线游玩魂斗罗/超级玛丽/双截龙/冒险岛等等八十款任天堂红白机游戏!爷的青春回来了',
link: url,
imgUrl: imageUrl
};
wx.onMenuShareAppMessage(shareData);//分享给好友
wx.onMenuShareTimeline(shareData);//分享到朋友圈
wx.onMenuShareQQ(shareData);//分享给手机QQ
wx.onMenuShareWeibo(shareData);//分享腾讯微博
wx.onMenuShareQZone(shareData);//分享到QQ空间
});
wx.error(function (res) {
//alert(res.errMsg);//错误提示
});
</script> -->
</html>