-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patharcade.html
186 lines (171 loc) · 7.01 KB
/
arcade.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>A-Frame JSNES: WebVR NES emulator</title>
</head>
<!-- <script src="lib/jquery-1.4.2.min.js" type="text/javascript" charset="utf-8"></script> -->
<script src="https://aframe.io/releases/0.4.0/aframe.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://rawgit.com/donmccurdy/aframe-extras/v2.2.0/dist/aframe-extras.loaders.min.js"></script>
<!-- for menu overlay -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha256-916EbMg70RQy9LHiGkXzG8hSg9EdNy97GazNG/aiY1w=" crossorigin="anonymous" />
<style>
.intro-overlay {
z-index: 1;
position: absolute;
top: 20px;
left: 20px;
max-width: 350px;
box-sizing: border-box;
padding: 1.5em;
color: #FFF;
background: rgba(0, 0, 0, 0.75);
font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;
}
.menu-overlay {
z-index: 99999;
position: fixed;
top: 20px;
right: 20px;
box-sizing: border-box;
padding: 1.5em;
width: 60px;
height: 60px;
padding-bottom: 0px;
background: rgba(0, 0, 0, 0.5) url(./images/hamburger-white.png) center no-repeat;
background-size: 40px 40px;
font-family: Source Sans Pro, Helvetica Neue, Helvetica, Arial, sans-serif;
}
.menu-overlay:hover {
background: rgba(0, 0, 0, 0.2) url(./images/hamburger-white.png) center no-repeat;
background-size: 40px 40px;
}
</style>
<body>
<a-scene>
<a-assets>
<canvas id="nes-screen" class="nes-screen" width="256" height="256"></canvas>
<a-asset-item id="tree" src="assets/untitled.dae"></a-asset-item>
</a-assets>
<a-entity id="cameraWrapper" rotation="0 180 0">
<a-entity id="camera" camera look-controls></a-entity>
</a-entity>
<a-curvedimage src="#nes-screen" height="3.72" width="4" radius="4.26" theta-length="39.2" theta-start="-19.44"
rotation="-47 180 0" scale="-3.91 2.69 3.25" position="-2.76 -9.24 30.6" ></a-curvedimage>
<a-entity collada-model="#tree" rotation="0 180 0" scale="25 25 25" position="22 -28 0"></a-entity>
<a-sky color="black"></a-sky>
</a-scene>
<div id="bloc" class="img-rounded intro-overlay">
<h4><strong>A-Frame JSNES</strong></h4>
<div id="emulator"></div>
<h4>Controls</h4>
<table id="controls">
<tr>
<th>Button</th>
<th>Player 1</th>
<th>Player 2</th>
</tr>
<tr>
<td>Left</td>
<td>Left</td>
<td>Num-4</td>
<tr>
<td>Right</td>
<td>Right</td>
<td>Num-6</td>
</tr>
<tr>
<td>Up</td>
<td>Up</td>
<td>Num-8</td>
</tr>
<tr>
<td>Down</td>
<td>Down</td>
<td>Num-2</td>
</tr>
<tr>
<td>A</td>
<td>X</td>
<td>Num-7</td>
</tr>
<tr>
<td>B</td>
<td>Z/Y</td>
<td>Num-9</td>
</tr>
<tr>
<td>Start</td>
<td>Enter</td>
<td>Num-1</td>
</tr>
<tr>
<td>Select</td>
<td>Ctrl</td>
<td>Num-3</td>
</tr>
</table>
</div>
<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 type="text/javascript" charset="utf-8">
var nes;
$(function() {
nes = new JSNES({
'ui': $('#emulator').JSNESUI({
"Homebrew": [
['LJ65', 'roms/lj65/lj65.nes'],
['Concentration Room', 'roms/croom/croom.nes']
],
"Working": [
['Bubble Bobble', 'local-roms/Bubble Bobble (U).nes'],
['Contra', 'local-roms/Contra (U) [!].nes'],
['Donkey Kong', 'local-roms/Donkey Kong (JU).nes'],
['Dr. Mario', 'local-roms/Dr. Mario (JU).nes'],
['Golf', 'local-roms/Golf (JU).nes'],
['The Legend of Zelda', 'local-roms/Legend of Zelda, The (U) (PRG1).nes'],
['Lemmings', 'local-roms/Lemmings (U).nes'],
['Lifeforce', 'local-roms/Lifeforce (U).nes'],
['Mario Bros.', 'local-roms/Mario Bros. (JU) [!].nes'],
['Mega Man', 'local-roms/Mega Man (U).nes'],
['Pac-Man', 'local-roms/Pac-Man (U) [!].nes'],
['Super Mario Bros.', 'local-roms/Super Mario Bros. (JU) (PRG0) [!].nes'],
['Tennis', 'local-roms/Tennis (JU) [!].nes'],
['Tetris', 'local-roms/Tetris (U) [!].nes'],
['Tetris 2', 'local-roms/Tetris 2 (U) [!].nes'],
['Zelda II - The Adventure of Link', 'local-roms/Zelda II - The Adventure of Link (U).nes']
],
"Nearly Working": [
['Duck Hunt', 'local-roms/Duck Hunt (JUE) [!].nes'],
['Super Mario Bros. 3', 'local-roms/Super Mario Bros. 3 (U) (PRG1) [!].nes']
]
})
});
});
</script>
<script type="text/javascript" charset="utf-8">
var scene = document.querySelector('a-scene');
if (scene.hasLoaded) {
run();
} else {
scene.addEventListener('loaded', run);
}
function run () {
setTimeout(function(){ // wait a few seconds before loading a rom, yes this is ghetto
$("#romSelect")[0].value = "roms/lj65/lj65.nes";
nes.ui.loadROM();
}, 2000);
}
</script>
</body>
</html>